frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo ago
I'd like to do some statistics over the machine code gcc generates, such as a histogram of used instructions, average volatile/preserved registers usage of functions etc. For now just x86_64 SysV-ABI would be enough.

However I'm not aware of any pre-existing tool that lets me easily do this. The options I currently see are either make gcc output assembly and write a parser for the GNU Assembler format (possibly by reusing the asm-parser of the compiler-explorer project), or write a tool that reads (disassembles) object files directly using elfutils.

Any hints, prior work, further ideas, links to useful resources, or any other kind of help would be much appreciated.

Comments

baobun•8mo ago
"Static analysis" should be a relevant search term. Assuming you don't need to tie the instructions back to C code then the "gcc" part seems circumstancial for implementation? I guess you might want to parse the ASM into an Abstract Syntax Tree (AST) represenation and work on that?

If you do want to tie it back to the source, this looks relevant: http://icps.u-strasbg.fr/~pop/gcc-ast.html

phafu•8mo ago
For my purpose I don't need to get back to the original source, no.

The gcc part is only relevant with regards to what dialect of assembler I need to parse. If I go that route, I'd write a parser for the GNU assembler, and that would of course work with any code in that dialect, regardless from which compiler it came from (I haven't checked whether other compilers can produce GNU assembler though).

AppleUnsold – the Apple products they won't sell you

https://appleunsold.com
1•ChrisArchitect•1m ago•0 comments

Thoughts on AI-assisted software engineering (2026)

https://sattlerjoshua.com/writing/2026-02-01-thoughts-on-ai-assisted-software-engineering/
1•jsattler•3m ago•1 comments

A freelance marketplace for AI Agents

https://www.moltverr.com/
1•manthangupta109•4m ago•0 comments

I built a search engine to index the un-indexable parts of Telegram

https://telehunt.org
1•alenmangattu•7m ago•0 comments

Gem.coop update #4: cooldowns beta

https://gem.coop/updates/4/
1•GreenWatermelon•10m ago•0 comments

Show HN: Words.zip (300k words found on an infinite grid)

https://words.zip/
3•yathern•12m ago•0 comments

Ex-Google Recruiter Explains Why "Lying" Gets You Hired [video]

https://www.youtube.com/watch?v=T__1QViXUxk
1•austin-cheney•13m ago•2 comments

Lego, it's time to hit the brakes – Fast Company

https://www.fastcompany.com/91483864/lego-its-time-to-hit-the-brakes
2•janandonly•14m ago•0 comments

Updated for 2026: Forward Deployed Engineer Rule Book

https://www.amazon.com/Forward-Deployed-Engineer-Rule-Book/dp/B0FXSZW5HB
1•STEM-AI-FDE•15m ago•0 comments

RISC-V User-Space Control Flow Integrity / Shadow Stack Appears Ready

https://www.phoronix.com/news/RISC-V-User-Space-CFI
2•maxloh•18m ago•0 comments

Pancreatic cancer researchers' latest breakthrough could help tumors disappear

https://nypost.com/2026/01/30/health/pancreatic-cancer-breakthrough-tumors-disappear-in-mice/
6•abunuwas•22m ago•0 comments

I ran an LLM on iOS to build another privacy focused notes app

https://drive.google.com/file/d/1NhbPWhw1BzEAEebY33XXmjt6sPte0l9Z/view?usp=sharing
3•moeen-mahmud•22m ago•1 comments

mcporter: Call MCPs via TypeScript, Masquerading as Simple TypeScript API

https://github.com/steipete/mcporter
3•tosh•23m ago•0 comments

Despair Space

https://github.com/YuriyKortev/despair_space
3•rootiks•23m ago•0 comments

Soft skills hiring managers emphasize across various job categories

https://jobswithgpt.com/blog/soft_skills_by_category_feb_2026/
4•sp1982•23m ago•0 comments

The Architecture of a Turkish Phishing Attack That Hacked Me

https://debarghyadas.com/writes/phishing/
3•tanelpoder•25m ago•0 comments

TikTok users freak out over app's 'immigration status' collection

https://techcrunch.com/2026/01/23/tiktok-users-freak-out-over-apps-immigration-status-collection-...
4•vinnyglennon•25m ago•1 comments

Designated Initializers, the best feature of C++20

https://mropert.github.io/2026/01/15/designed_initializers/
2•PaulHoule•25m ago•0 comments

15min City

https://whatif.sonycsl.it/15mincity/index.php
1•BerislavLopac•26m ago•0 comments

Show HN: Database Internals, a book by Claude Opus 4.5

https://cloudstreet-dev.github.io/Database-Internals/
2•DavidCanHelp•27m ago•0 comments

Real engineering failures instead of success stories

https://failhub.substack.com/p/failhub-issue-1
4•birdculture•27m ago•0 comments

mom: Master of Mischief

https://github.com/badlogic/pi-mono/tree/main/packages/mom
2•tosh•27m ago•0 comments

Questions on the Beaufiful

https://www.alicegribbin.com/p/delacroix-the-beautiful
1•andsoitis•28m ago•0 comments

Saga of the Bird-Brained Bombers

https://www.nist.gov/blogs/taking-measure/saga-bird-brained-bombers
1•sharpshadow•28m ago•0 comments

Free image converter with 60 formats, batch processing, privacy-first

https://bestfreeimageconverter.com
1•feifeirun_hn•29m ago•0 comments

Is it possible to detect AI generated text?

https://www.kaggle.com/discussions/general/671267
1•cllxcll•29m ago•0 comments

San Francisco Art Week 2026

https://jonathantdneil.substack.com/p/on-san-francisco-art-week-2026
1•andsoitis•29m ago•0 comments

Graphic Design History Resources

https://wemadethis.co.uk/blog/2021/09/graphic-design-history-resources/
1•bookofjoe•29m ago•0 comments

Loopy: An in-memory, zero-side-effect filesystem API over a single Python string

https://github.com/tg1482/loopy
1•tg1482•29m ago•1 comments

Ted Chiang and What it is like to be an A.I

https://jonathantdneil.substack.com/p/ted-chiang-and-what-it-is-like-to
1•andsoitis•30m ago•0 comments