| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Avoid double close() of a file descriptor.
CID: 1006089
Found with: Coverity Prevent(tm)
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Approved by: philip (mentor)
|
|
|
|
| |
Reported by: Artem Belevich <fbsdlist at src.cx>
|
|
|
|
|
| |
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
|
|
|
|
| |
Also add some missing $FreeBSD$ to keep svn happy.
|
|
|
|
|
| |
PR: docs/140962
Submitted by: mharo
|
|
|
|
| |
Submitted by: bde
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
| |
Approved by: bde@
MFC after: 2 days2 days
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
Approved by: bde (mentor)
MFC after: 1 week
|
| |
|
| |
|
|
|
|
|
|
| |
PR: docs/66265
Submitted by: Michel Lavondes <fox@vader.aacc.cc.md.us>
MFC after: 1 week
|
|
|
|
| |
to cast to long before printing. While I'm here, raise WARNS to 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.
|
|
|
|
| |
Add FreeBSD Id tag where missing.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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@
|
| |
|
| |
|
|
|
|
| |
macro.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
MFC after: 2 weeks
|
| |
|
|
|
|
| |
MFC after: 3 days
|
| |
|
| |
|
|
|
|
| |
Idea from: Theo de Raadt <deraadt@openbsd.org>
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Catch and report lseek errors too
While reading header don't attempt to continue reading
if some IO operation fails
PR: 23549
|
|
|
|
| |
with warn().
|
| |
|
|
|
|
| |
getopt returns -1 not EOF.
|
|
|
|
| |
e.
|
| |
|
|
|
|
|
|
|
|
| |
removed an erroneous cross-reference to ld.so(1), which doesn't
exist in FreeBSD.
PR: 17468
Submitted by: Randall Hopper <aa8vb@ipass.net>
|
|
|
|
|
| |
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
|
|
|
|
|
|
|
| |
easier for translation teams.
PR: docs/13418
Submitted by: Alexey Zelkin <phantom@cris.net>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
line, instead of skipping them.
Also make a few minor cleanups.
PR: bin/7783
|
|
|
|
| |
from <link.h>
|