mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
e4278af625
Section symbols exist as an optimization: instead of having multiple relocations point to different symbols, many of them can point to a single section symbol. When that optimization is unused, a section symbol is also unused and adds no extra information to the object file. This saves a bit of space on the object files and makes the output of llvm-objdump -t easier to read and consequently some tests get quite a bit simpler. llvm-svn: 239045
132 lines
3.3 KiB
ArmAsm
132 lines
3.3 KiB
ArmAsm
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu %s -o - | llvm-readobj -t | FileCheck %s
|
|
|
|
foo:
|
|
bar = foo
|
|
|
|
.globl foo2
|
|
foo2 = bar2
|
|
|
|
foo3:
|
|
.globl bar3
|
|
bar3 = foo3
|
|
|
|
|
|
// Test that bar4 and bar 5 are also functions and have the same value as foo4.
|
|
.byte 0
|
|
.type foo4,@function
|
|
foo4:
|
|
bar4 = foo4
|
|
bar5 = bar4
|
|
|
|
.long foo2
|
|
|
|
// Test that bar6 is a function that doesn't have the same value as foo4.
|
|
bar6 = bar5
|
|
bar6:
|
|
|
|
// Test that indirect local aliases do not appear as symbols.
|
|
.data
|
|
.Llocal:
|
|
|
|
.text
|
|
leaq .Llocal1(%rip), %rdi
|
|
.Llocal1 = .Llocal2
|
|
.Llocal2 = .Llocal
|
|
|
|
// CHECK: Symbols [
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: (0)
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local (0x0)
|
|
// CHECK-NEXT: Type: None (0x0)
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: bar
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: bar4
|
|
// CHECK-NEXT: Value: 0x1
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: Function
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: bar5
|
|
// CHECK-NEXT: Value: 0x1
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: Function
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: bar6
|
|
// CHECK-NEXT: Value: 0x5
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: foo
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: foo3
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: foo4
|
|
// CHECK-NEXT: Value: 0x1
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|
|
// CHECK-NEXT: Type: Function
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: (0)
|
|
// CHECK-NOT: Symbol {
|
|
// CHECK: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: bar2
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Global
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: Undefined (0x0)
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Symbol {
|
|
// CHECK-NEXT: Name: bar3
|
|
// CHECK-NEXT: Value: 0x0
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Global
|
|
// CHECK-NEXT: Type: None
|
|
// CHECK-NEXT: Other: 0
|
|
// CHECK-NEXT: Section: .text
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|