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

Oldest shipwreck found off coast of Turkey

https://www.bbc.com/news/articles/c6gr80rk1yyko
2•benbreen•2m ago•0 comments

What I Self-Host

https://viceconsole.fyi/blog/2026/10/10/what-i-self-host/
1•speckx•3m ago•0 comments

Shadow AI: the data leak hiding in your organisation's everyday tools

https://www.cyvra.com.br/insights/shadow-ai-risks-guide
1•hotelti•3m ago•0 comments

He linked Saudi Arabia to SV. Then OpenAI found a bug wrapped in toilet paper

https://www.ft.com/content/b71e0dc4-b190-49ec-b000-bd585054ddc8
1•thm•4m ago•0 comments

Use Hardware-Bound SSH Keys

https://muthanna.com/blog/posts/use-hardware-bound-ssh-keys.html
1•zeroxfe•5m ago•0 comments

Disrupting the service economy behind transnational cybercrime operations

https://blogs.microsoft.com/on-the-issues/2026/10/14/disrupting-the-service-economy-behind-transn...
2•ChrisArchitect•5m ago•0 comments

Almost everyone misunderstands Chrome extension manifest version 3

https://lapcatsoftware.com/articles/2026/10/4.html
1•ingve•6m ago•0 comments

Show HN: BitRun, 1-bit LLM runner on CPU (100T/s on Apple Silicon)

https://github.com/IshekKhal/bitrun
2•ishekofficial•7m ago•0 comments

Show HN: A faster WordPress core written in C/C++ (Live Demo)

https://bookpress.io/
1•squareys•8m ago•0 comments

Assessing AI agents at autonomous theoretical physics problem solving

https://arxiv.org/abs/2610.16733
1•jcfrei•9m ago•0 comments

Show HN: Instancez – Supabase-compatible back end in one container and YAML file

https://github.com/instancez/instancez
1•saedx1•9m ago•1 comments

AI Money Supercharges Semiconductor Research Labs

https://spectrum.ieee.org/semiconductor-research
1•rbanffy•9m ago•0 comments

More Money Than They Ever Imagined–and No Clue How to Spend It

https://www.wsj.com/tech/ai/ai-tech-anthropic-openai-ipo-0a9da59e
2•gmays•10m ago•0 comments

Show HN: I wrote an email app that accepts only one sender per inbox

https://clova.email/
3•edpin2000•11m ago•1 comments

Types of types: Haskell's Kind system

https://thunk.blog/posts/types-of-types-haskell-kind-system/
1•Thom2503•11m ago•0 comments

The G = 9 Gate – Fermion-Boson Transitions and Dark Matter

https://www.academia.edu/178962361/The_g_9_Gate_A_New_Theoretical_Hypothesis_on_Fermion_Boson_Tra...
1•kisnorbert•12m ago•0 comments

Windows 11 KB5127648 update fixes long-standing gaming issues

https://www.notebookcheck.net/Windows-11-KB5127648-update-fixes-long-standing-gaming-issues.14239...
1•DarrylLinington•12m ago•1 comments

GPT-2 on the GPU

https://www.stephendiehl.com/posts/mlir_gpu_target/
1•ibobev•12m ago•0 comments

Wanted to download an ISO, ended up writing a kernel exploit

https://blog.dfb.sh/blog/eap770-root-for-two-zeros/
1•0xbadcafebee•13m ago•0 comments

The $26,000-a-Month Eviction Fight at 150 Charles

https://www.curbed.com/article/150-charles-eviction-lawsuit-erica-terwillegar-peter-molinari.html
2•gmays•15m ago•0 comments

Two unvaccinated Pennsylvania residents die after being infected with measles

https://apnews.com/article/measles-deaths-pennsylvania-16c6c527c13e88ac3cdea57ffdbd2e19
5•gmays•15m ago•2 comments

Separating HBM from GPUs to Expand Memory Capacity; Optical Links May Be Key

https://www.trendforce.com/news/2026/05/25/news-industry-reportedly-eyes-separating-hbm-from-gpus...
2•peter_d_sherman•15m ago•0 comments

Why Entry-Level Tech Hiring Fell 65%: IRC Section 174 vs. AI Telemetry [video]

https://www.youtube.com/watch?v=cve5KMawu9M
2•GradeOne•16m ago•1 comments

Linus Torvalds's first LLM-assisted patch series

https://lwn.net/Articles/1100449/
4•janvdberg•17m ago•0 comments

Show HN: Aside – Mac app that suggests what to say next during calls

https://asidehq.app/
2•yoelgal•18m ago•0 comments

Has AI Tells

https://theconsensus.dev/blog/2026/10/14/has-ai-tells.html?focus=1
7•7777777phil•19m ago•0 comments

Ask HN: Are you hesitant to install vibe-coded apps?

3•ex-aws-dude•19m ago•2 comments

CoreWeave's Bonds Turn Distressed, Drawing 'Yikes' from Musk

https://www.bloomberg.com/news/articles/2026-10-14/coreweave-bonds-tumble-into-distress-drawing-y...
3•striking•19m ago•1 comments

Build Your Slide Template

https://martinfowler.com/articles/never-send-slides/build-your-slide-template.html
1•ibobev•19m ago•0 comments

AI, Slop, and Where I Draw the Line

https://retrogamecoders.com/ai-slop/
1•ibobev•20m ago•0 comments