This is an archive of the discontinued LLVM Phabricator instance.

[lld] [ELF/Aarch64 v2] Fix correct TCB aligment calculation
ClosedPublic

Authored by zatrazz on May 29 2015, 6:21 AM.

Details

Summary

This is an updated patch and it fixes the TLS local relocations alignment
done by @238258. As pointed out, the TLS size should not be considered,
but rather the TCB size based on maximum output segment alignment.
Although it has not shown in the TLS simple cases for test-suite, more
comprehensible tests with more local TLS variable showed wrong relocations
values being generated.

The local TLS testcase is expanded to add more tls variable (both
exported and static) initialized or not.

Differences from first version:

  • Using C++11 initialization mechanism for _tpOff
  • Only considering TLS segments for TCB alignment
  • Remove some 'auto' usage.

Diff Detail

Event Timeline

zatrazz updated this revision to Diff 26779.May 29 2015, 6:21 AM
zatrazz retitled this revision from to [lld] [ELF/Aarch64 v2] Fix correct TCB aligment calculation.
zatrazz updated this object.
zatrazz edited the test plan for this revision. (Show Details)
zatrazz added reviewers: ruiu, shankar.easwaran.
zatrazz added a project: lld.
zatrazz added subscribers: lld, Unknown Object (MLST).
zatrazz accepted this revision.Jun 16 2015, 10:39 AM
zatrazz added a reviewer: zatrazz.
This revision is now accepted and ready to land.Jun 16 2015, 10:39 AM
zatrazz closed this revision.Jun 16 2015, 10:39 AM