On 4/15/19 10:31 AM, Joao Moreira wrote:
> 
> 
> On 4/12/19 1:19 PM, Jeff Law wrote:
>> On 4/11/19 11:18 AM, Joao Moreira wrote:
>>> When -fpatchable-relocation-entry is used, gcc places nops on the
>>> prologue of each compiled function and creates a section named
>>> __patchable_function_entries which holds relocation entries for the
>>> positions in which the nops were placed. As is, gcc creates this
>>> section without the proper section flags, causing crashes in the
>>> compiled program during its load.
>>>
>>> Given the above, fix the problem by creating the section with the
>>> SECTION_WRITE and SECTION_RELRO flags.
>>>
>>> The problem was noticed while compiling glibc with
>>> -fpatchable-function-entry compiler flag. After applying the patch,
>>> this issue was solved.
>>>
>>> This was also tested on x86-64 arch without visible problems under
>>> the gcc standard tests.
>>>
>>> 2019-04-10  Joao Moreira  <jmore...@suse.de>
>>>
>>>     * targhooks.c (default_print_patchable_function_entry): Emit
>>>     __patchable_function_entries section with writable flags to allow
>>>     relocation resolution.
>> OK.  Do you have write access to the GCC repo?
>>
> No.
I went ahead and installed on the trunk for you.  Are you going to be
working on GCC regularly?  If so it might make sense to go ahead and get
that access setup.

Jeff

Reply via email to