mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 14:47:00 +00:00
9f299abc05
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239045 91177308-0d34-0410-b5e6-96231b3b80d8
32 lines
738 B
ArmAsm
32 lines
738 B
ArmAsm
// RUN: llvm-mc -filetype=obj -triple x86_64-pc-linux %s -o - | llvm-readobj -r --expand-relocs | FileCheck %s
|
|
|
|
// test that we produce one relocation against each section.
|
|
|
|
// CHECK: Relocations [
|
|
// CHECK-NEXT: Section {{.*}} {
|
|
// CHECK-NEXT: Relocation {
|
|
// CHECK-NEXT: Offset:
|
|
// CHECK-NEXT: Type:
|
|
// CHECK-NEXT: Symbol: .foo (4)
|
|
// CHECK-NEXT: Addend:
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: Relocation {
|
|
// CHECK-NEXT: Offset:
|
|
// CHECK-NEXT: Type:
|
|
// CHECK-NEXT: Symbol: .foo (5)
|
|
// CHECK-NEXT: Addend:
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: }
|
|
// CHECK-NEXT: ]
|
|
|
|
.section .foo,"aG",@progbits,v,comdat
|
|
f:
|
|
|
|
.section .foo,"a",@progbits
|
|
g:
|
|
|
|
|
|
.section .bar
|
|
.quad f
|
|
.quad g
|