Skip to content
Commit 2212e900 authored by Fangrui Song's avatar Fangrui Song
Browse files

[ELF,LTO] Test calloc defined in a lazy bitcode file for (malloc+memset =>...

[ELF,LTO] Test calloc defined in a lazy bitcode file for (malloc+memset => calloc) libcall optimization

Similar to https://reviews.llvm.org/D50017: malloc+memset references can
be combined to a calloc reference, which is not explicit in the
referencer's IR symbol table. If calloc is defined in a lazy bitcode
file, we should extract the archive member to satisfy possible
references from LTO generated object files; otherwise (current status,
which will be fixed by #72673), `calloc` as a LazyObject symbol will be
resolved by compileBitcodeFiles generated Undefined, leading to an
incorrectly-extracted Defined symbol without section, which will lower
to an SHN_ABS symbol at address 0.
parent 9fa2d74b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment