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

AI Agent Lands PRs in Major OSS Projects

https://socket.dev/blog/ai-agent-lands-prs-in-major-oss-projects-targets-maintainers-via-cold-out...
1•junon•2m ago•0 comments

Agentic Experience for Publishers

https://www.gendiscover.com/publisher
1•transfon•3m ago•0 comments

Simplifier

https://simplifier.neocities.org/
1•tosh•4m ago•0 comments

When Helm and Argo Is Not Enough

https://kubekattle.github.io/ktl/blog/ktl-stack-dag-vs-argo.html
1•KyleVlaros•5m ago•0 comments

Berlin Lights Brandenburg Gate with 'Freedom for Iran' Message

https://www.iranintl.com/en/202602144731
2•ukblewis•8m ago•0 comments

Ads are coming to AI, but not to Claude [video]

https://www.youtube.com/watch?v=FBSam25u8O4
1•nojs•19m ago•1 comments

Life at the Frontlines of Demographic Collapse

https://www.250bpm.com/p/life-at-the-frontlines-of-demographic
1•msustrik•23m ago•0 comments

Zig – io_uring and Grand Central Dispatch std.Io implementations landed

https://ziglang.org/devlog/2026/#2026-02-13
4•Retro_Dev•26m ago•0 comments

How does token bucket enforces bursty output traffic?

1•shivajikobardan•29m ago•0 comments

Moving Forth (1993)

https://www.bradrodriguez.com/papers/moving1.htm
2•tosh•33m ago•1 comments

OpenAI Should Build Slack

https://twitter.com/swyx/status/2022580899737673810
1•tosh•34m ago•0 comments

I intend to refactor Gastown for the following

1•vanxv•37m ago•0 comments

Darknet Market Maximalism

https://antimoonboy.com/darknetmarketmaximalism/
1•nickysielicki•38m ago•0 comments

AI usage in popular open source projects

https://tirkarthi.github.io/programming/2026/02/13/genai-oss.html
1•xtreak29•39m ago•0 comments

Show HN: Prompt to Planet, generate procedural 3D planets from text

https://prompttoplanet.n4ze3m.com/
3•error404x•42m ago•0 comments

Space Based Solar Power

https://www.gov.uk/government/publications/space-based-solar-power-de-risking-the-pathway-to-net-...
2•zeristor•44m ago•0 comments

How would you go to market for a paid WhatsApp wrapper around OpenClaw?

1•coodeex•46m ago•3 comments

Show HN: Long Mem code agent cut 95% costs for Claude with small model reading

https://marketplace.visualstudio.com/items?itemName=devokaicode.cosave
14•lingxiao10•47m ago•1 comments

Show HN: Schedule posts to social media with AI Agent CLI

https://github.com/gitroomhq/postiz-agent
3•nevodavid10•47m ago•0 comments

Show HN: ChoiceBook – Stories Are Mirrors

https://choicebook.app
1•owoamier•52m ago•0 comments

WV Lawmakers Propose Bill to Remove CS Graduation Mandate

https://news.slashdot.org/story/26/02/13/1424257/bill-introduced-to-replace-west-virginias-new-cs...
1•disqard•53m ago•1 comments

Show HN: Multispace -save,organize,and launch workspaces–tools,apps,games,anyURL

https://multispace.com/
1•DanielSystem•53m ago•1 comments

Show HN: Maker – A Local-First Automation OS with AGPL Core

https://github.com/Salepark/maker
1•makelr•53m ago•1 comments

Sift-Kg

https://github.com/juanceresa/sift-kg
1•handfuloflight•57m ago•0 comments

Chained Assignment in Python Bytecode

https://loriculus.org/blog/python-chained-assignment/
1•wenderen•58m ago•0 comments

OpenAI Should Build Slack

https://www.latent.space/p/ainews-why-openai-should-build-slack
1•swyx•58m ago•0 comments

Cosmologically Unique IDs

https://jasonfantl.com/posts/Universal-Unique-IDs/
2•rsaarelm•58m ago•0 comments

The Drama and Dysfunction of Gemini 2.5 Pro and Gemini 3 Pro

https://bazhkio88.substack.com/p/field-notes-from-the-ai-village-the
1•ishandotpage•1h ago•0 comments

FTC wants Apple News to promote more Fox News and Breitbart stories

https://arstechnica.com/tech-policy/2026/02/trump-ftc-denies-being-speech-police-but-says-apple-n...
2•tyfon•1h ago•2 comments

I Love Free Software Day

https://fsfe.org/activities/ilovefs/
1•midzer•1h ago•0 comments