summaryrefslogtreecommitdiffstats
path: root/GNU_efi_HelloWorld
diff options
context:
space:
mode:
authorRegia König2022-08-17 10:49:27 +0200
committerRegia König2022-08-17 10:49:27 +0200
commitbc78d650cfe0b759a48afba17686671ac67c9387 (patch)
tree5268a20f5a4a716a25ae0450fcb0d6635f1ac64d /GNU_efi_HelloWorld
parentEfi file outputs own image base (diff)
downloadmemtest86-bc78d650cfe0b759a48afba17686671ac67c9387.tar.gz
memtest86-bc78d650cfe0b759a48afba17686671ac67c9387.tar.xz
memtest86-bc78d650cfe0b759a48afba17686671ac67c9387.zip
Expand analyzation script
Diffstat (limited to 'GNU_efi_HelloWorld')
-rw-r--r--GNU_efi_HelloWorld/Makefile1
-rwxr-xr-xGNU_efi_HelloWorld/analyse_hello.sh8
-rw-r--r--GNU_efi_HelloWorld/hello.c5
-rwxr-xr-xGNU_efi_HelloWorld/hello.efibin46888 -> 46888 bytes
-rw-r--r--GNU_efi_HelloWorld/hello.obin2112 -> 2112 bytes
-rwxr-xr-xGNU_efi_HelloWorld/hello.sobin2171456 -> 2171456 bytes
6 files changed, 5 insertions, 9 deletions
diff --git a/GNU_efi_HelloWorld/Makefile b/GNU_efi_HelloWorld/Makefile
index 31195ee..448e3f7 100644
--- a/GNU_efi_HelloWorld/Makefile
+++ b/GNU_efi_HelloWorld/Makefile
@@ -20,6 +20,7 @@ LDFLAGS = -nostdlib -znocombreloc -T $(EFI_LDS) -shared \
-Bsymbolic -L $(EFILIB) $(EFI_CRT_OBJS)
all: $(TARGET)
+ cp hello.efi ../test_code/hda-contents/
hello.so: $(OBJS)
ld $(LDFLAGS) $(OBJS) -o $@ -lefi -lgnuefi
diff --git a/GNU_efi_HelloWorld/analyse_hello.sh b/GNU_efi_HelloWorld/analyse_hello.sh
deleted file mode 100755
index c8b3103..0000000
--- a/GNU_efi_HelloWorld/analyse_hello.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-
-echo "objdump -h hello.efi"
-objdump -h hello.efi
-
-echo "########################################################################"
-echo "peinfo hello.efi | grep text -A 5"
-./peinfo hello.efi | grep text -A 5
diff --git a/GNU_efi_HelloWorld/hello.c b/GNU_efi_HelloWorld/hello.c
index 171db1e..f40df6e 100644
--- a/GNU_efi_HelloWorld/hello.c
+++ b/GNU_efi_HelloWorld/hello.c
@@ -1,5 +1,6 @@
#include <efi.h>
#include <efilib.h>
+#include <efidebug.h>
EFI_STATUS
EFIAPI
@@ -23,7 +24,9 @@ efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
Print(L"Image base: 0x%lx\n", loaded_image->ImageBase);
- int wait = 1;
+ DEBUG((D_ERROR, "AllocatePool: out of pool %x\n", status));
+
+ volatile int wait = 1;
while(wait) {
__asm__ __volatile__("pause");
}
diff --git a/GNU_efi_HelloWorld/hello.efi b/GNU_efi_HelloWorld/hello.efi
index c8399c0..f8ea7e2 100755
--- a/GNU_efi_HelloWorld/hello.efi
+++ b/GNU_efi_HelloWorld/hello.efi
Binary files differ
diff --git a/GNU_efi_HelloWorld/hello.o b/GNU_efi_HelloWorld/hello.o
index 21583fe..37f6971 100644
--- a/GNU_efi_HelloWorld/hello.o
+++ b/GNU_efi_HelloWorld/hello.o
Binary files differ
diff --git a/GNU_efi_HelloWorld/hello.so b/GNU_efi_HelloWorld/hello.so
index b64f729..089f3f7 100755
--- a/GNU_efi_HelloWorld/hello.so
+++ b/GNU_efi_HelloWorld/hello.so
Binary files differ