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

Ask HN: What makes an open-source UI component library worth adopting?

1•Harish_0089•2m ago•0 comments

Posiwid: The Purpose of a System Is What It Does

https://daringfireball.net/linked/2026/08/26/posiwid
1•zacharyozer•3m ago•0 comments

Show HN: I made a manga critique site with professional Japanese manga editors

https://m2w.ai/en
1•seanm2w•4m ago•0 comments

Corporate America Cut Big Checks to Trump. Now CEOs Fear Subpoenas Are Coming

https://www.wsj.com/politics/elections/trump-corporate-donors-election-2026-572c1b28
1•doener•4m ago•0 comments

South Korea's 'AI for All' Push Gives Free Access to Every Citizen

https://www.wsj.com/tech/ai/south-koreas-ai-for-all-push-gives-free-access-to-every-citizen-451f6b2c
1•watchdogtimer•7m ago•0 comments

How does football cause brain disease

https://www.science.org/content/article/how-does-football-cause-brain-disease-and-why-it-so-hard-...
1•shymaple•7m ago•0 comments

The Download: inside OpenAI's Hugging Face hack, and a new EV takes on the US

https://www.technologyreview.com/2026/08/27/1143033/the-download-openai-hugging-face-hack-slate-t...
1•joozio•11m ago•0 comments

How LibreOffice Is Funded

https://blog.documentfoundation.org/blog/2026/08/28/how-libreoffice-is-funded/
2•mmarian•12m ago•0 comments

Show HN: SubSmith – Turn your own videos into language-learning material

https://subsmith.app
1•IbrahimF96•13m ago•0 comments

Are we just a couple steps away from a runaway AI?

https://andlukyane.com/blog/runaway-ai
2•Artgor•15m ago•0 comments

Pentagon's blacklisting of Anthropic was unlawful, US judge rules

https://www.theguardian.com/technology/2026/aug/28/us-court-rules-pentagon-anthropic-ban-illegal-...
2•chanux•16m ago•0 comments

Show HN: Jack the Snipper – Paste HTML or rich text, get clean plain text back

https://snipper.kreisvier.ch/
1•shipcraft•16m ago•0 comments

How Much of the Internet Is Written with AI?

https://www.pewresearch.org/data-labs/2026/08/20/how-much-of-the-internet-is-written-with-ai/
1•thehoff•19m ago•0 comments

Show HN: Tavi – A pet health tracker that works offline, with no account

https://tavi.pet/
1•abdghani•26m ago•0 comments

Panic passes Trump tariff refunds back to the Playdate buyers

https://help.play.date/orders/tariffs/
1•huhtenberg•27m ago•0 comments

Show HN: Live football data. Clear patterns. Smart bets

https://valuestats.com/
1•not_wowinter14•27m ago•0 comments

LLM Cliché Highlighter

https://tools.simonwillison.net/llm-cliche-highlighter
2•rzk•27m ago•0 comments

Kojugate: Graph-native multiphysics simulation engine and digital twin

https://www.konjugate.com/
1•zenin•34m ago•1 comments

The Language of Headlines

https://daily.jstor.org/how-does-the-language-of-headlines-work-the-answer-may-surprise-you/
1•bookofjoe•35m ago•0 comments

One of east coast's largest datacenters accused of 'violating federal law'

https://www.theguardian.com/environment/2026/aug/27/new-jersey-vineland-datacenter-permits
1•sseagull•35m ago•0 comments

Scanning 170M lines of code: 44% of AI-found critical vulnerabilities were FP

https://corporate.comcast.com/stories/exploratory-vs-deterministic-assessments
1•officialhocc•36m ago•0 comments

Show HN: MCP server that drives the browser you are signed into

https://github.com/t3ratech/mcp-session-bridge
2•tkaviya•37m ago•0 comments

Assessly

https://assessly.app
1•manytduarte•38m ago•0 comments

LLMs are multi-layered user interfaces

https://www.gtothesquare.com/llms-the-multi-layered-user-interface
1•gtothesquare•43m ago•0 comments

Performing Digital Surgery to Fix MIDIs for My Hardware (My Post Was Wrong)

https://www.mistys-internet.website/blog/blog/2026/08/25/how-i-fixed-an-mt-32-midi-soundtrack-for...
2•robin_reala•48m ago•0 comments

Show HN: Public MCP for Greek price comparison (no API key)

https://www.bestprice.gr/mcp
1•phaistonian•50m ago•0 comments

Quest for eternal dock on Wayland – lambdock (C and GTK4 and Lisp Guile Scheme)

https://jointhefreeworld.org/blog/articles/gnu-linux/quest-for-eternal-dock/index.html
1•jjba23•54m ago•0 comments

Intel Linux Driver Orphaned for Limiting RF Exposure to Humans

https://www.phoronix.com/news/Intel-Linux-SAR-Driver-Orphaned
3•rbanffy•55m ago•0 comments

Making Your Data Ready for Agentic AI

https://martinfowler.com/articles/making-data-ready-for-agentic-ai.html
1•javaeeeee•56m ago•0 comments

AI and Cognitive Science Redefine Knowledge Retention

https://www.technology.org/2026/08/28/how-artificial-intelligence-and-cognitive-science-are-redef...
1•aledevv•58m ago•0 comments