summaryrefslogtreecommitdiffstats
path: root/sys/boot/common/load_elf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/common/load_elf.c')
-rw-r--r--sys/boot/common/load_elf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/boot/common/load_elf.c b/sys/boot/common/load_elf.c
index ee6389f..bf095bb 100644
--- a/sys/boot/common/load_elf.c
+++ b/sys/boot/common/load_elf.c
@@ -260,7 +260,7 @@ __elfN(loadimage)(struct preloaded_file *fp, elf_file_t ef, u_int64_t off)
firstaddr = lastaddr = 0;
ehdr = ef->ehdr;
if (ef->kernel) {
-#ifdef __i386__
+#if defined(__i386__) || defined(__amd64__)
#if __ELF_WORD_SIZE == 64
off = - (off & 0xffffffffff000000ull);/* x86_64 relocates after locore */
#else
OpenPOWER on IntegriCloud