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

Lessons from Building an Autonomous Claude Code Assistant

https://substack.com/home/post/p-195976188
1•scrollinondubs•40s ago•0 comments

The $11B Casino-Style Economy Built on Players Who Can Never Cash Out

https://www.bloomberg.com/features/2026-social-casino-apps-addiction/
1•FiddlerClamp•5m ago•0 comments

Loadam – k6 load tests, contract suites, and MCP servers from any OpenAPI spec

https://www.npmjs.com/package/loadam
1•Dexcodes•6m ago•0 comments

Stupid NYT

https://walzr.com/stupid-nyt
2•jbegley•6m ago•1 comments

A little comparison between R and Kap

https://blog.dhsdevelopments.com/a-little-comparison-between-r-and-kap
1•tosh•7m ago•0 comments

Attracting Early Stage Investors: Evidence from a Randomized Experiment (2015)

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2432044
1•downbad_•9m ago•1 comments

Thomson Reuters Hit with Privacy Litigation in Michigan Re:Display of SSN Digits

https://www.law.com/2026/05/01/thomson-reuters-hit-with-privacy-class-action-in-michigan-over-dis...
1•1vuio0pswjnm7•11m ago•0 comments

How is it that Jakarta has improved so much?

https://indevelopmentmag.com/jakarta-transit-transformation/
1•paulpauper•11m ago•0 comments

CISA KEV: Linux "Copy Fail" CVE-2026-31431 Turns Kernel Bug into Patch Deadline

https://windowsforum.com/threads/cisa-kev-linux-copy-fail-cve-2026-31431-turns-kernel-bug-into-pa...
1•eth0up•12m ago•0 comments

Servers with Personality

https://caolan.uk/links/servers/
1•wrxd•14m ago•0 comments

Ask HN: What does a 9-year undetected memory-only Linux LPE imply?

1•eth0up•14m ago•0 comments

The STL for Geometry: Thirty-Year Evolution of C++ Libraries

https://polydera.com/algorithms/the-stl-for-geometry
1•ZigaSajovic•15m ago•0 comments

Scientists Create First-Ever 'Smell Map'

https://hms.harvard.edu/news/scientists-create-first-ever-smell-map
1•gmays•19m ago•0 comments

AI isn't coming for your job. It's coming for your mind

https://www.bailliegifford.com/en/uk/individual-investors/insights/ic-article/2026-q1-ai-isn-t-co...
1•XzetaU8•19m ago•0 comments

Can countries grow richer by exporting people, not goods?

https://www.economist.com/finance-and-economics/2026/04/30/can-countries-grow-richer-by-exporting...
1•andsoitis•21m ago•0 comments

Fungi and the Rise of Mammals [pdf]

https://journals.plos.org/plospathogens/article?id=10.1371/journal.ppat.1002808
1•thunderbong•21m ago•0 comments

AI threatens Big Law's talent pipeline

https://www.axios.com/2026/05/02/ai-lawyers-law-firms-artificial-intelligence
1•Brajeshwar•21m ago•0 comments

A lost galaxy called 'Loki' may be hiding inside the Milky Way

https://phys.org/news/2026-04-lost-galaxy-loki-milky.html
1•wglb•22m ago•1 comments

I made an Mobile-Coding Companion, seeking your reviews

https://www.remoot.dev
1•xporpy•23m ago•0 comments

Show HN: Writing a deep-research agent from scratch

https://deep-research-agent.pagey.site
1•freakynit•24m ago•0 comments

Modern C++ Programming: Busato

https://github.com/federico-busato/Modern-CPP-Programming
1•KnuthIsGod•25m ago•0 comments

Show HN: Verbalized-Sample-Skill.md Modal Probability-Ranked Answer Distribution

https://gist.github.com/spinchange/ebecc4a548bf163ce4fddae0699a8065
1•spinchange•27m ago•0 comments

The Mystery of the Missing Hotel Toothpaste (2013)

https://slate.com/human-interest/2013/07/toothpaste-in-hotels-why-do-they-provide-shampoo-soap-an...
1•downbad_•27m ago•1 comments

Museum of the Human Web

https://museum.parallel.ai/introduction?era=modern
1•TheBlapse•28m ago•0 comments

Data center land use issues are fake

https://blog.andymasley.com/p/data-center-land-use-issues-are-fake
1•Kye•29m ago•0 comments

Emergent Strategic Reasoning Risks in AI: A Taxonomy-Driven Evaluation Framework

https://arxiv.org/abs/2604.22119
1•gmays•29m ago•0 comments

DNS, the Phonebook That Isn't

https://toolkit.whysonil.dev/how-it-works/dns/
1•simplerhumane•30m ago•0 comments

MCP-ratchet: Go package for enforcing tool call order in MCP servers

https://github.com/hexxla/mcp-ratchet
1•sploitzberg•30m ago•0 comments

Why C++ is growing, and why C++26 will likely be adopted quickly [video]

https://www.youtube.com/watch?v=Qvr9MTAU_y4
1•dalvrosa•31m ago•0 comments

Meta's Pyrefly sabotages competing Python extensions without telling you

https://github.com/facebook/pyrefly/issues/3292
2•FossAndFurious•32m ago•1 comments