frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•9mo 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•9mo 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•9mo 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).

Code Mode: Giving AI Agents an API in 1k Tokens (With Demos) [video]

https://www.youtube.com/watch?v=-ZikRWR1Gb4
1•emot•58s ago•0 comments

The Death of the Downvote

https://nathankyoung.substack.com/p/the-death-of-the-downvote
1•mitka_y•3m ago•0 comments

Computer run on human brain cells learned to play 'Doom'

https://www.popsci.com/technology/human-brain-cell-computer-plays-doom/
1•wjb3•4m ago•0 comments

The Thucydides Trap Is Coming for America

https://www.nytimes.com/2025/11/21/opinion/america-china-trump-g20.html
3•KnuthIsGod•6m ago•0 comments

Workers: Autonomous Agents in Slack

https://www.tagworkers.com/
1•handfuloflight•7m ago•0 comments

48x32, a 1536 LED Game Computer

https://jacquesmattheij.com/48x32-introduction/
1•duck•7m ago•0 comments

We can't launch our trash into the sun. But why?

https://www.popsci.com/science/launch-trash-into-the-sun-video/
1•wjb3•11m ago•0 comments

Tim Sweeney signed away his right to criticize Google until 2032

https://www.theverge.com/news/889595/tim-sweeney-signed-away-his-right-to-criticize-google-until-...
1•0in•14m ago•0 comments

Our AI code reviewer found a CVSS 10.0 authentication bypass in pac4j-JWT

https://www.codeant.ai/security-research/pac4j-jwt-authentication-bypass-public-key
1•Amartya_jha•15m ago•1 comments

Setting Up Preview Envs to Test Agent PRs Without Ever Pulling Locally

https://www.piersonmarks.com/posts/testing-agent-written-prs-in-the-cloud
1•PiersonMarks•18m ago•0 comments

Anthropic CEO calls OpenAI's messaging around military deal 'straight up lies'

https://techcrunch.com/2026/03/04/anthropic-ceo-dario-amodei-calls-openais-messaging-around-milit...
12•SilverElfin•27m ago•2 comments

Jeffrey Epstein: The Transhumanist Pedophile Who Hoped to Live Forever

https://www.truthdig.com/articles/jeffrey-epstein-the-transhumanist-pedophile-who-hoped-to-live-f...
4•cdrnsf•28m ago•0 comments

Apparently chardet got Claude to rewrite the codebase from LGPL to MIT

https://chaos.social/@Foxboron/116170859737134271
1•gaius_baltar•28m ago•0 comments

Pike – Solving the "should we stop here or gamble on the next exit" problem

https://tomjohnell.com/pike-solving-the-should-we-stop-here-or-gamble-on-the-next-exit-problem/
3•tjohnell•31m ago•1 comments

Gemini 3.1 Flash-Lite

https://twitter.com/GoogleDeepMind/status/2028872381477929185
1•pat2man•32m ago•0 comments

Altman admits OpenAI can't control Pentagon's use of AI

https://www.theguardian.com/technology/2026/mar/04/sam-altman-openai-pentagon
5•albumen•33m ago•0 comments

European pensions are a $30T missed opportunity

https://www.economist.com/finance-and-economics/2026/03/04/european-pensions-are-a-30trn-missed-o...
1•vinni2•35m ago•0 comments

JSE: A Structural Expression Protocol for AI Agents

1•mars_liu•36m ago•1 comments

Unveiling the Weaponized Web Shell EncystPHP

https://www.fortinet.com/blog/threat-research/unveiling-the-weaponized-web-shell-encystphp
1•WeaklingOra•36m ago•0 comments

Extending single-minus amplitudes to gravitons

https://openai.com/index/extending-single-minus-amplitudes-to-gravitons/
4•telotortium•36m ago•0 comments

Show HN: Residuum | Agentic AI with continuous context

https://github.com/Grizzly-Endeavors/residuum
1•BearFlinn•37m ago•0 comments

Platform Designed for Motorists and Law Enforcement for Safety

https://www.traafik.com/
1•fcpguru•37m ago•0 comments

Rules for Pricing Client Engagements

https://b2bs.substack.com/p/op-note-3-rules-for-pricing-client
1•ohjeez•42m ago•0 comments

TakeoutReader – Turn your Google Takeout JSON into a readable report

1•martinZak•43m ago•1 comments

Show HN: One provider starts lying at request 50. The quorum catches it

https://github.com/sbw70/verification-constraints/blob/main/modules/integrated-constraint-demos/t...
1•sbw70•43m ago•0 comments

Roundup of Events for Bootstrappers in March 2026

https://bootstrappersbreakfast.com/2026/02/24/roundup-of-march-bootstrapper-events/
1•skmurphy•45m ago•1 comments

How Jeffrey Epstein Used Reid Hoffman to Court Silicon Valley's Elite

https://www.bloomberg.com/news/articles/2026-03-04/how-jeffrey-epstein-used-reid-hoffman-to-court...
7•petethomas•46m ago•1 comments

Stathat Is Shutting Down

4•jervant•48m ago•0 comments

Show HN: RustyRAG lowest-latency open-source RAG on GitHub

https://github.com/AlphaCorp-AI/RustyRAG
1•zer0tokens•50m ago•0 comments

Senate fails to block US involvement in Iran war

https://www.usatoday.com/story/news/politics/2026/03/04/iran-war-powers-resolution-senate-vote/88...
7•geox•50m ago•0 comments