https://bugs.llvm.org/show_bug.cgi?id=39147
Bug ID: 39147
Summary: lld-link emits symbol data for global variables that
were optimized out by /opt:ref
Product: lld
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: COFF
Assignee: unassignedb...@nondot.org
Reporter: brucedaw...@chromium.org
CC: llvm-bugs@lists.llvm.org
When running https://cs.chromium.org/chromium/src/tools/win/ShowGlobals/ on the
latest Canary chrome_child.dll.pdb I noticed that some of the large globals
were listed as being in section 0. I was trying to make sure that as much data
as possible was in the read-only section (section 2) and this section number
confused me.
One of the variables in question was kWebuiResources. ShowGlobals shows this as
being in section 2 in chrome.dll (browser process) and I confirmed this using
the debugger and vmmap, however when I tried to repeat this test in the
renderer process the debugger claimed that kWebuiResources did not exist.
Checking the .rsp for chrome_child.dll I see that
obj/ui/resources/webui_resources_grd/webui_resources_map.obj is indeed linked
in but the linker presumably then discards kWebuiResources. It appears that
when it discards the symbol it still emits a debug record for it, leading to
this confusion.
This isn't a serious bug but it would seem worthwhile to avoid emitting debug
information for deleted data. This will shrink the PDB slightly and will avoid
confusion. But, not high priority.
Any recent published PDB for chrome_child.dll.pdb can be used to investigate
this but the one I was using has been uploaded to Google drive and is
accessible to Google employees at
https://drive.google.com/open?id=1aA5LngryRAoo7T-uLdV_4Y3gpOr42mBF
The top-ten (by size) symbols that this applies to are:
StrTable
kWebuiResources
ff_aac_eld_window_512_fixed
ff_aac_eld_window_480_fixed
g_kuiDequantCoeff8x8
instruction_table
kChromePolicyDetails
kPower10MantissaTable
ff_celt_pvq_u
gCurrencyList
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs