This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Assign proper values for DefinedSynthetic symbols attached to non-allocatable sections.
ClosedPublic

Authored by grimar on Feb 7 2017, 8:26 AM.

Details

Summary

We currently have next issue. In the script from testcase,
non-allocated section is placed before symbol asignment.

Therefore .Sym is attached to non allocatable section. And we calculate it
value wrong. We subtract Body->Section->Addr, but non-allocatable sections
should have zero VA in output and therefore result value is wrong,

We have Body->Section->Addr != 0 for them internally because use it for calculation of size.

Patch fixes calculation of such symbols values.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Feb 7 2017, 8:26 AM
grimar updated this revision to Diff 87464.Feb 7 2017, 8:59 AM
grimar edited the summary of this revision. (Show Details)
  • Addressed review comments (changes testcase to avoid depending on orphans).
This revision was automatically updated to reflect the committed changes.