frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

China's 3K km Green Wall has transformed its largest desert into a carbon sink

https://www.msn.com/en-us/weather/climate-change/china-s-3-046-kilometer-great-green-wall-has-tra...
1•thunderbong•1m ago•0 comments

Show HN: Go-TUI – A framework for building declarative terminal UIs in Go

https://www.go-tui.dev/
1•grindlemire•2m ago•0 comments

Codex Security: now in research preview

https://openai.com/index/codex-security-now-in-research-preview/
1•ancarda•2m ago•0 comments

Request to the European Commission to Adhere to Its Own Guidance

https://blog.documentfoundation.org/blog/2026/03/05/cra-guidances/
1•speckx•2m ago•0 comments

The Golden Networking Hour

https://olshansky.info/posts/2025-12-31-the-golden-networking-hour
1•Olshansky•4m ago•0 comments

Never Bet Against x86

https://www.osnews.com/story/144527/never-bet-against-x86/
3•raphinou•4m ago•0 comments

Show HN: Max – a federated data query layer for AI agents (and humans)

https://max.cloud
1•benvan•7m ago•0 comments

Show HN: MyChatArchive – bring your full ChatGPT history into Claude via MCP

https://github.com/1ch1n/mychatarchive
1•chan1•7m ago•0 comments

Why Stable Reality Requires λ² = λ and 1

https://www.academia.edu/145790753/One_Equation_200_Mysteries_A_Structural_Constraint_That_May_Ex...
1•kristintynski•8m ago•1 comments

Open-Sourcing Sarvam 30B and 105B

https://www.sarvam.ai/blogs/sarvam-30b-105b
1•meetpateltech•9m ago•0 comments

Services: The New Software

https://sequoiacap.com/article/services-the-new-software/
1•techlad84•10m ago•1 comments

Show HN: AdPipe – Generate 12 Meta ad copy variants from any product URL

https://adpipe.io
1•edgar_builds•10m ago•0 comments

Show HN: AI trading platform with 34% returns (3 months) – seeking acquisition

https://acis-trading.com/
1•fkratzer•12m ago•0 comments

The Download: things that matter in AI, plus Anthropic's plan to sue the Pen

https://www.technologyreview.com/2026/03/06/1133989/the-download-10-things-that-matter-in-ai-anth...
1•joozio•12m ago•0 comments

Claude Code wiped our production database with a Terraform command

https://twitter.com/Al_Grigor/status/2029889772181934425
4•jv22222•13m ago•0 comments

The AI Agent Infrastructure Stack: Who's Building the Picks and Shovels

https://primitivesai.substack.com/p/the-ai-agent-infrastructure-stack
1•traderaegis•14m ago•1 comments

Show HN: Best ways to organize research links

https://clipnotebook.com/blog/best-ways-to-organize-research-links-2026
3•diddddy•14m ago•0 comments

Show HN: Autonomous AI platform that builds apps and tools automatically

https://github.com/rupac4530-creator/super-builder-platform
1•BuildWithAI•14m ago•0 comments

The Personal Software Era

https://robertdelu.ca/2026/02/02/personal-software-era/
1•Robdel12•15m ago•1 comments

How We Model Clinical Trial Data When Every Trial's Data Model Is Different

https://runharbor.com/blog/2026-03-03-how-we-model-clinical-trial-data-when-every-trial-is-different
1•18nleung•17m ago•0 comments

No code reviews by default (2021)

https://www.raycast.com/blog/no-code-reviews-by-default
1•speckx•18m ago•0 comments

Predictive AI with graphs and tabular foundation models

https://wesmadrigal.github.io/GraphReduce/end_to_end_examples/predictive_ai_tabpfn/
1•madman2890•18m ago•0 comments

See the oldest fossilized 'butthole' imprint

https://www.scientificamerican.com/article/see-the-worlds-oldest-fossilized-butthole-imprint/
3•Tomte•19m ago•0 comments

Pokopia Network

https://pokopia.network/
1•mochidough•20m ago•0 comments

SQLite Release 3.52.0

https://sqlite.org/releaselog/3_52_0.html
1•chungy•23m ago•0 comments

The Post-Copyright Era of Software

https://www.nibzard.com/post-copyright-era-software/
2•speckx•23m ago•0 comments

Hong Kong pro-democracy tycoon Jimmy Lai will not appeal conviction

https://www.bbc.com/news/articles/ce3g5nn8v4wo
2•tartoran•23m ago•0 comments

Ungrounded Divergence–Philosophical Framework for Understanding AI Hallucination

https://download.ssrn.com/2026/2/13/6234159.pdf?response-content-disposition=inline&X-Amz-Securit...
2•droidjj•23m ago•0 comments

shadcn/cli v4

https://ui.shadcn.com/docs/changelog/2026-03-cli-v4
1•bpierre•24m ago•0 comments

Ctrl-C in psql gives me the heebie-jeebies

https://neon.com/blog/ctrl-c-in-psql-gives-me-the-heebie-jeebies
1•gmac•24m ago•0 comments