frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•11mo 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•11mo 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•11mo 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 Zig project's rationale for their firm anti-AI contribution policy

https://simonwillison.net/2026/Apr/30/zig-anti-ai/
1•lumpa•47s ago•0 comments

Elon Musk's worst enemy in court is Elon Musk

https://www.theverge.com/tech/921022/elon-musk-cross-openai-altman
1•granzymes•54s ago•0 comments

The Lightening of Intent

https://aneeshsathe.substack.com/p/the-lightening-of-intent
1•boredgargoyle•1m ago•0 comments

Generation Alpha

https://en.wikipedia.org/wiki/Generation_Alpha
1•keepamovin•7m ago•0 comments

Musk Says He 'Was a Fool' to Provide OpenAI's Early Funding

https://www.nytimes.com/2026/04/29/technology/musk-openai-trial-altman.html
2•1vuio0pswjnm7•7m ago•0 comments

Musk casts himself as AI's good guy in testimony vs. OpenAI

https://www.axios.com/2026/04/30/musk-openai-safety-grok
2•1vuio0pswjnm7•8m ago•0 comments

7-Zip 26.01 (7zip) – A free file archiver for high compression

https://sourceforge.net/p/sevenzip/discussion/45797/thread/555e132ba4/
1•neustradamus•10m ago•0 comments

FDA alleges 'manipulated' data supported approval of Amgen's autoimmune drug

https://www.biospace.com/fda/fda-alleges-manipulated-data-supported-approval-of-amgens-autoimmune...
2•randycupertino•14m ago•1 comments

Zulip 12.0 Released

https://blog.zulip.com/2026/04/27/zulip-12-0-released/
2•tabbott•15m ago•0 comments

Wanman: Open-source agent matrix network with JSON-RPC communications

https://github.com/chekusu/wanman/
2•imWildCat•22m ago•0 comments

Open-source briefing packets and citizen-action toolkits

https://github.com/ClosedNetwork/closed-network-flock-resources
2•pkaeding•22m ago•0 comments

Copilot Student GPT-5.3-Codex removal from model picker

https://github.blog/changelog/2026-04-27-copilot-student-gpt-5-3-codex-removal-from-model-picker/
1•aaronsung•24m ago•1 comments

AInvest

https://www.ainvest.com
2•Yang_Ruichen•25m ago•0 comments

Show HN: Agent that refuses to run commands without human approval

https://github.com/few-sh/fewshell
2•hexer303•26m ago•0 comments

Microsoft lifts 2026 AI spend by $25B to cover component price rises

https://www.theregister.com/2026/04/30/microsoft_q3_2026/
4•omer_k•28m ago•0 comments

A Grounded Conceptual Model for Ownership Types in Rust

https://cacm.acm.org/research-highlights/a-grounded-conceptual-model-for-ownership-types-in-rust/
4•tkhattra•29m ago•0 comments

Have You Seen the New Excel?

https://idiallo.com/blog/have-you-seen-the-new-xl-ai-parody
3•jnord•30m ago•0 comments

Neural similarity predicts whether strangers become friends

https://www.nature.com/articles/s41562-025-02266-7#Sec2
2•E-Reverance•31m ago•0 comments

Craig Venter has died

https://www.jcvi.org/media-center/j-craig-venter-genomics-pioneer-and-founder-jcvi-and-diploid-ge...
29•rdl•31m ago•6 comments

On the stand, Elon Musk can't escape his own tweets

https://techcrunch.com/2026/04/29/on-the-stand-elon-musk-cant-escape-his-own-tweets/
3•jnord•31m ago•0 comments

The feed doesn't know you, and YouTube refuses to let you browse

https://evilgeniuslabs.ca/blog/the-feed-doesnt-know-you
2•paulpauper•35m ago•0 comments

We Don't Know How A.I. Works. That's a Problem

https://www.nytimes.com/2026/04/15/magazine/ai-black-box-interpretability-research.html
2•lxm•35m ago•0 comments

When a tornado hits after US Government mass-deploy auto kill-switch

https://twitter.com/gatlin_didier/status/2049617318112534743
2•egberts1•43m ago•0 comments

Failed AI tractor company lays off all employees, abandons Bay Area headquarters

https://www.sfgate.com/tech/article/monarch-ai-tractor-failure-22183476.php
5•randycupertino•45m ago•0 comments

Show HN: WorkProof – JSON schema for skill evidence graphs

https://github.com/TalentProof/workproof-schema
2•parth4•48m ago•0 comments

Botfiles: Dotfiles-esque setup for Managing Agents

https://twitter.com/curious_queue/status/2049660997993152855
2•sourya4•50m ago•1 comments

Zwift buys Rouvy in shake-up of indoor cycling

https://www.bikeradar.com/news/zwift-buys-rouvy-in-massive-shake-up-of-indoor-cycling
3•obilgic•54m ago•0 comments

Claude.ai and API Unavailable

https://status.claude.com/incidents/2gf1jpyty350
85•rob•55m ago•74 comments

Claude.ai Down Again?

16•zh_code•55m ago•14 comments

45% of Hostile Bot Traffic Passes Your WAF. Here's Why

https://botconduct.org/waf-baypass-45-percent/
2•botconduct•56m ago•0 comments