Emit a warning when -z relro is unsupported

Carlos O'Donell carlos@redhat.com
Tue Aug 4 20:57:32 GMT 2020


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 <amodra@gmail.com>
>> 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.



More information about the Binutils mailing list