brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · 6e8310f Raw
67 lines · plain
1## Check that we are able to dump the SHT_MIPS_REGINFO section using -A properly.2 3# RUN: yaml2obj --docnum=1 %s -o %t14# RUN: llvm-readobj -A %t1 | FileCheck %s --check-prefix=OPTIONS5# RUN: llvm-readelf -A %t1 | FileCheck %s --check-prefix=OPTIONS6 7# OPTIONS:      MIPS RegInfo {8# OPTIONS-NEXT:   GP:            0x8070605040302019# OPTIONS-NEXT:   General Mask:  0xD0C0B0A10# OPTIONS-NEXT:   Co-Proc Mask0: 0x8877665511# OPTIONS-NEXT:   Co-Proc Mask1: 0xCCBBAA9912# OPTIONS-NEXT:   Co-Proc Mask2: 0x1EFFEEDD13# OPTIONS-NEXT:   Co-Proc Mask3: 0x5E4E3E2E14# OPTIONS-NEXT: }15 16--- !ELF17FileHeader:18  Class:   ELFCLASS6419  Data:    ELFDATA2LSB20  Type:    ET_REL21  Machine: EM_MIPS22Sections:23  - Name: .reginfo24    Type: SHT_MIPS_REGINFO25    ContentArray: [ 0xA, 0xB, 0xC, 0xD,     ## Bit-mask of used general registers.26                    0x11, 0x22, 0x33, 0x44, ## Unused padding field.27                    0x55, 0x66, 0x77, 0x88, ## Bit-mask of used co-processor registers (0).28                    0x99, 0xAA, 0xBB, 0xCC, ## Bit-mask of used co-processor registers (1).29                    0xDD, 0xEE, 0xFF, 0x1E, ## Bit-mask of used co-processor registers (2).30                    0x2E, 0x3E, 0x4E, 0x5E, ## Bit-mask of used co-processor registers (3).31                    0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7, 0x8 ] ## GP register value.32 33## Check that we try to dump the .reginfo section when we are able to locate it by name.34# RUN: yaml2obj --docnum=2 -DNAME=0xffff %s -o %t.err135# RUN: llvm-readelf -A %t.err1 2>&1 | \36# RUN:   FileCheck %s -DFILE=%t.err1 --check-prefix=NAME-ERR-FOUND --implicit-check-not=warning:37# RUN: llvm-readobj -A %t.err1 2>&1 | \38# RUN:   FileCheck %s -DFILE=%t.err1 --check-prefix=NAME-ERR-FOUND --implicit-check-not=warning:39 40# NAME-ERR-FOUND:      warning: '[[FILE]]': unable to read the name of SHT_PROGBITS section with index 1: a section [index 1] has an invalid sh_name (0xffff) offset which goes past the end of the section name string table41# NAME-ERR-FOUND-NEXT: warning: '[[FILE]]': unable to read the name of SHT_PROGBITS section with index 3: a section [index 3] has an invalid sh_name (0xffff) offset which goes past the end of the section name string table42# NAME-ERR-FOUND:      warning: '[[FILE]]': the .reginfo section has an invalid size (0x0)43 44--- !ELF45FileHeader:46  Class:   ELFCLASS6447  Data:    ELFDATA2LSB48  Type:    ET_REL49  Machine: EM_MIPS50Sections:51  - Type:   SHT_PROGBITS52    ShName: [[NAME=<none>]]53  - Name:   .reginfo54    Type:   SHT_MIPS_REGINFO55    ShName: [[REGINFONAME=<none>]]56  - Type:   SHT_PROGBITS57    ShName: [[NAME=<none>]]58 59## Check we report a warning when we are unable to find the .reginfo section due to an error.60# RUN: yaml2obj --docnum=2 -DREGINFONAME=0xffff %s -o %t.err261# RUN: llvm-readelf -A %t.err2 2>&1 | \62# RUN:   FileCheck %s -DFILE=%t.err2 --check-prefix=NAME-ERR-NOTFOUND --implicit-check-not=warning:63# RUN: llvm-readobj -A %t.err2 2>&1 | \64# RUN:   FileCheck %s -DFILE=%t.err2 --check-prefix=NAME-ERR-NOTFOUND --implicit-check-not=warning:65 66# NAME-ERR-NOTFOUND: warning: '[[FILE]]': unable to read the name of SHT_MIPS_REGINFO section with index 2: a section [index 2] has an invalid sh_name (0xffff) offset which goes past the end of the section name string table67