|
Message-ID: <20230417203109.GO3630668@port70.net> Date: Mon, 17 Apr 2023 22:31:09 +0200 From: Szabolcs Nagy <nsz@...t70.net> To: Lorenz Hipp <jHhvLtwZki@...isch.de> Cc: musl@...ts.openwall.com Subject: Re: Add musl-ldd for user convenience and to avoid naming conflict * Lorenz Hipp <jHhvLtwZki@...isch.de> [2023-04-17 04:36:24 +0200]: > The default "ldd" program on most Linux systems is surely the script > provided by the gnu libc implementation. > > Unfortunately, (for reasons I won't go into detail) their program > cannot work properly with programs linked with musl, as it prints an > error message : > > musl-gcc -o Test-musl Test-musl.c > ldd Test-musl > > ./Test-musl: error while loading shared libraries: /usr/lib/libc.so: invalid ELF header > > Since the mentioned file is of course a linker script and just text, it > cannot have a valid ELF header. > > > Following the FAQ on the musl website at > > https://wiki.musl-libc.org/faq.html#Q:-Where-is-%3Ccode%3Eldd%3C/code%3E? > > the musl linker actually has 'ldd' functionality, which is used when > it is called as "ldd". > > Quote : > > Just create a symlink from ld-musl-$ARCH.so to /bin/ldd. > > At least on machines where software is developed, it would not be > a good idea to replace the glibc ldd script with a link to the musl > linker, because of .. reasons (such as slightly different output behaviour). i think the faq should be updated to use /lib/ld-musl-$arch.so.1 --list path/to/exe which you can put in a script and name it ldd if you want.
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.