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

Vircon32 Games: 93 free homebrew titles, playable in the browser

https://vircon32.joyrider3774.xyz/
1•carra•1m ago•1 comments

Show HN: Syncle – Sync Postgres, MySQL, SQLite, MongoDB and Redis to Each Other

https://syncle.dev
1•osmanahmadxai•4m ago•0 comments

Radio Setup That Tracks Nearby Cars via Tire Sensors

https://github.com/merbanan/rtl_433
1•CGMthrowaway•4m ago•0 comments

I built a multiplayer version of the 4,500-year-old Royal Game of Ur

https://royalgameofur.app
3•potentdream•6m ago•0 comments

(Parody, A.I.) Neighbor Sun-Bathing Nude [Oklahoma]

https://archive.org/details/oklahoma-governor-dhs-secretary-jokes-1
1•OkieSmokie3•7m ago•0 comments

AWS to acquire DuckLabs, the Amsterdam-based company behind DuckDB

https://www.aboutamazon.com/news/company-news/aws-ducklabs
2•saganus•8m ago•0 comments

Principle Driven Development

https://principledriven.dev/
2•bushido•8m ago•0 comments

NIH wants to shroud peer review scores. Here's what you can do about it

https://27unihted.substack.com/p/nih-wants-to-shroud-peer-review-scores
2•SubiculumCode•9m ago•0 comments

Kalshi bans ex-Congressman for life concluding he likely was insider trading

https://apnews.com/article/kalshi-george-santos-lifetime-ban-c8ac3e25aec55cd5509485a84f79f9e0
2•theanonymousone•9m ago•0 comments

Re-engineering Apache Airflow for speed and scale

https://www.astronomer.io/blog/astro-airflow-re-engineered-for-speed-and-scale/
2•jlaneve•10m ago•0 comments

How an MIT research project became a global programming language

https://news.mit.edu/2026/how-mit-research-project-became-global-programming-language-0831
2•markkitti•12m ago•1 comments

Fake Logos

https://github.com/pigment/fake-logos
1•opengrass•13m ago•0 comments

Agentic/Human Contractor distributed marketplace

1•godcreatebugs•14m ago•0 comments

Swiss nuclear plant back online after heatwaves

https://sg.news.yahoo.com/swiss-nuclear-plant-fully-back-123711589.html
1•leonidasrup•14m ago•0 comments

VibeCoded AI-Slop License v1.0

https://gist.github.com/NicolasCARPi/3fd349ed1ed52ae6b835d5364cda4cd6
2•birdculture•16m ago•0 comments

A walkable ASCII cyberpunk city in one HTML file [video]

https://www.youtube.com/watch?v=3YtygAx_C6A
8•keithcarolus•17m ago•3 comments

From poop to plants, how wolves help blueberries grow and spread in Minnesota

https://www.mprnews.org/story/2026/08/30/how-wolves-help-blueberries-grow-and-spread-in-northern-...
1•rznicolet•17m ago•0 comments

Whatareyoubuilding.ai – indie builder and AI product directory

https://whatareyoubuilding.ai/
1•ilreb•19m ago•0 comments

FTC to File Lawsuit Alleging Amazon Deceived Advertisers

https://www.wsj.com/tech/ftc-to-file-lawsuit-alleging-amazon-deceived-advertisers-d71039ee
1•uxhacker•19m ago•0 comments

Is your Shopify store visible to ChatGPT? A free AI-visibility scanner

https://rankinai.surge.sh/
1•geo_signal•19m ago•0 comments

The Anatomy of a U.S. Presidential Motorcade

https://people.howstuffworks.com/presidential-motorcade.htm
2•thunderbong•20m ago•0 comments

Airlink planes fly remarkably low over DHL Stadium before Springboks game

https://www.capetownetc.com/news/watch-airlink-planes-fly-remarkably-low-over-dhl-stadium-before-...
1•tevrede•21m ago•0 comments

Bankers: EU must tap trillions of euros in private savings to keep up w US/China

https://www.reuters.com/world/china/eu-must-tap-trillions-euros-private-savings-keep-up-with-us-c...
1•CGMthrowaway•23m ago•2 comments

LLM tokens aren't the new dollars

https://avaprotocol.org/blog/tokens-arent-the-new-dollars
1•kezjo•24m ago•0 comments

Tailcat

https://tailscale.com/blog/tailcat
2•0xedb•24m ago•0 comments

How cooked are you from vibecoding?

https://codeset.ai/fried
1•Nfsaavedra•25m ago•1 comments

Apple CEO Tim Cook's Legacy Is Dull Products and Spineless Capitulation

https://karlbode.com/apple-ceo-tim-cooks-legacy-is-dull-products-and-spineless-capitulation/
4•HotGarbage•26m ago•2 comments

The safest job from AI may be writing

http://muratbuffalo.blogspot.com/2026/08/the-safest-job-from-ai-may-be-writing.html
22•ilreb•26m ago•13 comments

Show HN: 10x token savings for AI Web Scraping

https://www.makralabs.org/about
2•ritsource•27m ago•0 comments

TimesFM-3: A zero-shot foundation model for multivariate forecasting

https://research.google/blog/timesfm-3-a-zero-shot-foundation-model-for-multivariate-forecasting/
2•xnx•28m ago•0 comments