frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•11mo 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•11mo 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•11mo 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).

Onion Futures Act

https://en.wikipedia.org/wiki/Onion_Futures_Act
1•xvirk•1m ago•0 comments

Ask HN: How do you show your free software projects to the world?

1•MaxwellJensen•4m ago•1 comments

AI for Teams: Team-in-the-Loop

https://jitera.com/blog/team-in-the-loop/
2•jitera•5m ago•0 comments

Training language models to be warm can reduce accuracy and increase sycophancy

https://www.nature.com/articles/s41586-026-10410-0
1•Anon84•8m ago•0 comments

Australian police officers can be tracked via taser and body-cam bluetooth

https://www.abc.net.au/news/2026-05-04/police-location-tracked-bluetooth-flaw-axon-tasers-bodycam...
1•satori99•9m ago•0 comments

How A.I. Is Transforming China's Entertainment Industry

https://www.nytimes.com/2026/05/03/world/asia/china-microdrama-ai-backlash.html
2•Markoff•10m ago•1 comments

Duralang – decorator makes every LangChain LLM/tool/MCP call a Temporal Activity

https://temporal.io/code-exchange/duralang-durable-stochastic-ai-agents-with-one-decorator
1•deepanshsaxena•10m ago•0 comments

Most Companies Aren't Anywhere Near Ready for AI

https://danielmiessler.com/blog/most-companies-arent-ready-for-ai
1•rmason•13m ago•0 comments

WolfCOSE: Zero alloc, PQC, MISRA-C, FIPS 140-3 built with wolfCrypt

https://github.com/aidangarske/wolfCOSE
1•aidangarske•15m ago•0 comments

Performance of a large language model on the reasoning tasks of a physician

https://www.science.org/doi/10.1126/science.adz4433
1•kakoni•19m ago•1 comments

Llama.ttf: a font file which is also a large language model and inference engine

https://fuglede.github.io/llama.ttf/
1•smitec•22m ago•0 comments

Show HN: HypergraphZ – A Hypergraph Implementation in Zig

https://github.com/yamafaktory/hypergraphz
1•yamafaktory•23m ago•0 comments

Erm: A Local CLI That Strips Ums, Uhs, and Erms from Speech

https://doug.sh/posts/erm-a-local-cli-that-strips-ums-uhs-and-erms-from-speech/
1•dougcalobrisi•24m ago•0 comments

Show HN: Interpretable AutoResearch – Legible Agent Workflows

https://github.com/BarishNamazov/interpretable-autoresearch
2•barishnamazov•25m ago•0 comments

Bose SoundTouch Cloud Replacement

https://github.com/gesellix/Bose-SoundTouch
1•gesellix•31m ago•1 comments

My Agent Memory Library Helps Write Indie Articles

https://benemson.com/blog/agents/my-agent-memory-library-helps-write-indie-articles
1•emson•32m ago•2 comments

Skin Trackers – S&P-style indices for the CS2 skin market

https://skintrackers.com/en
1•Jorgin_•33m ago•1 comments

Urban Birds Are Rising Earlier Because of Traffic Noise (2013)

https://www.audubon.org/news/urban-birds-are-rising-earlier-because-traffic-noise
2•thunderbong•38m ago•0 comments

Technical Founders Misread Adoption

https://avelino.run/technical-founders-misread-adoption-rogers-pix/
2•rafaepta•40m ago•0 comments

WolfTPM TPM 2.0 Library Now Supports PQC Mldsa and Mlkem

https://www.wolfssl.com/wolftpm-add-tpm-2-0-v1-85-pqc-post-quantum-support/
1•aidangarske•44m ago•0 comments

Roger Penrose – Why Intelligence Is Not a Computational Process (2025)

https://www.youtube.com/watch?v=iTVN6tFknCg
2•weitzj•46m ago•0 comments

Claude Code Leak: 8100 Takedown Requests and the Birth of Claw-Code

https://www.heise.de/en/news/Claude-Code-Leak-8100-Takedown-Requests-and-the-Birth-of-Claw-Code-1...
2•smartmic•49m ago•0 comments

Professor's bold prediction: AI could help cure all diseases within a decade

https://excitech.media/p/professors-bold-prediction-ai-could
1•sminchev•51m ago•0 comments

One Interface for Everything

https://letsbuildsomething.substack.com/p/one-interface-for-everything
1•iancutzul•51m ago•0 comments

Only Law Can Prevent Extinction

https://www.lesswrong.com/posts/5CfBDiQNg9upfipWk/only-law-can-prevent-extinction
1•lumenwrites•52m ago•0 comments

New portable technology detects GPS spoofing in real time

https://www.ornl.gov/news/ornls-breakthrough-detector-protects-trucking-shipments-gps-deception
1•geox•52m ago•0 comments

My favorite adversarial review prompt

https://blog.fsck.com/2026/05/01/adversarial-review/
2•tie-in•53m ago•0 comments

Steam Controller

https://store.steampowered.com/hardware/steamcontroller
1•cl3misch•55m ago•0 comments

Show HN: Tyche: An experimental distributed trading pipeline in Go Java

https://github.com/ItsArnavSh/Tyche
2•itsarnavsh•57m ago•0 comments

QUIC packet rejection in practice – Iroh

https://www.iroh.computer/blog/quic-packet-rejection-in-practice
1•janandonly•1h ago•1 comments