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: PR ld/15323: Unable to redefine weak function in -flto incrementally-linked executable


On Fri, Mar 29, 2013 at 05:40:50PM -0700, H.J. Lu wrote:
> 	PR ld/15323
> 	* ld-plugin/lto.exp (lto_link_tests): Add pr15323a-r.o.
> 	(lto_run_tests): Add a test for PR ld/15323.
> 
> 	* ld-plugin/pr15323.out: New file.
> 	* ld-plugin/pr15323a.c: Likewise.
> 	* ld-plugin/pr15323b.c: Likewise.

I just had a quick look at this PR, and it seems to me that the real
problem has nothing to do with -r.  Please simplify your testcase to
do without the misleading -r step.

$ gcc -g -O2 -c /src/cygnus/ld/testsuite/ld-plugin/pr15323a.c
$ gcc -flto -g -O2 -c /src/cygnus/ld/testsuite/ld-plugin/pr15323b.c
$ gcc -flto -g -O2 pr15323a.o pr15323b.o 
`foobar' referenced in section `.text.startup' of pr15323a.o: defined in discarded section `.text' of pr15323b.o (symbol from plugin)
collect2: ld returned 1 exit status

-- 
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]