brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 95666d2 Raw
105 lines · plain
1# RUN: yaml2obj -DELFCLASS=ELFCLASS32 -o %t.32.o %s2# RUN: llvm-jitlink -noexec -check %s %t.32.o3# RUN: yaml2obj -DELFCLASS=ELFCLASS64 -o %t.64.o %s4# RUN: llvm-jitlink -noexec -check %s %t.64.o5 6### Compiled from the following code with -mattr=+relax to force relocations for7### address_range and DW_CFA_advance_loc (both needed for .balign).8## 	.text9## 	.globl	main10## 	.p2align	111## 	.type	main,@function12## main:13## 	.cfi_startproc14##     .balign 815## 	addi	sp, sp, -1616## cfa_advance_loc:17## 	.cfi_def_cfa_offset 1618##     nop19## main_end:20## 	.size	main, main_end-main21## 	.cfi_endproc22 23--- !ELF24FileHeader:25  Class:           [[ELFCLASS]]26  Data:            ELFDATA2LSB27  Type:            ET_REL28  Machine:         EM_RISCV29  SectionHeaderStringTable: .strtab30Sections:31  - Name:            .text32    Type:            SHT_PROGBITS33    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]34    AddressAlign:    0x835    Content:         13000000130101FF1300000036  - Name:            .eh_frame37    Type:            SHT_PROGBITS38    Flags:           [ SHF_ALLOC ]39    AddressAlign:    0x840    Content:         1000000000000000017A5200017801011B0C02001000000018000000000000000000000000400E1041  - Name:            .rela.text42    Type:            SHT_RELA43    Flags:           [ SHF_INFO_LINK ]44    Link:            .symtab45    AddressAlign:    0x846    Info:            .text47    Relocations:48      - Type:            R_RISCV_ALIGN49        Addend:          450  - Name:            .rela.eh_frame51    Type:            SHT_RELA52    Flags:           [ SHF_INFO_LINK ]53    Link:            .symtab54    AddressAlign:    0x855    Info:            .eh_frame56    Relocations:57      - Offset:          0x1C58        Symbol:          main59        Type:            R_RISCV_32_PCREL60      - Offset:          0x2061        Symbol:          main_end62        Type:            R_RISCV_ADD3263      - Offset:          0x2064        Symbol:          main65        Type:            R_RISCV_SUB3266      - Offset:          0x2567        Symbol:          cfa_advance_loc68        Type:            R_RISCV_SET669      - Offset:          0x2570        Symbol:          main71        Type:            R_RISCV_SUB672  - Type:            SectionHeaderTable73    Sections:74      - Name:            .strtab75      - Name:            .text76      - Name:            .rela.text77      - Name:            .eh_frame78      - Name:            .rela.eh_frame79      - Name:            .symtab80Symbols:81  - Name:            cfa_advance_loc82    Section:         .text83    Value:           0x884  - Name:            main_end85    Section:         .text86    Value:           0xC87  - Name:            main88    Type:            STT_FUNC89    Section:         .text90    Binding:         STB_GLOBAL91    Size:            0xC92  - Name:            eh_frame93    Type:            STT_SECTION94    Binding:         STB_GLOBAL95    Section:         .eh_frame96    Size:            0x2897...98 99## CIE_pointer100# jitlink-check: *{4}(eh_frame + 0x1c) = main - (eh_frame + 0x1c)101## address_range102# jitlink-check: *{4}(eh_frame + 0x20) = main_end - main103## DW_CFA_advance_loc104# jitlink-check: (*{1}(eh_frame + 0x25)) & 0x3f = cfa_advance_loc - main105