Skip to content

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

Draft
gaojiaqi7 wants to merge 1 commit intoconfidential-containers:mainfrom
gaojiaqi7:td-loader
Draft

td-shim: add a feature to support optional payload relocation#424
gaojiaqi7 wants to merge 1 commit intoconfidential-containers:mainfrom
gaojiaqi7:td-loader

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