Re: PIC is wasteful

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/06/11 09:09, Agner Fog wrote:
> 
> When I compile with -fno-exceptions I don't get this error, but instead 
> I get:
> 
> relocation R_X86_64_32 against `a local symbol' can not be used when 
> making a shared object; recompile with -fPIC
> 
> This 'local symbol' is my function in section .eh_frame. Why does it 
> make .eh_frame when I turn off exception handling?

It's an ABI requirement for thread cancellation.

> A further problem in 64 bit mode is that even though I compile with 
> -mcmodel=medium, I get:
> 
> relocation R_X86_64_32 against `VariableName' can not be used when 
> making a shared object; recompile with -fPIC
> 
> Why does it make 32 bit absolute addresses when I specify 
> -mcmodel=medium?

Small symbols are placed in the lower 2G.

Andrew.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux