frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

The Orchard Counterfeiting Vulnerability

https://forum.zcashcommunity.com/t/the-orchard-counterfeiting-vulnerability-and-next-steps/56015
1•hggh•1m ago•0 comments

Food for Agile Thought #547: AI's 1997 Internet Moment, Code Isn't Product

https://age-of-product.com/food-agile-thought-547-ais-1997-internet-moment/
1•swolpers•2m ago•0 comments

Ask HN: How do you solve cold start on a three-sided 3d printing marketplace?

1•pixelcadet•3m ago•0 comments

Attribution in the Browser: Who Benefits from Mozilla/Google/Meta's Ad Standard

https://jamesoclaire.com/2026/06/05/attribution-in-the-browser-who-really-benefits-from-google-an...
1•ddxv•3m ago•1 comments

Ask HN: How are you guys auditing your Parquet file layouts for metadata bloat?

1•allaboutdata•4m ago•0 comments

Supabase Skills to run your business ops

https://github.com/SkeneTechnologies/skene/tree/main/skills
1•teemuki•7m ago•0 comments

AI technology is nearing a point where it could develop without human input

https://www.bbc.com/news/articles/cx2124z7g45o
1•reconnecting•9m ago•0 comments

Changing How We Develop Ladybird

https://ladybird.org/posts/changing-how-we-develop-ladybird/
2•EdwinHoksberg•10m ago•0 comments

The ancient US discovery predating the pyramids

https://www.bbc.com/travel/article/20260223-the-ancient-us-discovery-predating-the-pyramids
1•thunderbong•12m ago•0 comments

Lee Kuan Yew's Singapore Story

https://www.historytoday.com/archive/feature/lee-kuan-yews-singapore-story
2•pepys•12m ago•0 comments

Create a blog post series with navigation in Jekyll

https://opensource.com/article/22/4/blog-series-navigation-jekyll
1•ankitg12•14m ago•0 comments

Online Safety Regulation Increases Privacy Risk

https://arxiv.org/abs/2606.05273
1•50kIters•15m ago•0 comments

$100 to a Debian Developer who helps Assertables Rust testing for Debian

1•jph•16m ago•0 comments

Ask HN: Is Claude Code down, or its just my region?

2•codetiger•19m ago•1 comments

Dense Contexts Are Hard: Lexical Density Limits LLM Context Windows

https://arxiv.org/abs/2606.06203
1•sbulaev•25m ago•0 comments

Pi: A coding agent for engineers who own their tools

https://alexander.holbreich.org/posts/2026/pi-coding-agent/
4•aholbreich•31m ago•0 comments

New SoTA open source TTS model from Boson AI

https://huggingface.co/bosonai/higgs-audio-v3-tts-4b
3•silinmeng•34m ago•0 comments

There's no escaping it: an exploration of ANSI codes

https://blog.safia.rocks/2025/12/22/ansi-codes/
2•ankitg12•34m ago•0 comments

ChibiRuby is a pure C# implementation of the mruby virtual machine

https://github.com/hadashiA/ChibiRuby
1•iroha1203•34m ago•0 comments

The AI IPO Race Heats Up, DOGE Whistleblower Sues Elon Musk, and Instagram Gets

https://www.wired.com/story/uncanny-valley-podcast-ai-ipo-race-elon-musk-doge-whistleblower-insta...
2•joozio•35m ago•1 comments

Arc Fusion Power Plant Physics Basis

https://www.cambridge.org/core/journals/journal-of-plasma-physics/collections/arc-fusion-power-pl...
1•mpweiher•35m ago•0 comments

Tmux Animations

https://github.com/jonaburg/tmux-animated
1•jonaburg•38m ago•1 comments

AI Optimists Race Clock; Skeptics Race Decay

https://charitydotwtf.substack.com/p/ai-enthusiasts-are-in-a-race-against
1•signa11•41m ago•0 comments

ZEC drops 30% after Anthropic AI finds Zcash counterfeit vulnerability

https://www.tradingview.com/news/cointelegraph:52f56f35b094b:0-zec-drops-30-after-anthropic-ai-fi...
4•olalonde•44m ago•0 comments

Show HN: I built my own solution to manage clients because it's got too messy

https://relysta.com
2•preetsuthar17•45m ago•1 comments

Pre-Pooping Your Pants with Rust (2015)

https://faultlore.com/blah/everyone-poops/
1•signa11•46m ago•0 comments

Xteink X4 – Magnetic Ready, Ultra-Thin Paper-Like EReader

https://www.xteink.com/
2•janandonly•46m ago•0 comments

The network redesign that led AWS to forge a more resilient cloud

https://www.aboutamazon.com/stories/aws-random-graph-theory-data-center-network-design
1•tiborhercz•48m ago•0 comments

Show HN: Snill.ai launched – describe your biz – get an internal app in seconds

https://snill.ai/
1•kna63636•48m ago•0 comments

Running an AI-native engineering org

https://claude.com/blog/running-an-ai-native-engineering-org
1•kiyanwang•54m ago•0 comments