This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: more plugin testsuite issues


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]