This is an archive of the discontinued LLVM Phabricator instance.

[JITLink][ELF] Support duplicated section names from object file
ClosedPublic

Authored by steven_wu on Nov 29 2021, 3:36 PM.

Details

Summary

ELF object files can contain duplicated sections (thus section symbols
as well), espeically when comdats/section groups are present. This patch
adds support for generating LinkGraph from object files that have
duplicated section names. This is the first step to properly model
comdats/section groups.

Diff Detail

Event Timeline

steven_wu created this revision.Nov 29 2021, 3:36 PM
steven_wu requested review of this revision.Nov 29 2021, 3:36 PM
Herald added a project: Restricted Project. · View Herald TranscriptNov 29 2021, 3:36 PM

I think you can probably switch from GraphSections to GraphBlocks here, rather than keeping the pair -- you can always get back to the Section from the Block (via getSection()).

steven_wu updated this revision to Diff 390736.Nov 30 2021, 9:10 AM

Address review feedback

steven_wu updated this revision to Diff 390738.Nov 30 2021, 9:16 AM

Fix the rebase issue that mixed up with D114749

@lhames ping

From the LLVM Code-Review Policy and Practices (https://llvm.org/docs/CodeReview.html):

If it is urgent, provide reasons why it is important to you to get this patch landed and ping it every couple of days. If it is not urgent, the common courtesy ping rate is one week. Remember that you’re asking for valuable time from other professional developers.

It's only been 39 hours, so not even short enough for if it were urgent.

lhames accepted this revision.Dec 8 2021, 1:22 AM

LGTM -- Thanks Steven!

This revision is now accepted and ready to land.Dec 8 2021, 1:22 AM
steven_wu updated this revision to Diff 400152.Jan 14 2022, 2:36 PM

Rebase the change to TOT

This revision was landed with ongoing or failed builds.Jan 18 2022, 8:38 AM
This revision was automatically updated to reflect the committed changes.