bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/21703] The first symbol definition is overwritten by second defi


From: renlin.li at arm dot com
Subject: [Bug ld/21703] The first symbol definition is overwritten by second definition when --allow-multiple-definition is provieded
Date: Wed, 05 Jul 2017 08:36:18 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=21703

--- Comment #8 from Renlin Li <renlin.li at arm dot com> ---
(In reply to Alan Modra from comment #7)
> I had a quick look at your example (typo on foo_arm.c command line, you
> don't want -mthumb there!), and while I don't know the arm backend that
> well, I think the problem is due to target_internal being set from the last
> definition seen.

Yes, the target_internal is override by the last definition.

While _bfd_generic_link_add_one_symbol () doesn't update the symbol's
definition section. It's still the old one.

Because _bfd_generic_link_add_one_symbol () decided to not add the new
definition.


        case MDEF:
          /* Handle a multiple definition.  */
          (*info->callbacks->multiple_definition) (info, h,
                                                   abfd, section, value);
          break;

The function simply returns when allow-multiple-definition is true.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]