frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Beyond the Editing Canvas: Evidence Divergence in Ooxml-to-LLM Ingestion

https://arxiv.org/abs/2608.25880
1•sbulaev•2m ago•0 comments

Samsung's Processing-in-Memory (PIM)

https://chipsandcheese.com/p/hot-chips-2026-samsungs-processing
1•ingve•2m ago•0 comments

Fileon – Find any local file with natural-language search on Mac

https://www.haoqibit.com/fileon
1•Popang•9m ago•0 comments

Czech Court Awards Heureka 10M EUR from Google for Market Exclusion

https://www.ceskenoviny.cz/zpravy/2867023
1•Markoff•15m ago•1 comments

The Making of Panther Lake: Intel Core Ultra Series 3 – Behind the Scenes [video]

https://www.youtube.com/watch?v=Wifx6GtsVmI
1•thushanfernando•16m ago•0 comments

America Strikes Back Against Foreign Censors with the Rulli Granite Act HR 10174

https://prestonbyrne.com/2026/08/28/rulligranite/
1•NewCzech•19m ago•0 comments

How to Keep Thinking

https://www.seangoedecke.com/how-to-keep-thinking/
1•gfysfm•19m ago•0 comments

Show HN: Visits.Report – analytics you can publish and prove

https://visits.report/
1•nadermx•20m ago•0 comments

What is Oxide's thinking around GPUs? FAQ Friday #56 [video]

https://www.youtube.com/shorts/3y5DwFJH3ho
1•ryandotsmith•23m ago•0 comments

America's data center revolt is getting a boost from China-linked bots

https://www.axios.com/2026/08/28/china-ai-data-center-backlash-bots
2•jnord•27m ago•0 comments

Chunky Agents

https://ianbarber.blog/2026/08/28/chunky-agents/
1•matt_d•27m ago•0 comments

LaneGate – Git-native worktree orchestrator for AI agents

https://github.com/sudheerdvn/lanegate
1•dvenkat9•32m ago•0 comments

Show HN: AMC Stocks Hub – asset-manager profiles, 13F holdings, and co-holdings

https://assetmanagementcompany.net/
1•lzyuan1006•32m ago•0 comments

US Military uses laser to down three Mexican cartel drones near border

https://www.reuters.com/business/aerospace-defense/us-military-uses-laser-down-three-mexican-cart...
4•bushwart•36m ago•0 comments

OpenAI to end agreement with SpaceX's AI coding tool Cursor

https://www.reuters.com/business/media-telecom/openai-end-partnership-with-spacexs-cursor-2026-08...
1•tartoran•42m ago•0 comments

Survival Lessons from the Great Depression – The Horrifying Things Americans Did

https://johnwalter25.substack.com/p/50-survival-lessons-from-the-great
1•bushwart•42m ago•0 comments

Taiwan prosecutors search Unimicron in suspected China fraud case

https://www.reuters.com/world/asia-pacific/taiwan-prosecutors-search-unimicron-suspected-china-fr...
2•tartoran•42m ago•0 comments

Explainer: What is visual verification and why does Reuters practice it?

https://www.reuters.com/business/media-telecom/what-is-visual-verification-why-does-reuters-pract...
1•1659447091•53m ago•0 comments

Global Trade and United States Navy

https://acoup.blog/2026/08/28/collections-global-trade-and-united-states-navy/
1•Tomte•53m ago•0 comments

DoD confirms 'refrigeration disruption' at military commissaries

https://www.militarytimes.com/news/your-military/2026/08/28/dod-confirms-refrigeration-disruption...
4•everybodyknows•55m ago•1 comments

Yes, We're in an AI Bubble. Just Look to 1980s Japan

https://foreignpolicy.com/2026/08/28/nvidia-earnings-quarterly-report-ai-economic-bubble-japan-hi...
2•CaptainZapp•56m ago•2 comments

AI Stock Research Assistant · Streamlit

https://ai-stock-research-kiaan.streamlit.app
1•KiaanKothari•58m ago•0 comments

Nvidia Starts Pac as AI Chip Maker Builds DC Influence Force

https://www.bloomberg.com/news/articles/2026-08-27/nvidia-starts-pac-as-ai-chip-maker-builds-dc-i...
2•dagmx•1h ago•0 comments

Venezuelan opposition up in arms over reports US wants big stake in oil and gas

https://www.theguardian.com/world/2026/aug/28/us-venezuela-oil-gas-stake
3•fittingopposite•1h ago•0 comments

Are these 13 free AV and Robotics engineering calculators are useful?

1•dlimbu•1h ago•0 comments

An Unlikely Experiment

https://rushed-reflections.bearblog.dev/an-unlikely-experiment/
1•signa11•1h ago•0 comments

Overlay

https://www.getoverlay.io/app/agents?showcase=1
1•handfuloflight•1h ago•0 comments

Yesterday, an iPhone App for Yesterday's Weather

https://interconnected.org/home/2026/08/26/yesterday
1•Tomte•1h ago•0 comments

Debian has published the official results for the 2026 GR on LLM usage

https://vote.debian.org/~secretary/gr_llm/results.txt
6•tulio_ribeiro•1h ago•1 comments

Xpecter – A Terminal, Reimagined

https://xpecter.net/
2•allunderheaven•1h ago•1 comments