binutils-gdb/ld/testsuite/ld-elf/mbind1a.d
Alan Modra 3944e22b46 mbind tests: don't check PT_LOAD headers
On powerpc-linux, the second PT_LOAD header is RWE.  On hppa64-linux,
only one PT_LOAD header is present.  Since the tests are really about
the new GNU_MBIND headers, ignore PT_LOAD and its section mapping.

	* testsuite/ld-elf/mbind1a.d: Remove matches for PT_LOAD segments.
	* testsuite/ld-elf/mbind1b.d: Likewise.
	* testsuite/ld-elf/mbind1c.d: Likewise.
2017-04-07 00:18:33 +09:30

37 lines
1.7 KiB
Makefile

#source: mbind1.s
#ld: -z common-page-size=0x1000 -z max-page-size=0x200000
#readelf: -S -l --wide
#target: *-*-linux* *-*-gnu*
#...
\[[ 0-9]+\] \.mbind\.text[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXD 0 0 4096
\[[ 0-9]+\] \.mbind\.text[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AXD 0 3 4096
\[[ 0-9]+\] \.mbind\.rodata[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 AD 0 2 4096
#...
\[[ 0-9]+\] \.mbind\.data[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WAD 0 0 4096
\[[ 0-9]+\] \.mbind\.data[ ]+PROGBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WAD 0 3 4096
#...
\[[ 0-9]+\] \.mbind\.bss[ ]+NOBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WAD 0 0 4096
\[[ 0-9]+\] \.mbind\.bss[ ]+NOBITS[ ]+[0-9a-f]+ [0-9a-f]+ [0-9a-f]+ 00 WAD 0 3 4096
#...
Program Headers:
#...
GNU_MBIND\+0[ \t]+0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ 0x[0-9a-f]+ R E 0x1000
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