Broken .loc directive in GAS
Michal Ludvig
mludvig@suse.cz
Tue Jul 15 15:20:00 GMT 2003
Alan Modra told me that:
> For reference, I've attached the -S output I get from your testcase.
> I suppose it's possible that ld is being confused by your crt*, libgcc
> or libc.
It's unlikely - I did some tests and it turns out that asm produced by
GCC from CVS (mainline and 3.3 release) give correct binary, but asm
generated by gcc-3.3-64 from SuSE 8.2 and by gcc-3.2.2-5 from RedHat 9
give give binaries with overlaps.
I have put some asm sources to: http://tmp.logix.cz/OffBy2/
along with a Makefile.
After you have built all four binaries run 'readelf -wl' on each of them
and compare results. You will see that temp-rh9 and temp-sl82 have
overlapping sequences in temp.cc entry.
At least I hope you'll see it! I tried to run it on RH8, SL8.2 and
Gentoo and everywhere got the same result (different addresses, but
overlapped by 2 bytes).
Is it a GCC or bug or a bug in a linker? Or does it still happening only
in my office?
Michal Ludvig
--
* SuSE CR, s.r.o * mludvig@suse.cz
* (+420) 296.545.373 * http://www.suse.cz
More information about the Binutils
mailing list