From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 09:03:21 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78BFF16A4DD; Tue, 31 Oct 2006 09:03:21 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (fw.zoral.com.ua [213.186.206.134]) by mx1.FreeBSD.org (Postfix) with ESMTP id CFFC743D7B; Tue, 31 Oct 2006 09:03:08 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k9V8eaHw011590 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 31 Oct 2006 10:40:36 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8) with ESMTP id k9V933qk055769; Tue, 31 Oct 2006 11:03:04 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.8/8.13.8/Submit) id k9V933w8055768; Tue, 31 Oct 2006 11:03:03 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 31 Oct 2006 11:03:03 +0200 From: Kostik Belousov To: Michael Bushkov Message-ID: <20061031090303.GH1627@deviant.kiev.zoral.com.ua> References: <200610311126.32121.bushman@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bpVaumkpfGNUagdU" Content-Disposition: inline In-Reply-To: <200610311126.32121.bushman@freebsd.org> User-Agent: Mutt/1.4.2.2i X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=1.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, SPF_NEUTRAL,UNPARSEABLE_RELAY autolearn=no version=3.1.4 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on fw.zoral.com.ua Cc: freebsd-hackers@freebsd.org Subject: Re: PIC questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 09:03:21 -0000 --bpVaumkpfGNUagdU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 31, 2006 at 12:26:31PM +0400, Michael Bushkov wrote: > Hi, > I've got 2 questions about PIC. >=20 > 2. And theoretical question. Does every object that will be linked into t= he=20 > shared library should be built with PIC enabled? This is not so theoretical. This is required, for instance, for amd64. Beca= use 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 gi= ve 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. --bpVaumkpfGNUagdU Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQFFRxFGC3+MBN1Mb4gRAiV6AKDGNMRdEvo1c3HQmlrT/sY2phoxbwCg2vw6 DA1NCmRg4stNpXwYoUdduTM= =ZRcM -----END PGP SIGNATURE----- --bpVaumkpfGNUagdU--