diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-05-26 21:23:03 +0000 |
---|---|---|
committer | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2005-05-26 21:23:03 +0000 |
commit | 5c48e4b530c96dff7b8293ffaa636332298169f5 (patch) | |
tree | 236b09c4a3d7b1ccc4fb4bb7b8461324c8e4cd66 /libc | |
parent | 8cc46759b24d20030ae73c16304a35758c7c328c (diff) |
Add PIE support to ARM. From Peter Mazinger
Diffstat (limited to 'libc')
-rw-r--r-- | libc/sysdeps/linux/arm/Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libc/sysdeps/linux/arm/Makefile b/libc/sysdeps/linux/arm/Makefile index 94929304e..1a11e43ef 100644 --- a/libc/sysdeps/linux/arm/Makefile +++ b/libc/sysdeps/linux/arm/Makefile @@ -21,7 +21,7 @@ include $(TOPDIR)Rules.mak CRT0_SRC = crt0.S CRT0_OBJ = crt0.o crt1.o -CRT0_DEPS=gmon-start.S +SCRT0_OBJ = $(patsubst %,S%, $(CRT0_OBJ)) CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o SSRC=__longjmp.S vfork.S clone.S setjmp.S bsd-setjmp.S \ @@ -37,15 +37,24 @@ OBJ_LIST=../../../obj.sysdeps.$(TARGET_ARCH) all: $(OBJ_LIST) -$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) +$(OBJ_LIST): $(OBJS) $(CRT0_OBJ) $(SCRT0_OBJ) $(CTOR_TARGETS) echo $(patsubst %, sysdeps/linux/$(TARGET_ARCH)/%, $(OBJS)) > $(OBJ_LIST) $(INSTALL) -d $(TOPDIR)lib/ - cp $(CRT0_OBJ) $(TOPDIR)lib/ + cp $(CRT0_OBJ) $(SCRT0_OBJ) $(TOPDIR)lib/ +ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) + $(RM) $(TOPDIR)lib/Scrt0.o +else + mv $(TOPDIR)lib/Scrt0.o $(TOPDIR)lib/Scrt1.o +endif $(CRT0_OBJ): $(CRT0_SRC) $(CC) $(ASFLAGS) -DL_$* $< -c -o $*.o $(STRIPTOOL) -x -R .note -R .comment $*.o +$(SCRT0_OBJ): $(CRT0_SRC) + $(CC) $(ASFLAGS) $(PIEFLAG) -DL_$* $< -c -o $*.o + $(STRIPTOOL) -x -R .note -R .comment $*.o + $(SOBJS): %.o : %.S $(CC) $(ASFLAGS) -c $< -o $@ $(STRIPTOOL) -x -R .note -R .comment $*.o @@ -83,4 +92,3 @@ headers: clean: $(RM) *.[oa] *~ core $(RM) bits/sysnum.h - $(RM) gmon-start.S |