1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
llvm-mirror/test/MC/ARM/relocated-mapping.s
Fangrui Song 893f1e4a6d ELFObjectWriter: Don't sort local symbols
GNU as does not sort local symbols. This has several advantages:

* The .symtab order is roughly the symbol occurrence order.
* The closest preceding STT_SECTION symbol is the definition of a local symbol.
* The closest preceding STT_FILE symbol is the defining file of a local symbol, if there are multiple default-version .file directives. (Not implemented in MC.)
2021-02-07 15:47:10 -08:00

12 lines
446 B
ArmAsm

@ RUN: llvm-mc -triple=arm-linux-gnueabi -filetype=obj < %s | llvm-objdump -t - | FileCheck %s
@ Implementation-detail test (unfortunately): values that are relocated do not
@ go via MCStreamer::EmitBytes; make sure they still emit a mapping symbol.
add r0, r0, r0
.word somewhere
add r0, r0, r0
@ CHECK: 00000000 l .text 00000000 $a
@ CHECK-NEXT: 00000004 l .text 00000000 $d
@ CHECK-NEXT: 00000008 l .text 00000000 $a