From: Ken Brown <kbrown@cornell.edu>
To: cygwin@cygwin.com
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.10.0-0.1
Date: Sat, 20 Jan 2018 12:23:00 -0000 [thread overview]
Message-ID: <39045e32-8a2c-c767-0fcd-27d544ba6d93@cornell.edu> (raw)
In-Reply-To: <c5a92ae1-3b63-0227-f170-fa1d0ac959eb@cornell.edu>
On 1/19/2018 10:27 PM, Ken Brown wrote:
> On 1/18/2018 6:28 PM, Ken Brown wrote:
>> On 1/18/2018 4:30 PM, Yaakov Selkowitz wrote:
>>> On 2018-01-18 08:35, Ken Brown wrote:
>>>> On 1/17/2018 5:29 PM, Ken Brown wrote:
>>>>> Do we need a new gcc release to go along with the recent ssp changes?
>>>>
>>>> The following commit message seems to answer my question:
>>>>
>>>> Â Â Â Â Note that this does require building gcc with --disable-libssp and
>>>> Â Â Â Â gcc_cv_libc_provides_ssp=yes.
>>>
>>> Correct.
>>>
>>>> Are there plans to coordinate the release of Cygwin 2.10.0 with a new
>>>> gcc release? In the meantime, I guess package maintainers have to
>>>> build
>>>> with -U_FORTIFY_SOURCE in order to test building with Cygwin
>>>> 2.10.0. Or
>>>> am I missing something?
>>>
>>> -D_FORTIFY_SOURCE is not the default, so simply omitting it is
>>> sufficient.
>>
>> I was talking about building projects in which _FORTIFY_SOURCE is
>> defined by default. That happens, for instance, in the gnulib
>> subdirectory of the emacs tree, so it may affect other projects that
>> use gnulib also.
>>
>>> You could also just delete
>>> /usr/lib/gcc/*-pc-cygwin/6.4.0/include/ssp, since we won't need it
>>> anymore and it wasn't even being used properly in the first place.
>>
>> That's a simpler workaround than what I was doing. Thanks.
>
> Here's another issue that's come up with _FORTIFY_SOURCE. One of the
> emacs source files, fileio.c, makes use of a pointer to readlinkat.
> [More precisely, the file uses an external function foo() with a
> parameter 'bar' that's a pointer to a function; foo is called in
> fileio.c with bar = readlinkat.]
>
> When _FORTIFY_SOURCE > 0, this leads to an "undefined reference to
> `__ssp_protected_readlinkat'" linking error. Does this sound like
> something that will be fixed with the new gcc release?
>
> I realize I haven't given you full details, but it might be a few days
> until I have a chance to extract an STC for this issue, so I thought I'd
> give it a shot.
>
> If you can't answer the question based on the information above, I'll
> make an STC as soon as I can.
I got to this sooner than expected:
$ cat ssp_test.c
#define _FORTIFY_SOURCE 1
#include <unistd.h>
void foo (ssize_t (*preadlinkat) (int, char const *, char *, size_t));
void baz ()
{
foo (readlinkat);
}
$ gcc -c -O1 ssp_test.c
$ objdump -x ssp_test.o | grep readlinkat
6 .rdata$.refptr.__ssp_protected_readlinkat 00000010
0000000000000000 0000000000000000 00000180 2**4
[...]
Ken
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
next prev parent reply other threads:[~2018-01-20 12:23 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 16:59 Corinna Vinschen
2018-01-17 10:42 ` Houder
2018-01-17 10:50 ` Corinna Vinschen
2018-01-17 11:40 ` Houder
2018-01-17 12:07 ` Houder
2018-01-17 22:29 ` Ken Brown
2018-01-18 14:36 ` Ken Brown
2018-01-18 21:30 ` Yaakov Selkowitz
2018-01-18 23:28 ` Ken Brown
2018-01-20 3:27 ` Ken Brown
2018-01-20 12:23 ` Ken Brown [this message]
2018-01-20 23:49 ` Ken Brown
2018-01-24 19:25 ` Ken Brown
2018-01-25 0:16 ` Yaakov Selkowitz
2018-01-25 2:42 ` Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39045e32-8a2c-c767-0fcd-27d544ba6d93@cornell.edu \
--to=kbrown@cornell.edu \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).