diff options
author | Fangrui Song <i@maskray.me> | 2021-04-17 00:29:51 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-04-17 00:29:51 -0700 |
commit | 7c74ce3c686938e95a08a05ea1e2a714eac43167 (patch) | |
tree | bcf28aab4bee5c2fa52f528b13b44d345f8da40c /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | d6de1e1a71406c75a4ea4d5a2fe84289f07ea3a1 (diff) | |
download | llvm-7c74ce3c686938e95a08a05ea1e2a714eac43167.zip llvm-7c74ce3c686938e95a08a05ea1e2a714eac43167.tar.gz llvm-7c74ce3c686938e95a08a05ea1e2a714eac43167.tar.bz2 |
[ELF] --wrap: don't clear sym->isUsedInRegularObj if real->isUsedInRegularObj; set wrap's initial binding to sym's
Fix PR49897: if `__real_foo` has the isUsedInRegularObj bit set, we need to
retain `foo` in .symtab, even if `foo` is undefined. The new behavior will match
GNU ld.
Before the patch, we produced an R_X86_64_JUMP_SLOT relocation referencing the
index 0 undefined symbol, which would be erroed by glibc
(see f96ff3c0f8ebd941b3f6b345164c3d858b781484).
While here, fix another bug: if `__wrap_foo` does not exist, its initial binding
should be `foo`'s.
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
0 files changed, 0 insertions, 0 deletions