explicitly use -static -nopie

ok naddy@ sthen@
This commit is contained in:
pascal 2015-03-31 18:29:51 +00:00
parent f113ec08ba
commit 39a31e42ea

View File

@ -1,7 +1,7 @@
$OpenBSD: patch-Makefile,v 1.5 2012/08/08 20:14:21 pascal Exp $
$OpenBSD: patch-Makefile,v 1.6 2015/03/31 18:29:51 pascal Exp $
$RuOBSD: patch-Makefile,v 1.3 2009/02/07 10:28:03 form Exp $
--- Makefile.orig Sun Jan 23 19:11:04 2011
+++ Makefile Fri Jul 20 18:50:11 2012
+++ Makefile Tue Mar 31 17:06:38 2015
@@ -6,33 +6,47 @@
#
# Path for the floppy disk device
@ -28,16 +28,17 @@ $RuOBSD: patch-Makefile,v 1.3 2009/02/07 10:28:03 form Exp $
# symbols and then link it dynamically so I have full
# relocation information
-memtest_shared: $(OBJS) memtest_shared.lds Makefile
+memtest_shared: $(OBJS) lib.o memtest_shared.lds Makefile
$(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \
- $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \
- -o $@ $(OBJS) && \
- $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS)
+ -o $@ $(OBJS) lib.o && \
+memtest_shared: $(OBJS) lib.o memtest_shared.lds Makefile
+ $(LD) --warn-constructors --warn-common -static -nopie \
+ -T memtest_shared.lds -o $@ $(OBJS) lib.o && \
+ $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS) lib.o
+memtest_shared_s: $(OBJS) lib_s.o memtest_shared.lds Makefile
+ $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \
+ -o $@ $(OBJS) lib.o && \
+ $(LD) --warn-constructors --warn-common -static -nopie \
+ -T memtest_shared.lds -o $@ $(OBJS) lib.o && \
+ $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS) lib_s.o
+
memtest_shared.bin: memtest_shared