This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: No .got section in ELF
Thank you! I've known to how to create a *compat* PIC library, firstly using
`-fvisibility=hidden' in compile command line to hidden all symbols, then
using `objcopy -R' to remove .got section totally! However, assemble result is
just like this
call __i686.get_pc_thunk.bx
addl $_GLOBAL_OFFSET_TABLE_, %ebx // << A.
...
movl %eax, g@GOTOFF(%ebx) // << B.
It seems gcc should do better since both A and B are const, so it's safe to
remove line A as my idea shows.