From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2688 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: ARM unwind issue Date: Mon, 28 Jan 2013 19:44:54 -0500 Message-ID: <20130129004454.GJ20323@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1359420308 22282 80.91.229.3 (29 Jan 2013 00:45:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 29 Jan 2013 00:45:08 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2689-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 29 01:45:27 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1TzzKH-0000kR-MS for gllmg-musl@plane.gmane.org; Tue, 29 Jan 2013 01:45:25 +0100 Original-Received: (qmail 26239 invoked by uid 550); 29 Jan 2013 00:45:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 26230 invoked from network); 29 Jan 2013 00:45:07 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2688 Archived-At: On Tue, Jan 29, 2013 at 12:02:37PM +1300, Andre Renaud wrote: > Hi, > I'm trying to build some software using musl on an ARM platform, and > am getting the following error: > arm-none-linux-gnueabi-gcc > -specs=/home/andre/work/package-builder/staging/lib/musl-gcc.specs -o > program program.o > /tools/arm/arm-2010q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/../../../../arm-none-linux-gnueabi/bin/ld: > program: hidden symbol `__aeabi_unwind_cpp_pr0' in > /tools/arm/arm-2010q1/bin/../lib/gcc/arm-none-linux-gnueabi/4.4.1/libgcc_eh.a(unwind-arm.o) > is referenced by DSO > > Any ideas on what I've messed up in either my musl build, or my > cflags/lflags to cause this? musl itself does not use any unwinding facilities. However, on ARM, at least with some gcc versions, some arithmetic functions in libgcc.a are pulling in exception stuff for no good reason. I believe this is a bug in the CFLAGS gcc is using to build libgcc, rather than an intentional bad behavior, but I haven't looked into it in depth. With that said, it looks like the problem is that, when musl libc.so was built, it contained references to __aeabi_unwind_cpp_pr0 (from libgcc.a) which were not resolved. Normally musl's configure script also includes -lgcc_eh in $(LIBCC) for precisely this reason, so the first thing I would do is check your config.mak and see what configure chose for $(LIBCC). If you figure out what went wrong, please report it to the list so we can try to avoid the same thing happening for other users. Rich