frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Level of Detail

https://phinze.com/writing/level-of-detail
1•todsacerdoti•1m ago•0 comments

Former Google employee who became leader of deadly cult (2025)

https://www.nytimes.com/2025/07/06/business/ziz-lasota-zizians-rationalists.html
1•1vuio0pswjnm7•2m ago•0 comments

Learn n8n for Free

https://theowllogic.com
1•wayofthekatana•3m ago•0 comments

Fungus-Treated Violin Outdoes Stradivarius

https://www.sciencedaily.com/releases/2009/09/090914111418.htm
1•lukeinator42•5m ago•0 comments

Dotfiles for Two – Kevin.md

https://www.kevin.md/dotfiles-for-two.md/
1•thekevintang•6m ago•0 comments

Epstein Files: The Blackmail of Billionaire Leon Black and Epstein's Role in It

https://greenwald.substack.com/p/the-epstein-files-the-blackmail-of
2•treetalker•10m ago•0 comments

Will Chinese 'involution' do to robots and AI what it's done to EVs?

https://www.ft.com/content/d47fc46a-12fb-4f2e-8bf5-e97b68dbecf0
1•KnuthIsGod•11m ago•0 comments

Show HN: Neko – AI agent runtime that fits on a Raspberry Pi Zero 2W

https://github.com/superhq-ai/neko
1•harshdoesdev•12m ago•1 comments

Hack the Planet

https://fnhipster.com/posts/hack-the-planet
1•fnhipster•14m ago•1 comments

Show HN: Markdown to Presentation (Marpit + )

https://lobout.com/slides/
1•chelm•14m ago•0 comments

Wikidata Graph Split and how we address major challenges

https://en.wikipedia.org/wiki/User:Bluerasberry/Wikidata_graph_split
1•altilunium•16m ago•0 comments

Show HN: Script to check if Notepad++ is backdoored by Lotus Blossom APT

https://github.com/nHunter0/Notepad-vulnerability-checker
3•10000000001•17m ago•0 comments

Extremely Lazy and Immensely Curious

https://randsinrepose.com/archives/extremely-lazy-and-immensely-curious/
1•zdw•18m ago•0 comments

Rufus devs blame Microsoft for blocking new Windows 11 ISOs resulting in IP bans

https://www.tomshardware.com/software/windows/rufus-developers-blame-microsoft-for-blocking-acces...
2•fraXis•18m ago•0 comments

The quality cost of vibe coding: an audit of OpenClaw's 180K-star codebase

https://medium.com/@erashu212/i-ran-quality-gates-against-openclaw-180k-stars-2-080-violations-sc...
4•rigourlabs•20m ago•1 comments

Kill Switch – X-Files S5E11 Transcript

https://www.insidethex.co.uk/transcrp/scrp511.htm
1•foxmulderx•25m ago•0 comments

Textise – Text-Only and Accessibility Tools

https://www.textise.net/
1•smir•28m ago•0 comments

What it feels like to be replaced by AI: an interactive experience

https://iphonehungry.github.io/ai-big-easy/easy-button/
3•garkNolad•28m ago•0 comments

RSS Lookup – Find RSS Feeds on Any URL

https://www.rsslookup.com/
1•smir•28m ago•0 comments

Show HN: Mind Spectrum – Data-driven SEO and digital marketing for SMEs

https://mindspectrum.org
1•hanruezz•30m ago•0 comments

Vaccine Makers Curtail Research and Cut Jobs

https://www.nytimes.com/2026/02/16/health/rfk-vaccine-manufacturers.html
3•duxup•31m ago•1 comments

Show HN: Swapface – Real-time, hyperrealistic AI face swap for Windows and Mac

https://aiswapface.org
1•hanruezz•31m ago•1 comments

An Agile Approach to a Legacy System [pdf]

https://cdn.pols.co.uk/papers/agile-approach-to-legacy-systems.pdf
1•bryanrasmussen•33m ago•0 comments

Programming Is Free

https://idiallo.com/blog/programming-tools-are-free
4•nomdep•35m ago•0 comments

Unmerged Patches and Useful Failures: My Journey to Postgres Major Contributor

https://medium.com/yandex/unmerged-patches-and-useful-failures-my-journey-to-postgres-major-contr...
2•x4m•38m ago•0 comments

SciTech SNAP Graphics has gone open source

https://github.com/kendallb/scitech-snap-graphics
1•cher-nov•39m ago•1 comments

Show HN: M-Courtyard – Fine-tune LLMs on your Mac with zero code

https://github.com/Mcourtyard/m-courtyard
1•tuwenbo0120•41m ago•1 comments

California has entered into a partnership with Lviv oblast

https://www.gov.ca.gov/2026/02/14/munich-security-conference-governor-newsom-reinforces-climate-p...
1•Kizert•42m ago•1 comments

Show HN: int-64.com | Visual runtime for production multi-agent systems

https://int-64.com/
1•ddoronin•43m ago•0 comments

Ask HN: How do companies that use Cursor handle compliance?

3•Poomba•45m ago•1 comments