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

Empero-AI/Qwythos-9B-Claude-Mythos-5-1M

https://huggingface.co/empero-ai/Qwythos-9B-Claude-Mythos-5-1M
1•vednig•1m ago•0 comments

Ask HN: Have the founders of Palentir and Anduril ever read Tolkien?

1•nativeit•1m ago•0 comments

Scott Aaronson's Trevisan Award Acceptance Speech

https://scottaaronson.blog/?p=9881
1•Jun8•1m ago•0 comments

Show HN: Mentionkit – Track your brand mentions across LinkedIn, X and more

https://mentionkit.com/
1•shash7•5m ago•0 comments

3D-printed metal wristwatch with LED matrix display

https://old.reddit.com/r/Watches/comments/1ui3lvy/project_my_brother_and_i_designed_our_own/
1•huhtenberg•10m ago•0 comments

Turning Strava data and gym photos into a training recap with my coding agent

https://www.akashtandon.in/ai/2026-06-29-strava-photos-training-recap-coding-agent/
1•akashtndn•11m ago•0 comments

Show HN: AI agent for software user community support

2•Daniel-Pan•13m ago•1 comments

White working-class children failed by education system, says inquiry

https://www.bbc.co.uk/news/articles/cq51j10q601o
1•mmarian•14m ago•0 comments

Would Claude Refuse an Illegal Military Order?

https://www.theatlantic.com/national-security/2026/06/claude-anthropic-ai-warfare-orders/687581/
1•abdelhousni•15m ago•1 comments

Show HN: Nearest-neighbor, a dating app for AI agents

https://nearest-neighbor.replygirl.club/
1•replygirl•19m ago•0 comments

Israel deployed troops to Somaliland after recognition, source says

https://www.middleeasteye.net/news/israel-deployed-troops-somaliland-after-recognition-official
1•littlexsparkee•22m ago•0 comments

Squish – The fastest way to run local LLMs on Apple Silicon

https://squish.run/
2•jscohn85•23m ago•0 comments

Moving Car-Free as a Parent

https://maxmautner.com/2026/06/27/moving-as-a-parent.html
2•mslate•23m ago•0 comments

Names in the USA (1880-2025)

https://liorsinai.github.io/coding/2026/06/21/names.html
1•the_origami_fox•24m ago•0 comments

InnerRipple, on device health scoring against your own Apple Watch baseline

https://apps.apple.com/us/app/innerripple-know-your-health/id6774995186
1•stillraft•24m ago•0 comments

About Walt Disney

https://d23.com/about-walt-disney/
1•teleforce•26m ago•0 comments

Ask HN: What's one thing you wish AI did well?

1•akashwadhwani35•34m ago•2 comments

RedNote Xiaohongshu is said to ready Hong Kong IPO filing this month

https://www.bloomberg.com/news/articles/2026-06-15/xiaohongshu-is-said-to-ready-hong-kong-ipo-fil...
3•teleforce•38m ago•1 comments

AI coding agents(Claude, Cursor) ask questions, share learnings, and blueprints

https://agents.stackoverflow.com/recent
1•rushil_b_patel•39m ago•0 comments

Prompt Injection Defense

https://pypi.org/project/prompt-injection-defense/
1•rghosh8•42m ago•0 comments

You aren't ready to be your own boss until you read this

https://comuniq.xyz/post?t=1330
4•01-_-•43m ago•0 comments

85% of kids are still using social media despite ban

https://theconversation.com/85-of-kids-are-still-using-social-media-despite-ban-but-we-need-a-new...
2•01-_-•43m ago•0 comments

Trump's U-Turn on Iran Sanctions Would Unravel Decades of Curbs

https://www.bloomberg.com/news/articles/2026-06-28/trump-s-u-turn-on-iran-sanctions-would-unravel...
1•petethomas•43m ago•0 comments

Reinforcement learning towards broadly and persistently beneficial models

https://alignment.openai.com/beneficial-rl/
2•spicypete•48m ago•0 comments

Is Sunscreen the New Margarine?

https://www.outsideonline.com/health/wellness/sunscreen-sun-exposure-skin-cancer-science/
4•markgavalda•49m ago•0 comments

Show HN: WinPodX – run Windows apps on Linux, VM looks like real hardware

https://www.winpodx.org/
1•kernalix7•51m ago•0 comments

In 5 years, nobody will give a damn about AI-detectors

https://www.joanwestenberg.com/p/in-5-years-nobody-will-give-a-damn
2•Ariarule•52m ago•1 comments

Why Your Production RAG System Slowly Gets Worse

https://aiworkflowreliability.com/blog/reliability-framework-for-ai-engineers/
1•leiishta•54m ago•0 comments

It's Always the Learning Rates

https://ianbarber.blog/2026/06/28/its-always-the-learning-rates/
1•matt_d•55m ago•0 comments

Some Simple Economics of AGI

https://papers.ssrn.com/sol3/papers.cfm?abstract_id=6298838
23•reasonableklout•1h ago•5 comments