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).

The Benjamin Button Effect: Software Careers in the Age of AI

https://softwareguru.substack.com/p/the-benjamin-button-effect-software
1•ssamptur•2m ago•0 comments

Uncovered: Secret room beneath Chinese embassy that poses threat to City

https://www.telegraph.co.uk/news/2026/01/12/revealed-china-embassy-secret-plans-spy-basement/
1•DustinEchoes•6m ago•1 comments

Wasefire

https://opensource.googleblog.com/2025/11/secure-by-design-firmware-development-with-wasefire.html
1•apitman•7m ago•0 comments

First impressions of Claude Cowork, Anthropic's general agent

https://simonwillison.net/2026/Jan/12/claude-cowork/
1•mfiguiere•8m ago•0 comments

Fed That Fights Back Is a Threat to Trump's Takeover Plan

https://www.bloomberg.com/news/features/2026-01-13/jerome-powell-fights-back-threatens-trump-s-fe...
2•JumpCrisscross•10m ago•0 comments

Invisible Risks That Kill Series A Rounds

https://blog.nemausat.com/series-a-technical-due-diligence-checklist
1•Ruidy•10m ago•1 comments

You Don't Need Mintlify

https://blog.tangled.org/docs
1•nerdypepper•12m ago•0 comments

Britain Investigates Elon Musk's X over Grok's Sexualized A.I. Images

https://www.nytimes.com/2026/01/12/world/europe/grok-ai-images-x-elon-musk-uk.html
4•rediguanayum•12m ago•1 comments

Show HN: Create Postcards from Museum Artworks

https://sweetpost.art/
1•thebigship•13m ago•0 comments

In-School Supervised Ed-Tech Support Produces Learning Gains

https://www.nber.org/papers/w34683
3•sien•15m ago•0 comments

Bayes theorem and how we talk about medical tests

https://ntietz.com/blog/bayes-theorem-medical-tests/
4•lwhsiao•24m ago•0 comments

Show HN: AI Prompt Generator, Optimizer and Manager

https://promtist.ai/
3•rosenx•25m ago•0 comments

Have your computer work for you

https://www.eomag.io/
3•Nadav--Shanun•26m ago•0 comments

Woodshed: Create, run, rate, and iterate on your Claude Skills

https://tangled.org/danabra.mov/woodshed
1•danabramov•28m ago•1 comments

Compare LLM Responses with OverallGPT

https://overallgpt.com/about
1•walterbell•32m ago•0 comments

The secretive powerbroker with a tight grip on corporate Spain

https://www.ft.com/content/708bbf41-a174-4c04-b96d-c6cfeca2a805
1•petethomas•36m ago•0 comments

Timelang: Natural Language Time Parser

https://timelang.dev/
1•kamranahmedse•39m ago•1 comments

Young Men Are Lost. A New Book Can Guide the Way

https://www.bloomberg.com/news/articles/2026-01-12/day-trader-memoir-generation-desperation-a-fra...
4•petethomas•42m ago•0 comments

Trump Touts New Microsoft Data-Center Pledges After Local Backlash

https://www.wsj.com/livecoverage/stock-market-today-dow-sp-500-nasdaq-01-12-2026/card/trump-touts...
3•nycdatasci•42m ago•0 comments

Show HN: ProofLoop – Autonomous long-running agents with verifiable completion

https://github.com/exiw-ai/proofloop
1•egordev•46m ago•0 comments

Show HN: I made a $25 lifetime Screen Studio alternative

https://debut.sh/
2•ben_hrris•50m ago•0 comments

Are Atomic Operations Better Than a Mutex? It Depends

https://madflojo.dev/posts/are-atomic-operations-faster-than-a-mutex/
2•madflojo•52m ago•0 comments

They Write the Right Stuff

https://www.fastcompany.com/28121/they-write-right-stuff
1•robbs•57m ago•1 comments

A rare interview with the elusive Agatha Christie

https://www.bbc.com/culture/article/20260109-a-rare-interview-with-the-elusive-agatha-christie
2•1659447091•58m ago•0 comments

Be Wary of Digital Deskilling

https://calnewport.com/be-wary-of-digital-deskilling/
5•monobot12•58m ago•1 comments

Show HN: Yoth-yoth – your all-in-one workspace

https://yoth-yoth.com/hello
2•volokh•1h ago•0 comments

Data is not available upon request

https://osf.io/preprints/psyarxiv/jbu9r_v3
3•sien•1h ago•0 comments

I Graduated from Survival Mode

https://www.fieldnotes.nautilus.quest/p/i-graduated-from-survival-mode
1•zeldapoem•1h ago•0 comments

The Pentagon used a secret aircraft painted to look like a civilian plane

https://www.nytimes.com/2026/01/12/us/politics/us-boat-attacks-law.html
3•perihelions•1h ago•2 comments

Verizon to stop automatic unlocking of phones as FCC ends 60-day unlock rule

https://arstechnica.com/tech-policy/2026/01/fcc-lets-verizon-lock-phones-for-longer-making-it-har...
6•DefineOutside•1h ago•0 comments