mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 00:16:05 +00:00

In some binaries produced with ThinLTO there are CUs that share entry in .debug_addr. Before we would generate a new entry for each. Which lead to binary size increase. This changes the behavior so that we re-use entries in .debug_addr. Reviewed By: maksfb Differential Revision: https://reviews.llvm.org/D142425
19 lines
1.1 KiB
ArmAsm
19 lines
1.1 KiB
ArmAsm
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-main-addr-section-reuse.s -o %tmain.o
|
|
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-helper1-addr-section-reuse.s -o %thelper1.o
|
|
# RUN: llvm-mc -dwarf-version=5 -filetype=obj -triple x86_64-unknown-linux %p/Inputs/dwarf5-helper2-addr-section-reuse.s -o %thelper2.o
|
|
# RUN: %clang %cflags -dwarf-5 %tmain.o %thelper1.o %thelper2.o -o %t.exe -Wl,-q
|
|
# RUN: llvm-dwarfdump --debug-info %t.exe | FileCheck --check-prefix=PRECHECK %s
|
|
# RUN: llvm-bolt %t.exe -o %t.exe.bolt --update-debug-sections
|
|
# RUN: llvm-dwarfdump --debug-info %t.exe.bolt | FileCheck --check-prefix=POSTCHECK %s
|
|
|
|
# This test checks that when a binary is bolted if CU is not modified and has DW_AT_addr_base that is shared
|
|
# after being bolted CUs still share same entry in .debug_addr.
|
|
|
|
# PRECHECK: DW_AT_addr_base (0x00000008)
|
|
# PRECHECK: DW_AT_addr_base (0x00000008)
|
|
# PRECHECK: DW_AT_addr_base (0x00000008)
|
|
|
|
# POSTCHECK: DW_AT_addr_base (0x00000008)
|
|
# POSTCHECK: DW_AT_addr_base (0x00000020)
|
|
# POSTCHECK: DW_AT_addr_base (0x00000020)
|