Closed ElvinaYakubova closed 2 years ago
@ElvinaYakubova, thank you for the fix. Could you please add a test case?
@ElvinaYakubova, thank you for the fix. Could you please add a test case?
Sure, will do
Thanks for the review @rafaelauler, fixed as you suggested. I've added tests and also noticed when trying to import line-number.test, that "#debug line" number doesn't always show the correct value, so I'm trying to fix that as well.
Thanks Elvina! Sorry, I tried to import this but the linter is complaining about formatting of the changes in two other files as well (Relocation.cpp, DWARFRewriter.cpp). Could you run clang-format in the changes introduced there too?
@rafaelauler Sorry for the inconvenience, I fixed it, now everything should be ok.
Committed: 04b81f7fe7dd3fb9dec09f6360ea4f8a1ce4082b.
This patch adds AArch64 relocations handling in case updating of debug sections is enabled.
Refers to https://github.com/facebookincubator/BOLT/pull/253 problem that occurs when update-debug-sections flag is used. Previously, in the updateLineTableOffsets function, only X86 relocation (number 10) was created, and further, that number was passed to the getSizeForType function, which is architecture-dependent, so it tried to find AArch64 relocation with the same number, and it was R_AARCH64_P32_ADR_PREL_LO21.
Elvina Yakubova, Advanced Software Technology Lab, Huawei