frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Wall Street races to protect itself from AI bubble

https://rollingout.com/2025/12/05/wall-street-protects-itself-ai-bubble/
1•zerosizedweasle•2m ago•0 comments

Software Taboos

http://rebuildworld.net/taboo/
2•pg83•2m ago•0 comments

Agents Training Agents: A practical architecture for autonomous self-improvement

https://techlife.blog/posts/agents-training-agents-a-practical-architecture-for-autonomous-self-i...
2•tsenturk•2m ago•0 comments

The Patient Is Not a Document: Moving from LLMs to a World Model for Oncology

https://blog.standardmodel.bio/p/the-patient-is-not-a-document-moving
2•kevinalexbrown•3m ago•0 comments

2025.49: Conflicts, Consternation, and Code Red

https://stratechery.com/2025/conflicts-consternation-and-code-red/
1•feross•5m ago•0 comments

Apple's Return to Intel Rumored to Extend to iPhone

https://www.macrumors.com/2025/12/05/intel-iphone-chips-rumor/
1•tosh•6m ago•0 comments

50 Years of Proof Assistants

https://lawrencecpaulson.github.io//2025/12/05/History_of_Proof_Assistants.html
2•baruchel•10m ago•0 comments

Show HN: Heart rate with phone camera (plain HTML/JS)

https://github.com/SMUsamaShah/heart-rate
1•smusamashah•11m ago•0 comments

JavaScript Engines Zoo

https://zoo.js.org/
3•gurgunday•11m ago•0 comments

MongoDB Earnings Call Might Have Topped the AI Trade

https://knowtrend.ai/blog/mongodb-postgres
1•codevs•12m ago•0 comments

3D in CSS (No JavaScript)

https://codepen.io/Cubiq-ish/pen/myVNNoe
1•qingcharles•14m ago•0 comments

Are large language models worth it?

https://nicholas.carlini.com/writing/2025/are-llms-worth-it.html
1•PaulHoule•14m ago•0 comments

WikiFlix: Full Movies Hosted on Wikimedia Commons

https://commons.wikimedia.org/wiki/User:Spinster/WikiFlix
5•netule•15m ago•1 comments

A full-body MRI can reveal hidden killers. Do we want to know?

https://www.washingtonpost.com/health/2025/12/05/full-body-mri-scan-experience/
2•pseudolus•15m ago•2 comments

The Resonant Computing Manifesto

https://simonwillison.net/2025/Dec/5/resonant-computing/
1•mooreds•16m ago•1 comments

We invested 10% to pay back tech debt; Here's what happened (2023)

https://blog.alexewerlof.com/p/tech-debt-day
1•mooreds•18m ago•0 comments

Global Depression Is Coming Sooner Than Expected [video]

https://www.youtube.com/watch?v=UBMluINRans
1•mooreds•20m ago•0 comments

Show HN: I won Half Baked x Bolt Hackathon (20k participants) with Claim Watch

https://claim.watch/
1•ma1or•20m ago•0 comments

Malicious Crate Mimicking 'Finch' Exfiltrates Credentials via a Hidden

https://socket.dev/blog/malicious-crate-mimicking-finch-exfiltrates-credentials
1•feross•21m ago•0 comments

India's Biggest Airline Falls into Chaos, Canceling More Than 1k Flights

https://www.nytimes.com/2025/12/05/business/india-indigo-airline-cancelations.html
1•ummonk•22m ago•1 comments

Show HN: A framework for understanding how AI replaces human self-interpretation

1•DanielJMancini•22m ago•0 comments

Show HN: NextDoor.Company – Find all the cool startups hiring actively on a map

https://www.nextdoor.company/
1•sankalpdomore•23m ago•0 comments

Emergent Properties

https://blog.alexewerlof.com/p/emergent-properties
2•hanifbbz•24m ago•1 comments

How Federal Law Made Us All Disabled

https://www.richardhanania.com/p/how-federal-law-made-us-all-disabled
1•paulpauper•33m ago•0 comments

DeepSeek v3.2 Is Okay and Cheap but Slow

https://thezvi.substack.com/p/deepseek-v32-is-okay-and-cheap-but
2•paulpauper•33m ago•0 comments

Fish Bowl

https://anniemueller.com/posts/fish-bowl
1•speckx•34m ago•0 comments

Stoppard's Liberalism: A Commitment to the Individual

https://thepursuitofliberalism.substack.com/p/stoppards-liberalism
1•paulpauper•34m ago•0 comments

Shingles vaccination prevented or delayed dementia

https://www.cell.com/cell/fulltext/S0092-8674(25)01256-5
46•Archelaos•36m ago•11 comments

S-Expression Array for Lightweight Immutable Representation (SealIR)

https://github.com/numba/sealir
2•todsacerdoti•38m ago•0 comments

Detainees at 'Alligator Alcatraz' facing 'harrowing human right violations'

https://www.theguardian.com/us-news/2025/dec/04/alligator-alcatraz-human-right-violations-amnesty...
5•perihelions•39m ago•1 comments