Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4 |
|
#
5be7f2a9 |
| 29-Aug-2023 |
Fangrui Song <i@maskray.me> |
[MC,AArch64] Suppress local symbol to STT_SECTION conversion for GOT relocations
Assemblers change certain relocations referencing a local symbol to reference the section symbol instead. This conver
[MC,AArch64] Suppress local symbol to STT_SECTION conversion for GOT relocations
Assemblers change certain relocations referencing a local symbol to reference the section symbol instead. This conversion is disabled for many conditions (`shouldRelocateWithSymbol`), e.g. TLS symbol, for most targets (including AArch32, x86, PowerPC, and RISC-V) GOT-generating relocations.
However, AArch64 encodes the GOT-generating intent in MCValue::RefKind instead of MCSymbolRef::Kind (see commit 0999cbd0b9ed8aa893cce10d681dec6d54b200ad (2014)), therefore not affected by the code `case MCSymbolRefExpr::VK_GOT:`. As GNU ld and ld.lld create GOT entries based on the symbol, ignoring addend, the two ldr instructions will share the same GOT entry, which is not expected: ``` ldr x1, [x1, :got_lo12:x] // converted to .data+0 ldr x1, [x1, :got_lo12:y] // converted to .data+4
.data // .globl x, y would suppress STT_SECTION conversion x: .zero 4 y: .long 42 ```
This patch changes AArch64 to suppress local symbol to STT_SECTION conversion for GOT relocations, matching most other targets. x and y will use different GOT entries, which IMO is the most sensable behavior.
With this change, the ABI decision on https://github.com/ARM-software/abi-aa/issues/217 will only affect relocations explicitly referencing STT_SECTION symbols, e.g. ``` ldr x1, [x1, :got_lo12:(.data+0)] ldr x1, [x1, :got_lo12:(.data+4)] // I consider this unreasonable uses ```
IMO all reasonable use cases are unaffected.
Link: https://github.com/llvm/llvm-project/issues/63418 GNU assembler PR: https://sourceware.org/bugzilla/show_bug.cgi?id=30788
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D158577
show more ...
|
Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init, llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1 |
|
#
3a3cb929 |
| 07-Feb-2022 |
Kazu Hirata <kazu@google.com> |
[llvm] Use = default (NFC)
|
Revision tags: llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2 |
|
#
cffce86a |
| 10-Dec-2021 |
Kazushi (Jam) Marukawa <marukawa@nec.com> |
[VE] Support srel32 in symbol reference
Support R_VE_SREL32 in symbol references in MC layer.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D115591
|
#
e71fa033 |
| 05-Dec-2021 |
Kazushi (Jam) Marukawa <marukawa@nec.com> |
[VE] Change error handling of data references
Change to use Ctx.reportError() instead of llvm_unreachable for better error handling. Also correct evaluateAsRelocatableImpl().
Reviewed By: simoll
[VE] Change error handling of data references
Change to use Ctx.reportError() instead of llvm_unreachable for better error handling. Also correct evaluateAsRelocatableImpl().
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D115251
show more ...
|
#
6b41eb7f |
| 28-Nov-2021 |
Kazushi (Jam) Marukawa <marukawa@nec.com> |
[VE] Change to use R_VE_SREL32
Change to use R_VE_SREL32 for relative branch instructions instead of R_VE_PC_LO32 in order to check ranges of relative branch isntructions at link time correctly.
Re
[VE] Change to use R_VE_SREL32
Change to use R_VE_SREL32 for relative branch instructions instead of R_VE_PC_LO32 in order to check ranges of relative branch isntructions at link time correctly.
Reviewed By: simoll
Differential Revision: https://reviews.llvm.org/D115097
show more ...
|
Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4, llvmorg-13.0.0-rc3, llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2, llvmorg-12.0.1-rc1, llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4, llvmorg-12.0.0-rc3, llvmorg-12.0.0-rc2, llvmorg-11.1.0, llvmorg-11.1.0-rc3, llvmorg-12.0.0-rc1, llvmorg-13-init, llvmorg-11.1.0-rc2, llvmorg-11.1.0-rc1, llvmorg-11.0.1, llvmorg-11.0.1-rc2, llvmorg-11.0.1-rc1, llvmorg-11.0.0, llvmorg-11.0.0-rc6, llvmorg-11.0.0-rc5, llvmorg-11.0.0-rc4, llvmorg-11.0.0-rc3, llvmorg-11.0.0-rc2, llvmorg-11.0.0-rc1, llvmorg-12-init, llvmorg-10.0.1, llvmorg-10.0.1-rc4, llvmorg-10.0.1-rc3, llvmorg-10.0.1-rc2 |
|
#
e026f147 |
| 15-Jun-2020 |
Kazushi (Jam) Marukawa <marukawa@nec.com> |
[VE] Support relocation information in MC layer
Summary: Change VEAsmParser to support identification with relocation information in assmebler. Change VEAsmBackend to support relocation information
[VE] Support relocation information in MC layer
Summary: Change VEAsmParser to support identification with relocation information in assmebler. Change VEAsmBackend to support relocation information in MC layer. Change VEDisassembler and VEMCCodeEmitter to support binary generation of branch target operands. Add REFLONG fixup and variant kind to support new R_VE_REFLONG ELF symbol. And, add regression test in both MC and CodeGen to check binary genaration with relocation information.
Differential Revision: https://reviews.llvm.org/D81553
show more ...
|
#
0e0907fa |
| 29-May-2020 |
Kazushi (Jam) Marukawa <marukawa@nec.com> |
[VE] Implements minimum MC layer for VE (4/4)
Summary: This patch includes following items.
- Adds AsmParser and minimum AsmBackend/ELFObjectWriter/MCCodeEmitter to support only LEA instruction
[VE] Implements minimum MC layer for VE (4/4)
Summary: This patch includes following items.
- Adds AsmParser and minimum AsmBackend/ELFObjectWriter/MCCodeEmitter to support only LEA instruction in order to reduce the size of this patch. - Adds regression test of MC layer for a LEA instruction. - Relocations are not supported this time to reduce the size of this patch.
Differential Revision: https://reviews.llvm.org/D79546
show more ...
|