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

Is Trump's Push to Rename AI to Super Intelligence Part of a Bigger Conspiracy?

https://gizmodo.com/is-trumps-push-to-rename-ai-to-super-intelligence-part-of-some-bigger-conspir...
1•poopcat•54s ago•0 comments

Chernoff Face Cellular Automata

https://www.registeredhexoffenders.com/still_life/
1•MitPitt•1m ago•0 comments

Bologna Bottle

https://en.wikipedia.org/wiki/Bologna_bottle
1•_josh_meyer_•2m ago•0 comments

Gemini Replaces Google Assistant on Android

https://9to5google.com/2026/09/28/google-assistant-gemini-android/
1•iamben•3m ago•1 comments

Aurora PostgreSQL now supports direct query of Apache Iceberg and Parquet data

https://aws.amazon.com/blogs/aws/amazon-aurora-postgresql-now-supports-direct-querying-of-apache-...
1•swasheck•3m ago•0 comments

Government AI Chatbot Reprogrammed to Stop Fact-Checking President

https://newrepublic.com/post/216016/trump-rigs-americagov-ai-chatbot-fact-check-lies
1•worik•4m ago•0 comments

Agreeable Machines: a documented case of AI-reinforced delusion

https://cameronmpalmer.com/blog/agreeable-machines/
1•cameronmpalmer•8m ago•1 comments

Don't Use the "C-Word"

https://aeon.co/essays/we-need-a-better-way-to-describe-what-is-often-called-cancer
1•whiteblossom•8m ago•0 comments

Butterfly Effect

https://sheets.works/data-viz/butterfly-effect
1•gmays•10m ago•0 comments

America.gov goes crazy on "play Minecraft"

https://america.gov/chat
11•thoughtfullyso•10m ago•1 comments

US trade regulator opens investigation into AI giants

https://www.theguardian.com/us-news/2026/sep/30/ftc-investigation-anthropic-openai
1•UntitledNo4•10m ago•0 comments

EDG C++ front-end goes public

https://edgcpp.org/#transition
11•iandinwoodie•17m ago•3 comments

AI broke the job application. What replaces it?

https://news.ycombinator.com/submit
2•Betelbuddy•18m ago•0 comments

Show HN: Jamb AI - Voice Agents for Group Calls

https://twitter.com/sharat_sc/status/2100638882341486961
1•sharatsc•19m ago•0 comments

UAI – An open protocol for identity and accountability of AI agents

https://github.com/rodmontiel/uai
1•rodproof•20m ago•1 comments

Scopeswell

https://www.scopeswell.space/
1•corohanc•21m ago•0 comments

OpenAI delays IPO over AI safety concerns

https://arstechnica.com/ai/2026/09/openai-delays-ipo-over-ai-safety-concerns/
4•mplanchard•21m ago•0 comments

Have Another Drink! Govt sponsored study on alcohol doesn't stand up to scrutiny

1•ksymph•23m ago•1 comments

Meat Proxies

https://www.davidrevoy.com/article1176/meat-proxies
3•frizlab•25m ago•0 comments

Aho-Corasick Algorithm

https://compiler.club/aho-corasick/
3•birdculture•25m ago•0 comments

Body Awareness in Goffin's Cockatoos

https://www.nature.com/articles/s41598-026-57500-7
1•bryanrasmussen•26m ago•0 comments

Type_enforced: Fastest Python Runtime Type Enforcement

https://github.com/connor-makowski/type_enforced
1•conmak•26m ago•1 comments

Compile spreadsheets into standalone interactive TUIs

https://github.com/ralsina/sheety
1•nhatcher•28m ago•0 comments

Professor discovered lost medieval castle hiding inside a Victorian-era building

https://www.foxnews.com/travel/lost-medieval-castle-found-hiding-plain-sight-professor-spots-tell...
1•Vaslo•28m ago•0 comments

Show HN: Halv cut AI agent cost by 57.1% using Jev

https://halv.ai/blog/halv-swe-rebench-astra-42-pairs/
1•villaspedro•28m ago•0 comments

Framework Desktop with 192GB Ryzen AI Max 400 released for pre-order

https://frame.work/de/en/products/desktop-diy-amd-aimax400/configuration/new
3•mft_•31m ago•0 comments

Hanami, Why?: Introductions

https://aaronmallen.me/writing/hanami-why-introductions
2•ibobev•32m ago•0 comments

Open Source EDACrux EDA Toolchain Now at 1.0

https://edacrux.app/
1•martinfink•32m ago•0 comments

Branch Target Reuse: Spectre-v2 Attacks in JIT Engines

https://www.vusec.net/projects/btr/
2•ibobev•35m ago•0 comments

Ask HN: Ex-swe what part time did you pickup?

1•conqrr•35m ago•0 comments