Missing dynamic init array tags when a linker script explicitly includes the init array sections
| Bugzilla Link | 43461 |
| Resolution | FIXED |
| Resolved on | Sep 27, 2019 02:14 |
| Version | unspecified |
| OS | All |
| Attachments | Test case to reproduce issue |
| CC | @MaskRay,@smithp35 |
Extended Description
The change submitted in r372734, "Make MergeInputSection merging aware of output sections" breaks the attached "dynamic2.s" test. This test is based on "ELF/linkerscript/dynamic.s", except that the linker script explicitly includes the init array sections and is actually used in the link itself.
This issue was noticed as it caused a regression in some local tests.
It looks though the issue is related to the value of "partition" in the OutputSection, the behavior of which has changed as a result of r372734.
No problem and thanks for the quick fix!
Sorry for the trouble. Fixed by D68087/r372996.
I changed the existing linkerscript/dynamic.s instead of adding a new one.
Yes, it is related to SectionBase::partition.
A fix is to assign to sec->partition at LinkerScript.cpp:516.
I'll take a closer look after about 1hr.
assigned to @MaskRay