diff options
author | Hervé Poussineau <hpoussin@reactos.org> | 2025-01-20 07:54:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-20 14:54:43 +0800 |
commit | 3b67383c6cb777e4f37dd1a5af0872843c9ab35a (patch) | |
tree | 769f384ad2810c8d8f35a6fcf3926e9afb8df6e0 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | 84c89d0aa4beff4a4d6c36eda125278c48e41128 (diff) | |
download | llvm-3b67383c6cb777e4f37dd1a5af0872843c9ab35a.zip llvm-3b67383c6cb777e4f37dd1a5af0872843c9ab35a.tar.gz llvm-3b67383c6cb777e4f37dd1a5af0872843c9ab35a.tar.bz2 |
[MC][Mips] Generate required IMAGE_REL_MIPS_PAIR relocation (#120876)
Add the required IMAGE_REL_MIPS_PAIR relocation after
IMAGE_REL_MIPS_REFHI/IMAGE_REL_MIPS_SECRELHI
Microsoft PE/COFF specification says that the IMAGE_REL_MIPS_REFHI
relocation contains "the high 16 bits of the target's 32-bit virtual
address. [...] This relocation must be immediately followed by a PAIR
relocation whose SymbolTableIndex contains a 16-bit displacement which
is added to the upper 16 bits taken from the location being relocated."
Microsoft PE/COFF specification says that the IMAGE_REL_MIPS_SECRELHI
relocation contains "the high 16 bits of the 32-bit offset of the target
from the beginning of its section. A PAIR relocation must immediately
follow this on. The SymbolTableIndex of the PAIR relocation contains a
16-bit displacement, which is added to the upper 16 bits taken from the
location being relocated."
Behavior has been checked against Microsoft C compiler for MIPS.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions