weakdef list handling
authorAlan Modra <amodra@gmail.com>
Sun, 12 Nov 2017 03:42:41 +0000 (14:12 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 12 Nov 2017 07:15:24 +0000 (17:45 +1030)
commite3e53eed9c2f1ab82ae4a7683f474b4f6eb162c7
tree712e20f801d16dd5ff14e765783a1b6e0469769a
parent529fe20eeb0030ea5d653d0ebec433f9e3145874
weakdef list handling

The existing code allowed common and indirect symbols to pass an
assert, but then read root.u.def which is not valid for anything
besides defined and weakdef symbols.  The garbage root.u.def.section
pointer read can't possibly match pointers stored at the same location
for indirect and common symbols, so we would always have left
u.weakdef NULL.

* elflink.c (elf_link_add_object_symbols): Ignore anything but
defined and defweak symbols when setting up weakdefs.
bfd/ChangeLog
bfd/elflink.c