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

It's not too late to roll back MCP

https://theoryvc.com/blog-posts/its-not-too-late-to-roll-back-mcp
2•bbischof•1m ago•0 comments

Can you identify these articles from the web by their social share images?

https://omgimg.jim-nielsen.com/
1•twapi•1m ago•0 comments

We are in the 'advanced stages' of an AI bubble, says Rockefellers Ruchir Sharma [video]

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

Geometric Algorithms for Translucency Sorting in Minecraft [pdf]

https://douira.dev/assets/document/douira-master-thesis.pdf
1•HeliumHydride•1m ago•0 comments

New backgammon P2P wagering app

https://www.backgammon-cash.com
1•matthakimi•2m ago•1 comments

My First Impression on HP Zbook Ultra G1a: Ryzen AI Max+ 395, Strix Halo 128GB

https://forum.level1techs.com/t/my-first-impression-on-hp-zbook-ultra-g1a-ryzen-ai-max-395-strix-...
1•teleforce•4m ago•0 comments

Blockly based no-code (or code) Machine Learning platform you can click and run

https://github.com/pycanvas/pycanvas-desktop/releases/tag/v0.1.0
2•zxu•7m ago•1 comments

Paying $3 for a Dollar: The Rational Irrationality of Venture Capital

https://docs.google.com/document/d/1S7nazV5nKmYYkzxhmf3G-Ftb3DPAjV5Migokw3u8BsQ/edit?tab=t.0
1•dustingetz•7m ago•0 comments

Valid Polish: Polish is the language of the Digerati

https://validpolish.com/
2•kyyt•9m ago•0 comments

Devastated PC builder orders DDR5 RAM from Amazon receives DDR2 and some weights

https://www.tomshardware.com/pc-components/ddr5/sealed-ddr5-kit-sold-on-amazon-reportedly-contain...
7•teleforce•11m ago•0 comments

Breakthroughs that will redefine AI over the next 18 months [video]

https://www.youtube.com/watch?v=h-z71uspNHw
2•leoxv•20m ago•0 comments

Show HN: I built a tool to score your website's LLM readability

https://websiteaiscore.com
1•aggeeinn•21m ago•1 comments

The Biggest Breakthroughs in Mathematics: 2025 [video]

https://www.youtube.com/watch?v=hRpcWpAeWng
1•pykello•23m ago•0 comments

Fulton surface-to-air recovery system

https://en.wikipedia.org/wiki/Fulton_surface-to-air_recovery_system
1•ColinWright•23m ago•0 comments

Compute Trends Across Three Eras of Machine Learning (2022)

https://arxiv.org/abs/2202.05924
2•measurablefunc•25m ago•0 comments

Tell HN: The Gospel According to forever list

1•bikamonki•28m ago•0 comments

Closure of Greenlandic Wikipedia

https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_Greenlandic_Wikipedia
1•geox•29m ago•0 comments

Habits Beat Motivation

https://dontbreakprod.com/posts/habits-beat-motivation
1•dorkrawk•29m ago•0 comments

Purdue makes 'AI working competency' a graduation requirement

https://www.theregister.com/2025/12/17/purdue_require_ai_working_competency/
2•Bender•32m ago•0 comments

Jassy taps 27-year Amazon veteran to run AGI org which is now definitely a thing

https://www.theregister.com/2025/12/17/jassy_taps_peter_desantis_to_run_agi/
2•Bender•32m ago•0 comments

Thunderbird Expanding Microsoft Exchange and Protocol Support for 2026

https://www.phoronix.com/news/Thunderbird-2026-Plans
2•Bender•33m ago•0 comments

Ask HN: How do you market a small project?

1•thebigship•33m ago•1 comments

Great Ideas in Theoretical Computer Science

https://www.cs251.com/
3•sebg•35m ago•0 comments

TikTok signs agreement to create new U.S. joint venture

https://www.cnbc.com/2025/12/18/tik-tok-us-sale-china.html
3•mfiguiere•35m ago•0 comments

GrapheneOS blocks WhatsApp 0-day 0-click RCE exploit

https://twitter.com/MetroplexGOS/status/1982163802188575178
5•akyuu•37m ago•1 comments

Evidence shows deadly Brown, MIT shootings may be linked, sources say

https://www.foxnews.com/us/evidence-shows-deadly-brown-mit-shootings-may-linked-sources-say-report
3•perihelions•39m ago•0 comments

Trump signs executive order reclassifying cannabis

https://www.cnbc.com/2025/12/18/trump-pot-reclassification-cannabis-stocks-medicare-cbd.html
7•evo_9•40m ago•1 comments

LLM-Interview-Questions-and-Answers: 100 LLM interview questions with answers

https://github.com/KalyanKS-NLP/LLM-Interview-Questions-and-Answers-Hub
3•simonpure•41m ago•0 comments

Results-only audit: interface transport shows 15x redundancy, 90% fewer hotspots

https://github.com/johnoliveiradev/SentinelHotSpot
1•johnoliveiradev•42m ago•1 comments

BirdRadio: Listen to bird sounds around the world

https://bird-radio.pages.dev
1•chill_ai_guy•43m ago•0 comments