This is an archive of the discontinued LLVM Phabricator instance.

Add an overload of LoadedObjectInfo::getSectionLoadAddress.
Needs ReviewPublic

Authored by erozenfeld on Jul 23 2015, 1:17 PM.

Details

Reviewers
lhames
Summary

This overload can be used to support cases when there are multiple sections with the same name.
In that case searching by section name doesn't work.

Diff Detail

Event Timeline

erozenfeld updated this revision to Diff 30518.Jul 23 2015, 1:17 PM
erozenfeld retitled this revision from to Add an overload of LoadedObjectInfo::getSectionLoadAddress. .
erozenfeld updated this object.
erozenfeld added a reviewer: lhames.
erozenfeld added a subscriber: llvm-commits.
lhames edited edge metadata.Jul 23 2015, 1:35 PM

Hi Eugene,

Thanks for re-submitting this via Phab.

The direction is good, but this highlights a deficiency in the current code that will require a bit more work to fix: The LocalSections map should really be attached to the LoadedObjectInfo instance, rather than the RuntimeDyldImpl class, as SectionRefs are not globally unique. (Clashes will be rare in practice, but probably very confusing when they crop up).

I'm working on a fix for this right now - I hope to have something for you today or tomorrow.

Cheers,
Lang.