This is an archive of the discontinued LLVM Phabricator instance.

Propagate sh_entsize out
ClosedPublic

Authored by rafael on Nov 14 2017, 9:05 PM.

Details

Reviewers
grimar
ruiu
Summary

No difference in practice other than having sh_entsize in the output.

This should simplify the patch for handling SHF_MERGE in -r.

Diff Detail

Event Timeline

rafael created this revision.Nov 14 2017, 9:05 PM
ruiu accepted this revision.Nov 14 2017, 9:41 PM

LGTM

ELF/SyntheticSections.cpp
2517

Can you reword this comment a bit? I mean, at first I thought this comment explained that the code have ignored Entsize which isn't true.

This revision is now accepted and ready to land.Nov 14 2017, 9:41 PM
grimar accepted this revision.Nov 15 2017, 12:40 AM

LGTM.

ELF/SyntheticSections.cpp
2521

In theory I believe there could be equal pieces when we merge string sections with different Entsize.
But that is probably too synthetic and unexpected case to care about.

2531

That is probably fine for this patch, but I find confusing that we emit SHF_MERGE flag and wrong EntSize to
regular output. Currently we select max entrysize when adding input sections to output section.
That does not make much sence I believe.

We probably might want to drop entry size and flag when doing non-relocatable link in followups.

espindola closed this revision.Mar 14 2018, 3:27 PM
espindola added a subscriber: espindola.

318306.