This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Is the current ld brolen? (Re: ld is broken on Linux/alpha)
On Sun, Nov 25, 2001 at 12:44:47PM -0500, Jakub Jelinek wrote:
> On Sat, Nov 24, 2001 at 11:24:39PM -0800, H . J . Lu wrote:
> > Does your gcc support SHF_MERGE/STT_SECTION?
>
> Surely I was.
>
> > Did you see the linker messages during the build?
>
> I missed them in the log but now I'm seeing there too:
>
> .section .rodata.str1.1,"aMS",@progbits,1
> .LC0:
> .string "."
> ...
> leal 5+.LC0@GOTOFF(%ebx), %ecx
>
> No idea why it takes address 3 bytes beyond end of the string.
> (in C there is strcpy(buf, "."); ).
I'll bet this is due to glibc's strcpy optimisations. See
include/bits/string2.h, __strcpy_args. Some of what should be dead code
does access beyond the string, by why the dead code isn't being trimmed
off is another queation.
Alan