[all-commits] [llvm/llvm-project] 097ddd: [BOLT] Fix relocations handling (#100890)
Vladislav Khmelevsky via All-commits
all-commits at lists.llvm.org
Wed Aug 7 05:26:07 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 097ddd3565f830e6cb9d0bb8ca66844b7f3f3cbb
https://github.com/llvm/llvm-project/commit/097ddd3565f830e6cb9d0bb8ca66844b7f3f3cbb
Author: Vladislav Khmelevsky <och95 at yandex.ru>
Date: 2024-08-07 (Wed, 07 Aug 2024)
Changed paths:
M bolt/lib/Rewrite/RewriteInstance.cpp
A bolt/test/AArch64/Inputs/build_id.ldscript
A bolt/test/AArch64/build_id.c
A bolt/test/X86/Inputs/build_id.yaml
A bolt/test/X86/build_id.test
Log Message:
-----------
[BOLT] Fix relocations handling (#100890)
After porting BOLT to RISCV some of the relocations were broken on both
AArch64 and X86.
On AArch64 the example of broken relocations would be GOT, during
handling them, we should replace the symbol to __BOLT_got_zero in order
to address GOT entry, not the symbol that addresses this entry. This is
done further in code, so it is too early to add rel here.
On X86 it is a mistake to add relocations without addend. This is the
exact problem that is raised on #97937. Due to different code generation
I had to use gcc-generated yaml test, since with clang I wasn't able to
reproduce problem.
Added tests for both architectures and made the problematic condition
riscV-specific.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list