brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 06a1194 Raw
36 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o3 4## Show that we emit .rela.bar, .rela.text and .rela.debug_info when GC is disabled.5# RUN: ld.lld --emit-relocs %t.o -o %t6# RUN: llvm-objdump %t --section-headers | FileCheck %s --check-prefix=NOGC7# NOGC: .rela.text8# NOGC: .rela.bar9# NOGC: .rela.debug_info10 11## GC collects .bar section and we exclude .rela.bar from output. We keep12## .rela.text because we keep .text. We keep .rela.debug_info because we keep13## non-SHF_ALLOC .debug_info.14# RUN: ld.lld --gc-sections --emit-relocs --print-gc-sections %t.o -o %t \15# RUN:   | FileCheck --check-prefix=MSG %s16# MSG: removing unused section {{.*}}.o:(.bar)17# MSG: removing unused section {{.*}}.o:(.rela.bar)18# RUN: llvm-objdump %t --section-headers | FileCheck %s --check-prefix=GC --implicit-check-not=.rela.19# GC:      .rela.text20# GC-NEXT: .debug_info21# GC-NEXT: .rela.debug_info22 23.section .bar,"a"24.quad .bar25 26.text27relocs:28.quad _start29 30.global _start31_start:32 nop33 34.section .debug_info,"",@progbits35.quad .text36