Bug 20691 - weak symbol not merged
Summary: weak symbol not merged
Status: RESOLVED INVALID
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.27
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-16 10:13 UTC by m.othacehe@gmail.com
Modified: 2016-10-18 11:36 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
weak bug (2.44 KB, application/x-tar)
2016-10-16 10:13 UTC, m.othacehe@gmail.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description m.othacehe@gmail.com 2016-10-16 10:13:16 UTC
Created attachment 9561 [details]
weak bug

Within the following test case, the weak symbol "__test" cannot be found in resulting binary.

With ld version 2.26; the weak symbol is present in resulting binary.
Comment 1 Nick Clifton 2016-10-18 11:36:17 UTC
Hi Othacehe,

  This is not a bug, it is an optimization.  Since you are not creating a 
  dynamic executable there is no way that the weak __test symbol can be 
  resolved at run-time.  So there is no need to keep it in the executable's
  symbol table.

Cheers
  Nick