memtest86+ can not link: binutils issue?
Andriy Gapon
avg at icyb.net.ua
Fri Dec 12 03:17:32 PST 2008
on 31/10/2008 15:18 Andriy Gapon said the following:
>>> ld --warn-constructors --warn-common -static -T memtest_shared.lds \
>>> -o memtest_shared head.o reloc.o main.o test.o init.o lib.o
>>> patn.o screen_buffer.o config.o linuxbios.o memsize.o pci.o controller.o
>>> random.o extra.o spd.o error.o dmi.o && \
>>> ld -shared -Bsymbolic -T memtest_shared.lds -o memtest_shared
>>> head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o
>>> config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o spd.o
>>> error.o dmi.o
>>> head.o(.text+0x7): In function `startup_32':
>>> : undefined reference to `_GLOBAL_OFFSET_TABLE_'
>>> Segmentation fault (core dumped)
Just in case anybody still remembers this issue.
It seams that the main culprit here was the following line in the linker
script:
OUTPUT_FORMAT("elf32-i386");
I was tipped just today that it should have read:
OUTPUT_FORMAT("elf32-i386-freebsd", "elf32-i386-freebsd",
"elf32-i386-freebsd");
--
Andriy Gapon
More information about the freebsd-hackers
mailing list