summaryrefslogtreecommitdiffstats
path: root/memtest_efi_modified.lds
diff options
context:
space:
mode:
Diffstat (limited to 'memtest_efi_modified.lds')
-rw-r--r--memtest_efi_modified.lds57
1 files changed, 52 insertions, 5 deletions
diff --git a/memtest_efi_modified.lds b/memtest_efi_modified.lds
index 179fe93..6f035c8 100644
--- a/memtest_efi_modified.lds
+++ b/memtest_efi_modified.lds
@@ -1,5 +1,6 @@
-OUTPUT_FORMAT("binary")
-OUTPUT_ARCH(i386:x86-64)
+OUTPUT_FORMAT("elf64-x86-64");
+OUTPUT_ARCH(i386:x86-64);
+
ENTRY(boot);
SECTIONS {
@@ -13,14 +14,60 @@ SECTIONS {
. = ALIGN(512);
.text : {
_text_start = . ;
- *(.data)
- . = ALIGN(512);
+ _start = .;
+ *(.text)
+ *(.text.*)
+ *(.plt)
+ _etext = . ;
_text_end = . ;
+ }= 0x9090
+
+ .rodata : {
+ *(.rodata)
+ *(.rodata.*)
}
+ .dynsym : { *(.dynsym) }
+ .dynstr : { *(.dynstr) }
+ .hash : { *(.hash) }
+ .gnu.hash : { *(.gnu.hash) }
+ .dynamic : { *(.dynamic) }
+
+ .rela.text : { *(.rela.text .rela.text.*) }
+ .rela.rodata : { *(.rela.rodata .rela.rodata.*) }
+ .rela.data : { *(.rela.data .rela.data.*) }
+ .rela.got : { *(.rela.got .rela.got.*) }
+ .rela.plt : { *(.rela.plt .rela.plt.*) }
+
+ . = ALIGN(4);
+ .data : {
+ _data = .;
+ *(.data)
+ *(.data.*)
+ }
+ .got : {
+ *(.got.plt)
+ *(.got)
+ _edata = . ;
+ }
+ . = ALIGN(4);
+ .bss : {
+ _bss = .;
+ *(.dynbss)
+ *(.bss)
+ *(.bss.*)
+ *(COMMON)
+ . = ALIGN(16);
+ _stacks = .;
+ *(.stacks)
+ /* _end must be at least 256 byte aligned */
+ . = ALIGN(256);
+ _end = .;
+ }
+
.debug : {
*(.debug*)
}
-
+
_text_size = (_text_end - _text_start);
_sys_size = _text_size >> 4;