|
Message-ID: <20150402212638.GB6817@brightrain.aerifal.cx> Date: Thu, 2 Apr 2015 17:26:38 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: perl native musl, ldd On Thu, Apr 02, 2015 at 04:40:22PM -0400, Jean-Marc Pigeon wrote: > On 04/02/2015 02:48 PM, u-wsnj@...ey.se wrote: > > On Thu, Apr 02, 2015 at 02:17:36PM -0400, Jean-Marc Pigeon wrote: > >>>> bash-4.3# ldd SysV.so > >>>> ldd (0x7f5d60dd2000) > >>>> libc.so => ldd (0x7f5d60dd2000) > >>>> Error relocating SysV.so: Perl_croak: symbol not found > >>>> Error relocating SysV.so: Perl_sv_setiv: symbol not found > >>>> Error relocating SysV.so: Perl_sv_2pv_flags: symbol not found > >>>> Error relocating SysV.so: Perl_av_store: symbol not found > >>>> etc. > > > >> I am using a packager using ldd to establish > >> dependencies list. > > > > I would not say reporting the symbols is a bug, rather that the packager > > is kind of relying on UB. Is there a specification of how a program called > > "ldd" shall format its output and which data shall be present? > > > > Rune > > > Packager Relying on ldd UB, sure!. I think calling this "UB" is a misappropriation of an unrelated term just to criticize what you're doing. You are relying on a complex utility that might have OS/libc-specific behavior that doesn't match your expectations, or that might not even exist on some systems, but that's not automatically a horrible thing as long as you know your system(s). > Using ldd was the best way I found to list one package all > dependencies (looking at ELF file type ans searching for > required external components). > If you have a better way (more standard) to propose not using > ldd that will be a good thing. idea? Using readelf (or your own ELF parsing) and looking for the DT_NEEDED entries would perhaps be a cleaner approach. It would only list direct dependencies rather than recursive ones and it would not depend on running target code (i.e. it would work equally well with cross-compiled packages). Of course this does not cover all dependencies (non-library things) but it at least automates a large part of the dependency tracking process. Rich
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.