On Wed, 13 Feb 2008, Kurt Mahan wrote:
Finn Thain wrote:
Has anyone else seen this error? Debian binutils 2.17-3 is fine, but
binutils 2.18.50.0.2 and 2.18.50.0.4 fail. Compiler makes no difference (I
tried gcc 3.3.6-15 and 4.4.1-21).
...
LD init/built-in.o
LD .tmp_vmlinux1
m68k-linux-gnu-ld: .tmp_vmlinux1: Not enough room for program headers, try linking with -N
m68k-linux-gnu-ld: final link failed: Bad value
make: *** [.tmp_vmlinux1] Error 1
I ran into this myself. The new linker emits a build-id. There are
several ways to fix it.
Thanks, Kurt. Good to know that it isn't just my toolchain.
- tweak OBJCOPYFLAGS in arch/m68k/Makefile to remove that section (this
was my solution):
OBJCOPYFLAGS := -R .note -R .note.gnu.build-id -R .comment -S
- put --build-id=none on the ld line to not emit the build id.. The
Makefile system makes this difficult due to it autodetecting the
build-id capability. In the root Makefile see this code:
# Use --build-id when available.
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
$(call ld-option, -Wl$(comma)--build-id,))
LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
- Modify the linker script (vmlinux.lds) to stick the build-id section
somewhere --
.note.gnu.build-id : { *(.note.gnu.build-id) }
OK. I don't know whether the build-id section is better removed or kept,
so I'll leave it to others to send a patch.
-f
--Kurt
$ m68k-linux-gnu-ld --version
GNU ld (Linux/GNU Binutils) 2.18.50.0.4.20080208
$ m68k-linux-gnu-gcc --version
m68k-linux-gnu-gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
-
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html