From owner-freebsd-hackers@FreeBSD.ORG Tue Oct 31 08:26:52 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 A03A616A415 for ; Tue, 31 Oct 2006 08:26:52 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from mail.r61.net (mail.r61.net [195.208.245.249]) by mx1.FreeBSD.org (Postfix) with ESMTP id E8DAD43D49 for ; Tue, 31 Oct 2006 08:26:51 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from stinger.cc.rsu.ru (stinger.cc.rsu.ru [195.208.252.82]) (authenticated bits=0) by mail.r61.net (8.13.8/8.13.8) with ESMTP id k9V8Qmq9092824 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 31 Oct 2006 11:26:48 +0300 (MSK) (envelope-from bushman@freebsd.org) From: Michael Bushkov Organization: Rostov State University To: freebsd-hackers@freebsd.org Date: Tue, 31 Oct 2006 12:26:31 +0400 User-Agent: KMail/1.9.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610311126.32121.bushman@freebsd.org> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on asterix.r61.net X-Virus-Status: Clean Subject: PIC questions X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Michael Bushkov 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 08:26:52 -0000 Hi, I've got 2 questions about PIC. 1. NO_PIC variable. It is defined in several places across the system sources. As an example: ./lib/libcompat/Makefile:NO_PIC= ./lib/libdisk/Makefile:NO_PIC= ./lib/libstand/Makefile:NO_PIC= ./lib/liby/Makefile:NO_PIC= What are the reasons for explicitly setting this variable in these libraries? I mean - as they are static, do we need to explicitly set NO_PIC there? 2. And theoretical question. Does every object that will be linked into the shared library should be built with PIC enabled? -- With best regards, Michael Bushkov