From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13062 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: Segmentation fault in static binaries built with recent binutils Date: Wed, 18 Jul 2018 22:24:07 +0200 Message-ID: <20180718202406.GO4418@port70.net> References: <20180718163940.gnx6jkia4i5qdjua@reiner-h.de> <20180718181438.nl4e333zkzw36rzl@reiner-h.de> <20180718190024.GL4418@port70.net> <20180718193833.GM4418@port70.net> <20180718201928.GN4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1531945334 10065 195.159.176.226 (18 Jul 2018 20:22:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2018 20:22:14 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) To: musl@lists.openwall.com Original-X-From: musl-return-13078-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jul 18 22:22:10 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1ffsxe-0002WC-5R for gllmg-musl@m.gmane.org; Wed, 18 Jul 2018 22:22:10 +0200 Original-Received: (qmail 22489 invoked by uid 550); 18 Jul 2018 20:24:19 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 22471 invoked from network); 18 Jul 2018 20:24:18 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20180718201928.GN4418@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:13062 Archived-At: * Szabolcs Nagy [2018-07-18 22:19:28 +0200]: > the difference between the two cases was --build-id > > --build-id=sha1 works, --build-id=none segfaults > as a work around you can add build-id to the musl-gcc.specs diff --git a/tools/musl-gcc.specs.sh b/tools/musl-gcc.specs.sh index 294e24f7..9b4aa761 100644 --- a/tools/musl-gcc.specs.sh +++ b/tools/musl-gcc.specs.sh @@ -23,7 +23,7 @@ libgcc.a%s %:if-exists(libgcc_eh.a%s) %{shared|pie:crtendS.o%s;:crtend.o%s} $libdir/crtn.o *link: --dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic} +--build-id -dynamic-linker $ldso -nostdlib %{shared:-shared} %{static:-static} %{rdynamic:-export-dynamic} *esp_link: