This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: Sandra Loosemore <sandra at codesourcery dot com>, Joseph Myers <joseph at codesourcery dot com>, Richard Biener <rguenther at suse dot de>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 6 Apr 2015 18:54:14 +0300
- Subject: Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX
- Authentication-results: sourceware.org; auth=none
- References: <20150318115630 dot GA64546 at msticlxl57 dot ims dot intel dot com> <CAMbmDYYuG0GAuym4-RVUnX6EWVtjaCuA240HTCef65kU26H6YQ at mail dot gmail dot com> <20150331094702 dot GC52842 at msticlxl57 dot ims dot intel dot com> <alpine dot DEB dot 2 dot 10 dot 1504031932570 dot 29464 at digraph dot polyomino dot org dot uk> <5521E515 dot 2030802 at codesourcery dot com> <20150406151742 dot GA43634 at msticlxl57 dot ims dot intel dot com> <5522A636 dot 9030000 at redhat dot com>
2015-04-06 18:28 GMT+03:00 Jeff Law <law@redhat.com>:
> On 04/06/2015 09:17 AM, Ilya Enkovich wrote:
>>>
>>>
>>> To tell the truth, I can't figure out what this means from a user
>>> perspective. How does a user know whether the linker option is
>>> being ignored, or if they have a new enough linker? If the linker
>>> available at configuration time doesn't support the option, does
>>> that mean the option will never be passed and users will never know
>>> that there are gaping holes in the pointer bounds checking?
>>>
>>> My suggestion would be to pass the option unconditionally and make
>>> the documentation say something like
>>
>>
>> This option was rejected.
>
> Right. There really isn't a good option here because we don't have the
> infrastructure to query the linker's capabilities at link time.
>
> Though I do wonder if we could issue a warning in the case where the
> configure test indicated -z bndplt was not supported.
I thought about such possibility. Just don't see a good place for
that. Probably introduce some WARNING_SPEC which targets may define to
issue a driver warning?
Ilya
>
> It'd obviously mean a link warning every time an end user tried to use that
> toolchain to create a DSO or executable with MPX protection. But that may
> be better than silently leaving some code unprotected.
>
>
> Jeff
>
- References:
- Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX
- Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX
- Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX
- Re: [PATCH, libmpx, i386, PR driver/65444] Pass '-z bndplt' when building dynamic objects with MPX