frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

I wanted to build vertical SaaS for pest control.I took a technician job instead

https://www.onhand.pro/p/i-wanted-to-build-vertical-saas-for-pest-control-i-took-a-technician-job...
1•tezclarke•59s ago•0 comments

Law focused AI tools for India?

1•3k3h•2m ago•0 comments

OpenAI is shutting down Sora video creation app

https://twitter.com/soraofficialapp/status/2036546752535470382
3•alexgrcs•5m ago•1 comments

Shared Context

https://promptql.io/blog/on-shared-context
1•argo12•5m ago•0 comments

What to Do About Those Menu Item Icons in macOS 26 Tahoe

https://daringfireball.net/2026/03/what_to_do_about_those_menu_item_icons_in_macos_26_tahoe
1•chmaynard•7m ago•0 comments

The 25 states still requiring kids to learn cursive

https://www.popsci.com/diy/states-where-cursive-is-taught/
2•geox•7m ago•1 comments

OpenAI Will Shut Down Sora Video Platform; Disney Drops Plans for $1B Investment

https://variety.com/2026/digital/news/openai-shutting-down-sora-video-disney-1236698277/
3•bhouston•7m ago•1 comments

Arch Linux considers criticism of Age Verification to be a violation

https://xcancel.com/LundukeJournal/status/2035852545864683533#m
1•SockThief•8m ago•1 comments

Disappointing People Early

https://log.andvari.net/disappointing-people-early.html
1•sylvainkalache•8m ago•0 comments

Maine listened to farmers and confronted the PFAS crisis

https://mainemorningstar.com/2026/03/24/maine-listened-to-farmers-and-confronted-the-pfas-crisis/
2•chmaynard•9m ago•0 comments

Vibe physics: The AI grad student

https://www.anthropic.com/research/vibe-physics
2•amai•14m ago•1 comments

LGA firefighting truck involved in collision did not have transponder

https://bsky.app/profile/flightradar24.com/post/3mht7m2f3rc2h
1•_moof•14m ago•1 comments

OpenAI shutters short-form video app Sora as company reels in costs

https://www.cnbc.com/2026/03/24/openai-shutters-short-form-video-app-sora-as-company-reels-in-cos...
8•gradus_ad•16m ago•1 comments

Ask HN: Does the World need more software?

1•Vektorceraptor•16m ago•1 comments

AI Website Redesign

https://shuffle.dev/ai-website-redesign
1•efanpl•19m ago•0 comments

Google Translate breaks sites and Google does not care

https://issues.chromium.org/issues/41407169
2•videototextai•21m ago•1 comments

Disney Exits OpenAI Deal After AI Giant Shutters Sora

https://www.hollywoodreporter.com/business/digital/openai-shutting-down-sora-ai-video-app-1236546...
11•timpera•24m ago•0 comments

Show HN: Watch TV for Free for India

https://tvdekh.com
1•isandeep1995•26m ago•0 comments

My Pragmatic Way to Use Labels in Password Managers

https://martin.sh/my-pragmatic-way-to-use-labels-in-password-managers/
2•showmypost•27m ago•0 comments

How to catch LiteLLM like security issues proactively/reactively?

https://github.com/dinakars777/ai-code-guardian
1•dinakars777•29m ago•0 comments

US SEC's ex-enforcement chief clashed with bosses over cases before leaving

https://www.reuters.com/business/finance/us-secs-ex-enforcement-chief-clashed-with-bosses-before-...
4•breve•30m ago•0 comments

Gl0wFlow – A plain-English scripting language and Rust runtime for AI

https://github.com/nikolakb/Gl0wFlow
1•Gl0wFl0w•30m ago•0 comments

xAI Will Win

https://twitter.com/shaunmmaguire/status/2036097323458343361
1•mhb•30m ago•2 comments

We're Not Vibe Engineering

https://jonathannen.com/not-vibe-engineering/
1•jwilliams•31m ago•0 comments

Designing repos for humans and agents

https://www.merolle.net/blog/designing-repos-for-humans-and-agents/
1•ryanmerolle•32m ago•0 comments

Front end devs need to have design skills

https://www.sarahgebauer.com/post/frontend-devs-need-to-have-design-skills/
1•speckx•32m ago•0 comments

Chinese EV maker BYD in talks to open Canadian dealerships, consultant says

https://www.theglobeandmail.com/business/article-china-ev-maker-byd-auto-dealerships-canada/
3•breve•33m ago•0 comments

OpenAI shutting down Sora app

https://www.nbcnews.com/tech/tech-news/openai-shuttering-sora-video-generating-service-rcna264989
19•websku•36m ago•2 comments

I сan't find a job in the Bay Area, so I'll search in London

https://relocateme.substack.com/p/i-cant-find-a-job-in-the-bay-area
4•andrewstetsenko•36m ago•0 comments

Go Naming Conventions: A Practical Guide

https://www.alexedwards.net/blog/go-naming-conventions
1•yurivish•36m ago•0 comments