Date: Tue, 3 Feb 2015 22:21:14 -0800 From: Garrett Cooper <yaneurabeya@gmail.com> To: Gleb Kurtsou <gleb@freebsd.org> Cc: Jeremie Le Hen <jlh@FreeBSD.org>, freebsd-current@freebsd.org Subject: Re: libc.so dependency on libssp_nonshared.a Message-ID: <3DB0C643-31FE-44D6-8AB4-4CE007062C55@gmail.com> In-Reply-To: <20150203074709.GA1091@reks> References: <20150201202413.GA2132@reks> <CAGSa5y0LFURkF2urpuDWXxib65qxF7a-5ZYA_SU_YOfU_h=GGg@mail.gmail.com> <20150203074709.GA1091@reks>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Feb 2, 2015, at 23:47, Gleb Kurtsou <gleb@freebsd.org> wrote: > On (02/02/2015 17:06), Jeremie Le Hen wrote: >> Hi Gleb, >> On Sun, Feb 1, 2015 at 9:24 PM, Gleb Kurtsou <gleb@freebsd.org> wrote: >>> I came across some build issues in libc.so and SSP. >>> >>> libc.ldscript (aka libc.so) unconditionally includes @@LIBDIR@@/libssp_nonshared.a >>> >>> libssp* are not built if WITHOUT_SSP defined. >>> >>> ObsoleteFiles.inc doesn't mention libssp*. >>> >>> Consider WITHOUT_SSP=yes 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 >> >> I think nowadays it would make sense to get it of WITHOUT_SSP >> altogether. This will turn this into a non-issue. > > Do you mean building libssp_nonshared unconditionally? It makes perfect > sense. The library is a single stub function. > > 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. > > 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’t libc.ldscript be built, conditionally with libssp_nonshared.a? Doing that would be trivial… Are there any concerns with doing this? [-- Attachment #2 --] -----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-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DB0C643-31FE-44D6-8AB4-4CE007062C55>
