[BusyBox] Relocation overflows with MIPS hosts?
William A. Gatliff
bgat at billgatliff.com
Wed Jan 22 20:10:03 UTC 2003
Guys:
Found it, wasn't a Busybox problem at all. I needed to add a
-mlong-calls to my module's gcc command line, i.e.:
$ mips-linux-gcc -c -I <path-to-linux>/include -Wall -O2 \
-fomit-frame-pointer -fno-strict-aliasing -fno-common \
-finline-limit=5000 -G 0 -mno-abicalls -fno-pic -mcpu=r4600 \
-mips2 -Wa,--trap -pipe -DMODULE -mlong-calls chardev.c
Or something like that. W00t! :^)
b.g.
On Mon, Dec 30, 2002 at 10:49:23PM -0600, William A. Gatliff wrote:
> Guys:
>
>
> I'm running busybox-0.60.4 on a linux-2.4.18-mips kernel. I'm also
> using gcc-3.2.1, binutils-2.13.1, and uClibc-0.9.16.
>
> Any time I try to load a module, I get this:
>
> # insmod /chardev.o
> Using /chardev.o
> insmod: Relocation overflow of type 4 for sprintf
> insmod: Relocation overflow of type 4 for printk
> insmod: Relocation overflow of type 4 for printk
> insmod: Relocation overflow of type 4 for printk
> insmod: Relocation overflow of type 4 for printk
> insmod: Relocation overflow of type 4 for sprintf
> insmod: Relocation overflow of type 4 for create_proc_entry
> insmod: Relocation overflow of type 4 for register_chrdev
> insmod: Relocation overflow of type 4 for printk
> insmod: Relocation overflow of type 4 for unregister_chrdev
> insmod: Relocation overflow of type 4 for printk
> insmod: Relocation overflow of type 4 for remove_proc_entry
> Segmentation fault
> #
>
> I'm building chardev.o like this:
>
> $ mips-linux-gcc -c -O2 -Wall -fno-pic -mno-abicalls chardev.c
>
>
> Is this a known problem, or should I start looking at code? I get the
> same results with the 20021231 snapshot.
>
>
> Thanks!
>
>
> b.g.
> --
> Bill Gatliff
> http://billgatliff.com
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://busybox.net/mailman/listinfo/busybox
--
Bill Gatliff
Affordable GNU and Linux training and consulting services.
http://billgatliff.com
More information about the busybox
mailing list