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

Founders, your tech startup is not going public

https://sudbh11.substack.com/p/founders-your-software-company-is
1•sudbh11•1m ago•0 comments

Show HN: Bye-wk – Hide World Cup news from your feed

https://github.com/Braitenberg/bye-wk
1•kjex0•3m ago•0 comments

Designing a Symbol Layer

https://getreuer.info/posts/keyboards/symbol-layer/index.html
1•firephox•6m ago•0 comments

Is Privacy the Latest Luxury?

https://www.ft.com/content/185a3419-a760-468b-b71e-59095ab874e2
1•petethomas•6m ago•0 comments

Ask HN: How to avoid stressing yourself because of a micromanager?

2•ciwolex•6m ago•0 comments

Run your laptop from your couch – couchpilot

https://github.com/zkalykov/couchpilot
1•zkalykov•7m ago•0 comments

The Geomblog: The "Fable" of Anthropic and the USG

http://blog.geomblog.org/2026/06/the-fable-of-anthropic-and-usg.html
1•donohoe•8m ago•0 comments

Visa Vulnerability Agentic Harness (built with Mythos)

https://github.com/visa/visa-vulnerability-agentic-harness
1•binyu•11m ago•0 comments

Cambrian Explosion: When Complexity Met Complexity

https://medium.com/@rbridges_40571/the-cambrian-explosion-when-complexity-met-complexity-76d56f0f...
1•cleansingfire•11m ago•1 comments

Closed AI Risks being hostile to startups

1•nyxtom•12m ago•0 comments

Turn your site into a place people can bump into each other

https://cauenapier.com/blog/townsquare_release/
1•birdculture•14m ago•1 comments

Human Routers of Machine Words

https://borretti.me/article/human-routers-of-machine-words
3•zx321•19m ago•0 comments

This too shall pass

https://en.wikipedia.org/wiki/This_too_shall_pass
2•password54321•20m ago•0 comments

OpenDevOps – An open-source AI agent that investigates AWS/Azure incidents

https://github.com/AhmadHammad21/OpenDevOps
1•ahmadhammad01•23m ago•0 comments

Show HN: Made an online 3D Tarot reading

https://tarots.world
1•Arvmor•24m ago•0 comments

Storyz.com

https://www.storyz.com/
1•link_see•26m ago•3 comments

Clara – AI phone agent that answers calls 24/7 for local businesses

https://brandbooststudio.co/clara
2•rtsubber•38m ago•0 comments

Chatbot teddies for three‑year‑olds? Why AI toys are risky for kids

https://www.rnz.co.nz/life/wellbeing/chatbot-teddies-for-three-year-olds-why-ai-toys-are-risky-fo...
4•billybuckwheat•38m ago•0 comments

The coming war over face cameras

https://www.computerworld.com/article/4184202/inside-the-coming-war-over-face-cameras.html
4•mikelgan•38m ago•2 comments

90%+ of all fab litho equipment that has ever been made is still being used

https://twitter.com/IanCutress/status/2064530740038287638
2•JumpCrisscross•41m ago•0 comments

NoodleRack: Modular Synth in the Browser

https://noodlerack.com
3•kesor•42m ago•1 comments

Post‑match summary reports for all FIFA World Cup 2026

https://www.fifatrainingcentre.com/en/fifa-world-cup-2026/match-report-hub.php#
1•luispa•44m ago•0 comments

Intel Should Raise Capital

https://newsletter.semianalysis.com/p/intel-should-raise-capital
1•JumpCrisscross•45m ago•0 comments

User reported bug skill to help the agent debug

https://github.com/Anhydrite/user-reported-bug-skills
1•anhydrite•46m ago•0 comments

Certain of the One Thing They Can't Explain

https://hari.computer/certainty-is-the-signature
1•markovblanket•48m ago•0 comments

Amazon and the White House Ended Anthropic's Fable

https://www.axios.com/2026/06/13/anthropic-amazon-white-house
7•themgt•52m ago•1 comments

Anthropic Halts Foreign Accesss to Fable 5 and Mythos 5

https://catenaa.com/industries/technology/anthropic-halts-foreign-accesss-to-fable-5-and-mythos-5/
2•NewsCatenaa•52m ago•2 comments

Flight Emissions Calculator

https://github.com/bartvm/flight-emissions
1•bartvm•53m ago•0 comments

Amazon CEO's Talks with U.S. Officials Triggered Crackdown on Anthropic Models

https://www.wsj.com/tech/ai/amazon-ceos-talks-with-u-s-officials-triggered-crackdown-on-anthropic...
2•TravisJamison•53m ago•2 comments

The AI Bubble Monitor

https://cepr.net/publications/ai-bubble-monitor/
1•mooreds•53m ago•0 comments