Date: Fri, 12 Dec 2008 13:17:17 +0200 From: Andriy Gapon <avg@icyb.net.ua> To: Peter Jeremy <peterjeremy@optushome.com.au> Cc: freebsd-hackers@freebsd.org Subject: Re: memtest86+ can not link: binutils issue? Message-ID: <4942483D.8000003@icyb.net.ua> In-Reply-To: <490B05BA.9090306@icyb.net.ua> References: <4909DC03.1080901@icyb.net.ua> <20081030184625.GA99398@server.vk2pj.dyndns.org> <490B05BA.9090306@icyb.net.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4942483D.8000003>
