History log of /freebsd-10.1-release/sbin/ldconfig/
Revision Date Author Comments
272461 03-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

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


248525 19-Mar-2013 imp

Add a comment about why aout support is still here: We need it for
compat2x, which is still in use, as evidence by recent bug reports.


248496 19-Mar-2013 joel

Remove obsolete objformat information.

Submitted by: db


201217 29-Dec-2009 ed

ANSIfy ldconfig and the aout bits it still uses from rtld-aout.

(Why is aout support still there?)


198236 19-Oct-2009 ru

Switch the default WARNS level for sbin/ to 6.

Submitted by: Ulrich Spörlein


166244 25-Jan-2007 peter

Remove unused reference to objformat.h


153256 09-Dec-2005 obrien

Tweak -32 description and add -32 FILES.


152568 18-Nov-2005 ru

-mdoc sweep.


152323 11-Nov-2005 jhb

Document -32 flag in usage() output as well.

Requested by: ru
MFC after: 1 week


152321 11-Nov-2005 jhb

Document the -32 switch available on amd64.

Submitted by: Steve Kargl sgk at troutmask dot apl dot washington dot edu
MFC after: 1 week


141611 10-Feb-2005 ru

Sync program's usage() with manpage's SYNOPSIS.


140248 14-Jan-2005 delphij

Improve readability for the recently introduced changes by having
their sizeof(*p) instead of explicitlly specifying their types.

Suggested by: nectar


140244 14-Jan-2005 delphij

Use a better name than underscore-tmpfile for better representation
of the meaning.

Suggested by: stefanf


140241 14-Jan-2005 delphij

64-bit clean + WARNS=6:
- Convert the (char *) cast+cast backs magic to
memcpy(3). Without this, the resulting code
is potentially risky with higher optimization
levels.
- Avoid same name when calling local variables,
as well as global symbols. This reduces
confusion for both human and compiler.
- Add necessary casts, consts
- Use new style function defination.
- Minor style.Makefile(5) tweak
- Bump WARNS?= from 0 to 6

** for the aout code: changes are intentionally limited
to ease maintaince.


133723 14-Aug-2004 stefanf

Avoid using void pointers in additive expressions.

PR: 56653


131488 02-Jul-2004 ru

Mechanically kill hard sentence breaks.


127250 21-Mar-2004 peter

Add initial support for compiling a special 32 bit version of
ld-elf.so.1 on 64 bit systems. Most of this involves using alternate
paths, environment variables and diagnostic messages.

The build glue is seperate.


126896 13-Mar-2004 cperciva

Fix 10 year old size-of-bcopy bug.

PR: bin/43930
Submitted by: Alan Barrett
Approved by: rwatson (mentor)
MFNetBSD: revision 1.35
MFC after: 3 days


126178 23-Feb-2004 johan

style.Makefile(5):
Use WARNS?= instead of WARNS=.


114844 08-May-2003 trhodes

Describe the pattern filenames must be in before they are added to the hints
file.

PR: 46271
Approved by: re (blanket)


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


102070 18-Aug-2002 jdp

Clarify the explanation of the behavior for setuid programs by
noting that the restrictions do not apply if the user invoking the
program is also the owner of the program.

Also, capitalize a section header properly.

PR: misc/41180


99501 06-Jul-2002 charnier

The .Nm utility


92882 21-Mar-2002 imp

o __P removed
o main prototype removed


92806 20-Mar-2002 obrien

Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
"register" -- just how many free registers do people think machines have?)


87325 04-Dec-2001 obrien

Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by: mike


79530 10-Jul-2001 ru

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


77924 08-Jun-2001 schweikh

Fix a "this sentence no verb" grammar bogon.
MFC after: 1 week


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.


74815 26-Mar-2001 ru

- Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.


74531 20-Mar-2001 ru

Set the default manual section for sbin/ to 8.


72923 22-Feb-2001 ps

Elminate common declaration.

Reviewed by: peter


71895 01-Feb-2001 ru

mdoc(7) police: split punctuation characters + misc fixes.


70152 18-Dec-2000 ru

Prepare for mdoc(7)NG.


70121 17-Dec-2000 jdp

Extend the ldconfig security check so that it ignores group-writable
directories in addition to world-writable directories. As before,
this check can be disabled with the "-i" option, which in turn can
be made the default for boot-up by setting "ldconfig_insecure=YES"
in "/etc/rc.conf".

Also fix an mdoc nit in the manual page.

Submitted by: Maxime Henrion <mux@qualys.com>


68960 20-Nov-2000 ru

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


68716 14-Nov-2000 ru

Use Fx macro wherever possible.


64360 07-Aug-2000 jdp

Add a "-i" option ("insecure") which disables the checks for
root ownership, etc. I will soon commit a companion knob for
"/etc/rc.conf".

Submitted by: Maxime Henrion <mhenrion@cybercable.fr>


63872 26-Jul-2000 jdp

If a directory is world-writable or is not owned by root, skip it
and emit a warning. This is a security measure since ldconfig
influences the shared libraries used by all programs.

I think the check should be made even more stringent by also
ignoring group-writable directories. I will make that change soon
unless we encounter a good reason not to do it.

Submitted by: Maxime Henrion <mhenrion@cybercable.fr>


62858 09-Jul-2000 jdp

Make "ldconfig" with no arguments behave the same as "ldconfig -R".

Submitted by: Maxime Henrion <mhenrion@cybercable.fr>


57782 06-Mar-2000 sheldonh

Remove more single-space hard sentence breaks.


57668 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.


56357 21-Jan-2000 jdp

If a directory on the command line doesn't exist, warn about it
and proceed rather than quitting with a fatal error message.

PR: bin/16056
Submitted by: Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>


56125 16-Jan-2000 kris

Fix insecure tempfile handling

Reviewed by: audit@freebsd.org


50476 28-Aug-1999 peter

$Id$ -> $FreeBSD$


45925 21-Apr-1999 billf

Make usage() reflect reality (add the -aout and -elf options).

OK'd by: bde


38960 09-Sep-1998 jdp

Add a new library function getobjformat(). It checks all the
standard places ("/etc/objformat", ${OBJFORMAT}, argv) for an
indication of the user's preferred object file format. This
consolidates some code that was starting to be duplicated in more
and more places.

Use the new function in ldconfig.

Note: I don't think that gcc should use getobjformat(), even though
it could. The compiler should limit itself to functions that are
widespread, to ease porting and cross-compilation.


38885 06-Sep-1998 jdp

Fix calls to mmap. It returns void *, and on failure it returns
MAP_FAILED.

Don't try to extend the mapping in place if it is too short.
There's no guarantee it will be possible. Remap the file instead.

Put in a few style fixes.

Submitted by: Bruce Evans <bde>


38868 05-Sep-1998 jdp

For a.out mode, ignore shared libraries that don't have at least 2
version numbers.


38836 05-Sep-1998 jdp

Implement ldconfig functionality for ELF. The hints are stored in
a different file than the a.out hints, namely, "/var/run/ld-elf.so.hints".
These hints consist only of the directory search path. There is
no hash table as in the a.out hints, because ELF doesn't have to
search for the file with the highest minor version number. (It
doesn't have minor version numbers at all.)

A single run of ldconfig updates either the a.out hints or the ELF
hints, but not both. The set of hints to process is selected in
the usual way, via /etc/objformat, or ${OBJFORMAT}, or the "-aout"
or "-elf" command line option. The rationale is that you probably
want to search different directories for ELF than for a.out.

"ldconfig -r" is faked up to produce output like we are used to,
except that for ELF there are no minor version numbers. This should
enable "ldconfig -r" to be used for checking LIB_DEPENDS in ports
even for ELF.

I implemented the ELF functionality in a new source file, with an
eye toward eliminating the a.out code entirely at some point in
the future.


38023 02-Aug-1998 bde

Fixed printf format errors.


37420 06-Jul-1998 charnier

Add rcsid. remove unused #includes. Getopt returns -1 not EOF. Add usage().
Cosmetics in err(3) string.


37237 28-Jun-1998 bde

Fixed printf format errors.


36910 12-Jun-1998 peter

Force -DFREEBSD_AOUT incase ldconfig is being compiled under elf.
Without this, <link.h> defines stuff for elf linking which is not
what ldconfig needs.


36567 01-Jun-1998 peter

Build ldconfig in /sbin environment directly, rather than under the gnu ld
directory. The rcs files were repository copied.


36397 26-May-1998 sos

ELF preparation step 2:

Move a.out libraries to /usr/lib/aout to make space for ELF libs.
Make rtld usr /usr/lib/aout as default library path.
Make ldconfig reject /usr/lib as an a.out library path.
Fix various Makefiles for LIBDIR!=/usr/lib breakage.

This will after a make world & reboot give a system that no
longer uses /usr/lib/*, infact one could remove all the old
libraries there, they are not used anymore.

We are getting close to an ELF make world, but I'll let this
all settle for a week or two...


32147 01-Jan-1998 alex

Removed /etc/ld.so.conf reference from FILES section (people get
confused when they can't find it), but leave the reference to it
as being a standard filename (which doesn't imply that it exists).

Discussed with: jkh


28559 22-Aug-1997 peter

Add -R (rescan or refresh) option to rescan and rebuild the hints
file based on the previous list of directories stored there which
should overcome a weakness of the '-m' switch which can only add
libs. This is an ideal way of updating the hints list after adding
or removing a shlib since it will remove entries that are gone and
doesn't need to have all the directories spelled out each time.
(eg: rm -f /usr/lib/libtcl75*; ldconfig -R) This only works for
version 2 hints files (which we've been generating for a year or
so) which store the path.


27334 11-Jul-1997 jkh

Allow ldconfig to accept files (containing directory paths) as well as
directory paths.
Reviewed by: jkh & jdp
Submitted by: Hans Zuidam <hans@brandinnovators.com>


27083 29-Jun-1997 bde

Configure static linkage in the normal way (default to -static using
NOSHARED?= yes).


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.


19584 09-Nov-1996 jdp

Document that "ldconfig -m" rescans all directories previously
entered into the hints file, in addition to the directories named
on the command line.

2.2 Candidate.


19522 08-Nov-1996 jdp

Fixed a bug in the handling of the directories in the search path
that is stored in the hints file. If that search path contained
a non-existent directory (one, say, that had been removed), and
"ldconfig -m /a/perfectly/good/directory" was run, ldconfig returned
an error status without printing an error message. This caused
some confusing bombs when installing ports, in particular.

I changed it so that non-existent directories from the stored search
path are silently ignored. Only non-existent directories named
explicitly on the command line are treated as errors. Also, a
diagnostic is printed if and only if an error status is returned.

In an unrelated fix, ldconfig now silently ignores any directories
named on the command line when the "-r" option is given. Formerly,
these directories incorrectly made their way into the "search
directories" line of the listing. It really should be an error to
specify directories together with "-r", but I don't have time to
fix the manual page in that way right now.

2.2 Candidate.


18859 10-Oct-1996 jdp

Add a new option "-f hints_file" to specify an alternate file instead of
"/var/run/ld.so.hints".

Delete an incorrect statement about LD_LIBRARY_PATH from the manual
page.


18597 01-Oct-1996 peter

Updates to deal with ld.so.hints version 2. It now deals with the
ldconfig path (from NetBSD). I added code to make sure there were no
duplicates in the path when multiple ldconfig -m's were used.

Reviewed by: nate, jdp
Obtained from: NetBSD (partly)


17142 12-Jul-1996 jkh

General -Wall warning cleanup, part I.
Submitted-By: Kent Vander Velden <graphix@iastate.edu>


15135 08-Apr-1996 mpp

Correct some man page xrefs, and some other minor changes to bring some
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.


14260 26-Feb-1996 pst

Bring in some of Paul K's fixes for ldconfig from NetBSD-current.
This solves the problem of being unable to use shared libraries with dots
in their names before the ".so.<version>" code.

This should be brought into -stable.

There are more changes from Paul that look like they should be included,
but they change the format of the hints file, so I'm not going to bring them
in now (but we should in the future).

Obtained from: pk@netbsd.org


10076 16-Aug-1995 joerg

Reset the umask before creating the output file; otherwise running
ldconfig as root with a restrictive umask yielded ld.so.hints
unreadable by the world (and thus useless).


9290 24-Jun-1995 asami

Add an "-m" flag to merge instead of replace the entries. We can
now safely add a line like

ldconfig -m ${PREFIX}/lib

in ports' Makefiles and packing lists without throwing away some
directories the user may have added.

Submitted by: Mostly by Paul Kranenburg <pk@cs.few.eur.nl>


5551 12-Jan-1995 joerg

Make ldconfig and ld.so not hashing the shared lib minor number. This
misfeature caused troubles when a program attempted to access a shlib
where one with a higher minor number has been hashed. Ldconfig does
only include the highest-numbered shlib anyway, so this is in no way a
limitation of generality.

Caution: after installing the new programs, your /var/run/ld.so.hints
needs to be rebuiult; run ldconfig again as it's done from /etc/rc.


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


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.


1683 05-Jun-1994 ats

Add the -r and -s flags to the Usage string.


1360 13-Apr-1994 ats

Better link ldconfig static instead dynamic.


1336 05-Apr-1994 ats

Add that /usr/X386/lib is also in the default path for ldconfig. Bug found
by Satoshi Asami ( asami@cs.berkeley.edu ). Fixed also a minor typo
problem.


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.


811 30-Nov-1993 jkh

Many recent fixes from Paul K, add support for chaining of shared lib deps.


745 09-Nov-1993 paul

Cahnged ldconfig.0 to ldconfig.8 for our man system.


740 09-Nov-1993 paul

Updated to newest ld from pk.

lib.c:
Pull in archives containing definitions needed by shared objects.
warnings.c:
Less spurious "undefined symbol" msgs for shared library defined
symbols.
ld.c:
Do a better job of recognising data in text segments, eg. `const char []'.
shlib.c,ld/rtld/{Makefile rtld.c}
Use strsep() in stead of strtok() and restore colons in eg. env. vars.


703 06-Nov-1993 paul

Changed ldconfig.0 to ldconfig.8 for our man setup.


696 03-Nov-1993 paul

Imported NetBSD's ld for shared libs.