Module Name: src
Committed By: martin
Date: Fri Aug 10 12:37:39 UTC 2012
Modified Files:
src/lib/csu/sparc_elf: Makefile crt0.c
Log Message:
Make this position independend (for -pie executables)
To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/lib/csu/sparc_elf/Makefile
cvs rdiff -u -r1.14 -r1.15 src/lib/csu/sparc_elf/crt0.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/csu/sparc_elf/Makefile
diff -u src/lib/csu/sparc_elf/Makefile:1.6 src/lib/csu/sparc_elf/Makefile:1.7
--- src/lib/csu/sparc_elf/Makefile:1.6 Fri May 19 19:11:12 2006
+++ src/lib/csu/sparc_elf/Makefile Fri Aug 10 12:37:39 2012
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.6 2006/05/19 19:11:12 christos Exp $
+# $NetBSD: Makefile,v 1.7 2012/08/10 12:37:39 martin Exp $
-#Uncomment the next line to enable the new .init fallthru
CPPFLAGS+= -I${.CURDIR}
+CFLAGS+= -fPIC
.include "${.CURDIR}/../common_elf/Makefile.inc"
Index: src/lib/csu/sparc_elf/crt0.c
diff -u src/lib/csu/sparc_elf/crt0.c:1.14 src/lib/csu/sparc_elf/crt0.c:1.15
--- src/lib/csu/sparc_elf/crt0.c:1.14 Mon Mar 7 05:09:11 2011
+++ src/lib/csu/sparc_elf/crt0.c Fri Aug 10 12:37:39 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.c,v 1.14 2011/03/07 05:09:11 joerg Exp $ */
+/* $NetBSD: crt0.c,v 1.15 2012/08/10 12:37:39 martin Exp $ */
/*
* Copyright (c) 1998 Christos Zoulas
@@ -56,7 +56,7 @@ _start:\n\
sub %sp, 24, %sp ! expand to standard stack frame size\n\
mov %g3, %o3\n\
mov %g2, %o4\n\
- call ___start\n\
+ ba ___start\n\
mov %g1, %o5\n\
");
@@ -100,7 +100,7 @@ ___start(int argc, char **argv, char **e
* NOTE: Leave the RCS ID _after_ __start(), in case it gets placed in .text.
*/
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: crt0.c,v 1.14 2011/03/07 05:09:11 joerg Exp $");
+__RCSID("$NetBSD: crt0.c,v 1.15 2012/08/10 12:37:39 martin Exp $");
#endif /* LIBC_SCCS and not lint */
#include "common.c"