This is an archive of the discontinued LLVM Phabricator instance.

[JITLink][ELF] Don't skip sections of size 0
ClosedPublic

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

Details

Summary

Size 0 sections can have symbols that have size 0. Build those sections
and symbols into the LinkGraph so they can be used properly if needed.

Diff Detail

Event Timeline

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

LGTM.

llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h
302–303

I wish I could remember what "undefined" sections referred to here -- we'll no longer be skipping them.

This is still the right way to go though -- we can put the proper check in if/when we hit issues with this.

308

Is this needed?

This revision is now accepted and ready to land.Nov 29 2021, 7:29 PM
steven_wu added inline comments.Nov 30 2021, 9:11 AM
llvm/lib/ExecutionEngine/JITLink/ELFLinkGraphBuilder.h
308

Some of those are rebase errors. Let me clean it up.

steven_wu updated this revision to Diff 390737.Nov 30 2021, 9:14 AM

Address review feedback

This revision was landed with ongoing or failed builds.Nov 30 2021, 9:19 AM
This revision was automatically updated to reflect the committed changes.