diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2012-08-31 02:52:14 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2012-08-31 02:52:14 +0000 |
commit | 11cba4accf7f9a82fdb7902f0e36521038eda205 (patch) | |
tree | 1e4ea45acd8dea6d96ebd718ca1e8727704f2738 /ld/testsuite | |
parent | b69fdb4ec950776d74fb10ed44a624089dbb23af (diff) | |
download | gdb-11cba4accf7f9a82fdb7902f0e36521038eda205.zip gdb-11cba4accf7f9a82fdb7902f0e36521038eda205.tar.gz gdb-11cba4accf7f9a82fdb7902f0e36521038eda205.tar.bz2 |
Provide __executable_start for PIE
ld/
PR ld/14525
* scripttempl/elf.sc: Also provide __executable_start for PIE.
ld/testsuite/
PR ld/14525
* ld-elf/elf.exp: Run pr14525.
* ld-elf/pr14525.c: New.
* ld-elf/pr14525.out: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ChangeLog | 26 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/elf.exp | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr14525.c | 11 | ||||
-rw-r--r-- | ld/testsuite/ld-elf/pr14525.out | 1 |
4 files changed, 30 insertions, 9 deletions
diff --git a/ld/testsuite/ChangeLog b/ld/testsuite/ChangeLog index eca4181..5537d0a 100644 --- a/ld/testsuite/ChangeLog +++ b/ld/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2012-08-30 H.J. Lu <hongjiu.lu@intel.com> + + PR ld/14525 + * ld-elf/elf.exp: Run pr14525. + + * ld-elf/pr14525.c: New. + * ld-elf/pr14525.out: Likewise. + 2012-08-28 Maciej W. Rozycki <macro@codesourcery.com> * ld-elf/export-class.sd: New test. @@ -81,15 +89,15 @@ * ld-mips-elf/mips-elf.exp: Run the new tests. 2012-08-13 Ian Bolton <ian.bolton@arm.com> - Laurent Desnogues <laurent.desnogues@arm.com> - Jim MacArthur <jim.macarthur@arm.com> - Marcus Shawcroft <marcus.shawcroft@arm.com> - Nigel Stephens <nigel.stephens@arm.com> - Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> - Richard Earnshaw <rearnsha@arm.com> - Sofiane Naci <sofiane.naci@arm.com> - Tejas Belagod <tejas.belagod@arm.com> - Yufeng Zhang <yufeng.zhang@arm.com> + Laurent Desnogues <laurent.desnogues@arm.com> + Jim MacArthur <jim.macarthur@arm.com> + Marcus Shawcroft <marcus.shawcroft@arm.com> + Nigel Stephens <nigel.stephens@arm.com> + Ramana Radhakrishnan <ramana.radhakrishnan@arm.com> + Richard Earnshaw <rearnsha@arm.com> + Sofiane Naci <sofiane.naci@arm.com> + Tejas Belagod <tejas.belagod@arm.com> + Yufeng Zhang <yufeng.zhang@arm.com> * ld-aarch64/aarch64-elf.exp: New file. * ld-aarch64/aarch64.ld: New file. diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp index 1780b50..a97e3df 100644 --- a/ld/testsuite/ld-elf/elf.exp +++ b/ld/testsuite/ld-elf/elf.exp @@ -151,6 +151,7 @@ set array_tests_pie { {"PIE init array" "-pie" "" {init.c} "init" "init.out" "-fPIE"} {"PIE fini array" "-pie" "" {fini.c} "fini" "fini.out" "-fPIE"} {"PIE init array mixed" "-pie" "" {init-mixed.c} "init-mixed" "init-mixed.out" "-I. -fPIE"} + {"PIE PR ld/14525" "-pie" "" {pr14525.c} "pr14525" "pr14525.out" "-fPIE"} } set array_tests_static { {"static preinit array" "-static" "" {preinit.c} "preinit" "preinit.out"} diff --git a/ld/testsuite/ld-elf/pr14525.c b/ld/testsuite/ld-elf/pr14525.c new file mode 100644 index 0000000..082eb87 --- /dev/null +++ b/ld/testsuite/ld-elf/pr14525.c @@ -0,0 +1,11 @@ +#include <stdio.h> + +extern void *__executable_start; + +int +main() +{ + if ((void **) &main >= &__executable_start) + printf ("OK\n"); + return 0; +} diff --git a/ld/testsuite/ld-elf/pr14525.out b/ld/testsuite/ld-elf/pr14525.out new file mode 100644 index 0000000..d86bac9 --- /dev/null +++ b/ld/testsuite/ld-elf/pr14525.out @@ -0,0 +1 @@ +OK |