summaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@nildram.co.uk>2006-10-19 13:42:17 +0000
committerRichard Sandiford <rsandifo@nildram.co.uk>2006-10-19 13:42:17 +0000
commit76a3a96f58420f7eb092621bc4cc9d659dfed987 (patch)
tree31b965928a0f4e7e60139ce59aee128a3567dd42 /bfd/elfxx-mips.c
parent0abec850608dce1cc2de4bcab985a1615c2872dc (diff)
downloadgdb-76a3a96f58420f7eb092621bc4cc9d659dfed987.tar.gz
bfd/
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG and DT_MIPS_RLD_MAP tags for position-independent executables. Do not add DT_DEBUG to shared libraries for any MIPS target. ld/testsuite/ * ld-mips-elf/multi-got-1.d: Remove DT_DEBUG tag. Do not require a specific file offset for .dynamic. Reduce DT_HASH by 8 to account for removed tag. * ld-mips-elf/tls-multi-got-1.r: Likewise. Also reduce DT_REL by 8. Reduce PLTGOT and symbol values by 16 to account for the removed tag. * ld-mips-elf/textrel-1.d: Remove DT_DEBUG tag. * ld-mips-elf/rel32-n32.d: Reduce addresses by 16 to account for removed DT_DEBUG tag. * ld-mips-elf/rel64.d: Likewise. * ld-mips-elf/tls-multi-got-1.got: Likewise. * ld-mips-elf/tlslib-o32-hidden.got: Likewise.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 66cdf142a39..aea02731968 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7478,7 +7478,7 @@ _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->shared)
+ if (info->executable)
{
/* SGI object has the equivalence of DT_DEBUG in the
DT_MIPS_RLD_MAP entry. */
@@ -7490,15 +7490,6 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
return FALSE;
}
}
- else
- {
- /* Shared libraries on traditional mips have DT_DEBUG. */
- if (!SGI_COMPAT (output_bfd))
- {
- if (!MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
- return FALSE;
- }
- }
if (reltext && (SGI_COMPAT (output_bfd) || htab->is_vxworks))
info->flags |= DF_TEXTREL;