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

Skorpion OS – AI-Powered Linux Distribution

https://skossyte.pages.dev/english
1•indigodaddy•1m ago•0 comments

Show HN: Aether Summon – A New TCG

https://gamefound.com/en/projects/aether-summon/aether-summon
1•hnedeotes•2m ago•0 comments

2968 OSS RL EVs by CI

1•alternateman•3m ago•0 comments

Tx.taxi: I forked mempool.space, but for (soon-to-be) every blockchain

https://tx.taxi/
1•slithering•4m ago•1 comments

From Holy Water to Frozen Meals: The Evolution of Vending Machines

https://www.saturdayeveningpost.com/2026/09/from-holy-water-to-frozen-meals-the-evolution-of-vend...
1•ohjeez•5m ago•0 comments

Are Weighted Blankets Beneficial?

https://economist.com/science-and-technology/2026/09/25/are-weighted-blankets-really-beneficial
1•andsoitis•5m ago•0 comments

What did AI researchers think at the end of 2024?

https://www.lesswrong.com/posts/62j5mPY8pFo2GD5fo/what-did-ai-researchers-think-at-the-end-of-2024-1
1•joozio•5m ago•0 comments

Show HN: Spivak's Calculus formalized in Lean 4 – every theorem, every problem

https://github.com/stormj-UH/spivak-lean
1•jsLavaGoat•6m ago•0 comments

Aulico: Free TradingView Alternative

https://www.aulico.com
1•rendernos•6m ago•0 comments

Robust De-Anonymization of Large Sparse Datasets [pdf]

https://www.cs.cornell.edu/~shmat/shmat_oak08netflix.pdf
1•andsoitis•7m ago•0 comments

Ask HN: How do you get your hands on physics environments for your robotics SIM?

1•baigy•10m ago•1 comments

OpenAI's Rogue A.I. Agents Tried to Trick a Robot Detector

https://www.nytimes.com/2026/09/25/technology/openai-hugging-face-hack.html
1•wglb•11m ago•0 comments

How fast can you fix a UTF-16 string in C#?

https://lemire.me/blog/2026/09/26/how-fast-can-you-fix-a-utf-16-string-in-c/
2•smilelamp•12m ago•0 comments

Nix pull request: Add builtins.wasm

https://github.com/NixOS/nix/pull/15380
2•poly2it•14m ago•0 comments

We benchmarked our prompt-injection detector against OWASP's LLM Top

https://www.cerbereag.site/blog/detecting-prompt-injection-in-production
1•Dikesa_27•15m ago•0 comments

What Happens if the A.I. Bubble Bursts

https://www.nytimes.com/2026/09/26/opinion/ai-bubble-banking-crisis-too-big-to-fail.html
2•jbegley•16m ago•0 comments

NASA's Nancy Grace Roman Space Telescope Set to Explore the Universe

https://www.abc.net.au/news/science/2026-08-28/nancy-grace-roman-space-telescope-is-about-to-laun...
2•CharlesW•17m ago•0 comments

Font where each token is equal-width

https://twitter.com/amplifiedamp/status/2103535129503383700
1•ampdot•17m ago•0 comments

Show HN: StarSkirmish, an arena where LLMs create StarCraft Brood War bots

https://starskirmish.com/bench/
2•__cayenne__•17m ago•0 comments

Show HN: Read while you listen to your Audiobooks

https://hushbook.app/
1•adityawastaken•18m ago•1 comments

Newly Discovered Neo Asteroid 2026 SA8 Close but Safe Approach

https://www.astrophyzix.com/2026/09/asteroid-2026SA8-approach.html
1•UniverseToday•19m ago•0 comments

What Is Jev AI? A Practical Guide to System One and Executable Decisions

https://huggingface.co/blog/sora-2/what-is-jev-ai-a-practical-guide-to-system-one-and
1•Anon84•20m ago•0 comments

US jury says Apple owes record $5.7B in haptic technology patent case

https://www.reuters.com/legal/litigation/us-jury-says-apple-owes-record-57-billion-haptic-technol...
3•onemoresoop•20m ago•2 comments

Mental Clarity

https://rozumem.xyz/posts/20
1•rozumem•21m ago•0 comments

I run the message board an AI swarm improvised to hack Hugging Face– in the open

https://thefomite.com/dispatch/2026-09-15-the-room-the-swarm-improvised
1•bryaninbangkok•23m ago•0 comments

Using Prometheus and OpenTelemetry together is getting easier

https://prometheus.io/blog/2026/09/21/otel-prometheus-interoperability-survey/
1•yashdotrv•25m ago•0 comments

Extracting and Characterizing Hidden Chain-of-Thought

https://interestingengineering.substack.com/p/reasoning-in-plain-sight
1•archibaldJ•25m ago•0 comments

How to win a beer with high-dimensional statistics

https://jamiesimon.io/blog/how-to-win-a-beer-with-high-dimensional-statistics/
1•jamie-simon•26m ago•0 comments

How do I rekindle my motivation for earning my PhD?

https://www.nature.com/articles/d41586-026-02563-9
1•bookofjoe•26m ago•1 comments

The Quickest Path to a Diff

https://christophermeiklejohn.com/ai/zabriskie/agents/reliability/performance/distributed/2026/09...
1•aray07•27m ago•0 comments