[PATCH] insmod.c doesn't compile for mips

Brian Daniels bdaniels at ciena.com
Fri Jul 18 16:33:24 UTC 2008


Bernhard Fischer wrote:
> On Thu, Jul 17, 2008 at 05:38:22PM -0400, Brian Daniels wrote:
>> The following patch will fix the compile for mips.
>>
>> Index: modutils/insmod.c
>> ===================================================================
>> --- modutils/insmod.c   (revision 22874)
>> +++ modutils/insmod.c   (working copy)
>> @@ -841,7 +841,7 @@
>>  {
>>  #if defined(__arm__) || defined(__i386__) || defined(__mc68000__) \
>>   || defined(__sh__) || defined(__s390__) || defined(__x86_64__) \
>> - || defined(__powerpc__)
>> + || defined(__powerpc__) || defined(__mips__)
>>         struct arch_file *ifile = (struct arch_file *) f;
>>  #endif
>>         enum obj_reloc ret = obj_reloc_ok;
> 
> you don't seem to use PLT nor GOT entries. Applied as r22876.
> Thanks!
> PS: Please let me know if insmod'ing works ok for you now.

With this patch busybox-1.11.1 insmod is working. I haven't tested the 
HEAD revision because init is failing to complete and I haven't worked 
out why yet.

There are some compiler warnings in insmod.c relating to USE_GOT_ENTRIES 
and USE_PLT_ENTRIES not being defined. I only mention it because 
everything else compiles clean without warnings so obviously the team 
has put some effort into cleaning them up. Anyway here are the specific 
warnings if you are interested. I was using r22877.

~/busybox/modutils/insmod.c: In function 'arch_apply_relocation':
~/busybox/modutils/insmod.c:839: warning: unused parameter 'sym'
~/busybox/modutils/insmod.c: In function 'arch_create_got':
~/busybox/modutils/insmod.c:1799: warning: unused parameter 'f'
~/busybox/modutils/insmod.c: In function 'new_init_module':
~/busybox/modutils/insmod.c:2943: warning: cast to pointer from integer 
of different size
~/busybox/modutils/insmod.c:2948: warning: cast to pointer from integer 
of different size
~/busybox/modutils/insmod.c: In function 'insmod_main':
~/busybox/modutils/insmod.c:4146: warning: cast to pointer from integer 
of different size




More information about the busybox mailing list