ld: Add -static-pie tests
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 11 Apr 2019 13:52:03 +0000 (06:52 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 11 Apr 2019 13:52:03 +0000 (06:52 -0700)
commitb3d7a86748247a68c69939cdf9925d4a78448f2d
tree4f53fc7857d2c79e5417bf0d6005c4cb1a8a7a11
parenta0ea3a14dc6a6062c0c1f2bfbb7ad0373ec20843
ld: Add -static-pie tests

Add -static-pie tests for DT_INIT_ARRAY, DT_FINI_ARRAY, DT_PREINIT_ARRAY
and IFUNC.

* testsuite/config/default.exp (STATIC_PIE_LDFLAGS): New.  Set
to "-static-pie" if target compiler supports it.
* testsuite/ld-elf/elf.exp: Run -static-pie tests if
$STATIC_PIE_LDFLAGS isn't empty.
* testsuite/ld-ifunc/ifunc.exp: Likewise.
ld/ChangeLog
ld/testsuite/config/default.exp
ld/testsuite/ld-elf/elf.exp
ld/testsuite/ld-ifunc/ifunc.exp