aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2021-12-14 13:48:21 -0800
committerDavid Faust <david.faust@oracle.com>2022-01-18 13:20:49 -0800
commit7db42268ce4bc77bc13f13ba0899221747255bb5 (patch)
tree57a9b3828f6e1636b145a6aae83c681a36159dca /libcpp
parent43ec2652134239f83cd4c06bc4d8158acc0721cf (diff)
downloadgcc-7db42268ce4bc77bc13f13ba0899221747255bb5.zip
gcc-7db42268ce4bc77bc13f13ba0899221747255bb5.tar.gz
gcc-7db42268ce4bc77bc13f13ba0899221747255bb5.tar.bz2
bpf: ensure correct string offsets in BTF.ext
BPF CO-RE relocations contain offsets to strings buffered in the BTF string table. These BTF-specific strings are stored in memory in the CTF auxilliary strtab, which at output time is concatenated onto the end of the standard strtab. Previously, these string offsets were computed at the time the relocations were created. But strings could be added to the standard strtab after this point, causing the offsets to no longer be correct. Compute the offsets just before output instead, when they are sure to no longer change. gcc/ChangeLog: * config/bpf/coreout.cc (bpf_core_reloc_add): Do not account for base strtab offset yet as it may change. (output_asm_btfext_core_reloc): Do so here instead. (output_btfext_core_sections): Likewise.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions