summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRegia König2022-08-23 11:44:36 +0200
committerRegia König2022-08-23 11:44:36 +0200
commit89b074d4171d40a51a1accc65d962e44da980dd8 (patch)
treea3f5bfe33614baa9746887770f256dcbbf3d8c17
parentAdd new script to experiment how to build a memtest.efi with debug symbols (diff)
downloadmemtest86-89b074d4171d40a51a1accc65d962e44da980dd8.tar.gz
memtest86-89b074d4171d40a51a1accc65d962e44da980dd8.tar.xz
memtest86-89b074d4171d40a51a1accc65d962e44da980dd8.zip
Create new linker script for memtest_efi
-rwxr-xr-x[-rw-r--r--]create_debug.sh3
-rw-r--r--memtest_efi_modified.lds29
2 files changed, 32 insertions, 0 deletions
diff --git a/create_debug.sh b/create_debug.sh
index e69de29..19047bc 100644..100755
--- a/create_debug.sh
+++ b/create_debug.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+
+objdump -h memtest_shared
diff --git a/memtest_efi_modified.lds b/memtest_efi_modified.lds
new file mode 100644
index 0000000..90e7f76
--- /dev/null
+++ b/memtest_efi_modified.lds
@@ -0,0 +1,29 @@
+OUTPUT_FORMAT("binary")
+OUTPUT_ARCH(i386:x86-64)
+
+ENTRY(boot);
+SECTIONS {
+ . = 0;
+ .header : {
+ *(.header)
+ }
+ .setup : {
+ *(.setup)
+ }
+ . = ALIGN(512);
+ .text : {
+ _text_start = . ;
+ *(.data)
+ . = ALIGN(512);
+ _text_end = . ;
+ }
+
+ /*
+ /DISCARD/ : { *(*) }
+ */
+
+ _text_size = (_text_end - _text_start);
+
+ _sys_size = _text_size >> 4;
+ _init_size = _text_size + _bss_size;
+}