Re: PIC is wasteful

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

 



When a shared object is shared between two processes, there will be two instances of the writable data sections, but both mapped to the same logical address, as I understand it.

If I compile a shared object with -fno-pic in 32-bit x86 there will be absolute addresses in the code section needing relocation. What happens if this library is shared between two processes? Will I get two instances of the code section, or will the system recognize that these relocated references are identical in all processes because they refer to data sections that are all mapped to the same logical address?

In 64 bit mode, I have to compile with -fpie which makes relative addresses in the code section. All absolute references are in data sections and exception handler tables, so I guess there is no issue here.


[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