Re: Emit a warning when -z relro is unsupported

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Emit a warning when -z relro is unsupported

Sourceware - libc-alpha mailing list
* Alan Modra via Libc-alpha:

> From 3425515f19d47eb2e13180fe031d94a9c13ce39b Mon Sep 17 00:00:00 2001
> From: Alan Modra <[hidden email]>
> Date: Wed, 29 Jul 2020 16:28:57 +0930
> Subject: Don't mix linker error messages into edited scripts
>
> * Makerules (shlib.lds): Discard linker warning output.
> (format.lds): Likewise.
>
> diff --git a/Makerules b/Makerules
> index 341db86c7e..ef0fe67d9a 100644
> --- a/Makerules
> +++ b/Makerules
> @@ -557,7 +557,7 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
>   $(LINK.o) -shared -Wl,-O1 \
>    -nostdlib -nostartfiles \
>    $(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \
> -  -Wl,--verbose 2>&1 | \
> +  -Wl,--verbose 2>/dev/null | \
>    sed > $@T \
>        -e '/^=========/,/^=========/!d;/^=========/d' \
>        $(if $(filter yes,$(have-hash-style)), \
> @@ -1073,7 +1073,7 @@ ifneq (unknown,$(output-format))
>  else
>   $(LINK.o) -shared $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
>    $(LDFLAGS.so) $(LDFLAGS-lib.so) \
> -  -x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
> +  -x c /dev/null -o $@.so -Wl,--verbose -v 2>/dev/null \
>   | sed -n -f $< > $@.new
>   test -s $@.new
>   rm -f $@.so

This change looks reasonable to me.  Thanks for tracking this down.

We are in the glibc 2.32, so Carlos as the release manager needs to
approve this.

Florian

Reply | Threaded
Open this post in threaded view
|

Re: Emit a warning when -z relro is unsupported

Sourceware - libc-alpha mailing list
On 7/29/20 12:25 PM, Florian Weimer via Libc-alpha wrote:

> * Alan Modra via Libc-alpha:
>
>> From 3425515f19d47eb2e13180fe031d94a9c13ce39b Mon Sep 17 00:00:00 2001
>> From: Alan Modra <[hidden email]>
>> Date: Wed, 29 Jul 2020 16:28:57 +0930
>> Subject: Don't mix linker error messages into edited scripts
>>
>> * Makerules (shlib.lds): Discard linker warning output.
>> (format.lds): Likewise.
>>
>> diff --git a/Makerules b/Makerules
>> index 341db86c7e..ef0fe67d9a 100644
>> --- a/Makerules
>> +++ b/Makerules
>> @@ -557,7 +557,7 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
>>   $(LINK.o) -shared -Wl,-O1 \
>>    -nostdlib -nostartfiles \
>>    $(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \
>> -  -Wl,--verbose 2>&1 | \
>> +  -Wl,--verbose 2>/dev/null | \
>>    sed > $@T \
>>        -e '/^=========/,/^=========/!d;/^=========/d' \
>>        $(if $(filter yes,$(have-hash-style)), \
>> @@ -1073,7 +1073,7 @@ ifneq (unknown,$(output-format))
>>  else
>>   $(LINK.o) -shared $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
>>    $(LDFLAGS.so) $(LDFLAGS-lib.so) \
>> -  -x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
>> +  -x c /dev/null -o $@.so -Wl,--verbose -v 2>/dev/null \
>>   | sed -n -f $< > $@.new
>>   test -s $@.new
>>   rm -f $@.so
>
> This change looks reasonable to me.  Thanks for tracking this down.
>
> We are in the glibc 2.32, so Carlos as the release manager needs to
> approve this.

I'm testing this fix for inclusion today before I cut the branch.

--
Cheers,
Carlos.

Reply | Threaded
Open this post in threaded view
|

Re: Emit a warning when -z relro is unsupported

Sourceware - libc-alpha mailing list
On 8/4/20 4:57 PM, Carlos O'Donell wrote:

> On 7/29/20 12:25 PM, Florian Weimer via Libc-alpha wrote:
>> * Alan Modra via Libc-alpha:
>>
>>> From 3425515f19d47eb2e13180fe031d94a9c13ce39b Mon Sep 17 00:00:00 2001
>>> From: Alan Modra <[hidden email]>
>>> Date: Wed, 29 Jul 2020 16:28:57 +0930
>>> Subject: Don't mix linker error messages into edited scripts
>>>
>>> * Makerules (shlib.lds): Discard linker warning output.
>>> (format.lds): Likewise.
>>>
>>> diff --git a/Makerules b/Makerules
>>> index 341db86c7e..ef0fe67d9a 100644
>>> --- a/Makerules
>>> +++ b/Makerules
>>> @@ -557,7 +557,7 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
>>>   $(LINK.o) -shared -Wl,-O1 \
>>>    -nostdlib -nostartfiles \
>>>    $(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \
>>> -  -Wl,--verbose 2>&1 | \
>>> +  -Wl,--verbose 2>/dev/null | \
>>>    sed > $@T \
>>>        -e '/^=========/,/^=========/!d;/^=========/d' \
>>>        $(if $(filter yes,$(have-hash-style)), \
>>> @@ -1073,7 +1073,7 @@ ifneq (unknown,$(output-format))
>>>  else
>>>   $(LINK.o) -shared $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
>>>    $(LDFLAGS.so) $(LDFLAGS-lib.so) \
>>> -  -x c /dev/null -o $@.so -Wl,--verbose -v 2>&1 \
>>> +  -x c /dev/null -o $@.so -Wl,--verbose -v 2>/dev/null \
>>>   | sed -n -f $< > $@.new
>>>   test -s $@.new
>>>   rm -f $@.so
>>
>> This change looks reasonable to me.  Thanks for tracking this down.
>>
>> We are in the glibc 2.32, so Carlos as the release manager needs to
>> approve this.
>
> I'm testing this fix for inclusion today before I cut the branch.
 
Fix looks good. I just pushed for glibc 2.32. Thanks Alan!

Reviewed-by: Carlos O'Donell <[hidden email]>

--
Cheers,
Carlos.