Re: Linux kernel 2.4 programming problem



On Tue, 12 Jun 2007 15:54:57 +0200 Federico Paparoni wrote:

Hi all,
i'm trying to create a simple system call in a kernel 2.4 distribution.
I read guide/articles like this

http://irfanhabib.wordpress.com/2006/10/01/adding-a-system-call-linux-24x/

All the articles say the same things, but the implementation of my new
system call doesn't work.
I create a new entry in arch/i386/kernel/entry.S
I create a new entry in include/asm/unistd.h
I create a new function with the asmlinkage prefix in a source file
already defined (in ipc/sem.c for example)

When i create my user program, it doesn't work. Firstly when i try to
compile i receive a problem like this

: undefined reference to 'errno'

Then I include errno.h (also if i don't understand this step) and the
compilation works, but the syscall neverworks, because the call always
return -1.

Any help?
Any tutorial FOR DUMMY MAN that someone already used?

You can try this one. It used to work, but I haven't updated or
tested it lately.

http://www.xenotime.net/linux/syscall_ex/

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Linux kernel 2.4 programming problem
    ... I read guide/articles like this ... All the articles say the same things, but the implementation of my new ... I create a new entry in arch/i386/kernel/entry.S ... compile i receive a problem like this ...
    (Linux-Kernel)
  • Re: biblatex questions, biblatex-mla feedback
    ... fields found in the bib file, regardless of the entry type. ... now co-opted "version" (in articles without volumes and issue numbers) ... others what they use for movie, artwork, performance, ... "Performance" as a type could get very tricky, ...
    (comp.text.tex)
  • Re: float to pointer coercion (cost 13)
    ... Do you compile two versions of the ... but it is given two entry ... but to the immediate-args entry point. ... ((DOUBLE-FLOAT DOUBLE-FLOAT) ...
    (comp.lang.lisp)
  • Re: Cross-Access-platform databases re-compiles or refreshes references for a long time
    ... First I thought it was some recompiling - but a full compile in vba takes only 5-10 seconds. ... Maybe it is checking up the references all over the application and recompiles. ... Searching MSDN for articles gives no results - it is often hard to find articles which addresses cross-product problems. ...
    (microsoft.public.access.modulesdaovba)
  • Re: HLA suggestions
    ... >> This is only true if you compile a PROGRAM. ... >> For more details on controlling the code that HLA generates. ... lex level:) as the "_HLAMain" entry point...and the linker response ...
    (alt.lang.asm)