Article View: pl.comp.lang.c
Article #309244Re: need a program that will print a percent of code in tehe exe/dll
From: Matt D.
Date: Sat, 29 Apr 2017 23:18
Date: Sat, 29 Apr 2017 23:18
25 lines
1989 bytes
1989 bytes
On 4/29/2017 14:46, (fir) wrote: > if you got exe or dll the most important sections are .code .data .const and .bss > > need a simple console program that show the size of the code > (in bytes and also in percent) in given .exe .dll [also sieze of consts and initialised data, yet size of static arrays] Tools: GNU Size: https://sourceware.org/binutils/docs/binutils/size.html PE Insider: http://cerbero.io/peinsider/ GNU Size Examples: http://www.geeksforgeeks.org/memory-layout-of-c-program/ ttp://cs-fundamentals.com/c-programming/memory-layout-of-c-program-code-data-segments.php#size-of-code-data-bss-segments See also Ange Albertini's work: http://i.imgur.com/tnUca.jpg https://speakerdeck.com/ange/workshop-exploring-the-portable-executable-format https://github.com/corkami/docs/blob/master/PE/PE.md https://speakerdeck.com/ange/x86-and-pe https://speakerdeck.com/ange/byte-ing-the-pe-that-fails-you https://speakerdeck.com/ange/booklet-elf101-a-linux-executable-walkthrough Best, Matt
Technical Details
Message-ID:
<oe36vt$i0q$1@portraits.wsisiz.edu.pl>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.d40a9d0a.rev.stofanet.dk!not-for-mailReferences:
<624bfa7c-7f80-4bc9-a2cb-7598eab65097@googlegroups.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!wsisiz.edu.pl!.POSTED.d40a9d0a.rev.stofanet.dk!not-for-mail From: "Matt D." <no-spam@invalid.local> Newsgroups: pl.comp.lang.c Subject: Re: need a program that will print a percent of code in tehe exe/dll Date: Sun, 30 Apr 2017 01:18:16 +0200 Organization: http://www.wit.edu.pl Sender: mdziubin@nospam.wsisiz.edu.pl Message-ID: <oe36vt$i0q$1@portraits.wsisiz.edu.pl> References: <624bfa7c-7f80-4bc9-a2cb-7598eab65097@googlegroups.com> Mime-Version: 1.0 Injection-Date: Sat, 29 Apr 2017 23:18:21 -0000 (UTC) Injection-Info: portraits.wsisiz.edu.pl; posting-host="d40a9d0a.rev.stofanet.dk:212.10.157.10"; logging-data="18458"; mail-complaints-to="abuse@wsisiz.edu.pl" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: <624bfa7c-7f80-4bc9-a2cb-7598eab65097@googlegroups.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit