Changeset 23892

2010-11-05T22:38:38+01:00 (6 years ago)

[PATCH] ldd crashes when LDSO_SEARCH_INTERP_PATH is not #defined
Since b65c7b2c79debcb9017e31913e01eeaa280106fb, the implicit search path
can be disabled by not #defining LDSO_SEARCH_INTERP_PATH. This
causes _dl_ldsopath to never be set, so it remains NULL. _dl_ldsopath is
still used when LDSO_LDD_SUPPORT is #defined, to strip the path off
of the beginning of the absolute path to the interpreter in use
for printing. The _dl_strlen will crash with a NULL argument.

Rather than relying on _dl_ldsopath, this change causes ldd to compute
the interpreter's basename directly.

glibc seems to print the full path to the interpreter without
any computed basename or =>. I personally prefer glibc's behavior, but
to preserve backwards compatibility with uClibc, the existing
format with the computed basename, =>, and full path is used here. This
enables simpler (and unchanged) text processing in a pipeline.

Signed-off-by: Mark Mentovai <mark at>

1 added

Note: See TracChangeset for help on using the changeset viewer.