Skip to content

Commit

Permalink
hack to 'fix' Issue apache#135 for acipher-rs TA
Browse files Browse the repository at this point in the history
  • Loading branch information
msgilligan committed May 29, 2024
1 parent 1a25772 commit 732244f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/acipher-rs/ta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release
all: ta strip sign

ta:
@cargo build --target $(TARGET) --release --config $(LINKER_CFG)
@cargo build --target $(TARGET) --release #--config $(LINKER_CFG)

strip: ta
@$(OBJCOPY) --strip-unneeded $(OUT_DIR)/ta $(OUT_DIR)/stripped_ta
Expand Down
5 changes: 3 additions & 2 deletions examples/acipher-rs/ta/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,11 @@ fn main() -> std::io::Result<()> {
println!("cargo:rustc-link-arg=-e__ta_entry");
println!("cargo:rustc-link-arg=-pie");
println!("cargo:rustc-link-arg=-Os");
println!("cargo:rustc-link-arg=--sort-section=alignment");
//println!("cargo:rustc-link-arg=--sort-section=alignment");


let mut dyn_list = File::create(out.join("dyn_list"))?;
write!(dyn_list, "{{ __elf_phdr_info; trace_ext_prefix; trace_level; ta_head; }};\n")?;
println!("cargo:rustc-link-arg=--dynamic-list=dyn_list");
//println!("cargo:rustc-link-arg=--dynamic-list=dyn_list");
Ok(())
}

0 comments on commit 732244f

Please sign in to comment.