diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-09-22 06:08:55 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-09-22 06:08:55 -0700 |
commit | 5fe2850dd96483f176858fd75c098313d5b20bc2 (patch) | |
tree | 74c28f6f5392fd4c940c8e38e99e0a943bc7eac5 /ld/testsuite | |
parent | 5c383f026242d25a3c21fdfda42e5ca218b346c8 (diff) | |
download | binutils-5fe2850dd96483f176858fd75c098313d5b20bc2.zip binutils-5fe2850dd96483f176858fd75c098313d5b20bc2.tar.gz binutils-5fe2850dd96483f176858fd75c098313d5b20bc2.tar.bz2 |
Set DF_1_PIE in gld${EMULATION_NAME}_after_parse
We can't add OPTION_PIE to gld${EMULATION_NAME}_handle_option since
it has been handled in parse_args in lexsup.c. This patch moves
setting DF_1_PIE to gld${EMULATION_NAME}_after_parse.
ld/
* emultempl/alphaelf.em (alpha_after_parse): Call
gld${EMULATION_NAME}_after_parse instead of
after_parse_default.
* emultempl/cr16elf.em (cr16elf_after_parse): Likewise.
* emultempl/crxelf.em (crxelf_after_parse); Likewise.
* emultempl/hppaelf.em (hppaelf_after_parse): Likewise.
* emultempl/mipself.em (mips_after_parse): Likewise.
* emultempl/nds32elf.em (nds32_elf_after_parse): Likewise.
* emultempl/elf32.em: Don't include ldlex.h.
(gld${EMULATION_NAME}_after_parse): New function.
(gld${EMULATION_NAME}_handle_option) [GENERATE_PIE_SCRIPT]
<OPTION_PIE>: Removed.
(ld_${EMULATION_NAME}_emulation): Replace after_parse_default
with gld${EMULATION_NAME}_after_parse.
* emultempl/ia64elf.em (gld${EMULATION_NAME}_after_parse):
Renamed to ...
(ia64elf_after_parse): This. Call
gld${EMULATION_NAME}_after_parse instead of after_parse_default.
(LDEMUL_AFTER_PARSE): Replace gld${EMULATION_NAME}_after_parse
with ia64elf_after_parse.
ld/testsuite/
* ld-elf/pie.d: New test.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pie.d | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index 575d048..78de2b2 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2015-09-22 H.J. Lu <hongjiu.lu@intel.com> + + * ld-elf/pie.d: New test. + 2015-09-18 Alan Modra <amodra@gmail.com> PR ld/18963 diff --git a/ld/testsuite/ld-elf/pie.d b/ld/testsuite/ld-elf/pie.d new file mode 100644 index 0000000..d68b962 --- /dev/null +++ b/ld/testsuite/ld-elf/pie.d @@ -0,0 +1,8 @@ +#source: start.s +#readelf: -d -W +#ld: -pie +#target: *-*-linux* *-*-gnu* *-*-solaris* + +#... + +0x[0-9a-f]+ +\(FLAGS_1\) +Flags: +PIE +#pass |