<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><span style="font-size: 12pt;">>>*nod* That's been the historic ELF+DWARF approach, but both MacOS (with dsyms+DWARF) and Windows </span><br>
</p>
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<div>
<div>>>(COFF+CodeView+PDB) don't do it that way, and instead involve the linker to a degree.</div>
<div>>>Mostly I'm wondering if it'd be reasonable to (and if anyone would be interested in doing it) do</div>
<div>>>something more like the PDB support - fully debug-aware linking.</div>
<div>> <br>
</div>
<div>>Honestly saying I only know how ELF linker works and may be my thoughts below are silly for some reason or duplicating</div>
<div>>some already existent approach. Looking at what .dwp do, looks there are two main things reducing size debug data:</div>
<div>>1) "It must allow for the removal of duplicate type units".</div>
<div>>2) "It must allow for the removal of duplicate strings".<br>
</div>
<div>> </div>
<div>>Linker already deduplicates strings by itself, though it can delegate it to some API for debug sections. </div>
<div>>And what it could probably do is call some library API. Linker could give it a some set (or all of) </div>
<div>>.debug_* sections so this library would rebuild and optimize the dwarf data, eliminate duplicates, and</div>
<div>>return optimized debug sections back to linker. Then linker would perform relocations and emit the result to output.</div>
<div>> <br>
</div>
<div><br>
</div>
<div>Though probably resolving relocations can be a problem here. May be linker could pass already relocated sections for<br>
</div>
<div>final optimization/deduplication and some additional information probably, but anyways I see it can be not that simple now :)<br>
</div>
<div><br>
</div>
<div>George.<br>
<br>
</div>
</div>
</div>
</body>
</html>