Source-Changes-HG archive

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

[src/trunk]: src/lib/csu/arch/sh3 fix pic code; otherwise we generate text re...



details:   https://anonhg.NetBSD.org/src/rev/422018f86bda
branches:  trunk
changeset: 347497:422018f86bda
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Aug 28 13:50:25 2016 +0000

description:
fix pic code; otherwise we generate text relocations.

diffstat:

 lib/csu/arch/sh3/crt0.S |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ac8c533aa3ed -r 422018f86bda lib/csu/arch/sh3/crt0.S
--- a/lib/csu/arch/sh3/crt0.S   Sun Aug 28 08:51:52 2016 +0000
+++ b/lib/csu/arch/sh3/crt0.S   Sun Aug 28 13:50:25 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crt0.S,v 1.4 2012/01/31 20:17:57 uwe Exp $ */
+/* $NetBSD: crt0.S,v 1.5 2016/08/28 13:50:25 christos Exp $ */
 
 /*
  * Copyright (c) 1998 Christos Zoulas
@@ -37,7 +37,7 @@
 
 #include <machine/asm.h>
 
-RCSID("$NetBSD: crt0.S,v 1.4 2012/01/31 20:17:57 uwe Exp $")
+RCSID("$NetBSD: crt0.S,v 1.5 2016/08/28 13:50:25 christos Exp $")
 
 STRONG_ALIAS(_start,__start)
 
@@ -49,11 +49,15 @@
  * proper registers.
  */
 _ENTRY(__start)
+       PIC_PROLOGUE_NOSAVE(.L_got)
        mov.l   .L___start, r0
        mov     r7, r4          ! void (*cleanup)(void)
        mov     r8, r5          ! const Obj_Entry *obj
-       jmp     @r0
+1:     JUMP    r0
         mov    r9, r6          ! struct ps_strings *ps_strings
 
        .p2align 2
-.L___start:    .long   _C_LABEL(___start)
+.L_got:
+       PIC_GOT_DATUM
+.L___start:
+       CALL_DATUM(___start, 1b)



Home | Main Index | Thread Index | Old Index