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

Primate 0.38: The route is the contract

https://primate.run/blog/primate-038
4•hansmighty•2m ago•0 comments

CSS Reboot Day (May 1, 2026)

https://holidaytoday.org/css-reboot-day/
1•bariumbitmap•12m ago•0 comments

Microsoft's Xbox mode is now available for all Windows 11 PCs

https://www.theverge.com/news/921582/microsoft-xbox-mode-windows-11
1•fortran77•14m ago•0 comments

Show HN: Open-Source FHIR –> OMOP Pipeline

https://forge.foxtrotcommunications.net/
1•brady_bastian•18m ago•0 comments

Wirken: Secure AI agent gateway. Encrypted vault. Single static binary

https://github.com/gebruder/wirken
1•thunderbong•21m ago•0 comments

High Housing Costs Are Pushing Foreclosures to a Six-Year High

https://www.wsj.com/economy/housing/high-housing-costs-are-pushing-foreclosures-to-a-six-year-hig...
2•petethomas•22m ago•1 comments

The feed doesn't know you, and YouTube refuses to let you browse

https://evilgeniuslabs.ca/blog/the-feed-doesnt-know-you
2•andsoitis•26m ago•1 comments

Ask HN: Forced into Gemini on Google Account?

1•hysan•33m ago•2 comments

Ask HN: How do you assess and recruit developers in 2026?

1•andrewstuart•37m ago•0 comments

I vibecoded my dream game, GeoGuesser for guns, and its making money

https://gunguesser.com
3•salad_vr•44m ago•1 comments

Coding plan pricing comparisons based on actual usage

https://sites.diy/blog/2026-05-01-coding-plan-comparisons/
3•bilalba•45m ago•0 comments

An Unreleased Lyme Disease Vaccine Is Sparking False Conspiracy Theories

https://www.motherjones.com/politics/2026/05/lyme-disease-vaccine-conspiracy/
2•pulisse•46m ago•0 comments

Gravity's role in quantum state reduction [pdf]

https://image.sciencenet.cn/olddata/kexue.com.cn/upload/blog/file/2010/8/201081019170575880.pdf
1•__patchbit__•49m ago•0 comments

Internet Classism: How We Know You're Poor and Lame Online

https://braunandbrains.substack.com/p/internet-classism-how-we-know-youre
2•anonymouscaller•57m ago•1 comments

When hard drives were still huge: The Quantum Bigfoot turns 30

https://www.heise.de/en/news/When-hard-drives-were-still-huge-The-Quantum-Bigfoot-turns-30-112791...
1•croes•1h ago•1 comments

Tesla reveals $573M web of transactions between Elon Musk's companies

https://electrek.co/2026/05/01/tesla-tsla-web-transactions-musk-companies-spacex-xai-10ka-2025/
3•breve•1h ago•0 comments

Fixing Up CopyFail on Alpine

https://astr.al/notes/2026-04-29_copyfail/
1•potus_kushner•1h ago•0 comments

I built a way to search for people by intent

https://www.try-sytra.com/
2•bryzgalov•1h ago•1 comments

Capacity Efficiency at Meta

https://engineering.fb.com/2026/04/16/developer-tools/capacity-efficiency-at-meta-how-unified-ai-...
1•geoffbp•1h ago•0 comments

Sun Pharma is marrying Organon

https://finshots.in/markets/sun-pharma-is-marrying-organon/
1•vismit2000•1h ago•0 comments

Withastro/flue: The sandbox agent framework

https://github.com/withastro/flue
1•ankitg12•1h ago•0 comments

Sam Altman says OpenAI doesn't want to replace you with AI

https://www.neowin.net/news/sam-altman-says-that-openai-doesnt-want-to-replace-you-with-ai/
1•bundie•1h ago•1 comments

Amnitex: Lossless memory layer for AI coding assistants

https://github.com/Amnibro/amnitex
3•amnibro7•1h ago•0 comments

Spring House

https://en.wikipedia.org/wiki/Spring_house
3•thunderbong•1h ago•0 comments

Create an MP4 video of a web page scrolling at a steady speed

https://github.com/upenn/web-scroll-video
2•shawnzam•1h ago•1 comments

Show HN: Local Lock Down Lobe Chat Setup

2•I_like_tomato•1h ago•0 comments

Governor – a Claude Code plugin to reduce token/context waste

https://github.com/0xhimanshu/governor
3•mantiscore•1h ago•1 comments

I built the Playwright for desktop apps. 80% token savings

https://github.com/lahfir/agent-desktop
3•lahfir•1h ago•0 comments

Flexible OLED NUSA Infiltrator Jacket (Cyberpunk 2077 Cosplay) [video]

https://www.youtube.com/shorts/0cv3ZvFkxwU
1•starkparker•1h ago•0 comments

Welcome to Actual Computer

https://actual.inc/company/blog/introducing-actual-computer
2•ray__•1h ago•0 comments