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

VibeStrapped

https://vibestrapped.com
1•bellamoon544•52s ago•1 comments

Ask HN: Should pharmacies dispense C64s for nostalgia therapy prescriptions?

1•amichail•1m ago•0 comments

Show HN: Copy code from Neovim with file paths and repo URLs for web AI

https://github.com/zhisme/copy_with_context.nvim
1•zhisme•2m ago•0 comments

A Project Redefining Informal Transport in Mexico with OpenStreetMap Data

https://www.trufi-association.org/rutometro-redefining-public-transport-in-mexico/
1•TrufiAssoc•2m ago•0 comments

Make It Possible, Then Make It Normal

https://danielmangum.com/posts/possible-then-normal/
1•hasheddan•3m ago•0 comments

Pairing with a Partner Who Forgets Everything (saved game for work)

https://www.vieko.dev/sessions
1•vieko•3m ago•1 comments

Matrix Core Programming on AMD GPUs

https://rocm.blogs.amd.com/software-tools-optimization/matrix-cores-cdna/README.html
1•salykova•8m ago•0 comments

A man building a starter kit for civilization

https://www.technologyreview.com/2025/10/16/1125146/civilization-start-kit-open-source-essential-...
1•aosaigh•8m ago•1 comments

Rich Friend, Poor Friend (2022)

https://www.jenn.site/rich-friend-poor-friend/
1•alexharri•9m ago•0 comments

Anti advice: Don't always reach for a low pass filter

https://emeaentrepreneurs.com/anti/dont-always-reach-for-a-low-pass-filter/
1•sixhobbits•9m ago•0 comments

Chimpanzees in Uganda use flying insects to tend their wounds, study reveals

https://phys.org/news/2025-10-chimpanzees-uganda-flying-insects-tend.html
1•PaulHoule•10m ago•0 comments

What if the world had invested in nuclear power instead of variable renewables?

https://www.tandfonline.com/doi/full/10.1080/14786451.2025.2586924
1•mpweiher•12m ago•0 comments

High-Performance Typed API Framework for Django

https://github.com/FarhanAliRaza/django-bolt
1•mliezun•12m ago•0 comments

US 'Homeland Security' Twitter account seemingly run from Israel

https://www.thecanary.co/trending/2025/11/23/twitter-location-data/
33•botanical•15m ago•16 comments

Prosody XMPP server in the home lab

https://box.matto.nl/prosody-xmpp-server-in-the-home-lab.html
1•gsky•16m ago•0 comments

Towards Spring Tools 5 – Ready for Boot 4 and Framework 7

https://spring.io/blog/2025/11/24/towards-spring-tools-5-part1
1•tsenturk•17m ago•0 comments

Which exercise prescription is most effective for patients with sleep disorders?

https://link.springer.com/article/10.1007/s41105-025-00596-7
1•QueensGambit•17m ago•0 comments

Widelands is a free, open-source real-time strategy game inspired by Settlers II

https://www.widelands.org/
1•doener•17m ago•1 comments

Bla bla bla PEER REVIEW bla bla bla

https://statmodeling.stat.columbia.edu/2020/06/11/bla-bla-bla-peer-review-bla-bla-bla/
2•eftegarie•17m ago•0 comments

New Gene-Editing Strategy Could Help Development of Treatments for Rare Diseases

https://www.nytimes.com/2025/11/19/health/gene-editing-rare-diseases.html
1•bookofjoe•19m ago•1 comments

Linux Manual Page – Intro(1)

https://www.man7.org/linux/man-pages/man1/intro.1.html
1•lioeters•19m ago•0 comments

How to repurpose your old phone into a web server

https://far.computer/how-to/
2•wicket•19m ago•0 comments

Show HN: I built an AI overlay to stop breaking my flow 50 times a day

https://github.com/thisisharsh7/seeva-ai-assistant
1•thisisharsh7•20m ago•0 comments

Decline in downloads of once popular packages Yesterday Derek Jones

https://shape-of-code.com/2025/11/23/decline-in-downloads-of-once-popular-packages/
1•gsky•21m ago•0 comments

A Long-Tail Professional Forum-Based Benchmark for LLM Evaluation

https://arxiv.org/abs/2511.06346
1•wslh•22m ago•0 comments

What's Past Is Prologue

https://www.whatwelo.st/p/whats-past-is-prologue
1•cratermoon•24m ago•0 comments

The worst programming language of all time [video]

https://www.youtube.com/watch?v=7fGB-hjc2Gc
1•dsego•26m ago•0 comments

Show HN: MCP Server for Time-Series Forecasting

https://github.com/S-FM/faim-mcp
1•ChernovAndrei•28m ago•0 comments

Clues by Sam

https://cluesbysam.com/
1•emreb•28m ago•0 comments

How Snyk Studio for Qodo Is Closing the AI Security Gap

https://snyk.io/blog/snyk-studio-for-qodo/
1•tsenturk•30m ago•0 comments