diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2003-07-09 11:52:52 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2003-07-09 11:52:52 +0000 |
commit | 0d591ff7fb37443cbb15bc2b7f0dc192cc124094 (patch) | |
tree | 96e71b20336d703e0f34441f66efe26d3eaf6072 | |
parent | fdd07405582d22ef5ceb04fe805e5c32dc9ca12e (diff) | |
download | gdb-0d591ff7fb37443cbb15bc2b7f0dc192cc124094.zip gdb-0d591ff7fb37443cbb15bc2b7f0dc192cc124094.tar.gz gdb-0d591ff7fb37443cbb15bc2b7f0dc192cc124094.tar.bz2 |
* elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
of relocations whose offset is -2.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 12 |
2 files changed, 15 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 426c76c..c2029a0 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2003-07-09 Richard Sandiford <rsandifo@redhat.com> + * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling + of relocations whose offset is -2. + +2003-07-09 Richard Sandiford <rsandifo@redhat.com> + * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat forced-local symbols like other locals. Don't create relocations against STN_UNDEF in irix objects. diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index bef1c79..9ad54fc 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -3875,9 +3875,17 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec, } #endif - if (outrel[0].r_offset == (bfd_vma) -1 - || outrel[0].r_offset == (bfd_vma) -2) + if (outrel[0].r_offset == (bfd_vma) -1) + /* The relocation field has been deleted. */ skip = TRUE; + else if (outrel[0].r_offset == (bfd_vma) -2) + { + /* The relocation field has been converted into a relative value of + some sort. Functions like _bfd_elf_write_section_eh_frame expect + the field to be fully relocated, so add in the symbol's value. */ + skip = TRUE; + *addendp += symbol; + } /* If we've decided to skip this relocation, just output an empty record. Note that R_MIPS_NONE == 0, so that this call to memset |