summaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2007-04-12 19:27:35 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2007-04-12 19:27:35 +0000
commitee188fbd8905d6f57d86557a58f2f2a6eb44baa8 (patch)
tree90f41d1f23e61a836c7e62e793a5a9a30a0e7869 /bfd/elfxx-mips.c
parent682507345094c0f181a4361dae5dfd2f2be20b95 (diff)
downloadgdb-ee188fbd8905d6f57d86557a58f2f2a6eb44baa8.tar.gz
bfd/
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_RTLD_MAP for PIEs.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 5c782de5d5b..c560e18f569 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;