frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

Aid cuts and war complicate Ebola response in Congo

https://www.politico.eu/article/ebola-outbreak-drc-uganda-aid-cuts-global-health-crisis/
1•JumpCrisscross•20s ago•0 comments

The Next 15 Years of Moore's Law, According to Imec

https://spectrum.ieee.org/semiconductor-technology-roadmap
1•oldnetguy•1m ago•0 comments

AT Protocol for Agents

https://davidgasquez.com/atproto-agents
1•danabramov•2m ago•0 comments

Home Robot Safety Is All About Relationships

https://spectrum.ieee.org/domestic-humanoid-robot-safety-standards
1•oldnetguy•2m ago•0 comments

Who's behind Facebook's hateful AI slop about the UK? They may be in South Asia

https://www.theguardian.com/commentisfree/2026/may/19/social-media-facebook-ai-slop-hateful-south...
2•curiousObject•6m ago•0 comments

Silicon Valley's Answer to Declining Male Fertility? Sperm Racing

https://www.nytimes.com/2026/05/19/magazine/sperm-racing-silicon-valley.html
1•Nelkins•7m ago•0 comments

Clang Lifetime Safty Doc Update

https://clang.llvm.org/docs/LifetimeSafety.html
1•pjmlp•7m ago•0 comments

Autonomous underwater robot discovers hidden coral reef 'hotspots'

https://phys.org/news/2026-05-autonomous-underwater-robot-hidden-coral.html
1•gmays•9m ago•0 comments

Microsoft Now Has a Fedora-Based Linux Distro

https://itsfoss.com/news/azure-linux-4/
1•mikece•9m ago•0 comments

Ask HN: Is there any problem using multi-LLM

1•omertt27•10m ago•2 comments

Galápagos Syndrome

https://en.wikipedia.org/wiki/Gal%C3%A1pagos_syndrome
1•doruk101•11m ago•0 comments

Bond Yields Near Two-Decade High Open Rift Among Investors

https://financialpost.com/pmn/business-pmn/us-yields-flirting-with-2007-highs-entice-and-divide-i...
1•monkeydust•12m ago•0 comments

Anthropic Is Preparing for IPO and We Should Be Worried

https://www.vincentschmalbach.com/anthropic-ipo-developers-should-be-worried-v2/
4•vincent_s•12m ago•0 comments

Standard Chartered to cut more than 7k jobs as it steps up AI use

https://www.theguardian.com/business/2026/may/19/standard-chartered-bank-cut-jobs-ai-london
1•Brajeshwar•14m ago•1 comments

AIllowpages – Free AI tools search engine with 2500 tools, zero ads

https://aillowpages.com/
1•muralipala•14m ago•0 comments

When Rails-way does not work anymore?

https://paweldabrowski.com/farewell-to-rails-way/when-rails-way-does-not-work
1•pdabrowski6•14m ago•0 comments

Why Taxing the Wealthy Is Harder Than It Looks

https://ofdollarsanddata.com/why-taxing-the-wealthy-is-harder-than-it-looks/
1•speckx•16m ago•1 comments

OpenAI Dismissal Motion Says ChatGPT Is Mere Tool, Not Attorney

https://news.bloomberglaw.com/litigation/open-ai-dismissal-motion-says-chatgpt-is-mere-tool-not-a...
1•1vuio0pswjnm7•16m ago•0 comments

New Lifetime Plex Pass Pricing

https://www.plex.tv/blog/new-lifetime-plex-pass-pricing/
1•Larrikin•17m ago•0 comments

'De-Extinction' Startup Just Hatched Baby Chicks from 3D-Printed Artificial Egg

https://gizmodo.com/de-extinction-start-up-just-hatched-baby-chicks-from-a-3d-printed-artificial-...
1•austinallegro•18m ago•0 comments

The economics of superstar AI researchers

https://epochai.substack.com/p/the-economics-of-superstar-ai-researchers
1•gmays•18m ago•0 comments

The Two X's Problem: Why AI-designed brands feel like AI-designed brands

https://blog.codeyam.com/p/the-two-xs-problem
2•bastadani•19m ago•1 comments

Show HN: Childflow – command-tree network control(proxy/DNS/capture) for Linux

https://github.com/blacknon/childflow
1•blacknon•19m ago•0 comments

I vibecoded a Kalshi bot to $6k profit and opensourced it

https://mcinerney.ai/writings/how-i-botted-6k-prediction-markets-as-i-slept/
1•DanMcInerney•20m ago•0 comments

Tired?

https://budgetbites.website/login
1•ClarenceJackson•20m ago•0 comments

Show HN: Chidori – Fast web-to-Markdown fetching for AI agents

https://github.com/taishikato/chidori
1•taishikato•22m ago•0 comments

Singapore's royal descendants living low-key as taxi drivers and office workers

https://www.scmp.com/news/asia/southeast-asia/article/3107188/meet-singapores-royal-descendants-l...
1•teleforce•23m ago•0 comments

China deploys first wind-powered and ocean-cooled underwater data center

https://www.tomshardware.com/tech-industry/china-says-worlds-first-offshore-wind-powered-underwat...
1•HardwareLust•23m ago•2 comments

Software's Centaur Era

https://twitchard.github.io/posts/2026-05-18-softwares-centaur-era.html
1•speckx•23m ago•0 comments

Echoform – unlimited LLM memory via a single 64 KB hypervector

https://github.com/OpenAgentic-Labs/echoform-ghost-memory
1•Nagendhra•24m ago•0 comments