On 8/31/22 17:49, Jeff Law wrote:
> 
> 
> On 8/22/2022 3:39 AM, Martin Liška wrote:
>> On 4/28/22 18:10, Jeff Law via Gcc-patches wrote:
>>> As I mentioned in the original thread, my change to pr94157_0 was an 
>>> attempt to avoid these warnings by passing a magic flag to the linker.  Of 
>>> course we may not be using GNU ld.  Or we may be on a non-elf target where 
>>> the flag I used doesn't exist.  Or we may even be on a ELF target where 
>>> those bits weren't added to the linker (frv).  Furthermore, we need fixes 
>>> to all the nested function tests as well.
>>>
>>> So even though I initially resisted pruning the warning, that seems like 
>>> the best course of action.  So this patch removes my recent change to 
>>> pr94157_0 and instead uses our pruning facilities.
>>>
>>> I'll be pushing this to the trunk and gcc-12 branch.
>>>
>>> Jeff
>> Hello.
>>
>> I noticed this patch during my GCC test-suite run with mold linker. As you 
>> likely now, the linker defaults
>> to non-executable stack and so one sees test-suite crashes (not only 
>> warnings) [1].
>>
>> So the question is if we want to explicitly fix all tests that rely on 
>> exectack? Or is it something
>> we can assume as it's what GNU linkers do?
>>
>> List of affected tests:
>> https://gist.githubusercontent.com/marxin/aadb75408a5a7867bf9fb26e879ce4c4/raw/aff2a0e4559e2dba8ea358520ca836eda6e7dc70/gistfile1.txt
> The problem I ran into was that there wasn't a good way to determine what to 
> do, even if we know the test was going to need execstack. We can't just 
> blindly pass the magic flag to the linker -- at the least that would need to 
> be conditional on the linker being used as well as the target as some of the 
> ELF targets don't have the linker infrastructure.  And given that the linker 
> can vary across gnu-ld, gold, mold, it's a rats nest.

Makes sense. So far the simplest approach seems to me modifying mold and 
allowing execstack. Unfortunately,
the author does not want to introduce a new configure option.

Martin

> 
> jeff
> 

Reply via email to