diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-11-04 13:07:50 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-11-04 13:07:50 +0000 |
commit | f8a3fa0247f4ee4e614df73aef0f8732c8ae5ab3 (patch) | |
tree | 8a616a6013bc45c1e86b5ca6b347bd81393217e2 /ldso | |
parent | fe6015e8aac57bedd05407fc956727c993070adf (diff) |
Rework the config system. Better utilize the Kconfig language
which should simplify enabling arbitrary architectures.
-Erik
Diffstat (limited to 'ldso')
-rw-r--r-- | ldso/include/dl-elf.h | 6 | ||||
-rw-r--r-- | ldso/include/ld_elf.h | 6 | ||||
-rw-r--r-- | ldso/ldso/Makefile | 8 | ||||
-rw-r--r-- | ldso/ldso/dl-elf.c | 8 | ||||
-rw-r--r-- | ldso/ldso/readelflib1.c | 8 | ||||
-rw-r--r-- | ldso/libdl/Makefile | 8 | ||||
-rw-r--r-- | ldso/util/Makefile | 29 | ||||
-rw-r--r-- | ldso/util/ldconfig.c | 6 | ||||
-rw-r--r-- | ldso/util/ldd.c | 11 |
9 files changed, 32 insertions, 58 deletions
diff --git a/ldso/include/dl-elf.h b/ldso/include/dl-elf.h index db9ee9556..75c7d2761 100644 --- a/ldso/include/dl-elf.h +++ b/ldso/include/dl-elf.h @@ -10,9 +10,9 @@ # define LDSO_CACHE "../util/ld.so.cache" # define LDSO_PRELOAD "../util/ld.so.preload" #else -# define LDSO_CONF UCLIBC_TARGET_PREFIX "etc/ld.so.conf" -# define LDSO_CACHE UCLIBC_TARGET_PREFIX "etc/ld.so.cache" -# define LDSO_PRELOAD UCLIBC_TARGET_PREFIX "etc/ld.so.preload" +# define LDSO_CONF UCLIBC_RUNTIME_PREFIX "etc/ld.so.conf" +# define LDSO_CACHE UCLIBC_RUNTIME_PREFIX "etc/ld.so.cache" +# define LDSO_PRELOAD UCLIBC_RUNTIME_PREFIX "etc/ld.so.preload" #endif diff --git a/ldso/include/ld_elf.h b/ldso/include/ld_elf.h index db9ee9556..75c7d2761 100644 --- a/ldso/include/ld_elf.h +++ b/ldso/include/ld_elf.h @@ -10,9 +10,9 @@ # define LDSO_CACHE "../util/ld.so.cache" # define LDSO_PRELOAD "../util/ld.so.preload" #else -# define LDSO_CONF UCLIBC_TARGET_PREFIX "etc/ld.so.conf" -# define LDSO_CACHE UCLIBC_TARGET_PREFIX "etc/ld.so.cache" -# define LDSO_PRELOAD UCLIBC_TARGET_PREFIX "etc/ld.so.preload" +# define LDSO_CONF UCLIBC_RUNTIME_PREFIX "etc/ld.so.conf" +# define LDSO_CACHE UCLIBC_RUNTIME_PREFIX "etc/ld.so.cache" +# define LDSO_PRELOAD UCLIBC_RUNTIME_PREFIX "etc/ld.so.preload" #endif diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile index 2f0674d23..b9718f4da 100644 --- a/ldso/ldso/Makefile +++ b/ldso/ldso/Makefile @@ -28,16 +28,12 @@ LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so XXFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \ - -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -fno-builtin -nostdinc -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include ifeq ($(DODEBUG),y) XXFLAGS=$(XWARNINGS) -O0 -g3 $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \ - -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -fno-builtin -nostdinc -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include endif diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index 56f948a54..afb5a3b75 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -361,11 +361,9 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, if(_dl_debug) _dl_dprintf(_dl_debug_file, "\tsearching full lib path list\n"); #endif if ((tpnt1 = search_for_named_library(libname, secure, - UCLIBC_TARGET_PREFIX "/usr/X11R6/lib:" - UCLIBC_TARGET_PREFIX "/usr/lib:" - UCLIBC_TARGET_PREFIX "/lib:" - UCLIBC_DEVEL_PREFIX "/lib:" - UCLIBC_BUILD_DIR "/lib:" + UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib:" + UCLIBC_RUNTIME_PREFIX "usr/lib:" + UCLIBC_RUNTIME_PREFIX "lib:" "/usr/lib:" "/lib", rpnt) ) != NULL) diff --git a/ldso/ldso/readelflib1.c b/ldso/ldso/readelflib1.c index 56f948a54..afb5a3b75 100644 --- a/ldso/ldso/readelflib1.c +++ b/ldso/ldso/readelflib1.c @@ -361,11 +361,9 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, if(_dl_debug) _dl_dprintf(_dl_debug_file, "\tsearching full lib path list\n"); #endif if ((tpnt1 = search_for_named_library(libname, secure, - UCLIBC_TARGET_PREFIX "/usr/X11R6/lib:" - UCLIBC_TARGET_PREFIX "/usr/lib:" - UCLIBC_TARGET_PREFIX "/lib:" - UCLIBC_DEVEL_PREFIX "/lib:" - UCLIBC_BUILD_DIR "/lib:" + UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib:" + UCLIBC_RUNTIME_PREFIX "usr/lib:" + UCLIBC_RUNTIME_PREFIX "lib:" "/usr/lib:" "/lib", rpnt) ) != NULL) diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile index 009072131..fa7d7129d 100644 --- a/ldso/libdl/Makefile +++ b/ldso/libdl/Makefile @@ -22,16 +22,12 @@ TOPDIR=../../ include $(TOPDIR)Rules.mak XXFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) \ - -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include ifeq ($(DODEBUG),y) XXFLAGS=$(XWARNINGS) -O0 -g3 $(XARCH_CFLAGS) $(CPU_CFLAGS) \ - -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include endif diff --git a/ldso/util/Makefile b/ldso/util/Makefile index ac720f64f..0d0c96845 100644 --- a/ldso/util/Makefile +++ b/ldso/util/Makefile @@ -53,43 +53,30 @@ readsoname.o: readsoname.c readsoname2.c $(HOSTCC) $(HOSTCFLAGS) -I. -I../include -c $< -o $@ strip -x -R .note -R .comment $*.o -#ldconfig.o: ldconfig.c -# $(HOSTCC) $(HOSTCFLAGS) -I. -I../include \ -# -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" -c $< -o $@ -# strip -x -R .note -R .comment $*.o - -#ldconfig: ldconfig.o readsoname.o -# $(HOSTCC) $(HOSTCFLAGS) $^ -o $@ -# strip -x -R .note -R .comment $@ - ldconfig: ldconfig.c readsoname.c - $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \ $^ -o $@ strip -x -R .note -R .comment $@ ldconfig.target: ldconfig.c readsoname.c - $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \ $^ -o $@ $(LDADD_LIBFLOAT) $(STRIPTOOL) -x -R .note -R .comment $@ ldd: ldd.c - $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + $(HOSTCC) $(HOSTCFLAGS) $(XXFLAGS) \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" -I. -I../include \ $^ -o $@ strip -x -R .note -R .comment $@ ldd.target: ldd.c - $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ - -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ - -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \ + $(TARGET_CC) $(CFLAGS) $(XXFLAGS) -Wl,-s \ + -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \ -DUCLIBC_LDSO=\"$(UCLIBC_LDSO)\" \ $^ -o $@ $(LDADD_LIBFLOAT) $(STRIPTOOL) -x -R .note -R .comment $@ diff --git a/ldso/util/ldconfig.c b/ldso/util/ldconfig.c index 8ae28da77..0b6890ff1 100644 --- a/ldso/util/ldconfig.c +++ b/ldso/util/ldconfig.c @@ -885,9 +885,9 @@ int main(int argc, char **argv) free(extpath); } - scan_dir(UCLIBC_TARGET_PREFIX "/usr/X11R6/lib"); - scan_dir(UCLIBC_TARGET_PREFIX "/usr/lib"); - scan_dir(UCLIBC_TARGET_PREFIX "/lib"); + scan_dir(UCLIBC_RUNTIME_PREFIX "/usr/X11R6/lib"); + scan_dir(UCLIBC_RUNTIME_PREFIX "/usr/lib"); + scan_dir(UCLIBC_RUNTIME_PREFIX "/lib"); } #ifdef USE_CACHE diff --git a/ldso/util/ldd.c b/ldso/util/ldd.c index a73d34070..3ea41b424 100644 --- a/ldso/util/ldd.c +++ b/ldso/util/ldd.c @@ -215,7 +215,7 @@ int check_elf_header(Elf32_Ehdr *const ehdr) } /* This function's behavior must exactly match that - * in uClibc/ldso/d-link/readelflib1.c */ + * in uClibc/ldso/ldso/readelflib1.c */ static void search_for_named_library(char *name, char *result, const char *path_list) { int i, count = 1; @@ -322,11 +322,10 @@ void locate_library_file(Elf32_Ehdr* ehdr, Elf32_Dyn* dynamic, int is_suid, stru } /* Lastly, search the standard list of paths for the library. - This list must exactly match the list in uClibc/ldso/d-link/readelflib1.c */ - path = UCLIBC_TARGET_PREFIX "/usr/lib:" - UCLIBC_TARGET_PREFIX "/lib:" - UCLIBC_DEVEL_PREFIX "/lib:" - UCLIBC_BUILD_DIR "/lib:" + This list must exactly match the list in uClibc/ldso/ldso/readelflib1.c */ + path = UCLIBC_RUNTIME_PREFIX "usr/X11R6/lib:" + UCLIBC_RUNTIME_PREFIX "usr/lib:" + UCLIBC_RUNTIME_PREFIX "lib:" "/usr/lib:" "/lib"; search_for_named_library(lib->name, buf, path); |