Skip to content

Commit

Permalink
ta: relax location of ta_head
Browse files Browse the repository at this point in the history
TAs where required to have the ta_head as at the load address of the TA
prior to this patch. This makes the linker script slightly more
complicated and also confuses GDB so that an offset must be applied to
the load address of the TA when using GDB for debugging. So allow that
ta_head symbol to reside anywhere in the ELF binary and also add ta_head
to the .dynsym section to make sure that tools and ldelf can find the
symbol.

This change requires prior updates to tools and ldelf.

Reviewed-by: Jerome Forissier <[email protected]>
Signed-off-by: Jens Wiklander <[email protected]>
  • Loading branch information
jenswi-linaro authored and jforissier committed Oct 13, 2023
1 parent 6cfa381 commit 4bdddf2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 0 additions & 1 deletion ta/arch/arm/ta.ld.S
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ OUTPUT_ARCH(aarch64)
#endif

SECTIONS {
.ta_head : {*(.ta_head)}
.text : {
__text_start = .;
*(.text .text.*)
Expand Down
1 change: 1 addition & 0 deletions ta/link.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ ifeq ($(CFG_FTRACE_SUPPORT),y)
endif
$(q)echo "trace_ext_prefix;" >>[email protected]
$(q)echo "trace_level;" >>[email protected]
$(q)echo "ta_head;" >>[email protected]
$(q)echo "};" >>[email protected]
$(q)$(call mv-if-changed,[email protected],$@)
link-ldflags += --dynamic-list $(link-out-dir$(sm))/dyn_list
Expand Down

0 comments on commit 4bdddf2

Please sign in to comment.