frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

2026, Our Rotting Future

https://www.thegist.ie/guest-gist-2026-our-already-rotting-future/
1•HotGarbage•3m ago•0 comments

Self-Driving Cars Can't See Without Their Eyes

https://www.nytimes.com/2026/01/02/opinion/ai-self-driving-cars-workers.html
1•ripe•5m ago•0 comments

The most popular blogs of Hacker News in 2025

https://refactoringenglish.com/blog/2025-hn-top-5/
1•maxutility•6m ago•0 comments

Show HN: EzFileChanger – Client-side WebP converter (no server uploads)

https://www.ezfilechanger.com/
1•waqaar-ansari•6m ago•1 comments

Boredom Is Good, Actually

https://aartaka.me/boredom.html
1•zdw•14m ago•0 comments

Ask HN: Platform support ignoring launch request – switch or wait?

1•kdpsuite•20m ago•0 comments

Is success just luck?

https://keygen.sh/blog/is-success-just-luck/
1•ezekg•21m ago•0 comments

How and Why Machines Work(2002) [pdf]

https://ocw.mit.edu/courses/2-000-how-and-why-machines-work-spring-2002/87856eefc0c966f97e803c3a7...
1•o4c•23m ago•0 comments

Is .NET Aspire Actually Open Source? [video]

https://www.youtube.com/watch?v=cZntPxnnmSI
1•PKop•24m ago•0 comments

All Remaining MTV Music Channels Officially Shut Down

https://www.vice.com/en/article/the-day-the-music-video-died-all-remaining-mtv-music-channels-off...
1•cdrnsf•29m ago•0 comments

Show HN: uvx ptn, scan a QR, get a terminal in your phone

https://github.com/lyehe/porterminal
1•yxl448•30m ago•0 comments

Show HN: Rust clipboard transformer, 40 transforms, 100% local, own recipes

https://github.com/skorotkiewicz/9paste
1•modinfo•34m ago•0 comments

Tracks vs. Trains: Why the Real Artificial Intelligence Boom Hasn't Started Yet

https://shawnharris.com/tracks-vs-trains-why-the-real-artificial-intelligence-boom-hasnt-started-...
1•gmays•35m ago•0 comments

Ask HN: How to Deal with Bot Accounts

1•lovich•39m ago•1 comments

Was it really a Billion Dollar Mistake?

https://www.gingerbill.org/article/2026/01/02/was-it-really-a-billion-dollar-mistake/
1•vyrotek•41m ago•0 comments

The New Moore's Law: Why Optical Computing Could Redefine Scaling for AI

https://www.allaboutcircuits.com/industry-articles/the-new-moores-law-why-optical-computing-could...
1•WaitWaitWha•46m ago•0 comments

Nadella: Looking Ahead to 2026

https://snscratchpad.com/posts/looking-ahead-2026/
1•zdw•48m ago•0 comments

Calcium Oscillations Within Juxtaglomerular Cell Clusters Control Renin Release

https://www.ahajournals.org/doi/10.1161/CIRCRESAHA.125.326541
1•PaulHoule•50m ago•0 comments

IQuest-Coder: A new open-source code model beats Claude Sonnet 4.5 and GPT 5.1 [pdf]

https://github.com/IQuestLab/IQuest-Coder-V1/blob/main/papers/IQuest_Coder_Technical_Report.pdf
1•shenli3514•51m ago•0 comments

Ask HN: Who's given up on getting hired? (January 2026)

4•waldrews•54m ago•1 comments

UX Quiz: 2025 Year in Review

https://www.nngroup.com/articles/ux-quiz/
1•neko_ranger•57m ago•0 comments

What Is the Deal with Bioelectricity?

https://eryney.substack.com/p/whats-the-deal-with-bioelectricity
2•eryney•1h ago•0 comments

Pickle 1 – Soul Computer [video]

https://www.youtube.com/watch?v=dGA8-CkaSOk
1•aprilnya•1h ago•0 comments

Proteus: The AI-native editor for multimodal creation Topics

https://github.com/gezilinll/Proteus
1•gezilinll•1h ago•2 comments

Ask HN: Do any significant web communities exist anymore that value free speech?

2•jdprgm•1h ago•1 comments

Do you want a prompt saver and organizer

1•SRMohitkr•1h ago•0 comments

The Intent Gap: Why AI Agents Succeed Brilliantly at the Wrong Goal

https://medium.com/@arun.sanna/the-pasta-sauce-problem-why-your-ai-assistant-can-be-brilliant-and...
2•arunsanna•1h ago•0 comments

Things That Use Ed25519

https://ianix.com/pub/ed25519-deployment.html
2•mooreds•1h ago•1 comments

Don't Half-Ass Your Dreams – Bill Gurley [video]

https://www.youtube.com/watch?v=qSUqZtipYf0
2•mooreds•1h ago•0 comments

In Search of a China Strategy

https://theamericanenterprise.com/in-search-of-a-china-strategy/
1•mooreds•1h ago•1 comments