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: An AI-friendly CLI for public space data

https://www.npmjs.com/package/spacedata
1•oscarjpicazo•3m ago•0 comments

Topics, Not Feeds

https://blogsreader.com
1•jdeibele•3m ago•1 comments

America used to be exceptionally patriotic. Now we're below average

https://www.natesilver.net/p/america-used-to-be-exceptionally
1•7777777phil•4m ago•1 comments

The Concordance, a music-reactive sculpture that turns sound into metal

https://sand-morph.up.railway.app/concordance
1•echohive42•7m ago•0 comments

Show HN: Static Site Generator

https://github.com/MTBBK/OSMAN
2•MTBBK•9m ago•0 comments

Utilize.internet – Browser-based file tools, nothing uploaded

https://utilizeinternet.com/
2•faisalhaleem•11m ago•0 comments

The First Labor Congressman: How Milwaukee's Labor Movement Elected Henry Smith

https://greysidewalk.substack.com/p/the-first-labor-congressman-how-milwaukees
2•PostingThings•12m ago•0 comments

Films of 2026:Q2

https://scottsumner.substack.com/p/films-of-2026q2
2•paulpauper•14m ago•0 comments

Not Dark Yet

https://agoodhardstare.substack.com/p/not-dark-yet
2•paulpauper•14m ago•0 comments

Why Being Overqualified Is a Risk

https://newsletter.bphogan.com/archive/issue-52-run-coding-models-locally-and-why-being/
2•mooreds•14m ago•0 comments

My Side-Project, a Multitool Harness for Unreal Engine and Claude Code

https://github.com/oliver-io/unreal-harness
2•oliver-io•15m ago•0 comments

Tesla Robotaxi Launches in Miami

https://twitter.com/robotaxi/status/2073030246161367153
2•spikels•15m ago•0 comments

Baby Busts and Growth Booms: Demographic Change and the Macroeconomy [pdf]

https://economics.mit.edu/sites/default/files/2026-06/Baby%20Busts%20and%20Growth%20Booms%20-%20D...
2•paulpauper•15m ago•0 comments

Jensen Huang's signed leather jacket could fetch up to $60K in charity auction

https://www.tomshardware.com/peripherals/wearable-tech/jensen-huangs-iconic-signed-leather-jacket...
2•LorenDB•17m ago•0 comments

Show HN: Auto-continue Claude Fable 5 the second your 5-hour limit lifts

https://github.com/wavever/CCLimitPing
2•wavever•18m ago•0 comments

PDFx: Extension of the traditional PDF standard-store multiple files together

https://github.com/AlexandrosGounis/pdfx
2•thunderbong•19m ago•0 comments

We run sandboxes for agents at scale

https://adapt.com/blog/orchestrating-agent-sandboxes
3•scsmithr•23m ago•1 comments

Avian-style respiration allowed gigantism in pterosaurs (2014)

https://journals.biologists.com/jeb/article/217/15/2627/12175/Avian-style-respiration-allowed-gig...
2•Eridanus2•24m ago•0 comments

The MJ Rathbun case: How an autonomous AI bot cyberbullied a human programmer

https://chatgptdesactualizado.blogspot.com/2026/07/mj-rathbun-chronicles-of-first-bully.html
3•ErrorHunter•24m ago•2 comments

ClawdMojis – A Clawd for Every Occasion

https://github.com/afspies/ClawdMoji
1•afspies•25m ago•0 comments

AI agents are not your "coworkers"

https://www.technologyreview.com/2026/06/29/1139849/ai-agents-are-not-your-coworkers/
2•ashumz•26m ago•0 comments

Meta reuses old RAM in new servers with custom bridge chip

https://www.networkworld.com/article/4192827/meta-reuses-old-ram-in-new-servers-with-custom-bridg...
2•ihsw•26m ago•0 comments

Show HN: Kontext – Move an AI chat's full context to another AI in one click

https://github.com/anuragmerndev/kontext-ai
1•anuragmerndev•26m ago•0 comments

Microsfoft "completely reimagined" access denied screen across Microsoft 365

https://twitter.com/onedrive/status/2072773050991264140
1•SG-•27m ago•0 comments

How to Enjoy John Ashbery

https://joshuacorey.substack.com/p/how-to-enjoy-john-ashbery
1•Caiero•32m ago•0 comments

Show HN: Track Token usage for major platforms,know your token flow

https://www.lifehacksgermany.com/en
2•1Kapish•33m ago•0 comments

GPT 5.5 (high) is as good at coding as Claude Fable (medium) at a lower cost

https://deepswe.datacurve.ai/
3•handfuloflight•34m ago•0 comments

Who Gets to Monetize the Open Web?

https://mitch.website/blog/disproportionate-impacts/
1•hyperultra•36m ago•0 comments

Show HN: I ran 400 hours of interviews, so I built the tool I wished existed

1•ud0•36m ago•0 comments

Gap between closed and open models might be much smaller than commonly assumed

https://old.reddit.com/r/LocalLLaMA/comments/1ukp2bu/the_gap_between_closed_and_open_models_might...
1•johnnyApplePRNG•38m ago•0 comments