frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Laptops all have built-in security tokens these days

https://ahelwer.ca/post/2026-05-08-builtin-u2f/
1•birdculture•6s ago•0 comments

Referer Reality

https://www.robinsloan.com/lab/referer/
1•tobr•2m ago•0 comments

Quirre – An AI Marketing Guide for Solo Founders

https://www.quirre.com/
1•dmnlaali•4m ago•0 comments

TrackMoose, a music discovery tool that blends up to 100 artists

https://www.trackmoose.com
1•vikdean•5m ago•0 comments

I have build "Cursor for everything" desktop app

https://trydekaai.com/
1•arnurTogambayev•15m ago•1 comments

Show HN: Launch Party – a community for early-stage B2B SaaS founders

https://joinlaunchparty.com
2•superamped•21m ago•1 comments

Show HN: Miro-pdf v0.9.0 – Multi-page support

https://github.com/vincent-uden/miro
1•vincent-uden•21m ago•1 comments

Show HN: Deterministic, Replayable Demos for Phoenix LiveView

https://hexdocs.pm/demo_director/0.1.5/readme.html
1•ralmidani•26m ago•0 comments

Canada's unemployment rate rises to 6.9% as economy sheds more jobs

https://financialpost.com/news/economy/canada-unemployment-rate-rises-economy-sheds-jobs
4•geox•26m ago•0 comments

Summer of PLT

https://collin.tngl.io/soplt.html
1•bluedragon1221•29m ago•0 comments

The Struggle Is Gone

https://dogdogfish.com/blog/2026/05/10/the-struggle-is-gone/
1•matthewsharpe3•31m ago•0 comments

Prpack – Pack a pull request into one Markdown file for LLM code review

https://github.com/Lucas2944/prpack
1•claudetester89•32m ago•0 comments

Music for Mushrooms – Award-Winning Documentary [video]

https://www.youtube.com/watch?v=N3EvV2_XE_Y
1•momentmaker•33m ago•0 comments

Vibe Maintainer

https://steve-yegge.medium.com/vibe-maintainer-a2273a841040
3•adunk•37m ago•1 comments

SpaceX wants to launch a million satellites

https://www.cbc.ca/news/science/spacex-data-centre-one-million-satellites-9.7117772
11•billybuckwheat•37m ago•7 comments

Madame Semver Will See You Now

https://nesbitt.io/2026/05/10/madame-semver-will-see-you-now.html
2•japhyr•38m ago•0 comments

Engineering Strategy and Planning

https://yusufaytas.com/engineering-strategy-and-planning
6•london_safari•39m ago•0 comments

Show HN: Web-REPL "skred" : my OSS sound engine w/retro C64 appearance

https://octetta.github.io/pulp/doc/
1•octetta•39m ago•0 comments

Open-source Parkinson's tremor suppression experiment via bone conduction

https://github.com/MB571/STABLE
1•maxbone•44m ago•0 comments

Lorein – A Persistent, Local-First AI Architecture [pdf]

https://github.com/AnonymousNomad/LOREIN-Sovereign-Entity
1•Neuro_Nomad•45m ago•0 comments

WASM-skred-REPL a web playground for my work-in-progress sound engine

https://octetta.github.io/doc
1•octetta•45m ago•0 comments

2026 is the year you stop reading code

https://notes.iunknown.com/blog/2026/01/Tools+For+Agentic+Thought
3•azhenley•48m ago•2 comments

ProxyFace: Give Your AI a Face and Emotions (100% Local, Zero Telemetry)

https://www.proxyface.com
1•NaotoMatsumoto•49m ago•1 comments

Iran Internet Shutdown 2026: 90M Cut Off, Economy Loses Millions Daily

https://www.indexbox.io/blog/irans-internet-blackout-devastates-online-economy-and-small-businesses/
2•abdelhousni•50m ago•0 comments

I stopped Nova Launcher from tracking me without sacrificing my setup

https://www.androidauthority.com/block-nova-launcher-trackers-3662141/
1•Brajeshwar•55m ago•0 comments

Show HN: Unlinked, MCP Server for LinkedIn

https://github.com/larsbaunwall/Unlinked
1•lbaune•55m ago•0 comments

Tell HN: Claude claims the AGPLv3 license violates it's content policy

6•freedomben•57m ago•0 comments

AI-powered NPM deprecation tracker with dependency tree Ghost Detection

https://www.stackgraveyard.dev/
3•tlseternal•1h ago•0 comments

Show HN: Open-source 2D IDE for managing agent CLIs

https://49agents.com
6•alpadurza•1h ago•1 comments

TIL We Meet – I built a games website for my long-distance girlfriend

https://tilwemeet.com/#home
2•jxuereb•1h ago•1 comments