frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Nvidia set to supplant Apple as TSMC's top customer

https://www.cnbc.com/2026/01/26/nvidia-set-to-supplant-apple-as-tsmcs-largest-customer.html
1•JumpCrisscross•1m ago•0 comments

The Value of Things

https://journal.stuffwithstuff.com/2026/01/24/the-value-of-things/
1•munificent•2m ago•0 comments

Tech workers call for CEOs to speak up against ICE after Alex Pretti Killing

https://techcrunch.com/2026/01/26/tech-workers-call-for-ceos-to-speak-up-against-ice-after-the-ki...
2•SilverElfin•2m ago•0 comments

Y Combinator website no longer lists Canada as a country it invests in

https://betakit.com/y-combinator-website-no-longer-lists-canada-as-a-country-it-invests-in/
3•TheLegace•3m ago•0 comments

Daily-Driving an IBM Mainframe () [video]

https://www.youtube.com/watch?v=Dn1E2On_sok
1•rbanffy•4m ago•0 comments

A Lack of Corporate Focus

https://www.windowslatest.com/2025/12/02/windows-11-needs-its-own-windows-xp-sp2-moment-without-a...
2•razodactyl•7m ago•2 comments

Show HN: XDA Forum discussion on sideloading (2009)

https://xdaforums.com/t/android-market-updates-on-sideloaded-apps.557028/
2•estimator7292•7m ago•0 comments

Chasing agentic AI success at scale in 2026

https://www.fastforward.blog/chasing-agentic-ai-success-at-scale-in-2026/
1•nadis•8m ago•0 comments

Client side quantum computing in the browser (OSS)

https://twitter.com/i/status/2015927372714017129
3•gnarbarian•9m ago•0 comments

Stop blaming yourself for expanding waistline. Food supply working against you

https://www.cnn.com/2025/09/22/health/food-intelligence-kevin-hall-wellness
1•paulpauper•9m ago•0 comments

Behavioral Biases in LLM Models

https://www.nber.org/papers/w34745
1•paulpauper•11m ago•0 comments

Show HN: OptionIncome – auto tracker for option sellers

https://www.optionincome.io
1•yx_wang•13m ago•0 comments

U.S. marshals investigate claim of $40M crypto theft

https://www.coindesk.com/business/2026/01/26/u-s-marshals-investigate-claims-that-son-of-governme...
1•paulpauper•13m ago•0 comments

The Relative Trap

https://blog.sebastiansastre.co/posts/the-relative-trap/
1•sebastianconcpt•13m ago•0 comments

Clawdbot Control Vulnerability Exposes AI System to Remote Code Execution

https://thecyberedition.com/clawdbot-control-vulnerability-exposes-ai-system-to-remote-code-execu...
2•thehacknews•14m ago•1 comments

Arcan Explained – A browser for different webs

https://arcan-fe.com/2026/01/26/arcan-explained-a-browser-for-different-webs/
1•ingenieroariel•14m ago•0 comments

Show HN: Strata AI-powered ops platform

https://precision-heavens-earth.lovable.app
1•lavandar-admin•15m ago•0 comments

DarkCode – 8-color barcode, 140k chars (decoder 50% broken)

https://github.com/Typexex/DarkCode-Bardo
2•typexaitypexex•16m ago•2 comments

We Are Letting LLMs Decide Who Gets Hired and Doing It Wrong

https://dokasto.com/blog/we-are-letting-llms-decide/
3•ud0•17m ago•0 comments

TIL the Apple TV Remote pairs with MacBooks for presentations and playback

https://support.apple.com/en-au/guide/mac-help/welcome/mac
3•no_creativity_•19m ago•0 comments

The Refragmentation (2016)

https://paulgraham.com/re.html
2•virgildotcodes•22m ago•0 comments

Passengers to start riding De Lijn's self-driving buses in Leuven

https://www.belganewsagency.eu/passengers-to-start-riding-de-lijns-self-driving-buses-in-leuven
4•riffraff•25m ago•1 comments

Researchers achieve 3D forest reconstruction from remote sensing data

https://phys.org/news/2026-01-ai-trees-forest-3d-reconstruction.html
1•PaulHoule•25m ago•0 comments

Ending tax refunds by check risks sidelining people who don't have bank accounts

https://theconversation.com/ending-tax-refunds-by-check-will-speed-payments-but-risks-sidelining-...
2•geox•26m ago•0 comments

AI by Hand: Deep Learning Math Workbook

https://www.byhand.ai/p/deep-learning-math-workbook
2•teleforce•26m ago•0 comments

Pwn2own: Escaping VMware Workstation

https://www.synacktiv.com/en/publications/on-the-clock-escaping-vmware-workstation-at-pwn2own-ber...
1•alphax314•26m ago•0 comments

Show HN: Agent OS – 0% Safety Violations for AI Agents

https://github.com/imran-siddique/agent-os
2•mosiddi•27m ago•0 comments

Show HN: Mirascope – The LLM Anti-Framework

https://github.com/Mirascope/mirascope/tree/main/python
7•wbakst•28m ago•5 comments

You have to know how tech companies work

https://www.seangoedecke.com/knowing-how-to-drive-the-car/
3•alexwennerberg•29m ago•0 comments

Why does your database cost more than your application?

https://launchly.io/about
2•justpeek•34m ago•0 comments