[ELF] - Detemplate BuildIdSection section.
ClosedPublic

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

Details

Summary

Does not introduce anything new,
just performs detemplate, using methods we
already have.

Diff Detail

Repository
rL LLVM
grimar created this revision.Tue, Mar 14, 6:31 AM
ruiu added a comment.Tue, Mar 14, 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.EditedWed, Mar 15, 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.Wed, Mar 15, 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.Mon, Mar 20, 3:41 AM
  • Rebase.
grimar edited the summary of this revision. (Show Details)Mon, Mar 20, 3:42 AM
ruiu accepted this revision.Mon, Mar 20, 8:10 AM

LGTM

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