diff options
Diffstat (limited to 'sysdeps/mips/mips64/n64/crti.S')
-rw-r--r-- | sysdeps/mips/mips64/n64/crti.S | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/mips/mips64/n64/crti.S b/sysdeps/mips/mips64/n64/crti.S index f59b20c631..fd468f0467 100644 --- a/sysdeps/mips/mips64/n64/crti.S +++ b/sysdeps/mips/mips64/n64/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (n64). - Copyright (C) 1995-2016 Free Software Foundation, Inc. + Copyright (C) 1995-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -40,6 +40,12 @@ #include <libc-symbols.h> +#ifdef __mips_micromips +# define JALR_RELOC R_MICROMIPS_JALR +#else +# define JALR_RELOC R_MIPS_JALR +#endif + #ifndef PREINIT_FUNCTION # define PREINIT_FUNCTION __gmon_start__ #endif @@ -59,6 +65,7 @@ .section .init,"ax",@progbits .p2align 2 .globl _init + .hidden _init .type _init, @function _init: daddiu $sp,$sp,-16 @@ -71,18 +78,20 @@ _init: ld $2,%got_disp(PREINIT_FUNCTION)($28) beq $2,$0,.Lno_weak_fn ld $25,%call16(PREINIT_FUNCTION)($28) - .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION + .reloc 1f,JALR_RELOC,PREINIT_FUNCTION 1: jalr $25 .Lno_weak_fn: + .insn #else ld $25,%got_disp(PREINIT_FUNCTION)($28) - .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION + .reloc 1f,JALR_RELOC,PREINIT_FUNCTION 1: jalr $25 #endif .section .fini,"ax",@progbits .p2align 2 .globl _fini + .hidden _fini .type _fini, @function _fini: daddiu $sp,$sp,-16 |