[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

linker bug?



When trying to get modules working in 2.6.0-test11, I'm seeing something weird.
A kernel without module support boots fine, while a kernel with module support
crashes very early because any Chip RAM allocation fails.

Some investigation shows that amiga_hw_present.CHIP_RAM is set initially, but
looses its value later. Apparently it's destroyed when mach_gettimeoffset is
filled in.

System.map shows:
| 00180bf2 B amiga_hw_present
| 00180bf4 B mach_gettimeoffset

I.e. amiga_hw_present is only 16 bits large, while it contains a bitfield of 32
single bit values. So when mach_gettimeoffset is changed, half of
amiga_hw_present is overwritten.

I'm using cross gcc version 2.95.2 20000220 and cross binutils version 2.9.5
(with BFD 2.9.5.0.37), both built from Debian sources a while ago.

Then I relinked the kernel using my newer cross binutils (2.13.90.0.10
20021010, from Debian toolchain-source). System.map stills shows that
amiga_hw_present is only 2 bytes large.

Then I recompiled arch/m68k/amiga/config.c using my newer cross gcc (3.2, from
Debian toolchain-source) and relinked (tried both binutils). System.map stills
shows that amiga_hw_present is only 2 bytes large.

`nm -S arch/m68k/amiga/config.o' does show that amiga_hw_present has a size of
4 bytes in all cases, so it looks like a linker bug.

Anyone seen a similar problem before?

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds



Reply to: