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

Stack Overflow AI Assist–a tool for the modern developer

https://stackoverflow.blog/2025/12/02/introducing-stack-overflow-ai-assist-a-tool-for-the-modern-...
2•ulrischa•3m ago•0 comments

Bill to disallow dual citizenship proposed

https://www.msn.com/en-us/news/politics/citizenship-requirements-to-change-for-millions-of-americ...
2•LadyCailin•4m ago•1 comments

A framework for unifying cognition across all substrates

https://defaulttodignity.substack.com/p/the-end-of-anthropocentric-ethics
1•kenhallart•6m ago•1 comments

Ray and Kubernetes: The Distributed OS for AI/ML [video]

https://www.youtube.com/watch?v=7dXQeAnscuc
1•northlondoner•6m ago•0 comments

Ask HN: Who is fundraising? (December 2025)

2•surprisetalk•8m ago•0 comments

Measuring information loss when adding noise and adjusting data resolution

https://www.testingbranch.com/information_loss_and_noise/
1•mpcsb•9m ago•0 comments

When You Give a Manager a Chatbot

https://disgruntleddeveloper.substack.com/p/when-you-give-a-manager-a-chatbot
4•jermaustin1•9m ago•0 comments

Software Engineering Is Map Making, Not Magic

https://www.chrisbako.com/posts/2025-11-16-what-the-fuck-is-swe
2•ChrisbyMe•9m ago•0 comments

Apple to beat Samsung in smartphone shipments for first time in 14 years

https://sherwood.news/tech/apple-to-beat-samsung-in-smartphone-shipments-for-first-time-in-14-years/
4•avonmach•11m ago•0 comments

Show HN: Roundtable – A rubber duck that argues with itself

https://roundtable.ovlo.ai
2•andrewgm•12m ago•0 comments

Fizzy, the Kanban tracking tool for issues and ideas by 37signals

https://github.com/basecamp/fizzy
4•sparklingmango•13m ago•0 comments

Kids who ran away to 1960s San Francisco

https://www.fieldnotes.nautilus.quest/p/the-kids-who-ran-away-to-1960s-san
4•zackoverflow•14m ago•0 comments

Show HN: CodeBake – so that PM tasks aren't extra work

https://codebake.ai
1•advisador•14m ago•1 comments

Indian order to preload state-owned app on smartphones sparks political outcry

https://www.theguardian.com/world/2025/dec/02/indian-order-preload-state-owned-sanchar-saathi-app...
3•beardyw•16m ago•0 comments

Solid State Volumetric Display

https://mastodon.social/@ancientjames/115648797968721973
2•todsacerdoti•16m ago•0 comments

D-Wave Announces Formation of U.S. Government Business Unit

https://www.dwavequantum.com/company/newsroom/press-release/d-wave-announces-formation-of-u-s-gov...
1•donutloop•16m ago•0 comments

Show HN: DynamicHorizon – Dynamic Island for macOS

https://www.dynamichorizon.app/
1•DHDEV•17m ago•0 comments

Openlane – Open-source compliance software

2•adelowo•18m ago•0 comments

What Is the "Bean Soup Theory" on TikTok?

https://www.insidehook.com/internet/bean-soup-theory-tiktok
1•RickJWagner•18m ago•0 comments

Ask HN: Why not store browser tabs in SSD?

1•anon115•18m ago•0 comments

Anthropic in Advanced Talks to Buy Bun

https://www.theinformation.com/articles/anthropic-advanced-talks-buy-developer-tool-startup-first...
1•9cb14c1ec0•19m ago•0 comments

Engineering Lessons from Replicating Amazon RDS Postgres with Rust

https://serendb.com/blog/5-engineering-lessons-from-replicating-amazon-rds-postgres
4•taariqserendb•20m ago•0 comments

Compulsory spyware app to be installed on every Indian citizen's new phone

https://alecmuffett.com/article/132182
1•walterbell•20m ago•0 comments

Russian Porsche owners' cars immobilised across country

https://www.dailymail.co.uk/news/article-15345095/amp/Russian-Porsche-owners-cars-immobilised-cou...
4•toss1•21m ago•0 comments

Show HN: I'm building an open-source Amazon (Part 2)

https://openship.org
1•theturtletalks•21m ago•0 comments

Practical Engineering: Hurricane vs. Tiny House

https://practical.engineering/blog/2025/12/2/hurricane-vs-tiny-house
1•crescit_eundo•21m ago•0 comments

Ray Keynote: de-facto for compositional learning and a distributed heterogeneous [video]

https://www.youtube.com/watch?v=E98Pv36f0YI
1•northlondoner•23m ago•3 comments

Show HN: Numla – The notepad that thinks in numbers

https://github.com/davidesantangelo/numla
2•daviducolo•24m ago•1 comments

Show HN: VAC Memory – 80.1% LoCoMo accuracy vs. Mem0's 68%

https://github.com/vac-architector/VAC-Memory-System/wiki
1•ViktorKuz•24m ago•0 comments

Show HN: Ask Anything over NeurIPS 2025 Papers (Free, No Signup)

https://neurips.zeroentropy.dev
2•ghita_•26m ago•0 comments