frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Show HN: Char-width – final answer to measure terminal text width

https://www.npmjs.com/package/char-width
1•dawson0•46s ago•0 comments

Can I get some brutally honest feedback on a Chrome extension I built at 16?

https://chromewebstore.google.com/detail/readback-–-universal-cont/pomfhagjojbnfmgmldkpakfggpdp...
1•ceoakshat•1m ago•0 comments

NostalgicPod – iPod-like music player for Android

https://nostalgicpod.com/en/
1•LorenDB•2m ago•0 comments

Adoption and Impact of Command-Line AI Coding Agents at Microsoft [pdf]

https://arxiv.org/abs/2607.01418
1•azhenley•2m ago•0 comments

Show HN: A Wordle game that insults you as you play

https://smugexe.trydoff.dev
1•shreyasjk•3m ago•0 comments

The Red Queen Gödel Machine: Co-Evolving Agents and Their Evaluators

https://arxiv.org/abs/2606.26294
2•niclane7•4m ago•0 comments

Show HN: A website that shows every pro triathlete's swim, bike, and run gear

https://racekit.pro
1•mpc75•5m ago•1 comments

Orasort: 5x faster column-sorting with an expired patent from Oracle

https://deepsystemstuff.com/how-oracles-secret-column-sorting-technique-became-public-after-its-p...
1•theanonymousone•6m ago•0 comments

A Tale of Two Irans

https://a16z.com/this-is-a-tale-of-two-irans/
1•kehiy•8m ago•0 comments

Behind the Refusal: Determining Guardrail Activation via Behavioral Monitoring

https://arxiv.org/abs/2607.02121
1•Jimmc414•8m ago•0 comments

When Albert Einstein & Charlie Chaplin Met and Became Fast Famous Friends (1930)

https://www.openculture.com/2026/07/when-albert-einstein-charlie-chaplin-met.html
1•Brajeshwar•8m ago•0 comments

Can you run every line of code in Super Mario Bros.? [video]

https://www.youtube.com/watch?v=o0gOALTvkcc
1•dbl000•10m ago•0 comments

Show HN

https://vorcigernix.github.io/rohrpost/
1•vorcigernix•11m ago•2 comments

Local translation: when small dedicated models beat Goliath

https://qvac.tether.io/blog/local-translation-when-small-dedicated-models-beat-goliath/
1•delduca•12m ago•0 comments

LeetCode but not as a product but a learning tool

https://cses.fi/problemset/text/2433
1•callsign_bats•13m ago•0 comments

I built an out-of-the-box self-hosting infrastructure. How can I improve it?

https://github.com/canntstand/ServeHub-2
1•canntstand•14m ago•1 comments

It's true – AI will replace _most_ software engineers

https://getsmall.xyz/post/cmp5lur8h0003vyr7dxes60rh
1•trezm•14m ago•0 comments

Autoresearch: The feedback loop behind self-improving agents

https://www.latent.space/p/autoresearch-introspection
1•gmays•15m ago•0 comments

Young People Watch TikTok, Not Television

https://www.wsj.com/opinion/young-people-watch-tiktok-not-television-6142cdf7
1•bookofjoe•17m ago•1 comments

Millions may be getting the wrong cholesterol test

https://www.sciencedaily.com/releases/2026/06/260626125714.htm
1•brandonb•18m ago•0 comments

Show HN: Voltius – open-source SSH/SFTP client, built in Rust

https://voltius.app
2•kipavy•18m ago•0 comments

Pulpie: Models for Cleaning the Web

https://usefeyn.com/blog/pulpie-pareto-optimal-models-for-cleaning-the-web/
1•snyy•19m ago•1 comments

Apple Startup Sounds

https://froods.ca/~dschaub/sound.html
1•gregsadetsky•19m ago•0 comments

AI-friendly architecture: write better software, not just more of it

https://purple-hammer.com/blog/ai-friendly-architecture.html
1•AriIs•20m ago•0 comments

Union Busters Coming After Me

https://www.nlrbedge.com/p/union-busters-coming-after-me
3•anothermathbozo•20m ago•0 comments

UK regulator warns of "arms race" to keep up with AI use in financial services

https://arstechnica.com/ai/2026/07/uk-regulator-warns-of-arms-race-to-keep-up-with-ai-use-in-fina...
2•secret_hawk_25•21m ago•0 comments

They got something on the screen

https://graybeard.ing/they-got-something-on-the-screen/
1•rglover•21m ago•0 comments

How to design a cancer vaccine (and vastly improve them)

https://www.owlposting.com/p/how-to-design-a-cancer-vaccine-and
2•crescit_eundo•21m ago•0 comments

GAN Lateral Superjunction Schottky Diode

https://www.powerelectronicsnews.com/gan-lateral-superjunction-schottky-diode/
1•stmw•23m ago•1 comments

Ask HN: I use coding agents daily, but how do real engineers use them?

1•getlawgdon•25m ago•0 comments