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

Meredith Whittaker – AI Agent, AI Spy

https://www.youtube.com/watch?v=0ANECpNdt-4
1•max_•2m ago•0 comments

Confronted over Greenland Europe is ditching its softly-softly approach to Trump

https://www.bbc.co.uk/news/articles/c0lx7j1lrwro
1•treadump•4m ago•0 comments

I ported the OpenAI Codex review prompts to Gemini CLI

https://github.com/grainier/gemini-cli-codex-reviews
1•grainier•7m ago•1 comments

Software as Fast Fashion

https://tante.cc/2026/01/15/software-as-fast-fashion/
1•pantalaimon•7m ago•0 comments

A static site generator written in POSIX shell

https://aashvik.com/posts/shell-ssg/
1•todsacerdoti•8m ago•0 comments

VidSnoop – browser-based video analyzer (codec checker, metadata viewer)

https://www.vidsnoop.com/
1•androidparanoid•9m ago•1 comments

The Military Is Being Forced to Plan for an Unthinkable Betrayal

https://www.theatlantic.com/ideas/2026/01/us-military-trump-greenland/685677/
3•breve•9m ago•0 comments

My thoughts on Gas Town after 10k hours of Claude Code

https://simonhartcher.com/posts/2026-01-19-my-thoughts-on-gas-town-after-10000-hours-of-claude-code/
1•birdculture•13m ago•0 comments

Show HN: NetNerve AI-powered packet analysis that analyses.cap files

https://www.netnerve.online/
1•bhatshubham•14m ago•0 comments

Beddel Protocol serve as the 'API' for AIs to build secure software for us

https://www.npmjs.com/package/beddel
1•mesenga•16m ago•0 comments

A Personal AI Maturity Model (Paimm)

https://danielmiessler.com/blog/personal-ai-maturity-model
1•alexandrp001•17m ago•0 comments

Building an ECS Golden Path with Claude Code and AWS CDK

https://medium.com/zar-engineering/building-an-ecs-golden-path-with-claude-code-and-aws-cdk-d4a58...
1•obiefernandez•17m ago•0 comments

I'm Addicted to Being Useful

https://www.seangoedecke.com/addicted-to-being-useful/
1•swah•17m ago•0 comments

Show HN: Gemini-live-react – Real-time voice AI that works in the browser

1•loffloff•19m ago•0 comments

Sony's TV business is being taken over by Tcl

https://www.theverge.com/news/864263/sony-tcl-tv-business-partnership-takeover-announcement
1•phantomathkg•22m ago•0 comments

I built a typing practice tool because typing tests never helped me improve

1•amitgajbhare•22m ago•0 comments

Show HN: Leta – Command-line LSP client for agentic coders

https://github.com/andreasjansson/leta
1•fagerhult•24m ago•0 comments

Computer-Using Agents Are Transforming Lead Data Research

https://www.louisamayhanrahan.com/p/ai-advancements-in-data-research
1•louisamayh•24m ago•0 comments

Do startups need marketing services? (Insights from a seasoned marketing team)

https://amplift.ai/
1•our79511•24m ago•1 comments

India Ended 451 Years of Portuguese Rule in 36 Hours

https://en.wikipedia.org/wiki/Annexation_of_Goa
1•gyanchawdhary•26m ago•1 comments

A New Cognitive Perspective on Simplicity in System and Product Design (2024)

https://stefanlesser.substack.com/p/video-and-transcript-of-my-presentation
1•notagoodidea•27m ago•0 comments

When religion and sexism collide, women's health suffers

https://www.sltrib.com/opinion/commentary/2026/01/17/voices-how-sexism-religion-hurts/
1•binning•27m ago•0 comments

Anyone here has a usecase for Opern router but for TTS?

1•akshat77•28m ago•0 comments

Does women's discomfort matter?

https://thecritic.co.uk/does-womens-discomfort-matter/
1•binning•28m ago•0 comments

UK consulting on bringing in social media ban for under 16s

https://www.bbc.com/news/articles/cgm4xpyxp7lo
13•1659447091•29m ago•9 comments

Dr. Gladys West, mathematician whose work made GPS possible, dies at 95

https://thezebra.org/2026/01/18/dr-gladys-west-mathematician-whose-work-made-gps-possible-dies-at...
1•binning•29m ago•0 comments

Westermarck Effect

https://en.wikipedia.org/wiki/Westermarck_effect
1•thunderbong•33m ago•0 comments

Micron finds a way to make more DRAM with $1.8B chip plant purchase

https://www.theregister.com/2026/01/20/micron_powerchip_fab_acquisition/
2•ece•33m ago•0 comments

Show HN: Built Gitmore so non-technical founders can understand dev progress

1•inferno22•33m ago•0 comments

String Theory Can Now Describe a Universe That Has Dark Energy

https://www.quantamagazine.org/string-theory-can-now-describe-a-universe-that-has-dark-energy-202...
2•nsoonhui•34m ago•0 comments