diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-01-02 23:34:13 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-01-02 23:34:13 +0000 |
commit | fb84603f8c45fdafdaa750490785fc1b15541386 (patch) | |
tree | 257c50f56dfb4d90e775b83a915ae21d9f39bb04 /libc/sysdeps/linux/i386/Makefile | |
parent | cadff3f10e8f20f8db0e2878abf90fb16eba797a (diff) |
Peter S. Mazinger writes:
Hello Erik!
I have made some cosmetical changes to the files, removed the added
SCRT=-fPIC option from building the crt0.S file (but it is a requirement
to build them with -fPIC), and changed some comments. I have left the
ldso.c patch with PIE_SUPPORT ifdefs, but consider applying it w/o them
(see some earlier comment from PaX Team on this issue, as it is considered
a bug). To have it work correctly, you'll also need removing
COMPLETELY_PIC.
One thing is missing: PIE_SUPPORT should be usable only for i386 (for
now).
Also added the support for propolice protection (that works for me and
catches memcpy/strcpy attacks (but needs a special gcc version).
Thanks, Peter
Diffstat (limited to 'libc/sysdeps/linux/i386/Makefile')
-rw-r--r-- | libc/sysdeps/linux/i386/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/i386/Makefile b/libc/sysdeps/linux/i386/Makefile index 9ba60f59e..c7f88b681 100644 --- a/libc/sysdeps/linux/i386/Makefile +++ b/libc/sysdeps/linux/i386/Makefile @@ -22,6 +22,9 @@ ASFLAGS=$(CFLAGS) CRT0_SRC = crt0.S CRT0_OBJ = crt0.o crt1.o gcrt1.o +ifeq ($(strip $(UCLIBC_PIE_SUPPORT)),y) +CRT0_OBJ += Scrt0.o Scrt1.o +endif CRT0_DEPS=gmon-start.S CTOR_TARGETS=$(TOPDIR)lib/crti.o $(TOPDIR)lib/crtn.o @@ -44,6 +47,13 @@ $(LIBC): ar-target ar-target: $(OBJS) $(CRT0_OBJ) $(CTOR_TARGETS) $(AR) $(ARFLAGS) $(LIBC) $(OBJS) cp $(CRT0_OBJ) $(TOPDIR)lib/ +ifeq ($(strip $(UCLIBC_PIE_SUPPORT)),y) +ifeq ($(strip $(UCLIBC_CTOR_DTOR)),y) + $(RM) $(TOPDIR)lib/Scrt0.o +else + mv $(TOPDIR)lib/Scrt0.o $(TOPDIR)lib/Scrt1.o +endif +endif $(CRT0_OBJ): $(CRT0_SRC) $(CC) $(CFLAGS) -DL_$* $< -c -o $*.o |