frontpage.
newsnewestaskshowjobs

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

Is Lake Transactional/Analytical Processing (LTAP) Just CDC?

https://www.databricks.com/blog/dispelling-ltap-myths
1•moonikakiss•55s ago•0 comments

Habits of Highly Ineffective AI Programmers

https://medium.com/young-coder/7-habits-of-highly-ineffective-ai-programmers-f40febb3b6e7
1•4mpm3•4m ago•1 comments

Show HN: Newport - Work on Linux servers from your Mac or Windows desktop

https://github.com/ruiyangke/newport
1•ryke•8m ago•0 comments

Widespread Microsoft outage takes down Outlook and other 365 services

https://www.msn.com/en-us/money/markets/microsoft-outage-hits-outlook-aws-and-google-users-also-r...
2•SubiculumCode•9m ago•0 comments

Adding RSA Support to swift-nio-ssh

https://lograker.app/blog/swift-nio-ssh-rsa-support
1•moonlighter•11m ago•0 comments

What Happened to 3Com: From Networking Giant to Afterthought

https://dfarq.homeip.net/what-happened-to-3com/
2•jnord•11m ago•0 comments

Generating Mini-Crosswords

https://possiblywrong.wordpress.com/2018/10/31/generating-mini-crosswords/
1•sebg•12m ago•0 comments

Kids and Parents Are Protesting Google's Classroom AI

https://www.motherjones.com/politics/2026/11/google-ai-protests-students-parents-families-new-yor...
4•cdrnsf•14m ago•0 comments

Tool Built by Election Deniers Said These Voters Were Dead. We Found Them Alive

https://www.propublica.org/article/election-challenge-forsyth-county-georgia
2•hn_acker•15m ago•2 comments

Show HN: Survive Thanksgiving dinner – a voice game against nosy relatives

https://survivedinner.com/
1•tien198722•16m ago•0 comments

The Hunt for Claude October

https://github.com/DoubleV840/blip
1•TutleCpt•16m ago•1 comments

Show HN: Agentview Chat – a chat UI for Claude Code background sessions

https://github.com/clumsy-ug/agentview-chat
1•clumsy-ug•19m ago•1 comments

Big Walk used AI to fix a bug. Now the indie gaming world is having a reckoning

https://arstechnica.com/gaming/2026/11/big-walk-used-ai-to-fix-a-bug-now-the-indie-gaming-world-i...
2•vintagedave•19m ago•0 comments

Studprint: A 3D printer made of 92% Lego bricks

https://github.com/AdamTuraj/StudPrint
1•titusblair•20m ago•0 comments

Polo 1.0: a Wayland compositor that ports MATE's Marco behavior

https://github.com/KeremSoke/polo
1•titusblair•20m ago•0 comments

LazyPPL – Laziness for Bayesian Nonparametrics

https://lazyppl.org/
1•sebg•20m ago•0 comments

When Your Inner Thoughts Are No Longer Just Yours

https://www.nytimes.com/2026/11/12/opinion/mind-reading-ai.html
1•anarbadalov•20m ago•0 comments

Parker Solar Probe finds magnetic helicity reversing at small scales

https://iopscience.iop.org/article/10.3847/2041-8213/aea84b
1•titusblair•20m ago•0 comments

Axelera AI Thinks Titania Is a Better Way to Scale AI Inference

https://www.forbes.com/sites/marcochiappetta/2026/11/12/axelera-ai-thinks-theres-a-better-way-to-...
1•peter_d_sherman•24m ago•1 comments

Security flaws in popular AI tools have nearly tripled

https://birdyfoot.com/research/ai-tool-vulnerabilities
3•joshfischer1108•25m ago•0 comments

AI and Virtual Reality Enter the Therapist's Office

https://undark.org/2026/10/30/avatar-deepfake-therapy/
1•EA-3167•25m ago•0 comments

Show HN: BitPlay Launch

https://bitframe.pages.dev/bitplay/
1•telui•26m ago•0 comments

AI-written peer reviews outscored top human experts

https://www.psypost.org/ai-written-peer-reviews-outscored-top-human-experts-in-blind-comparisons-...
1•geox•27m ago•0 comments

Railyard vs. Laravel Cloud: scale-to-zero or a server you own

https://railyard.run/blog/railyard-vs-laravel-cloud/
1•RailyardRun•32m ago•0 comments

What If America Loses the Al Race? [video]

https://www.youtube.com/watch?v=a7eW1OU1v00
2•Bender•34m ago•1 comments

Science and Secrecy (1994)

https://archive.nytimes.com/www.nytimes.com/books/98/12/06/specials/holloway-stalin.html
1•paulpauper•34m ago•0 comments

AI #194: Spy versus Guy

https://thezvi.substack.com/p/ai-194-spy-versus-guy
1•paulpauper•35m ago•0 comments

Richard A. Posner has died

https://www.law.uchicago.edu/news/senior-lecturer-richard-posner-law-and-economics-pioneer-and-fo...
3•sebg•35m ago•0 comments

AI Company Employees Should Unionize

https://www.astralcodexten.com/p/ai-company-employees-should-unionize
4•paulpauper•35m ago•0 comments

Show HN: A canvas terminal app written in Rust with built-in agent integration

https://infiniterm.app/
2•ekinertac•36m ago•1 comments