A patch to only warn undefined symbol in DSO to be built
Alan Modra
alan@linuxcare.com.au
Wed Feb 7 00:04:00 GMT 2001
On Tue, 6 Feb 2001, H . J . Lu wrote:
> Here is a patch.
I have a competing one that I was busy checking when your email arrived.
:-)
Index: elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.78
diff -u -p -r1.78 elflink.h
--- elflink.h 2001/01/23 11:45:53 1.78
+++ elflink.h 2001/02/07 07:58:30
@@ -5092,9 +5092,10 @@ elf_link_output_extsym (h, data)
warnings for them. */
if (! finfo->info->relocateable
&& ! finfo->info->allow_shlib_undefined
- && ! (finfo->info->shared
- && !finfo->info->no_undefined)
&& h->root.type == bfd_link_hash_undefined
+ && (! finfo->info->shared
+ || ! finfo->info->no_undefined
+ || (h->root.u.undef.abfd->flags & DYNAMIC) == 0)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
{
It does the same thing in a slightly different way, but also checks for
bfd_link_hash_undefined before accessing h_.root.u.undef
Alan
More information about the Binutils
mailing list