This is an archive of the discontinued LLVM Phabricator instance.

[ELF] - Do not list sections explicitly for finalizeSynthetic()
AbandonedPublic

Authored by grimar on Mar 1 2017, 4:02 AM.

Details

Reviewers
ruiu
rafael
Summary

That allows to add new synthetic sections and not worry
about updating one more list for finalization.

Diff Detail

Event Timeline

grimar created this revision.Mar 1 2017, 4:02 AM
ruiu added inline comments.Mar 1 2017, 10:58 AM
ELF/Writer.cpp
1023–1043

This function probably should go away. You shouldn't call assignOffsets every time you finalize one synthetic section.

1030–1033

This comment doesn't seem to make much sense. You want to mention that dynamic symbols depends on other section contents so they need to be finalized later.

1035–1038

Remove this lambda and inline.

1172

finalizeSyntheticSections.

grimar updated this revision to Diff 90320.Mar 2 2017, 5:15 AM
  • Addressed review comments.
ELF/Writer.cpp
1023–1043

I think so. That is for another patch, this one did not change original logic here.

1030–1033

Fixed.

1035–1038

Done.

1172

Done.

ruiu added inline comments.Mar 2 2017, 9:15 AM
ELF/Writer.cpp
1023–1043

Can you do that in this patch too?

grimar added inline comments.Mar 2 2017, 9:41 AM
ELF/Writer.cpp
1023–1043

This patch is not about changing how we assign offsets, so I do not think that make sence in context of it.
I'll prepare different separate patch for that then and update this when it be landed.

ruiu edited edge metadata.Mar 2 2017, 9:51 AM

Please do that in this patch. If some change makes other part of code look too funny, this should be addressed at the same time.

grimar abandoned this revision.Mar 30 2017, 1:30 AM