PIC questions
Kostik Belousov
kostikbel at gmail.com
Tue Oct 31 09:03:21 UTC 2006
On Tue, Oct 31, 2006 at 12:26:31PM +0400, Michael Bushkov wrote:
> Hi,
> I've got 2 questions about PIC.
>
> 2. And theoretical question. Does every object that will be linked into the
> shared library should be built with PIC enabled?
This is not so theoretical. This is required, for instance, for amd64. Because
compiler by default generates so called small code model where text and data
of object shall live in lower 2 Gb of address space. Solaris linker will give
warnings when relocations are to big to fit into signed 32-bit location. Our
linker will silently ignore overflow. This will result in either core dump
(if you lucky), or data corruption.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20061031/3ce9e6ee/attachment-0001.pgp
More information about the freebsd-hackers
mailing list