[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [rtl] uresolved symbol __udivdi3 and __umoddi3
Hello Havard,
it is me again. I think, my previous answer to your question was
precipitant.
Compiling with "-O2" may not solve your problem, but here is
a solution that works:
Use the compiler flags "-static -r -nostartfile -nostdlib -lgcc".
The explanation:
1. __divdi3 and __udivdi3 is used to compute "/" with operands
of type "long long" or "unsigned long long", respectively.
The are defined in libgcc.a. Therefore, you have to use "-lgcc"
2. When linking a program against libgcc, gcc automatically adds
a function for program startup. A kernel module must not linked
with this startup function. Therefore you need the flag "-nostartfile".
3. You cannot use libc in kernel space. Therefore you need the flag
"-nostdlib".
4. Kernel modules have to be relocatable. Therefore you need the "-r" flag.
Sorry for my previous misleading posting.
Regards,
Bernd