diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-12-23 11:53:59 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-12-23 11:53:59 +0000 |
commit | cef697726eae0234fc786d9e786605f2f8b28530 (patch) | |
tree | 564bd78eeab1c15973e92d55aa4d91d5aebd5102 /bfd | |
parent | a2b68fbd04c6e1d57575b43dee2fa96f4e2bf746 (diff) | |
download | gdb-cef697726eae0234fc786d9e786605f2f8b28530.tar.gz |
* elflink.h (elf_link_output_extsym): Heed strip_discarded.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elflink.h | 15 |
2 files changed, 14 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 106eb2cd9a3..df7a736b37b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2002-12-23 Alan Modra <amodra@bigpond.net.au> + + * elflink.h (elf_link_output_extsym): Heed strip_discarded. + 2002-12-23 Nick Clifton <nickc@redhat.com> * archures.c (bfd_arch_get_compatible): Add third parameter diff --git a/bfd/elflink.h b/bfd/elflink.h index ac3cd111e58..060b129d356 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -6123,11 +6123,16 @@ elf_link_output_extsym (h, data) && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0 && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0) strip = TRUE; - else if (finfo->info->strip == strip_all - || (finfo->info->strip == strip_some - && bfd_hash_lookup (finfo->info->keep_hash, - h->root.root.string, - FALSE, FALSE) == NULL)) + else if (finfo->info->strip == strip_all) + strip = TRUE; + else if (finfo->info->strip == strip_some + && bfd_hash_lookup (finfo->info->keep_hash, + h->root.root.string, FALSE, FALSE) == NULL) + strip = TRUE; + else if (finfo->info->strip_discarded + && (h->root.type == bfd_link_hash_defined + || h->root.type == bfd_link_hash_defweak) + && elf_discarded_section (h->root.u.def.section)) strip = TRUE; else strip = FALSE; |