Home | History | Annotate | only in /src/libexec/ld.aout_so
History log of /src/libexec/ld.aout_so
RevisionDateAuthorComments
 1.51 18-Mar-2014  riastradh Merge riastradh-drm2 to HEAD.
 1.50 18-Jul-2013  matt Use ${MACHINE_CPU} for m68k
 1.49 05-Feb-2013  martin branches: 1.49.2;
Make sure UUDECODE_FILES is empty if we do not have an old ld.so_aout
(on architectures that never used a.out)
 1.48 05-Feb-2013  matt There are other little endian arm machine_arches other than "arm"
 1.47 06-Jul-2010  mrg branches: 1.47.6; 1.47.12;
remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.46 31-Oct-2008  mrg make MKPIC=no builds work on i368, shark, vax, pmax, sgimips, sparc,
maybe all mips and all arm as well.
 1.45 19-Mar-2004  jmc branches: 1.45.38;
Convert to usage of UUDECODE_FILES and standardize on filename extension
 1.44 21-Oct-2003  lukem Rework how MAKEVERBOSE operates:

* Don't bother prefixing commands with a line of ${_MKCMD}\
and instead rely upon "make -s". This is less intrusive on
all the Makefiles than the former. Idea from David Laight.

* Rename the variables use to print messages. The scheme now is:
_MKMSG_FOO Run _MKMSG 'foo'
_MKTARGET_FOO Run _MKMSG_FOO ${.TARGET}
From discussion with Alistair Crooks.
 1.43 19-Oct-2003  lukem rework to use the newer _MKMSGCREATE (et al) macros
 1.42 19-Oct-2003  lukem support MAKEVERBOSE
 1.41 10-Jul-2003  lukem Rename a large chunk of the make(1) variables which refer to a
program/tool from "FOO" to "TOOL_FOO". The new variables are:
TOOL_ASN1_COMPILE TOOL_CAP_MKDB TOOL_CAT TOOL_CKSUM TOOL_COMPILE_ET
TOOL_CONFIG TOOL_CRUNCHGEN TOOL_CTAGS TOOL_DB TOOL_EQN TOOL_FGEN
TOOL_GENCAT TOOL_GROFF TOOL_HEXDUMP TOOL_INDXBIB TOOL_INSTALLBOOT
TOOL_INSTALL_INFO TOOL_M4 TOOL_MAKEFS TOOL_MAKEINFO TOOL_MAKEWHATIS
TOOL_MDSETIMAGE TOOL_MENUC TOOL_MKCSMAPPER TOOL_MKESDB
TOOL_MKLOCALE TOOL_MKMAGIC TOOL_MKTEMP TOOL_MSGC TOOL_MTREE
TOOL_PAX TOOL_PIC TOOL_PREPMKBOOTIMAGE TOOL_PWD_MKDB TOOL_REFER
TOOL_ROFF_ASCII TOOL_ROFF_DVI TOOL_ROFF_HTML TOOL_ROFF_PS
TOOL_ROFF_RAW TOOL_RPCGEN TOOL_SOELIM TOOL_SUNLABEL TOOL_TBL
TOOL_UUDECODE TOOL_VGRIND TOOL_ZIC

For each, provide default in <bsd.sys.mk> of the form:
TOOL_FOO?= foo
and for the ${USETOOLS}=="yes" case in <bsd.own.mk>, provide override:
TOOL_FOO= ${TOOLDIR}/bin/${_TOOL_PREFIX}foo

Document all of these in bsd.README.

This cleans up a chunk of potential (and actual) namespace collision
within our build infrastructure, as well as improves consistency in
the share/mk documentation and provision of appropriate defaults for
each of these variables.
 1.40 12-Nov-2002  itohy MKDYNAMICROOT for a.out
 1.39 19-Aug-2002  lukem Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path
 1.38 24-Apr-2002  lukem - in <bsd.files.mk>, don't clear FILES after using it, as that prevents
make -V FILES
from being useful (and given that every other variable can be
extracted using make -V, the behaviour was unusually inconsistent
given that the original reason for clearing it doesn't seem to be
relevant anymore)
- use <bsd.prog.mk> instead of directly including <bsd.files.mk>
(and possibly <bsd.man.mk> or <bsd.own.mk>)
- remove obsolete NOPROG
 1.37 29-Mar-2002  matt Add support for a VAX ld.so when VAX is ELF
 1.36 05-Mar-2002  thorpej Use ${PRINTOBJDIR}.
 1.35 06-Feb-2002  thorpej MACHINE_ARCH for ELF ARM platforms is "arm", not "arm32".
 1.34 31-Jan-2002  tv Make it possible for uudecode to be a host tool.
 1.33 22-Jan-2002  skrll Add a uuencoded binary of a.out arm32 ld.so and update Makefile to extract
on ELF platforms.

This file was created using the following revisions:

ld.h,v 1.2 1998/12/17 23:36:38 pk
malloc.c,v 1.7 2000/11/28 06:01:34 mycroft
rtld.c,v 1.82 2001/09/20 20:55:29 wiz
shlib.c,v 1.18 2000/05/27 06:53:30 matt
shlib.h,v 1.1 1998/12/15 23:16:14 pk

arm32 specific files:

md-static-funcs.c,v 1.1 1997/10/17 21:25:42 mark
md.c,v 1.11 1999/02/27 03:34:05 tv
md.h,v 1.4 2000/05/28 01:53:05 matt
mdprologue.S,v 1.1 1997/10/17 21:25:59 mark
 1.32 06-May-2001  wiz Rename rtld.1 to ld.aout_so.1, since it only describes ld.so for a.out.
 1.31 18-Apr-2001  tsutsui Add a uuencoded binary of a.out m68k ld.so.
Created using following revisions in 1.5.1_BETA source tree:
ld.h,v 1.2 1998/12/17 23:36:38 pk
malloc.c,v 1.6.8.1 2001/04/06 09:39:23 he
rtld.c,v 1.76.4.2 2001/04/06 09:39:43 he
shlib.c,v 1.18 2000/05/27 06:53:30 matt
shlib.h,v 1.1 1998/12/15 23:16:14 pk
m68k specific files:
md-static-funcs.c,v 1.4 1998/01/05 22:00:38 cgd
md.c,v 1.16 1999/04/12 00:52:44 gwr
md.h,v 1.9 2000/05/28 01:53:09 matt
mdprologue.S,v 1.8 1998/01/05 22:00:40 cgd
 1.30 12-Sep-2000  tron - Add "dependall" target so that "make build" will really uudecode the
"ld.so" binaries for i386 and sparc.
- Remove bogus "${DESTDIR}/" from "FILESDIR".
 1.29 11-Sep-2000  fvdl Add uuencoded binaries for a.out dynamic loaders on i386 and sparc,
who are ELF now. Needed because cross-building them is still a
problem. These loaders will try /emul/aout first, but do not
have the baggage that COMPAT_AOUT has.
 1.28 19-Mar-1999  thorpej branches: 1.28.10;
Move the link.h files for the different shlib formats via repository copy,
and rename them to match the executable format. Introduce a new link.h
file which automatically picks the correct header based on the target of
the toolchain.
 1.27 09-Feb-1999  christos Build depending on OBJECT_FMT not a list of MACHINE_ARCH's
 1.26 17-Dec-1998  pk * Add header file containing definitions shared among all a.out
linker related utilities.
* Adjust makefile to new location in `src/libexec'
* Have rtld.c use the new shlib.h and ld.h headers.
 1.25 13-Aug-1998  mycroft Small changes to make debugging a little easier.
 1.24 25-Jul-1998  mycroft Remove bogus change to use -O0.
 1.23 21-May-1998  tv In case NOPICINSTALL is set, get -lc_pic from src/lib/libc/(objdirname).
 1.22 25-Oct-1997  lukem use CPPFLAGS instead of CFLAGS
 1.21 14-Jul-1997  christos branches: 1.21.2;
Add the necessary -I flag to pick up the libc/include/extern.h
 1.20 23-Jun-1997  mrg install all man pages.
 1.19 31-May-1997  cjs Back out BUILDDIR and NOINSTALL changes.
 1.18 30-May-1997  cjs branches: 1.18.2;
Remove an ifdef. Add comment about -nostdlib vs. ELF ld.
 1.17 30-May-1997  veego Use the extra LDFLAGS if OBJDIR is defined.
 1.16 16-Apr-1997  christos Ld directory reorganization:
- separate out the common files used by rtld ldd ld
- move machine dependent files into arch
- move ld in its own directory
- factor out .PATH and CFLAGS common to all Makefiles
 1.15 24-Mar-1997  christos Makefile cleanups
 1.14 23-Dec-1996  pk <link.h> has moved in with the run-time linker source.
 1.13 08-Jun-1996  pk Use DESTDIR to point at libraries like bsd.prog.mk does (PR#2524).
 1.12 02-Jan-1996  thorpej Add -fno-function-cse to PICFLAGS. Without it, Very Bad Things happen
when ld.so is compiled with gcc 2.7.2 on the m68k. From
Niklas Hallqvist <niklas@appli.se> in PR #1557. (Thanks, Nik, for reminding
me about this PR...)
 1.11 09-Oct-1995  pk New style RCS IDs.
 1.10 25-Aug-1995  pk Install the manual page.
 1.9 19-Sep-1994  mycroft Shrink ld.so by 12k.
 1.8 28-Jan-1994  pk Use somewhat customized version of malloc, in stead of relying on a
crummy sbrk() backend; proper aligment must be guaranteed on all archs.
Drafting dlopen, dlsym, et.al.
 1.7 10-Dec-1993  mycroft Minor cleanup.
 1.6 08-Dec-1993  mycroft Use MACHINE_ARCH.
 1.5 08-Dec-1993  pk Parcelled out the heap allocator into separate file.
Changes prototype for findshlib() (corrected library search order for ld).
 1.4 05-Dec-1993  cgd MACHINE_ARCH support
 1.3 08-Nov-1993  pk Use strsep() in stead of strtok() and restore colons in eg. env. vars.
 1.2 27-Oct-1993  pk -Bshareable added to CFLAGS.
 1.1 16-Oct-1993  pk A linker supporting shared libraries (run-time part).
 1.18.2.1 02-Aug-1997  cjs update to 1.21
 1.21.2.1 08-Nov-1997  lukem sync with trunk (approved by thorpej)
 1.28.10.2 12-Sep-2000  tron Pull up from current (approved by thorpej):

- Add "dependall" target so that "make build" will really uudecode the
"ld.so" binaries for i386 and sparc.
- Remove bogus "${DESTDIR}/" from "FILESDIR".

basesrc/libexec/ld.aout_so/Makefile 1.29 -> 1.30
 1.28.10.1 12-Sep-2000  fvdl Bring in uuencoded, 1.4.3-built a.out ld.so binaries for i386 and
sparc from the trunk. Pull up revision 1.29 of the Makefile
to build and install them.

Approved by thorpej
 1.45.38.1 06-Nov-2008  snj branches: 1.45.38.1.4;
Pull up following revision(s) (requested by mrg in ticket #20):
compat/libexec/ld.elf_so/Makefile: revision 1.2
distrib/sets/lists/base/md.shark: revision 1.7
distrib/sets/lists/base/md.vax: revision 1.26
distrib/sets/lists/base/md.i386: revision 1.130
distrib/sets/lists/base/ad.arm: revision 1.10
distrib/sets/lists/comp/md.shark: revision 1.13
distrib/sets/lists/comp/md.sparc: revision 1.68
distrib/sets/lists/comp/ad.arm: revision 1.31
distrib/sets/lists/comp/md.vax: revision 1.35
distrib/sets/lists/comp/md.i386: revision 1.108
distrib/sets/lists/base/md.sparc: revision 1.75
distrib/sets/lists/comp/md.pmax: revision 1.59
libexec/ld.aout_so/Makefile: revision 1.46
sbin/ldconfig/Makefile: revision 1.22
make MKPIC=no builds work on i368, shark, vax, pmax, sgimips, sparc,
maybe all mips and all arm as well.
 1.45.38.1.4.1 24-Mar-2014  matt Make these work with a machine_arch of armv7
 1.47.12.2 20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.47.12.1 25-Feb-2013  tls resync with head
 1.47.6.1 22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.49.2.1 23-Jul-2013  riastradh sync with HEAD
 1.10 01-Jan-2011  plunky the Name for this manpage is "ld.aout_so". Use it.
 1.9 08-Apr-2009  joerg Don't use .\" as callable macro.
 1.8 30-Apr-2008  martin branches: 1.8.8;
Convert TNF licenses to new 2 clause variant
 1.7 26-Jun-2003  wiz branches: 1.7.30;
Add Ns where needed.
 1.6 26-Jun-2003  wiz Remove superfluous Ns and quoting.
 1.5 31-Mar-2003  perry spell fixes (most from me, one from Igor Sobrado in PR misc/19700)
 1.4 29-Sep-2002  wiz Begin new sentences on new lines.
Patch from Robert Elz (kre at munnari oz au).
 1.3 07-Feb-2002  ross Edit -mdoc usage.

* There is no -indent option to .Bd or .Bl, although you would
never know that from its frequent use in this tree. There is a
"-offset indent" combination that makes sense, and you can certainly
say "-width indent".

* Also, you can't markup the -width option argument, tho you CAN
use a callable macro. So "-width Ar filename" doesn't make sense,
but either "-width Ar" or "-width filename" does, as might something
like "-width xxfilename" for a little extra space.

* There are a lot of needlessly complex hanging tag macros in man4 used
to create simple item lists. Those should be simplified one of these
days before someone copies and edits yet another man4 page.
 1.2 15-Jan-2002  wiz Drop some unnecessary .Pps.
 1.1 06-May-2001  wiz Rename rtld.1 to ld.aout_so.1, since it only describes ld.so for a.out.
 1.7.30.1 18-May-2008  yamt sync with head.
 1.8.8.1 13-May-2009  jym Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html
 1.4 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 17-Dec-1998  pk branches: 1.2.42;
Duh! Hang on to SUN_COMPAT.. something is bust.
 1.1 17-Dec-1998  pk * Add header file containing definitions shared among all a.out
linker related utilities.
* Adjust makefile to new location in `src/libexec'
* Have rtld.c use the new shlib.h and ld.h headers.
 1.2.42.1 18-May-2008  yamt sync with head.
 1.1 06-Feb-2002  thorpej Rename to reflect the MACHINE_ARCH that will be used on ARM ELF
platforms.
 1.2 06-Feb-2002  thorpej Rename to reflect the MACHINE_ARCH that will be used on ARM ELF
platforms.
 1.1 22-Jan-2002  skrll Add a uuencoded binary of a.out arm32 ld.so and update Makefile to extract
on ELF platforms.

This file was created using the following revisions:

ld.h,v 1.2 1998/12/17 23:36:38 pk
malloc.c,v 1.7 2000/11/28 06:01:34 mycroft
rtld.c,v 1.82 2001/09/20 20:55:29 wiz
shlib.c,v 1.18 2000/05/27 06:53:30 matt
shlib.h,v 1.1 1998/12/15 23:16:14 pk

arm32 specific files:

md-static-funcs.c,v 1.1 1997/10/17 21:25:42 mark
md.c,v 1.11 1999/02/27 03:34:05 tv
md.h,v 1.4 2000/05/28 01:53:05 matt
mdprologue.S,v 1.1 1997/10/17 21:25:59 mark
 1.2 06-May-2001  he Newly built binaries from netbsd-1-4 sources, including fix for
PR#10940.
 1.1 11-Sep-2000  fvdl branches: 1.1.2;
Add uuencoded binaries for a.out dynamic loaders on i386 and sparc,
who are ELF now. Needed because cross-building them is still a
problem. These loaders will try /emul/aout first, but do not
have the baggage that COMPAT_AOUT has.
 1.1.2.3 06-May-2001  he Pull up revision 1.2 (requested by he):
Regenerated binaries including fix for PR#10940.
 1.1.2.2 12-Sep-2000  fvdl Bring in uuencoded, 1.4.3-built a.out ld.so binaries for i386 and
sparc from the trunk. Pull up revision 1.29 of the Makefile
to build and install them.

Approved by thorpej
 1.1.2.1 11-Sep-2000  fvdl file ld.so.i386.uue was added on branch netbsd-1-5 on 2000-09-12 00:56:57 +0000
 1.1 18-Apr-2001  tsutsui Add a uuencoded binary of a.out m68k ld.so.
Created using following revisions in 1.5.1_BETA source tree:
ld.h,v 1.2 1998/12/17 23:36:38 pk
malloc.c,v 1.6.8.1 2001/04/06 09:39:23 he
rtld.c,v 1.76.4.2 2001/04/06 09:39:43 he
shlib.c,v 1.18 2000/05/27 06:53:30 matt
shlib.h,v 1.1 1998/12/15 23:16:14 pk
m68k specific files:
md-static-funcs.c,v 1.4 1998/01/05 22:00:38 cgd
md.c,v 1.16 1999/04/12 00:52:44 gwr
md.h,v 1.9 2000/05/28 01:53:09 matt
mdprologue.S,v 1.8 1998/01/05 22:00:40 cgd
 1.3 20-Jul-2004  pk Newly built binary from netbsd-1-4 sources + arch/sparc/mdprologue.S, rev 1.8.
Workaround for non-executably mapped PLT in the data segment.
 1.2 06-May-2001  he branches: 1.2.4;
Newly built binaries from netbsd-1-4 sources, including fix for
PR#10940.
 1.1 11-Sep-2000  fvdl branches: 1.1.2;
Add uuencoded binaries for a.out dynamic loaders on i386 and sparc,
who are ELF now. Needed because cross-building them is still a
problem. These loaders will try /emul/aout first, but do not
have the baggage that COMPAT_AOUT has.
 1.1.2.3 06-May-2001  he Pull up revision 1.2 (requested by he):
Regenerated binaries including fix for PR#10940.
 1.1.2.2 12-Sep-2000  fvdl Bring in uuencoded, 1.4.3-built a.out ld.so binaries for i386 and
sparc from the trunk. Pull up revision 1.29 of the Makefile
to build and install them.

Approved by thorpej
 1.1.2.1 11-Sep-2000  fvdl file ld.so.sparc.uue was added on branch netbsd-1-5 on 2000-09-12 00:56:58 +0000
 1.2.4.1 23-Jul-2004  tron Pull up revision 1.3 (requested by pk in ticket #683):
Newly built binary from netbsd-1-4 sources + arch/sparc/mdprologue.S, rev 1.8.
Workaround for non-executably mapped PLT in the data segment.
 1.2 26-Jul-2003  salo netbsd.org->NetBSD.org
 1.1 29-Mar-2002  matt Add support for a VAX ld.so when VAX is ELF
 1.17 19-Mar-1999  thorpej Move the link.h files for the different shlib formats via repository copy,
and rename them to match the executable format. Introduce a new link.h
file which automatically picks the correct header based on the target of
the toolchain.
 1.16 15-Dec-1998  pk Pull in <a.out.h>.
 1.15 19-Oct-1998  matt Add AUX_LABEL (need for VAX JSB/JMP "jmp" slots).
 1.14 05-Sep-1998  pk Assign my copyrights to TNF.
 1.13 14-May-1998  thorpej Need <dlfcn.h> for Dl_info.
 1.12 12-May-1998  pk Add `dladdr()' rtld entry point.
 1.11 03-Jan-1997  scottr Catch up with const changes to dlopen() and dlsym() prototypes in
<dlfcn.h>. Tested on i386 and hp300 for crt0.o and ld.so, verified
other references by inspection.
 1.10 09-Jan-1996  pk Define LD_HINTS_VERSION_2:
- no longer hash on minor version number in hints file.
- add list of ldconfig(8) search directories.
 1.9 23-Sep-1995  pk branches: 1.9.2;
Define `dlexit()' in crt<=>rtld interface (active in v4).
 1.8 05-Jun-1995  pk Put dlopen() et.al. declarations in separate header file for compatibility.
 1.7 04-Jun-1995  pk Revive library search paths.
 1.6 23-Dec-1994  pk Put a reserved field into use (weak symbol support).
 1.5 26-Oct-1994  cgd new RCS ID format.
 1.4 24-May-1994  pk Enable dl*() prototypes.
 1.3 28-Jan-1994  pk Redone from scratch, but maintain SunOS compatibility.
 1.2 22-Oct-1993  pk Some definitions for the `ld.so.hints' file.
 1.1 17-Oct-1993  pk Moved <link.h> here from usr.bin/ld as it is needed by other modules
and utilities (eg. crt0, libc, nm).
 1.9.2.1 16-Feb-1996  pk Update from trunk; needed for rtld patch.
 1.9 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.8 07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22284, verified by myself.
 1.7 28-Nov-2000  mycroft Make this compile with -DDEBUG.
 1.6 17-Jun-1999  thorpej branches: 1.6.8;
MAP_COPY -> MAP_PRIVATE
 1.5 15-Dec-1998  pk branches: 1.5.2;
Prototypes.
 1.4 03-Jul-1996  thorpej RCS id police.
 1.3 19-Sep-1994  deraadt NBPG --> getpagesize()
 1.2 10-Jun-1994  pk Conversion to err()/warn() for error reports.
 1.1 28-Jan-1994  pk Use somewhat customized version of malloc, in stead of relying on a
crummy sbrk() backend; proper aligment must be guaranteed on all archs.
Drafting dlopen, dlsym, et.al.
 1.5.2.1 01-Apr-2001  he Pull up revisions 1.6-1.7 (requested by itohy)
Several changes to consolidate with main trunk:
o Use MAP_PRIVATE instead of MAP_COPY.
o A few minor fixes.
 1.6.8.1 06-Apr-2001  he Pull up revision 1.7 (requested by itohy):
Several changes to consolidate with main trunk:
o A few minor fixes.
 1.4 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 05-Apr-2004  veego Remove duplicated include of <sys/types.h>
Fixes bin/25062.
 1.2 03-Jul-1996  thorpej RCS id police.
 1.1 16-Oct-1993  pk A linker supporting shared libraries (run-time part).
 1.13 06-May-2001  wiz Rename rtld.1 to ld.aout_so.1, since it only describes ld.so for a.out.
 1.12 06-May-2001  wiz This man page only documents behaviour on a.out. ld.aout_so uses
a colon separated LD_PRELOAD (in contrast to ld.elf_so), so undo last
commit.
 1.11 06-May-2001  wiz LD_PRELOAD wants a space (not colon) separated list of libraries.
misc/11961 by Masao Uebayashi.
 1.10 24-Mar-2000  kleink Document LD_PRELOAD, fixing PR lib/9663, and note that (and why) neither
this nor LD_LIBRARY_PATH are honored when executing set[ug]id.
 1.9 18-Nov-1999  kristerw Spelling
 1.8 22-Mar-1999  garbled branches: 1.8.2; 1.8.6;
More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Many more to
come.
 1.7 05-Sep-1998  pk Assign my copyrights to TNF.
 1.6 13-Nov-1997  pk Expand on shared object's `.init' functions a bit, and mention
`/usr/lib/c++rt.o'.
 1.5 20-Jun-1997  pk branches: 1.5.2;
Fix typos (PR#3761).
 1.4 03-Jun-1997  mikel fix typo; from Saitoh Masanobu in PR misc/3696.
also comma-separate and reorder xrefs.
 1.3 26-May-1997  cjs PR 3670 from SAITOH Masanobu <msaitoh@spa.is.uec.ac.jp>
Fix typos.
 1.2 08-Oct-1995  pk Allow customized trace output, so ldd(1) can be more conveniently used
as a filter.

Rearrange cascading stuff: remove two-level limit.
 1.1 30-Jun-1995  pk man page for the run-time linker
 1.5.2.1 14-Nov-1997  mellon Pull rev 1.6 up from trunk (pk)
 1.8.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.8.2.1 29-Mar-2000  he Pull up revisions 1.9-1.10 (requested by kleink and he):
Document LD_PRELOAD and note the security restrictions.
Fixes PR#9663. Also some spelling fixes.
 1.89 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.88 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.87 16-Jan-2003  itohy branches: 1.87.30;
Fix problem where dlclose() falls into infinite loop.
 1.86 10-Dec-2002  thorpej Rename __LDPGSZ to AOUT_LDPGSZ, to accurately reflect what it is.
 1.85 08-Aug-2002  soren Remove extraneous \n's in {err,warn}{,x} that used to be printfs.
 1.84 20-Jul-2002  grant sweep of errx/warnx, remove unnecessary trailing \n
 1.83 26-May-2002  wiz __STDC__ is always defined on NetBSD.
 1.82 20-Sep-2001  wiz Use vsnprintf instead of vsprintf.
[XXX: not compiled, since I'm on ELF -- .uue should probably be rebuilt]
 1.81 21-Jun-2001  christos make sure we remove all the global references refering to a shared object
when we remove it. Similar to the fix I applied a while ago to ld.elf_so
 1.80 19-Mar-2001  itohy Common symbol is not a member of particular shlib have particular shlib,
so avoid adding the base address of a shlib to the common symbol.
Fix PR #10940, hopefully.
 1.79 17-Dec-2000  pk Deal with an empty hints file.
 1.78 28-Nov-2000  mycroft Add another debugging message.
 1.77 29-Oct-2000  mycroft In dlopen(), use the main program's library search path, to match semantics of
other systems (and our ELF).
 1.76 11-Feb-2000  thorpej branches: 1.76.4;
Const poison dladdr().
 1.75 17-Jun-1999  thorpej MAP_COPY -> MAP_PRIVATE
 1.74 23-Apr-1999  tv Allow rpaths in setuid binaries, noticed by tron. This is already done
for ELF systems; make it uniform for a.out.
 1.73 27-Feb-1999  tv branches: 1.73.2;
Add ld.so hacks for arm32, and reenable ld.aout_so on arm32. As is well
known, XXX this needs a real fix.
 1.72 28-Jan-1999  fvdl Move the ldentry initialization up so that dl*() from init sections
works.
 1.71 17-Dec-1998  pk * Add header file containing definitions shared among all a.out
linker related utilities.
* Adjust makefile to new location in `src/libexec'
* Have rtld.c use the new shlib.h and ld.h headers.
 1.70 15-Dec-1998  pk Deal with compiler warnings: format strings, prototypes, variable initialization.
 1.69 23-Oct-1998  matt Make the BINDER debug messages a bit more useful (print index and jmpslot
address too).
 1.68 19-Oct-1998  matt Back out change to md_make_gotreloc which added 4 arguement of got_t *.
Add argument to md_fix_jmpslot indicating whether this the first (i.e
tranfer) jmpslot or not. Add better support for VAX (the VAX can support
pure text code; let ld that advantage of it). Checking in verified and
working versions of rtld VAX support routines.
 1.67 12-Sep-1998  pk Exit early from alloc_link_map() if we have no object; only relevant
when tracing. (PR#6140)
 1.66 05-Sep-1998  pk Assign my copyrights to TNF.
 1.65 13-Aug-1998  mycroft Small changes to make debugging a little easier.
 1.64 06-Aug-1998  mycroft When DEBUG, log init and fini calls.
 1.63 14-Jul-1998  tv Change ld.so default behavior to RTLD_LOCAL, and make RTLD_LOCAL into a
new flag bit. Keep RTLD_GLOBAL as an actual flag bit so it won't be
re-used, or may be used for something later. Mask the dlopen() mode bits
in ld.elf_so so a comparison against RTLD_NOW works. (RTLD_{LOCAL,GLOBAL}
needs to be implemented for ld.elf_so.)
 1.62 30-May-1998  kleink branches: 1.62.2;
Clear the error indicator after retrieval (xref. dlerror(3)).
 1.61 19-May-1998  pk Optimize symbol/string table access slightly by precomputing their
locations at load time. These values don't change once the object is loaded.
 1.60 12-May-1998  pk Implement `dladdr()': find nearest symbol given an address.
 1.59 26-Mar-1998  mycroft Allow a non-RTLD_GLOBAL object to refer to symbols in itself.
 1.58 18-Mar-1998  pk Use file size from fstat(2) to map the hints file, instead of fiddling
with incremental mmap()'s. Squashes a bug which caused only the first
page of the hints file to unmapped.
 1.57 15-Mar-1998  pk Implement RTLD_GLOBAL dlopen(3) flag.
Rename internal flags to avoid <dlfcn.h> name space collisions.
 1.56 15-Mar-1998  pk Check for short hints file (noticed by Chuck Silvers).
 1.55 03-Mar-1998  mycroft Remove spurious extra newline.
 1.54 20-Feb-1998  mycroft Fill in missing (default) mmap(2) flags.
 1.53 17-Feb-1998  pk Print a warning message if we detect that a "copy symbol" has changed
size in a shared library. Also, always use our expected size to copy
the item in, on the assumption that doing so generally minimizes the
damage (maybe it's better to just bail out?).
 1.52 05-Jan-1998  cgd RCS Id police
 1.51 30-Jun-1997  pk Do not free dlopen'ed map structures twice.
Plug memory leak when opening the same object mor than once.
 1.50 30-Jun-1997  pk Fix typo in free_link_map(); noticed by Mike Grupenhoff.
 1.49 26-Jun-1997  pk Patch from Chris Demetriou to unmap an object on last dlclose(), which
had not be implemented. It would cause an "adress space leak" and, if
the same object would opened multiple time, unwanted relocations.
Re: Comment from Chris:

"The a.out ld.so has some problems with dlclose. It doesn't properly
unmap objects which are dlclosed. That's a known problem (though a
serious one for programs which dlopen then dlclose lots of objects,
because it causes address space exhaustion), but it has a
previously-unknown side-effect.

If a single object is dlopened, then dlclosed, then dlopened _again_,
the relocations will be processed again. That causes obvious
problems."
 1.48 03-May-1997  pk Keep track of `dlsym()' symbol lookup scope differently. There's (currently)
only one special case: a NULL argument to dlopen(); return a special
token for that case.
 1.47 03-Jan-1997  scottr Catch up with const changes to dlopen() and dlsym() prototypes in
<dlfcn.h>. Tested on i386 and hp300 for crt0.o and ld.so, verified
other references by inspection.
 1.46 21-Dec-1996  pk Deal with weak symbols when looking up in shared libraries.
 1.45 06-Oct-1996  pk Actually set the RTLD_DL flag in dlopen'ed shared objects, per PR#2791.
 1.44 10-Sep-1996  thorpej Iff __m68k__, use a `slight hack' to determine the magic of the executable
we're doing a dynamic link for, and change the page size used for offset
and size calculations if necessary. Allows the same ld.so to be used with
mixed m68k4k and m68k8k executables and libraries.

Thanks a million to Gordon Ross for the help in making this work!
 1.43 14-Jan-1996  pk Relax checking of minor version number in `findhint()'. Also use the
directories from the hints (v.2) file for directory traversing.
This should take care of PR#1146.
 1.42 09-Jan-1996  pk Deal with v.2 hint files (hint srch dirs not yet used).
 1.41 28-Dec-1995  pk Make dlopen() search for libraries if given a name of the form
`lib<name>.so[.xx[.yy]]' (per Erik M. Theisen; PR#1763; patch from PR
used in simplified form).
 1.40 09-Oct-1995  pk branches: 1.40.2;
Fix typo.
 1.39 09-Oct-1995  pk New style RCS IDs.
 1.38 08-Oct-1995  pk Allow customized trace output, so ldd(1) can be more conveniently used
as a filter.

Rearrange cascading stuff: remove two-level limit.
 1.37 23-Sep-1995  pk Interface version 4:
implement dlexit() (per Doug Rabson)
get actual rtld path from crt0
pass ld_entry back to crt0 in a better place
 1.36 31-Aug-1995  pk Check for zero sized BSS to avoid a big no-op syscall (per Mike Hibler).
 1.35 20-Jun-1995  pk Initialise after malloc (fixes PR#1149).
Also, correct comparison when looking in `prefered' paths.
 1.34 05-Jun-1995  pk #include <dlfcn.h>
 1.33 04-Jun-1995  pk Cache two more environment variable values.
 1.32 04-Jun-1995  pk Implement compiled-in library search paths: any `-L' argument encountered
while `dynamic link-mode' is on, is recorded in the executable. The
run-time linker will search these paths after $LD_LIBRARY_PATH but
before the default set and those currently in the hints file.
The feature is disabled whenever for set[ug]id programs.
 1.31 01-Apr-1995  pk Fix bogosities in cascade stuff.
 1.30 06-Mar-1995  pk Burn LD_RUN_PATH; I didn't read the SVR5 man-pages carefully enough.
 1.29 06-Mar-1995  pk Code from Matthew Green to do DL cascading "in the first degree".
Two `fprintf(stderr, ..)' => `warnx(..)'.
 1.28 19-Dec-1994  pk Bummer! Undo mmap() changes in rev. 1.26; they royally screw up the
kernel's pmap address preference mechanism.
 1.27 18-Dec-1994  pk Handle "/dev/zero" stuff more globally.
 1.26 18-Dec-1994  pk Re-arrange mmap() calls, per Charles' suggestion.
 1.25 07-Dec-1994  pk Ensure contiguous chunks for all of an object's address space (text+data+bss).
 1.24 26-Oct-1994  mycroft Don't close the hints file while it's mapped, but unmap and close it after
loading.
 1.23 12-Aug-1994  pk Re-add `LD_WARN_NON_PURE_CODE' that went missing.
 1.22 07-Aug-1994  pk Relax minor version number checking somewhat; issue warning if minor
version is less than expected.
 1.21 24-Jun-1994  pk branches: 1.21.2;
strdup() doesn't grok NULL pointers
 1.20 10-Jun-1994  pk Conversion to err()/warn() for error reports.
 1.19 25-May-1994  pk Another move to .data to please gdb.
 1.18 24-May-1994  pk Force some string constants into the data segment (for core-dump reading).
Rename internal dl_*() functions.
Do run-time symbol alias processing.
 1.17 07-Apr-1994  pk dlopen() should make a copy of argument (Thomas Eberhardt).
 1.16 28-Mar-1994  cgd no more MAP_FILE
 1.15 15-Feb-1994  pk Libraries which are in the hints file but not in one's LD_LIBRARY_PATH (if
set) were not found.
 1.14 29-Jan-1994  jtc Fix spelling error in Copyright notice
 1.13 28-Jan-1994  pk Use somewhat customized version of malloc, in stead of relying on a
crummy sbrk() backend; proper aligment must be guaranteed on all archs.
Drafting dlopen, dlsym, et.al.
 1.12 12-Jan-1994  pk Fill in gdb hook.
 1.11 20-Dec-1993  pk Hooks for for shared C++ objects with static contructors/destructors.
 1.10 08-Dec-1993  pk Parcelled out the heap allocator into separate file.
Changes prototype for findshlib() (corrected library search order for ld).
 1.9 10-Nov-1993  pk Do the debugger hooks.
Revised algorithm for finding symbols using `nz_other' (auxialiary type info).
 1.8 08-Nov-1993  pk Use strsep() in stead of strtok() and restore colons in eg. env. vars.
 1.7 03-Nov-1993  pk Print symbol name in "undefined" error msg.
 1.6 03-Nov-1993  mycroft This warning is fucking annoying, and ld already told us about it when we
linked the executable. Make it #ifdef DEBUG.
 1.5 26-Oct-1993  pk Search for top-of-stack blew up if program had no environment strings.
 1.4 22-Oct-1993  pk Support for `ld.so.hints'.
Handle set[ug]id programs.
No longer use the `lm_lob' field to access parent objects, add private
link map `parent' field in stead (SUN_COMPAT weirdness).
 1.3 21-Oct-1993  pk Renamed confusingly named macro.
Fixed bug that was the result of said confusion.
 1.2 17-Oct-1993  pk Define our copy of `errno', as it is no longer defined in libc.
 1.1 16-Oct-1993  pk A linker supporting shared libraries (run-time part).
 1.21.2.2 12-Aug-1994  mycroft update from trunk
 1.21.2.1 08-Aug-1994  mycroft update from trunk
 1.40.2.1 16-Feb-1996  pk Pick up fixes from -current for patch2.
 1.62.2.2 14-Jul-1998  tv Merge changes from trunk.
 1.62.2.1 10-Jun-1998  tv Get the arm32 changes under source control, only on a branch until they are
fixed to work properly.
 1.73.2.3 01-Apr-2001  he Pull up revisions 1.75,1.78-1.80 (requested by itohy)
Several changes to consolidate with main trunk:
o Use MAP_PRIVATE instead of MAP_COPY.
o Deal correctly with an empty hints file.
o Deal correctly with common symbols in shared libraries.
Fixes PR#10940.
 1.73.2.2 31-Oct-2000  he Pull up revision 1.77 (requested by tv and mycroft):
In dlopen(), use the main program's library search path, to match
semantics of other systems (and our ELF).
 1.73.2.1 23-Apr-1999  perry pullup 1.73->1.74 (tv)
 1.76.4.2 06-Apr-2001  he Pull up revisions 1.78-1.80 (requested by itohy):
Several changes to consolidate with main trunk:
o Deal correctly with common symbols in shared libraries.
Fixes PR#10940.
o Deal correctly with an empty hints file.
o A few minor fixes.
 1.76.4.1 30-Oct-2000  tv Pullup 1.77 [mycroft]:
In dlopen(), use the main program's library search path, to match semantics of
other systems (and our ELF).
 1.87.30.1 18-May-2008  yamt sync with head.
 1.24 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.23 16-Aug-2009  martin Add <sys/exec_aout.h> includes
 1.22 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.21 09-Nov-2006  christos branches: 1.21.16;
eliminate alloca for ssp.
 1.20 26-Jun-2005  christos sprinkle little const.
 1.19 28-Oct-2004  dsl Another (unsigned char) cast - for ldconfig
 1.18 27-May-2000  matt Changes to put the COMPAT_AOUT code into ld.aout_so. Search <dir> for <lib>
then search /emul/aout/<dir> for <lib>. To make sure we don't get false
postives on ELF libraries we make the .so is a ZMAGIC dynamic library.
 1.17 29-Nov-1999  itohy Use <link_aout.h> instead of <link.h>
for the benefit of building a.out (cross) ld on ELF platforms.
Suggested by Minoura Makoto.
 1.16 15-Dec-1998  pk branches: 1.16.2; 1.16.6;
Export the common shared library search functions in its own header file.
 1.15 15-Sep-1998  pk Prevent spurious matches matches against unwanted major versions.
Patch based on PR#6139.
 1.14 05-Sep-1998  pk Assign my copyrights to TNF.
 1.13 04-Apr-1998  fvdl If a good matching shared library is found, don't look in the next
directories. This is compatible with the SunOS behaviour. Also,
it fixes a problem where it was not possible for some 3rd party
package to have a library with the same name as a library already
in the system, and a lower version number. The highest version
would always be picked. This particular problem shows up with Mozilla,
which has a libutil.so.1.0
 1.12 05-Jan-1998  cgd RCS Id police
 1.11 04-Jun-1995  pk Implement compiled-in library search paths: any `-L' argument encountered
while `dynamic link-mode' is on, is recorded in the executable. The
run-time linker will search these paths after $LD_LIBRARY_PATH but
before the default set and those currently in the hints file.
The feature is disabled whenever for set[ug]id programs.
 1.10 10-Jun-1994  pk Conversion to err()/warn() for error reports.
Minor bug fixes:
a case of free()ing in the wrong order. (from Rick Murphey).
processing alias symbol twice (sometimes).
Some miscellaneous cleanup.
 1.9 29-Jan-1994  jtc Fix spelling error in Copyright notice
 1.8 28-Jan-1994  pk Use `.type' directives generated by gcc.
Numerous internal changes & bug fixes.
NOTE: must re-compile & re-link shared libraries before used to link programs.
 1.7 08-Dec-1993  pk Many internal changes, most notably in the symbol counting stuff.
`ld -r -x' now supported on all object files.
Support for long archive member names (AR_EFMT1 format),
thanks to Bill Sommerfeld/Mark Eichin
Do the right(?) thing with symbol aliases (N_INDR) for POSIX lover, especially
when equiping shared libraries with these (this was *not* fun).
Handle silly archives (.sa) for people who needs them; turn on by `-Bsilly'.
 1.6 07-Dec-1993  mycroft #include ctype.h, since we use isdigit().
 1.5 21-Nov-1993  mycroft Add /usr/X386/lib to the standard list of library paths.
 1.4 08-Nov-1993  pk Use strsep() in stead of strtok() and restore colons in eg. env. vars.
 1.3 23-Oct-1993  pk Changed prototype and internals of std_search_dir().
 1.2 21-Oct-1993  pk No rounding of bss size to page boundary in ZMAGIC a.out's, the kernel
chokes on it.
Some other minor changes.
 1.1 16-Oct-1993  pk A linker supporting shared libraries.
 1.16.6.1 27-Dec-1999  wrstuden Pull up to last week's -current.
 1.16.2.2 01-Apr-2001  he Pull up revsion 1.17 (via patch, requested by itohy):
Several changes to consolidate with main trunk:
o Use <link_aout.h> for the benefit of cross compiling.
 1.16.2.1 01-Jun-2000  he Pull up revision 1.18 (via patch, requested by matt):
Enable searching for libraries under /emul/aout, and make sure
that ELF libraries are not erroneously accepted.
 1.21.16.1 18-May-2008  yamt sync with head.
 1.4 06-Jul-2010  mrg remove almost all the ability to build netbsd with an a.out target.
we're ELF now, and there are many missing checks against OBJECT_FMT.
if we ever consider switching, the we can figure out what new ones
we need but for now it's just clutter.

this doesn't remove any of the support for exec_aout or any actually
required-for-boot a.out support, only the ability to build a netbsd
release in a.out format. ie, most of this code has been dead for
over a decade.

i've tested builds on vax, amd64, i386, mac68k, macppc, sparc, atari,
amiga, shark, cats, dreamcast, landisk, mmeye and x68k. this covers
the 5 MACHINE_ARCH's affected, and all the other arch code touched.
it also includes some actual run-time testing of sparc, i386 and
shark, and i performed binary comparison upon amiga and x68k as well.


some minor details relevant:
- move shlib.[ch] from ld.aout_so into ldconfig proper, and cut them
down to only the parts ldconfig needs
- remove various unused source files
- switch amiga bootblocks to using elf2bb.h instead of aout2bb.h
 1.3 28-Apr-2008  martin Remove clause 3 and 4 from TNF licenses
 1.2 26-Jun-2005  christos branches: 1.2.18;
sprinkle little const.
 1.1 15-Dec-1998  pk Export the common shared library search functions in its own header file.
 1.2.18.1 18-May-2008  yamt sync with head.

RSS XML Feed