diff --git a/gnuefi/crt0-efi-aarch64-local.S b/gnuefi/crt0-efi-aarch64-local.S index 8ce3d28..b157ea7 100644 --- a/gnuefi/crt0-efi-aarch64-local.S +++ b/gnuefi/crt0-efi-aarch64-local.S @@ -172,12 +172,12 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .reloc, "a" -label1: - .4byte dummy-label1 // Page RVA + .section .reloc, "a", %progbits + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-aarch64.S b/gnuefi/crt0-efi-aarch64.S index 6decdbc..df2584f 100644 --- a/gnuefi/crt0-efi-aarch64.S +++ b/gnuefi/crt0-efi-aarch64.S @@ -43,12 +43,12 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .reloc, "a" -label1: - .4byte dummy-label1 // Page RVA + .section .reloc, "a", %progbits + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-arm.S b/gnuefi/crt0-efi-arm.S index ad02ca1..495beed 100644 --- a/gnuefi/crt0-efi-arm.S +++ b/gnuefi/crt0-efi-arm.S @@ -177,11 +177,12 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .areloc - .4byte dummy // Page RVA + .section .areloc, "a", %progbits + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-ia32-local.S b/gnuefi/crt0-efi-ia32-local.S index a13be2d..f07cb71 100644 --- a/gnuefi/crt0-efi-ia32-local.S +++ b/gnuefi/crt0-efi-ia32-local.S @@ -163,11 +163,12 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .reloc - .4byte dummy // Page RVA + .section .reloc, "a", %progbits + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-ia32.S b/gnuefi/crt0-efi-ia32.S index e7023ab..35b0385 100644 --- a/gnuefi/crt0-efi-ia32.S +++ b/gnuefi/crt0-efi-ia32.S @@ -68,11 +68,12 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 .section .reloc - .4byte dummy // Page RVA + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-ia64.S b/gnuefi/crt0-efi-ia64.S index 30714d3..fc8a467 100644 --- a/gnuefi/crt0-efi-ia64.S +++ b/gnuefi/crt0-efi-ia64.S @@ -80,7 +80,7 @@ _start_plabel: #define IMAGE_REL_BASED_DIR64 10 - .section .reloc, "a" + .section .reloc, "a", %progbits data4 _start_plabel // Page RVA data4 12 // Block Size (2*4+2*2), must be aligned by 32 Bits data2 (IMAGE_REL_BASED_DIR64<<12) + 0 // reloc for plabel's entry point diff --git a/gnuefi/crt0-efi-loongarch64.S b/gnuefi/crt0-efi-loongarch64.S index af939ff..f094bf9 100644 --- a/gnuefi/crt0-efi-loongarch64.S +++ b/gnuefi/crt0-efi-loongarch64.S @@ -45,12 +45,13 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .reloc, "a" + .section .reloc, "a", %progbits label1: - .4byte dummy-label1 // Page RVA + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-riscv64-local.S b/gnuefi/crt0-efi-riscv64-local.S index 4b34101..b96df9e 100644 --- a/gnuefi/crt0-efi-riscv64-local.S +++ b/gnuefi/crt0-efi-riscv64-local.S @@ -170,12 +170,13 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .reloc, "a" + .section .reloc, "a", %progbits label1: - .4byte dummy-label1 // Page RVA + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-riscv64.S b/gnuefi/crt0-efi-riscv64.S index bc86a62..648ea40 100644 --- a/gnuefi/crt0-efi-riscv64.S +++ b/gnuefi/crt0-efi-riscv64.S @@ -38,12 +38,13 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .reloc, "a" + .section .reloc, "a", %progbits label1: - .4byte dummy-label1 // Page RVA + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy diff --git a/gnuefi/crt0-efi-x86_64.S b/gnuefi/crt0-efi-x86_64.S index b1f599f..f3d0712 100644 --- a/gnuefi/crt0-efi-x86_64.S +++ b/gnuefi/crt0-efi-x86_64.S @@ -66,12 +66,13 @@ _start: // hand-craft a dummy .reloc section so EFI knows it's a relocatable executable: .data -dummy: .4byte 0 +dummy0: .4byte 0 +dummy1: .4byte 0 #define IMAGE_REL_ABSOLUTE 0 - .section .reloc, "a" + .section .reloc, "a", %progbits label1: - .4byte dummy-label1 // Page RVA + .4byte dummy1 - dummy0 // Page RVA .4byte 12 // Block Size (2*4+2*2), must be aligned by 32 Bits .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy .2byte (IMAGE_REL_ABSOLUTE<<12) + 0 // reloc for dummy