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

PSBoomerang

https://github.com/thepolymatt/psboomerang
1•lucamark•45s ago•0 comments

Why Onions Have More DNA Than You Do

https://news.harvard.edu/gazette/story/2000/02/why-onions-have-more-dna-than-you-do/
1•ex-aws-dude•47s ago•0 comments

India Extends Pakistan Content Ban to First Netflix Series

https://www.bloomberg.com/news/articles/2026-11-27/india-extends-pakistan-content-ban-to-first-ne...
1•ryzvonusef•6m ago•0 comments

Novel Experiments Expand the Hunt for 'Ultralight' Dark Matter

https://www.quantamagazine.org/novel-experiments-expand-the-hunt-for-ultralight-dark-matter-20261...
1•titusblair•7m ago•0 comments

Teams Lock in Mission Architecture for NASA's SR-1 Freedom

https://www.nasa.gov/general/nasa-locks-in-sr1-freedom-mission-architecture/
1•titusblair•7m ago•0 comments

Pentagon Issued Memo Limiting 'Social Activities' with Canadian Military

https://www.nytimes.com/2026/11/21/world/canada/defense-department-canada-military-trump.html
1•cisc•12m ago•0 comments

Zero-egress ~0.04ms 6-layer deterministic firewall for AI agent payouts

1•owais_globoo•15m ago•0 comments

SolidCraft – Open-source parametric CAD built in Rust

https://solidcraft.io/
2•gregsadetsky•18m ago•0 comments

Garage v2.6.0 released with web admin, v1.x EOL and other news

https://garagehq.deuxfleurs.fr/blog/2026-11-webadmin-release/
1•birdculture•21m ago•0 comments

To Think or Not to Think: AI tools and the loss of engineering fundamentals

https://ristonthomas.com/essays/to_think_or_not_to_think/
2•paul_riston•21m ago•0 comments

Lock of George Washington's hair sold at auction for $4k

https://www.cbsnews.com/news/george-washington-lock-of-hair-auction/
1•extasetoi12•25m ago•0 comments

Cory Doctorow: Taylorism and AI's shared sales-pitch

https://pluralistic.net/2026/11/27/taylor-made/
1•catab•26m ago•0 comments

Self-hostable Sentry compatible issue tracker

https://kittytrace.com/
2•vpaulus•29m ago•0 comments

Wikipedia explainers lost a median 40% of views since 2022, biographies lost 9%

https://growtika.com/blog/wikipedia-traffic-study
4•Growtika•33m ago•0 comments

Changes to Word, Excel, and PowerPoint Agents in Microsoft Copilot

https://mc.merill.net/message/MC1536062
1•thunderbong•36m ago•0 comments

'The taste layer of the internet ': Reddit's COO on why AI needs humans

https://www.euronews.com/2026/11/26/the-taste-layer-of-the-internet-reddits-coo-on-why-ai-needs-h...
1•thm•37m ago•0 comments

Neon is not less "RL fried" than opponents

https://micjm.com/blog/neon-rl-fried/
1•seizethecheese•38m ago•0 comments

60,825 open problems. Point your agent at one

https://lefttosolve.com/
2•theanonymousone•40m ago•0 comments

AI labs sitting on 'bombshell' revelations, experts warn

https://www.theguardian.com/technology/2026/nov/28/ai-artificial-intelligence-encryption-global-c...
3•tempestn•41m ago•0 comments

Goodbye, World: The End of Programmers

https://www.wired.com/story/goodbye-world-the-end-of-programmers/
5•variety8675•44m ago•1 comments

MilleMiglia: A realistic instance generator for middle-mile logistics

https://research.google/blog/millemiglia-a-realistic-instance-generator-for-middle-mile-logistics/
1•devy•50m ago•1 comments

An Empty EV Tried to Park Itself 868 Times in One Night

https://insideevs.com/news/816535/self-driving-ev-parking-868/
1•cisc•55m ago•0 comments

Why AI is solving maths' hardest problems. Here's why you should care

https://news.sky.com/video/why-ai-is-solving-maths-hardest-problems-heres-why-you-should-care-136...
1•austinallegro•56m ago•0 comments

Nvidia and Kioxia 1.1PB SSD Memory Experiment Could Transform AI Infrastructure

https://www.gizmoweek.com/gpu-memory-nvme-ssds/
1•loog5566•1h ago•0 comments

Show HN: Locus – A fast Windows database client built with Rust and GPUI

https://github.com/sao-coding/locus
1•lwh-x•1h ago•0 comments

Building a better Dependabot with AI agents

https://cdm.dev/blog/better-dependabot/
1•cmackenzie1•1h ago•0 comments

It's never been more exhausting to buy stuff

https://www.theatlantic.com/technology/2026/08/online-shopping-inescapable/688254/
3•fortran77•1h ago•1 comments

A Best-in-Class iOS App: The Book Series

https://www.bestinclassiosapp.com/
1•todsacerdoti•1h ago•0 comments

FastLanes: Next-gen File Format [pdf]

https://research.vu.nl/files/447013431/afroozehphdthesis%20-%2069280d90f0bfd.pdf
2•todsacerdoti•1h ago•0 comments

Show HN: Sokak Lezzeti:Street Chef

2•hizlikovboy27•1h ago•0 comments