[PATCH/RFC] Fix LD test FAIL: weak symbols on Cygwin

Dave Korn dave.korn.cygwin@googlemail.com
Wed Mar 18 04:42:00 GMT 2009


Dave Korn wrote:

> ... and here's the difference in the generated object file; 'badobj.txt' is
> the objdump output from the version of attrib5.o generated by my patched
> assembler, 'goodobj.txt' from a clean build of gas:

  *facepalm*  No they aren't.  They are mislabelled.  In the diff,


> -  1b:  e8 e4 ff ff ff          call   4 <__f+0x4>

  This is correct, and from unpatched gas, and works when executed.

> +  1b:  e8 00 00 00 00          call   20 <_main+0x1b>

  And this one is incorrect, and jumps to the wrong address at runtime and
asplode.

>                         1c: DISP32      _f

  However I think I was still right about saying I'll have to adjust
pc-relative relocs specially.

    cheers,
      DaveK



More information about the Binutils mailing list