This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Reset output section size when assigning offsets.
ClosedPublic

Authored by grimar on Feb 28 2017, 8:23 AM.

Details

Summary

In many places we reset Size to 0 before calling assignOffsets()
manually. Sometimes we don't do that.
It looks we can just always do that inside.

Previous code had:

template <class ELFT> void OutputSection::assignOffsets() {
  uint64_t Off = Size;

And tests feels fine with Off = 0. I think Off = Size make no sence.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Feb 28 2017, 8:23 AM
ruiu accepted this revision.Feb 28 2017, 10:23 AM

LGTM. Nice.

This revision is now accepted and ready to land.Feb 28 2017, 10:23 AM
This revision was automatically updated to reflect the committed changes.