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

Show HN: Subseq.bio – A Simple Web and API Service for Protein Design

https://subseq.bio/programs
1•oxpsi•2m ago•0 comments

Chernobyl protective shield can no longer confine radiation after drone strike

https://www.cnn.com/2025/12/06/europe/chernobyl-drone-strike-radiation-latam-intl
2•vinnyglennon•3m ago•0 comments

Targeted Model Editing

https://www.gojiberries.io/concept-subspaces-for-targeted-model-editing/
1•neehao•4m ago•0 comments

Apex: Universal Markdown Processor

https://brettterpstra.com/2025/12/06/introducing-apex-universal-markdown-processor/
2•zdw•7m ago•1 comments

A Chinese-backed port could push the Amazon Rainforest over the edge

https://insideclimatenews.org/news/01122025/china-port-in-peru-impact-on-amazon-rainforest/
1•chha•7m ago•0 comments

LLMs Are Lexical Thijarians

https://vinayprabhu.substack.com/p/llms-as-lexical-thijarians
2•VinayUPrabhu•9m ago•0 comments

My Problem with Hacklore (WiFi)

https://thecontractor.io/hacklore/
1•splintersio•12m ago•1 comments

How the 'hypnagogic state' of drowsiness could enhance your creativity

https://theconversation.com/how-the-hypnagogic-state-of-drowsiness-could-enhance-your-creativity-...
2•zeristor•14m ago•0 comments

Screenshots from developers: 2002 vs. 2015 (2015)

https://anders.unix.se/2015/12/10/screenshots-from-developers--2002-vs.-2015/
2•turrini•14m ago•0 comments

Copy-Item is 27% slower than File Explorer

https://til.andrew-quinn.me/posts/copy-item-is-27-percent-slower-than-file-explorer-drag-and-drop...
1•hiAndrewQuinn•14m ago•0 comments

The past was not that cute

https://juliawise.net/the-past-was-not-that-cute/
1•mhb•16m ago•0 comments

Fine-Tuning an Open Source LLM using Claude Skills

https://huggingface.co/blog/hf-skills-training
1•wilhelmklopp•17m ago•0 comments

Stop Saying Vibes

https://www.whitenoise.email/p/stop-saying-vibes
2•twhite214•24m ago•0 comments

British ex-paratrooper on track to complete 27 year walk around the world

https://www.msn.com/en-us/news/world/british-globe-trekker-faces-changed-world-on-final-leg-of-27...
1•hackthemack•25m ago•0 comments

Are wireless SSDs actually useful or just pointless? Need honest takes

https://old.reddit.com/r/DataHoarder/comments/1oyltuj/are_wireless_ssds_actually_useful_or_just/
2•sipofwater•27m ago•0 comments

Kill It With Fire: dealing with legacy systems. (book review)

https://www.usenix.org/publications/loginonline/kill-it-fire
2•fanf2•27m ago•0 comments

In Search of the Lost Program (2018)

http://www.codersnotes.com/notes/the-lost-program/
1•xk3•29m ago•0 comments

The Wired Guide to Digital Opsec for Teens

https://www.wired.com/story/digital-opsec-for-teens/
1•ghostpepper•29m ago•0 comments

Show HN: Simple iOS Recording and Streaming App

https://demoscope.app/app
1•admtal•29m ago•0 comments

Chaos Engineering

https://en.wikipedia.org/wiki/Chaos_engineering
2•varun_ch•30m ago•0 comments

The Continuous Improvement OS for Agile Release Trains

https://agileglow.io/
1•thetruthinside•30m ago•1 comments

How do you unit test SQL?

https://github.com/gurmeetsaran/sqltesting
2•gurmeetsaran•30m ago•1 comments

Kicking Robots

https://harpers.org/archive/2025/12/kicking-robots-james-vincent-humanoids/
1•Hooke•31m ago•0 comments

FreeBSD 15.0-Release Release Notes

https://www.freebsd.org/releases/15.0R/relnotes/
3•weeha•31m ago•0 comments

Coffee link to slower biological aging in those w mental illness–to point

https://www.kcl.ac.uk/news/coffee-linked-to-slower-biological-ageing-among-those-with-severe-ment...
5•bookofjoe•36m ago•0 comments

Deriving the Schwarzschild Metric from Informational Resolution Principles v2

https://zenodo.org/records/17816202
1•Jascon71•42m ago•1 comments

Warnings About Retrobright Damaging Plastics After 10 Year Test

https://hackaday.com/2025/12/05/warnings-about-retrobright-damaging-plastics-after-10-year-test/
1•rcarmo•43m ago•0 comments

"The Step-by-Step Process I Experienced with Scanner Hacker Crypto Recovery"

https://scannerhacktech.com/#
1•DavidJammy•47m ago•0 comments

Top hard-earned lessons from the experts on managing Kubernetes

https://www.cncf.io/blog/2025/11/18/top-5-hard-earned-lessons-from-the-experts-on-managing-kubern...
2•gpi•48m ago•0 comments

Melbourne bakery found fame, trolls harassed young staff. Owners viral response

https://www.theguardian.com/australia-news/2025/dec/06/melbourne-bakery-montmorency-tiktok-harass...
3•robaato•49m ago•0 comments