This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BFD][PR21703]Override the new defined symbol with the old normal symbol when --allow-multiple-definition is provided


On Wed, Oct 25, 2017 at 09:24:21PM +0100, Renlin Li wrote:
> Hi,
> 
> This patch fixes the test cases failures on target which don't support share library.
> Additional, targets which use _bfd_generic_link_add_symbols instead of
> bfd_elf_link_add_symbols are expected to fail on those tests.
> 
> all the failed targets mentioned by Alan have been checked. All fixed.
> However, all the checks are done on cross-target environment as I don't
> native environment except arm, aarch64 and x86.
> 
> Is it Okay to commit?

No, there isn't any reason why the ld -r test shouldn't run on targets
without shared lib support.  If I take a look at the first target in
my list that failed the ld -r test, avr-elf, I see the readelf -s
output is

Symbol table '.symtab' contains 17 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 00000000     0 SECTION LOCAL  DEFAULT    1 
     2: 00000000     0 SECTION LOCAL  DEFAULT    2 
     3: 00000000     0 SECTION LOCAL  DEFAULT    3 
     4: 0000ffa0     0 NOTYPE  GLOBAL DEFAULT  ABS __DATA_REGION_LENGTH__
     5: 00000000     4 FUNC    GLOBAL DEFAULT    1 foo@FOO
     6: 00000400     0 NOTYPE  GLOBAL DEFAULT  ABS __LOCK_REGION_LENGTH__
     7: 00000004    32 FUNC    GLOBAL DEFAULT    1 foo1
     8: 00000400     0 NOTYPE  GLOBAL DEFAULT  ABS __SIGNATURE_REGION_LENGTH
     9: 00000004    32 FUNC    GLOBAL DEFAULT    1 foo@@FOO1
    10: 00000034     8 FUNC    GLOBAL DEFAULT    1 bar1
    11: 00000400     0 NOTYPE  GLOBAL DEFAULT  ABS __USER_SIGNATURE_REGION_L
    12: 00000000     4 FUNC    GLOBAL DEFAULT    1 foo
    13: 00010000     0 NOTYPE  GLOBAL DEFAULT  ABS __EEPROM_REGION_LENGTH__
    14: 00000024    16 FUNC    GLOBAL DEFAULT    1 bar
    15: 00000400     0 NOTYPE  GLOBAL DEFAULT  ABS __FUSE_REGION_LENGTH__
    16: 00002000     0 NOTYPE  GLOBAL DEFAULT  ABS __TEXT_REGION_LENGTH__

The foo and bar symbols are actually the right size, but we have extra
symbols.  pr21703-r.sd ought to be modified to make this pass, by
inserting "#..." lines between the symbols you need to check.

-- 
Alan Modra
Australia Development Lab, IBM


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]