{"id":2136,"date":"2011-07-30T11:21:01","date_gmt":"2011-07-30T09:21:01","guid":{"rendered":"http:\/\/glandium.org\/blog\/?p=2136"},"modified":"2011-07-30T11:25:49","modified_gmt":"2011-07-30T09:25:49","slug":"feliminate-dwarf2-dups-fail","status":"publish","type":"post","link":"https:\/\/glandium.org\/blog\/?p=2136","title":{"rendered":"-feliminate-dwarf2-dups FAIL"},"content":{"rendered":"<p>DWARF-2 is a format to store debugging information. It is used on many ELF systems such as GNU\/Linux. With the way things are compiled, there is a lot of redundant information in the DWARF-2 sections of an ELF binary.<\/p>\n<p>Fortunately, there is an option to gcc that helps dealing with the redundant information and downsizes the DWARF-2 sections of ELF binaries. This option is <code>-feliminate-dwarf2-dups<\/code>.<\/p>\n<p>Unfortunately, it <a href=\"http:\/\/gcc.gnu.org\/ml\/gcc-help\/2010-09\/msg00083.html\">doesn't work with C++<\/a>.<\/p>\n<p>With <code>-g<\/code> alone, libxul.so is 468 MB. With <code>-g -feliminate-dwarf2-dups<\/code>, it is... 1.5 GB. FAIL.<\/p>\n<p>The good news is that as stated in the message linked above, <code>-gdwarf-4<\/code> does indeed help reducing debugging information size. libxul.so, built with <code>-gdwarf-4<\/code> is 339 MB. This however requires gcc 4.6 and a pretty recent gdb.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DWARF-2 is a format to store debugging information. It is used on many ELF systems such as GNU\/Linux. With the way things are compiled, there is a lot of redundant information in the DWARF-2 sections of an ELF binary. Fortunately, there is an option to gcc that helps dealing with the redundant information and downsizes [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,25],"tags":[23],"class_list":["post-2136","post","type-post","status-publish","format-standard","hentry","category-pdo","category-planet-mozilla","tag-en"],"_links":{"self":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2136","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2136"}],"version-history":[{"count":8,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2136\/revisions"}],"predecessor-version":[{"id":2144,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2136\/revisions\/2144"}],"wp:attachment":[{"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2136"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2136"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/glandium.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2136"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}