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

Google Gemini Killed Perplexity AI

https://fatjoe.com/blog/perplexity-ai-stats/
1•mgh2•2m ago•0 comments

TackNote

https://tacknote.app/
1•TackNote•2m ago•0 comments

Convert ANY web page into a Sticky Note with my FREE Chrome extension

https://chromewebstore.google.com/detail/sticky-note-web-clipper-—/gniilbpapgommpalikcclpcnbcam...
1•taskloco_nyc•2m ago•0 comments

A fast, decentralized web crawler, indexer, and search engine in one Rust binary

https://splch.github.io/mycel/
1•splch•4m ago•0 comments

Is The Economist Always Wrong?

https://www.economist.com/interactive/finance-and-economics/2026/07/02/is-the-economist-always-wrong
1•nreece•8m ago•0 comments

Micro Stirling Mechanical Cryo-Cooler Teardown by Fraser(2023)

https://www.eevblog.com/forum/thermal-imaging/micro-stirling-mechanical-cryo-cooler-teardown-by-f...
1•pillars•9m ago•0 comments

Ask HN: Best Podcasts of 2026 [So Far]

1•AbstractH24•12m ago•0 comments

What if users start cloning SaaS using AI

1•mzubairtahir•12m ago•1 comments

Defending OpenClaw against indirect prompt injection

https://compsec.snu.ac.kr/blog/dualview
5•b2y•13m ago•0 comments

The Answer Citation Protocol (ACP)

https://ericstrate.com/the-answer-citation-protocol-acp-optimizing-web-architecture-for-token-eff...
1•ericstrate•14m ago•0 comments

Digital Signals Theory Book

https://brianmcfee.net/dstbook-site/content/intro.html
1•marvinborner•15m ago•0 comments

Chinese researchers just mapped human brain 478 times faster than an Nvidia A100

https://indianexpress.com/article/technology/tech-news-technology/how-chinese-researchers-just-ma...
1•ogi_ogi•17m ago•1 comments

Is wanting is the last thing for humanity to do

https://harshalgajjar.com/blog/deciding-is-the-diamond
2•DDDmatter•18m ago•0 comments

Show HN: I created a ninety second challenge for conversations that matter

https://www.AskPitch.com/duel
1•KashifNY•24m ago•0 comments

EU ADDW Driver Monitoring Mandate Takes Effect July 7, 2026

https://www.sectorjournalhq.com/news/EU_ADDW_Driver_Monitoring_Mandate_Takes_Effect_July_7_2026.html
1•goplayoutside•25m ago•1 comments

Ranked worst to best: 13 flavors of Pure Leaf iced tea

https://www.tastingtable.com/1866292/pure-leaf-iced-tea-flavors-ranked/
6•teleforce•27m ago•0 comments

Meta Now Lets Anyone Use Your Instagram Photos in AI Images–Unless You Opt Out

https://www.wired.com/story/meta-now-lets-anyone-use-your-instagram-photos-in-ai-images-unless-yo...
2•cdrnsf•28m ago•0 comments

Fagging

https://en.wikipedia.org/wiki/Fagging
4•thunderbong•35m ago•0 comments

Hundreds of staff at EY report bullying, racism and sexual harassment

https://www.theguardian.com/australia-news/2023/jul/27/ey-oceania-staff-bullying-racism-sexual-ha...
1•Alien1Being•38m ago•0 comments

Porting from Delphi to JavaScript, will unalive your blog from Delphi RSS Sites

https://delphinightmares.substack.com/p/porting-from-delphi-to-js-will-unalive
2•deeaceofbase•45m ago•1 comments

Show HN: FactIQ – a realtime econ+finance database for AI agents

https://github.com/defog-ai/factiq-plugin
1•rishsriv•46m ago•0 comments

Economics Nobel Prize 2025: Understanding Innovation-Driven Growth

https://visionias.in/blog/english/economics-nobel-prize-2025-understanding-innovation-driven-growth
1•akbarnama•48m ago•1 comments

We won $92,337 bug bounty using a single kernel 0-day

https://nebusec.ai/research/ionstack-part-2/
4•etenal•48m ago•1 comments

The Greatest Entrepreneurs in U.S. History, According to Business Historians

https://www.wsj.com/business/entrepreneurship/best-entrepreneurs-us-history-23c83c23
1•tzury•52m ago•0 comments

Meta says it's facing $1.4T in penalties in teen mental health case

https://nypost.com/2026/07/07/business/meta-says-its-facing-1-4t-in-penalties-in-teen-mental-heal...
8•NewCzech•52m ago•3 comments

ADHD Sticky Note productivity app because visualizing it WORKS

https://www.taskloco.com/
1•taskloco_nyc•55m ago•0 comments

Show HN: Ghostmeet – Self-hosted meeting transcription and summaries

https://ghostmeet.sshlab.dev/
2•swq115•58m ago•3 comments

LineageOS Statistics

https://stats.lineageos.org
1•pentagrama•58m ago•0 comments

How did Windows 95 decide that a setup program ran?

https://devblogs.microsoft.com/oldnewthing/20260707-00/?p=112508
2•soheilpro•1h ago•0 comments

Multigres Supports Listen/Notify Across Pooled Connections

https://multigres.com/blog/listen-notify
1•kiwicopple•1h ago•0 comments