[PPC64] Set the IRelative relocation type.
Set the IRelative relocation type and extend the related test to verify. Differential Revision: https://reviews.llvm.org/D46877 llvm-svn: 333203
This commit is contained in:
parent
0486c8c3af
commit
fd69969e54
|
@ -69,6 +69,7 @@ PPC64::PPC64() {
|
|||
GotRel = R_PPC64_GLOB_DAT;
|
||||
PltRel = R_PPC64_JMP_SLOT;
|
||||
RelativeRel = R_PPC64_RELATIVE;
|
||||
IRelativeRel = R_PPC64_IRELATIVE;
|
||||
GotEntrySize = 8;
|
||||
PltEntrySize = 4;
|
||||
GotPltEntrySize = 8;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# RUN: ld.lld %t.o %t2.so -o %t
|
||||
# RUN: llvm-objdump -D %t | FileCheck %s
|
||||
# RUN: llvm-readelf -dynamic-table %t | FileCheck --check-prefix=DT %s
|
||||
# RUN: llvm-readelf -dyn-relocations %t | FileCheck --check-prefix=DYNREL %s
|
||||
|
||||
# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %s -o %t.o
|
||||
# RUN: llvm-mc -filetype=obj -triple=powerpc64-unknown-linux %p/Inputs/shared-ppc64.s -o %t2.o
|
||||
|
@ -13,6 +14,7 @@
|
|||
# RUN: ld.lld %t.o %t2.so -o %t
|
||||
# RUN: llvm-objdump -D %t | FileCheck %s
|
||||
# RUN: llvm-readelf -dynamic-table %t | FileCheck --check-prefix=DT %s
|
||||
# RUN: llvm-readelf -dyn-relocations %t | FileCheck --check-prefix=DYNREL %s
|
||||
|
||||
# CHECK: Disassembly of section .text:
|
||||
|
||||
|
@ -54,6 +56,14 @@
|
|||
# DT_PLTGOT should point to the start of the .plt section.
|
||||
# DT: 0x0000000000000003 PLTGOT 0x10030000
|
||||
|
||||
# Check that we emit the correct dynamic relocation type for an ifunc
|
||||
# DYNREL: 'PLT' relocation section at offset 0x{{[0-9]+}} contains 48 bytes:
|
||||
# 48 bytes --> 2 Elf64_Rela relocations
|
||||
# DYNREL-NEXT: Offset Info Type Symbol's Value Symbol's Name + Addend
|
||||
# DYNREL-NEXT: {{[0-9a-f]+}} {{[0-9a-f]+}} R_PPC64_JMP_SLOT {{0+}} foo + 0
|
||||
# DYNREL-NEXT: {{[0-9a-f]+}} {{[0-9a-f]+}} R_PPC64_IRELATIVE 10010028
|
||||
|
||||
|
||||
.text
|
||||
.abiversion 2
|
||||
|
||||
|
|
Loading…
Reference in New Issue