mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
Fix too eager assumption that SHT_GNU_verdef ELF section is going to be
present whenever binary has SHT_GNU_versym section. It seems like either
SHT_GNU_verdef or SHT_GNU_verneed can be used, so failing on missing
SHT_GNU_verdef actually breaks use cases in production.
One specific reported issue, which was used to manually test this fix,
was trying to attach to `readline` function in BASH binary.
Fixes: bb7fa09399 ("libbpf: Support symbol versioning for uprobe")
Reported-by: Liam Wisehart <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Tested-by: Manu Bretelle <[email protected]>
Reviewed-by: Fangrui Song <[email protected]>
Acked-by: Hengqi Chen <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]