From owner-freebsd-current@FreeBSD.ORG Wed Feb 4 06:21:18 2015 Return-Path: Delivered-To: freebsd-current@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 DAB4F1B7; Wed, 4 Feb 2015 06:21:17 +0000 (UTC) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A1C5FF22; Wed, 4 Feb 2015 06:21:17 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id et14so106398359pad.4; Tue, 03 Feb 2015 22:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=xsxypjR3vT0ULde1tdSZLTMubQsu6HtJW7jaMfggxkU=; b=IeuEo1sdsdw+0F8ag7pETlPHQ8rFuOkgQHUc2jwPRcnH/0M3DtWh2xntCNnKByI9AZ jnnwiyEeC+6mKCV9kCgvlnyxZ/Wimpj8tl+2I4y5XcoHRWHy19Yda3RTSqiSqmGXGkuF Ox39A2Q+H0bywT4Z1UcxpyQg1ZJf64zIozBFsNubGKb/Un2psC5CrClbYFXN2WV9VgKN d/d7ssPoLt4vKqxEBEf5tzWZnTmPE2WYYkQv2P5WjVzRJhk35nSAarEQgZCAnheM0CPN ojY0aP27Pu2qs+MX79hba7rAMRUuJG87rxGNIk+7pXo5BL1AWo8jgmad7EPXhK383CVJ AaGQ== X-Received: by 10.70.15.2 with SMTP id t2mr43491290pdc.47.1423030876856; Tue, 03 Feb 2015 22:21:16 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:ed1d:c80e:52ee:11f? ([2601:8:ab80:7d6:ed1d:c80e:52ee:11f]) by mx.google.com with ESMTPSA id oq2sm779333pbb.60.2015.02.03.22.21.15 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 22:21:16 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_3BB99CA0-506E-49B2-BFF5-F2CCFE22528E"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: libc.so dependency on libssp_nonshared.a From: Garrett Cooper In-Reply-To: <20150203074709.GA1091@reks> Date: Tue, 3 Feb 2015 22:21:14 -0800 Message-Id: <3DB0C643-31FE-44D6-8AB4-4CE007062C55@gmail.com> References: <20150201202413.GA2132@reks> <20150203074709.GA1091@reks> To: Gleb Kurtsou X-Mailer: Apple Mail (2.1878.6) Cc: Jeremie Le Hen , freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Feb 2015 06:21:18 -0000 --Apple-Mail=_3BB99CA0-506E-49B2-BFF5-F2CCFE22528E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Feb 2, 2015, at 23:47, Gleb Kurtsou wrote: > On (02/02/2015 17:06), Jeremie Le Hen wrote: >> Hi Gleb, >> On Sun, Feb 1, 2015 at 9:24 PM, Gleb Kurtsou = wrote: >>> I came across some build issues in libc.so and SSP. >>>=20 >>> libc.ldscript (aka libc.so) unconditionally includes = @@LIBDIR@@/libssp_nonshared.a >>>=20 >>> libssp* are not built if WITHOUT_SSP defined. >>>=20 >>> ObsoleteFiles.inc doesn't mention libssp*. >>>=20 >>> Consider WITHOUT_SSP=3Dyes case. As soon as one does clean = installworld >>> and/or removes stale libssp_nonshared.a ld fails to link anything >>> because of missing libssp_nonshared.a >>=20 >> I think nowadays it would make sense to get it of WITHOUT_SSP >> altogether. This will turn this into a non-issue. >=20 > Do you mean building libssp_nonshared unconditionally? It makes = perfect > sense. The library is a single stub function. >=20 > By building libssp* conditionally we may expect that -fstack-protector > complier option won't work. I wasn't able to reproduce this potential > problem. libc provides __stack_chk_fail and __stack_chk_guard. And I > failed to create a test case that would generate code using anything > like __memcpy_chk. >=20 > Perhaps we should change MK_SSP to operate as documented (add > -fstack-protector to CFLAGS) and consider adding MK_SSP_SUPPORT option > for libraries. Although there is no reason to have MK_SSP_SUPPORT if > that would imply failure to run binaries or compile with > -fstack-protector. Silly question: shouldn=92t libc.ldscript be built, conditionally with = libssp_nonshared.a? Doing that would be trivial=85 Are there any = concerns with doing this? --Apple-Mail=_3BB99CA0-506E-49B2-BFF5-F2CCFE22528E Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJU0bpaAAoJEMZr5QU6S73erTcH/0PNYosODssohyO77gp6bgTQ DI5cfSwxdDlsCXzm/atsyIkFR/vxn1qAaE2dGZ0y5NYsxwGXyEkdLQ0QPY2Xy1/Q tcZnmHY6P40DitVQLg35BwB+kOIMRgGA8rt50AuW2KswXrGkTWjzRjPOqU0uypSB GTe4fBlq2W4nEBQb4oHBipmi97dT949KvveR4t5wOGURn4zREm4JfyjQfdPX2hg7 px/+jmn4X5w/4H6ZhMUPA4yg2LBaxtAQqva6NuJ3nbWMmb4P/pXVudfNHF7G6SLv gZR7WuCUDmUwL2etoAhwXAvmuSIyPOY2eJxDCuel5HEXj6B80WkMKuyyfoVfZCI= =atbj -----END PGP SIGNATURE----- --Apple-Mail=_3BB99CA0-506E-49B2-BFF5-F2CCFE22528E--