summaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-09-03 18:34:02 +0000
committerIan Lance Taylor <ian@airs.com>1999-09-03 18:34:02 +0000
commitc4985b85f71107dd2ba09b9d5d6414e0b3dbb2e9 (patch)
tree7d8413aa48654ddc499c838b09c682ffa57d018b /bfd
parent91193a27bfb0d3c595c9bb1c181d65d9a748ce4e (diff)
downloadgdb-c4985b85f71107dd2ba09b9d5d6414e0b3dbb2e9.tar.gz
* elflink.h (elf_bfd_final_link): When counting relocations, don't
count those in sections we are not including in the link.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elflink.h13
2 files changed, 16 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index f45eafc8f77..412262f91ab 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+1999-09-03 Ian Lance Taylor <ian@zembu.com>
+
+ * elflink.h (elf_bfd_final_link): When counting relocations, don't
+ count those in sections we are not including in the link.
+
Thu Sep 2 17:41:20 1999 Jeffrey A Law (law@cygnus.com)
* elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
diff --git a/bfd/elflink.h b/bfd/elflink.h
index b7b5b23998f..e60beae8a7c 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -4053,9 +4053,18 @@ elf_bfd_final_link (abfd, info)
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
for (o = sub->sections; o != NULL; o = o->next)
{
- asection* output_section = o->output_section;
+ asection *output_section;
- if (output_section && (o->flags & SEC_RELOC) != 0)
+ if (! o->linker_mark)
+ {
+ /* This section was omitted from the link. */
+ continue;
+ }
+
+ output_section = o->output_section;
+
+ if (output_section != NULL
+ && (o->flags & SEC_RELOC) != 0)
{
struct bfd_elf_section_data *esdi
= elf_section_data (o);