This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Detemplate BuildIdSection section.
ClosedPublic

Authored by grimar on Mar 14 2017, 6:31 AM.

Details

Diff Detail

Event Timeline

grimar created this revision.Mar 14 2017, 6:31 AM
ruiu edited edge metadata.Mar 14 2017, 10:25 AM

We are using ELFT::TargetEndianness everywhere, and this patch will change that. Doesn't this just add a different way of doing a thing that we are currently able to do? If you are going to use this in more places, please do that in this patch to demonstrate that.

grimar updated this revision to Diff 91851.EditedMar 15 2017, 3:26 AM
grimar retitled this revision from [ELF] - Detemplate LinkerScript<ELFT>::writeDataBytes to [ELF] - Detemplate BuildIdSection section..
grimar edited the summary of this revision. (Show Details)
  • Changed patch to show that Config->getEndian() helps to detemplate BuildIdSection. In the same way it can be used for detemplating other places.

Also using getEndian for detemplating GdbIndexSection (D30976).

ruiu added a comment.Mar 15 2017, 9:35 AM

I'm not still convinced that this is heading to the right direction. You removed a few templates in https://reviews.llvm.org/D30976, but some of them don't actually depend on this change, so they don't demonstrate how useful this change is. Can you refactor D30976 so that the patch doesn't contain unrelated de-template changes?

grimar updated this revision to Diff 92310.Mar 20 2017, 3:41 AM
  • Rebase.
grimar edited the summary of this revision. (Show Details)Mar 20 2017, 3:42 AM
ruiu accepted this revision.Mar 20 2017, 8:10 AM

LGTM

This revision is now accepted and ready to land.Mar 20 2017, 8:10 AM
This revision was automatically updated to reflect the committed changes.