for relocs against symbols in a merged section.
testsuite/
* gas/mips/elf-rel7.[sd]: New test.
* gas/mips/mips.exp: Run it.
+2002-10-21 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/tc-mips.c (mips_need_elf_addend_fixup): Return true
+ for relocs against symbols in a merged section.
+
2002-10-18 Alexandre Oliva <aoliva@redhat.com>
* config/tc-mips.c (md_begin): Add $fcc registers to the symbol
if (symbol_used_in_reloc_p (fixP->fx_addsy)
&& (((bfd_get_section_flags (stdoutput,
S_GET_SEGMENT (fixP->fx_addsy))
- & SEC_LINK_ONCE) != 0)
+ & (SEC_LINK_ONCE | SEC_MERGE)) != 0)
|| !strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)),
".gnu.linkonce",
sizeof (".gnu.linkonce") - 1)))
+2002-10-21 Richard Sandiford <rsandifo@redhat.com>
+
+ * gas/mips/elf-rel7.[sd]: New test.
+ * gas/mips/mips.exp: Run it.
+
2002-10-12 Alexandre Oliva <aoliva@redhat.com>
* gas/mips/mips.exp: Don't xfail relax.
--- /dev/null
+#objdump: -dr --prefix-addresses
+#name: MIPS ELF reloc 7
+
+.*: +file format elf.*mips.*
+
+Disassembly of section \.text:
+0+00 <.*> lui a0,0x0
+ 0: R_MIPS_HI16 .barsec
+0+04 <.*> lw a0,8\(a0\)
+ 4: R_MIPS_LO16 .barsec
+0+08 <.*> lui a0,0x0
+ 8: R_MIPS_HI16 bar
+0+0c <.*> lw a0,4\(a0\)
+ c: R_MIPS_LO16 bar
+0+10 <.*> lui a0,0x0
+ 10: R_MIPS_HI16 bar
+0+14 <.*> lw a0,8\(a0\)
+ 14: R_MIPS_LO16 bar
+0+18 <.*> lui a0,0x0
+ 18: R_MIPS_HI16 frob
+0+1c <.*> lw a0,0\(a0\)
+ 1c: R_MIPS_LO16 frob
+0+20 <.*> lui a0,0x0
+ 20: R_MIPS_HI16 frob
+0+24 <.*> lw a0,4\(a0\)
+ 24: R_MIPS_LO16 frob
+0+28 <.*> lui a0,0x0
+ 28: R_MIPS_HI16 frob
+0+2c <.*> lw a0,16\(a0\)
+ 2c: R_MIPS_LO16 frob
+#pass
--- /dev/null
+ .global frob
+ .section .barsec,"aM",@progbits,8
+ .word 0,1
+bar: .word 2,3
+frob: .word 4,5
+ .text
+foo: lw $4,bar
+ lw $4,bar+4
+ lw $4,bar+8
+ lw $4,frob
+ lw $4,frob+4
+ lw $4,frob+16
}
run_dump_test "elf-rel5"
run_dump_test "elf-rel6"
+ run_dump_test "elf-rel7"
run_dump_test "${tmips}${el}empic"
run_dump_test "empic2"
run_dump_test "empic3_e"