Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What I want to do is add a dummy system call to the 3.11 Linux Kernel. What I did:

  • Downloaded and extracted kernel v3.11 from and placed it in /usr/src
  • In file, /usr/src/linux-3.11/kernel/sys.c, I added:

    asmlinkage long sys_helloworld(void) {
      printk(KERN_EMERG "Hello, world!\n");
      return 0;
  • In file /usr/src/linux-3.11/include/linux/syscalls.h, I added:

    asmlinkage long sys_helloworld(void);
  • In file /usr/src/linux-3.11/arch/x86/syscalls/syscall_32.tbl, I added:

    351     i386    helloworld             sys_helloworld
  • Then I did:


After 1 hour of compilation, it gave me:

undefined reference to "sys_helloworld".

These steps I followed from a guide explaining system call and adding to the 3.8.2 kernel. Now how can I do this in kernel 3.11? What am I missing?

share|improve this question

closed as off-topic by Scott Chamberlain, Randolph West, Dave M, allquixotic, Tog Oct 4 '13 at 14:32

  • This question does not appear to be about computer software or computer hardware within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

Perhaps this question fits Stack Overflow better? Voted to migrate. –  Daniel Andersson Sep 25 '13 at 9:28
Why do you need to add syscalls ? there are already plenty of syscalls available, and many of them are very extensible. –  BatchyX Oct 3 '13 at 18:09

1 Answer 1

I cannot see anything, in your post, referring to interrupts. System calls cannot be made directly by user processes, but must be generated indirectly via interrupts. So, one of the things to do is to update the interrupt table to include your own interrupt call. Nor have you made any reference to an update of the Makefile to allow proper compilation and loading of your routines.

So, in a few words, you have given us precious few details. I suggest that you look up some relevant Web guides. The one I like, very simple and clear, is this one here, from some course work material. I hope you find this useful.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.