diff options
Diffstat (limited to 'sysdeps/mips/mips64/n32/crti.S')
-rw-r--r-- | sysdeps/mips/mips64/n32/crti.S | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sysdeps/mips/mips64/n32/crti.S b/sysdeps/mips/mips64/n32/crti.S index 00b89f3894..59a09d5763 100644 --- a/sysdeps/mips/mips64/n32/crti.S +++ b/sysdeps/mips/mips64/n32/crti.S @@ -1,5 +1,5 @@ /* Special .init and .fini section support for MIPS (n32). - 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: addiu $sp,$sp,-16 @@ -71,18 +78,20 @@ _init: lw $2,%got_disp(PREINIT_FUNCTION)($28) beq $2,$0,.Lno_weak_fn lw $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 lw $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: addiu $sp,$sp,-16 |