This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [ld, testsuite] Only run rdynamic-1 when "-rdynamic" option is supported by compiler
- From: Alan Modra <amodra at gmail dot com>
- To: Jiong Wang <jiong dot wang at foss dot arm dot com>
- Cc: Binutils <binutils at sourceware dot org>
- Date: Sat, 11 Mar 2017 08:47:16 +1030
- Subject: Re: [ld, testsuite] Only run rdynamic-1 when "-rdynamic" option is supported by compiler
- Authentication-results: sourceware.org; auth=none
- References: <7a7efa33-82bd-4865-c5c2-787eaed089b0@foss.arm.com> <4ac291e6-1baf-361d-6ce2-238a33064b79@foss.arm.com>
On Fri, Mar 10, 2017 at 04:24:39PM +0000, Jiong Wang wrote:
> This is the following error on arm bare-metal
>
> FAIL: Build rdynamic-1
>
> "-rdynamic" is not supported by most bare-metal GCC, the only bare-metal I am
> aware of is
> https://gcc.gnu.org/ml/gcc-patches/2011-02/msg00567.html
>
> This patch implemented a -rdynamic availability check and gated "rdynamic-1"
> build test. GCC testsuite has added similar checks this week.
>
> https://gcc.gnu.org/ml/gcc-patches/2017-03/msg00258.html
>
> No regression on X86-64/AArch64 native ld check.
> OK for master?
No. I'll commit the following simpler patch after a test run.
diff --git a/ld/testsuite/ld-elf/shared.exp b/ld/testsuite/ld-elf/shared.exp
index 070915a..300100a 100644
--- a/ld/testsuite/ld-elf/shared.exp
+++ b/ld/testsuite/ld-elf/shared.exp
@@ -328,7 +328,7 @@ set build_tests {
"" ""
{pr2404b.c} {} "libpr2404b.a"}
{"Build rdynamic-1"
- "-rdynamic -Wl,--gc-sections" "-ffunction-sections"
+ "-Wl,-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"
--
Alan Modra
Australia Development Lab, IBM