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

Why Theme Parks Keep Getting More Extreme

https://www.theatlantic.com/culture/archive/2025/09/universal-epic-universe-disney-theme-park-att...
1•vinhnx•5m ago•0 comments

Rnj-1: Building Instruments of Intelligence

https://essential.ai/research/rnj-1
1•aratahikaru5•7m ago•0 comments

Pantone Color of the Year 2026

https://www.pantone.com/uk/en/color-of-the-year/2026
1•vinhnx•9m ago•1 comments

Schizophrenia sufferer mistakes smart fridge ad for psychotic episode

https://old.reddit.com/r/LegalAdviceUK/comments/1pc7999/my_schizophrenic_sister_hospitalised_hers...
2•hliyan•14m ago•0 comments

Redfin's 2026 Predictions: Welcome to the Great Housing Reset

https://www.redfin.com/news/housing-market-predictions-2026/
1•toomuchtodo•16m ago•0 comments

St. Nicholas Day: NIS2 Implementation Act Comes into Force in Germany

https://www.heise.de/en/news/On-St-Nicholas-Day-NIS2-Implementation-Act-Comes-into-Force-11104146...
1•doener•18m ago•0 comments

The Hackers Lost. Freezenet Is Back

https://www.freezenet.ca/the-hackers-lost-freezenet-is-back/
1•doener•21m ago•0 comments

Wolfram Compute Services

https://writings.stephenwolfram.com/2025/12/instant-supercompute-launching-wolfram-compute-services/
1•nsoonhui•24m ago•0 comments

Wine 11.0 RC1 – Run Windows Applications on Linux, BSD, Solaris and macOS

https://gitlab.winehq.org/wine/wine/-/releases/wine-11.0-rc1
2•neustradamus•26m ago•0 comments

The largest startup losses in history

https://www.dbresearch.com/PROD/RI-PROD/PROD0000000000611818/The%20largest%20start-up%20losses%20...
1•doener•27m ago•0 comments

Appbundler.jl – Bundle Your Julia Application for Windows, macOS, and Linux

https://github.com/PeaceFounder/AppBundler.jl
1•MrJulia•29m ago•0 comments

Most people in prediction markets aren't trading–they're guessing

1•Miramaps•35m ago•0 comments

A New Anonymous Phone Carrier Lets You Sign Up with Nothing but a Zip Code

https://www.wired.com/story/new-anonymous-phone-carrier-sign-up-with-nothing-but-a-zip-code/
1•pabs3•35m ago•0 comments

The Reverse-Centaur's Guide to Criticizing AI – Cory Doctorow

https://pluralistic.net/2025/12/05/pop-that-bubble/
1•beardyw•36m ago•0 comments

Show HN: Infinite Lofi Generative Music

https://loopmaster.xyz/editor?aidj&prompt=lofi%20gentle%20music,%20dub&swap=60&mix=60&temperature...
2•stagas•40m ago•0 comments

A Very Big Fight over a Very Small Language

https://www.newyorker.com/magazine/2025/12/08/a-very-big-fight-over-a-very-small-language
1•mitchbob•42m ago•1 comments

Thinking in Mirrors for Products

https://fernsology.substack.com/p/thinking-in-mirrors-for-products
1•funmi5•50m ago•0 comments

Debugger MCP Server – AI-Controlled Debugging for All JetBrains IDEs

https://plugins.jetbrains.com/plugin/29233-debugger-mcp-server
1•hechtcarmel•50m ago•1 comments

Show HN: A planner that only shows tasks you can actually do

https://app.nexttask.cc/
1•obezzad•56m ago•0 comments

A pilot turned an old plane into a two-bedroom apartment

https://www.popsci.com/technology/plane-apartment-alaska/
2•1659447091•57m ago•0 comments

'Wicked: For Good' Rebuilt Oz, from Yellow Brick Road to Dorothy's House [video]

https://www.youtube.com/watch?v=QBUnd4VQkLA
1•gmays•58m ago•0 comments

Tide-Predicting Machine

https://en.wikipedia.org/wiki/Tide-predicting_machine
1•thunderbong•1h ago•0 comments

Rich Harris on frameworks, the web, and the edge (2023) [video]

https://www.youtube.com/watch?v=uXCipjbcQfM
1•saltymimir•1h ago•0 comments

England's AI World Cup masterplan: From perfecting penalties to powering players

https://www.bbc.com/sport/football/articles/cj0e7y754zpo
1•1659447091•1h ago•0 comments

Tech for Small vs. Big Firms

https://lexifina.com/blog/technology-for-firms-big-and-small
1•alansaber•1h ago•0 comments

Show HN: Promptv (local first prompt & .env management)

https://github.com/thompson0012/promptv
1•thompson0012•1h ago•0 comments

Show HN: Design Language System (Waitlist)

https://dls.labs21.dev/
1•thompson0012•1h ago•0 comments

Physics Quantum experiment settles a century-old row between Einstein and Bohr

https://www.newscientist.com/article/2506830-quantum-experiment-settles-a-century-old-row-between...
3•ashishgupta2209•1h ago•0 comments

Show HN: StackMark – Docker stack management CLI with auto port allocation

https://stackmark.tech/
2•grazulex•1h ago•0 comments

CVE-2023-20078: Triggering command injection in Cisco IP phones

https://www.ibm.com/think/x-force/cve-2023-20078-technical-analysis
2•jandeboevrie•1h ago•0 comments