1 # RUN: yaml2obj %s > %t
2 # RUN: llvm-readobj -r %t | FileCheck -check-prefix=OBJ %s
3 # RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
6 # OBJ-NEXT: Section (2) .rela.text {
7 # OBJ-NEXT: 0x14 R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16 main 0x4
8 # OBJ-NEXT: 0x1C R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_LO16 main 0x8
9 # OBJ-NEXT: 0x20 R_MIPS_GOT_PAGE/R_MIPS_NONE/R_MIPS_NONE .rodata 0x0
10 # OBJ-NEXT: 0x24 R_MIPS_GOT_OFST/R_MIPS_NONE/R_MIPS_NONE .rodata 0x0
11 # OBJ-NEXT: 0x28 R_MIPS_CALL16/R_MIPS_NONE/R_MIPS_NONE printf 0x0
12 # OBJ-NEXT: 0x30 R_MIPS_GPREL16/R_MIPS_LO16/R_MIPS_NONE printf 0x0
17 # YAML-NEXT: - Offset: 0x0000000000000014
18 # YAML-NEXT: Symbol: main
19 # YAML-NEXT: Type: R_MIPS_GPREL16
20 # YAML-NEXT: Type2: R_MIPS_SUB
21 # YAML-NEXT: Type3: R_MIPS_HI16
22 # YAML-NEXT: Addend: 4
23 # YAML-NEXT: - Offset: 0x000000000000001C
24 # YAML-NEXT: Symbol: main
25 # YAML-NEXT: Type: R_MIPS_GPREL16
26 # YAML-NEXT: Type2: R_MIPS_SUB
27 # YAML-NEXT: Type3: R_MIPS_LO16
28 # YAML-NEXT: Addend: 8
29 # YAML-NEXT: - Offset: 0x0000000000000020
30 # YAML-NEXT: Symbol: .rodata
31 # YAML-NEXT: Type: R_MIPS_GOT_PAGE
32 # YAML-NEXT: - Offset: 0x0000000000000024
33 # YAML-NEXT: Symbol: .rodata
34 # YAML-NEXT: Type: R_MIPS_GOT_OFST
35 # YAML-NEXT: - Offset: 0x0000000000000028
36 # YAML-NEXT: Symbol: printf
37 # YAML-NEXT: Type: R_MIPS_CALL16
38 # YAML-NEXT: - Offset: 0x0000000000000030
39 # YAML-NEXT: Symbol: printf
40 # YAML-NEXT: Type: R_MIPS_GPREL16
41 # YAML-NEXT: Type2: R_MIPS_LO16
42 # YAML-NEXT: SpecSym: RSS_GP0
50 Flags: [ EF_MIPS_PIC, EF_MIPS_CPIC,
51 EF_MIPS_NOREORDER, EF_MIPS_ARCH_64R2 ]
55 Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
60 Flags: [ SHF_INFO_LINK ]