From 652a8f4f57243c41e71da06b6d0fe27540f3cbba Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 1 Sep 2016 12:01:00 -0700 Subject: Add tests for PR ld/20513 PR ld/20513 * testsuite/ld-elf/pr20513a.d: New file. * testsuite/ld-elf/pr20513a.s: Likewise. * testsuite/ld-elf/pr20513b.d: Likewise. * testsuite/ld-elf/pr20513b.s: Likewise. * testsuite/ld-elf/pr20513c.d: Likewise. * testsuite/ld-elf/pr20513d.d: Likewise. * testsuite/ld-elf/pr20513e.d: Likewise. * testsuite/ld-elf/pr20513f.d: Likewise. --- ld/testsuite/ld-elf/pr20513a.d | 9 +++++++++ ld/testsuite/ld-elf/pr20513a.s | 14 ++++++++++++++ ld/testsuite/ld-elf/pr20513b.d | 9 +++++++++ ld/testsuite/ld-elf/pr20513b.s | 14 ++++++++++++++ ld/testsuite/ld-elf/pr20513c.d | 9 +++++++++ ld/testsuite/ld-elf/pr20513d.d | 9 +++++++++ ld/testsuite/ld-elf/pr20513e.d | 4 ++++ ld/testsuite/ld-elf/pr20513f.d | 4 ++++ 8 files changed, 72 insertions(+) create mode 100644 ld/testsuite/ld-elf/pr20513a.d create mode 100644 ld/testsuite/ld-elf/pr20513a.s create mode 100644 ld/testsuite/ld-elf/pr20513b.d create mode 100644 ld/testsuite/ld-elf/pr20513b.s create mode 100644 ld/testsuite/ld-elf/pr20513c.d create mode 100644 ld/testsuite/ld-elf/pr20513d.d create mode 100644 ld/testsuite/ld-elf/pr20513e.d create mode 100644 ld/testsuite/ld-elf/pr20513f.d (limited to 'ld/testsuite/ld-elf') diff --git a/ld/testsuite/ld-elf/pr20513a.d b/ld/testsuite/ld-elf/pr20513a.d new file mode 100644 index 00000000000..4a9ee96187d --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513a.d @@ -0,0 +1,9 @@ +#source: pr20513a.s +#source: pr20513b.s +#ld: +#readelf: -S --wide + +#failif +#... +[ ]*\[.*\][ ]+\..text\.exclude[ ]+.* +#... diff --git a/ld/testsuite/ld-elf/pr20513a.s b/ld/testsuite/ld-elf/pr20513a.s new file mode 100644 index 00000000000..0f54bb14ed2 --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513a.s @@ -0,0 +1,14 @@ + .section .text.startup,"ax","progbits" + .type start,"function" + .global start +start: + .type _start,"function" + .global _start +_start: + .type __start,"function" + .global __start +__start: + .type main,"function" + .global main +main: + .long 0 diff --git a/ld/testsuite/ld-elf/pr20513b.d b/ld/testsuite/ld-elf/pr20513b.d new file mode 100644 index 00000000000..73de4ed57a8 --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513b.d @@ -0,0 +1,9 @@ +#source: pr20513b.s +#source: pr20513a.s +#ld: +#readelf: -S --wide + +#failif +#... +[ ]*\[.*\][ ]+\..text\.exclude[ ]+.* +#... diff --git a/ld/testsuite/ld-elf/pr20513b.s b/ld/testsuite/ld-elf/pr20513b.s new file mode 100644 index 00000000000..b6741fc2551 --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513b.s @@ -0,0 +1,14 @@ + .section .text.exclude,"axe","progbits" + .type start,"function" + .global start +start: + .type _start,"function" + .global _start +_start: + .type __start,"function" + .global __start +__start: + .type main,"function" + .global main +main: + .long 0 diff --git a/ld/testsuite/ld-elf/pr20513c.d b/ld/testsuite/ld-elf/pr20513c.d new file mode 100644 index 00000000000..6a019ef91bc --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513c.d @@ -0,0 +1,9 @@ +#source: pr20513a.s +#source: pr20513b.s +#ld: -shared +#readelf: -S --wide + +#failif +#... +[ ]*\[.*\][ ]+\..text\.exclude[ ]+.* +#... diff --git a/ld/testsuite/ld-elf/pr20513d.d b/ld/testsuite/ld-elf/pr20513d.d new file mode 100644 index 00000000000..9b7199f626c --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513d.d @@ -0,0 +1,9 @@ +#source: pr20513b.s +#source: pr20513a.s +#ld: -shared +#readelf: -S --wide + +#failif +#... +[ ]*\[.*\][ ]+\..text\.exclude[ ]+.* +#... diff --git a/ld/testsuite/ld-elf/pr20513e.d b/ld/testsuite/ld-elf/pr20513e.d new file mode 100644 index 00000000000..6994652a2aa --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513e.d @@ -0,0 +1,4 @@ +#source: pr20513a.s +#source: pr20513b.s +#ld: -r +#error: multiple definition of diff --git a/ld/testsuite/ld-elf/pr20513f.d b/ld/testsuite/ld-elf/pr20513f.d new file mode 100644 index 00000000000..83043f31747 --- /dev/null +++ b/ld/testsuite/ld-elf/pr20513f.d @@ -0,0 +1,4 @@ +#source: pr20513b.s +#source: pr20513a.s +#ld: -r +#error: multiple definition of -- cgit v1.2.1