|
@@ -2,17 +2,6 @@ OUTPUT_FORMAT("elf64-x86-64", "elf64-x86-64", "elf64-x86-64")
|
|
|
OUTPUT_ARCH(i386:x86-64)
|
|
|
ENTRY(enclave_entry)
|
|
|
|
|
|
-PHDRS
|
|
|
-{
|
|
|
- headers PT_PHDR PHDRS;
|
|
|
- text PT_LOAD FILEHDR PHDRS;
|
|
|
- data PT_LOAD;
|
|
|
- dynamic PT_DYNAMIC;
|
|
|
- tls PT_TLS;
|
|
|
- gnu_stack PT_GNU_STACK;
|
|
|
- gnu_relro 0x6474e552;
|
|
|
-}
|
|
|
-
|
|
|
SECTIONS
|
|
|
{
|
|
|
/* Read-only sections, merged into text segment; */
|
|
@@ -20,31 +9,31 @@ SECTIONS
|
|
|
__text_start = .;
|
|
|
. = SEGMENT_START("text-segment", 0) + SIZEOF_HEADERS;
|
|
|
text_start = .;
|
|
|
- .note.gnu.build-id : { *(.note.gnu.build-id) } :text
|
|
|
- .gnu.hash : { *(.gnu.hash) } :text
|
|
|
- .dynsym : { *(.dynsym) } :text
|
|
|
- .dynstr : { *(.dynstr) } :text
|
|
|
- .gnu.version : { *(.gnu.version) } :text
|
|
|
- .gnu.version_d : { *(.gnu.version_d) } :text
|
|
|
- .rela.dyn : { *(.rela.dyn) } :text
|
|
|
- .rela.plt : { *(.rela.plt) } :text
|
|
|
- .init : { *(.init) } :text
|
|
|
- .plt : { *(.plt) *(.iplt) } :text
|
|
|
+ .note.gnu.build-id : { *(.note.gnu.build-id) }
|
|
|
+ .gnu.hash : { *(.gnu.hash) }
|
|
|
+ .dynsym : { *(.dynsym) }
|
|
|
+ .dynstr : { *(.dynstr) }
|
|
|
+ .gnu.version : { *(.gnu.version) }
|
|
|
+ .gnu.version_d : { *(.gnu.version_d) }
|
|
|
+ .rela.dyn : { *(.rela.dyn) }
|
|
|
+ .rela.plt : { *(.rela.plt) }
|
|
|
+ .init : { *(.init) }
|
|
|
+ .plt : { *(.plt) *(.iplt) }
|
|
|
.text :
|
|
|
{
|
|
|
section_text = .;
|
|
|
/* the rest of text segments */
|
|
|
*(.text .stub .text.*);
|
|
|
- } :text
|
|
|
- .fini : { *(.fini) } :text
|
|
|
- .eh_frame_hdr : { *(.eh_frame_hdr) } :text
|
|
|
- .eh_frame : ONLY_IF_RO { KEEP(*(.eh_frame)) } :text
|
|
|
+ }
|
|
|
+ .fini : { *(.fini) }
|
|
|
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
|
|
|
+ .eh_frame : ONLY_IF_RO { KEEP(*(.eh_frame)) }
|
|
|
.rodata :
|
|
|
{
|
|
|
section_rodata = .;
|
|
|
/* the rest of rodata */
|
|
|
*(.rodata .rodata.*)
|
|
|
- } :text
|
|
|
+ }
|
|
|
__text_end = .;
|
|
|
|
|
|
/* now adjust the address for the data segment */
|
|
@@ -59,29 +48,28 @@ SECTIONS
|
|
|
{
|
|
|
section_dynamic = .;
|
|
|
*(.dynamic)
|
|
|
- } :data :dynamic
|
|
|
-
|
|
|
+ }
|
|
|
|
|
|
data_start = .;
|
|
|
- .data.rel.ro : { KEEP(*(.data.rel.ro)) } :data
|
|
|
- .ctors : { KEEP(*(.ctors)) } :data
|
|
|
- .dtors : { KEEP(*(.dtors)) } :data
|
|
|
- .jcr : { KEEP(*(.jcr)) } :data
|
|
|
- .got : { *(.got) *(.igot) } :data
|
|
|
- .got.plt : { *(.got.plt) *(.igot.plt) } :data
|
|
|
+ .data.rel.ro : { KEEP(*(.data.rel.ro)) }
|
|
|
+ .ctors : { KEEP(*(.ctors)) }
|
|
|
+ .dtors : { KEEP(*(.dtors)) }
|
|
|
+ .jcr : { KEEP(*(.jcr)) }
|
|
|
+ .got : { *(.got) *(.igot) }
|
|
|
+ .got.plt : { *(.got.plt) *(.igot.plt) }
|
|
|
. = DATA_SEGMENT_RELRO_END (0, .);
|
|
|
.data :
|
|
|
{
|
|
|
section_data = .;
|
|
|
/* the rest of data segment */
|
|
|
*(.data .data.*);
|
|
|
- } :data
|
|
|
+ }
|
|
|
.bss :
|
|
|
{
|
|
|
section_bss = .;
|
|
|
*(.bss)
|
|
|
*(COMMON)
|
|
|
- } :data
|
|
|
+ }
|
|
|
__data_end = .;
|
|
|
|
|
|
. = DATA_SEGMENT_END(.);
|