[PATCH] D104080: [LLD][LLVM] CG Graph profile using relocations
Jessica Clarke via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 23 13:36:58 PDT 2021
jrtc27 added inline comments.
================
Comment at: lld/ELF/InputFiles.cpp:674
+ if (sec.sh_info == cgProfileSectionIndex)
+ cgProfileRela = CHECK(getObj().relas(sec), this);
this->sections[i] = createInputSection(sec);
----------------
What if it's SHT_REL? This won't fail nicely, it'll give an error about sh_entsize not matching. You should either handle SHT_REL properly (i.e. support it) or not even attempt to get an Elf_Rela for it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D104080/new/
https://reviews.llvm.org/D104080
More information about the llvm-commits
mailing list