[RFA] Fix broken .linkonce

Christopher Faylor me@cgf.cx
Thu Jul 15 13:24:00 GMT 2004

On Mon, Jul 05, 2004 at 09:55:51AM -0700, H. J. Lu wrote:
>On Mon, Jul 05, 2004 at 12:50:52PM -0400, Christopher Faylor wrote:
>> On Sun, Jul 04, 2004 at 07:48:08AM -0700, H. J. Lu wrote:
>> >On Sat, Jul 03, 2004 at 11:11:37PM -0400, Christopher Faylor wrote:
>> >>H.J.  Lu's 2004-05-11 change to subsegs.c caused .linkonce symbols to
>> >>be treated as undeclared, at least for PE.
>> >
>> >Can you add a testcase for it?
>> Can I get confirmation that this is actually the right fix before we
>> start talking about test cases?
>I have used the new binutils to build gcc, glibc and kernel on Linux. I
>don't have any problems. I am trying to understand why/how it is broken
>on PE. A testcase will be very helpful.

Sorry for the delay.  Real world intrusions.

Here's a very simple test case.  It fails with the new version of gas
and succeeds with older versions and after the application of the
previously mentioned patch.

  as -o linkonce.o linkonce.s
  gcc -o linkonce linkonce.o -lcygwin
  linkonce.o(.txt+0x0):fake: undefined reference to `.foo'
  collect2: ld returned 1 exit status


	 .section .foo,"w" 
	 .long	27 
	 .section .txt,"wx" 
	 .long .foo 
	.global	_WinMain@16

More information about the Binutils mailing list