From 4cb202902d23b3c487016e516c70640c774b90d8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 17 Nov 1995 02:33:47 +0000 Subject: Thu Nov 16 06:07:49 1995 Roland McGrath * sysdeps/mach/hurd/dl-sysdep.c (_dl_sysdep_start_cleanup): New function. (_dl_sysdep_start): Move cleanup code there. * Makeconfig (default-rpath): New variable. (link-libc): Use it. * elf/Makefile (ld.so): Pass -rpath=$(default-rpath). * elf/rtld.c (_dl_rpath): New variable. (_dl_start): Set it from rtld_map's DT_RPATH. Call _dl_setup_hash on rtld_map. (dl_main): Cache address of _exit in variable before relocating, and use that in later calls. Call _dl_sysdep_start_cleanup before relocating. Keep track of dependency order while loading; remove rtld_map from chain, and reinsert in proper order if there is a dependency on it. * sysdeps/generic/Makefile (make_siglist): Pass -DSIGNUM_H=... with config's signum.h location. * sysdeps/generic/make_siglist.c: Include SIGNUM_H to define signal numbers. (HAVE_STRSIGNAL, HAVE_PSIGNAL): Define these before including signame.c (main): Deansideclize output. * elf/dl-load.c (_dl_map_object): Use _dl_rpath variable in place of DEFAULT_RPATH macro. * elf/Makefile: Undo last change. * sysdeps/mach/hurd/dl-sysdep.c (free): Don't abort, just nop. --- sysdeps/generic/Makefile | 2 ++ sysdeps/generic/make_siglist.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'sysdeps/generic') diff --git a/sysdeps/generic/Makefile b/sysdeps/generic/Makefile index 1315a26b95..dc31a50fcd 100644 --- a/sysdeps/generic/Makefile +++ b/sysdeps/generic/Makefile @@ -53,6 +53,8 @@ $(objpfx)siglist.c: $(objpfx)make_siglist $(objpfx)make_siglist: $(sysdep_dir)/generic/make_siglist.c $(native-compile) + -DSIGNUM_H=\"`cd $(dir $(firstword $(wildcard \ + $(+sysdep_dirs:%=%/signum.h)))); pwd`/signum.h\" generated := $(generated) make_siglist siglist.c endif diff --git a/sysdeps/generic/make_siglist.c b/sysdeps/generic/make_siglist.c index 34abf80513..a38ab6aa2e 100644 --- a/sysdeps/generic/make_siglist.c +++ b/sysdeps/generic/make_siglist.c @@ -15,14 +15,19 @@ You should have received a copy of the GNU General Public License along with the GNU C Library; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ -#include #include +#include +/* Get this configuration's defns of the signal numbers. */ +#define _SIGNAL_H 1 +#include SIGNUM_H /* Make a definition for sys_siglist. */ #undef HAVE_SYS_SIGLIST +#define HAVE_STRSIGNAL +#define HAVE_PSIGNAL #define sys_siglist my_siglist /* Avoid clash with signal.h. */ #include "signame.c" @@ -35,11 +40,11 @@ main() signame_init (); - puts ("#include \"ansidecl.h\"\n#include \n"); + puts ("#include \n"); puts ("\n/* This is a list of all known signal numbers. */"); - puts ("\nCONST char *CONST _sys_siglist[] =\n {"); + puts ("\nconst char *const _sys_siglist[] =\n {"); for (i = 0; i < NSIG; ++i) printf (" \"%s\",\n", sys_siglist[i]); -- cgit v1.2.3