aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorCupertino Miranda <cupertino.miranda@oracle.com>2024-04-02 12:04:28 +0100
committerCupertino Miranda <cupertino.miranda@oracle.com>2024-04-19 11:09:35 +0100
commitede01dfd9dd85e03dea30402e773c62f0408adbe (patch)
treeed765bc9ec3034a01069cf4548e11d2b0e22c955 /gcc/c
parentd7190d0b9a8e395f46b475e4d525f2b6a0ce4df4 (diff)
downloadgcc-ede01dfd9dd85e03dea30402e773c62f0408adbe.zip
gcc-ede01dfd9dd85e03dea30402e773c62f0408adbe.tar.gz
gcc-ede01dfd9dd85e03dea30402e773c62f0408adbe.tar.bz2
bpf: remove huge memory waste with string allocation.
The BPF backend was allocating an unnecessarily large string when constructing CO-RE relocations for enum types. This patch also verifies that those enumerators are valid for CO-RE, returning an error otherwise. gcc/ChangeLog: * config/bpf/core-builtins.cc (get_index_for_enum_value): Create function. (pack_enum_value): Check for enumerator and error out. (process_enum_value): Correct string allocation.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions