Re: [PATCH v4] recordmcount: Correct st_shndx handling

From: Steven Rostedt
Date: Wed Jun 16 2021 - 12:02:46 EST


On Wed, 16 Jun 2021 23:41:26 +0800
Mark-PK Tsai <mark-pk.tsai@xxxxxxxxxxxx> wrote:

> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>
> One should only use st_shndx when >SHN_UNDEF and <SHN_LORESERVE. When
> SHN_XINDEX, then use .symtab_shndx. Otherwise use 0.
>
> This handles the case: st_shndx >= SHN_LORESERVE && st_shndx != SHN_XINDEX.
>
> Reported-by: Mark-PK Tsai <mark-pk.tsai@xxxxxxxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
> Tested-by: Mark-PK Tsai <mark-pk.tsai@xxxxxxxxxxxx>
> [handle endianness of sym->st_shndx]
> Signed-off-by: Mark-PK Tsai <mark-pk.tsai@xxxxxxxxxxxx>
> ---

Thanks, I pulled this in and started the testing.

-- Steve