]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - sysdeps/mips/mips64/n64/crti.S
Mark _init and _fini as hidden [BZ #23145]
[thirdparty/glibc.git] / sysdeps / mips / mips64 / n64 / crti.S
index d263594b73e6d365e94c5f9c16f1bcb4200a966e..fd468f04672a962128aeb64718ffca39a7988453 100644 (file)
@@ -1,5 +1,5 @@
 /* Special .init and .fini section support for MIPS (n64).
-   Copyright (C) 1995-2012 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
 
 #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
        .hidden PREINIT_FUNCTION
 #endif
 
+       .set nomips16
+
        .section .init,"ax",@progbits
        .p2align 2
        .globl _init
+       .hidden _init
        .type _init, @function
 _init:
        daddiu $sp,$sp,-16
@@ -69,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