From owner-freebsd-arm@FreeBSD.ORG Sat Jul 12 00:16:51 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1DB1D4EE for ; Sat, 12 Jul 2014 00:16:51 +0000 (UTC) Received: from mailhost.m5p.com (mailhost.m5p.com [IPv6:2001:418:3fd::f7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFDB32736 for ; Sat, 12 Jul 2014 00:16:50 +0000 (UTC) Received: from wonderland.m5p.com (localhost [IPv6:::1]) by mailhost.m5p.com (8.14.5/8.14.5) with ESMTP id s6C0GhMH024703 for ; Fri, 11 Jul 2014 20:16:48 -0400 (EDT) (envelope-from george+freebsd@m5p.com) Message-ID: <53C07E6B.9040303@m5p.com> Date: Fri, 11 Jul 2014 20:16:43 -0400 From: George Mitchell User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: freebsd-arm@freebsd.org Subject: Re: [Bug 175605] devel/binutils: please fix build binutils-2.23.1 in raspberry pi References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.73 on 10.100.0.3 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.7 (mailhost.m5p.com [IPv6:::1]); Fri, 11 Jul 2014 20:16:48 -0400 (EDT) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Jul 2014 00:16:51 -0000 On 07/11/14 11:51, bugzilla-noreply@freebsd.org wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=175605 > > --- Comment #6 from mexas@bris.ac.uk --- > Forgot to say that this was with Andreas Tobler's patchset. > Also, it segfaults with the OS default ld too: > > $ cat z.c > #include > int main(int argc, char **argv) > { > printf("mumu\n"); > return 0; > } > $ cc -c z.c -Wall > $ /usr/local/bin/ld -o z /usr/lib/crt1.o /usr/lib/crti.o z.o -lc > $ ldd z > z: > libc.so.7 => /lib/libc.so.7 (0x2003c000) > $ file z > z: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses > shared libs), for FreBSD 10.0 (1000710), not stripped > $ ./z > Segmentation fault (core dumped) > $ /usr/bin/ld -o z /usr/lib/crt1.o /usr/lib/crti.o z.o -lc > $ ldd z > z: > libc.so.7 => /lib/libc.so.7 (0x2003c000) > $ file z > z: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses > shared libs), for FreBSD 10.0 (1000710), not stripped > $ ./z > Segmentation fault (core dumped) > $ > Why are you using this strange invocation of the linker? If I run "cc -v -o z z.c", here is how it invokes ld: "/usr/bin/ld" --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o z /usr/lib/crt1.o /usr/lib/crti.o /usr/lib/crtbegin.o -L/usr/lib /tmp/z-9530c3.o -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/lib/crtend.o /usr/lib/crtn.o The resulting program runs without difficulty. -- George