frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

AI Making Work Easy for Data Analysts and Founders

https://anallyst.app/
1•Sechele•2m ago•0 comments

Why codex /goal fails on complex workflows: compaction amnesia and context rot

1•shaurya-sethi•3m ago•0 comments

AI Gurus Are Charging Wall Street Banks $25,000 a Day

https://www.bloomberg.com/news/features/2026-05-25/the-ai-trainers-charging-25-000-a-day-to-push-...
2•helsinkiandrew•3m ago•1 comments

Outlines – Structured LLM Outputs

https://dottxt-ai.github.io/outlines/latest/
1•modinfo•4m ago•0 comments

Joi AI is hiring masturbation consultants to test "Daily Guided Masturbation"

https://twitter.com/joi___ai/status/2056518876243149258
1•rjzzleep•6m ago•0 comments

Galaxiana – Dedicate a star in a living 3D galaxy

https://galaxiana.com
1•neribar•10m ago•0 comments

Desktop Monitoring and Notifications for CISA KEV

https://github.com/quantumcore/kev_monitor
1•tt560•13m ago•0 comments

ThriftAttention: Selective Mixed Precision for Long-Context FP4 Attention

https://arxiv.org/abs/2605.23081
2•joesharratt29•14m ago•1 comments

Ferrari Reveals $640k EV Co-Designed by Jony Ive

https://www.macrumors.com/2026/05/25/ferrari-luce-jony-ive-photos/
1•mgh2•16m ago•0 comments

Stealth Firefox that passes every bot detection test

https://github.com/feder-cr/invisible_playwright
1•federcr•17m ago•0 comments

Webwright: A terminal is all you need for web agents

https://microsoft.github.io/Webwright/
2•sorenbs•18m ago•0 comments

Standard WiFi can identify individuals with near-perfect accuracy

https://www.digitaljournal.com/tech-science/privacy-any-wi-fi-can-now-identify-you-with-near-perf...
3•jackson-mcd•18m ago•0 comments

The Pressure

https://daniel.haxx.se/blog/2026/05/26/the-pressure/
2•adunk•19m ago•0 comments

Jazz legend Sonny Rollins dies aged 95

https://www.bbc.co.uk/news/articles/c1e224dwz18o
1•2dvisio•21m ago•0 comments

Show HN: Burn, K8s cost CLI that pulls actual spot prices per instance type

https://github.com/tanrikuluozlem/burn
1•OzlemT•21m ago•0 comments

Accelerating Copy_if Using SIMD

https://loonatick-src.github.io/posts/vectorized-copy-if-analysis/
1•chkmr•22m ago•0 comments

Users have created a tool to fix firmware issues with the Audeze Maxwell 1

https://github.com/kats1123/maxwell-balance-and-firmware-tool
1•ilitirit•25m ago•0 comments

What ClickUp's mass layoff tells us about the future of work

https://techcrunch.com/2026/05/25/what-clickups-mass-layoff-tells-us-about-the-future-of-work/
3•01-_-•25m ago•1 comments

America's schools face a backlash on digital devices

https://apnews.com/article/school-screen-time-technology-edtech-07958fb159c7cfbceb7bfdb37b2bb726
4•01-_-•26m ago•0 comments

Multi-Agent LLM Orchestration with Docker Compose and MCP

https://github.com/PacktPublishing/Operational-AI-with-Docker
1•harsh_manvar•29m ago•0 comments

Show HN: skills-for-humanity – 171 structured reasoning skills for Claude Code

https://github.com/human-avatar/skills-for-humanity
3•finnworks•38m ago•0 comments

A Portentous Reunion

https://bcantrill.dtrace.org/2026/05/25/a-portentous-reunion/
1•cafkafk•39m ago•0 comments

Ask HN: Some Sensible Alternative to Openrouter?

1•EbNar•42m ago•3 comments

How to Make Python 3 Print() Output UTF-8 to stdout

https://www.pythontutorials.net/blog/how-to-make-python-3-print-utf8/
1•ankitg12•42m ago•0 comments

Ask HN: Is anyone working at least 4 hours daily on an Apple Vision Pro?

28•widenrun•47m ago•6 comments

Logseq Doctor: heal your flat old Markdown files before importing to Logseq

https://github.com/andreoliwa/logseq-doctor
2•ankitg12•53m ago•0 comments

Secureblue Goes SUID-Less

https://github.com/secureblue/secureblue/releases/tag/v4.9.1
1•Ganipote•56m ago•0 comments

Why Is It So Hard to Be Ordinary?

https://www.newyorker.com/culture/open-questions/why-is-it-so-hard-to-be-ordinary
2•littlexsparkee•1h ago•1 comments

One of my reliable signs that an early-stage company is in trouble

https://xcancel.com/marcrandolph/status/2057995577133351413?s=20
1•wapasta•1h ago•0 comments

Ask HN: Best Free Local STT?

2•thillel•1h ago•4 comments