[llvm] d840e54 - [DebugInfo][test] Fix section flags/type to avoid warning/error in the future
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 18 20:53:30 PST 2020
Author: Fangrui Song
Date: 2020-02-18T20:51:41-08:00
New Revision: d840e5452315e69d44cfe44b766e633964681b6a
URL: https://github.com/llvm/llvm-project/commit/d840e5452315e69d44cfe44b766e633964681b6a
DIFF: https://github.com/llvm/llvm-project/commit/d840e5452315e69d44cfe44b766e633964681b6a.diff
LOG: [DebugInfo][test] Fix section flags/type to avoid warning/error in the future
A future MC change may add a warning/error when a .section directive
specifies incorrect sh_flags/sh_type. Fix the tests to use correct
sh_flags/sh_type.
Added:
Modified:
llvm/test/DebugInfo/X86/dwarfdump-header.s
llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s
llvm/test/DebugInfo/X86/dwarfdump-rnglists.s
llvm/test/DebugInfo/X86/dwarfdump-str-offsets-dwp.s
llvm/test/DebugInfo/X86/dwarfdump-str-offsets-invalid-6.s
llvm/test/DebugInfo/X86/dwarfdump-str-offsets.s
llvm/test/DebugInfo/X86/invalid-unit-header.s
llvm/test/tools/llvm-dwarfdump/X86/debug-names-find-dwo.s
llvm/test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s
llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s
llvm/test/tools/llvm-dwarfdump/X86/typeunit-name.s
llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s
Removed:
################################################################################
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-header.s b/llvm/test/DebugInfo/X86/dwarfdump-header.s
index daf03614f9da..41f3b2967933 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-header.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-header.s
@@ -20,7 +20,7 @@ str_LT_5a:
str_LT_5b:
.asciz "Directory5b"
- .section .debug_str.dwo,"MS", at progbits,1
+ .section .debug_str.dwo,"MSe", at progbits,1
dwo_TU_5:
.asciz "V5_split_type_unit"
dwo_producer:
@@ -62,7 +62,7 @@ dwo_LT_5b:
.byte 0x00 # EOM(3)
# And a .dwo copy for the .dwo sections.
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 0x01 # Abbrev code
.byte 0x11 # DW_TAG_compile_unit
.byte 0x00 # DW_CHILDREN_no
@@ -128,7 +128,7 @@ CU_5_end:
# CHECK: 0x00000019: Compile Unit: length = 0x00000016 version = 0x0005 unit_type = DW_UT_compile abbr_offset = 0x0000 addr_size = 0x08 (next unit at 0x00000033)
# CHECK: 0x00000025: DW_TAG_compile_unit
- .section .debug_info.dwo,"", at progbits
+ .section .debug_info.dwo,"e", at progbits
# CHECK-LABEL: .debug_info.dwo
# DWARF v5 split CU header.
@@ -157,7 +157,7 @@ CU_split_5_end:
# there is a separate ELF section header; it's dumped along with the previous
# unit as if they were in a single section.
- .section .debug_info.dwo,"G", at progbits,5555,comdat
+ .section .debug_info.dwo,"Ge", at progbits,5555,comdat
# CHECK-NOT: .debug_info.dwo
# DWARF v5 split type unit header.
@@ -359,7 +359,7 @@ lstr_LT_5a:
lstr_LT_5b:
.asciz "File5b"
- .section .debug_line.dwo,"", at progbits
+ .section .debug_line.dwo,"e", at progbits
# CHECK-LABEL: .debug_line.dwo
# DWARF v5 DWO line-table header.
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s b/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
index fcce5618de4c..d5646bf87e1f 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-line-dwo.s
@@ -4,7 +4,7 @@
# RUN: llvm-dwarfdump -debug-line %t.o | FileCheck %s --check-prefixes=PART1,PART2
# RUN: llvm-dwarfdump -debug-line=0x32 %t.o | FileCheck %s --check-prefix=PART2
- .section .debug_line.dwo,"", at progbits
+ .section .debug_line.dwo,"e", at progbits
LH_1_start:
.long LH_1_end-LH_1_version # Length of Unit
LH_1_version:
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s b/llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s
index 43b3953658d3..4f0af377a298 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-rnglists-dwarf64.s
@@ -34,7 +34,7 @@
# The split CU uses DW_FORM_rnglistx (the only correct option).
# There is no DW_AT_rnglists_base in split units.
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 0x01 # Abbrev code
.byte 0x11 # DW_TAG_compile_unit
.byte 0x00 # DW_CHILDREN_no
@@ -99,7 +99,7 @@ CU4_5_64_version:
.quad 4000 # DW_AT_ranges
CU4_5_64_end:
- .section .debug_info.dwo,"", at progbits
+ .section .debug_info.dwo,"e", at progbits
# DWARF v5 split CU header.
.long 0xffffffff # DWARF64 mark
@@ -151,7 +151,7 @@ Rnglist_Table0_end:
# uses DW_RLE_base_address and DW_RLE_offset_pair. The ranges have entries
# in the offset table. We use the empty range list so we can test
# DW_FORM_rnglistx with an index other than 0.
- .section .debug_rnglists.dwo,"", at progbits
+ .section .debug_rnglists.dwo,"e", at progbits
.long 0xffffffff # DWARF64 mark
.quad Rnglist_Table0_dwo_end - Rnglist_Table0_dwo # table length
Rnglist_Table0_dwo:
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-rnglists.s b/llvm/test/DebugInfo/X86/dwarfdump-rnglists.s
index 3c91799001a0..70ed3b0cc99f 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-rnglists.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-rnglists.s
@@ -33,7 +33,7 @@
# The split CU uses DW_FORM_rnglistx (the only correct option).
# There is no DW_AT_rnglists_base in split units.
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 0x01 # Abbrev code
.byte 0x11 # DW_TAG_compile_unit
.byte 0x00 # DW_CHILDREN_no
@@ -97,7 +97,7 @@ CU4_5_version:
.byte 0 # NULL
CU4_5_end:
- .section .debug_info.dwo,"", at progbits
+ .section .debug_info.dwo,"e", at progbits
# DWARF v5 split CU header.
.long CU_split_5_end-CU_split_5_version # Length of Unit
@@ -148,7 +148,7 @@ Rnglist_Table0_end:
# uses DW_RLE_base_address and DW_RLE_offset_pair. The ranges have entries
# in the offset table. We use the empty range list so we can test
# DW_FORM_rnglistx with an index other than 0.
- .section .debug_rnglists.dwo,"", at progbits
+ .section .debug_rnglists.dwo,"e", at progbits
.long Rnglist_Table0_dwo_end - Rnglist_Table0_dwo # table length
Rnglist_Table0_dwo:
.short 5 # version
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-dwp.s b/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-dwp.s
index 6620beaadd84..9bbd4d77e01d 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-dwp.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-dwp.s
@@ -7,7 +7,7 @@
# file, and CU3 from a third object file that was compiled with
# -gdwarf-4.
#
- .section .debug_str.dwo,"MS", at progbits,1
+ .section .debug_str.dwo,"MSe", at progbits,1
str_producer:
.asciz "Handmade DWARF producer"
str_CU1:
@@ -31,7 +31,7 @@ str_CU3:
str_CU3_dir:
.asciz "/home/test/CU3"
- .section .debug_str_offsets.dwo,"", at progbits
+ .section .debug_str_offsets.dwo,"e", at progbits
# Object files 1's portion of the .debug_str_offsets.dwo section.
# CU1 and TU1 share a contribution to the string offsets table.
.debug_str_offsets_object_file1_start:
@@ -72,7 +72,7 @@ str_CU3_dir:
.debug_str_offsets_object_file3_end:
# Abbrevs are shared for all compile and type units
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 0x01 # Abbrev code
.byte 0x11 # DW_TAG_compile_unit
.byte 0x00 # DW_CHILDREN_no
@@ -112,7 +112,7 @@ str_CU3_dir:
.byte 0x00 # EOM(3)
abbrev_end:
- .section .debug_info.dwo,"", at progbits
+ .section .debug_info.dwo,"e", at progbits
# DWARF v5 CU header.
CU1_5_start:
@@ -162,7 +162,7 @@ CU3_4_version:
.byte 0 # NULL
CU3_4_end:
- .section .debug_types.dwo,"", at progbits
+ .section .debug_types.dwo,"e", at progbits
# DWARF v5 Type unit header.
TU1_5_start:
.long TU1_5_end-TU1_5_version # Length of Unit
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-invalid-6.s b/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-invalid-6.s
index 03d70347a2f2..01bc39c68610 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-invalid-6.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-str-offsets-invalid-6.s
@@ -20,7 +20,7 @@ str_TU:
str_TU_type:
.asciz "MyStruct"
- .section .debug_str.dwo,"MS", at progbits,1
+ .section .debug_str.dwo,"MSe", at progbits,1
dwo_str_CU_5_producer:
.asciz "Handmade split DWARF producer"
dwo_str_CU_5_name:
diff --git a/llvm/test/DebugInfo/X86/dwarfdump-str-offsets.s b/llvm/test/DebugInfo/X86/dwarfdump-str-offsets.s
index f6303f123ad3..b249efff79f5 100644
--- a/llvm/test/DebugInfo/X86/dwarfdump-str-offsets.s
+++ b/llvm/test/DebugInfo/X86/dwarfdump-str-offsets.s
@@ -69,7 +69,7 @@ str_Variable3:
.long str_TU_type
.debug_str_offsets_segment2_end:
- .section .debug_str.dwo,"MS", at progbits,1
+ .section .debug_str.dwo,"MSe", at progbits,1
dwo_str_CU_5_producer:
.asciz "Handmade split DWARF producer"
dwo_str_CU_5_name:
@@ -81,7 +81,7 @@ dwo_str_TU_5:
dwo_str_TU_5_type:
.asciz "V5_split_Mystruct"
- .section .debug_str_offsets.dwo,"", at progbits
+ .section .debug_str_offsets.dwo,"e", at progbits
# One contribution only in a .dwo file
.long .debug_dwo_str_offsets_segment0_end-.debug_dwo_str_offsets_base0+4
.short 5 # DWARF version
@@ -174,7 +174,7 @@ dwo_str_TU_5_type:
.byte 0x00 # EOM(3)
# And a .dwo copy of a subset for the .dwo sections.
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 0x01 # Abbrev code
.byte 0x11 # DW_TAG_compile_unit
.byte 0x00 # DW_CHILDREN_no
@@ -300,7 +300,7 @@ TU_5_type:
.byte 0 # NULL
TU_5_end:
- .section .debug_info.dwo,"", at progbits
+ .section .debug_info.dwo,"e", at progbits
# DWARF v5 split CU header.
.long CU_split_5_end-CU_split_5_version # Length of Unit
@@ -318,7 +318,7 @@ CU_split_5_version:
.byte 0 # NULL
CU_split_5_end:
- .section .debug_types.dwo,"", at progbits
+ .section .debug_types.dwo,"e", at progbits
# DWARF v5 split type unit header.
TU_split_5_start:
diff --git a/llvm/test/DebugInfo/X86/invalid-unit-header.s b/llvm/test/DebugInfo/X86/invalid-unit-header.s
index ce8467902d03..e3f81ebd7d52 100644
--- a/llvm/test/DebugInfo/X86/invalid-unit-header.s
+++ b/llvm/test/DebugInfo/X86/invalid-unit-header.s
@@ -2,7 +2,7 @@
# RUN: llvm-dwarfdump -debug-info - | \
# RUN: FileCheck %s
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 0x01 # Abbrev code
.byte 0x11 # DW_TAG_compile_unit
.byte 0x00 # DW_CHILDREN_no
@@ -14,7 +14,7 @@
# The CU was considered valid even though there were some required fields
# missing in the header.
- .section .debug_info.dwo,"", at progbits
+ .section .debug_info.dwo,"e", at progbits
.long .CUend - .CUver # Length of Unit
.CUver:
.short 5 # DWARF version number
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/debug-names-find-dwo.s b/llvm/test/tools/llvm-dwarfdump/X86/debug-names-find-dwo.s
index a12aa2e90f14..c931ec44a1f7 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug-names-find-dwo.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug-names-find-dwo.s
@@ -16,7 +16,7 @@
.asciz "/tmp" # string offset=8
.Lskel_string2:
.asciz "foobar" # string offset=13
- .section .debug_loc.dwo,"", at progbits
+ .section .debug_loc.dwo,"e", at progbits
.section .debug_abbrev,"", at progbits
.byte 1 # Abbreviation Code
.byte 17 # DW_TAG_compile_unit
@@ -49,7 +49,7 @@
.section .debug_ranges,"", at progbits
.section .debug_macinfo,"", at progbits
.byte 0 # End Of Macro List Mark
- .section .debug_str.dwo,"MS", at progbits,1
+ .section .debug_str.dwo,"MSe", at progbits,1
.Linfo_string0:
.asciz "foo.dwo" # string offset=0
.Linfo_string1:
@@ -58,12 +58,12 @@
.asciz "/tmp/cu1.c" # string offset=63
.Linfo_string3:
.asciz "foobar" # string offset=74
- .section .debug_str_offsets.dwo,"", at progbits
+ .section .debug_str_offsets.dwo,"e", at progbits
.long 0
.long 8
.long 63
.long 74
- .section .debug_info.dwo,"", at progbits
+ .section .debug_info.dwo,"e", at progbits
.long 34 # Length of Unit
.short 4 # DWARF version number
.long 0 # Offset Into Abbrev. Section
@@ -85,7 +85,7 @@
.byte 0
.byte 3 # Abbrev [3] 0x24:0x1 DW_TAG_pointer_type
.byte 0 # End Of Children Mark
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 1 # Abbreviation Code
.byte 17 # DW_TAG_compile_unit
.byte 1 # DW_CHILDREN_yes
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s b/llvm/test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s
index 3de9c5cdf344..03a2ee4b4268 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_loc_dwo.s
@@ -8,7 +8,7 @@
# CHECK-NEXT: 0x00000000:
# CHECK-NEXT: DW_LLE_startx_length (0x00000001, 0x00000010): DW_OP_reg5 RDI
-.section .debug_loc.dwo,"", at progbits
+.section .debug_loc.dwo,"e", at progbits
# One location list. The pre-DWARF v5 implementation only recognizes
# DW_LLE_startx_length as an entry kind in .debug_loc.dwo (besides
# end_of_list), which is what llvm generates as well.
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s b/llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s
index 12e30cd6229c..48d8320eb24f 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/eh-frame-return-address-reg.s
@@ -23,7 +23,7 @@
_start:
nop
-.section .eh_frame, "a"
+.section .eh_frame,"a", at unwind
.long 16 # Size
.long 0x00 # ID
.byte 0x01 # Version
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/typeunit-name.s b/llvm/test/tools/llvm-dwarfdump/X86/typeunit-name.s
index 7b60ac96ffe8..99dbd8fe5c8e 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/typeunit-name.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/typeunit-name.s
@@ -13,7 +13,7 @@
str_TU_4:
.asciz "V4_type_unit"
- .section .debug_str.dwo,"MS", at progbits,1
+ .section .debug_str.dwo,"MSe", at progbits,1
dwo_TU_5:
.asciz "V5_split_type_unit"
@@ -36,7 +36,7 @@ dwo_TU_5:
.byte 0x00 # EOM(3)
# And a .dwo copy for the .dwo section.
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 0x01 # Abbrev code
.byte 0x41 # DW_TAG_type_unit
.byte 0x01 # DW_CHILDREN_yes
@@ -75,7 +75,7 @@ TU_4_type:
.byte 0 # NULL
TU_4_end:
- .section .debug_types.dwo,"", at progbits
+ .section .debug_types.dwo,"e", at progbits
# FIXME: DWARF v5 wants type units in .debug_info[.dwo] not .debug_types[.dwo].
# DWARF v5 split type unit header.
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s
index d34296597e20..65ba8d4a0e84 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/verify_debug_abbrev.s
@@ -28,7 +28,7 @@
.byte 0 # EOM(1)
.byte 0 # EOM(2)
.byte 0 # EOM(3)
- .section .debug_abbrev.dwo,"", at progbits
+ .section .debug_abbrev.dwo,"e", at progbits
.byte 1 # Abbreviation Code
.byte 17 # DW_TAG_compile_unit
.byte 1 # DW_CHILDREN_yes
More information about the llvm-commits
mailing list