History log of /freebsd-10.0-release/usr.bin/ldd/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


254018 07-Aug-2013 markj

Pass variables prefixed with both LD_ and LD_32_ to the run-time linker.
This prevents unintentional execution of programs when running ldd(1) on
32-bit Linux binaries.

PR: 175339, 127276
Suggested by: kib, rstone
Reviewed by: kib
MFC after: 2 weeks


223262 18-Jun-2011 benl

Fix clang warnings.

Approved by: philip (mentor)


215705 22-Nov-2010 brucec

hdr.elf.e_ident[EI_OSABI] is not a bitmask so '==' should been used.

Reported by: Artem Belevich <fbsdlist at src.cx>


211725 23-Aug-2010 imp

MFtbemd:

Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.


201386 02-Jan-2010 ed

Build usr.bin/ with WARNS=6 by default.

Also add some missing $FreeBSD$ to keep svn happy.


199871 28-Nov-2009 danger

- correctly render the provided example

PR: docs/140962
Submitted by: mharo


181161 02-Aug-2008 jhb

A few style and whitespace fixes.

Submitted by: bde


181136 01-Aug-2008 jhb

Tweak the support for using ldd on 32-bit objects a bit further.
Specifically, build a 32-bit /usr/bin/ldd32 on amd64 which handles 32-bit
objects. Since it is a 32-bit binary, it can fork a child process which
can dlopen() a 32-bit shared library. The current 32-bit support in ldd
can't do this because it does the dlopen() from a 64-bit process. In order
to preserve an intuitive interface for users, the ldd binary automatically
execs /usr/bin/ldd32 for 32-bit objects. The end result is that ldd on
amd64 now transparently handles 32-bit shared libraries in addition to
32-bit binaries.

Submitted by: ps (indirectly)


180877 28-Jul-2008 edwin

Fix text in the comment why we check for ELF32_R_TYPE

Approved by: bde@
MFC after: 2 days2 days


180646 21-Jul-2008 edwin

After the commit of SVN rev 180236, wilko@ noticed that the approach
doesn't work on the Alpha platform: machine/elf.h doesn't include
sys/elf32.h there.

PR: related to bin/124906
Approved by: bde@
MFC after: 1 week


180236 03-Jul-2008 edwin

On 64 bit architectures, you can run 32 bit executables and the rtld can trace them, but ldd(1) doesn't know yet how to detect them:

[/] root@ed-exigent>ldd `which httpd`
ldd: /usr/local/sbin/httpd: can't read program header
ldd: /usr/local/sbin/httpd: not a dynamic executable

But...

[/] root@ed-exigent>LD_32_TRACE_LOADED_OBJECTS==1 `which httpd`
libm.so.4 => /lib32//libm.so.4 (0x280c8000)
libaprutil-1.so.2 => /usr/local/lib/libaprutil-1.so.2 (0x280de000)
libexpat.so.6 => /usr/local/lib/libexpat.so.6 (0x280f2000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28110000)
libapr-1.so.2 => /usr/local/lib/libapr-1.so.2 (0x281fd000)
libcrypt.so.3 => /lib32//libcrypt.so.3 (0x2821d000)
libpthread.so.2 => not found (0x0)
libc.so.6 => /lib32//libc.so.6 (0x28235000)
libpthread.so.2 => /usr/lib32/libpthread.so.2 (0x2830d000)

Added support in ldd(1) for the LD_32_xxx environment variables if
the architecture of the machine is >32 bits. If we ever go to 128
bit architectures this excercise will have to be repeated but thanks
to earlier commits today it will be relative simple.

PR: bin/124906
Submitted by: edwin
Approved by: bde (mentor)
MFC after: 1 week


180235 03-Jul-2008 edwin

Extract the determination of the kind of (dynamic) executable from
the main-loop into a seperate function.
Instead of using hardcoded environment variables, define them in a
lookup table.
For the rest, no functionality changes.

Approved by: bde (mentor)
MFC after: 1 week


180234 03-Jul-2008 edwin

stylify ldd.c, no functional changes.

Approved by: bde (mentor)
MFC after: 1 week


179013 15-May-2008 bms

Typo


179011 15-May-2008 bms

Add an example of how to use ldd -f.


169499 12-May-2007 pav

Expand documentation of -f option

PR: docs/66265
Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after: 1 week


131291 29-Jun-2004 dwmalone

The type of some aout header types changed to uint_32, so now we need
to cast to long before printing. While I'm here, raise WARNS to 6.


125857 15-Feb-2004 dwmalone

Fix a few WARNS:
1) Include string.h for strcpy.
2) Don't make duplicate declaration of dump_file, we now include extern.h.
3) Help out with some constness.
4) Cast to slightly better types in some comparisons.


108470 30-Dec-2002 schweikh

Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.


105439 19-Oct-2002 sobomax

Fix a problem with RTLD_TRACE flag to dlopen(3), which sometimes can return
even if there was no error occured (when trying to dlopen(3) object that
already linked into executable which does dlopen(3) call). This is more
proper fix for `ldd /usr/lib/libc.so' problem, because the new behaviour
conforms to documentation.

Remove workaround from ldd.c (rev.1.32).

PR: 35099
Submitted by: Nathan Hawkins <utsl@quic.net>
MFC after: 1 week


103436 17-Sep-2002 peter

Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports. As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL. It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha


96818 17-May-2002 knu

Fix a tiny bug in shlib support of ldd(1); if dlopen(lib, RTLD_TRACE)
returns, exit gracefully with 0.

This fixes the behavior you see when you specify libc.so. It occurs
because ldd(1) itself is linked with libc.so.

$ ldd /usr/lib/libc.so
/usr/lib/libc.so:
ldd: /usr/lib/libc.so: (null)
/usr/lib/libc.so: exit status 1

Reviewed by: silence of audit@


95648 28-Apr-2002 markm

Warns; ANSIfy, constify and move declarations into a common header.


95647 28-Apr-2002 markm

Remove GCC-specific flags.


95153 20-Apr-2002 mike

Include <arpa/inet.h> for prototype of ntohl() used in the N_BADMAG()
macro.


95124 20-Apr-2002 charnier

Use `The .Nm utility'


92920 22-Mar-2002 imp

remove __P


92342 15-Mar-2002 ru

mdoc(7) police: kill hard sentence breaks.


90755 17-Feb-2002 obrien

Add support such that if LD_TRACE_LOADED_OBJECTS_ALL is defined to a
non-empty string in the environment; we indicate which objects caused
each object to be loaded.

PR: 30908
Submitted-by: Mike Meyer <mwm@mired.org>


90385 08-Feb-2002 sobomax

Inspect ELF header and reject any non-FreeBSD shared objects.

MFC after: 2 weeks


90172 04-Feb-2002 sobomax

Allow ldd(1) be used on shared libraries in addition to executables.


90171 04-Feb-2002 sobomax

GC meaningless assignment.

MFC after: 3 days


85647 29-Oct-2001 dillon

Fix long format mismatch with int arg


79535 10-Jul-2001 ru

mdoc(7) police: removed HISTORY info from the .Os call.


79452 09-Jul-2001 brian

Fix the type of the NULL arg to execl()

Idea from: Theo de Raadt <deraadt@openbsd.org>


76224 02-May-2001 obrien

* include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.


70049 15-Dec-2000 ache

Fix lseek args order (PR 23549)
Catch and report lseek errors too
While reading header don't attempt to continue reading
if some IO operation fails

PR: 23549


69827 10-Dec-2000 charnier

Add rcsid. Remove unused #include. Remove error() definition and replace
with warn().


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


65428 04-Sep-2000 imp

getopt and friends are declared in <unistd.h>
getopt returns -1 not EOF.


60327 10-May-2000 phantom

Corractly use .Nm and .An/.Aq macros. Replace FreeBSD with .Fx macro
e.


58720 28-Mar-2000 sheldonh

Cross-reference ldd(1) in rtld(1) and vice versa.


58372 20-Mar-2000 sheldonh

Revert the part of rev 1.5 that spammed rev 1.4; rev 1.4 correctly
removed an erroneous cross-reference to ld.so(1), which doesn't
exist in FreeBSD.

PR: 17468
Submitted by: Randall Hopper <aa8vb@ipass.net>


57670 01-Mar-2000 sheldonh

Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.


50534 28-Aug-1999 mpp

Add $FreeBSD$ lines to man pages that are missing them to make it
easier for translation teams.

PR: docs/13418
Submitted by: Alexey Zelkin <phantom@cris.net>


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


39354 16-Sep-1998 dfr

Make ldd work on alpha.


38648 30-Aug-1998 jdp

Fix a bug which caused ldd to execute scripts listed on its command
line, instead of skipping them.

Also make a few minor cleanups.

PR: bin/7783


36915 12-Jun-1998 peter

Add -DFREEBSD_AOUT to CFLAGS to ensure we get the correct definitions
from <link.h>


36566 01-Jun-1998 peter

ldd standalone build, after repository copy.


35575 01-May-1998 dfr

Add ELF support.


31989 25-Dec-1997 hoek

Use consistent spelling,
writeable -> writable (recall prior debate over this? :-)
initialise -> initialize
recognise -> recognize

Merry Christmas! :)


31442 28-Nov-1997 jdp

In the "ldd -v" output, display the N_AUX information for each
symbol. It indicates whether the symbol refers to a function or a
data object.


29042 02-Sep-1997 jdp

Touch up the code that implements "ldd -v".

Bring the style of sods.c into better conformance. Add code to
print the contents of each datum being relocated. Correct the logic
that distinguishes between programs, shared libraries, and object
files. Make the entire program "-Wall" clean.


28935 30-Aug-1997 jmg

fix a few spelling changes

Submitted by: Josh Gilliam

Closes PR's: 4429, 4431-4438

PS: He has agreed to submit all contrib fixes back to the original author.


22996 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


21576 12-Jan-1997 jdp

Set LD_TRACE_LOADED_OBJECTS to "1" instead of to "". The dynamic linker
now treats empty "LD_*" environment variables as if they were unset, per
the standard SVR4 conventions.


21469 10-Jan-1997 jdp

For "ldd -v", print shared object dependencies that were specified as
pathnames (rather than as "-lfoo") correctly.
Closes PR bin/2404.


20050 30-Nov-1996 bde

Made the synopsis in the man page conform to the style guide.

Made the usage message conform to the style guide.

Don't use the implementation variable `__progname'.


19926 22-Nov-1996 peter

make the Usage string match reality

Submitted by: faried nawaz <fn@uidaho.edu>, PR#2075


19253 29-Oct-1996 peter

oops, uninitialised variable.. -v mode depended on stack contents.

Submitted by: Masafumi NAKANE <max@wide.ad.jp>, PR#1920


18600 01-Oct-1996 peter

Incorporate John Polstra's sods.c display of the details about the
dynamic linking information in the executable. It's quite extensive.
It's connected to ldd's (new) -v option.


18598 01-Oct-1996 peter

Support for specifying printf-like output specs to control the ldd output
as present in the new rtld version.

Obtained from: NetBSD
Reviewed by: nate, jdp


5205 23-Dec-1994 nate

Updated to recent version of Paul K.'s shlib code. This code has better
warning handling and allows for link-time warnings with a modified
version of gas.

Note: Not all of the newer bits were updated such as some of the non-x86
machine-dependant code is relevant to FreeBSD right now.

Obtained from: NetBSD


1755 17-Jun-1994 jkh

Remove reference to the ld.so man page - ain't no such animal.
Reported by John Lind.


1741 15-Jun-1994 rich

Changes from Paul Kranenburg which bring us into sync with his sources:

handling of errors through the standard err() and warn()
more fixes for Geoff Rehmet's NULL pointer bug.
fixes NULL pointer bugs when linking mono and nested X servers.
supports a `-nostdlib' option.
accept object files without a symbol table
don't attempt dynamic linking when `-A' is given

a few variable names have chaged (desc -> fd), and the formatting has
changed which should make it much easier to track his sources.

I tested 'make world' for /usr/src and X twice with these changes.


1153 13-Feb-1994 jkh

This is Paul K's latest set of ld changes. A commit was necessary at this
late stage due to the fact that link.h was copyright Sun Microsystems.

This version of ld sync's us up with NetBSD's ld and supports compatablily
with NetBSD's -[zZ] flags (which we had reversed). Compiling with this
new ld will give you RRS warnings for libraries which do not contain .type
infomation - these wsarnings are harmless and will go away as soon as you
recompile your libraries (cd /usr/src; make libraries).


1146 11-Feb-1994 nate

Changed NetBSD -> FreeBSD


871 16-Dec-1993 nate

Fixed Makefile per bug report from Julian Stacey. There was an extra DESTDIR
in front of BINDIR definition.


696 03-Nov-1993 paul

Imported NetBSD's ld for shared libs.