The BFD linker adds the symbol versioning string to the symbol name in symtab.
Skip the versioning part in order to find the registered PLT function.
Vladislav Khmelevsky,
Advanced Software Technology Lab, Huawei
Differential D122039
[BOLT] Fix plt relocations symbol match yota9 on Mar 18 2022, 1:57 PM. Authored by
Details
The BFD linker adds the symbol versioning string to the symbol name in symtab. Vladislav Khmelevsky,
Diff Detail
Event TimelineComment Actions Can you please follow the example of compiler-rt to check that bfd is available on the test system and only enable the new test if it is?
Comment Actions Summary: s/linkeradds/linker adds/ and s/symbtab/symtab/
Comment Actions @yota9, regarding the tests - will we be able to detect the change in behavior on non-aarch64 (x86) platform? I.e. will any of the tests fail without the fix? Comment Actions @maksfb I see your point. From the one hand we have a fix. From the other hand the tests are common for x86 and aarch64, i.e. it doesn't check the fix, it checks the overall possibility to work with PLT properly. Ideally we should have aarch64 machine available for testing, we've got this task in the backlog and Elvina should start investigation on aarch64 buildbot soon. As for now I would like these runtime tests to exist, but I will add one more non-runtime aarch64-specific test (that is using BOLT asm dump) so we will be able to check it on non-arm platform Comment Actions @yota9, sorry, AArch64/plt_gnu_ld.test wouldn't build on x86. Could you use YAML and yaml2obj for the test?
Comment Actions @maksfb I don't see the reason, everything works for me. Do you use this patch with your aarch64 tests changes? The nostdlib flag should be passed from your patch, I don't see any other problem to run the test on x86. Comment Actions @maksfb You were right, after rebase on your patch I've got the problems too. |
nit: could you use PLT (all caps) in function names to be consistent with the rest of the code in BOLT?