From 8569cfa78c2cc8b5ef66b0bebddcc0e63231fb51 Mon Sep 17 00:00:00 2001 From: Renlin Li Date: Tue, 13 Jun 2017 14:03:47 +0100 Subject: [PATCH] [LD][Testsuite] Add --no-dynamic-linker option to dynamic-1 rdynamic-1 test case. arm-none-eabi-ld supports shared libraries. However, the toolchain may be configured to generate statically linked executable by default. It is required to have --no-dynamic-linker option before adding dynamic symbol to static executable. For dynamically linked executable, the behavior won't change. ld/ChangeLog 2017-06-13 Renlin Li * testsuite/ld-elf/shared.exp (build_tests): Add --no-dynamic-linker option to rdynamic-1 and dynamic-1 tests. --- ld/ChangeLog | 5 +++++ ld/testsuite/ld-elf/shared.exp | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index e21f447ea25..1c812113b18 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2017-06-13 Renlin Li + + * testsuite/ld-elf/shared.exp (build_tests): Add --no-dynamic-linker + option to rdynamic-1 and dynamic-1 tests. + 2017-06-09 H.J. Lu * testsuite/ld-x86-64/property-x86-3-x32.d: New file. diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp index 070b51aaa91..7c4e0a2b39b 100644 --- a/ld/testsuite/ld-elf/shared.exp +++ b/ld/testsuite/ld-elf/shared.exp @@ -382,10 +382,10 @@ set build_tests { "" "" {pr2404b.c} {} "libpr2404b.a"} {"Build rdynamic-1" - "-Wl,-export-dynamic,--gc-sections" "-ffunction-sections" + "-Wl,--no-dynamic-linker,-export-dynamic,--gc-sections" "-ffunction-sections" {rdynamic-1.c} {{readelf {-s} rdynamic-1.rd}} "rdynamic-1"} {"Build dynamic-1" - "-Wl,--dynamic-list,dynamic-1.syms -Wl,--gc-sections" "-ffunction-sections" + "-Wl,--no-dynamic-linker,--dynamic-list,dynamic-1.syms -Wl,--gc-sections" "-ffunction-sections" {dynamic-1.c} {{readelf {-s} dynamic-1.rd}} "dynamic-1"} {"Build libpr16496a.so" "-shared -Wl,--version-script=pr16496a.map" "-fPIC" -- 2.30.2