frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Medicare Negotiates 71% Discount on Novo's Ozempic, Wegovy

https://www.bloomberg.com/news/articles/2025-11-25/medicare-negotiates-71-discount-on-novo-s-ozem...
1•toomuchtodo•3m ago•1 comments

Acontext, Turn Your Agent's Task History into Reusable Skills (SOPs)

https://github.com/memodb-io/Acontext
1•jinqueeny•6m ago•0 comments

Show HN: Rsync Made It on Jpm

https://youtu.be/jJ3x_BlbL24
1•sunnykentz•7m ago•0 comments

Fei-Fei Li and Justin Johnson, World Labs: Spatial Intelligence and World Models [video]

https://www.youtube.com/watch?v=60iW8FZ7MJU
2•Tsarp•13m ago•0 comments

Crumb: A Cartoonist's Life

https://www.lrb.co.uk/the-paper/v47/n21/j.-hoberman/desperate-character
2•mitchbob•23m ago•1 comments

Space Truckin' – The Nostromo (2012)

https://alienseries.wordpress.com/2012/10/23/space-truckin-the-nostromo/
5•exvi•24m ago•1 comments

Polar Signals is 70% faster by switching from Parquet to Vortex

https://www.polarsignals.com/blog/posts/2025/11/25/interface-parquet-vortex
2•SchwKatze•25m ago•0 comments

TMLR Beyond PDF:Journal of Machine Learning Research Now Accept HTML Submissions

https://tmlr-beyond-pdf.org/about
1•lnyan•27m ago•0 comments

ClipEgg: We Confused Copying with Hoarding

2•DaaaaveATX•28m ago•2 comments

Lawsuit alleges social media giants buried research on teen mental health harms

https://www.cnn.com/2025/11/25/tech/social-media-youth-mental-health-lawsuit-meta-tiktok-snap-you...
3•anonymousiam•30m ago•1 comments

The final evolution of agentic memory

https://manthanguptaa.in/posts/towards_human_like_memory_for_ai_agents/
1•manthangupta109•31m ago•0 comments

Klarna to launch dollar-backed stablecoin as race in digital payments heats up

https://www.reuters.com/business/finance/klarna-launch-dollar-backed-stablecoin-race-digital-paym...
1•krrishd•33m ago•1 comments

Optimzing Our Jax LLM RL Pipeline

https://notes.kvfrans.com/7-misc/rl-infra.html
1•lnyan•34m ago•0 comments

The Nostromo Project (2011) [video]

https://www.youtube.com/watch?v=9NoCsZvYeEQ
2•exvi•35m ago•0 comments

80.1 % on LoCoMo Long-Term Memory Benchmark with a pure open-source RAG pipeline

2•ViktorKuz•39m ago•0 comments

Nostromo: A Legend Born and Born Again - Part 1 (2011)

https://web.archive.org/web/20110519073318/http://www.therpf.com/f45/prop-store-first-look-nostro...
2•exvi•40m ago•0 comments

<5KB demoscene intro by Claude

https://demo-blue-fog-5621.fly.dev/
2•MattPearce•42m ago•2 comments

A Math Horror Show at UC San Diego

https://www.wsj.com/opinion/a-math-horror-show-at-cal-at-san-diego-c91f2035
1•delichon•44m ago•0 comments

US triples national park fee for non-residents, amid 'new' fee for Americans

https://www.theguardian.com/us-news/2025/nov/25/national-park-fee-non-residents
2•c420•45m ago•1 comments

Client Registration and Enterprise Management in the Nov 2025 MCP Auth Spec

https://aaronparecki.com/2025/11/25/1/mcp-authorization-spec-update
1•gz5•45m ago•0 comments

Markets are getting more concerned about Oracle's AI data center debt

https://sherwood.news/markets/markets-are-getting-more-concerned-about-oracles-ai-data-center-debt/
1•zerosizedweasle•46m ago•0 comments

Plug it in and make it magic

https://doingsoftwarewrong.com/blog/plug-in-ai-magic/
1•ChunkyAu•49m ago•0 comments

Java Quirks: Bridge and Synthetic Methods for Reflection

https://www.ptidej.net/blog/bridge-methods-java/
3•yann-gael•51m ago•1 comments

CS QLola

https://news.ycombinator.com
2•bappaforjio•54m ago•0 comments

Lifetime Safety in Clang – 2025 US LLVM Developers' Meeting [video]

https://www.youtube.com/watch?v=3zWK7Lx96vI
1•matt_d•57m ago•0 comments

Joe Armstrong – The mess we are in

https://youtu.be/lKXe3HUG2l4?si=YEbsd9xOCH_yP_C2
2•lifeisstillgood•1h ago•0 comments

Ask HN: Hard and deep tech – why are Jira and Confluence the go-to PM tools?

2•dnlh_lvg•1h ago•2 comments

Dr. Chainlove Or: How I Learned to Stop Worrying and Love On-Chain Gaming

https://organizedplayer.substack.com/p/dr-chainlove-or-how-i-learned-to
1•0north•1h ago•0 comments

Prosecutor Used Flawed A.I. To Keep a Man in Jail, His Lawyers Say

https://www.nytimes.com/2025/11/25/us/prosecutor-artificial-intelligence-errors-lawyers-californi...
3•perihelions•1h ago•0 comments

BebboSSH: SSH2 implementation for Amiga systems (68000, GPLv3)

https://franke.ms/git/bebbo/bebbossh
2•snvzz•1h ago•0 comments