aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
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
commit814fe68ac5adac322a678f381cd6e5987ff4a6c8 (patch)
treec7f340c5491ea56bb3f7cae6721affc9ea74d5ea /bfd/elflink.h
parent97578bb047ea6fc59ef2306ddce2cbe1221a2587 (diff)
downloadfsf-binutils-gdb-814fe68ac5adac322a678f381cd6e5987ff4a6c8.zip
fsf-binutils-gdb-814fe68ac5adac322a678f381cd6e5987ff4a6c8.tar.gz
fsf-binutils-gdb-814fe68ac5adac322a678f381cd6e5987ff4a6c8.tar.bz2
* 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/elflink.h')
-rw-r--r--bfd/elflink.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index b7b5b23..e60beae 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);