1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00
llvm-mirror/test/tools/llvm-nm/ifunc.test
Fangrui Song 6e141a22c9 [llvm-nm] Display defined weak STT_GNU_IFUNC symbols as 'i'
This patch makes the behavior match GNU nm.
Note: undefined STT_GNU_IFUNC symbols use 'U'.

Differential Revision: https://reviews.llvm.org/D95461
2021-01-28 09:46:05 -08:00

41 lines
908 B
Plaintext

## Test that the symbol type of STT_GNU_IFUNC is 'i'.
# RUN: yaml2obj %s -o %t
# RUN: llvm-nm --no-sort %t | FileCheck %s
# CHECK: i ifunc_local
# CHECK-NEXT: i ifunc_global
# CHECK-NEXT: i ifunc_weak
# CHECK-NEXT: U ifunc_undef
# CHECK-NEXT: w ifunc_undef_weak
!ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
Symbols:
- Name: ifunc_local
Type: STT_GNU_IFUNC
Binding: STB_LOCAL
Section: .text
- Name: ifunc_global
Type: STT_GNU_IFUNC
Binding: STB_GLOBAL
Section: .text
- Name: ifunc_weak
Type: STT_GNU_IFUNC
Binding: STB_WEAK
Section: .text
- Name: ifunc_undef
Type: STT_GNU_IFUNC
Binding: STB_GLOBAL
- Name: ifunc_undef_weak
Type: STT_GNU_IFUNC
Binding: STB_WEAK