llvm.org GIT mirror llvm / fceaf76
[llvm-readobj] Change -t to --symbols in tests. NFC -t is --symbols in llvm-readobj but --section-details (unimplemented) in readelf. The confusing option should not be used since we aim for improving compatibility. Keep just one llvm-readobj -t use case in test/tools/llvm-readobj/symbols.test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359661 91177308-0d34-0410-b5e6-96231b3b80d8 Fangrui Song 8 months ago
155 changed file(s) with 181 addition(s) and 181 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llc %s -mtriple=armv7-linux-gnueabi -filetype=obj -o - | \
1 ; RUN: llvm-readobj -S -t | FileCheck -check-prefix=OBJ %s
1 ; RUN: llvm-readobj -S --symbols | FileCheck -check-prefix=OBJ %s
22 ; RUN: llc %s -mtriple=armv7-linux-gnueabi -o - | \
33 ; RUN: FileCheck -check-prefix=ASM %s
44
0 ; RUN: llc -verify-machineinstrs -O0 -mcpu=pwr7 -filetype=obj %s -o - | \
1 ; RUN: llvm-readobj -t | FileCheck %s
1 ; RUN: llvm-readobj --symbols | FileCheck %s
22
33 target datalayout = "E-p:64:64:64-S0-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-n32:64"
44 target triple = "powerpc64-unknown-linux-gnu"
22 ; RUN: llc <%s -march=sparc -relocation-model=pic | FileCheck %s --check-prefix=pic
33 ; RUN: llc <%s -march=sparcv9 -relocation-model=pic | FileCheck %s --check-prefix=pic
44
5 ; RUN: llc <%s -march=sparc -relocation-model=static -filetype=obj | llvm-readobj -r -t | FileCheck %s --check-prefix=v8abs-obj
6 ; RUN: llc <%s -march=sparcv9 -relocation-model=static -filetype=obj | llvm-readobj -r -t | FileCheck %s --check-prefix=v9abs-obj
7 ; RUN: llc <%s -march=sparc -relocation-model=pic -filetype=obj | llvm-readobj -r -t | FileCheck %s --check-prefix=pic-obj
8 ; RUN: llc <%s -march=sparcv9 -relocation-model=pic -filetype=obj | llvm-readobj -r -t | FileCheck %s --check-prefix=pic-obj
5 ; RUN: llc <%s -march=sparc -relocation-model=static -filetype=obj | llvm-readobj -r --symbols | FileCheck %s --check-prefix=v8abs-obj
6 ; RUN: llc <%s -march=sparcv9 -relocation-model=static -filetype=obj | llvm-readobj -r --symbols | FileCheck %s --check-prefix=v9abs-obj
7 ; RUN: llc <%s -march=sparc -relocation-model=pic -filetype=obj | llvm-readobj -r --symbols | FileCheck %s --check-prefix=pic-obj
8 ; RUN: llc <%s -march=sparcv9 -relocation-model=pic -filetype=obj | llvm-readobj -r --symbols | FileCheck %s --check-prefix=pic-obj
99
1010 @local_symbol = internal thread_local global i32 0
1111 @extern_symbol = external thread_local global i32
11
22 ; RUN: llc < %s -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu
33 ; RUN: llvm-dwarfdump -v %t | FileCheck --check-prefix=CHECK --check-prefix=SINGLE %s
4 ; RUN: llvm-readobj -S -t %t | FileCheck --check-prefix=OBJ_SINGLE %s
4 ; RUN: llvm-readobj -S --symbols %t | FileCheck --check-prefix=OBJ_SINGLE %s
55
66 ; RUN: llc < %s -split-dwarf-file=foo.dwo -o %t -filetype=obj -O0 -generate-type-units -mtriple=x86_64-unknown-linux-gnu
77 ; RUN: llvm-dwarfdump -v %t | FileCheck --check-prefix=CHECK --check-prefix=FISSION %s
8 ; RUN: llvm-readobj -S -t %t | FileCheck --check-prefix=OBJ_FISSION %s
8 ; RUN: llvm-readobj -S --symbols %t | FileCheck --check-prefix=OBJ_FISSION %s
99
1010 ; Generated from bar.cpp:
1111
0 ; RUN: opt -module-summary %s -o %t.o
11 ; RUN: llvm-lto2 run -o %t1.o %t.o -r %t.o,patatino,pr
2 ; RUN: llvm-readobj -t %t1.o.1 | FileCheck %s
2 ; RUN: llvm-readobj --symbols %t1.o.1 | FileCheck %s
33
44 ; CHECK: Name: patatino
55 ; CHECK-NEXT: Value:
0 ; RUN: llvm-as %s -o %t.o
11 ; RUN: llvm-lto2 run -o %t1.o %t.o -r %t.o,bar,pr
2 ; RUN: llvm-readobj -t %t1.o.0 | FileCheck %s
2 ; RUN: llvm-readobj --symbols %t1.o.0 | FileCheck %s
33
44 ; CHECK: Name: bar
55 ; CHECK-NEXT: Value:
0 # RUN: llvm-mc -filetype=obj -assemble \
11 # RUN: -triple=aarch64- %s -o - \
2 # RUN: | llvm-readobj -S -t - | FileCheck %s
2 # RUN: | llvm-readobj -S --symbols - | FileCheck %s
33 # CHECK: Name: $d.1 ({{[1-9][0-9]+}})
44 # CHECK-NEXT: Value: 0x4
55 # CHECK-NEXT: Size: 0
0 // RUN: llvm-mc -triple=arm64-none-linux-gnu -show-encoding < %s | FileCheck %s
11 // RUN: llvm-mc -triple=arm64-none-linux-gnu -filetype=obj < %s -o - | \
2 // RUN: llvm-readobj -r -t | FileCheck --check-prefix=CHECK-ELF %s
2 // RUN: llvm-readobj -r --symbols | FileCheck --check-prefix=CHECK-ELF %s
33
44 ////////////////////////////////////////////////////////////////////////////////
55 // TLS initial-exec forms
11 ; RUN: | FileCheck %s -check-prefix CHECK-ASM
22
33 ; RUN: llc -mtriple arm64-windows -filetype obj -o - %s \
4 ; RUN: | llvm-readobj -t | FileCheck %s -check-prefix CHECK-OBJECT
4 ; RUN: | llvm-readobj --symbols | FileCheck %s -check-prefix CHECK-OBJECT
55
66 define arm_aapcs_vfpcc void @external() {
77 entry:
0 // RUN: llvm-mc -triple=aarch64-none-linux-gnu -show-encoding < %s | FileCheck %s
11 // RUN: llvm-mc -triple=aarch64-none-linux-gnu -filetype=obj < %s -o - | \
2 // RUN: llvm-readobj -r -t | FileCheck --check-prefix=CHECK-ELF %s
2 // RUN: llvm-readobj -r --symbols | FileCheck --check-prefix=CHECK-ELF %s
33
44 // TLS local-dynamic forms
55 movz x1, #:dtprel_g2:var
0 # RUN: llvm-mc -filetype=obj -assemble \
11 # RUN: -triple=arm-arm-none-eabi -mcpu=cortex-a9 %s -o - \
2 # RUN: | llvm-readobj -S -t - | FileCheck %s
2 # RUN: | llvm-readobj -S --symbols - | FileCheck %s
33 # CHECK: Name: $d.1 ({{[1-9][0-9]+}})
44 # CHECK-NEXT: Value: 0x4
55 # CHECK-NEXT: Size: 0
None @ RUN: llvm-mc -filetype=obj -triple arm-none-linux-gnueabi %s -o - | llvm-readobj -r -t | FileCheck %s
1 @ RUN: llvm-mc -filetype=obj -triple thumb-none-linux-gnueabi %s -o - | llvm-readobj -r -t | FileCheck %s
0 @ RUN: llvm-mc -filetype=obj -triple arm-none-linux-gnueabi %s -o - | llvm-readobj -r --symbols | FileCheck %s
1 @ RUN: llvm-mc -filetype=obj -triple thumb-none-linux-gnueabi %s -o - | llvm-readobj -r --symbols | FileCheck %s
22
33 defined1:
44 defined2:
11 ; RUN: | FileCheck %s -check-prefix CHECK-ASM
22
33 ; RUN: llc -mtriple thumbv7-windows-itanium -filetype obj -o - %s \
4 ; RUN: | llvm-readobj -t | FileCheck %s -check-prefix CHECK-OBJECT
4 ; RUN: | llvm-readobj --symbols | FileCheck %s -check-prefix CHECK-OBJECT
55
66 define arm_aapcs_vfpcc void @external() {
77 entry:
0 ;; RUN: llc -verify-machineinstrs \
11 ;; RUN: -mtriple=armv7-linux-gnueabi -filetype=obj %s -o - | \
2 ;; RUN: llvm-readobj -t | FileCheck -check-prefix=ARM %s
2 ;; RUN: llvm-readobj --symbols | FileCheck -check-prefix=ARM %s
33
44 ;; RUN: llc -verify-machineinstrs \
55 ;; RUN: -mtriple=thumbv7-linux-gnueabi -filetype=obj %s -o - | \
6 ;; RUN: llvm-readobj -t | FileCheck -check-prefix=TMB %s
6 ;; RUN: llvm-readobj --symbols | FileCheck -check-prefix=TMB %s
77
88 ;; Ensure that if a jump table is generated that it has Mapping Symbols
99 ;; marking the data-in-code region.
0 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
1 @ RUN: | llvm-readobj -S --sd --sr -t | FileCheck %s
1 @ RUN: | llvm-readobj -S --sd --sr --symbols | FileCheck %s
22
33 @ Check the .group section for the function in comdat section.
44
0 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
1 @ RUN: | llvm-readobj -S --sd --sr -t > %t
1 @ RUN: | llvm-readobj -S --sd --sr --symbols > %t
22 @ RUN: FileCheck %s < %t
33 @ RUN: FileCheck --check-prefix=RELOC %s < %t
44
0 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
1 @ RUN: | llvm-readobj -S --sd --sr -t > %t
1 @ RUN: | llvm-readobj -S --sd --sr --symbols > %t
22 @ RUN: FileCheck %s < %t
33 @ RUN: FileCheck --check-prefix=RELOC %s < %t
44
0 @ RUN: llvm-mc %s -triple=armv7-unknown-linux-gnueabi -filetype=obj -o - \
1 @ RUN: | llvm-readobj -S --sd --sr -r -t | FileCheck %s
1 @ RUN: | llvm-readobj -S --sd --sr -r --symbols | FileCheck %s
22
33 @ Check whether the section is switched back or not.
44
0 // RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi \
1 // RUN: -filetype=obj -o - | llvm-readobj -S --sd -r -t | \
1 // RUN: -filetype=obj -o - | llvm-readobj -S --sd -r --symbols | \
22 // RUN: FileCheck %s
33
44 // We want to test relocatable thumb function call.
0 @@ test st_value bit 0 of thumb function
11 @ RUN: llvm-mc %s -triple=thumbv7-linux-gnueabi -filetype=obj -o - | \
2 @ RUN: llvm-readobj -t | FileCheck %s
2 @ RUN: llvm-readobj --symbols | FileCheck %s
33 .syntax unified
44 .text
55 .globl foo
33 @ for st_other should always be 0.
44
55 @ RUN: llvm-mc < %s -triple thumbv5-linux-gnueabi -filetype=obj -o - \
6 @ RUN: | llvm-readobj -t | FileCheck %s
6 @ RUN: | llvm-readobj --symbols | FileCheck %s
77
88 .syntax unified
99 .text
None @ RUN: llvm-mc -triple armv7-elf -filetype obj -o - %s | llvm-readobj -t \
0 @ RUN: llvm-mc -triple armv7-elf -filetype obj -o - %s | llvm-readobj --symbols \
11 @ RUN: | FileCheck %s
22
33 .syntax unified
None @ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj -t \
0 @ RUN: llvm-mc -triple armv7-eabi -filetype obj -o - %s | llvm-readobj --symbols \
11 @ RUN: | FileCheck %s
22
33 @ RUN: llvm-mc -triple armv7-eabi -filetype asm -o - %s \
0 # RUN: llvm-mc -triple i386-unknown-unknown %s -I %p -filetype obj -o - \
1 # RUN: | llvm-readobj -t | FileCheck %s
1 # RUN: | llvm-readobj --symbols | FileCheck %s
22
33 rock:
44 movl $42, %eax
0 # RUN: llvm-mc -triple i386-unknown-unknown %s -filetype obj -o - \
1 # RUN: | llvm-readobj -t | FileCheck %s
1 # RUN: | llvm-readobj --symbols | FileCheck %s
22
33 .end
44
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o - | llvm-readobj -S -t --sd --addrsig | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o - | llvm-readobj -S --symbols --sd --addrsig | FileCheck %s
11
22 // CHECK: Name: .llvm_addrsig
33 // CHECK-NEXT: VirtualSize: 0x0
0 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - \
1 // RUN: | llvm-readobj -t -r | FileCheck %s
1 // RUN: | llvm-readobj --symbols -r | FileCheck %s
22
33 local1:
44 external_aliased_to_local = local1
0 // This test checks that the COFF object emitter works for the most basic
11 // programs.
22
3 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -S --sr --sd -t | FileCheck %s
3 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -S --sr --sd --symbols | FileCheck %s
44
55 .def _main;
66 .scl 2;
0 // This test checks that the COFF object emitter works for the most basic
11 // programs.
22
3 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -S --sr --sd -t | FileCheck %s
3 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -S --sr --sd --symbols | FileCheck %s
44
55 .def _main;
66 .scl 2;
None // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj --symbols | FileCheck %s
11
22 .lcomm _a,4,4
33 .comm _b, 4, 2
0 # RUN: llvm-mc -triple i686-windows -g -filetype obj -o - %s \
1 # RUN: | llvm-readobj -S -t | FileCheck %s
1 # RUN: | llvm-readobj -S --symbols | FileCheck %s
22
33 .section .rdata
44
None // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 "@feat.00" = 123
33 .globl @feat.00
0 // Test section manipulation via .linkonce directive.
11 //
2 // RUN: llvm-mc -triple i386-pc-win32 -filetype=obj %s | llvm-readobj -S -t | FileCheck %s
3 // RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -S -t | FileCheck %s
2 // RUN: llvm-mc -triple i386-pc-win32 -filetype=obj %s | llvm-readobj -S --symbols | FileCheck %s
3 // RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -S --symbols | FileCheck %s
44
55 .section s1
66 .linkonce
None // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-readobj -t -r | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s -o - | llvm-readobj --symbols -r | FileCheck %s
11
22 .data
33 .globl test1_foo
None // RUN: llvm-mc -triple i386-pc-win32 -filetype=obj %s | llvm-readobj -S -t | FileCheck %s
1 // RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -S -t | FileCheck %s
0 // RUN: llvm-mc -triple i386-pc-win32 -filetype=obj %s | llvm-readobj -S --symbols | FileCheck %s
1 // RUN: llvm-mc -triple x86_64-pc-win32 -filetype=obj %s | llvm-readobj -S --symbols | FileCheck %s
22
33 .section assocSec, "dr", discard, "assocSym"
44 .global assocSym
11 // (@foo: alias @bar) generate the correct entries in the symbol table.
22 // They should be identical except for the name.
33
4 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
5 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s
4 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj --symbols | FileCheck %s
5 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj --symbols | FileCheck %s
66
77 .def _foo;
88 .scl 2;
0 // The purpose of this test is to see if the COFF object writer is emitting the
11 // proper relocations for multiple pieces of data in a single data fragment.
22
3 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -S --sr --sd -t | FileCheck %s
3 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -h -S --sr --sd --symbols | FileCheck %s
44
55 .def _main;
66 .scl 2;
0 // The purpose of this test is to see if the COFF object writer is emitting the
11 // proper relocations for multiple pieces of data in a single data fragment.
22
3 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -S --sr --sd -t | FileCheck %s
3 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -h -S --sr --sd --symbols | FileCheck %s
44
55 .def _main;
66 .scl 2;
33
44 ; Check that we can roundtrip these names through our assembler,
55 ; in both at&t and intel syntax.
6 ; RUN: llc -mtriple=i686-pc-win32 %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj -t | FileCheck %s --check-prefix=READOBJ
7 ; RUN: llc -mtriple=i686-pc-win32 -x86-asm-syntax=intel %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj -t | FileCheck %s --check-prefix=READOBJ
6 ; RUN: llc -mtriple=i686-pc-win32 %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj --symbols | FileCheck %s --check-prefix=READOBJ
7 ; RUN: llc -mtriple=i686-pc-win32 -x86-asm-syntax=intel %s -o - | llvm-mc -triple i686-pc-win32 -filetype=obj | llvm-readobj --symbols | FileCheck %s --check-prefix=READOBJ
88
99
1010 @"\01??__E_Generic_object@?$_Error_objects@H@std@@YAXXZ" = global i32 0
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o %t.o
1 // RUN: llvm-readobj -t %t.o | FileCheck %s
1 // RUN: llvm-readobj --symbols %t.o | FileCheck %s
22
33 // test that we create an external symbol for a to point to.
44
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s -o %t.o
1 // RUN: llvm-readobj -t %t.o | FileCheck %s
1 // RUN: llvm-readobj --symbols %t.o | FileCheck %s
22
33 // test that b and .weak.b have the correct values.
44
0 // This tests that default-null weak symbols (a GNU extension) are created
11 // properly via the .weak directive.
22
3 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj -t | FileCheck %s
4 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj -t | FileCheck %s
3 // RUN: llvm-mc -filetype=obj -triple i686-pc-win32 %s | llvm-readobj --symbols | FileCheck %s
4 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-win32 %s | llvm-readobj --symbols | FileCheck %s
55
66 .def _main;
77 .scl 2;
None // RUN: llvm-mc -filetype=obj -triple arm-eabi %s -o - | llvm-readobj -S -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple arm-eabi %s -o - | llvm-readobj -S --symbols | FileCheck %s
11 // Test that global variables and functions are assigned correct section.
22 .text
33 .syntax unified
0 // RUN: llvm-mc -filetype=obj -triple thumbv7m-arm-linux-gnu %s -o - \
1 // RUN: | llvm-readobj -S -t | FileCheck %s
1 // RUN: | llvm-readobj -S --symbols | FileCheck %s
22
33 .text
44 bx lr
0 // RUN: llvm-mc -filetype=obj -triple thumbv7m-arm-linux-gnu %s -o - \
1 // RUN: | llvm-readobj -S -t | FileCheck %s
1 // RUN: | llvm-readobj -S --symbols | FileCheck %s
22
33 .section .text,"axy",%progbits,unique,0
44 .globl foo
0 // RUN: llvm-mc -filetype=obj -triple thumbv7m-arm-linux-gnu %s -o - \
1 // RUN: | llvm-readobj -S -t | FileCheck %s
1 // RUN: | llvm-readobj -S --symbols | FileCheck %s
22
33 .text
44 .ascii "test"
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that zed will be an ABS symbol
33
0 // RUN: llvm-mc -filetype=asm -triple x86_64-pc-linux-gnu %s -o - | FileCheck --check-prefix=ASM %s
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S -t --sd --addrsig | FileCheck %s
2 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -split-dwarf-file %t.dwo -o - | llvm-readobj -S -t --sd --addrsig | FileCheck %s
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols --sd --addrsig | FileCheck %s
2 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -split-dwarf-file %t.dwo -o - | llvm-readobj -S --symbols --sd --addrsig | FileCheck %s
33 // RUN: llvm-readobj -S %t.dwo | FileCheck --check-prefix=DWO %s
44
55 // CHECK: Name: .llvm_addrsig
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r --symbols | FileCheck %s
11
22 // Test that this produces a R_X86_64_PLT32 with bar.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 foo:
33 bar = foo
None // RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -h -S -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple i686-pc-linux-gnu %s -o - | llvm-readobj -h -S -r --symbols | FileCheck %s
11
22 .text
33 .globl main
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -h -S -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -h -S -r --symbols | FileCheck %s
11
22 .text
33 .globl main
None # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S -t --sd --elf-cg-profile | FileCheck %s
0 # RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols --sd --elf-cg-profile | FileCheck %s
11
22 .section .test,"aw",@progbits
33 a: .word b
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols | FileCheck %s
11
22 // Test that we produce two foo sections, each in separate groups
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S -t --sd | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols --sd | FileCheck %s
11
22 // Test that we produce the group sections and that they are before the members
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22
33 .text
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that a STT_FILE symbol and a symbol of the same name can coexist.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that the STT_FILE symbol precedes the other local symbols.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r --symbols | FileCheck %s
11
22 // Test that this produces the correct relocations R_X86_64_GOT32 and that we,
33 // unlike gas, don't create a _GLOBAL_OFFSET_TABLE_ symbol as a side effect.
None // RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -triple i386-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj --symbols | FileCheck %s
11
22 .lcomm A, 5
33 .lcomm B, 32 << 20
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S -r --symbols | FileCheck %s
11
22 // Test that relocations with local symbols are represented as relocations
33 // with the section. They should be equivalent, but gas behaves like this.
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
11 // RUN: llvm-readobj -S %t | FileCheck --check-prefix=SECTIONS %s
2 // RUN: llvm-readobj -t %t | FileCheck --check-prefix=SYMBOLS %s
2 // RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOLS %s
33
44 // Test that we create a .symtab_shndx if a symbol points to a section
55 // numbered SHN_LORESERVE (0xFF00) or higher.
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
1 // RUN: llvm-readobj -t %t | FileCheck --check-prefix=SYMBOLS %s
1 // RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOLS %s
22 // RUN: llvm-nm %t | FileCheck --check-prefix=NM %s
33
44 // Test that symbol a has a section that could be confused with common (0xFFF2)
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o %t
11 // RUN: llvm-readobj -S %t | FileCheck --check-prefix=SECTIONS %s
2 // RUN: llvm-readobj -t %t | FileCheck --check-prefix=SYMBOLS %s
2 // RUN: llvm-readobj --symbols %t | FileCheck --check-prefix=SYMBOLS %s
33
44 // Test that we don't create a .symtab_shndx since we are one section short of
55 // SHN_LORESERVE (0xFF00).
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t - | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols - | FileCheck %s
11
22 // Test that a variable declared with "var = other_var + cst" is in the same
33 // section as other_var and its value is the value of other_var + cst.
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r --symbols | FileCheck %s
11
22 // CHECK: Relocations [
33 // CHECK-NEXT: Section ({{[^ ]+}}) {{[^ ]+}} {
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that both foo and bar are undefined.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --sd -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --sd --symbols | FileCheck %s
11
22 // Test that we do not relax these.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --sr -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --sr --symbols | FileCheck %s
11
22 // When doing a rename, all the checks for where the relocation should go
33 // should be performed with the original symbol. Only if we decide to relocate
0 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux-gnu %s -o - \
1 // RUN: | llvm-readobj -S -t | FileCheck %s
1 // RUN: | llvm-readobj -S --symbols | FileCheck %s
22
33 .section .text, "0x806", %progbits, unique, 0
44 .section .comment, "0x21"
0 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux-gnu %s -o - \
1 // RUN: | llvm-readobj -S -t | FileCheck --check-prefix=OBJ %s
1 // RUN: | llvm-readobj -S --symbols | FileCheck --check-prefix=OBJ %s
22
33 // RUN: not llvm-mc -filetype=asm -triple=x86_64-pc-linux-gnu %s -o - 2>&1 \
44 // RUN: | FileCheck --check-prefix=ASM %s
0 // RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux-gnu %s -o - \
1 // RUN: | llvm-readobj -S -t | FileCheck --check-prefix=OBJ %s
1 // RUN: | llvm-readobj -S --symbols | FileCheck --check-prefix=OBJ %s
22
33 // RUN: llvm-mc -filetype=asm -triple=x86_64-pc-linux-gnu %s -o - \
44 // RUN: | FileCheck --check-prefix=ASM %s
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S -t -r --expand-relocs | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -S --symbols -r --expand-relocs | FileCheck %s
11
22 .section foo, "aG", @progbits, f1, comdat
33 .section foo, "G", @progbits, f2, comdat
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t -r --expand-relocs | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols -r --expand-relocs | FileCheck %s
11
22 // Test that we can forward reference a section.
33
0 // RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -o - | FileCheck %s
1 // RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s --check-prefix=OBJ
1 // RUN: llvm-mc -triple x86_64-pc-linux-gnu %s -filetype=obj -o - | llvm-readobj --symbols | FileCheck %s --check-prefix=OBJ
22
33 .section .text,"ax",@progbits,unique, 4294967293
44 .globl f
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that we emit the correct value.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux < %s | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux < %s | llvm-readobj --symbols | FileCheck %s
11
22 foo:
33 bar = .
None // RUN: llvm-mc -triple i686-pc-linux -filetype=obj %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -triple i686-pc-linux -filetype=obj %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // MC allows ?'s in symbol names as an extension.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-windows-elf %s -o - | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-windows-elf %s -o - | llvm-readobj -r --symbols | FileCheck %s
11
22 // Verify that MSVC C++ mangled symbols are not affected by the ELF
33 // GNU-style symbol versioning. The ELF format is used on Windows by
0 // Regression test for PR23914.
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
1 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r --symbols | FileCheck %s
22
33 defined:
44 .symver defined, aaaaaaaaaaaaaaaaaa@@@AAAAAAAAAAAAA
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r --symbols | FileCheck %s
11
22 defined1:
33 defined2:
None // RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple i386-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that all symbols are of type STT_TLS.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that all symbols are of type STT_TLS.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t - | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols - | FileCheck %s
11
22 // This tests that types are propagated from symbols to their aliases. Our
33 // behavior is a bit different than gas. If the type of a symbol changes,
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that both % and @ are accepted.
33 .global foo
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test which symbols should be in the symbol table
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Test that this produces a weak undefined symbol.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 .weakref bar,foo
33 call bar@PLT
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -r --symbols | FileCheck %s
11
22 // Test that the relocations point to the correct symbols.
33
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // This is a long test that checks that the aliases created by weakref are
33 // never in the symbol table and that the only case it causes a symbol to
None # RUN: llvm-mc -filetype=obj -triple=msp430 %s | llvm-readobj -t - | FileCheck %s
0 # RUN: llvm-mc -filetype=obj -triple=msp430 %s | llvm-readobj --symbols - | FileCheck %s
11
22 foo:
33 .refsym __hook
0 @ RUN: llvm-mc -n -triple armv7-apple-darwin10 %s -filetype=obj -o %t.obj
1 @ RUN: llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.obj > %t.dump
1 @ RUN: llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.obj > %t.dump
22 @ RUN: FileCheck < %t.dump %s
33
44 .syntax unified
0 @ RUN: llvm-mc -n -triple thumbv7-apple-darwin10 %s -filetype=obj -o %t.obj
1 @ RUN: llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.obj > %t.dump
1 @ RUN: llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.obj > %t.dump
22 @ RUN: FileCheck < %t.dump %s
33
44 .syntax unified
None // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 _bar:
33 nop
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 _text_a:
33 xorl %eax,%eax
None // RUN: llvm-mc -triple x86_64-apple-darwin -filetype=obj %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin -filetype=obj %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // CHECK: Symbol {
33 // CHECK: Name: _foo
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .comm sym_comm_B, 2
33 .comm sym_comm_A, 4
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o %t.o
1 // RUN: llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.o > %t.dump
1 // RUN: llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.o > %t.dump
22 // RUN: FileCheck < %t.dump %s
33
44 _a:
None // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .text
33
None // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .data
33
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 direction_labels:
33 10: nop
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 _b:
33 _c = 0
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 // Note, this test intentionally mismatches Darwin 'as', which loses the
33 // following global marker.
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 nop
33 .section __TEXT,__StaticInit,regular,pure_instructions
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -t --file-headers -S --macho-indirect-symbols --macho-dysymtab --macho-segment | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --symbols --file-headers -S --macho-indirect-symbols --macho-dysymtab --macho-segment | FileCheck %s
11
22 name:
33 .byte 0
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .byte 0
33
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 movl $a, b
33
None // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11 _g:
22 LFB2:
33 .section __TEXT,__eh_frame,coalesced,no_toc+strip_static_syms+live_support
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .reference sym_ref_A
33 .reference sym_ref_def_A
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 // FIXME: We are missing a lot of diagnostics on this kind of stuff which the
33 // assembler has.
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck -check-prefix CHECK-X86_32 %s
1 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck -check-prefix CHECK-X86_64 %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck -check-prefix CHECK-X86_32 %s
1 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck -check-prefix CHECK-X86_64 %s
22
33 sym_local_B:
44 .globl sym_globl_def_B
None // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .tbss _a$tlv$init, 4
33 .tbss _b$tlv$init, 4, 3
None // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11 .tdata
22 _a$tlv$init:
33 .long 4
None // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -save-temp-labels -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -save-temp-labels -o - | llvm-readobj --symbols | FileCheck %s
11
22 _f0:
33 .long 0
None // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .section __TEXT,__text,regular,pure_instructions
33 .section __DATA,__thread_data,thread_local_regular
None // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .tdata
33 _a$tlv$init:
None // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .tlv
33 .globl _a
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .long 0
33 text_def_int:
0 // RUN: llvm-mc -triple i386-apple-darwin10 %s -filetype=obj -o %t.o
1 // RUN: llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.o > %t.dump
1 // RUN: llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.o > %t.dump
22 // RUN: FileCheck --check-prefix=CHECK-I386 < %t.dump %s
33
44 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o %t.o
5 // RUN: llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.o > %t.dump
5 // RUN: llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols < %t.o > %t.dump
66 // RUN: FileCheck --check-prefix=CHECK-X86_64 < %t.dump %s
77
88 .data
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .section __DATA,__datacoal_nt,coalesced
33 .section __TEXT,__const_coal,coalesced
None // RUN: llvm-mc -triple i386-apple-darwin9 -mcpu=pentiumpro %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 -mcpu=pentiumpro %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 # 1 byte nop test
33 .align 4, 0 # start with 16 byte alignment filled with zeros
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .text
33 L0:
None // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -r --symbols | FileCheck %s
11
22 // rdar://9906375
33 .org 0x100
None // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin10 %s -filetype=obj -o - | llvm-readobj --symbols | FileCheck %s
11
22 .text
33 L0:
None // RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .const
33 .p2align 6
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .text
33 .byte 0 // Align to 2**3 bytes, not 2**1
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .byte 0
33
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 // FIXME: We don't get the order right currently, the assembler first
33 // orders the symbols, then assigns addresses. :(
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --symbols | FileCheck %s
11
22 .zerofill __DATA,__bss,_fill0,1,0
33 .zerofill __DATA,__bss,_a,4,2
None // RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r -t --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
0 // RUN: llvm-mc -triple x86_64-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --file-headers -S --sd -r --symbols --macho-segment --macho-dysymtab --macho-indirect-symbols | FileCheck %s
11
22 .text
33 .align 3
None // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -triple i386-apple-darwin9 %s -filetype=obj -o - | llvm-readobj --symbols | FileCheck %s
11 //
22 // Check that the section itself is aligned.
33
None // RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o - | llvm-readobj --symbols | FileCheck %s
11
22 // Check that the appropriate symbols were created.
33
None // RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o -| llvm-readobj -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux %s -o -| llvm-readobj --symbols | FileCheck %s
11
22
33 .globl f1
0 # RUN: llvm-mc -filetype=obj -triple mipsel-unknown-linux -mcpu=mips32 %s -o - \
1 # RUN: | llvm-readobj -t | FileCheck %s
1 # RUN: | llvm-readobj --symbols | FileCheck %s
22
33 # Symbol bar must be marked as micromips.
44 # CHECK: Name: bar
0 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 \
1 # RUN: -mattr=+micromips -filetype=obj -o - | llvm-readobj -t | FileCheck %s
1 # RUN: -mattr=+micromips -filetype=obj -o - | llvm-readobj --symbols | FileCheck %s
22 .text
33 .set micromips
44 f:
0 # RUN: llvm-mc %s -triple=mipsel-unknown-linux -mcpu=mips32r2 \
1 # RUN: -mattr=+micromips -filetype=obj -o - | llvm-readobj -t | FileCheck %s
1 # RUN: -mattr=+micromips -filetype=obj -o - | llvm-readobj --symbols | FileCheck %s
22 .text
33 .set nomicromips
44 f:
0 // RUN: llvm-mc < %s -filetype=obj -triple powerpc64le-pc-linux | \
1 // RUN: llvm-readobj -t | FileCheck %s
1 // RUN: llvm-readobj --symbols | FileCheck %s
22
33 // This used to crash. Make sure it produce the correct symbol.
44
None // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux < %s | llvm-readobj -r -t | FileCheck %s
0 // RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux < %s | llvm-readobj -r --symbols | FileCheck %s
11
22 // CHECK: Section {{.*}} .rela.text {
33 // CHECK-NEXT: 0x0 R_X86_64_32 d 0x0
0 // RUN: llvm-mc %s -o %t.o -filetype=obj -triple=armv7-pc-linux
1 // RUN: llvm-readobj -t %t.o | FileCheck %s
1 // RUN: llvm-readobj --symbols %t.o | FileCheck %s
22 // RUN: llvm-nm %t.o | FileCheck -allow-empty --check-prefix=NM %s
33
44 // Test that nm doesn't print the mapping symbols
3636 SECTION-NEXT: AddressAlignment:
3737 SECTION-NEXT: EntrySize: 32
3838
39 RUN: not llvm-readobj -t %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
39 RUN: not llvm-readobj --symbols %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE %s
4040 INVALID-SYM-SIZE: invalid sh_entsize
4141
4242 RUN: not llvm-readobj --dyn-symbols %p/Inputs/invalid-sh_entsize.elf 2>&1 | FileCheck --check-prefix=INVALID-DYNSYM-SIZE %s
4343 INVALID-DYNSYM-SIZE: Invalid entity size
4444
45 RUN: not llvm-readobj -t %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-INDEX %s
45 RUN: not llvm-readobj --symbols %p/Inputs/invalid-section-index.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-INDEX %s
4646 INVALID-SECTION-INDEX: invalid section index
4747
4848 RUN: not llvm-readobj -S %p/Inputs/invalid-section-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-SIZE %s
4949 INVALID-SECTION-SIZE: invalid section header entry size (e_shentsize) in ELF header
5050
5151
52 RUN: not llvm-readobj -t %p/Inputs/invalid-symbol-table-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-SIZE %s
52 RUN: not llvm-readobj --symbols %p/Inputs/invalid-symbol-table-size.elf 2>&1 | FileCheck --check-prefix=INVALID-SYMTAB-SIZE %s
5353 INVALID-SYMTAB-SIZE: size is not a multiple of sh_entsize
5454
5555
56 RUN: not llvm-readobj -t %p/Inputs/invalid-xindex-size.elf 2>&1 | FileCheck --check-prefix=INVALID-XINDEX-SIZE %s
56 RUN: not llvm-readobj --symbols %p/Inputs/invalid-xindex-size.elf 2>&1 | FileCheck --check-prefix=INVALID-XINDEX-SIZE %s
5757 INVALID-XINDEX-SIZE: invalid section contents size
5858
59 RUN: not llvm-readobj -t %p/Inputs/invalid-e_shnum.elf 2>&1 | FileCheck --check-prefix=INVALID-SH-NUM %s
59 RUN: not llvm-readobj --symbols %p/Inputs/invalid-e_shnum.elf 2>&1 | FileCheck --check-prefix=INVALID-SH-NUM %s
6060 INVALID-SH-NUM: invalid e_phentsize
6161
62 RUN: not llvm-readobj -t %p/Inputs/invalid-ext-symtab-index.elf-x86-64 2>&1 | \
62 RUN: not llvm-readobj --symbols %p/Inputs/invalid-ext-symtab-index.elf-x86-64 2>&1 | \
6363 RUN: FileCheck --check-prefix=INVALID-EXT-SYMTAB-INDEX %s
6464 INVALID-EXT-SYMTAB-INDEX: index past the end of the symbol table
6565
6969 RUN: FileCheck --check-prefix=INVALID-RELOC-SH-OFFSET %s
7070 INVALID-RELOC-SH-OFFSET: invalid section offset
7171
72 RUN: not llvm-readobj -t %p/Inputs/invalid-section-size2.elf 2>&1 | \
72 RUN: not llvm-readobj --symbols %p/Inputs/invalid-section-size2.elf 2>&1 | \
7373 RUN: FileCheck --check-prefix=INVALID-SECTION-SIZE2 %s
7474 INVALID-SECTION-SIZE2: invalid section offset
7575
76 RUN: not llvm-readobj -t %p/Inputs/invalid-sections-num.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-NUM %s
76 RUN: not llvm-readobj --symbols %p/Inputs/invalid-sections-num.elf 2>&1 | FileCheck --check-prefix=INVALID-SECTION-NUM %s
7777 INVALID-SECTION-NUM: section table goes past the end of file
7878
7979 RUN: not llvm-readobj -r %p/Inputs/invalid-rel-sym.elf 2>&1 | FileCheck --check-prefix=INVALID-REL-SYM %s
None RUN: llvm-readobj -S -t --dyn-syms --dynamic-table --needed-libs \
0 RUN: llvm-readobj -S --symbols --dyn-syms --dynamic-table --needed-libs \
11 RUN: %p/Inputs/shared-object-test.elf-i386 \
22 RUN: | FileCheck %s -check-prefix ELF
3 RUN: llvm-readobj -S -t --dyn-syms --dynamic-table --needed-libs \
3 RUN: llvm-readobj -S --symbols --dyn-syms --dynamic-table --needed-libs \
44 RUN: %p/Inputs/shared-object-test.elf-i386 \
55 RUN: | FileCheck %s -check-prefix ELF32
66
7 RUN: llvm-readobj -S -t --dyn-syms --dynamic-table --needed-libs \
7 RUN: llvm-readobj -S --symbols --dyn-syms --dynamic-table --needed-libs \
88 RUN: %p/Inputs/shared-object-test.elf-x86-64 \
99 RUN: | FileCheck %s -check-prefix ELF
10 RUN: llvm-readobj -S -t --dyn-syms --dynamic-table --needed-libs \
10 RUN: llvm-readobj -S --symbols --dyn-syms --dynamic-table --needed-libs \
1111 RUN: %p/Inputs/shared-object-test.elf-x86-64 \
1212 RUN: | FileCheck %s -check-prefix ELF64
1313
55 ; RUN: -r %t1.bc,foo,l \
66 ; RUN: -r %t1.bc,bar,p \
77 ; RUN: -r %t1.bc,main,xp
8 ; RUN: llvm-readobj -t %t.o.2 | FileCheck %s
8 ; RUN: llvm-readobj --symbols %t.o.2 | FileCheck %s
99
1010 ; CHECK: Symbol {
1111 ; CHECK: Name: foo
1313 ; RUN: -r %t1.bc,personality_routine3,l \
1414 ; RUN: -r %t1.bc,main,xp \
1515 ; RUN: -r %t1.bc,bar,l
16 ; RUN: llvm-readobj -t %t.o.2 | FileCheck %s --check-prefix=BINDING
16 ; RUN: llvm-readobj --symbols %t.o.2 | FileCheck %s --check-prefix=BINDING
1717
1818 ; BINDING: Symbol {
1919 ; BINDING: Name: personality_routine
33 ; RUN: -m elf_x86_64 \
44 ; RUN: -plugin-opt=save-temps
55 ; RUN: FileCheck --check-prefix=RES %s < %t3.o.resolution.txt
6 ; RUN: llvm-readobj -t %t3.o | FileCheck --check-prefix=OBJ %s
6 ; RUN: llvm-readobj --symbols %t3.o | FileCheck --check-prefix=OBJ %s
77
88 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
99 target triple = "x86_64-unknown-linux-gnu"
11 ; RUN: llvm-as %p/Inputs/pr19901-1.ll -o %t2.o
22 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
33 ; RUN: -shared -m elf_x86_64 -o %t.so %t2.o %t.o
4 ; RUN: llvm-readobj -t %t.so | FileCheck %s
4 ; RUN: llvm-readobj --symbols %t.so | FileCheck %s
55
66 ; CHECK: Symbol {
77 ; CHECK: Name: f
22 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
33 ; RUN: --plugin-opt=thinlto \
44 ; RUN: -shared -m elf_x86_64 -o %t.so %t2.o %t.o
5 ; RUN: llvm-readobj -t %t.so | FileCheck %s
5 ; RUN: llvm-readobj --symbols %t.so | FileCheck %s
66
77 ; CHECK: Symbol {
88 ; CHECK: Name: f
0 ; LTO
11 ; RUN: llvm-as %s -o %t.o
22 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps
3 ; RUN: llvm-readobj -t %t.out | FileCheck %s
3 ; RUN: llvm-readobj --symbols %t.out | FileCheck %s
44 ; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s
55
66 ; ThinLTO
77 ; RUN: opt -module-summary %s -o %t.o
88 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o -o %t.out -wrap=bar -plugin-opt=save-temps
9 ; RUN: llvm-readobj -t %t.out | FileCheck %s
9 ; RUN: llvm-readobj --symbols %t.out | FileCheck %s
1010 ; RUN: cat %t.out.resolution.txt | FileCheck -check-prefix=RESOLS %s
1111
1212 ; CHECK: Name: __wrap_bar
88 ; RUN-TODO: llvm-as %S/Inputs/wrap-bar.ll -o %t1.o
99 ; RUN-TODO: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o %t1.o -shared -o %t.so -wrap=bar
1010 ; RUN-TODO: llvm-objdump -d %t.so | FileCheck %s
11 ; RUN-TODO: llvm-readobj -t %t.so | FileCheck -check-prefix=BIND %s
11 ; RUN-TODO: llvm-readobj --symbols %t.so | FileCheck -check-prefix=BIND %s
1212
1313 ; ThinLTO
1414 ; RUN: opt -module-summary %s -o %t.o
1515 ; RUN: opt -module-summary %S/Inputs/wrap-bar.ll -o %t1.o
1616 ; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext %t.o %t1.o -shared -o %t.so -wrap=bar
1717 ; RUN: llvm-objdump -d %t.so | FileCheck %s -check-prefix=THIN
18 ; RUN: llvm-readobj -t %t.so | FileCheck -check-prefix=BIND %s
18 ; RUN: llvm-readobj --symbols %t.so | FileCheck -check-prefix=BIND %s
1919
2020 ; Make sure that calls in foo() are not eliminated and that bar is
2121 ; routed to __wrap_bar and __real_bar is routed to bar.
44 ; RUN: -m elf_x86_64 \
55 ; RUN: --plugin-opt=save-temps \
66 ; RUN: -shared %t.o %t2.o -o %t.so
7 ; RUN: llvm-readobj -t %t.so | FileCheck %s
7 ; RUN: llvm-readobj --symbols %t.so | FileCheck %s
88 ; RUN: llvm-dis %t.so.0.2.internalize.bc -o - | FileCheck --check-prefix=IR %s
99
1010 ; CHECK: Name: foo
0 # RUN: yaml2obj %s > %t
11 # RUN: llvm-objcopy %t %t2
2 # RUN: llvm-readobj -t %t2 | FileCheck %s
2 # RUN: llvm-readobj --symbols %t2 | FileCheck %s
33
44 ## Check that all values of the null symbol are zeroes.
55
None RUN: yaml2obj %p/Inputs/file-multiple-aux-records.yaml | llvm-readobj -t - | FileCheck %s
0 RUN: yaml2obj %p/Inputs/file-multiple-aux-records.yaml | llvm-readobj --symbols - | FileCheck %s
11
22 CHECK: Symbols [
33 CHECK: Symbol {
None RUN: yaml2obj %p/Inputs/file-aux-record.yaml | llvm-readobj -t - | FileCheck %s
0 RUN: yaml2obj %p/Inputs/file-aux-record.yaml | llvm-readobj --symbols - | FileCheck %s
11
22 CHECK: Symbols [
33 CHECK: Symbol {
0 Ensure that we can read COFF objects with a string table size of 0 (instead
11 of 4) for empty string tables.
22
3 RUN: llvm-readobj -t %p/Inputs/zero-string-table.obj.coff-i386 | FileCheck %s
3 RUN: llvm-readobj --symbols %p/Inputs/zero-string-table.obj.coff-i386 | FileCheck %s
44
55 CHECK: Symbols [
66 CHECK: Symbol {
22 definitions usually only follow a symbol with static storage class, but
33 non-const appdomain globals (external ABS) also get one.
44
5 RUN: llvm-readobj -t %p/Inputs/cxx-cli-aux.obj.coff-i386 | FileCheck %s
5 RUN: llvm-readobj --symbols %p/Inputs/cxx-cli-aux.obj.coff-i386 | FileCheck %s
66
77 CHECK: Symbols [
88 CHECK: Symbol {
None # RUN: yaml2obj %s | not llvm-readobj -t - 2>&1 | FileCheck %s
0 # RUN: yaml2obj %s | not llvm-readobj --symbols - 2>&1 | FileCheck %s
11
22 --- !WASM
33 FileHeader: