against the absolute section.
(mips_elf64_write_rela): Likewise.
+2004-10-07 Richard Sandiford <rsandifo@redhat.com>
+
+ * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
+ against the absolute section.
+ (mips_elf64_write_rela): Likewise.
+
2004-10-07 Jan Beulich <jbeulich@novell.com>
* elf.c (elf_find_function): Don't generally check for matching
sym = *ptr->sym_ptr_ptr;
if (sym == last_sym)
n = last_sym_idx;
+ else if (bfd_is_abs_section (sym->section) && sym->value == 0)
+ n = STN_UNDEF;
else
{
last_sym = sym;
sym = *ptr->sym_ptr_ptr;
if (sym == last_sym)
n = last_sym_idx;
+ else if (bfd_is_abs_section (sym->section) && sym->value == 0)
+ n = STN_UNDEF;
else
{
last_sym = sym;
+2004-10-07 Richard Sandiford <rsandifo@redhat.com>
+
+ * gas/mips/elf-rel22.[sd]: New test.
+ * gas/mips/mips.exp: Run it.
+
2004-10-07 Richard Sandiford <rsandifo@redhat.com>
* gas/mips/elf-rel21.[sd]: New test.
--- /dev/null
+#as: -march=mips3 -mabi=64
+#readelf: --relocs
+#name: MIPS ELF reloc 22
+
+Relocation section '\.rela\.text' .*:
+.*
+.* R_MIPS_LO16 * 0+04
+ * Type2: R_MIPS_SUB *
+ * Type3: R_MIPS_LO16 *
--- /dev/null
+ lui $4,%lo(%neg(%lo(bar-foo)))
+foo:
+ nop
+bar:
run_dump_test "elf-rel20"
if $has_newabi {
run_dump_test "elf-rel21"
+ run_dump_test "elf-rel22"
}
if { !$no_mips16 } {