From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 28 22:32:38 2005 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 D1F0316A41F for ; Thu, 28 Jul 2005 22:32:38 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from hydra.bec.de (www.ostsee-abc.de [62.206.222.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 66F3C43D48 for ; Thu, 28 Jul 2005 22:32:38 +0000 (GMT) (envelope-from joerg@britannica.bec.de) Received: from britannica.bec.de (unknown [139.30.252.72]) by hydra.bec.de (Postfix) with ESMTP id E964535707 for ; Fri, 29 Jul 2005 00:32:34 +0200 (CEST) Received: by britannica.bec.de (Postfix, from userid 1001) id 21BAC53ED; Fri, 29 Jul 2005 00:30:31 +0200 (CEST) Date: Fri, 29 Jul 2005 00:30:30 +0200 From: Joerg Sonnenberger To: freebsd-hackers@FreeBSD.org Message-ID: <20050728223030.GA4570@britannica.bec.de> Mail-Followup-To: freebsd-hackers@FreeBSD.org References: <20050705153933.GP73907@obiwan.tataz.chchile.org> <20050726232645.GN1610@obiwan.tataz.chchile.org> <20050727000054.GA15018@britannica.bec.de> <20050727233842.GW1610@obiwan.tataz.chchile.org> <20050728023239.GA21179@britannica.bec.de> <20050728221447.GF68965@obiwan.tataz.chchile.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050728221447.GF68965@obiwan.tataz.chchile.org> User-Agent: Mutt/1.5.6i Cc: Subject: Re: ProPolice symbols in libc or libssp ? 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: Thu, 28 Jul 2005 22:32:38 -0000 On Fri, Jul 29, 2005 at 12:14:47AM +0200, Jeremie Le Hen wrote: > > Make sure you patch the right place and _not_ the shared part. Does the > > attached patch work for you? > > Yes, this worked, thank you ! This implies that libssp must be linked > with -nodefaultlibs option to avoid linking itself against libssp. But > this also prevents it from being linked against libgcc. Is it > something harmful or not (in other words should I manually add -lgcc to > LDFLAGS) ? The problem with linking -lssp is that you normally want to aovid the circular dependency with libc. For static libraries that's not a problem, but for dynamic loading it is a bit nasty. One idea is to build libssp similiar to RTLD by directly linking the necessary parts of libc in, you can use a linker script to hide the symbols. For linking -lssp itself, you could try to exploit "-fno-stack-protector" and use that to not link libssp into. Joerg