From owner-freebsd-hackers@FreeBSD.ORG Fri Dec 12 11:17:32 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3295C1065672 for ; Fri, 12 Dec 2008 11:17:32 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9D48FC14 for ; Fri, 12 Dec 2008 11:17:31 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id NAA29825; Fri, 12 Dec 2008 13:17:19 +0200 (EET) (envelope-from avg@icyb.net.ua) Message-ID: <4942483D.8000003@icyb.net.ua> Date: Fri, 12 Dec 2008 13:17:17 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.18 (X11/20081124) MIME-Version: 1.0 To: Peter Jeremy References: <4909DC03.1080901@icyb.net.ua> <20081030184625.GA99398@server.vk2pj.dyndns.org> <490B05BA.9090306@icyb.net.ua> In-Reply-To: <490B05BA.9090306@icyb.net.ua> Content-Type: text/plain; charset=KOI8-U Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: memtest86+ can not link: binutils issue? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Dec 2008 11:17:32 -0000 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