summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2007-04-17 13:14:08 +0000
committerDaniel Jacobowitz <dan@debian.org>2007-04-17 13:14:08 +0000
commite59e15f5ec092ee57b634bf53e224e690ee5cd36 (patch)
treea02537fc3be7b98f420258596541f350403c4a1f
parentbb4ab8e767ca2c2ae7a2d0acc5f091db3d7b1e4b (diff)
downloadbinutils-redhat-e59e15f5ec092ee57b634bf53e224e690ee5cd36.tar.gz
* elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
DT_MIPS_RLD_MAP before DT_DEBUG again.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elfxx-mips.c18
2 files changed, 16 insertions, 7 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 8ed0fad9a5..7d7838c848 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-17 Daniel Jacobowitz <dan@codesourcery.com>
+
+ * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Put
+ DT_MIPS_RLD_MAP before DT_DEBUG again.
+
2007-04-14 Steve Ellcey <sje@cup.hp.com>
* Makefile.am: Add ACLOCAL_AMFLAGS.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index c560e18f56..fa171645e8 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -7584,19 +7584,23 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd,
/* Add some entries to the .dynamic section. We fill in the
values later, in _bfd_mips_elf_finish_dynamic_sections, but we
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_COMPAT (output_bfd)
- && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
- return FALSE;
+ the .dynamic section. */
/* SGI object has the equivalence of DT_DEBUG in the
- DT_MIPS_RLD_MAP entry. */
+ DT_MIPS_RLD_MAP entry. This must come first because glibc
+ only fills in DT_MIPS_RLD_MAP (not DT_DEBUG) and GDB only
+ looks at the first one it sees. */
if (!info->shared
&& !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0))
return FALSE;
+ /* The DT_DEBUG entry may be filled in by the dynamic linker and
+ used by the debugger. */
+ if (info->executable
+ && !SGI_COMPAT (output_bfd)
+ && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0))
+ return FALSE;
+
if (reltext && (SGI_COMPAT (output_bfd) || htab->is_vxworks))
info->flags |= DF_TEXTREL;