This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] Re: more plugin testsuite issues
- From: Alan Modra <amodra at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Dave Korn <dave dot korn dot cygwin at gmail dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 17 Nov 2010 09:31:15 +1030
- Subject: Re: [PATCH] Re: more plugin testsuite issues
- References: <20101026045431.GB5348@bubble.grove.modra.org> <4CC70CDB.9060202@gmail.com> <20101028081642.GK31277@bubble.grove.modra.org> <4CD2E0C1.2060304@gmail.com> <4CD31374.5060702@gmail.com> <m2r5el3p5i.fsf@igel.home>
On Tue, Nov 16, 2010 at 11:00:09PM +0100, Andreas Schwab wrote:
> Dave Korn <dave.korn.cygwin@gmail.com> writes:
>
> > +# Rather than having libs we just define dummy values for anything
> > +# we may need to link a target exe; we aren't going to run it anyway.
> > +set libs "[ld_simple_link_defsyms] --defsym ${_}printf=0 --defsym ${_}puts=0"
>
> That does not work.
>
> /home/andreas/src/binutils/binutils/ld/testsuite/ld-plugin/main.c:11: relocation truncated to fit: R_PPC_REL24 against symbol `puts' defined in *ABS* section in tmpdir/main.x
That reminds me. I've had this in my tree for a while but hadn't
committed it.
* ld-plugin/plugin.exp: Define printf and puts as main.
Index: ld/testsuite/ld-plugin/plugin.exp
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-plugin/plugin.exp,v
retrieving revision 1.5
diff -u -p -r1.5 plugin.exp
--- ld/testsuite/ld-plugin/plugin.exp 5 Nov 2010 07:23:09 -0000 1.5
+++ ld/testsuite/ld-plugin/plugin.exp 16 Nov 2010 22:50:52 -0000
@@ -87,7 +87,7 @@ set testobjfiles "tmpdir/main.o tmpdir/f
set testobjfiles_notext "tmpdir/main.o tmpdir/func.o"
# Rather than having libs we just define dummy values for anything
# we may need to link a target exe; we aren't going to run it anyway.
-set libs "[ld_simple_link_defsyms] --defsym ${_}printf=0 --defsym ${_}puts=0"
+set libs "[ld_simple_link_defsyms] --defsym ${_}printf=${_}main --defsym ${_}puts=${_}main"
set plugin_tests [list \
[list "load plugin" "-plugin $plugin_path \
--
Alan Modra
Australia Development Lab, IBM