2018-06-27 06:20:04 +08:00
|
|
|
// REQUIRES: arm
|
2018-01-25 03:16:31 +08:00
|
|
|
// RUN: llvm-mc -filetype=obj -triple arm-gnu-linux-eabi -mcpu cortex-a7 -arm-add-build-attributes %s -o %t.o
|
|
|
|
// RUN: echo "ENTRY(__entrypoint) SECTIONS { . = 0x10000; .text : { *(.text .text.*) } /DISCARD/ : { *(.ARM.exidx*) *(.gnu.linkonce.armexidx.*) } }" > %t.script
|
2019-07-22 19:37:03 +08:00
|
|
|
// RUN: ld.lld -T %t.script %t.o -o %t.elf
|
2019-05-01 13:49:01 +08:00
|
|
|
// RUN: llvm-readobj --sections %t.elf | FileCheck %s
|
2018-01-25 03:16:31 +08:00
|
|
|
|
|
|
|
.globl __entrypoint
|
|
|
|
__entrypoint:
|
2019-03-28 19:10:20 +08:00
|
|
|
.fnstart
|
2018-01-25 03:16:31 +08:00
|
|
|
bx lr
|
2019-03-28 19:10:20 +08:00
|
|
|
.save {r7, lr}
|
|
|
|
.setfp r7, sp, #0
|
|
|
|
.fnend
|
2018-01-25 03:16:31 +08:00
|
|
|
// Check that .ARM.exidx/.gnu.linkonce.armexidx
|
|
|
|
// are correctly removed if they were added.
|
|
|
|
// CHECK-NOT: .ARM.exidx
|
|
|
|
// CHECK-NOT: .gnu.linkonce.armexidx.
|