Skip to content

Commit 35d57d1

Browse files
committed
ARM: decompressor: move GOT into .data for EFI enabled builds
We will be running the decompressor in place after a future patch, instead of copying it around first. This means we no longer have to disable and re-enable the MMU and caches either. However, this means we will be loaded with the restricted permissions set by the UEFI firmware, which means that we have to move the GOT table into the data section in order for the contents to be writable by the code itself. Signed-off-by: Ard Biesheuvel <[email protected]> Reviewed-by: Nicolas Pitre <[email protected]>
1 parent f1f012b commit 35d57d1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

arch/arm/boot/compressed/vmlinux.lds.S

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ SECTIONS
6363
_etext = .;
6464

6565
.got.plt : { *(.got.plt) }
66+
#ifndef CONFIG_EFI_STUB
6667
_got_start = .;
6768
.got : { *(.got) }
6869
_got_end = .;
70+
#endif
6971

7072
/* ensure the zImage file size is always a multiple of 64 bits */
7173
/* (without a dummy byte, ld just ignores the empty section) */
@@ -74,6 +76,9 @@ SECTIONS
7476
#ifdef CONFIG_EFI_STUB
7577
.data : ALIGN(4096) {
7678
__pecoff_data_start = .;
79+
_got_start = .;
80+
*(.got)
81+
_got_end = .;
7782
/*
7883
* The EFI stub always executes from RAM, and runs strictly before the
7984
* decompressor, so we can make an exception for its r/w data, and keep it

0 commit comments

Comments
 (0)