[uClibc-cvs] CVS update of uClibc/ldso/ldso (Makefile ldso.c)
Joakim Tjernlund
jocke at codepoet.org
Fri Aug 27 11:08:36 UTC 2004
Date: Friday, August 27, 2004 @ 05:08:36
Author: jocke
Path: /var/cvs/uClibc/ldso/ldso
Modified: Makefile (1.60 -> 1.61) ldso.c (1.117 -> 1.118)
#include "dl-startup.c into ldso.c, making ldso one compilation unit.
Now all functions and vaiables can be made static to reduce relocs.
Basicly, all variables should be merged into one struct variable
and then export that struct. Exported functions should be exported
as functions pointers in the above struct. This will reduce the
number of relocs inside ldso to a handful.
Add -Bsymbolic to linker for ldso. This will resolve all functions
(all JMP_SLOT goes away) and the remaining relocs are transformed into
RELATIVE relocs.
Index: uClibc/ldso/ldso/Makefile
diff -u uClibc/ldso/ldso/Makefile:1.60 uClibc/ldso/ldso/Makefile:1.61
--- uClibc/ldso/ldso/Makefile:1.60 Thu Aug 26 11:03:08 2004
+++ uClibc/ldso/ldso/Makefile Fri Aug 27 05:08:35 2004
@@ -40,10 +40,10 @@
XXFLAGS :=$(XXFLAGS:-O0=-O1)
XXFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp")
-LDFLAGS=$(CPU_LDFLAGS-y) -shared --warn-common --export-dynamic --sort-common \
+LDFLAGS=$(CPU_LDFLAGS-y) -Bsymbolic -shared --warn-common --export-dynamic --sort-common \
-z combreloc --discard-locals --discard-all --no-undefined
-CSRC= ldso.c dl-startup.c
+CSRC= ldso.c
COBJS=$(patsubst %.c,%.o, $(CSRC))
ASRC=$(shell ls $(TARGET_ARCH)/*.S)
AOBJS=$(patsubst %.S,%.o, $(ASRC))
Index: uClibc/ldso/ldso/ldso.c
diff -u uClibc/ldso/ldso/ldso.c:1.117 uClibc/ldso/ldso/ldso.c:1.118
--- uClibc/ldso/ldso/ldso.c:1.117 Fri Aug 27 02:46:19 2004
+++ uClibc/ldso/ldso/ldso.c Fri Aug 27 05:08:35 2004
@@ -59,6 +59,7 @@
int _dl_debug_file = 2;
#endif
+#include "dl-startup.c"
/* Forward function declarations */
static int _dl_suid_ok(void);
More information about the uClibc-cvs
mailing list