From owner-freebsd-arch@FreeBSD.ORG Wed Nov 5 13:19:44 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4E4FA29; Wed, 5 Nov 2014 13:19:44 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 309DC84D; Wed, 5 Nov 2014 13:19:44 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id sA5DJdwc076615 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 5 Nov 2014 15:19:39 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua sA5DJdwc076615 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id sA5DJdkH076614; Wed, 5 Nov 2014 15:19:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 5 Nov 2014 15:19:39 +0200 From: Konstantin Belousov To: Shawn Webb Subject: Re: PIE/PIC support on base Message-ID: <20141105131939.GF53947@kib.kiev.ua> References: <315B4DC5-0E04-4F6B-BBB0-477D049025BF@bsdimp.com> <20141105090215.GF10388@ivaldir.etoilebsd.net> <20141105092614.GB53947@kib.kiev.ua> <20141105114855.GH10388@ivaldir.etoilebsd.net> <20141105122612.GC53947@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: Baptiste Daroussin , FreeBSD Arch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2014 13:19:44 -0000 On Wed, Nov 05, 2014 at 07:59:21AM -0500, Shawn Webb wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > > > On November 5, 2014 7:26:12 AM EST, Konstantin Belousov wrote: > >On Wed, Nov 05, 2014 at 12:48:55PM +0100, Baptiste Daroussin wrote: > >> > Also, I strongly oppose compiling everything with PIC, even on > >amd64. > >> > I described somewhere else that using PIC code changes symbol > >lookup > >> > rules for binaries. So despite not having performance impact, the > >> > thing does impact runtime behaviour in subtle ways. The most > >affected > >> > programs are those which support dynamic modules. > >Please do not ignore this ^^^^^^ issue. > > > > Can you go into detail what those changes are? PIE binary resolves its symbols through GOT/PLT. In particular, it is possible to interpose the symbols.