From dd54084dd9549ae15c12db248571ad76946b8712 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sat, 18 Feb 2012 22:31:42 -0800 Subject: Rework sparc PIC macros so crt{i,n}.S can use them too. * sysdeps/unix/sparc/sysdep.h (SPARC_PIC_THUNK): New macro. (SETUP_PIC_REG): Use SPARC_PIC_THUNK and don't save and restore %o7 across the call. (SETUP_PIC_REG_LEAF): Do %o7 save/restore in this new macro instead. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Use SETUP_PIC_REG_LEAF. * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Likewise. * sysdeps/sparc/crti.S: Use SETUP_PIC_REG. * sysdeps/sparc/crtn.S: Likewise. --- sysdeps/sparc/crti.S | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'sysdeps/sparc/crti.S') diff --git a/sysdeps/sparc/crti.S b/sysdeps/sparc/crti.S index adb1b29..6ec4e9a 100644 --- a/sysdeps/sparc/crti.S +++ b/sysdeps/sparc/crti.S @@ -70,9 +70,7 @@ _init: save %sp, -STACKFRAME_SIZE, %sp #if PREINIT_FUNCTION_WEAK - sethi %hi(_GLOBAL_OFFSET_TABLE_-4), %l7 - call __sparc_get_pc_thunk.l7 - add %l7, %lo(_GLOBAL_OFFSET_TABLE_+4), %l7 + SETUP_PIC_REG(l7) sethi %hi(PREINIT_FUNCTION), %g1 or %g1, %lo(PREINIT_FUNCTION), %g1 GOT_LOAD [%l7 + %g1], %g1 @@ -93,12 +91,3 @@ _init: .type _fini, @function _fini: save %sp, -STACKFRAME_SIZE, %sp - - .section .text.__sparc_get_pc_thunk.l7,"axG",@progbits,__sparc_get_pc_thunk.l7,comdat - .p2align 2 - .weak __sparc_get_pc_thunk.l7 - .hidden __sparc_get_pc_thunk.l7 - .type __sparc_get_pc_thunk.l7, #function -__sparc_get_pc_thunk.l7: - jmp %o7 + 8 - add %o7, %l7, %l7 -- cgit v1.1