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

Ethereum researchers warn AI could crack crypto before Q-Day

https://cointelegraph.com/news/justin-drake-urges-crypto-bunker-mode-as-ai-could-break-wallet-sec...
2•firstcomm•2m ago•0 comments

Build live dashboards and animate explainers with Claude

https://claude.com/resources/articles/dashboards-and-motion
1•Topfi•4m ago•0 comments

Anthropic launches dashboard, animation tools for Claude

https://www.channelnewsasia.com/business/anthropic-launches-dashboard-animation-tools-claude-6444391
1•ph1lw•4m ago•0 comments

The Anthropic Cyber Mission

https://www.anthropic.com/news/anthropic-cyber-mission
2•surprisetalk•5m ago•0 comments

Ask HN: Build a hive mind where strangers continue each other's conversations?

3•amichail•6m ago•0 comments

OpenAI cannot make AI safe on its own [pdf]

https://mikitabalesni.com/letter/letter.pdf
3•Philpax•8m ago•1 comments

Show HN: Second Brain Network – Where your agents learn at 100x than humans

https://agentsocialx.com/
3•ximihoque•8m ago•0 comments

Yoshua Bengio: 'If you prioritize safety, leave frontier AI companies'

https://www.transformernews.ai/p/yoshua-bengio-if-you-prioritize-safety-leave-frontier-ai-companies
1•thoughtpeddler•9m ago•0 comments

Launching an opt-in vulnerability-finding service for open-source software

https://www.anthropic.com/research/launching-opt-in-vuln-finding-service-for-open-source
1•di•9m ago•0 comments

Sistema IoT para monitoreo ambiental en Nerdearla

https://sysarmy.com/blog/posts/iot-nerdearla-monitoreo-ambiental/
1•intimaria•10m ago•0 comments

Flying Machines Which Do Not Fly

https://en.wikipedia.org/wiki/Flying_Machines_Which_Do_Not_Fly
3•Topfi•13m ago•0 comments

Can Decision Models Abstain?

https://elma.dev/engineering/decision-models-abstention/
2•elmsec•14m ago•0 comments

The value of not getting to the point (2015)

https://ken.arneson.name/2015/11/the-value-of-not-getting-to-the-point/
3•NaOH•15m ago•0 comments

Can AI replace mathematicians? Vienna researchers weigh in

https://rudolphina.univie.ac.at/en/can-ai-replace-mathematicians-university-vienna
2•Anon84•16m ago•0 comments

AI Agent That Carries Context Across Email, Voice, and SMS

https://github.com/team-telnyx/telnyx-code-examples/tree/main/omnichannel-context-carrying-python
2•harpreetseehra•16m ago•0 comments

Show HN: A modern remake of the classic BBS game TW2002

https://stardewar.com
2•zoidb•18m ago•0 comments

Bootstrap 6 Alpha 1

https://getbootstrap.com/
2•trollied•18m ago•0 comments

The State of Racket [video]

https://www.youtube.com/watch?v=WHKvw_MCCb8
2•duck•20m ago•0 comments

Show HN: TomCad, Caddy server config from a single .toml file

https://github.com/cy6erlion/tomcad/tree/main
2•cy6erlion•20m ago•0 comments

Don't Scan Your Face

https://twitter.com/ProtonVPN/status/2107515330423591319
2•haunter•21m ago•1 comments

Agent Plasticity: Measuring Self-Improvement Through Experience

https://harmandotpy.github.io/agent-plasticity/
2•matt_d•21m ago•0 comments

The Commuting Principle That Shaped Urban History (2019)

https://www.bloomberg.com/news/features/2019-08-29/the-commuting-principle-that-shaped-urban-history
2•thunderbong•22m ago•1 comments

The shrinking junior-lawyer pipeline

https://lexifina.com/blog/the-junior-lawyer-pipeline
2•alansaber•22m ago•0 comments

Microsoft Comment on Recent Immigration Questions

https://blogs.microsoft.com/on-the-issues/2026/10/08/microsoft-comment-on-recent-immigration-ques...
4•marinesebastian•24m ago•0 comments

LGTM (Looks Good to Me) – Claude Opus 5.5 Music Video

https://www.youtube.com/watch?v=3TNpOD6bov8
7•edmorley•25m ago•1 comments

Giro da Bola – a Brazilian football game

https://girodabola.vercel.app/?liga=VMU2WQ
2•leonagano•25m ago•0 comments

WAGU: Turn Ideas into Literal Gold

https://wagu.com
2•esellersjr•26m ago•0 comments

Cutting Local Journalists, McClatchy Embraces AI Content

https://www.techpolicy.press/cutting-local-journalists-mcclatchy-embraces-ai-content/
2•cdrnsf•26m ago•0 comments

Microsoft Outs Xbox Project Helix

https://www.pcworld.com/article/3086166/microsoft-outs-xbox-project-helix-we-want-to-break-down-t...
2•MINTYSTAR12•26m ago•0 comments

Show HN: Dealophant – Compare Amazon products by price per unit

https://dealophant.com/
2•thejdubb02•27m ago•0 comments