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

California tax blitz in 2026 hits everyone – and it's only the start

https://nypost.com/2026/02/12/us-news/californians-have-justified-outrage-over-2026-tax-ideas/
1•SunshineTheCat•27s ago•0 comments

WinGet Configuration: Set up your dev machine in one command

https://developer.microsoft.com/blog/winget-configuration-set-up-your-dev-machine-in-one-command
1•ibobev•37s ago•0 comments

Instagram's URL Blackhole

https://medium.com/@shredlife/instagrams-url-blackhole-c1733e081664
1•tkp-415•2m ago•1 comments

Show HN: An API for on-chain swap

https://roissingue.com/
1•lakonguina•2m ago•0 comments

What happens inside Postgres when IOPS runs out

https://frn.sh/bio/
1•shellpipe•2m ago•0 comments

Sharp temperature contrasts seen in the Northern Hemisphere in January

https://climate.copernicus.eu/sharp-temperature-contrasts-seen-northern-hemisphere-january
1•geox•2m ago•0 comments

Frogbull Recreates Minecraft on Saturn

https://www.segasaturnshiro.com/2026/02/13/frogbull-recreates-minecraft-on-saturn/
1•MBCook•3m ago•0 comments

Remember to occasionally sass back at LLMs

https://www.globalnerdy.com/2026/02/13/remember-to-occasionally-sass-back-at-llms/
1•speckx•3m ago•0 comments

In Defense of SaaS

https://finbarr.site/2026/02/12/in-defense-of-saas.html
1•Finbarr•3m ago•0 comments

TypeScript 6.0 Beta

https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/
1•ibobev•4m ago•0 comments

Show HN: Flemma – a Neovim plugin where the .chat buffer is the conversation

2•StanAngeloff•5m ago•0 comments

Why does request.remote_IP work on Heroku but not Render?

https://rohitpaulk.com/articles/render-rails-remote-ip
1•rohitpaulk•6m ago•0 comments

Only use agents for tasks you know how to do

https://zknill.io/posts/only-ai-tasks-you-know-how-to-do/
1•zknill•6m ago•0 comments

How teaching molecules to think is revealing what a 'mind' is

https://www.newscientist.com/article/2513815-how-teaching-molecules-to-think-is-revealing-what-a-...
1•pella•6m ago•1 comments

Home Sales in January Posted Biggest Monthly Decline in Nearly Four Years

https://www.wsj.com/economy/housing/homes-sales-in-january-post-biggest-monthly-decline-in-nearly...
1•gmays•7m ago•0 comments

Most white-collar tasks will be automated by AI within 18 months

https://www.businessinsider.com/microsoft-ai-ceo-mustafa-suleyman-white-collar-tasks-automation-p...
1•afshinmeh•8m ago•0 comments

Scientific sleuthing solves vaccine side-effect

https://news.flinders.edu.au/blog/2026/02/12/scientific-sleuthing-solves-vaccine-side-effect/
2•gmays•9m ago•0 comments

Sunlight extracts oxygen from regolith using solar chemistry

https://phys.org/news/2026-02-sunlight-oxygen-regolith-solar-chemistry.html
1•krunck•9m ago•0 comments

Building context-efficient AI agents with Bash and a CLI

https://tool.store/blog/building-context-efficient-agents#references
3•appcypher•10m ago•0 comments

Show HN: Codex HUD – Claude-HUD Style Status Line for Codex CLI

https://github.com/anhannin/codex-hud
2•anhm720•12m ago•0 comments

A Deep Dive into Apple's .car File Format

https://dbg.re/posts/car-file-format/
2•todsacerdoti•13m ago•0 comments

Helion achieves new fusion energy milestones

https://www.helionenergy.com/articles/helion-achieves-new-fusion-energy-milestones/
2•bottombutton•14m ago•0 comments

Why is Bezos trolling Musk on X with turtle pics? Because he has a new Moon plan

https://arstechnica.com/space/2026/02/why-is-bezos-trolling-musk-on-x-with-turtle-pics-because-he...
2•themgt•14m ago•0 comments

Before the Super Bowl, Seahawks kicker Jason Myers was so calm he felt nervous

https://www.nytimes.com/athletic/7041544/2026/02/13/seahawks-jason-myers-super-bowl-routine/
1•Mernit•15m ago•0 comments

Researchers: The insights drones can provide by monitoring corn on small farms

https://phys.org/news/2026-01-insights-drones-corn-small-farms.html
1•PaulHoule•15m ago•0 comments

Relationship Wrapped with Claude Code and iMessage

https://claudentines.ai/
1•ajspencer•15m ago•0 comments

URLs with Trailing Punctuation

https://www.redblobgames.com/blog/2026-02-12-urls-with-trailing-punctuation/
1•ibobev•16m ago•0 comments

GitButler CLI Is Good

https://matduggan.com/gitbutler-cli-is-really-good/
1•birdculture•16m ago•0 comments

Toolspotting: Earn cash for speaking about AI tools

https://www.toolspotting.com/
3•p2pai•16m ago•0 comments

Amazon cosplayed the villain from my sci-fi novel on launch day

https://elidorascodex.com/product/the-elidoras-codex-books-1-2-bundle/
2•Elidorascodex•17m ago•1 comments