[0/3] ld: fix three SFrame related bugs

Message ID 20241030225108.3377357-1-indu.bhagat@oracle.com
Headers
Series ld: fix three SFrame related bugs |

Message

Indu Bhagat Oct. 30, 2024, 10:51 p.m. UTC
  Hi,

This patch series fixes three bugs in GNU ld, seen when generating
SFrame for the various plt entries.

Regression tested on x86_64.

At some point, I would like to backport these to the 2.43 branch.

Thanks,
Indu Bhagat (1):
  ld: generate SFrame stack trace info for .plt.got

Josh Poimboeuf (2):
  ld: fix PR/32297
  ld: fix wrong SFrame info for lazy IBT PLT

 bfd/elf64-x86-64.c                        |  74 ++++++++++++--
 bfd/elfxx-x86.c                           | 119 ++++++++++++++++++----
 bfd/elfxx-x86.h                           |   6 ++
 ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d |  33 ++++++
 ld/testsuite/ld-x86-64/sframe-pltgot-1.d  |  28 +++++
 ld/testsuite/ld-x86-64/sframe-pltgot-1.s  |  15 +++
 ld/testsuite/ld-x86-64/sframe-pltgot-2.d  |  28 +++++
 ld/testsuite/ld-x86-64/x86-64.exp         |   3 +
 8 files changed, 278 insertions(+), 28 deletions(-)
 create mode 100644 ld/testsuite/ld-x86-64/sframe-ibt-plt-1.d
 create mode 100644 ld/testsuite/ld-x86-64/sframe-pltgot-1.d
 create mode 100644 ld/testsuite/ld-x86-64/sframe-pltgot-1.s
 create mode 100644 ld/testsuite/ld-x86-64/sframe-pltgot-2.d
  

Comments

Jan Beulich Oct. 31, 2024, 10:20 a.m. UTC | #1
On 30.10.2024 23:51, Indu Bhagat wrote:
> This patch series fixes three bugs in GNU ld, seen when generating
> SFrame for the various plt entries.
> 
> Regression tested on x86_64.
> 
> At some point, I would like to backport these to the 2.43 branch.
> 
> Thanks,
> Indu Bhagat (1):
>   ld: generate SFrame stack trace info for .plt.got
> 
> Josh Poimboeuf (2):
>   ld: fix PR/32297
>   ld: fix wrong SFrame info for lazy IBT PLT

Looks all plausible, so feel free to put in as long as the testsuite was
run on it with sufficient coverage (the respective statement above isn't
quite unambiguous as to less common ELF sub-targets of x86-64, like e.g.
x32).

Jan
  
Indu Bhagat Nov. 1, 2024, 10:20 p.m. UTC | #2
On 10/31/24 3:20 AM, Jan Beulich wrote:
> On 30.10.2024 23:51, Indu Bhagat wrote:
>> This patch series fixes three bugs in GNU ld, seen when generating
>> SFrame for the various plt entries.
>>
>> Regression tested on x86_64.
>>
>> At some point, I would like to backport these to the 2.43 branch.
>>
>> Thanks,
>> Indu Bhagat (1):
>>    ld: generate SFrame stack trace info for .plt.got
>>
>> Josh Poimboeuf (2):
>>    ld: fix PR/32297
>>    ld: fix wrong SFrame info for lazy IBT PLT
> 
> Looks all plausible, so feel free to put in as long as the testsuite was
> run on it with sufficient coverage (the respective statement above isn't
> quite unambiguous as to less common ELF sub-targets of x86-64, like e.g.
> x32).
> 

I had run tests on a subset of x86 targets including x86_64-linux-gnux32.

Thanks for reviewing.
Indu