>I want to build a 64-bit module.And it will use some function from user 
>space,and I do like follow
 :
>   ar -x /lib/libc.a memmove.o
>next,I try to ld:
>   ld -o mymod -r mymod.o strstr.o 
>and I got error:
> ld:fatal:file strstr.o:wrong ELF class:ELFCLASS32
> ld:fatal:File processing errors.No output written to mymod.
>I  know the strstr.o I got from libc.a is 32-bit,and rhe error appeared.but I 
>don't know how to re
solve it.
>Thank you everyone for your assistance.


There are several bits wrong with this picture:

        - you cannot mix 64 bit & 32 bit
        - you cannot use code from libc in the kernel because there's
          no guarantee that that code will work in kernel context(!)


The kernel has a strstr() of its own, so you'll need to just call
that.

Casper
_______________________________________________
opensolaris-discuss mailing list
[email protected]

Reply via email to