summaryrefslogtreecommitdiffstats
path: root/efi_memtest/Makefile
diff options
context:
space:
mode:
authorRegina König2021-04-21 01:23:10 +0200
committerRegina König2021-04-21 01:23:10 +0200
commit1e9dc94af3f7d60dac84073093ebefde303e36ca (patch)
tree363fdbb602014a83df7148f04fd9b795b04b0375 /efi_memtest/Makefile
parentRemove bug of old memtest (diff)
downloadmemtest86-1e9dc94af3f7d60dac84073093ebefde303e36ca.tar.gz
memtest86-1e9dc94af3f7d60dac84073093ebefde303e36ca.tar.xz
memtest86-1e9dc94af3f7d60dac84073093ebefde303e36ca.zip
Modify cpu_cache_speed() to print a reasonable clock value
Diffstat (limited to 'efi_memtest/Makefile')
-rw-r--r--efi_memtest/Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/efi_memtest/Makefile b/efi_memtest/Makefile
index 7ca8698..5a3a9ed 100644
--- a/efi_memtest/Makefile
+++ b/efi_memtest/Makefile
@@ -11,8 +11,11 @@ CFLAGS += -fno-common
CFLAGS += -fno-strict-aliasing -g
# EFI uses Microsoft ABI so no red zone is defined
CFLAGS += -mno-red-zone
-# use %rip-relative addressing wherever possible
+
+# use %rip-relative addressing wherever possible?? Or not?
CFLAGS += -fpie
+#CFLAGS += -fno-pie -no-pie -static
+
CFLAGS += -fPIC
CFLAGS += -ffunction-sections
CFLAGS += -fdata-sections
@@ -68,7 +71,7 @@ $(MAIN_FILE).efi: $(MAIN_FILE).dll
$(MAIN_FILE).dll: $(MAIN_FILE).lib
- $(CC) $(CFLAGS) $(PREPROCESSOR) $(M) -o $(MAIN_FILE).dll \
+ $(CC) $(CFLAGS) $(PREPROCESSOR) $(M) $(LIBRARIES) -o $(MAIN_FILE).dll \
-nostdlib \
-Wl,-n,-q,--gc-sections \
-Wl,--entry,_ModuleEntryPoint \
@@ -78,14 +81,13 @@ $(MAIN_FILE).dll: $(MAIN_FILE).lib
-Wl,--script=memtest86+/efi/Include/GccBase.lds \
-z common-page-size=0x40 \
-u _ModuleEntryPoint \
- -DSTRING_ARRAY_NAME=${MAIN_FILE}Strings \
- $(LIBRARIES)
+ -DSTRING_ARRAY_NAME=${MAIN_FILE}Strings
objcopy --strip-unneeded -R .eh_frame -v $(MAIN_FILE).dll $(MAIN_FILE).dll
strip -R .strtab MemtestEfi.dll
$(MAIN_FILE).lib: $(OBJS)
gcc-ar crv OUTPUT/$(MAIN_FILE).lib $^
- rm $^
+ #rm $^
$(MAIN_FILE).obj: $(MAIN_FILE).c
$(CC) $(CFLAGS) $(PREPROCESSOR) $(M) -o $(MAIN_FILE).obj \