Commit Graph

61 Commits

Author SHA1 Message Date
scw d174ad2eab Add support for shared libraries/dynamically linked binaries on sh5.
With the latest SuperH toolchain, NetBSD/evbsh5 can now
run with a fully dynamic userland (modulo a few remaining
gremlins affecting a couple of binaries).
2003-03-25 13:11:53 +00:00
uwe 6a4d4259ae Do not add ${LIBC_PIC} to DPADD if MKPICINSTALL is "no". 2003-02-26 06:03:40 +00:00
junyoung 1b5e50eb7b Disable DEBUG again. 2002-10-05 15:52:15 +00:00
junyoung 89342b95bb Don't call _rtld_process_mapping() with null string. 2002-10-05 15:04:49 +00:00
thorpej 09a0767aa9 Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.

The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.

This is done by decoupling where a shlib is installed from how it
is located.  Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only.  SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.

The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-27 21:37:50 +00:00
mycroft a217e118cd *poof*
-fomit-frame-pointer works on 68k.
2002-09-26 14:30:47 +00:00
mycroft 3e9c6b1044 -vomit-frame-pointer is buggy on 68k. *sigh* 2002-09-26 13:56:01 +00:00
mycroft f4f740de3a By default, compile without DEBUG, and with -fomit-frame-pointer. 2002-09-26 12:59:29 +00:00
mycroft e3db70741f Turn DEBUG back on by default. It doesn't take much space. 2002-09-13 18:28:58 +00:00
mycroft 1b6aaa02a2 Turn off DEBUG by default, and compile with -O3. (Tested on Alpha, ARM,
x86 and PowerPC.)
2002-08-31 18:18:14 +00:00
lukem f794aa60bb Use ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path 2002-08-19 13:54:34 +00:00
thorpej 9c104401d1 Build for "armeb". 2002-08-10 01:59:33 +00:00
fredette e4526bd9fa Add support for dynamic linking on HP PA-RISC. 2002-07-10 15:12:33 +00:00
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