Skip to content

Commit 390c288

Browse files
committed
Fix aarch64 sections alignment
binutils really wants a 64k alignment, and we also want to ensure .dynamic gets its own. This allows ld to generate multiple segments for execute and write, fixing a failure with binutils 2.39 Signed-off-by: Benjamin Herrenschmidt <[email protected]>
1 parent cf6d591 commit 390c288

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

gnuefi/elf_aa64_efi.lds

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ SECTIONS
1515
}
1616
_etext = .;
1717
_text_size = . - _text;
18-
.dynamic : { *(.dynamic) }
19-
.data : ALIGN(4096)
18+
.data : ALIGN(0x10000)
2019
{
2120
_data = .;
2221
*(.sdata)
@@ -68,11 +67,13 @@ SECTIONS
6867
_edata = .;
6968
_data_size = . - _data;
7069

71-
. = ALIGN(4096);
70+
. = ALIGN(0x10000);
71+
.dynamic : { *(.dynamic) }
72+
. = ALIGN(0x10000);
7273
.dynsym : { *(.dynsym) }
73-
. = ALIGN(4096);
74+
. = ALIGN(0x10000);
7475
.dynstr : { *(.dynstr) }
75-
. = ALIGN(4096);
76+
. = ALIGN(0x10000);
7677
.note.gnu.build-id : { *(.note.gnu.build-id) }
7778
/DISCARD/ :
7879
{

0 commit comments

Comments
 (0)