summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--elf_aarch64_efi.lds11
-rw-r--r--elf_arm_efi.lds13
-rw-r--r--elf_ia32_efi.lds10
-rw-r--r--elf_ia64_efi.lds10
-rw-r--r--elf_x86_64_efi.lds14
-rw-r--r--version.c.in2
7 files changed, 54 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index c02cc942..99c1caa3 100644
--- a/Makefile
+++ b/Makefile
@@ -170,7 +170,7 @@ FORMAT ?= --target efi-app-$(ARCH)
ifneq ($(OBJCOPY_GTE224),1)
$(error objcopy >= 2.24 is required)
endif
- $(OBJCOPY) -j .text -j .sdata -j .data \
+ $(OBJCOPY) -j .text -j .sdata -j .data -j .data.ident \
-j .dynamic -j .dynsym -j .rel* \
-j .rela* -j .reloc -j .eh_frame \
-j .vendor_cert \
diff --git a/elf_aarch64_efi.lds b/elf_aarch64_efi.lds
index 77770c27..4324dc9c 100644
--- a/elf_aarch64_efi.lds
+++ b/elf_aarch64_efi.lds
@@ -15,6 +15,16 @@ SECTIONS
_etext = .;
}
.dynamic : { *(.dynamic) }
+
+ . = ALIGN(4096);
+ .note.gnu.build-id : {
+ *(.note.gnu.build-id)
+ }
+ .data.ident : {
+ *(.data.ident)
+ }
+
+ . = ALIGN(4096);
.data :
{
_data = .;
@@ -37,7 +47,6 @@ SECTIONS
. = ALIGN(16);
_bss_end = .;
}
- .note.gnu.build-id : { *(.note.gnu.build-id) }
. = ALIGN(4096);
.vendor_cert :
diff --git a/elf_arm_efi.lds b/elf_arm_efi.lds
index ffa1eeb2..0287293a 100644
--- a/elf_arm_efi.lds
+++ b/elf_arm_efi.lds
@@ -15,6 +15,16 @@ SECTIONS
_etext = .;
}
.dynamic : { *(.dynamic) }
+
+ . = ALIGN(4096);
+ .note.gnu.build-id : {
+ *(.note.gnu.build-id)
+ }
+ .data.ident : {
+ *(.data.ident)
+ }
+
+ . = ALIGN(4096);
.data :
{
_data = .;
@@ -37,9 +47,8 @@ SECTIONS
. = ALIGN(16);
_bss_end = .;
}
- .note.gnu.build-id : { *(.note.gnu.build-id) }
- . = ALIGN(4096);
+ . = ALIGN(4096);
.vendor_cert :
{
*(.vendor_cert)
diff --git a/elf_ia32_efi.lds b/elf_ia32_efi.lds
index 9da81094..2ba18c7b 100644
--- a/elf_ia32_efi.lds
+++ b/elf_ia32_efi.lds
@@ -20,6 +20,14 @@ SECTIONS
*(.reloc)
}
. = ALIGN(4096);
+ .note.gnu.build-id : {
+ *(.note.gnu.build-id)
+ }
+ .data.ident : {
+ *(.data.ident)
+ }
+
+ . = ALIGN(4096);
.data :
{
_data = .;
@@ -38,7 +46,7 @@ SECTIONS
*(.bss)
*(COMMON)
}
- .note.gnu.build-id : { *(.note.gnu.build-id) }
+
. = ALIGN(4096);
.vendor_cert :
{
diff --git a/elf_ia64_efi.lds b/elf_ia64_efi.lds
index 39ffddaf..e7d85e2b 100644
--- a/elf_ia64_efi.lds
+++ b/elf_ia64_efi.lds
@@ -28,6 +28,14 @@ SECTIONS
*(.scommon)
}
. = ALIGN(4096);
+ .note.gnu.build-id : {
+ *(.note.gnu.build-id)
+ }
+ .data.ident : {
+ *(.data.ident)
+ }
+
+ . = ALIGN(4096);
.data :
{
*(.rodata*)
@@ -41,7 +49,7 @@ SECTIONS
*(.bss)
*(COMMON)
}
- .note.gnu.build-id : { *(.note.gnu.build-id) }
+
. = ALIGN(4096);
.vendor_cert :
{
diff --git a/elf_x86_64_efi.lds b/elf_x86_64_efi.lds
index bb21bbb0..81d21a05 100644
--- a/elf_x86_64_efi.lds
+++ b/elf_x86_64_efi.lds
@@ -25,6 +25,14 @@ SECTIONS
*(.reloc)
}
. = ALIGN(4096);
+ .note.gnu.build-id : {
+ *(.note.gnu.build-id)
+ }
+ .data.ident : {
+ *(.data.ident)
+ }
+
+ . = ALIGN(4096);
.data :
{
_data = .;
@@ -42,7 +50,7 @@ SECTIONS
*(COMMON)
*(.rel.local)
}
- .note.gnu.build-id : { *(.note.gnu.build-id) }
+
. = ALIGN(4096);
.vendor_cert :
{
@@ -54,7 +62,11 @@ SECTIONS
.rela :
{
*(.rela.data*)
+ }
+ .rela.got : {
*(.rela.got)
+ }
+ .rela.stab : {
*(.rela.stab)
}
_edata = .;
diff --git a/version.c.in b/version.c.in
index 9e71970d..06f91f93 100644
--- a/version.c.in
+++ b/version.c.in
@@ -1,7 +1,7 @@
#include "version.h"
-CHAR8 shim_version[] =
+CHAR8 shim_version[] __attribute__((section (".data.ident"))) =
"UEFI SHIM\n"
"$Version: @@VERSION@@ $\n"
"$BuildMachine: @@UNAME@@ $\n"