binutils-gdb/ld/testsuite/ld-loongarch-elf/data-got.d
mengqinggang 2bf280a827 LoongArch: ld: Move .got .got.plt before .data and protect .got with relro
Move .got .got.plt before .data so .got can be protected with -zrelro.
And the first two entries of .got.plt (_dl_runtime_resolve and link map)
are placed within the relro region.
2024-04-09 14:31:04 +08:00

16 lines
465 B
Makefile

# line 11 test the first two entries of .got.plt in relro region
# relro segment size is .dynamic size + .got size + 0x10
# line 13 test .got .got.plt before .got
# line 15 test .got in relro segment
#as:
#ld: -shared -z relro --hash-style=both
#readelf: -l --wide
#skip: loongarch32-*-*
#...
GNU_RELRO 0x003c10 0x0000000000007c10 0x0000000000007c10 0x0003f0 0x0003f0 R 0x1
#...
01 .dynamic .got .got.plt .data
#...
03 .dynamic .got
#pass