diff options
author | Alan Modra <amodra@bigpond.net.au> | 2002-01-30 03:47:37 +0000 |
---|---|---|
committer | Alan Modra <amodra@bigpond.net.au> | 2002-01-30 03:47:37 +0000 |
commit | ccd5fd2d5fb180c85aec9f3e44ddeccf4d31cab2 (patch) | |
tree | d7c5d233df00a0a7aded2cbbcbbc7e70c432b296 /bfd | |
parent | ddba4d63e1275f7889006b561560945f3c549efb (diff) | |
download | gdb-ccd5fd2d5fb180c85aec9f3e44ddeccf4d31cab2.tar.gz |
* elf64-ppc.c (func_desc_adjust): Only provide missing function
descriptor symbols for undefined function code syms. Clear
ELF_LINK_NON_ELF so that they can stay weak.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/elf64-ppc.c | 16 |
2 files changed, 12 insertions, 10 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index c9f41213d42..3525801f150 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,9 @@ +2002-01-30 Alan Modra <amodra@bigpond.net.au> + + * elf64-ppc.c (func_desc_adjust): Only provide missing function + descriptor symbols for undefined function code syms. Clear + ELF_LINK_NON_ELF so that they can stay weak. + 2002-01-29 Chris Demetriou <cgd@broadcom.com> Mitch Lichtenberg <mpl@broadcom.com> diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index da339bb512d..70407e2fdaa 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -2500,20 +2500,15 @@ func_desc_adjust (h, inf) fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1, false, false, true); - if (fdh == NULL && info->shared) + if (fdh == NULL + && info->shared + && (h->root.type == bfd_link_hash_undefined + || h->root.type == bfd_link_hash_undefweak)) { bfd *abfd; asymbol *newsym; - /* Create it as undefined. */ - if (h->root.type == bfd_link_hash_undefined - || h->root.type == bfd_link_hash_undefweak) - abfd = h->root.u.undef.abfd; - else if (h->root.type == bfd_link_hash_defined - || h->root.type == bfd_link_hash_defweak) - abfd = h->root.u.def.section->owner; - else - abort (); + abfd = h->root.u.undef.abfd; newsym = bfd_make_empty_symbol (abfd); newsym->name = h->root.root.string + 1; newsym->section = bfd_und_section_ptr; @@ -2529,6 +2524,7 @@ func_desc_adjust (h, inf) { return false; } + fdh->elf_link_hash_flags &= ~ELF_LINK_NON_ELF; } if (fdh != NULL |