Commit Graph

48 Commits

Author SHA1 Message Date
tv 7cfc131b50 Don't bomb if the ${DPADD} files are missing -- we want at least one of
them, where the other may not exist, and the linker will fail for us if
both don't exist.
2002-03-01 20:15:16 +00:00
thorpej 2685463c0e Use ${MACHINE_CPU} to assign ARCHSUBDIR. 2002-02-04 00:24:14 +00:00
thorpej 67b1884571 Add support for dynamic linking on the SuperH. From Marcus Comstedt,
with some bug fixes (namely, don't forget to consider the addend when
processing relocations) from me.
2002-02-03 23:34:42 +00:00
skrll 04206c0a21 Install the man page on a.out systems as well so that the man set is the
same for all.
2002-01-23 15:10:24 +00:00
tv f8e3b0e1e5 Revert rev. 1.30 (partly). If MKPICINSTALL=no in mk.conf, libc_pic.a will
NOT be installed by the time we build here.

However, allow the link to look in both src/lib/libc and $DESTDIR/usr/lib.
2002-01-04 19:08:04 +00:00
lukem dc75a614e2 - Allow RTLD_DEFAULT_LIBRARY_PATH to be overridden.
- If ${SHLIBDIR} != ${LIBDIR}, then set RTLD_DEFAULT_LIBRARY_PATH to
  ${SHLIBDIR}:${LIBDIR}
2001-12-28 05:44:22 +00:00
lukem a5d8d0231c if SHLINKDIR != /usr/libexec, install compat symlink 2001-12-28 05:30:24 +00:00
lukem efcc9a4c9d * Add user-controlled mk.conf variables
- SHLIBDIR	Location to install shared libraries if ${USE_SHLIBDIR}
			is "yes".  Defaults to "/usr/lib".

	- USE_SHLIBDIR	If "yes", install shared libraries in ${SHLIBDIR}
			instead of ${LIBDIR}.  Defaults to "no".
			Sets ${_LIBSODIR} to the appropriate value.
			This may be set by individual Makefiles as well.

	- SHLINKDIR	Location of shared linker.  Defaults to "/usr/libexec".
			If != "/usr/libexec", change the dynamic-linker
			encoded in shared programs

* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
	libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
	libtermcap libutil libz

* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
  to ${_LIBSODIR}/${LIB}.so* for compatibility.

* Always install /sbin/init statically (for now)


The net effect of these changes depends on how the variables are set:

  1.)	If nothing is set or changed, there is no change from the
	current behaviour:
		- Static /bin, /sbin, and bits of /usr/*
		- Dynamic rest
		- Shared linker is /usr/libexec/ld*so

  2.)	If the following make variables are set:
		LDSTATIC=
		SHLINKDIR=/lib
		SHLIBDIR=/lib
	Then the behaviour becomes:
		- Dynamic tools
		- .so libraries used by /bin and /sbin are installed to /lib,
		  with symlinks from /usr/lib/lib*so to -> /lib/lib*so
		  where appropriate
		- Shared linker is /lib/ld*so

  3.)	As per 2.), but add the following variable:
		USE_SHLIBDIR=yes
	This forces all .so's to be instaleld in /lib (with compat
	symlinks), not just those tagged by their Makefiles to be.
	Again, compat symlinks are installed
2001-12-28 01:32:37 +00:00
thorpej 7dcc71da1d Don't put compiler options into CPPFLAGS. 2001-12-14 22:21:45 +00:00
skrll 0a9eeb6303 Add a man page for ld.elf_so. 2001-10-31 18:26:23 +00:00
matt 1c2ce68f11 Enable arm if OBJECT_FMT is ELF. Initialize first few GOT entries for ARM. 2001-07-15 03:09:22 +00:00
fvdl d1d73371a6 Preliminary x86-64 support. Not fully functional yet (toolchain bugs). 2001-06-19 01:11:03 +00:00
christos 5d6793c06c back out previous commit; I found a better way of handling the missing
dependencies.
2001-01-14 09:39:26 +00:00
christos 61944ce838 Don't use ${OBJS} in the dependency line, cause it is not defined yet.
Also add a .NOTMAIN for good measure.
2001-01-14 09:16:47 +00:00
mycroft 2d376bed2b When dlopen()ing with RTLD_GLOBAL, also make dependent libraries RTLD_GLOBAL. 2000-11-10 21:31:30 +00:00
matt 9118b9fe90 Split DEBUG into two lines to make it easier to enable each separately. 2000-07-14 22:01:09 +00:00
matt 5aa9ca0144 If OBJECT_FMT is ELF and MACHINE_ARCH = vax, build ld.elf_so 2000-07-03 03:30:52 +00:00
mycroft 3d5dc334de Don't try to get libc_pic from the libc compile directory. If we're doing a
build, libc has already been installed.
2000-03-26 21:55:55 +00:00
thorpej 206408b533 Protect certain definitions from view by crt0, by wrapping them in
#ifdef _RTLD_SOURCE.

Should fix the "variable page size" build error of crt0 on the SPARC.
1999-07-05 17:55:34 +00:00
thorpej adadf5ecc7 Don't even make depend if we're not going to build ld.elf_so. this is
especially important if the assembler syntax is different.
1999-05-07 22:04:27 +00:00
kleink 4b749d888f Always use ${MACHINE_ARCH} rather than ${MACHINE}, and reorder architectures
a bit.
1999-04-29 15:31:05 +00:00
kleink 75030fa2ee Add m68k code. 1999-04-29 15:06:41 +00:00
thorpej e278587d62 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.
1999-03-19 22:06:36 +00:00
drochner 90218b7032 make the mipse[lb]->mips translation really work,
thanks Izumi Tsutsui
1999-03-05 11:57:54 +00:00
christos ec2edc19fd Make this compile without -DRTLD_LOADER and fix printf format problems on
the alpha.
1999-03-03 21:18:00 +00:00
jonathan 3eeb52dee0 Makefile ${MACHINE_ARCH} changes for mips{eb,el}, as suggested by
Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
1999-03-03 12:00:18 +00:00
christos 84cb65780e Cleanup global variable access so rtld can be self relocating. Also KNF
reloc.c and move md sparc parts to arch/sparc/mdreloc.c
Now we don't need to load at address 0 on the i386 and the mips should be
trivial to fix.
1999-02-24 18:31:00 +00:00
kleink 8e718db8de Replace home-grown header file installation with INCS/INCSDIR; from Erik
Bertelsen in PR bin/6869.
1999-02-21 18:10:24 +00:00
lukem dcab0210a0 convert from NOxxx= to MKxxx=no.
include <bsd.own.mk> if testing a MKxxx variable.
1999-02-13 02:54:17 +00:00
christos 246b3960cd Add -DRTLD_DEBUG_RELOC commented out. 1999-02-07 17:23:03 +00:00
christos d72f81978d Add i386 bits 1999-01-10 18:18:56 +00:00
tsubai 775e7035f4 Add powerpc support. 1998-11-24 11:34:30 +00:00
mrg c0ea06b21f remove MD asm as(1) comments from sysident.h, placing them in a comment
above the asm() block.  now we can share sysident.h across all ports..
change ld.elf_so to be for $MACHINE == sparc64 not sparc (yet!).
1998-09-13 03:50:31 +00:00
tv 65b8da28f5 Use -L for libc's objdir in case NOPICINSTALL is set in mk.conf. 1998-08-27 01:55:16 +00:00
christos e8902c2d7c Don't install the ELF link.h in a.out systems!@#$#@ 1998-08-13 18:16:43 +00:00
tv 55267a7623 Use NOPIC to mean "no shared libraries", not NOSHLIB. 1998-08-04 17:02:16 +00:00
mhitch 082edecc20 Add support for mips. 1998-03-25 04:12:32 +00:00
jonathan 5e0e8cec39 More table-driven changes for different toolchains:
* new bsd.own.mk variable OBJECT_FMT with values "a.out" or "ELF".
  * use OBJECT_FMT in Makefile tests that depend on toolchain.
  * Add new bsd.own.mk variable NOSHLIB that, if set indicates a given
    port doesnt yet do shared libraries. Set on powerpc.
  * Document new feature-test variables in src/share/mk/bsd.README.
Tested on i386, mips, fakedup Alpha environment.
1998-02-23 10:09:31 +00:00
cjs 3dd557ba9c Link with the stuff we compiled, rather that whatever random stuff happens
to be installed on the system we're compiling on.
1997-10-25 06:18:27 +00:00
jonathan faca0ea24c Install our ELF-aware link.h into /usr/include on mips hosts. 1997-10-23 19:27:28 +00:00
lukem dc3678728d use CPPFLAGS instead of CFLAGS 1997-10-22 05:45:08 +00:00
mrg 0553741950 move man pages into share/man. 1997-06-23 04:51:16 +00:00
cjs 7a66732d34 Back out BUILDDIR and NOINSTALL changes. 1997-05-31 21:21:13 +00:00
cjs 5fd7ce7066 These updates to the build allow building against include files
and libs in the object tree, if you use a separate object tree,
while maintaining backward compatability with other build methods.
See the notes in src/share/mk/bsd.README for full details. Note
that the `make includes' target now only installs the include files
in the build directory (if you use one--otherwise they go in DESTDIR
just like before); `make install' will install include files in
DESTDIR.
1997-05-26 03:55:19 +00:00
thorpej cb232ac37b STRIP -> STRIPFLAG (sign, I guess I forgot to check this one in last night) 1997-04-17 22:17:27 +00:00
cgd aee2cfeaa1 pull in arch-specific Makefile.inc only if it exists 1997-04-10 17:39:20 +00:00
christos d59123b39b - Makefile cleanups 1997-03-24 22:15:37 +00:00
cgd 41fe218b25 First cut at an ELF shared loader. Originally from John Polstra's FreeBSD elf
kit, then hacked on by Matt Thomas <matt@3am-software.com>, then by me (to
make it work with new versions of the toolchain, etc.).  This runs, but it's
in serious need of cleaning and/or a fair bit of reworking.  See the README
file for more information, and a list of things to do.
1996-12-16 20:37:55 +00:00