1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/test/MC/ELF/reloc-same-name-section.s
Rafael Espindola e4278af625 Omit unused section symbols from the symbol table.
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
2015-06-04 15:33:30 +00:00

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