frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

OLEDs can now switch light's handedness with an electrical signal

https://phys.org/news/2025-11-oleds-handedness-electrical.html
1•westurner•1m ago•1 comments

The Laffer Curve of Types (2019)

https://felleisen.org/matthias/Thoughts/The_Laffer_Curve_of_Types.html
1•danielam•2m ago•0 comments

KDE Plasma 6.8 Will Go Wayland-Exclusive in Dropping X11 Session Support

https://www.phoronix.com/news/KDE-Plasma-68-Wayland-Exclusive
2•mikece•2m ago•0 comments

Show HN: DAGForge – Build Airflow DAGs with AI in minutes, not weeks

https://dagforge.com
1•anvtek•3m ago•0 comments

Binance accused of aiding terrorists in new lawsuit

https://www.bbc.com/news/articles/c87lx2gx3yvo
1•Anon84•3m ago•0 comments

Why the West Was Downzoned

https://www.worksinprogress.news/p/how-the-world-downzoned-itself
1•bensouthwood•4m ago•0 comments

AI adoption and defense bubbles forth from Arrowhead, Ubisoft and Microsoft

https://massivelyop.com/2025/11/24/ai-adoption-and-defense-bubbles-forth-from-arrowhead-ubisoft-a...
1•speckx•4m ago•0 comments

Naming the Net: The Domain Name System, 1983-1990

https://gade.us/thesis/
1•fanf2•4m ago•0 comments

Astro Editor

https://astroeditor.danny.is/
1•Brajeshwar•5m ago•0 comments

Use AI to Boost Developer Productivity

https://www.docker.com/blog/ai-developer-productivity-workflow/
1•vinhnx•5m ago•0 comments

Show HN: I built a Firefox/Zen extension to help you get shit done

https://addons.mozilla.org/en-US/firefox/addon/zerodistraction/
1•jsattler•5m ago•0 comments

Feedback Doesn't Scale

https://another.rodeo/feedback/
2•ohjeez•6m ago•0 comments

When Requirements Forget Their Purpose: Rediscover Intent in Inherited Projects

https://spin.atomicobject.com/requirements-inherited-projects/
1•philk10•6m ago•0 comments

Nvidia Shares Fall on Signs Google Gaining Upper Hand in AI

https://www.ft.com/content/7d0cd87e-99b0-4411-b54f-f5b239af8e76
1•skx001•6m ago•1 comments

UPCV

https://upcv.io
1•bellamoon544•6m ago•1 comments

Can Programming Be Liberated from the von Neumann Style? A Functional Style [pdf]

https://worrydream.com/refs/Backus_1978_-_Can_Programming_Be_Liberated_from_the_von_Neumann_Style...
1•akira_067•6m ago•0 comments

Please stop buying the fastest SSDs

https://www.howtogeek.com/please-stop-wasting-money-on-expensive-ssds/
1•ripe•7m ago•0 comments

It sucks to be close to OpenAI

https://sherwood.news/markets/it-sucks-to-be-close-to-openai-right-now/
1•zerosizedweasle•7m ago•0 comments

Why developers still flock to Python

https://github.blog/developer-skills/programming-languages-and-frameworks/why-developers-still-fl...
1•pretext•7m ago•0 comments

Apple's Founding Papers Return to Auction, Could Fetch Up to $4M

https://www.macrumors.com/2025/11/26/apples-founding-papers-auction-4-million/
1•tosh•7m ago•0 comments

Experimenting with Robin Hood Hashing

https://twdev.blog/2025/11/robin_hood/
1•ibobev•7m ago•0 comments

Show HN: Small Text Generator – Fancy and Tiny Text (Copy and Paste)

https://smalltextgenerator.org/
1•light001•8m ago•0 comments

Matrix Core Programming on AMD GPUs

https://rocm.blogs.amd.com/software-tools-optimization/matrix-cores-cdna/README.html
1•salykova•9m ago•0 comments

Xet Core: scale Git to terabyte-sized repos

https://github.com/huggingface/xet-core
1•nateb2022•9m ago•0 comments

F-35 beat Gripen fighter jet 'by a mile' in 2021 Defence Department competition

https://www.cbc.ca/news/politics/f-35-gripen-dnd-competition-9.6992167
2•bouchard•11m ago•1 comments

Google Has Your Data. Gemini Barely Uses It

https://www.shloked.com/writing/gemini-memory
2•vinhnx•11m ago•0 comments

Dyalog APL 20

https://www.dyalog.com/news/165/420/Dyalog-Ltd-Announces-Dyalog-Version-20-0.htm
1•tosh•12m ago•1 comments

Show HN: I'm building an open source platform for studying Arabic dialects

https://www.parallel-arabic.com/about
1•selmetwa•13m ago•0 comments

Which language is best for AI code generation?

https://revelry.co/insights/artificial-intelligence/which-language-is-best-for-ai-code-generation/
2•weatherlight•13m ago•0 comments

MIT study finds AI can replace 11.7% of U.S. workforce

https://www.cnbc.com/2025/11/26/mit-study-finds-ai-can-already-replace-11point7percent-of-us-work...
3•tiahura•14m ago•1 comments