frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Junior devs don't know the red flags we spot in seconds and we never tell them

https://yourlead.dev
2•err0r500•3m ago•1 comments

Apple's Patent Grants Declined in 2025 as Innovation Slows

https://www.macrumors.com/2026/01/13/apple-patents-declined-in-2025/
1•7777777phil•3m ago•0 comments

Lessons from Search

https://altertable.ai/blog/2026-01-13-lessons-from-search
1•altertable•6m ago•0 comments

Network of Scottish X accounts go dark amid Iran blackout

https://www.heraldscotland.com/news/25759181.network-scottish-x-accounts-go-dark-amid-iran-blackout/
2•TiredOfLife•7m ago•0 comments

My Week with OpenCode

https://deadsimpletech.com/blog/week_with_opencode
2•kioku•8m ago•1 comments

Show HN: Theus – I built a framework to make AI-generated code safe to run

https://github.com/dohuyhoang93/theus
1•dohuyhoangvn93•8m ago•0 comments

How dangerous are high-cardinality labels in Prometheus?

https://stackoverflow.com/questions/46373442/how-dangerous-are-high-cardinality-labels-in-prometheus
1•tosh•9m ago•0 comments

Sandboxing Your LLM CLI Agent – Best Solutions Gathered by HN

1•mentalgear•11m ago•1 comments

At This Office Park, Scamming the World Was the Business

https://www.nytimes.com/2026/01/13/world/asia/myanmar-scam-center.html
1•reaperducer•12m ago•0 comments

Everything is a Programming Problem

https://www.ggpush.dev/p/everything-is-a-programming-problem
1•ashfakh_•17m ago•0 comments

Sandbox your LLM agent – Vibekit

https://docs.vibekit.sh/sdk
1•mentalgear•20m ago•0 comments

Show HN: Hato – Task Runner with Checklist

https://github.com/midry3/hato
1•Midry•21m ago•0 comments

Ask HN: Where is all the protest music?

1•swiper_lux•24m ago•0 comments

Apple and Gemini, Foundation vs. Aggregation, Universal Commerce Protocol

https://stratechery.com/2026/apple-and-gemini-foundation-vs-aggregation-universal-commerce-protocol/
2•feross•25m ago•0 comments

Henley Global Passport Index 2026

https://www.henleyglobal.com/passport-index/ranking
1•NKosmatos•26m ago•1 comments

An Optical Navigation System Better Than GPS [video]

https://www.youtube.com/watch?v=4ERqAqwQ1wo
2•amai•27m ago•0 comments

Show HN: HyTags – HTML as a Programming Language

https://hytags.org
1•lassejansen•29m ago•0 comments

Advent of EIP Day 11: Wire Tap and Control Bus

https://james-carr.org/posts/2026-01-13-advent-of-eip-day-11-wire-tap-control-bus/
1•carrja99•32m ago•0 comments

A Diary of a Data Engineer

https://www.ssp.sh/blog/diary-of-a-data-engineer/
3•articsputnik•36m ago•0 comments

Without Overlaps Constraints in SQL

https://modern-sql.com/caniuse/without-overlaps-constraints
1•MarkusWinand•38m ago•0 comments

Interactive Turbulence Map: Visualize turbulent areas on your flight

https://turbli.com/maps/interactive-turbulence-map/
1•giuliomagnifico•38m ago•0 comments

Show HN: An iOS budget app I've been maintaining since 2011

https://primoco.me/en/
4•Priotecs•41m ago•1 comments

Earn Money and Take a Shower

https://gagadget.com/en/691597-earn-money-and-take-a-shower-the-superheat-h1-boiler-which-heats-w...
1•majkinetor•44m ago•0 comments

Ten Papers That Built the AI We Have Today

https://deadneurons.substack.com/p/ten-papers-that-built-the-ai-we-have
1•nr378•45m ago•0 comments

IsoCity is a open-source isometric city-building simulation game

https://github.com/amilich/isometric-city
2•Brajeshwar•45m ago•0 comments

A pink aesthetic wallpaper hub for makers/creators, with built-in AI edit tools

1•xiaolu627•46m ago•0 comments

Mississippi Transformed Its Schools from Worst to Best

https://www.nytimes.com/2026/01/11/us/mississippi-schools-transformation.html
1•jbredeche•47m ago•1 comments

We update our credit pricing from $4 to $5 per PR as of today due to increasing

https://gitauto.ai/blog/how-to-open-pull-requests-from-github-issues
3•nishiohiroshi•49m ago•0 comments

Show HN: Pdftl – pdftk in Python with pipelines, AES-256, geometry and more

https://github.com/pdftl/pdftl
2•pdftl-dev•49m ago•1 comments

We were tricked: How one woman lures foreign men to fight on Russia's front line

https://www.bbc.com/news/articles/ce9yv4gmn9lo
3•breve•51m ago•0 comments