ld: Add tests for -z separate-code and -z noseparate-code
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 12 Jan 2018 03:17:46 +0000 (19:17 -0800)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 12 Jan 2018 03:18:37 +0000 (19:18 -0800)
commitd346bb277c7f194ece73a7200d1ed6417b1194e5
treec3af5663991aff9164495051d0eb3b6e7d1fc0f6
parent2888249fc9eb38b6d6e4bd969ce63c26e3753d5e
ld: Add tests for -z separate-code and -z noseparate-code

Verify that -z separate-code works and -z noseparate-code doesn't disable
-z relro.

PR ld/22393
* testsuite/ld-elf/pr16322.d: Add -z noseparate-code.
* testsuite/ld-elf/pr22393-1.s: New file.
* testsuite/ld-elf/pr22393-1a.d: Likewise.
* testsuite/ld-elf/pr22393-1b.d: Likewise.
* testsuite/ld-elf/pr22393-1c.d: Likewise.
* testsuite/ld-elf/pr22393-1d.d: Likewise.
* testsuite/ld-elf/pr22393-1e.d: Likewise.
* testsuite/ld-elf/pr22393-1f.d: Likewise.
* testsuite/ld-elf/pr22393-2a.c: Likewise.
* testsuite/ld-elf/pr22393-2a.rd: Likewise.
* testsuite/ld-elf/pr22393-2b.c: Likewise.
* testsuite/ld-elf/pr22393-2b.rd: Likewise.
* testsuite/ld-elf/shared.exp: Run tests for -z separate-code.
14 files changed:
ld/ChangeLog
ld/testsuite/ld-elf/pr16322.d
ld/testsuite/ld-elf/pr22393-1.s [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-1a.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-1b.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-1c.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-1d.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-1e.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-1f.d [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-2a.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-2a.rd [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-2b.c [new file with mode: 0644]
ld/testsuite/ld-elf/pr22393-2b.rd [new file with mode: 0644]
ld/testsuite/ld-elf/shared.exp