This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold][PATCH] PR gold/17675: pie_copyrelocs_test fails with GCC 4.2
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: binutils at sourceware dot org, ccoutant at google dot com
- Date: Wed, 3 Dec 2014 09:28:53 -0800
- Subject: Re: [gold][PATCH] PR gold/17675: pie_copyrelocs_test fails with GCC 4.2
- Authentication-results: sourceware.org; auth=none
- References: <20141203172043 dot GA26576 at intel dot com>
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
On Wed, Dec 03, 2014 at 09:20:43AM -0800, H.J. Lu wrote:
> Hi,
>
> On Linux/x86-64 with GCC 4.2, I got
>
> /usr/gcc-4.2/bin/g++ -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -Bgcctestdir/ -Wl,-R,. -pie -o pie_copyrelocs_test pie_copyrelocs_test.o pie_copyrelocs_shared_test.so -ldl -lz
> gcctestdir/ld: error: pie_copyrelocs_test.o: requires dynamic R_X86_64_32 reloc against '__gxx_personality_v0' which may overflow at runtime; recompile with -fPIC
> collect2: ld returned 1 exit status
> make[7]: *** [pie_copyrelocs_test] Error 1
>
> This patch replaces pie_copyrelocs_test.cc with pie_copyrelocs_test.S.
> OK for trunk?
>
> Thanks.
>
> H.J.
> ---
> PR gold/17675
> * configure.ac: Add AM_PROG_AS.
> * testsuite/Makefile.am (pie_copyrelocs_test_SOURCES): Replace
> pie_copyrelocs_test.cc with pie_copyrelocs_test.S.
> * testsuite/pie_copyrelocs_test.cc: Removed.
> * testsuite/pie_copyrelocs_test.S: New file.
>
> * aclocal.m4: Regenerated.
> * configure: Likewise.
> * Makefile.in: Likewise.
> * testsuite/Makefile.in: Likewise.
Never mind. Assembly testcase doesn't work for none x86-64 targerts.
H.J.