Skip to content

Commit

Permalink
ta.ld.S: make .plt section of user TAs executable
Browse files Browse the repository at this point in the history
This patch is preparatory work for the support of dynamically linked
user mode TAs.

The Procedure Linkage Table (.plt) section should be executable,
because it contains special code used to redirect function calls to
the proper destination in external (shared) libraries. Therefore, move
it into the executable segment.

A couple of blank lines are removed in the hope that it will make it
easier to see which sections are grouped together in the same segment.

Signed-off-by: Jerome Forissier <[email protected]>
Reviewed-by: Jens Wiklander <[email protected]>
Acked-by: Joakim Bech <[email protected]>
  • Loading branch information
jforissier committed May 4, 2018
1 parent f8896d1 commit bc8fc88
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions ta/arch/arm/ta.ld.S
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ PHDRS {

SECTIONS {
.ta_head : {*(.ta_head)} :exec

.text : {
__text_start = .;
*(.text .text.*)
Expand All @@ -43,19 +42,18 @@ SECTIONS {
PROVIDE(MCOUNT_SYM = __utee_mcount);
__text_end = .;
}
.plt : { *(.plt) }

.eh_frame : { *(.eh_frame) } :rodata
.rodata : {
*(.gnu.linkonce.r.*)
*(.rodata .rodata.*)
}
/* .ARM.exidx is sorted, so has to go in its own output section. */
.ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) }

.ctors : { *(.ctors) }
.dtors : { *(.dtors) }
.plt : { *(.plt) }
.got : { *(.got.plt) *(.got) }

.rel.text : { *(.rel.text) *(.rel.gnu.linkonce.t*) }
.rela.text : { *(.rela.text) *(.rela.gnu.linkonce.t*) }
.rel.data : { *(.rel.data) *(.rel.gnu.linkonce.d*) }
Expand All @@ -77,7 +75,6 @@ SECTIONS {
.rela.bss : { *(.rela.bss) }
.rel.plt : { *(.rel.plt) }
.rela.plt : { *(.rela.plt) }

.dynamic : { *(.dynamic) } :dyn :rodata
.dynsym : { *(.dynsym) } :rodata
.dynstr : { *(.dynstr) }
Expand All @@ -87,7 +84,6 @@ SECTIONS {
. = ALIGN(4096);

.data : { *(.data .data.* .gnu.linkonce.d.*) } :rwdata

.bss : {
*(.bss .bss.* .gnu.linkonce.b.* COMMON)

Expand Down

0 comments on commit bc8fc88

Please sign in to comment.