brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · ae855dc Raw
49 lines · plain
1// REQUIRES: arm2// RUN: llvm-mc --arm-add-build-attributes --triple=armv7a-linux-gnueabihf -filetype=obj %s -o %t.o3// RUN: echo "SECTIONS { \4// RUN:         /DISCARD/ : { *(.ARM.exidx.exit.text) *(.ARM.extab.exit.text)} \5// RUN:         . = 0x90000000; \6// RUN:         .ARM.exidx : { *(.ARM.exidx) } \7// RUN:         .text : { *(.text) } \8// RUN:         .exit.text : { *(.exit.text) } \9// RUN:         .rodata : { *(.rodata) } \10// RUN: } " > %t.script11// RUN: ld.lld --script %t.script %t.o -o %t12// RUN: llvm-readelf -x .ARM.exidx %t | FileCheck %s13 14/// The linker script /DISCARDS/ the .ARM.exidx and .ARM.extab for the15/// .exit.text . If we do not discard both sections we will end up with16/// a dangling reference. We expect no linker error for an out of range17/// relocation/dangling reference and just a single .ARM.exidx entry18/// for _start and an entry for the terminating sentinel.19 20// CHECK: Hex dump of section '.ARM.exidx':21// CHECK-NEXT: 0x90000000 10000000 01000000 10000000 0100000022// CHECK-NOT:  0x9000001023 .text24 .global _start25 .type _start, %function26_start:27 .fnstart28 bx lr29 .cantunwind30 .fnend31 32 .section .exit.text, "ax", %progbits33 .global exit_text34 .type exit_text, %function35exit_text:36  .fnstart37  bx lr38 .personality __gxx_personality_v039 .handlerdata40 .long 041 .fnend42 43/// Dummy definition for a reference from the personality routine created by44/// the assembler, use .data to avoid generating a cantunwind table.45 .section .rodata46 .global __aeabi_unwind_cpp_pr047__aeabi_unwind_cpp_pr0:48 .word 049