On 28/9/06 14:24, "H. J. Lu" <[EMAIL PROTECTED]> wrote:
> On Thu, Sep 28, 2006 at 10:45:38AM +0100, Jan Beulich wrote:
>>
>> 2) Why does the linker silently resolve the (32-bit PC-relative)
>> relocation targeting an undefined weak symbol, yielding at
>> run-time a non-zero address? While I can s
> Compile and link the attached C program as follows. I used gcc-4.1.1 and
> binutils-2.17, but gcc >= 4.0.0 and binutils >= 2.16 probably suffice.
>
> # gcc -fpic -o test.o -c test.c
> # ld -Ttext 1 -o test test.o
>
> Disassembly of the result trivially shows that the address of weak
On 29/9/06 1:40 am, "H. J. Lu" <[EMAIL PROTECTED]> wrote:
> You are asking for impossible:
If the compiler emitted accesses via the GOT for weak symbols then there
wouldn't be a problem. The compiler doesn't know the final link address
though, so it'd have to be conservative. Perhaps it's not wor