Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Tue, 23 Sep 2014 21:05:25 +0200
From: u-igbb@...ey.se
To: Rich Felker <dalias@...c.org>
Cc: musl@...ts.openwall.com
Subject: Re: compiling musl on x86_64 linux with pcc

On Mon, Aug 25, 2014 at 11:46:17AM -0400, Rich Felker wrote:
> Note that some fixes are needed for
> pcc-libs:
> 
> - You need to remove the broken csu files and replace them with
>   symlinks to the musl files.
> 
> - You need to add __attribute__((__visibility__("hidden"))) to all
>   external functions in libpcc.
> 
> - You need to add -fPIC to the CFLAGS for building libpcc or you get a
>   broken libpcc (containing textrels) that can't be used for building
>   libc.so and that's harmful for use with any other shared libs.

I followed these directions and musl with pcc play along very well for me
(on i386).

One strange thing I notice though, which is probably more pcc-related
than musl (even though this concerns a musl-based toolchain).

If I build a shared library with pcc without supplying -Wl,-Bsymbolic
(or -Wl,-Bsymbolic-functions as musl does) then a(ny) binary linked to that
library segfaults at start even if it does not actually need/use the
library. I noticed this with libpcap and wonder what is the reason. Adding
-Wl,-Bsymbolic makes everything work so the code is not exactly broken.

Wonder if you happen to guess a possible reason for such kind of trouble,
something that pcc gets wrong? This looks related to runtime linking
behaviour so possibly not fully offtopic here.

Rune

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.