lkml.org 
[lkml]   [2004]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel-image-2.6.7
On Thu, 26 Aug 2004, Sam Ravnborg wrote:
> Could you try to stuff in an echo line here - something like:
> echo $(LD) $(LDFLAGS) \
> $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
> -T $(@D)/.tmp_$(@F:.o=.ver); \
>
> Just to be confirmed that there is no LDFLAGS that fouls us here.

And LDFLAGS doesn't foul us here (it's just `-m m68kelf').

Just for those that are interested: after some more digging this turned out to
be a bug in the (old) binutils I'm using. It got fixed in later releases of
binutils. (Originally I thought the problem was introduced during the final
linking step of the kernel, and it showed up with whatever version of ld I
used for the final linking step).

How to reproduce:

| anakin$ cat test.s
| .version "01.01"
| .section .bss
| m68k_memory:
| .zero 32
| anakin$

The key is the `.version' keyword, without that the problem cannot be
reproduced.

| anakin$ cat test.ver
| anakin$

Yep, an empty linker script is fine. Without a linker script it cannot be
reproduced, though.

Results for dfferent versions of binutils:

| anakin$ m68k-linux-as -o test.o test.s && m68k-linux-ld -r -o test2.o test.o -T test.ver && m68k-linux-objdump -h test*.o | grep bss; m68k-linux-ld -V
| 2 .bss 00000020 00000000 00000000 00000034 2**2
| 2 .bss 00000000 00000000 00000000 00000034 2**2
^^^^^^^^
BUG! .bss becomes zero sized!

| GNU ld version 2.9.5 (with BFD 2.9.5.0.37)
| Supported emulations:
| m68kelf
| m68klinux
| anakin$

And newer binutils are fine:

| tux$ m68k-linux-as -o test.o test.s && m68k-linux-ld -r -o test2.o test.o -T test.ver && m68k-linux-objdump -h test*.o | grep bss; m68k-linux-ld -V
| 2 .bss 00000020 00000000 00000000 00000034 2**2
| 2 .bss 00000020 00000000 00000000 00000034 2**2
| GNU ld version 2.13.90.0.10 20021010
| Supported emulations:
| m68kelf
| m68klinux
| tux$

| anakin$ m68k-linux-as -o test.o test.s && m68k-linux-ld -r -o test2.o test.o -T test.ver && m68k-linux-objdump -h test*.o | grep bss; m68k-linux-ld -V
| 2 .bss 00000020 00000000 00000000 00000034 2**2
| 2 .bss 00000020 00000000 00000000 00000034 2**2
| GNU ld version 2.14.90.0.7 20031029 Debian GNU/Linux
| Supported emulations:
| m68kelf
| m68klinux
| anakin$

Conclusions: gcc 2.95.2 and binutils 2.9.5 are fine for compiling 2.6.x kernels
for m68k, but:
- You need a newer binutils for building initramfs (make usr/)
- You need a newer binutils for building modular kernels with
CONFIG_MODVERSIONS=y

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:2.713 / U:1.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site