frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

Show HN: Publora – One API/MCP for AI agents to post across 10 social networks

https://publora.com
1•sbulaev•1m ago•0 comments

Cursor users must consent to data collection in order to use Fable 5

https://cursor.com/docs/models/claude-fable-5
2•__natty__•5m ago•1 comments

DMR effect on drag reduction of a streamlined body

https://www.cambridge.org/core/journals/journal-of-fluid-mechanics/article/dmr-effect-on-drag-red...
1•deadbishop•6m ago•0 comments

Show HN: CLI for self-hosted Invoice Ninja

https://github.com/DrDBanner/inmanage
1•ycomrsys•7m ago•1 comments

They're Made Out of Compute

https://magzimof.com/made-out-of-compute/
2•shaimagz•10m ago•0 comments

High-severity vulnerability in Linux caused by a single faulty character

https://arstechnica.com/security/2026/06/a-single-errant-character-in-the-linux-kernel-allows-att...
1•joozio•11m ago•0 comments

Is symbolic AI more relevant than ever?

https://www.heise.de/en/blog/Is-symbolic-AI-more-relevant-than-ever-11323023.html
2•goloroden•17m ago•0 comments

Can tech companies learn to love cheaper AI models?

https://techcrunch.com/2026/06/09/can-tech-companies-learn-to-love-cheaper-models/
2•parveshblogger•19m ago•0 comments

Tell HN: TIL Apple is rewriting core things in Swift

2•gigatexal•20m ago•0 comments

iOS 27 features we didn't see onstage

https://techcrunch.com/2026/06/09/ios-27-features-we-didnt-see-on-stage/
1•ameypandey•20m ago•0 comments

Turn any PDF or article into a podcast episode

https://manateavagner.com/news/podcasts-pdf-to-episode
1•manateavagner•21m ago•0 comments

Ofarwise – a local Windows app for interview prep and mock practice

https://www.ofarwise.com/
1•hallengray•21m ago•0 comments

BlenderHunt, an Indie Marketplace for Blender Creators

https://blenderhunt.com/
1•egretfx•23m ago•0 comments

Don't mop the floor. Fix the leaky faucet

https://blog.br11k.dev/2026-06-02-dont-mop-the-floor-fix-the-leaky-faucet
1•konovalov-nk•23m ago•1 comments

Show HN: Frhog

https://www.frhog.com/?hn
1•krm01•24m ago•0 comments

WSP WordPress MCP – Connect AI Coding Agents to WordPress

https://github.com/bilalnaseer/wsp-wordpress-mcp
1•ibrarmaikah•27m ago•0 comments

Why the Supreme Court Is Debating Which Founding Fathers Were Drunks

https://www.wsj.com/us-news/law/supreme-court-session-cases-originalism-birthright-citizenship-se...
1•JumpCrisscross•28m ago•0 comments

Pelican on a Bicycle: Claude Fable 5 vs. GPT-5.5 Pro vs. Gemini 3.1 Pro

https://www.promptfrenzy.com/showdown/svg-pelican
1•spobin•28m ago•0 comments

Choice: Nextcloud Office Powered by Collabora or Euro-Office

https://nextcloud.com/blog/nextcloud-hub26-spring/
1•teekert•28m ago•0 comments

Eight Myths on Software Engineering and GenAI

https://spawn-queue.acm.org/doi/10.1145/3807963
1•RyeCombinator•32m ago•0 comments

Emacs Appearances in Pop Culture

https://ianyepan.github.io/posts/emacs-in-pop-culture/
1•ggcr•37m ago•0 comments

Inferoa AI harness claimed 90% cache savings. We ran it and measured 97.8%

https://zozo123.github.io/inferoa-demo/
1•zozo123-IB•37m ago•0 comments

TvOS 27: Apple Music Gains Hi-Res Lossless Audio on Apple TV 4K

https://www.macrumors.com/2026/06/10/tvos-27-apple-music-hi-res-lossless-audio-apple-tv/
2•tosh•39m ago•0 comments

How the Other Half Counts: Planner Statistics in Oracle, Db2, MySQL, SQLite

https://thebuild.com/blog/how-the-other-half-counts/
1•pgedge_postgres•39m ago•0 comments

Show HN: Impress your boss with interactive Decision Tree Visualization

https://github.com/mljar/supertree
2•pplonski86•40m ago•0 comments

Stop Gmail from Blocking Your Domain Emails – SPF, DKIM and DMARC Setup

https://mysevenstars.com/articles/email-authentication-guide.html
2•mssblogs•41m ago•4 comments

How to build a cancer vaccine, and whether they will work this time

https://www.owlposting.com/p/how-to-build-a-cancer-vaccine-and
1•yorwba•41m ago•0 comments

NASA Marches Toward Artemis III Mission in 2027, Names Crew Members

https://www.nasa.gov/news-release/nasa-marches-toward-artemis-iii-mission-in-2027-names-crew-memb...
1•noworld•43m ago•0 comments

Beyond Protectionism: Why EU should put up trade barriers against Chinese goods

https://www.noahpinion.blog/p/why-europe-should-put-up-trade-barriers
2•throw0101a•44m ago•1 comments

Show HN: A tool to analyze and manage sosreports

https://sos-vault.com/login
1•jlrueda•48m ago•0 comments