On aarch64-linux (debian 12), I run into: ... (gdb) file /home/linux/gdb/build/gdb/testsuite/outputs/gdb.base/corefile2/corefile2^M Reading symbols from /home/linux/gdb/build/gdb/testsuite/outputs/gdb.base/corefile2/corefile2...^M (gdb) print/x buf_rw[0]@4^M Cannot access memory at address 0x60090^M (gdb) FAIL: gdb.base/corefile2.exp: renamed binfile: print/x buf_rw[0]@4 ... At first glance, this looks like a relocation issue: ... (gdb) p &buf_rw[0] $1 = 0x60090 <buf_rw> "" (gdb) start ... (gdb) p &buf_rw[0] $2 = 0xaaaaaab00090 <buf_rw> "" ....
Passes with target board unix/-fno-PIE/-no-pie.