diff --git a/examples/acipher-rs/ta/Makefile b/examples/acipher-rs/ta/Makefile index a6de23e6..1c0cb527 100644 --- a/examples/acipher-rs/ta/Makefile +++ b/examples/acipher-rs/ta/Makefile @@ -20,7 +20,7 @@ UUID ?= $(shell cat "../uuid.txt") TARGET ?= aarch64-unknown-linux-gnu CROSS_COMPILE ?= aarch64-linux-gnu- OBJCOPY := $(CROSS_COMPILE)objcopy -LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld.bfd\" +LINKER_CFG := target.$(TARGET).linker=\"$(CROSS_COMPILE)ld\" TA_SIGN_KEY ?= $(TA_DEV_KIT_DIR)/keys/default_ta.pem SIGN := $(TA_DEV_KIT_DIR)/scripts/sign_encrypt.py @@ -29,6 +29,7 @@ OUT_DIR := $(CURDIR)/target/$(TARGET)/release all: ta strip sign ta: + @echo ${LINKER_CFG} @cargo build --target $(TARGET) --release --config $(LINKER_CFG) strip: ta diff --git a/examples/acipher-rs/ta/build.rs b/examples/acipher-rs/ta/build.rs index 5618f03c..68003b55 100644 --- a/examples/acipher-rs/ta/build.rs +++ b/examples/acipher-rs/ta/build.rs @@ -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(()) }