File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -1266,9 +1266,7 @@ void Writer::createSymbolAndStringTable() {
1266
1266
// solution where discardable sections have long names preserved and
1267
1267
// non-discardable sections have their names truncated, to ensure that any
1268
1268
// section which is mapped at runtime also has its name mapped at runtime.
1269
- bool HasDwarfSection = false ;
1270
1269
for (OutputSection *sec : ctx.outputSections ) {
1271
- HasDwarfSection |= sec->name .startswith (" .debug_" );
1272
1270
if (sec->name .size () <= COFF::NameSize)
1273
1271
continue ;
1274
1272
if ((sec->header .Characteristics & IMAGE_SCN_MEM_DISCARDABLE) == 0 )
@@ -1281,7 +1279,7 @@ void Writer::createSymbolAndStringTable() {
1281
1279
sec->setStringTableOff (addEntryToStringTable (sec->name ));
1282
1280
}
1283
1281
1284
- if (ctx.config .debugDwarf || ctx.config .debugSymtab || HasDwarfSection ) {
1282
+ if (ctx.config .debugDwarf || ctx.config .debugSymtab ) {
1285
1283
for (ObjFile *file : ctx.objFileInstances ) {
1286
1284
for (Symbol *b : file->getSymbols ()) {
1287
1285
auto *d = dyn_cast_or_null<Defined>(b);
Original file line number Diff line number Diff line change 8
8
9
9
# RUN: lld-link /debug /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
10
10
# RUN: llvm-readobj --symbols %t.exe | FileCheck -check-prefix=NO %s
11
- # RUN: lld-link /debug /merge:.blank=.debug_info /out:%t.exe /entry:main %t.obj %p/Inputs/std64.lib
12
- # RUN: llvm-readobj --symbols %t.exe | FileCheck %s
13
11
14
12
# CHECK: Symbols [
15
13
# CHECK-NEXT: Symbol {
@@ -144,10 +142,6 @@ sections:
144
142
Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
145
143
Alignment: 4
146
144
SectionData: 48656C6C6F0048656C6C6F20576F726C6400
147
- - Name: .blank
148
- Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_DISCARDABLE, IMAGE_SCN_MEM_READ ]
149
- Alignment: 1
150
- SectionData: 0000
151
145
symbols:
152
146
- Name: "@comp.id"
153
147
Value: 10394907
You can’t perform that action at this time.
0 commit comments