frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

How the Rhinelander Trial Scandalized the Jazz Age

https://www.nytimes.com/2025/12/17/magazine/rhinelander-trial-interracial-marriage.html
1•martey•50s ago•0 comments

Tech Force, a review by the first USDS administrator

https://medium.com/@mikeyd/tech-force-ddd77cac1128
1•brandonb•1m ago•0 comments

Soteria Rust: the first symbolic execution engine with full Tree Borrows support [video]

https://www.youtube.com/watch?v=Q7sOHhbL0N8
1•matt_d•1m ago•0 comments

Swift Configuration 1.0 Released

https://www.swift.org/blog/swift-configuration-1.0-released
1•maguszin•2m ago•0 comments

Slide

https://slide.merkoba.com/?song=hydra
1•the_stocker•3m ago•0 comments

Generative Engine Optimization (Geo): A Blueprint for Ranking in AI Search

https://blog.vect.pro/generative-engine-optimization-guide
1•MMAFRAZ•3m ago•0 comments

Control your presentations from your phone

https://clicker.mertlmanuel.com/
1•manuel-mertl•4m ago•0 comments

Emergence of Human to Robot Transfer in VLAs

https://www.pi.website/research/human_to_robot
1•nharada•4m ago•0 comments

Why Old Programming Languages Like COBOL, Fortran, and Lisp Still Matter

https://marchcampaign.com/?p=23
1•dustfinger•5m ago•0 comments

Show HN: Show LinkedIn Data Bookmarklet

https://ulrischa.github.io/linkedin_data_bookmarklet/
1•ulrischa•5m ago•0 comments

Perfecting Steve Baer's Triple Dome

https://vorth.github.io/vzome-sharing/2024/02/18/baer-dome-from-H4-1001-09-13-04.html
1•robinhouston•6m ago•0 comments

Show HN: The feature gap "Chat with PDF" tuts and a regulated enterprise system

https://gist.github.com/2dogsandanerd/2a3d54085b2daaccbb1125601945ceeb
1•2dogsanerd•6m ago•0 comments

LLM Steering [video]

https://www.youtube.com/watch?v=F2jd5WuT-zg
1•saikatsg•8m ago•0 comments

How, and why, I invented OnlyFans. In 2004

https://themosthandsomemanintheworld.com/how-and-why-i-invented-onlyfans-in-2004/
3•MrSkelter•9m ago•0 comments

Float your timer, snap expenses, get paid. Work simplified

https://raterun.net/
1•agendacreativa•9m ago•1 comments

Alliance for OpenUSD Core Specification 1.0

https://aousd.org/news/core-spec-announcement/
1•dagmx•10m ago•0 comments

Show HN: Jungl – Auto Remediation for your AWS misconfigurations

1•aman-s•11m ago•0 comments

Sonicwall warns of new SMA1000 zero-day exploited in attacks

https://www.bleepingcomputer.com/news/security/sonicwall-warns-of-new-sma1000-zero-day-exploited-...
2•fleahunter•12m ago•0 comments

A fintech-first AI governance controlplane that authorizes agent actions in real

https://pypi.org/project/uaal-core/
1•Chandangalani•15m ago•1 comments

A $40 Mistake

https://dailyscratchpad.substack.com/p/a-40-mistake
2•sujayk_33•15m ago•0 comments

Uranus and Neptune might be rock giants, not ice giants

https://scienceclock.com/uranus-and-neptune-might-be-rock-giants-not-just-icy-worlds/
2•ashishgupta2209•17m ago•0 comments

GPU Registers Best Practices

https://www.lowlevelml.com/blog/registers-best-practices
1•gowindone•18m ago•0 comments

Ask HN: Are those AI interviewing tools worth it?

1•kevin061•19m ago•0 comments

Tencent World 1.5 WorldPlay streaming video real-time interactive world model

https://twitter.com/TencentHunyuan/status/2001170499133653006
2•ProofHouse•20m ago•0 comments

Bttrnews: An alternative front end for HN

https://bttrne.ws/
3•denysvitali•20m ago•0 comments

Tech's Biggest Companies Are Offloading the Risks of the A.I. Boom

https://www.nytimes.com/2025/12/15/technology/ai-risks-debt.html
2•lxm•23m ago•1 comments

GilGerard.com

http://www.gilgerard.com/GilGerard.com/gilgerard.com.html
1•Kaibeezy•23m ago•0 comments

Show HN: Simple iRacing Week Planner and Buying Guide

https://racextats.com/iracing/week-planner
1•ryanxsim•24m ago•0 comments

Show HN: Privacy-First Chat Application

https://github.com/deepanwadhwa/zink_link
1•dwa3592•25m ago•0 comments

The Year in Computer Science (2025)

https://www.quantamagazine.org/the-year-in-computer-science-20251216/
2•saikatsg•25m ago•0 comments