1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/test/Object/nm-shared-object.test
James Henderson a9c28d33d4 [llvm-nm] Tidy up error messages
This adds colons to separate the file name from the message, removes a
duplicate space, and removes a trailing full stop from some messages.
These help bring the error messages into line with other tools, as well
as making all llvm-nm message more self-consistent.

Differential Revision: https://reviews.llvm.org/D96601

Reviewed by: Higuoxing, rupprecht, MaskRay
2021-02-15 13:54:08 +00:00

51 lines
1.5 KiB
Plaintext

# RUN: llvm-nm -D %p/Inputs/shared-object-test.elf-i386 \
# RUN: | FileCheck %s -check-prefix ELF-32
# RUN: llvm-nm --dynamic %p/Inputs/shared-object-test.elf-i386 \
# RUN: | FileCheck %s -check-prefix ELF-32
# ELF-32-NOT: U
# ELF-32: 000012c8 A __bss_start
# ELF-32: 000012c8 A _edata
# ELF-32: 000012cc A _end
# ELF-32: 000012c8 B common_sym
# ELF-32: 000012c4 D defined_sym
# ELF-32: 000001f0 T global_func
# ELF-32: 00000000 D tls_sym
# RUN: llvm-nm -D %p/Inputs/shared-object-test.elf-x86-64 \
# RUN: | FileCheck %s -check-prefix ELF-64
# RUN: llvm-nm --dynamic %p/Inputs/shared-object-test.elf-x86-64 \
# RUN: | FileCheck %s -check-prefix ELF-64
# ELF-64-NOT: U
# ELF-64: 0000000000200454 A __bss_start
# ELF-64: 0000000000200454 A _edata
# ELF-64: 0000000000200458 A _end
# ELF-64: 0000000000200454 B common_sym
# ELF-64: 0000000000200450 D defined_sym
# ELF-64: 00000000000002f0 T global_func
# ELF-64: 0000000000000000 D tls_sym
# RUN: not llvm-nm -D %p/Inputs/weak-global-symbol.macho-i386 2>&1 \
# RUN: | FileCheck %s -check-prefix ERROR
# RUN: not llvm-nm -D %p/Inputs/trivial-object-test.coff-i386 2>&1 \
# RUN: | FileCheck %s -check-prefix ERROR
# ERROR: File format has no dynamic symbol table
# RUN: yaml2obj %s -o %t.elf-i386
# RUN: llvm-nm -D %t.elf-i386 2>&1 | FileCheck %s -check-prefix=NO-SYMBOLS
# NO-SYMBOLS: no symbols
--- !ELF
FileHeader:
Class: ELFCLASS32
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_386
Symbols:
- Name: foo
Binding: STB_GLOBAL