30 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc -filetype=obj -triple=armv7a-none-linux-gnueabi %s -o %t.o3// RUN: ld.lld %t.o -shared -o %t.so --section-start .text=0x2000 --section-start .ARM.exidx=0x10004// RUN: llvm-objdump -s --triple=armv7a-none-linux-gnueabi %t.so | FileCheck %s5 6 .syntax unified7 8 .section .text.foo, "ax", %progbits9 .globl foo10foo:11 .fnstart12 bx lr13 .cantunwind14 .fnend15 16 .section .text.bar, "ax", %progbits17 .globl bar18bar:19 .fnstart20 bx lr21 .cantunwind22 .fnend23 24// CHECK: Contents of section .ARM.exidx:25// 1000 + 1000 = 0x2000 = foo26// The entry for bar is the same as previous and is eliminated.27// The sentinel entry should be preserved.28// 1008 + 1000 = 0x2008 = bar + sizeof(bar)29// CHECK-NEXT: 1000 00100000 01000000 00100000 0100000030