Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/csu/sparc_elf Make this position independend (for -pie e...



details:   https://anonhg.NetBSD.org/src/rev/1a12c4aa4f46
branches:  trunk
changeset: 780880:1a12c4aa4f46
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 10 12:37:39 2012 +0000

description:
Make this position independend (for -pie executables)

diffstat:

 lib/csu/sparc_elf/Makefile |  4 ++--
 lib/csu/sparc_elf/crt0.c   |  6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 922cd9224604 -r 1a12c4aa4f46 lib/csu/sparc_elf/Makefile
--- a/lib/csu/sparc_elf/Makefile        Fri Aug 10 12:35:15 2012 +0000
+++ b/lib/csu/sparc_elf/Makefile        Fri Aug 10 12:37:39 2012 +0000
@@ -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"
diff -r 922cd9224604 -r 1a12c4aa4f46 lib/csu/sparc_elf/crt0.c
--- a/lib/csu/sparc_elf/crt0.c  Fri Aug 10 12:35:15 2012 +0000
+++ b/lib/csu/sparc_elf/crt0.c  Fri Aug 10 12:37:39 2012 +0000
@@ -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 @@
        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 @@
  * 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"



Home | Main Index | Thread Index | Old Index