brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 78b580e Raw
91 lines · plain
1# REQUIRES: loongarch2# RUN: rm -rf %t && split-file %s %t && cd %t3 4# RUN: llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax a.s -o a.o5# RUN: llvm-readobj -r -x .gcc_except_table -x .debug_rnglists -x .debug_loclists a.o | FileCheck %s --check-prefix=REL6# RUN: ld.lld -shared --gc-sections a.o -o a.so7# RUN: llvm-readelf -x .gcc_except_table -x .debug_rnglists -x .debug_loclists a.so | FileCheck %s8 9# RUN: llvm-mc --filetype=obj --triple=loongarch64 --mattr=+relax extraspace.s -o extraspace64.o10# RUN: not ld.lld -shared extraspace64.o 2>&1 | FileCheck %s --check-prefix=ERROR11# ERROR: error: extraspace{{.*}}.o:(.rodata+0x0): extra space for uleb12812 13#--- a.s14.cfi_startproc15.cfi_lsda 0x1b,.LLSDA016.cfi_endproc17 18.globl _start19_start:20foo:21  nop22 23.section .text.w,"axR"24w1:25  call36 foo    # 4 bytes after relaxation26w2:27 28.section .text.x,"ax"29x1:30  call36 foo    # 4 bytes after relaxation31x2:32 33.section .gcc_except_table,"a"34.LLSDA0:35.reloc ., R_LARCH_ADD_ULEB128, w1+13036.reloc ., R_LARCH_SUB_ULEB128, w2-1  # non-zero addend for SUB37.byte 0x7b38.uleb128 w2-w1+12039.uleb128 w1-w2+13740.uleb128 w2-w1+1637641.uleb128 w1-w2+1639342.uleb128 w2-w1+209714443.uleb128 w1-w2+209716144 45.section .debug_rnglists46.reloc ., R_LARCH_ADD_ULEB128, w1+13047.reloc ., R_LARCH_SUB_ULEB128, w2-1  # non-zero addend for SUB48.byte 0x7b49.uleb128 w2-w1+12050.uleb128 w1-w2+13751.uleb128 w2-w1+1637652.uleb128 w1-w2+1639353.uleb128 w2-w1+209714454.uleb128 w1-w2+209716155 56.section .debug_loclists57.reloc ., R_LARCH_ADD_ULEB128, w2+358.reloc ., R_LARCH_SUB_ULEB128, w1+4  # SUB with a non-zero addend59.byte 060.uleb128 x2-x1                       # references discarded symbols61 62# REL:        Hex dump of section '.gcc_except_table':63# REL-NEXT:   0x00000000 7b800080 00808000 80800080 80800080 {64# REL-NEXT:   0x00000010 808000                              .65# REL:        Hex dump of section '.debug_rnglists':66# REL-NEXT:   0x00000000 7b800080 00808000 80800080 80800080 {67# REL-NEXT:   0x00000010 808000                              .68# REL:        Hex dump of section '.debug_loclists':69# REL-NEXT:   0x00000000 0000                                  .70 71# CHECK:      Hex dump of section '.gcc_except_table':72# CHECK-NEXT: 0x00000238 7afc0085 01fcff00 858001fc ffff0085 z73# CHECK-NEXT: 0x00000248 808001                              .74# CHECK:      Hex dump of section '.debug_rnglists':75# CHECK-NEXT: 0x00000000 7afc0085 01fcff00 858001fc ffff0085 z76# CHECK-NEXT: 0x00000010 808001                              .77# CHECK:      Hex dump of section '.debug_loclists':78# CHECK-NEXT: 0x00000000 0300                                .79 80#--- extraspace.s81.text82w1:83  la.pcrel $t0, w184w2:85 86.rodata87.reloc ., R_LARCH_ADD_ULEB128, w288.reloc ., R_LARCH_SUB_ULEB128, w189.fill 10, 1, 0x8090.byte 191