brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.6 KiB · 178315c Raw
74 lines · plain
1## This test checks the warning message when no user specified sections are2## found in the object file.3 4## Test relocatable file.5# RUN: yaml2obj --docnum=1 %s -o %t.1.o6# RUN: yaml2obj --docnum=2 %s -o %t.2.o7 8## - Warn for one section is found case.9# RUN: llvm-objdump --reloc --section=single %t.2.o 2>&1 \10# RUN:   | FileCheck --check-prefix=SINGLE-WARN %s11 12## - Don't warn twice for duplicate missing sections.13# RUN: llvm-objdump --reloc --section=single --section=single %t.2.o 2>&1 \14# RUN:   | FileCheck --check-prefixes=SINGLE-WARN --implicit-check-not=warning: %s15 16## - Don't warn if any user specified section is found.17# RUN: llvm-objdump --reloc --section=.text1 --section=.text2 %t.2.o \18# RUN:   | FileCheck --implicit-check-not=warning: %s19 20## - Warn for each specified section if none of them are found.21# RUN: llvm-objdump --reloc --section=multi1 --section=multi2 %t.2.o 2>&1 \22# RUN:   | FileCheck --check-prefix=MULTI-WARN %s23 24## - Don't warn if the specified section has no name.25# RUN: llvm-objdump --reloc --section="" %t.2.o 2>&1 \26# RUN:   | FileCheck --implicit-check-not=warning: %s27 28## - Warning for --section is applicable for various other options.29# RUN: llvm-objdump --section-headers --section=single %t.2.o 2>&1 \30# RUN:   | FileCheck --check-prefix=SINGLE-WARN %s31# RUN: llvm-objdump --full-contents --section=single %t.2.o 2>&1 \32# RUN:   | FileCheck --check-prefix=SINGLE-WARN %s33 34## Test archive file.35# RUN: rm -f %t.a36# RUN: llvm-ar rc %t.a %t.1.o %t.2.o37 38## - Warn for one section is found case.39# RUN: llvm-objdump --reloc --section=single %t.a 2>&1 \40# RUN:   | FileCheck --check-prefix=SINGLE-WARN %s41 42## - Don't warn if any user specified section is found.43# RUN: llvm-objdump --reloc --section=.text1 %t.a \44# RUN:   | FileCheck --implicit-check-not=warning: %s45 46## - Warn for each specified section if none of them are found.47# RUN: llvm-objdump --reloc --section=multi1 --section=multi2 %t.a 2>&1 \48# RUN:   | FileCheck --check-prefix=MULTI-WARN %s49 50 51# SINGLE-WARN: warning: section 'single' mentioned in a -j/--section option, but not found in any input file52# MULTI-WARN:      warning: section 'multi1' mentioned in a -j/--section option, but not found in any input file53# MULTI-WARN-NEXT: warning: section 'multi2' mentioned in a -j/--section option, but not found in any input file54 55--- !ELF56FileHeader:57  Class:   ELFCLASS6458  Data:    ELFDATA2LSB59  Type:    ET_REL60  Machine: EM_X86_6461Sections:62- Name:    .text163  Type:    SHT_PROGBITS64 65--- !ELF66FileHeader:67  Class:   ELFCLASS6468  Data:    ELFDATA2LSB69  Type:    ET_REL70  Machine: EM_X86_6471Sections:72- Name:    .text273  Type:    SHT_PROGBITS74