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

Hallucination Is Inevitable: An Innate Limitation of Large Language Models

https://arxiv.org/abs/2401.11817
1•drob518•34s ago•0 comments

LLM-first document AI is missing a 50-year-old CS technique

https://bhavyagupta.dev/posts/llm-document-extractors-fixed-point
1•bhavya2k03•1m ago•0 comments

I built ~70 free visual editors that run in the browser

https://aicreate.com/
1•h222421•1m ago•0 comments

Decentralize Your Communication

https://blog.troed.se/posts/decentralize_your_communication/
1•speckx•1m ago•0 comments

Does Employment Slow Cognitive Decline? Evidence from Labor Market Shocks

https://www.nber.org/papers/w35117
1•littlexsparkee•3m ago•0 comments

Show HN: A Soccer Game Simulator Played by AI Agent

https://github.com/gangtao/AgentPitch/
1•gangtao•3m ago•0 comments

What's the most useful thing in your .gitconfig?

1•thorne_luke•3m ago•0 comments

H2 General Expense Database [video]

http://ajqvue.com/documentation.html
1•danap•7m ago•0 comments

Show HN: One container. 4 cores. Hybrid search. 10k concurrent users?

https://amgix.io/blog/2026/05/02/amgix-one-under-load/
1•kvasserman•9m ago•0 comments

Dithering with CSS

https://ikesau.co/blog/dithering-with-css/
1•speckx•9m ago•0 comments

Automatic Enum Handling in C – Parsing, Validating and Iterating

https://medium.com/@yair.lenga/automatic-enum-handling-in-c-parsing-validating-and-iterating-76de...
1•yairlenga•10m ago•0 comments

Real Experts Teach

https://togetherlondon.com/insights/real-experts-teach
1•lucidplot•10m ago•0 comments

1966 Ford Mustang Converted into a Tesla with Working 'Full Self-Driving'

https://electrek.co/2026/05/02/tesla-1966-mustang-ev-conversion-full-self-driving/
1•Brajeshwar•12m ago•0 comments

I Let AI Look at My Breasts–and I'm Glad I Did

https://www.wsj.com/tech/ai/joanna-stern-i-am-not-a-robot-ai-book-8e54657e
1•atestu•14m ago•0 comments

HTTPS: The Three Guarantees and the Handshake Beneath

https://toolkit.whysonil.dev/how-it-works/https/
1•otterwilde2•14m ago•0 comments

How Everest has changed since Into Thin Air

https://www.theatlantic.com/books/2026/05/whats-changed-since-jon-krakauer-climbed-everest/687019/
1•nlawalker•14m ago•1 comments

Aviate, Navigate, Communicate – What to Do About Mythos

https://www.hyperdimensional.co/p/aviate-navigate-communicate
1•mwigdahl•14m ago•0 comments

`Bun.Image` – fast builtin multi-format image processing library

https://twitter.com/bunjavascript/status/2050421589150404826
1•burnrate•14m ago•0 comments

Seeking maintainers for our OCaml SIP server, gRPC, and HTTP/2 libraries

https://discuss.ocaml.org/t/seeking-maintainers-for-our-ocaml-sip-server-grpc-and-http-2-librarie...
2•DASD•15m ago•0 comments

Steam HW survey – Linux drops m/m

https://store.steampowered.com/hwsurvey/Steam-Hardware-Software-Survey-Welcome-to-Steam
1•baal80spam•15m ago•0 comments

EFF's Recommendations for the EU's Digital Fairness Act

https://www.eff.org/deeplinks/2026/04/dos-and-donts-eus-digital-fairness-act-effs-recommendation-...
1•hn_acker•15m ago•1 comments

Musk texted OpenAI's Brockman about settlement two days before trial began

https://www.cnbc.com/2026/05/04/musk-altman-open-ai-settlement-trial-brockman.html
1•1vuio0pswjnm7•15m ago•0 comments

States Want to Block Open Records Laws That Reveal ALPRs' Sprawling Surveillance

https://www.eff.org/deeplinks/2026/04/open-records-laws-reveal-alprs-sprawling-surveillance-now-s...
1•hn_acker•16m ago•1 comments

Show HN: Visual SSL TLS Handshake Visualizer

https://www.sitesecurityscore.com/tools/ssl-tls-handshake-checker
1•lemax2•16m ago•0 comments

High-Quality Chaos

https://daniel.haxx.se/blog/2026/04/22/high-quality-chaos/
1•lladnar•16m ago•0 comments

Self Driving Car[Sor]

https://article.app/shishir/self-driving-car-sor
1•sjakati98•18m ago•0 comments

Voltage Tester vs. Multimeter

https://www.techtownforum.com/knowledge-base/article/equipment-appliances/tech-tools/voltage-test...
1•susam•19m ago•0 comments

Digital Hopes, Real Power: From Connection to Collective Action

https://www.eff.org/deeplinks/2026/04/digital-hopes-real-power-connection-collective-action
1•hn_acker•19m ago•0 comments

Auto CVE Checker–open-source CVE+SBoM+C/C++ scanner for ISO/SAE 21434 compliance

https://github.com/devender-sharma-emb/automotive-cve-tool
1•devvender•19m ago•0 comments

I tracked 7,700 UK petrol stations every 10 minutes for 3 months

https://www.fuelinsight.co.uk
3•theazureguy•20m ago•3 comments