mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 12:19:53 +00:00
Changed the lvm-nm alias "-s" for -print-armap to "-M".
This will allow the "-s" flag to implemented in the future as it is in darwin’s nm(1) to list symbols only in the specified section. Given a LGTM by Shankar Easwaran who originally implemented the support for lvm-nm’s -print-armap and archive map symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212576 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
05bb7c5045
commit
e3108d31e0
@ -1,7 +1,7 @@
|
||||
; RUN: llvm-as %s -o=%t1
|
||||
; RUN: rm -f %t2
|
||||
; RUN: llvm-ar rcs %t2 %t1
|
||||
; RUN: llvm-nm -s %t2 | FileCheck %s
|
||||
; RUN: llvm-nm -M %t2 | FileCheck %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Check if the index is appearing properly in the output file
|
||||
#
|
||||
RUN: llvm-nm -s %p/Inputs/liblong_filenames.a | FileCheck -check-prefix=CHECKIDX %s
|
||||
RUN: llvm-nm -M %p/Inputs/liblong_filenames.a | FileCheck -check-prefix=CHECKIDX %s
|
||||
|
||||
CHECKIDX: Archive map
|
||||
CHECKIDX: abcdefghijklmnopqrstuvwxyz12345678 in 1.o
|
||||
|
@ -1,6 +1,6 @@
|
||||
RUN: rm -f %t.a
|
||||
RUN: llvm-ar rcs %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
|
||||
RUN: llvm-nm -s %t.a | FileCheck %s
|
||||
RUN: llvm-nm -M %t.a | FileCheck %s
|
||||
|
||||
CHECK: Archive map
|
||||
CHECK-NEXT: main in trivial-object-test.elf-x86-64
|
||||
@ -20,17 +20,17 @@ CHECK-NEXT: 0000000000000016 T main
|
||||
|
||||
RUN: rm -f %t.a
|
||||
RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
|
||||
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=NOMAP
|
||||
RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=NOMAP
|
||||
|
||||
NOMAP-NOT: Archive map
|
||||
|
||||
RUN: llvm-ar s %t.a
|
||||
RUN: llvm-nm -s %t.a | FileCheck %s
|
||||
RUN: llvm-nm -M %t.a | FileCheck %s
|
||||
|
||||
check that the archive does have a corrupt symbol table.
|
||||
RUN: rm -f %t.a
|
||||
RUN: cp %p/Inputs/archive-test.a-corrupt-symbol-table %t.a
|
||||
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=CORRUPT
|
||||
RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=CORRUPT
|
||||
|
||||
CORRUPT: Archive map
|
||||
CORRUPT-NEXT: mbin in trivial-object-test.elf-x86-64
|
||||
@ -49,18 +49,18 @@ CORRUPT-NEXT: 0000000000000016 T main
|
||||
|
||||
check that the we *don't* update the symbol table.
|
||||
RUN: llvm-ar s %t.a
|
||||
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=CORRUPT
|
||||
RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=CORRUPT
|
||||
|
||||
repeate the test with llvm-ranlib
|
||||
|
||||
RUN: rm -f %t.a
|
||||
RUN: llvm-ar rcS %t.a %p/Inputs/trivial-object-test.elf-x86-64 %p/Inputs/trivial-object-test2.elf-x86-64
|
||||
RUN: llvm-nm -s %t.a | FileCheck %s --check-prefix=NOMAP
|
||||
RUN: llvm-nm -M %t.a | FileCheck %s --check-prefix=NOMAP
|
||||
|
||||
RUN: llvm-ranlib %t.a
|
||||
RUN: llvm-nm -s %t.a | FileCheck %s
|
||||
RUN: llvm-nm -M %t.a | FileCheck %s
|
||||
|
||||
RUN: llvm-nm -s %p/Inputs/macho-archive-x86_64.a | FileCheck %s --check-prefix=BSD-MachO
|
||||
RUN: llvm-nm -M %p/Inputs/macho-archive-x86_64.a | FileCheck %s --check-prefix=BSD-MachO
|
||||
|
||||
BSD-MachO: Archive map
|
||||
BSD-MachO: _bar in bar.o
|
||||
|
@ -5,7 +5,7 @@
|
||||
# than 15 characters, thus, unlike coff_archive.lib, it has no string
|
||||
# table as the third member.
|
||||
#
|
||||
RUN: llvm-nm --numeric-sort -s %p/Inputs/coff_archive_short.lib | FileCheck -check-prefix=CHECKIDX %s
|
||||
RUN: llvm-nm --numeric-sort -M %p/Inputs/coff_archive_short.lib | FileCheck -check-prefix=CHECKIDX %s
|
||||
|
||||
CHECKIDX: Archive map
|
||||
CHECKIDX: _shortfn1 in short1.obj
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Check if the index is appearing properly in the output file
|
||||
#
|
||||
RUN: llvm-nm --numeric-sort -s %p/Inputs/coff_archive.lib | FileCheck -check-prefix=CHECKIDX %s
|
||||
RUN: llvm-nm --numeric-sort -M %p/Inputs/coff_archive.lib | FileCheck -check-prefix=CHECKIDX %s
|
||||
|
||||
CHECKIDX: Archive map
|
||||
CHECKIDX: ??0invalid_argument@std@@QAE@PBD@Z in Debug\mymath.obj
|
||||
|
@ -30,7 +30,7 @@ RUN: llvm-nm %p/Inputs/archive-test.a-gnu-minimal
|
||||
|
||||
|
||||
And don't crash when asked to print a non-existing symtab.
|
||||
RUN: llvm-nm -s %p/Inputs/archive-test.a-gnu-minimal
|
||||
RUN: llvm-nm -M %p/Inputs/archive-test.a-gnu-minimal
|
||||
|
||||
Don't reject an empty archive.
|
||||
RUN: llvm-nm %p/Inputs/archive-test.a-empty
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# Check if the index is appearing properly in the output file
|
||||
#
|
||||
RUN: llvm-nm -s %p/Inputs/libsimple_archive.a | FileCheck -check-prefix=CHECKIDX %s
|
||||
RUN: llvm-nm -M %p/Inputs/libsimple_archive.a | FileCheck -check-prefix=CHECKIDX %s
|
||||
|
||||
CHECKIDX: Archive map
|
||||
CHECKIDX: abcdefghijklmnopqrstuvwxyz12345678 in 1.o
|
||||
|
@ -129,7 +129,7 @@ cl::opt<bool> WithoutAliases("without-aliases", cl::Hidden,
|
||||
cl::desc("Exclude aliases from output"));
|
||||
|
||||
cl::opt<bool> ArchiveMap("print-armap", cl::desc("Print the archive map"));
|
||||
cl::alias ArchiveMaps("s", cl::desc("Alias for --print-armap"),
|
||||
cl::alias ArchiveMaps("M", cl::desc("Alias for --print-armap"),
|
||||
cl::aliasopt(ArchiveMap));
|
||||
|
||||
cl::opt<bool> JustSymbolName("just-symbol-name",
|
||||
|
Loading…
Reference in New Issue
Block a user