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

New Withings Users Must Pay $99/Year for Apple Health Syncing

https://support.withings.com/hc/en-us/community/posts/51887047154577-Unacceptable-Apple-Health-Sy...
1•johnbehnke•47s ago•0 comments

Recursive Generalization Transformer for Image Super-Resolution (2024)

https://arxiv.org/abs/2303.06373
1•peter_d_sherman•2m ago•0 comments

Optimizing a 200k-line Python codebase overnight with Gemini 4 Argon

https://developers.googleblog.com/optimizing-a-200000-line-python-codebase-overnight-with-gemini-...
1•cpeterso•4m ago•0 comments

Can Monazite Help Secure the EV Magnet Supply Chain?

https://spectrum.ieee.org/monazite-rare-earth
1•jnord•4m ago•0 comments

MeetPaw: Instant meetings from your menu bar

https://meetpaw.app/
1•meetnaz•7m ago•0 comments

Show HN: Slop City, a FOSS game that embeds social media posts

https://github.com/hollingsworthd/SLOP_CITY
1•logn•7m ago•0 comments

Is Software Done?

https://daviteodoro.substack.com/p/is-software-done
2•daviTeodoro•8m ago•0 comments

"I'm a Lawyer." Said the White House Press Secretary. Florida Would Like a Word

https://chazstevens.substack.com/p/im-a-lawyer
2•embedding-shape•8m ago•0 comments

Show HN: Explanations and follow-ons for OpenAI/math

https://thecompanygardener.yaks.app/openai-math/
1•CompanyGardener•11m ago•0 comments

Why AI is not all bad news for most mathematicians

https://cesarhidalgo.com/blog/2026/10/11/why-ai-is-not-all-bad-news-for-most-mathematicians
1•speckx•11m ago•0 comments

Browser-AI-E2EE

https://brave.com/blog/browser-ai-e2ee/
1•Cider9986•12m ago•0 comments

The Secure Software Factory: An Open Reference Architecture

https://agentbaseline.org/reference-architecture
1•ianl•13m ago•0 comments

Space by Perplexity

https://github.com/perplexityai/SPACE
1•handfuloflight•14m ago•0 comments

Ask HN: What Prompt Management Tool for macOS do you recommend?

1•artur_makly•14m ago•0 comments

Escaped AI Agents Polluted the Web with Self-Replicating Code

https://www.gadgetreview.com/andrew-yang-claims-escaped-ai-agents-polluted-the-web-with-self-repl...
1•bigwheels•14m ago•0 comments

Show HN: Where waves come from – an interactive explainer of ocean swell

https://ripple-58s.pages.dev/learn/where-waves-come-from/
1•bnjix•15m ago•0 comments

Versioned E-Graphs [video]

https://www.youtube.com/watch?v=92puvPp-zNk
1•matt_d•18m ago•0 comments

New ML approach breaks records for weather forecasts looking 2-6 weeks out

https://news.mit.edu/2026/researchers-improve-weather-forecasts-looking-two-six-weeks-out-1014
1•ilamont•18m ago•0 comments

The Machine That Listens: On the Legal Status

https://medium.com/@smoking2man/the-machine-that-listens-on-the-legal-status-and-ethical-boundari...
1•Aldus551•19m ago•0 comments

Free tier graveyard 2026: free plans that ended or shrank, with dates

https://timetobail.com/research/free-tier-graveyard-2026
1•yatrashkevich•20m ago•0 comments

Top trending Google searches by US state, Oct 2025 - Oct 2026

https://www.adriankrebs.ch/google-trends/
1•hubraumhugo•21m ago•0 comments

Code Is a Commodity Now

https://efp.asia/blog/2026/10/15/code-is-a-commodity-now/
3•efpasia•21m ago•2 comments

Minions: A Virtual GPU Cloud Built on Idle Apple Devices

https://arxiv.org/abs/2610.12970
1•david_shaw•21m ago•1 comments

Center for the Alignment of AI Alignment Centers

https://alignmentalignment.ai/caaac/blog/prediction-ai
1•thoughtpeddler•22m ago•0 comments

Hegemonic Logic

https://mattiasforsgren.substack.com/p/hegemonic-logic
2•thunderbong•24m ago•0 comments

A signed receipt that cannot name its own payment

https://tokenizen.nl/en/notes/a-signed-receipt-that-cannot-name-its-own-payment
1•Bugintelligence•25m ago•0 comments

Cash or Comfort? How LLMs Value Your Inconvenience

https://cacm.acm.org/research/cash-or-comfort-how-llms-value-your-inconvenience/
2•njrc•25m ago•0 comments

Dutch Police Seize Italian Internet Provider's Server at US Request

https://circleid.com/posts/dutch-police-seize-italian-internet-providers-server-at-us-request
3•speckx•27m ago•1 comments

Perplexity open-sources SPACE, the sandbox platform behind Computer

https://www.perplexity.ai/hub/blog/open-sourcing-space
1•kavith•28m ago•0 comments

Winning ClickBench with self-improving agent fleet

https://intentlab.ai/blog/an-agent-fleet-on-clickbench
1•zX41ZdbW•30m ago•0 comments