frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Our Principles

https://openai.com/index/our-principles/
1•salkahfi•3m ago•0 comments

A New Idea to Save the Climate? Dam the Bering Strait.

https://www.nytimes.com/2026/04/24/climate/amoc-bering-strait-dam.html
1•bookofjoe•7m ago•1 comments

Sabastian Sawe becomes first person to break two-hour marathon mark

https://www.rte.ie/sport/athletics/2026/0426/1570275-sawe-becomes-first-man-to-break-two-hour-mar...
1•austinallegro•9m ago•0 comments

Show HN: Nitrum – Rust Toolkit and CLI for AWS Nitro Enclaves

https://github.com/matzapata/nitrum
1•matzapata•10m ago•0 comments

I Learned to Stop Worrying and Love Coding with AI

https://jeffield.net/blog/claude-strangelove-or-how-i-learned-to-stop-worrying-and-love-coding-wi...
1•jsheffie•11m ago•0 comments

The Atari 1200XL – By Paul Lefebvre

https://www.goto10retro.com/p/inside-the-atari-1200xl
1•rbanffy•11m ago•0 comments

Did You Say "Intellectual Property"? It's a Seductive Mirage

https://www.gnu.org/philosophy/not-ipr.html.en
2•MontyCarloHall•14m ago•0 comments

FreeBSD Device Drivers Book

https://github.com/ebrandi/FDD-book
1•myth_drannon•15m ago•0 comments

Jaeger adopts OpenTelemetry at its core to solve the AI agent observability gap

https://thenewstack.io/jaeger-v2-ai-observability/
1•Brajeshwar•16m ago•0 comments

Intel reportedly says it boosted yields by selling what would normally be scrap

https://www.tomshardware.com/pc-components/cpus/intel-reportedly-says-it-boosted-yields-by-sellin...
1•rbanffy•17m ago•0 comments

The tortoise and the hare: will China beat the US in the race back to the moon?

https://www.theguardian.com/science/2026/apr/26/china-us-space-race-moon
3•pseudolus•19m ago•0 comments

Show HN: CheckThisOut – a filtered directory of side hustles and AI tools

https://checkthisout.com/
1•mbahlitz•21m ago•0 comments

SnakeBreak [a Browser Extension Game]

https://addons.mozilla.org/en-US/firefox/addon/snakebreak/
1•programmexxx•23m ago•1 comments

VPinFE – Cross-platform Front end for VPinball

https://github.com/superhac/vpinfe
1•terry107•35m ago•0 comments

JQuake – monitor real-time shaking events in Japan

https://jquake.net/en/
1•pndy•38m ago•0 comments

Statistical Structure and the Evolution of Languages

https://royalsocietypublishing.org/rspb/article/293/2068/20252374/481270/Statistical-structure-an...
1•Anon84•38m ago•0 comments

The Spinor Genus and the Distinguishing Lattice Isomorphism Problem(2024)

https://eprint.iacr.org/2024/1475
1•rolph•38m ago•0 comments

NSF science advisory board fired by Trump administration

https://www.nature.com/articles/d41586-026-01361-7
2•rguiscard•42m ago•1 comments

Show HN: Out Loud – open-source desktop TTS app for macOS/Windows/Linux

https://github.com/light-cloud-com/out-loud
2•julia-kafarska•48m ago•0 comments

Show HN: Logic Designer – Webapp

https://logic-designer.github.io/logic-designer-main/
2•logic-designer•52m ago•0 comments

Show HN: Startup Equity Adventure Game

https://options-game-polymathrobotics.pythonanywhere.com/
4•iliabara•53m ago•2 comments

CIOs struggle to find clarity in their organizations' AI strategies

https://www.cio.com/article/4162949/cios-struggle-to-find-clarity-in-their-organizations-ai-strat...
3•WaitWaitWha•54m ago•0 comments

DeepSeek drops input cache price to 1/10th

https://xcancel.com/deepseek_ai/status/2048440764368347611
4•alecco•54m ago•1 comments

The curious case of Sean Plankey's derailed CISA nomination

https://www.csoonline.com/article/4162801/the-curious-case-of-sean-plankeys-derailed-cisa-nominat...
2•WaitWaitWha•54m ago•0 comments

High energy sports drinks boost performance even if you spit them out

https://www.theguardian.com/science/2009/apr/15/high-energy-carbohydrate-drinks-performance-brain
6•bwoah•57m ago•1 comments

US Navy tests laser weapon that shoots down drones on the USS George H.W. Bush

https://www.tomshardware.com/tech-industry/us-navy-tests-laser-weapon-that-shoots-down-drones-on-...
3•rbanffy•58m ago•0 comments

Show HN: I read Replika's privacy policy and then built a competitor

https://apps.apple.com/us/app/friend-ai-private-chat/id6761649790
2•krunkworx•59m ago•0 comments

Distribution of Global Biomass

https://upload.wikimedia.org/wikipedia/commons/e/e6/Distribution_of_the_global_biomass.png
2•downboots•1h ago•0 comments

Show HN: XMIT Files from VSCode

https://github.com/wizardofzos/xmi-generator/releases/tag/0.0.3
2•wizardofzos•1h ago•0 comments

Elon Musk's xAI discussed partnership with Mistral to try and rival OpenAI

https://www.euronews.com/next/2026/04/24/elon-musks-xai-discussed-partnership-with-mistral-to-try...
3•muxamilian•1h ago•0 comments