frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

First Day of the MS Paint Cutaway Advent Calendar

https://bsky.app/profile/covertshores.bsky.social/post/3n3m7ahgx3s2x
1•wood_spirit•51s ago•0 comments

Memory Modification on Android Without Root: Inside APK-Medit

https://www.coldedgetrainings.com/blog/memory-modification-android-without-root-apk-medit
1•tkmru•1m ago•0 comments

Expensive Tokens Are a Myth

https://www.brachkow.com/notes/expensive-tokens-are-myth/
1•brachkow•2m ago•0 comments

Show HN: Remove.bg shut down. We used it too, so we tried to rebuild it

https://removebg.so
1•vaibhav1312•2m ago•0 comments

StarRocks 4.2 Preview: What's Coming

https://www.deep.bi/blog/starrocks-4-2-preview
1•sebastianzontek•3m ago•1 comments

A Design for a Mechanical Computer

https://timhutton.github.io/2026/11/30/mechanical-computer.html
1•todsacerdoti•3m ago•0 comments

Age and Post-Quantum Cryptography

https://age-encryption.org/pq-warning
1•todsacerdoti•3m ago•0 comments

Show HN: Pages CMS 3.0 – Your repository is a CMS

https://pagescms.org/
1•hunvreus•4m ago•0 comments

Valve Is Canceling the February 2027 Steam Next Fest

https://kotaku.com/valve-is-so-overwhelmed-right-now-its-canceling-the-february-2027-steam-next-f...
1•bmitch3020•4m ago•0 comments

Why Companies Are Racing to Build Smaller, Custom AI

https://www.wsj.com/cio-journal/why-companies-are-racing-to-build-smaller-custom-ai-9fd49708
2•the1plummie•4m ago•1 comments

Claude projects are now in beta on Team and Enterprise plans

https://claude.com/resources/articles/claude-projects-beta-on-team-and-enterprise
1•eternalreturn•4m ago•0 comments

Please Turn Off Your GraphQL Introspection: Botting AMC's IMAX 70mm Seats

https://www.jack.bio/blog/amc
2•lafond•5m ago•0 comments

Dangling DNS in 43 State and Local Gov Domains

https://www.sh.consulting/blog/government-dangling-dns-records
1•speckx•5m ago•0 comments

Show HN: Mference – Pvt everyday AI for everyday Macs

https://github.com/NeelM0906/Mference
1•NeelM0906•6m ago•0 comments

Nvidia Launches Vera Rubin NVL72 Space Computing Platform

https://nvidianews.nvidia.com/news/nvidia-launches-vera-rubin-nvl72-space-computing-platform-in-p...
3•drtz•6m ago•0 comments

Hackers breach Air Force's "Cloud One" computing environment

https://federalnewsnetwork.com/air-force/2026/11/hackers-breach-air-forces-cloud-one-computing-en...
2•xmstr•7m ago•0 comments

Show HN: Photo Museum – Walk around a tiny 3D museum made of your photos

https://photomuseum.davidemornatta.it/
1•kegenaar•8m ago•0 comments

Show HN: Leaktap, find and scrub secrets in Claude/Codex/MCP logs

https://github.com/vssinghh/leaktap
1•helsenki•8m ago•0 comments

Chasing Silent Speech

https://www.tacit.ai/journal/chasing-silent-speech
1•jrmann100•8m ago•0 comments

Show HN: My free tools list for grow X posts reach

https://xfast.me/free-tools
1•bigmuzzy•9m ago•0 comments

OpenAI and AWS expand partnership at re:Invent

https://openai.com/index/openai-aws-reinvent-2026/
1•louiereederson•9m ago•0 comments

GLP-1 patients who lost eyesight say weight loss was not worth the price

https://www.nbcnews.com/health/health-news/fda-glp-1-warning-patients-lost-eyesight-say-weight-lo...
3•mgh2•10m ago•1 comments

Show HN: Private Serverless Pi Agents with Matrix Runpod, and Openrouter

https://github.com/rwhaling/fuchikoma
1•rwhaling•10m ago•0 comments

What 122 consumers built with an agent builder

https://agentmart.to/blog/what-people-built-with-an-agent-builder
1•rohanmahen•10m ago•0 comments

Bang Paths, Usenet, and Vi: Open-Source Before the Web – Mary Ann Horton [video]

https://www.youtube.com/watch?v=0B9opgQTWXQ
1•boristane•11m ago•0 comments

Manual Play – turn music blogs into a music player

https://manualplay.com/
1•stweedy•12m ago•1 comments

US population set to fall for first time in 100 years

https://www.ft.com/content/6073030f-fc0a-4e49-950f-9ec55ac6aeea
2•ViktorRay•12m ago•0 comments

Smarter Than Google

1•alexhr•12m ago•0 comments

Anthropic CEO asks new hires to tell rival companies why they turned them down

https://fortune.com/2026/12/01/anthropic-ceo-dario-amodei-asks-new-hires-tell-others-why-they-tur...
3•andsoitis•13m ago•0 comments

Why Pilots Reduce Speed Before Crossing into Oceanic Airspace

https://simpleflying.com/why-pilots-slow-oceanic-crossings/
1•Stratoscope•13m ago•0 comments