frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

VCR and Crystal balls in Claude's Leak

https://blog.mzfr.me/posts/2026-04-01-cc-vcr-cpu/
1•mzfr•1m ago•0 comments

Tell HN: Trying to update to macOS 15.7.5 bricked my Mac

1•ValentineC•1m ago•0 comments

Iron-proxy – An egress firewall for untrusted workloads

https://github.com/ironsh/iron-proxy
1•gslepak•4m ago•0 comments

The Trajectory of the Iran War: Will Jiang Xueqin's Third Prediction Come True?

https://medium.com/@achineseliveinlondon/the-trajectory-of-the-iran-war-will-jiang-xueqins-third-...
1•salkahfi•4m ago•0 comments

OpenAge: Open-Source Biological age foundation models

https://twitter.com/nikhilyadala/status/2039171557667557744
1•nikhilyadala•5m ago•1 comments

Email obfuscation: What works in 2026?

https://spencermortensen.com/articles/email-obfuscation/
1•jaden•5m ago•0 comments

1 Click authentication with new NPM package

https://www.npmjs.com/package/react-google-one-tap-extention
1•Herod55•6m ago•0 comments

FBI Hacked by L33T Chinese H4XX0R

https://www.politico.com/news/2026/04/01/fbi-hack-surveillance-system-major-incident-00854237
1•OhMeadhbh•9m ago•0 comments

Chinese entrepreneur Zhang Xue's homegrown motorbike makes historic win

https://www.globaltimes.cn/page/202603/1357908.shtml
2•icwtyjj•12m ago•1 comments

Americas military is never coming back from this

https://indi.ca/americas-military-is-never-coming-back-from-this/
2•mediumsmart•16m ago•0 comments

Accurate Determination of Chemical Abundances Near a Supermassive Black Hole

https://arxiv.org/abs/2603.29748
1•bewalt•26m ago•0 comments

Steam on Linux Use Skyrocketed Above 5% in March

https://www.phoronix.com/news/Steam-On-Linux-Tops-5p
8•hkmaxpro•28m ago•1 comments

Amine Swingbed: technology for removing CO² from a habitable spacecraft [pdf]

https://www.astronautical.org/sites/default/files/attachment/Amine%20Swingbed%20Payload%20Technol...
1•thunderbong•33m ago•0 comments

An interactive simulation of how Claude Code's context window fills

https://code.claude.com/docs/en/context-window
1•duyet•33m ago•0 comments

Apple turns 50 today: here's what it does better than PC (no foolin')

https://www.pcgamer.com/hardware/apple-turns-50-today-heres-what-it-does-better-than-pc-no-foolin/
1•evo_9•39m ago•0 comments

50 years measuring the cleanest air

https://www.csiro.au/en/news/All/News/2026/April/50-years-measuring-the-worlds-cleanest-air
1•defrost•41m ago•0 comments

The Anti-Intellectualism of the Silicon Valley Elite

https://www.thenation.com/article/society/peter-thiel-marc-andreessen-silicon-valley-anti-intelle...
4•petethomas•43m ago•1 comments

I got the police called on me and almost got kickedout of uni for my gossip site

1•a_n•44m ago•2 comments

Show HN: Create Programs for Recitals

https://bandmanager.projects.jaygoel.com
1•memset•45m ago•0 comments

Show HN: Agent2; Open-source production runtime for AI agents

https://github.com/duozokker/agent2
1•duozokker•45m ago•0 comments

Why Your Database Optimizer Matters More When AI Writes the Queries

https://medium.com/towards-data-engineering/why-your-database-optimizer-matters-more-when-ai-writ...
1•OnTheFlyJOINs•49m ago•0 comments

Show HN: We open-sourced our content writing workflow as a Claude Code skill

https://www.npmjs.com/package/claude-content-writer
1•arximughal•52m ago•0 comments

Why AI Code Needs the Same Rigor We Should've Been Using All Along

https://whetlan.substack.com/p/why-ai-code-needs-the-same-rigor
2•tabwidth•59m ago•2 comments

Startup founder wanted to pitch, but got issues

https://trellis.law/case/26-civ-00518/a16z-capital-management-llc-vs-dulat-akan
1•elonmm•59m ago•0 comments

Please Help Sam Angelo (Wyomingwoodturner)

1•SquibblesRedux•59m ago•1 comments

Show HN: Semantic atlas of 188 constitutions in 3D (30k articles, embeddings)

https://constitutionalmap.ai/en
2•joaoli131•1h ago•0 comments

Show HN: Linux Kernel Documentation Index-Every Page in the Linux Kernel's Docs

https://github.com/tamnd/kernel-index
1•tamnd•1h ago•0 comments

Artemis II's toilet is a moon mission milestone

https://www.scientificamerican.com/article/artemis-iis-toilet-is-a-moon-mission-milestone/
8•1659447091•1h ago•2 comments

Wizards of the Coast Announces the Return of D&D Modules

https://dungeonsanddragonsfan.com/new-dnd-modules/
1•rolph•1h ago•0 comments

NASA's Artemis II Live Views from Orion [video]

https://www.youtube.com/watch?v=6RwfNBtepa4
2•twalichiewicz•1h ago•0 comments