diff options
author | Richard Sandiford <rdsandiford@googlemail.com> | 2007-04-12 19:27:35 +0000 |
---|---|---|
committer | Richard Sandiford <rdsandiford@googlemail.com> | 2007-04-12 19:27:35 +0000 |
commit | af5978fb749478f01e76455e81e354c9d221c3fa (patch) | |
tree | 1963c478ae4ef5312fc4075423bfee6a4292c733 | |
parent | 9e3313aecd599cca275c602250d928cc6755177b (diff) | |
download | gdb-af5978fb749478f01e76455e81e354c9d221c3fa.zip gdb-af5978fb749478f01e76455e81e354c9d221c3fa.tar.gz gdb-af5978fb749478f01e76455e81e354c9d221c3fa.tar.bz2 |
bfd/
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
DT_MIPS_RTLD_MAP for PIEs.
-rw-r--r-- | bfd/ChangeLog | 5 | ||||
-rw-r--r-- | bfd/elfxx-mips.c | 22 |
2 files changed, 15 insertions, 12 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 962a288..125960d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2007-04-12 Richard Sandiford <richard@codesourcery.com> + * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add + DT_MIPS_RTLD_MAP for PIEs. + +2007-04-12 Richard Sandiford <richard@codesourcery.com> + * elfxx-mips.c (mips_elf_calculate_relocation): Set DT_TEXTREL when creating a __GOTT_BASE__ or __GOTT_INDEX__ relocation in a read-only section. diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 5c782de..c560e18 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -7586,18 +7586,16 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, must add the entries now so that we get the correct size for the .dynamic section. The DT_DEBUG entry is filled in by the dynamic linker and used by the debugger. */ - if (info->executable) - { - /* SGI object has the equivalence of DT_DEBUG in the - DT_MIPS_RLD_MAP entry. */ - if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0)) - return FALSE; - if (!SGI_COMPAT (output_bfd)) - { - if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0)) - return FALSE; - } - } + if (info->executable + && !SGI_COMPAT (output_bfd) + && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0)) + return FALSE; + + /* SGI object has the equivalence of DT_DEBUG in the + DT_MIPS_RLD_MAP entry. */ + if (!info->shared + && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0)) + return FALSE; if (reltext && (SGI_COMPAT (output_bfd) || htab->is_vxworks)) info->flags |= DF_TEXTREL; |