From 2715765b0fd357b4b58166850a23f509aacde161 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Sat, 30 Sep 2017 03:04:52 -0700 Subject: [PATCH] Add a test for PR binutils/21978 PR binutils/21978 * testsuite/ld-elf/pr21978.od: New file. * testsuite/ld-elf/pr21978a.c: Likewise. * testsuite/ld-elf/pr21978b.c: Likewise. * testsuite/ld-elf/shared.exp: Run PR binutils/21978 test. --- ld/ChangeLog | 8 ++++++++ ld/testsuite/ld-elf/pr21978.od | 7 +++++++ ld/testsuite/ld-elf/pr21978a.c | 1 + ld/testsuite/ld-elf/pr21978b.c | 1 + ld/testsuite/ld-elf/shared.exp | 3 +++ 5 files changed, 20 insertions(+) create mode 100644 ld/testsuite/ld-elf/pr21978.od create mode 100644 ld/testsuite/ld-elf/pr21978a.c create mode 100644 ld/testsuite/ld-elf/pr21978b.c diff --git a/ld/ChangeLog b/ld/ChangeLog index 1c5ca556ff8..0c117771175 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,11 @@ +2017-09-30 H.J. Lu + + PR binutils/21978 + * testsuite/ld-elf/pr21978.od: New file. + * testsuite/ld-elf/pr21978a.c: Likewise. + * testsuite/ld-elf/pr21978b.c: Likewise. + * testsuite/ld-elf/shared.exp: Run PR binutils/21978 test. + 2017-09-28 Nick Clifton PR 14918 diff --git a/ld/testsuite/ld-elf/pr21978.od b/ld/testsuite/ld-elf/pr21978.od new file mode 100644 index 00000000000..6bc33456935 --- /dev/null +++ b/ld/testsuite/ld-elf/pr21978.od @@ -0,0 +1,7 @@ +#... +.*/ld/testsuite/ld-elf/pr21978a.c:1 +void foo \(void\) {} +#... +.*/ld/testsuite/ld-elf/pr21978b.c:1 +void bar \(void\) {} +#pass diff --git a/ld/testsuite/ld-elf/pr21978a.c b/ld/testsuite/ld-elf/pr21978a.c new file mode 100644 index 00000000000..aa6d4c27df0 --- /dev/null +++ b/ld/testsuite/ld-elf/pr21978a.c @@ -0,0 +1 @@ +void foo (void) {} diff --git a/ld/testsuite/ld-elf/pr21978b.c b/ld/testsuite/ld-elf/pr21978b.c new file mode 100644 index 00000000000..01bda76e6eb --- /dev/null +++ b/ld/testsuite/ld-elf/pr21978b.c @@ -0,0 +1 @@ +void bar (void) {} diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 2bb0750ec1a..6e091c9aa69 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -458,6 +458,9 @@ set build_tests { {"Build pr21964-2b.so" "-shared" "-fPIC" {pr21964-2b.c} {} "pr21964-2b.so"} + {"Dump pr21978.so" + "-shared" "-fPIC -g -O2" + {pr21978a.c pr21978b.c} {{objdump {-Sl} pr21978.od}} "pr21978.so"} } run_cc_link_tests $build_tests -- 2.30.2