aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ldd
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix text in the comment why we check for ELF32_R_TYPEEdwin Groothuis2008-07-281-8/+5
| | | | | | | | Approved by: bde@ MFC after: 2 days2 days Notes: svn path=/head/; revision=180877
* After the commit of SVN rev 180236, wilko@ noticed that the approachEdwin Groothuis2008-07-211-4/+18
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=180646
* On 64 bit architectures, you can run 32 bit executables and the rtld can ↵Edwin Groothuis2008-07-032-2/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=180236
* Extract the determination of the kind of (dynamic) executable fromEdwin Groothuis2008-07-031-81/+120
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=180235
* stylify ldd.c, no functional changes.Edwin Groothuis2008-07-031-37/+34
| | | | | | | | Approved by: bde (mentor) MFC after: 1 week Notes: svn path=/head/; revision=180234
* TypoBruce M Simpson2008-05-151-1/+1
| | | | Notes: svn path=/head/; revision=179013
* Add an example of how to use ldd -f.Bruce M Simpson2008-05-151-1/+8
| | | | Notes: svn path=/head/; revision=179011
* Expand documentation of -f optionPav Lucistnik2007-05-121-1/+8
| | | | | | | | | PR: docs/66265 Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us> MFC after: 1 week Notes: svn path=/head/; revision=169499
* The type of some aout header types changed to uint_32, so now we needDavid Malone2004-06-292-13/+14
| | | | | | | to cast to long before printing. While I'm here, raise WARNS to 6. Notes: svn path=/head/; revision=131291
* Fix a few WARNS:David Malone2004-02-151-6/+6
| | | | | | | | | | 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. Notes: svn path=/head/; revision=125857
* Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/Jens Schweikhardt2002-12-301-1/+1
| | | | | | | Add FreeBSD Id tag where missing. Notes: svn path=/head/; revision=108470
* Fix a problem with RTLD_TRACE flag to dlopen(3), which sometimes can returnMaxim Sobolev2002-10-191-5/+4
| | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=105439
* Initiate deorbit burn for the i386-only a.out related support. Moves arePeter Wemm2002-09-171-3/+1
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=103436
* Fix a tiny bug in shlib support of ldd(1); if dlopen(lib, RTLD_TRACE)Akinori MUSHA2002-05-171-4/+5
| | | | | | | | | | | | | | | | | 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@ Notes: svn path=/head/; revision=96818
* Warns; ANSIfy, constify and move declarations into a common header.Mark Murray2002-04-283-39/+68
| | | | Notes: svn path=/head/; revision=95648
* Remove GCC-specific flags.Mark Murray2002-04-281-1/+0
| | | | Notes: svn path=/head/; revision=95647
* Include <arpa/inet.h> for prototype of ntohl() used in the N_BADMAG()Mike Barcroft2002-04-202-0/+2
| | | | | | | macro. Notes: svn path=/head/; revision=95153
* Use `The .Nm utility'Philippe Charnier2002-04-201-1/+2
| | | | Notes: svn path=/head/; revision=95124
* remove __PWarner Losh2002-03-221-1/+1
| | | | Notes: svn path=/head/; revision=92920
* mdoc(7) police: kill hard sentence breaks.Ruslan Ermilov2002-03-151-2/+4
| | | | Notes: svn path=/head/; revision=92342
* Add support such that if LD_TRACE_LOADED_OBJECTS_ALL is defined to aDavid E. O'Brien2002-02-172-5/+19
| | | | | | | | | | | 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> Notes: svn path=/head/; revision=90755
* Inspect ELF header and reject any non-FreeBSD shared objects.Maxim Sobolev2002-02-081-1/+7
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=90385
* Allow ldd(1) be used on shared libraries in addition to executables.Maxim Sobolev2002-02-042-3/+14
| | | | Notes: svn path=/head/; revision=90172
* GC meaningless assignment.Maxim Sobolev2002-02-041-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=90171
* Fix long format mismatch with int argMatthew Dillon2001-10-291-1/+1
| | | | Notes: svn path=/head/; revision=85647
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-1/+1
| | | | Notes: svn path=/head/; revision=79535
* Fix the type of the NULL arg to execl()Brian Somers2001-07-091-1/+1
| | | | | | | Idea from: Theo de Raadt <deraadt@openbsd.org> Notes: svn path=/head/; revision=79452
* * include/elf.h has been repo copied to include/elf-hints.h, and it noDavid E. O'Brien2001-05-022-2/+2
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=76224
* Fix lseek args order (PR 23549)Andrey A. Chernov2000-12-151-12/+15
| | | | | | | | | | | Catch and report lseek errors too While reading header don't attempt to continue reading if some IO operation fails PR: 23549 Notes: svn path=/head/; revision=70049
* Add rcsid. Remove unused #include. Remove error() definition and replacePhilippe Charnier2000-12-102-35/+26
| | | | | | | with warn(). Notes: svn path=/head/; revision=69827
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-201-1/+1
| | | | Notes: svn path=/head/; revision=68963
* getopt and friends are declared in <unistd.h>Warner Losh2000-09-041-1/+1
| | | | | | | getopt returns -1 not EOF. Notes: svn path=/head/; revision=65428
* Corractly use .Nm and .An/.Aq macros. Replace FreeBSD with .Fx macroAlexey Zelkin2000-05-101-7/+10
| | | | | | | e. Notes: svn path=/head/; revision=60327
* Cross-reference ldd(1) in rtld(1) and vice versa.Sheldon Hearn2000-03-281-1/+2
| | | | Notes: svn path=/head/; revision=58720
* Revert the part of rev 1.5 that spammed rev 1.4; rev 1.4 correctlySheldon Hearn2000-03-201-1/+0
| | | | | | | | | | | removed an erroneous cross-reference to ld.so(1), which doesn't exist in FreeBSD. PR: 17468 Submitted by: Randall Hopper <aa8vb@ipass.net> Notes: svn path=/head/; revision=58372
* Remove single-space hard sentence breaks. These degrade the qualitySheldon Hearn2000-03-011-2/+4
| | | | | | | | of the typeset output, tend to make diffs harder to read and provide bad examples for new-comers to mdoc. Notes: svn path=/head/; revision=57670
* Add $FreeBSD$ lines to man pages that are missing them to make itMike Pritchard1999-08-281-0/+2
| | | | | | | | | | easier for translation teams. PR: docs/13418 Submitted by: Alexey Zelkin <phantom@cris.net> Notes: svn path=/head/; revision=50534
* $Id$ -> $FreeBSD$Peter Wemm1999-08-283-3/+3
| | | | Notes: svn path=/head/; revision=50477
* Make ldd work on alpha.Doug Rabson1998-09-163-8/+15
| | | | Notes: svn path=/head/; revision=39354
* Fix a bug which caused ldd to execute scripts listed on its commandJohn Polstra1998-08-301-29/+28
| | | | | | | | | | | line, instead of skipping them. Also make a few minor cleanups. PR: bin/7783 Notes: svn path=/head/; revision=38648
* Add -DFREEBSD_AOUT to CFLAGS to ensure we get the correct definitionsPeter Wemm1998-06-121-2/+2
| | | | | | | from <link.h> Notes: svn path=/head/; revision=36915
* ldd standalone build, after repository copy.Peter Wemm1998-06-011-2/+1
| | | | Notes: svn path=/head/; revision=36566
* Add ELF support.Doug Rabson1998-05-012-11/+62
| | | | Notes: svn path=/head/; revision=35575
* Use consistent spelling,Tim Vanderhoek1997-12-251-1/+1
| | | | | | | | | | | writeable -> writable (recall prior debate over this? :-) initialise -> initialize recognise -> recognize Merry Christmas! :) Notes: svn path=/head/; revision=31989
* In the "ldd -v" output, display the N_AUX information for eachJohn Polstra1997-11-281-3/+13
| | | | | | | | symbol. It indicates whether the symbol refers to a function or a data object. Notes: svn path=/head/; revision=31442
* Touch up the code that implements "ldd -v".John Polstra1997-09-023-54/+86
| | | | | | | | | | 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. Notes: svn path=/head/; revision=29042
* fix a few spelling changesJohn-Mark Gurney1997-08-301-1/+1
| | | | | | | | | | | Submitted by: Josh Gilliam Closes PR's: 4429, 4431-4438 PS: He has agreed to submit all contrib fixes back to the original author. Notes: svn path=/head/; revision=28935
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-223-3/+3
| | | | Notes: svn path=/head/; revision=22996
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-143-3/+3
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Set LD_TRACE_LOADED_OBJECTS to "1" instead of to "". The dynamic linkerJohn Polstra1997-01-121-2/+2
| | | | | | | | now treats empty "LD_*" environment variables as if they were unset, per the standard SVR4 conventions. Notes: svn path=/head/; revision=21576