File: mips-merge-abiflags.s

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (62 lines) | stat: -rw-r--r-- 1,978 bytes parent folder | download | duplicates (21)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# REQUIRES: mips
# Test that lld handles input files with concatenated .MIPS.abiflags sections
# This happens e.g. with the FreeBSD BFD (BFD 2.17.50 [FreeBSD] 2007-07-03)

# RUN: llvm-mc -filetype=obj -triple=mips64-unknown-freebsd %s -o %t.o
# RUN: ld.lld %t.o %p/Inputs/mips-concatenated-abiflags.o -o %t.exe
# RUN: llvm-readobj --sections -A %t.exe | FileCheck %s
# RUN: llvm-readobj --sections -A %p/Inputs/mips-concatenated-abiflags.o 2>&1 \
# RUN:   | FileCheck --check-prefix=INPUT-OBJECT %s

        .globl  __start
__start:
        nop

# CHECK:      Section {
# CHECK:        Index: 1
# CHECK-NEXT:   Name: .MIPS.abiflags
# CHECK-NEXT:   Type: SHT_MIPS_ABIFLAGS
# CHECK-NEXT:   Flags [
# CHECK-NEXT:     SHF_ALLOC
# CHECK-NEXT:   ]
# CHECK-NEXT:   Address:
# CHECK-NEXT:   Offset:
# CHECK-NEXT:   Size: 24
# CHECK-NEXT:   Link: 0
# CHECK-NEXT:   Info: 0
# CHECK-NEXT:   AddressAlignment: 8
# CHECK-NEXT:   EntrySize: 24
# CHECK-NEXT: }

# CHECK:      MIPS ABI Flags {
# CHECK-NEXT:   Version: 0
# CHECK-NEXT:   ISA: MIPS64
# CHECK-NEXT:   ISA Extension: None
# CHECK-NEXT:   ASEs [
# CHECK-NEXT:   ]
# CHECK-NEXT:   FP ABI: Hard float (double precision)
# CHECK-NEXT:   GPR size: 64
# CHECK-NEXT:   CPR1 size: 64
# CHECK-NEXT:   CPR2 size: 0
# CHECK-NEXT:   Flags 1 [
# CHECK-NEXT:     ODDSPREG
# CHECK-NEXT:   ]
# CHECK-NEXT:   Flags 2: 0x0
# CHECK-NEXT: }

# INPUT-OBJECT:       Section {
# INPUT-OBJECT:         Index: 3
# INPUT-OBJECT-NEXT:    Name: .MIPS.abiflags
# INPUT-OBJECT-NEXT:    Type: SHT_MIPS_ABIFLAGS
# INPUT-OBJECT-NEXT:    Flags [
# INPUT-OBJECT-NEXT:      SHF_ALLOC
# INPUT-OBJECT-NEXT:    ]
# INPUT-OBJECT-NEXT:    Address:
# INPUT-OBJECT-NEXT:    Offset:
# INPUT-OBJECT-NEXT:    Size: 48
# INPUT-OBJECT-NEXT:    Link: 0
# INPUT-OBJECT-NEXT:    Info: 0
# INPUT-OBJECT-NEXT:    AddressAlignment: 8
# INPUT-OBJECT-NEXT:    EntrySize: 0
# INPUT-OBJECT-NEXT:  }
# INPUT-OBJECT:       unable to read the .MIPS.abiflags section: it has a wrong size (48)