This is an archive of the discontinued LLVM Phabricator instance.

Provide option to set pc of the file loaded in memory.
ClosedPublic

Authored by abidh on Jan 20 2017, 4:28 AM.

Details

Summary

This commit adds an option to set PC to the entry point of the file loaded using "target module load" command. In D28804, Greg asked me to separate this part under a different option.

Diff Detail

Event Timeline

abidh created this revision.Jan 20 2017, 4:28 AM
clayborg requested changes to this revision.Jan 20 2017, 10:04 AM

Just set an error when "set_pc" is true and you get no entry point back from thee object file and this is good to go.

source/Symbol/ObjectFile.cpp
687–688

Set an error if there is no valid entry point address. This would happen if someone tries to run load on a shared library.

This revision now requires changes to proceed.Jan 20 2017, 10:04 AM
abidh updated this revision to Diff 85278.Jan 22 2017, 9:44 AM
abidh edited edge metadata.

Added a check for case when entry address is not valid.

abidh marked an inline comment as done.Jan 22 2017, 9:44 AM
clayborg accepted this revision.Jan 23 2017, 8:48 AM

Looks good.

This revision is now accepted and ready to land.Jan 23 2017, 8:48 AM
abidh closed this revision.Jan 24 2017, 3:18 PM