This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Visibility=hidden for x86_64 Xen builds -- problems?


> 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 100000000 -o test test.o
> 
> Disassembly of the result trivially shows that the address of weak symbol 'x'
> is 0x100000000.

By the way, experimentation with the address of the text section shows that
the weak symbol's address is resolved to the nearest 4GB-aligned address
(nearest to what I'm not sure -- RIP? Section start?). It may get rounded up
or down, whichever is nearest.

 -- Keir



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]