frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Building an OPNsense router

https://clintonboys.com/projects/homelab/04-router/
1•mtsolitary•27s ago•0 comments

Show HN: SkillCatalog, a Git-native skill manager for AI coding tools

https://skillcatalog.dev
1•sformisano•2m ago•0 comments

'No Random Woman Is Getting What I Built': Founder Reveals 'Floozy Clause'

https://www.ibtimes.co.uk/rebecca-minkoff-floozy-clause-family-wealth-1792608
1•randycupertino•2m ago•0 comments

Data Center Is Getting a $77M Tax Break to Create One Job

https://nysfocus.com/2026/04/20/data-center-tax-break-jpmorgan-chase
1•jaredwiener•2m ago•0 comments

New config file format based on Markdown

https://github.com/mol-format/mol-specs
1•dankrusi•3m ago•1 comments

ChatGPT and Codex Down

https://status.openai.com/incidents/01KPNN2V2SMP3TAN3MCJK87W50
2•written-beyond•5m ago•1 comments

President Graph – Fred Data Broken Down by Party and President

https://probablydance.com/2026/04/18/president-graph-fred-data-broken-down-by-party-and-president/
2•ibobev•6m ago•0 comments

Show HN: Agentkit-CLI, one canonical context file for AI coding agents

https://mikiships.github.io/agentkit-cli/
1•miki_ships•6m ago•0 comments

How the Heck does Shazam work?

https://perthirtysix.com/how-the-heck-does-shazam-work
3•datadrivenangel•6m ago•0 comments

Electric car sales soar 51% in mainland Europe as Iran war drives up fuel prices

https://www.theguardian.com/environment/2026/apr/20/electric-car-ev-sales-mainland-europe-petrol-...
2•ciconia•6m ago•0 comments

The fastest way to match characters on ARM processors?

https://lemire.me/blog/2026/04/19/the-fastest-way-to-match-characters-on-arm-processors/
1•ibobev•7m ago•0 comments

Persistence of Vision

https://danilafe.com/writing/spirits/
1•ibobev•7m ago•0 comments

Observability for AI Agents

https://cloudpresser.com/writing/observability-for-ai-agents
1•cloudpresser•9m ago•0 comments

America Is in the Middle of a Stealth Manufacturing Boom

https://www.wsj.com/economy/america-is-in-the-middle-of-a-stealth-manufacturing-boom-af0702af
1•JumpCrisscross•11m ago•0 comments

Adventures with Anycast – Building a Public Anycast Network

https://preview-anycast.oh2xab.pages.dev/Building-Anycast-Network/
2•alibarber•12m ago•0 comments

The most expensive system is the one nobody remembers building

https://joshpanka.substack.com/p/the-most-expensive-system-is-the
1•posterity•13m ago•0 comments

Southern California residents sentenced in bear suit insurance fraud scheme

https://abc7.com/post/3-southern-california-residents-sentenced-bear-suit-insurance-fraud-scheme/...
1•Alupis•13m ago•0 comments

India's Expanding Site Blocking Orders Hit Legal Wall at Delhi High Court

https://torrentfreak.com/indias-expanding-site-blocking-orders-hit-legal-wall-at-delhi-high-court/
2•Brajeshwar•14m ago•0 comments

New Posts

https://mag.openrockets.com/p/developmental-integrity-di-and-the-cognitive-environments-why-minor...
1•openrockets•21m ago•1 comments

Most people care about farm animals – our food system doesn't reflect that

https://ourworldindata.org/most-people-care-about-farm-animals-our-food-system-doesnt-reflect-that
3•alphabetatango•21m ago•0 comments

Show HN: Made a highly organised email client with prompt-free AI within

1•neerajnathany•21m ago•0 comments

RedSun and UnDefend: Unpatched Exploit Turning Windows Security Against Itself

https://cyberspit.com/redsun-undefend-defender-zero-days.html
3•KandiBrian•23m ago•0 comments

Agent Skills move too fast for Git

https://www.sleuth.io/post/agent-skills-move-too-fast-for-git/
2•detkin•23m ago•0 comments

USPS Inspector General Issues Alert on Counterfeit Postage

https://www.ecommercebytes.com/2026/04/20/usps-inspector-general-issues-alert-on-counterfeit-post...
1•ilamont•24m ago•0 comments

Imperialist appropriation in the world: Drain from Gl. South v/ unequal exchange

https://www.sciencedirect.com/science/article/pii/S095937802200005X
2•y0eswddl•25m ago•1 comments

No Lines, No 'Regular' People: Flying Ultra-Luxury from Paris

https://www.nytimes.com/2026/04/06/travel/first-class-luxury-flight-air-france-la-premiere.html
4•bookofjoe•27m ago•1 comments

Show HN: Scryptian – Run Local AI Skills via Ctrl and Alt (Python and Ollama)

https://github.com/adrianium/Scryptian
1•bonsuaq•27m ago•1 comments

Your models are collapsing because they are closed loops.

https://www.amazon.co.uk/dp/B0GWLFR2P6
1•martynagass•28m ago•1 comments

Nvidia AI chip rivals attract record funding as competition heats up

https://www.cnbc.com/2026/04/17/nvidia-ai-chip-rivals-funding-euclyd-fractile.html
4•Brajeshwar•30m ago•0 comments

CAMM2 is replacing the RAM stick as we know it, your next laptop will prove it

https://www.xda-developers.com/camm2-will-replace-ram-sticks-in-your-next-laptop/
2•maxloh•30m ago•1 comments