brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 9053863 Raw
42 lines · plain
1# REQUIRES: arm2# RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o3# RUN: echo "SECTIONS {                                        \4# RUN:         .ARM.exidx 0x1000 : { *(.ARM.exidx*) foo = .; } \5# RUN:         .text      0x2000 : { *(.text*) }               \6# RUN:       }" > %t.script7## We used to crash if the last output section command for .ARM.exidx8## was anything but an input section description.9# RUN: ld.lld --no-merge-exidx-entries -T %t.script %t.o -shared -o %t.so10# RUN: llvm-objdump -s --triple=armv7a-none-linux-gnueabi %t.so | FileCheck %s11# RUN: llvm-readobj -S --symbols %t.so | FileCheck %s --check-prefix=SYMBOL12 13 .syntax unified14 .text15 .global _start16_start:17 .fnstart18 .cantunwind19 bx lr20 .fnend21 22# CHECK: Contents of section .ARM.exidx:23# 1000 + 1000 = 0x2000 = _start24# 1008 + 0ffc = 0x2004 = _start + sizeof(_start)25# CHECK-NEXT: 1000 00100000 01000000 fc0f0000 0100000026 27# SYMBOL:       Section {28# SYMBOL:         Name: .ARM.exidx29# SYMBOL-NEXT:    Type: SHT_ARM_EXIDX30# SYMBOL-NEXT:    Flags [31# SYMBOL-NEXT:      SHF_ALLOC32# SYMBOL-NEXT:      SHF_LINK_ORDER33# SYMBOL-NEXT:    ]34# SYMBOL-NEXT:    Address: 0x100035# SYMBOL-NEXT:    Offset:36# SYMBOL-NEXT:    Size: 1637 38# Symbol 'foo' is expected to point at the end of the section.39# SYMBOL:       Symbol {40# SYMBOL:         Name: foo41# SYMBOL-NEXT:    Value: 0x101042