1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[JITLink] Add support for STT_NOTYPE symbols to ELF/x86-64.

This commit is contained in:
Lang Hames 2021-03-09 20:34:50 -08:00
parent 5cb9edc2d8
commit ca572d7727
2 changed files with 19 additions and 3 deletions

View File

@ -596,8 +596,8 @@ private:
}
if (SymRef.isDefined() &&
(Type == ELF::STT_FUNC || Type == ELF::STT_OBJECT ||
Type == ELF::STT_SECTION)) {
(Type == ELF::STT_NOTYPE || Type == ELF::STT_FUNC ||
Type == ELF::STT_OBJECT || Type == ELF::STT_SECTION)) {
auto DefinedSection = Obj.getSection(SymRef.st_shndx);
if (!DefinedSection)

View File

@ -106,8 +106,18 @@ test_rex_gotpcrelx:
.size test_rex_gotpcrelx, .-test_rex_gotpcrelx
.type named_data,@object
# Test that relocations to anonymous constant pool entries work.
.globl test_anchor_LCPI
.p2align 4, 0x90
.type test_anchor_LCPI,@function
test_anchor_LCPI:
movq .LCPI0_0(%rip), %rax
.size test_anchor_LCPI, .-test_anchor_LCPI
.data
.type named_data,@object
.p2align 3
named_data:
.quad 42
@ -124,6 +134,12 @@ bss_variable:
.long 0
.size bss_variable, 4
# Constant pool entry with type STT_NOTYPE.
.section .rodata.cst8,"aM",@progbits,8
.p2align 3
.LCPI0_0:
.quad 0x400921fb54442d18
.ident "clang version 10.0.0-4ubuntu1 "
.section ".note.GNU-stack","",@progbits
.addrsig