+2016-11-23 Maciej W. Rozycki <macro@imgtec.com>
+
+ * sysdeps/mips/mips32/crti.S (JALR_RELOC): New macro.
+ (_init): Use it in place of hardcoded R_MIPS_JALR.
+ * sysdeps/mips/mips64/n32/crti.S (JALR_RELOC): New macro.
+ (_init): Use it in place of hardcoded R_MIPS_JALR.
+ * sysdeps/mips/mips64/n64/crti.S (JALR_RELOC): New macro.
+ (_init): Use it in place of hardcoded R_MIPS_JALR.
+
2016-11-23 Joseph Myers <joseph@codesourcery.com>
[BZ #20787]
#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
lw $2,%got(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(PREINIT_FUNCTION)($28)
- .reloc 1f,R_MIPS_JALR,PREINIT_FUNCTION
+ .reloc 1f,JALR_RELOC,PREINIT_FUNCTION
1: jalr $25
#endif
#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
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
#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
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