Skip to content

Commit 4e7297d

Browse files
Merge branch 'mr/poeplau/place-the-got-inside-the-data-segment-on-zynqmp' into 'master'
Place the GOT inside the data segment on ZynqMP See merge request eng/toolchain/bb-runtimes!303
2 parents cdd7175 + 8e64add commit 4e7297d

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

aarch64/zynqmp/common.ld

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,6 @@ SECTIONS
143143

144144
__region_data_start = .;
145145

146-
.got :
147-
{
148-
*(.got)
149-
} > REGION_DATA
150-
151146
.mmu_ram_table_2 : ALIGN(0x1000)
152147
{
153148
__mmu_ram_table_2_start = .;
@@ -167,6 +162,12 @@ SECTIONS
167162
{
168163
__data = .;
169164
__data_start = .;
165+
/* The GOT must be part of the memory map because some code models reach
166+
data globals through it (-fsanitize=hwaddress enables tagged-globals,
167+
which does exactly that), and an orphan .got ends up past _end, on
168+
top of the heap. Keeping it inside .data also makes it covered by
169+
__data_start .. __data_end, which some boards copy from ROM. */
170+
*(.got.plt) *(.igot.plt) *(.got) *(.igot)
170171
*(.data .data.* .gnu.linkonce.d*)
171172
*(.mmu_tbl0)
172173
*(.mmu_tbl1)

0 commit comments

Comments
 (0)