From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10659 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: Unable to build with --enable-shared Date: Sat, 22 Oct 2016 23:58:29 +0200 Message-ID: <20161022215829.GA5749@port70.net> References: 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 1477173536 762 195.159.176.226 (22 Oct 2016 21:58:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 22 Oct 2016 21:58:56 +0000 (UTC) User-Agent: Mutt/1.6.0 (2016-04-01) To: musl@lists.openwall.com Original-X-From: musl-return-10672-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 22 23:58:51 2016 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 1by4JN-0006wJ-FN for gllmg-musl@m.gmane.org; Sat, 22 Oct 2016 23:58:41 +0200 Original-Received: (qmail 26162 invoked by uid 550); 22 Oct 2016 21:58:42 -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 26144 invoked from network); 22 Oct 2016 21:58:41 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:10659 Archived-At: * Samuel Sadok [2016-10-22 22:37:46 +0200]: > I am unable to build musl with --enable-shared. Multiple issues in > unrelated projects (e.g. here: https://bugs.swift.org/browse/SR-1023) > suggest that the culprit is a change in behaviour between binutils > 2.25 and 2.26. > that bug is different, that's about object symbols (swift seems to misuse protected visibility objects, and instead of fixing the problem they switched to the gold linker which does not yet have the bfd linker fix, such incompetence is frustrating.. however the issue does not affect musl: we don't mark objects protected to avoid issues with broken toolchains.) > $ make > [...] > x86_64-pc-linux-gnu-gcc -D_XOPEN_SOURCE=700 -I./arch/x86_64 > -I./arch/generic -Iobj/src/internal -I./src/internal -Iobj/include > -I./include -include vis.h -B/usr/local/bin/x86_64-pc-linux-gnu- > -fPIC -c -o obj/src/process/posix_spawn.lo src/process/posix_spawn.c some flags are missing here.. e.g. freestanding flags > [...] > x86_64-pc-linux-gnu-gcc -D_XOPEN_SOURCE=700 -I./arch/x86_64 > -I./arch/generic -Iobj/src/internal -I./src/internal -Iobj/include > -I./include -include vis.h -B/usr/local/bin/x86_64-pc-linux-gnu- > -nostdlib -shared -Wl,-e,_dlstart -o lib/libc.so obj/src/aio/aio.lo [a > ton of objects] obj/ldso/dynlink.lo > /usr/local/bin/x86_64-pc-linux-gnu-ld: obj/src/process/posix_spawn.lo: > relocation R_X86_64_PC32 against protected symbol `execve' can not be > used when making a shared object > /usr/local/bin/x86_64-pc-linux-gnu-ld: final link failed: Bad value > collect2: error: ld returned 1 exit status > make: *** [lib/libc.so] Error 1 > execve is a protected function symbol, so it should be bound locally, i think R_X86_64_PC32 is ok for that, so it's not clear to me what goes wrong..