diff options
| author | Alex Richardson <alexrichardson@google.com> | 2022-08-09 09:52:41 +0000 |
|---|---|---|
| committer | Alex Richardson <alexrichardson@google.com> | 2022-08-09 09:53:47 +0000 |
| commit | fa210dd67b458f7a11631c7fb2eebb05f4849ce5 (patch) | |
| tree | 3ab35e2a825c73f0709567b5386a421b481baf6c /lldb/source/Plugins/ScriptInterpreter/Python | |
| parent | 9a2b14afa02e46acbc7838bafa8d9e59b7cc86b8 (diff) | |
| download | llvm-fa210dd67b458f7a11631c7fb2eebb05f4849ce5.zip llvm-fa210dd67b458f7a11631c7fb2eebb05f4849ce5.tar.gz llvm-fa210dd67b458f7a11631c7fb2eebb05f4849ce5.tar.bz2 | |
[Thumb] Baseline test for incorrect relocation with -ffunction-sections
When calling a dso_local function, we end up creating a call against the
.Lfoo$local label. This might be converted to a relocation against a
section if there is such a matching one (which is a lot more likely with
-ffunction-sections) and then the LSB (Thumb flag) will be lost.
I originally noticed this with Morello LLVM (which uses the LSB to indicate
a C64 encoding mode function). The missing LSB meant that ld.lld would
insert a thunk that switches encoding mode which then resulted in errors
at runtime since functions were being entered with the wrong encoding mode.
Since the Morello backend is not upstream, I looked if any in-tree
backends could also be affected by the missing STT_FUNC flag and noticed
that Thumb is also affected (although the bug is rather difficult to
trigger - it currently requires inline assembly).
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D131432
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python')
0 files changed, 0 insertions, 0 deletions
