Article View: pl.comp.lang.c
Article #309247Re: need a program that will print a percent of code in tehe exe/dll
From: (fir)
Date: Sun, 30 Apr 2017 10:49
Date: Sun, 30 Apr 2017 10:49
42 lines
3972 bytes
3972 bytes
W dniu niedziela, 30 kwietnia 2017 10:44:50 UTC+2 użytkownik (fir) napisał: > W dniu niedziela, 30 kwietnia 2017 01:18:19 UTC+2 użytkownik Matt D. napisał: > > 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 > > ok, tnx moze sie przyda.. niby program napisany na razie a grzebanie w tym pe jest nudne ale jak ktos jest nieskopoziomowym programista windows to nieststy trzeba chyba znac ps przy okazji skrobnalem disklaimer dlaczego czasem moj kod jest "enough good" (ps my code posted is badly shaped i know, but it is becouse i do not code edge cases firstly also do not shape code stylistically firstly (just to spare as much energy i can) - anyway one must establish some level on which one think "this code is ENOUGH good" and it is not excluded that setting this level lower is better than setting it higher (i know using structs and do some edge case checking, reformating names and shape etc is in fact better.. but form other point of view go worse is better - so i write this disclimer to say that for sure i know thic coede i post could look better but i also deny to tace comments on this as i code how i code for some practical purpose and dont like to meet morons with their stupid comments like your code is ugly ;c hope im understood) pisze to bo nie chce mi sie gadac z rozmaitymi debilami ktorzy pewnie zawsze pala sie by wypominac "bledy w kodzie " czy "zly wyglad" o czym nie mam zamiaru ostatnio dyskutowac
Technical Details
Message-ID:
<c1f9ec13-4698-45c0-8249-dbc050d67066@googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin.stu.neva.ru!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!t52no682447qtb.0!news-out.google.com!x200ni731itb.0!nntp.google.com!c26no1072297itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mailReferences:
<624bfa7c-7f80-4bc9-a2cb-7598eab65097@googlegroups.com> <oe36vt$i0q$1@portraits.wsisiz.edu.pl> <720aff2d-5d5c-4104-ba18-6167de325226@googlegroups.com>Show Full Headers
Complete Article Headers
X-Received: by 10.159.48.216 with SMTP id k24mr5311139uab.9.1493549354508; Sun, 30 Apr 2017 03:49:14 -0700 (PDT) X-Received: by 10.157.39.138 with SMTP id c10mr268974otb.9.1493549354447; Sun, 30 Apr 2017 03:49:14 -0700 (PDT) Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin3!goblin.stu.neva.ru!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!t52no682447qtb.0!news-out.google.com!x200ni731itb.0!nntp.google.com!c26no1072297itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: pl.comp.lang.c Date: Sun, 30 Apr 2017 03:49:14 -0700 (PDT) In-Reply-To: <720aff2d-5d5c-4104-ba18-6167de325226@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=5.172.255.134; posting-account=Sb6m8goAAABbWsBL7gouk3bfLsuxwMgN NNTP-Posting-Host: 5.172.255.134 References: <624bfa7c-7f80-4bc9-a2cb-7598eab65097@googlegroups.com> <oe36vt$i0q$1@portraits.wsisiz.edu.pl> <720aff2d-5d5c-4104-ba18-6167de325226@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <c1f9ec13-4698-45c0-8249-dbc050d67066@googlegroups.com> Subject: Re: need a program that will print a percent of code in tehe exe/dll From: "(fir)" <profesor.fir@gmail.com> Injection-Date: Sun, 30 Apr 2017 10:49:14 +0000 Lines: 59 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit