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

OpenAI tricked me into switching to a business account

1•probolsky•55s ago•0 comments

Why Do We Need Human Anything Anymore?

https://poshenloh.com/posts/20260919-math-ai
1•nopinsight•55s ago•0 comments

Catching Crumbs from the Table [pdf]

https://gwern.net/doc/fiction/science-fiction/2000-chiang.pdf
2•qingcharles•4m ago•0 comments

EU drops sponsorship of disinformation conference at Trump officials' request

https://www.theguardian.com/us-news/2026/oct/07/trump-eu-disinformation-conference
4•rdmuser•9m ago•0 comments

Why Isn't the Industry Freaking Out About DeepSeek 4.1 Flash?

https://www.dgt.is/blog/2026-10-07-deepseek-freek-out/
3•jonotime•14m ago•0 comments

Zpu

https://github.com/zylin/zpu
3•kristianpaul•14m ago•0 comments

AI cluster networking reading list: RDMA, collectives, fabrics

https://github.com/Rewsr/unawesome-ai-fabric-engineering
4•rewsiest•14m ago•0 comments

How to "Tell It Like It Is" More Effectively

https://mgrebler.substack.com/p/how-to-tell-it-like-it-is-more-effectively
3•mgrebler•19m ago•0 comments

Hackers hijack Google domains after breaching ccTLD registries

https://www.bleepingcomputer.com/news/security/hackers-hijack-google-domains-after-breaching-cctl...
4•sbulaev•22m ago•0 comments

100 days later: Microsoft still steers Windows and Copilot users to Edge

https://blog.mozilla.org/en/mozilla/over-the-edge-2-100-days-later/
5•thimabi•22m ago•1 comments

Bold AI developer takes aim at Adobe with open source clones

https://arstechnica.com/ai/2026/10/software-is-over-bold-ai-developer-takes-aim-at-adobe-with-ope...
4•pseudolus•22m ago•0 comments

AHM Statement on OpenAI's October 6 Release of Mathematical Documents

https://terrytao.wordpress.com/2026/10/07/ahm-statement-on-openais-october-6-release-of-mathemati...
3•smilelamp•24m ago•1 comments

Amazon employees hit by fresh job cuts across several teams

https://www.businessinsider.com/amazon-layoffs-hit-hundreds-of-employees-across-multiple-teams-20...
4•christhecaribou•25m ago•0 comments

Possible plague death at a Siberian lab baffles scientists

https://www.science.org/content/article/possible-plague-death-siberian-lab-baffles-scientists
1•doener•26m ago•0 comments

Learning cardiac dynamics via action-conditioned JEPAs

https://arxiv.org/abs/2604.22618
1•brandonb•29m ago•0 comments

What is the actual percentage of people For and Against AI?

4•Zeruxe•33m ago•13 comments

Goose: Safer, faster and <memory than Rust/C++ for algos where flat data matters

https://github.com/aardappel/goose/blob/master/README.md
4•bobbydigitales•35m ago•1 comments

Priceline to face FTC action over deceptive hotel ads

https://www.reuters.com/world/priceline-owner-face-ftc-action-over-affiliates-hotel-ads-sources-s...
3•JumpCrisscross•37m ago•0 comments

Neural Dynamics as the Composition of Quantized Units

https://arxiv.org/abs/2609.32487
1•brandonb•38m ago•0 comments

Map of USENET in 1986

https://twitter.com/0xtechnexus/status/2107954052927746241
2•bigwheels•41m ago•0 comments

BizGap – Automated lead generation from Google Maps

https://www.bizgap.online/
1•flaviorodrigues•42m ago•0 comments

Opentunnel – public URLs for anything running on your machine

https://opentunnel.xyz/
2•2bluesc•44m ago•0 comments

California wine glut sends premium bottles to Costco, others

https://www.latimes.com/business/story/2026-10-07/california-wine-glut-sends-premium-bottles-to-c...
2•brandonb•45m ago•1 comments

Kelly's AI Tax Bill Struggles to Link Tech with Economic Harms

https://news.bloombergtax.com/tax-insights-and-commentary/kellys-ai-tax-bill-struggles-to-link-te...
3•tldrthelaw•46m ago•0 comments

TXT DNS for Dns.google Contains a Google DNS Xkcd

https://dns.google/query?name=dns.google&rr_type=TXT
2•DoctorOW•48m ago•0 comments

I built a ridiculous game to test decision models vs. 9 LLMs

https://sausagebattlefield.made-by-benny.com/casestudy/
1•bennyr•50m ago•0 comments

Software developers are not okay [video]

https://www.youtube.com/watch?v=KsEpW03gxKg
3•sajithdilshan•51m ago•0 comments

Inner Loops: A Sourcebook for Fast 32-Bit Software Design by Rick Booth (1997)

https://www.amazon.com/dp/0201479605
3•peter_d_sherman•52m ago•0 comments

Mounting Proton Drive in Linux Like in Other OS's

https://oss.lsantos.dev/proton-drive-linux-fs/
1•khaosdoctor•53m ago•1 comments

Competitive and tiny decision model from Danger Labs

https://huggingface.co/DangerLabs/dm-jepa-1.5
1•DennisAleynikov•54m ago•2 comments