
clang/gcc -fdebug-type-sections places .debug_types and .rela.debug_types in a section group, with a signature symbol which represents the type signature. The section group is for deduplication purposes. After D70146, we will discard such section groups. Refine the rule so that we will retain the group if no member has the SHF_ALLOC flag. GNU ld has a similar rule to retain the group if all members have the SEC_DEBUGGING flag. We try to be more general for future-proof purposes: if other non-SHF_ALLOC sections have deduplication needs, they may be placed in a section group. Don't discard them. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D71157
13 lines
406 B
ArmAsm
13 lines
406 B
ArmAsm
# REQUIRES: x86
|
|
## Check that group members are retained, if no member has the SHF_ALLOC flag.
|
|
## This rule retains .debug_types and .rela.debug_types emitted by clang/gcc.
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t.o
|
|
# RUN: ld.lld --gc-sections %t.o -o %t
|
|
# RUN: llvm-readobj -S %t | FileCheck %s
|
|
|
|
# CHECK: Name: .debug_types
|
|
|
|
.section .debug_types,"G",@progbits,abcd,comdat
|
|
.quad .debug_types
|