frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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: Cadence – Small marker tracking for source files

https://github.com/skorotkiewicz/cadence
1•modinfo•10m ago•0 comments

Toshifumi Suzuki, 7-Eleven Japan founder, has died

https://www.cnn.com/2026/05/25/asia/711-japan-founder-dies-intl-hnk
1•NaOH•12m ago•0 comments

Show HN: YieldOS-Lite – A simulator for LLM inference control-plane governance

https://github.com/nikitph/yieldos
1•loaderchips•15m ago•0 comments

QG: A speculative protocol treating presence and attention as value primitives

https://github.com/Mureskae/QG
1•Mureskae•16m ago•0 comments

My AI coding flow was burning tokens to do things code should do

https://geerttheys.substack.com/p/i-agent-deterministic-coding-flow
1•toadi•26m ago•1 comments

Hosting My Own Newsletter

https://endler.dev/2026/newsletter-setup/
1•yakkomajuri•26m ago•0 comments

Ask HN: Encouraging a child's gaming PC build despite fear of gaming addiction?

1•marttt•38m ago•1 comments

Over $5M in donations flowed in after the Lapu-Lapu Day attack. Where it went

https://www.cbc.ca/news/canada/lapu-lapu-donations-analysis-9.7207684
1•wolpoli•44m ago•0 comments

Huawei Unveils Tau (τ) Scaling Law for Transistor and System Breakthroughs

https://www.huawei.com/en/news/2026/5/ieee-iscas-tau-scaling
1•CalmStorm•45m ago•0 comments

Mecha Comet is an open-source hardware, modular Linux handheld computer

https://www.cnx-software.com/2026/01/25/mecha-comet-is-an-open-source-hardware-modular-linux-hand...
1•walterbell•47m ago•0 comments

Companies Are Just a Graph of Algorithms

https://danielmiessler.com/blog/companies-graph-of-algorithms
5•samuel246•48m ago•0 comments

CanYouCalculate

https://canyoucalculate.com
1•sauhard121•51m ago•0 comments

Porting Ytdlp to Bun (Ytdlb)

https://yamada-blog.pages.dev/blog/0007/
1•curliness•52m ago•0 comments

Software supply-chain attacks are no longer rare events

https://www.wired.com/story/teampcp-software-supply-chain-attack-spree-github/
2•latentframe•52m ago•1 comments

What is Git made of? (2022)

https://zserge.com/posts/git/
1•vinhnx•54m ago•0 comments

RLS sounds great until it isn't

https://planetscale.com/blog/rls-sounds-great-until-it-isntp
1•eigenBasis•54m ago•0 comments

Jira Is Turing-Complete

https://seriot.ch/computation/jira.html
2•vinhnx•55m ago•0 comments

Show HN: Live AI music sequencing agent

https://pretzel.shukant.com/?nickname=Anonymous&role=stage
1•shukantpal•56m ago•0 comments

A Cattle Ranch Is Doing What Ivy League Colleges Can't

https://www.nytimes.com/2026/05/20/opinion/deep-springs-college-ivy-league-education.html
1•gmays•57m ago•0 comments

The Eternal Sloptember

https://geohot.github.io//blog/jekyll/update/2026/05/24/the-eternal-sloptember.html
67•razin•1h ago•18 comments

My friend found idle NAT gateways his team said didn't exist

https://getnable.com/
1•chaandannn•1h ago•1 comments

AI Interpretability Is a Revolutionary Skill

https://www.outcryai.com/research/the-dark-between-the-stars
1•micahwhite•1h ago•1 comments

High-efficiency multi-scale holographic volumetric 3Dprinting with a phase light

https://www.nature.com/articles/s41377-026-02331-4
2•anikoghosyan•1h ago•0 comments

PaaS Platfrom to Deploy Apps

https://nept.cloud
1•nazmussamir•1h ago•0 comments

Command A+: Making sovereign agentic capabilities available to all

https://cohere.com/blog/command-a-plus
1•offbyone42•1h ago•0 comments

Splinter Cell veteran says realistic modern lighting has screwed up stealth game

https://www.rockpapershotgun.com/splinter-cell-veteran-says-realistic-modern-lighting-has-screwed...
4•Tomte•1h ago•0 comments

Weight loss drugs could save airlines money on fuel as Americans slim down

https://www.cbsnews.com/news/weight-loss-drugs-glp1s-airlines-fuel-costs/
1•mattas•1h ago•2 comments

Everlane Finalizes Sale to Shein

https://www.nytimes.com/2026/05/22/style/shein-everlane-fast-fashion-sustainability.html
1•lxm•1h ago•0 comments

Robotaxis Aren't as Autonomous as They Seem

https://junkoyoshidaparis.substack.com/p/robotaxis-arent-as-autonomous-as
2•mattas•1h ago•0 comments

Kids are Graduating Without Being Able to Read [video][34 mins]

https://www.youtube.com/watch?v=PcSApLcxpYc
1•Bender•1h ago•0 comments