frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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: I built an AI that calls you until you wake up

https://wakecall.online/
1•rahma_tm•6m ago•0 comments

SHP: 700x faster context recall by treating memory as network

https://github.com/silentnoisehun/Silent-Hope-Protocol
1•Hope_Genom•8m ago•1 comments

A Year of Typing: My NumPy Fellowship Retrospective

https://blog.scientific-python.org/numpy/fellowship-program-2025-retrospective/
1•todsacerdoti•9m ago•0 comments

Anthropic bans use of API in OpenCode CLI tool

https://github.com/anomalyco/opencode/issues/7410
1•sergiotapia•10m ago•0 comments

We just open sourced the code-simplifier agent we use on the Claude Code team

https://twitter.com/bcherny/status/2009450715081789767
1•cleanexit0•10m ago•0 comments

SFC vs. VIZIO: who can enforce the GPL?

https://lwn.net/SubscriberLink/1052734/5903e175673caeef/
2•pabs3•12m ago•0 comments

GPLv2 and Installation Requirements

https://lwn.net/SubscriberLink/1052842/52c45fb8bcc3fade/
1•pabs3•12m ago•0 comments

Show HN: Open-source multimodal AI that runs in the browser

https://johnjboren.github.io/ai-assistant.html
1•EschatonCometh•14m ago•0 comments

Show HN: Layoffstoday – Open database tracking for 10k Companies

https://layoffstoday.io/
1•doremon0902•15m ago•0 comments

Pituffik Space Base

https://en.wikipedia.org/wiki/Pituffik_Space_Base
2•CGMthrowaway•16m ago•0 comments

From old English to modern American English in one monologue

https://www.youtube.com/watch?v=842OX2_vCic
1•gk1•16m ago•0 comments

Financial Hardship Shows Up in Baby Brains

https://nautil.us/how-financial-hardship-shows-up-in-baby-brains-1260476/
1•fleahunter•18m ago•0 comments

Testing 2 open-weight models across coding tasks: GLM 4.7 and MiniMax M2.1

https://blog.kilo.ai/p/open-weight-models-are-getting-serious
1•heymax054•18m ago•0 comments

When AI writes almost all code, what happens to software engineering?

https://newsletter.pragmaticengineer.com/p/when-ai-writes-almost-all-code-what
3•Brajeshwar•22m ago•0 comments

Show HN: A commitment model for usage billing

https://twitter.com/tryflexprice/status/2009226683849773430
1•sudeepsd__•22m ago•0 comments

Trump Lays Out a Vision of Power Restrained Only by 'My Own Morality'

https://www.nytimes.com/2026/01/08/us/politics/trump-interview-power-morality.html
8•Stevvo•23m ago•0 comments

Ask AI via Lightning payments (no accounts, no API keys, no stored history)

https://satsforai.com/
1•LightProx•25m ago•1 comments

The most popular Go dependency is

https://blog.thibaut-rousseau.com/blog/the-most-popular-go-dependency-is/
1•bzGoRust•28m ago•0 comments

Ralph Wiggum Experiment – Can AI meaningfully improve through iterative loops?

https://github.com/UtpalJayNadiger/ralphwiggumexperiment
1•iacguy•29m ago•0 comments

Implementing a web server in a single printf() call (2014)

https://tinyhack.com/2014/03/12/implementing-a-web-server-in-a-single-printf-call/
1•nateb2022•30m ago•1 comments

Kelly Evans: Goodbye, Google

https://www.cnbc.com/2026/01/07/kelly-evans-goodbye-google.html
1•cebert•33m ago•1 comments

Spirit Cave Resilience: How Do We Explain a 10k-Year Continuity

https://www.cambridge.org/core/journals/american-antiquity/article/spirit-cave-resilience-how-do-...
1•1659447091•35m ago•0 comments

Show HN: LSP Skill – IntelliSense for Coding Agents That Works

https://lsp-client.github.io/
1•observerw•42m ago•0 comments

Against the 'METR Graph'

https://arachnemag.substack.com/p/the-metr-graph-is-hot-garbage
1•zygmunt417•42m ago•0 comments

Cellular Landscape

https://gaelmcgill.artstation.com/projects/Pm0JL1
2•o4c•42m ago•0 comments

Is Craigslist the Last Real Place on the Internet?

https://www.wired.com/story/is-craigslist-the-last-real-place-on-the-internet/
6•susam•43m ago•1 comments

Lisa

https://github.com/blencorp/lisa
1•handfuloflight•46m ago•0 comments

Show HN: I built OnePlayer: A lightweight, Material 3 offline player

https://play.google.com/store/apps/details?id=com.googol.android.apps.oneplayer&hl=en_US
1•iZakirSheikh•46m ago•0 comments

Show HN: Call Your Loved Ones

https://cylo.mkaye.dev/
2•mrkaye97•46m ago•0 comments

Promise Theory

https://en.wikipedia.org/wiki/Promise_theory
1•dvrp•47m ago•0 comments