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

Control Charts Make AI Agents Cheaper, Less Necessary, and More Useful

https://newoldweb.com/control-charts-make-ai-agents-less-necessary-and-more-useful
1•netaustin•36s ago•0 comments

My friends all hate AI; I just joined an AI startup

https://www.fast.ai/posts/2026-08-18-returning-to-AI/
1•eamag•1m ago•0 comments

New Amiga logo looks aesthetically well-composed

https://www.reddit.com/r/amiga/comments/1vr5jqi/new_amiga_logo_looks_aesthetically_very/
1•doener•2m ago•0 comments

US tech stock correction likely, warn ECB economists

https://www.ft.com/content/cb4b22ab-4183-4d19-be60-6d2fab86d86d
1•aanet•2m ago•1 comments

Haxy is a Git alternative that stores metadata (issues, PRs etc.) in the repo

https://github.com/xit-vcs/haxy
1•nafey•2m ago•0 comments

Run Qwen locally on Windows and use it remotely from any device

https://www.hiramdeals.com/blog/host-qwen-privately-windows
1•hiramwen•4m ago•1 comments

Foreign psyops campaign targeting American consumer AI (2025)

https://www.ynetnews.com/tech-and-digital/article/rj00kxqzaxx
1•nervai•4m ago•0 comments

What rising Treasury yields are telling us

https://www.axios.com/2026/08/17/treasury-yields-warsh-bonds
1•toomuchtodo•7m ago•0 comments

An interactive display stack explaining optical bonding

https://designshippers.com/work/laminated-display-stack.html
1•krm01•9m ago•0 comments

OS Development Wiki

https://wiki.osdev.org/Expanded_Main_Page
1•pykello•9m ago•0 comments

Show HN: I made a 3D Globe platform to promote your startup based on your MRR

https://mrrglo.be
1•sc4p1n•10m ago•0 comments

OpenAI's autonomous hackers and the newsroom revolt of 2020

https://muddy.jprs.me/posts/2026-08-16-the-agents-discovered-slack/
1•jprs•11m ago•0 comments

There's a Libcurl.dll in My System32

https://daniel.haxx.se/blog/2026/08/17/theres-a-libcurl-dll-in-my-system32/
1•chmaynard•11m ago•0 comments

EY turning internships into yearlong residencies as AI changes entry-level work

https://www.businessinsider.com/ey-internship-residency-career-ai-skills-2026-8
1•petethomas•12m ago•0 comments

It Is Past Time for You to Quit Elon Musk's X

https://publiccomment.blog/p/it-is-past-time-for-you-to-quit-elon-musk-s-x
5•jjoachim3•12m ago•1 comments

Vitol Won Exclusive Fuel Deals to Dominate Africa – At a Cost

https://www.bloomberg.com/news/features/2026-08-17/vitol-won-exclusive-fuel-deals-to-dominate-afr...
1•petethomas•15m ago•0 comments

Could Beowulf See Blue?

https://www.deadlanguagesociety.com/p/history-english-colour-words
3•gherkinnn•16m ago•0 comments

Built a free Irish sport TV listings site

https://sportontvireland.ie/about
1•cf100clunk•17m ago•1 comments

Show HN: A blockchain that proves instead of storing

https://github.com/ignotusnemo/parano1d
1•ignotusnemo•18m ago•0 comments

[pre-RFC] Alloy formalization of LLVM IR's concurrent memory model

https://discourse.llvm.org/t/pre-rfc-alloy-formalization-of-llvm-irs-concurrent-memory-model/91590
1•matt_d•18m ago•0 comments

Ask HN: Is there a shortage of talent at early-stage deep-tech startups?

1•misterballer•19m ago•0 comments

Paramount Wants $1.88B Bond from States, Writers Challenging Warner Deal

https://www.wsj.com/business/media/paramount-wants-states-writers-challenging-warner-deal-to-post...
1•mudil•20m ago•0 comments

Anthropic tells investors annualized revenue run rate climbed to $65B in July

https://www.cnbc.com/2026/08/17/anthropic-says-annualized-revenue-climbed-to-65-billion-in-july.html
2•victor106•21m ago•0 comments

Where the Compiler Stops

https://blog.bencope.land/where-the-compiler-stops/
1•mooreds•21m ago•0 comments

Instagram Fuente: Instagram HTTPS://share.google/ERvOAXdq1l73mASFG

1•emilialopesfern•22m ago•0 comments

Token-in-token-out RL training with any agent harness, via a proxy gateway

https://castform.com/blog/harbor/
2•kumama•23m ago•0 comments

Show HN: Encrypted Git Remote Server

https://ghostfork.io
1•neerajmurarka•29m ago•0 comments

Archive of Archives

https://archiveofarchives.com/
2•rdmuser•32m ago•1 comments

Why 4K Blu-ray always beats 4K streaming for picture quality

https://www.engadget.com/2237552/why-4k-blu-ray-better-quality-than-streaming/
3•bookofjoe•34m ago•2 comments

Talk – a public live text stream with no message history

https://talk.sekura.world
2•atakz•34m ago•1 comments