aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorRichard Sandiford <rdsandiford@googlemail.com>2004-10-07 19:15:29 +0000
committerRichard Sandiford <rdsandiford@googlemail.com>2004-10-07 19:15:29 +0000
commit99022dfb1d4b1de6f394026ffd5b738b522aa9f6 (patch)
treee45068b5b16d5c80f2d723e3ae29368b1f48e534 /bfd
parentb1dca8ee5e150570df09f0e4c704657905ee6939 (diff)
downloadbinutils-99022dfb1d4b1de6f394026ffd5b738b522aa9f6.zip
binutils-99022dfb1d4b1de6f394026ffd5b738b522aa9f6.tar.gz
binutils-99022dfb1d4b1de6f394026ffd5b738b522aa9f6.tar.bz2
* elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
against the absolute section. (mips_elf64_write_rela): Likewise.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-mips.c4
2 files changed, 10 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3dba4a3..eefb123 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+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
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index ac9f96f..dd68f70 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -2352,6 +2352,8 @@ mips_elf64_write_rel (bfd *abfd, asection *sec,
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;
@@ -2448,6 +2450,8 @@ mips_elf64_write_rela (bfd *abfd, asection *sec,
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;