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

Craft: A Tendon-Driven Hand with Hybrid Hard-Soft Compliance

https://craft-hand.github.io/
1•olalonde•34s ago•0 comments

The Heavy Cloud: Hydrosocial Dispossession and the Water Coloniality of AI Infra

https://rgs-ibg.onlinelibrary.wiley.com/doi/10.1002/geo2.70113
1•raybb•3m ago•0 comments

Two Dimensional Version Control

https://www.redblobgames.com/blog/2026-09-27-jujutsu-experience/
1•birdculture•3m ago•0 comments

Open dataset of prompt-injection CVEs with a monthly threat index

https://promptinjections.de/threat-index/zahlen/
1•koeseo•6m ago•0 comments

Silicon Valley Promises AI Will Cure Disease. Drugmaker CEOs Aren't Buying It

https://www.wsj.com/tech/ai/silicon-valley-promises-ai-will-cure-disease-drugmaker-ceos-arent-buy...
3•zzzeek•6m ago•1 comments

Web frameworks overtrust the HTTP Forwarded: header

https://www.lkoskela.fi/blog/2026-11-05-forwarded-without-question/
1•fanf2•7m ago•0 comments

New drug could be cure for common cause of high blood pressure

https://www.theguardian.com/society/2026/nov/08/new-drug-high-blood-pressure-baxdrostat
2•tosh•8m ago•0 comments

Show HN: LLM-cost-watch – Ask Claude why your LLM bill jumped

https://github.com/rohith0707/llm-cost-watch
1•rohith0707•10m ago•0 comments

A Unicode Escape Can Turn a Java Comment into Executable Code

https://octri.dev/blog/java-unicode-escape-comment
1•khalidkhair•10m ago•0 comments

Playing Zork 1 on a CP/M emulator on Linux

https://kevinboone.me/cpmzork.html
2•linuxkernal•16m ago•2 comments

Show HN: Hackertube for Roku TV

https://github.com/piyushkhemka/hackertube-roku-app
1•piyushkhemka•16m ago•0 comments

I built a mailing list where strangers write every email

https://maxgirkins.com/writings/email-lottery
2•mgirkins•17m ago•0 comments

Show HN: Is your product AI slop?

https://slopcalculator.com/
1•nshelia•17m ago•0 comments

Show HN: Elo Ratings for Tests, ODIs, and T20Is

https://outside-edge.github.io/side_order/
1•neehao•20m ago•0 comments

Torrents Are Perfect for Model Distribution

https://pirateface.co/articles/every-ai-model-should-be-a-torrent
3•pirateface•21m ago•0 comments

What Should We Learn? What LLMs Taught Me: Understanding Isn't Producing

https://dennysora.me/en/thoughts/what-should-we-learn-in-the-ai-era/
1•dennysora-main•24m ago•0 comments

Show HN: 3-SAT: Let me show you 500K variables

https://zenodo.org/records/23933428
1•8lamaster8•29m ago•0 comments

(Artificial) Intelligence as a political construct

https://aworkinglibrary.com/writing/toolmen
1•supriyo-biswas•29m ago•1 comments

Show HN: Recto – A tool that lets you visually edit what coding agents create

https://recto.design/
5•maroofkhan2007•32m ago•4 comments

Goldman Sachs Is Pulling Claude Code from Its Bankers and Traders

https://www.thestateofai.com/news/goldman-sachs-claude-code-traders-bankers
52•TheWiggles•33m ago•9 comments

Western Design Center

https://westerndesigncenter.com/wdc/
2•brcmthrowaway•38m ago•0 comments

Sem86: A Full-System Emulator Without Hard-Coded Semantics

https://liblisa.nl/sem86/
1•matt_d•43m ago•0 comments

NASA Seeks Next Generation of Explorers to Join Astronaut Corps

https://www.nasa.gov/news-release/nasa-seeks-next-generation-of-explorers-to-join-astronaut-corps/
1•phyzix5761•43m ago•0 comments

Rethinking Virtual Machine Monitors for Better Security in Clouds [pdf]

https://rusnikola.github.io/files/redwood-middleware26.pdf
1•matt_d•44m ago•0 comments

Show HN: Figma for Investing

https://www.aulico.com/tradespaces/new
1•rendernos•45m ago•0 comments

NASA seeks next generation of astronauts to live and work on the moon

https://www.theguardian.com/science/2026/nov/08/nasa-astronauts-moon-applications-open
3•devonnull•50m ago•0 comments

The efficiency trap: why optimising everything can backfire, badly

https://www.theguardian.com/books/2026/nov/08/the-efficiency-trap-why-optimising-everything-can-b...
8•billybuckwheat•50m ago•0 comments

The same work on a third of the tokens: tuning a fleet of coding agents

https://alexmarquardt.com/ai-tools/agent-fleet-token-efficiency/
3•alexmarquardt•52m ago•0 comments

Advanced Meditation Alters Consciousness and Our Basic Sense of Self

https://www.scientificamerican.com/article/advanced-meditation-alters-consciousness-and-our-basic...
1•mck-•52m ago•0 comments

Show HN: Email-like interface to review, decide, and annotate agent work

https://plannotator.ai/inbox/
5•ramoz•53m ago•0 comments