- open() and close() the file in the main loop
- pass the fd down into the handlers
- use _rtld_error() in ELFNAME(ldd)
this fixes PR#40543 and also makes error messages look better.
cases, since we never did 64 bit a.out. now ldd on 32 bit a.out
at least tries to work, but fails (on sparc or sparc64, no idea yet
for x86) the same way that all dynamic a.out binaries fail.
binaries for the ELF version.)
- convert a.out, elf32 and elf64 support into convience libraries and
link them right ones in. if elf_ldd() fails on 64 bit platforms,
try elf32_ldd() before aout_ldd().
now ldd on 64 bit platforms works for 32 bit binaries, aka PR#40199,
and it seems that all the issues from README are gone too.
First, parse arguments correctly so -f isn't taken as a file name. For ELF
don't do anything yet, but for a.out compat, pass formats along when
exec'ing binary.
Previously dlsym resolved to the version in crt0.o or libc which would
mean that the caller's shared object couldn't be determined correctly
using __builtin_return_address(0).
Mainly from FreeBSD, but adapted by me. Benefits of this solutions are:
- backward comptibility maintained
- existing broken binaries are fixed with a new ld.elf_so
- __mainprog_obj can be removed from crt0.o
- we do the same thing as FreeBSD
Fixes PR 22067.
OKed by Jason and Christos.
This is the case only with a.out programs, and the manual page has been
changed to reflect that in the BUGS section. Since most our architectures
have been converted to elf, this is not an issue anymore.
be changed in the future to "yes".
If MKDYNAMICROOT == "no", there is no change from existing behaviour
of a static /bin and /sbin (and a few programs in elsewhere).
If MKDYNAMICROOT == "yes", the following changes occur:
in <bsd.own.mk>:
SHLIBDIR?= /lib
SHLINKDIR?= /lib
in various Makefiles, the following entry is DISABLED.
LDSTATIC?=-static
This results in all programs (except those "standalone" programs built
in sys/arch/*/stand) are linked dynamically, the shared linker is moved
from /usr/libexec to /lib (with a compat symlink), and the shared
libraries used by /bin and /sbin programs are moved from /usr/lib to
/lib (with compat symlinks).