aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-08-07 05:23:09 +0000
committerAlan Modra <amodra@gmail.com>2002-08-07 05:23:09 +0000
commita4aa0fb7d08aca921a8a977cc61a116883201dcc (patch)
treeba49fd098ff2501e973944d5687c68ebe9055576 /bfd/elf64-ppc.c
parent34ea4a364d8c8bdd9ad7c0a49077d54de32f2272 (diff)
downloadgdb-a4aa0fb7d08aca921a8a977cc61a116883201dcc.zip
gdb-a4aa0fb7d08aca921a8a977cc61a116883201dcc.tar.gz
gdb-a4aa0fb7d08aca921a8a977cc61a116883201dcc.tar.bz2
* elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
entries.
Diffstat (limited to 'bfd/elf64-ppc.c')
-rw-r--r--bfd/elf64-ppc.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 86161fc..616fbd4 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3753,7 +3753,23 @@ edit_opd (obfd, info)
}
skip = sym_sec->output_section == bfd_abs_section_ptr;
- if (!skip)
+ if (skip)
+ {
+ if (h != NULL)
+ {
+ /* Arrange for the function descriptor sym
+ to be dropped. */
+ struct elf_link_hash_entry *fdh;
+ struct ppc_link_hash_entry *fh;
+
+ fh = (struct ppc_link_hash_entry *) h;
+ BFD_ASSERT (fh->is_func);
+ fdh = fh->oh;
+ fdh->root.u.def.value = 0;
+ fdh->root.u.def.section = sym_sec;
+ }
+ }
+ else
{
/* We'll be keeping this opd entry. */