Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

td-shim: add a feature to support optional payload relocation #424

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gaojiaqi7
Copy link
Member

@gaojiaqi7 gaojiaqi7 commented Oct 11, 2022

Fix #420

Signed-off-by: Jiaqi Gao jiaqi.gao@intel.com

Signed-off-by: Jiaqi Gao <jiaqi.gao@intel.com>
@gaojiaqi7 gaojiaqi7 marked this pull request as draft October 18, 2022 01:32
@jyao1
Copy link
Member

jyao1 commented Oct 19, 2022

please describe what test has been done.

let image_base = coff_optional_region.pread::<u64>(0).ok()?;
let sections = Sections::parse(sections_buffer, num_sections as usize)?;
for section in sections {
if &section.name == b".reloc\0\0" && image_base != new_image_base as u64 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it is already relocated, why image_base != new_image_base?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can TD-Shim skip relocations for the ELF payload?
2 participants