summaryrefslogtreecommitdiff
path: root/bfd/elf32-cris.c
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2002-08-15 05:20:54 +0000
committerHans-Peter Nilsson <hp@axis.com>2002-08-15 05:20:54 +0000
commitda99becf78cc895ae58e27dc732588341ccd38b9 (patch)
tree492eae32d56fe265f4525bf8e0161b3baa1f7a9e /bfd/elf32-cris.c
parent5ceb95e1b733b7e371e05f41c96e2fd73a9666d7 (diff)
downloadgdb-da99becf78cc895ae58e27dc732588341ccd38b9.tar.gz
* elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
missing check for whether the symbol is referenced by DSO before unexporting it as an unneeded dynamic symbol.
Diffstat (limited to 'bfd/elf32-cris.c')
-rw-r--r--bfd/elf32-cris.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c
index afe74bd71b6..8eff52dd5ad 100644
--- a/bfd/elf32-cris.c
+++ b/bfd/elf32-cris.c
@@ -2917,7 +2917,8 @@ elf_cris_discard_excess_program_dynamics (h, inf)
functions; doing this for all symbols would presumably not
introduce new problems. Of course we don't do this if we're
exporting all dynamic symbols. */
- if (! info->export_dynamic)
+ if (! info->export_dynamic
+ && (h->root.elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0)
{
h->root.dynindx = -1;
_bfd_elf_strtab_delref (elf_hash_table (info)->dynstr,