aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-10-31 15:32:09 +0000
committerAlan Modra <amodra@gmail.com>2001-10-31 15:32:09 +0000
commit4e12ff7fc26ce362d9dab3ff402843b555cf1593 (patch)
treed56e5608834bc60b37b61ed64f14daf4013c24c2
parent4578e0a7264676834da6af67f45d622e0d5b8b6d (diff)
downloadgdb-4e12ff7fc26ce362d9dab3ff402843b555cf1593.zip
gdb-4e12ff7fc26ce362d9dab3ff402843b555cf1593.tar.gz
gdb-4e12ff7fc26ce362d9dab3ff402843b555cf1593.tar.bz2
Revert previous delta, instead do this.
* elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count .plt relocs in DT_RELASZ.
-rw-r--r--bfd/ChangeLog4
-rw-r--r--bfd/elf32-hppa.c19
2 files changed, 19 insertions, 4 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 441db5f..364305d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,7 +1,7 @@
2001-11-01 Alan Modra <amodra@bigpond.net.au>
- * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Set DT_RELASZ
- whenever DT_PLTRELSZ.
+ * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
+ .plt relocs in DT_RELASZ.
2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c
index 7d65a14..61c3e6f 100644
--- a/bfd/elf32-hppa.c
+++ b/bfd/elf32-hppa.c
@@ -2368,8 +2368,10 @@ elf32_hppa_size_dynamic_sections (output_bfd, info)
{
if (s->_raw_size != 0)
{
- /* Remember whether there are any reloc sections. */
- relocs = true;
+ /* Remember whether there are any reloc sections other
+ than .rela.plt. */
+ if (s != htab->srelplt)
+ relocs = true;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
@@ -4274,6 +4276,19 @@ elf32_hppa_finish_dynamic_sections (output_bfd, info)
else
dyn.d_un.d_val = s->_raw_size;
break;
+
+ case DT_RELASZ:
+ /* Don't count procedure linkage table relocs in the
+ overall reloc count. */
+ if (htab->srelplt != NULL)
+ {
+ s = htab->srelplt->output_section;
+ if (s->_cooked_size != 0)
+ dyn.d_un.d_val -= s->_cooked_size;
+ else
+ dyn.d_un.d_val -= s->_raw_size;
+ }
+ break;
}
bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon);