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

Show HN: Herdr plugin to annotate anything in the terminal

https://github.com/plannotator/herdr-annotate
1•ramoz•5m ago•0 comments

Chairman Hawley Investigates AI-Powered Flock Cameras Amidst Privacy Concerns

https://www.hawley.senate.gov/chairman-hawley-investigates-ai-powered-flock-cameras-amidst-privac...
4•thaumaturgy•9m ago•1 comments

Market All the Apps

https://shipacademy.com/
1•KenPainter•11m ago•1 comments

Looking for Founding Engineer at Heron

https://wellfound.com/jobs/4630071-gtm-lead
1•harsh-moonshot•12m ago•0 comments

Just 2 new data centres will pump out more carbon emissions than ExxonMobil

https://www.foxglove.org.uk/2026/08/26/just-two-new-data-centres-will-pump-out-more-planet-heatin...
1•DeepLogin•14m ago•0 comments

Claude gets its own browser in Cowork

https://claude.com/blog/cowork-built-in-browser
1•healsdata•15m ago•0 comments

AWS to acquire DuckLabs, the company behind DuckDB

https://www.aboutamazon.com/news/company-news/aws-ducklabs
1•hiyer•15m ago•0 comments

Bill Gates Warns A.I. Is More Dangerous Than Big Tech Will Admit

https://www.nytimes.com/2026/08/26/technology/bill-gates-ai-risks.html
1•kensai•17m ago•0 comments

tailvisor: macOS and Linux VM sandbox with a Tailscale network identity

https://github.com/tailscale/tailvisor
3•mfrw•21m ago•0 comments

How to Start a Profitable Blog Without Chasing Hype

https://www.a1ho.com/2026/07/how-to-start-profitable-blog-without.html
1•alfotesr•22m ago•0 comments

These Babies Grew Up w Strict Sugar Limits – Decades Later, Results Are Dramatic

https://www.sciencealert.com/these-babies-grew-up-with-strict-sugar-limits-decades-later-the-resu...
2•bookofjoe•25m ago•0 comments

Instinct.co Raises $350M

https://www.forbes.com/sites/iainmartin/2026/08/26/vcs-are-so-obsessed-with-this-ai-assistant-tha...
1•warthog•26m ago•0 comments

Panix, the oldest commercial Internet provider in New York, started in 1989

http://panix.com/
4•joebig•31m ago•0 comments

Veri, a non-custodial ZK identity vault on Algorand

https://www.getveri.co/
1•RagingSquirrell•35m ago•0 comments

AWS Strands Agents Tools Received Four CVEs in 23 Days

https://tech.yahoo.com/cybersecurity/articles/aws-strands-agents-tools-received-032036248.html
1•mooreds•35m ago•0 comments

Show HN: Agent-hop – a Rust TUI that hops a live Claude Code chat into Codex

https://github.com/hetpatel-11/agent-hop
1•HetPatel106•38m ago•0 comments

Carto Basemaps now requires API key

https://carto.com/basemaps/apikey/index.html
3•rakken•40m ago•1 comments

Randy Pausch's Last Lecture (2007) [video]

https://www.youtube.com/watch?v=ayPMfopCe1g
4•simonebrunozzi•42m ago•1 comments

AI Org Maturity Scorer

https://aiorgmaturity.com/
1•joanwestenberg•46m ago•0 comments

UPenn Global Economic History – Intro Slides [pdf]

https://www.sas.upenn.edu/~jesusfv/GEH_1_Introduction.pdf
1•alphabetatango•47m ago•0 comments

Bill Gates says we've passed AI's danger thresholds. Now what?

https://www.technologyreview.com/2026/08/26/1142946/bill-gates-ai-danger-threshold/
1•alphabetatango•49m ago•0 comments

Evolution of a kite that will lift a man (2006) [pdf]

https://web.archive.org/web/20060812204923/http://www.drachen.org/journals/a09/Baden-Powell.pdf
2•Eridanus2•49m ago•0 comments

'Six Feet Under' Redefined Death on TV 25 Years Ago

https://www.yahoo.com/entertainment/tv/articles/six-feet-under-redefined-death-182026923.html
2•chistev•53m ago•0 comments

Large language models do not have emotions

https://www.nature.com/articles/s41562-026-02558-6
2•Anon84•56m ago•0 comments

Find out where your images have been scraped

https://lanternite.org/
1•e12e•56m ago•1 comments

A case study on Lovables use of Code.Storage

https://code.storage/changelog/lovable-case-study
1•jinqueeny•56m ago•0 comments

Show HN: Visualize whether you run too many coding agents, or too few

https://github.com/JerryZLiu/AgentPlayback
1•jerryliu12•56m ago•0 comments

Mark Zuckerberg Wanted AI to Replace Meta Workers- Plan Collapsed Within Months

https://www.ibtimes.com/mark-zuckerberg-reportedly-wanted-ai-replace-meta-workers-plan-collapsed-...
9•randycupertino•57m ago•3 comments

Artists Built a Site to Escape AI. Scrapers Are Coming for It Anyway

https://www.forbes.com/sites/robsalkowitz/2026/08/23/artists-built-a-site-to-escape-ai-scrapers-a...
1•e12e•58m ago•1 comments

Worst-case glacial lake flood scenarios in a transboundary Himalayan basin 2022

https://nhess.copernicus.org/articles/22/3765/2022/nhess-22-3765-2022.html
21•totetsu•58m ago•11 comments