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: TimerVana a Local-first scheduler for real world routines

https://timervana.net/browse
1•granto•3m ago•0 comments

This Month in Ladybird – August 2026

https://ladybird.org/newsletter/2026-08-31/
2•exploraz•4m ago•0 comments

Ask HN: Why isn't there a cursor for video games development

1•JimsonYang•5m ago•1 comments

NextDNS: fully configurable DNS, accepts money from customers as business model

https://nextdns.io/
1•Arubis•9m ago•1 comments

Can guitar frets perform multiplication?

https://www.charlespetzold.com/blog/2026/09/Can-Guitar-Frets-Perform-Multiplication.html
2•wibbily•10m ago•0 comments

Christmas Village shoppers no longer will be allowed to enter booths

https://www.phillyvoice.com/christmas-village-booths-ada-compliance/
2•josephcsible•12m ago•1 comments

What Tech Titans Don't Understand About Sci-Fi

https://www.theatlantic.com/newsletters/2026/09/the-books-briefing-tech-titans-sci-fi-asimov-lepo...
4•cisc•16m ago•0 comments

Rust's Type Checker Implementation Is Unsound: An Empirical Study

https://arxiv.org/abs/2608.28713
2•pykello•17m ago•0 comments

Abliteration.ai is making a business out of removing AI guardrails

https://techcrunch.com/2026/09/03/abliteration-ai-is-making-a-business-out-of-removing-ai-guardra...
2•ndesaulniers•18m ago•0 comments

The Search Evaluation Ladder

https://www.searchplex.net/blog/search-evaluation-ladder
2•splxai•21m ago•0 comments

Los Angeles District Bans Most A.I. For Students

https://www.nytimes.com/2026/09/03/us/lausd-schools-ban-ai-artificial-intelligence.html
3•bookofjoe•35m ago•4 comments

Basic News – a Telegram bot with customizable news digests

https://basicnews.world/
1•xenohunter•37m ago•0 comments

A pre-registered test: can a business's rules be recovered from its data?

https://justinsmith.build/writing/everything-a-business-knows/
1•s14jsmith•40m ago•0 comments

What runs when you open a repository

https://veltron.cc/research/what-runs-when-you-open-a-repository
1•nulvec•40m ago•0 comments

Show HN: Time Wizard

https://huggingface.co/jadidbourbaki/time-wizard
1•jadidbourbaki•40m ago•0 comments

Show HN: Mongotar – Files to Prompt, and Back

https://github.com/sebastiancarlos/mongotar
1•httbs•41m ago•0 comments

Ask HN: Wolfram Cloud Is Out

1•smithmayowa•44m ago•0 comments

Almost half of ICANN-accredited registrars under the control of a single busines

https://domainincite.com/31912-dropcatch-acquires-300-more-registrars
7•dendark•44m ago•0 comments

SwiftTUI

https://swifttui.sh/
1•frizlab•46m ago•0 comments

Cloud Engineer

1•endowed7•46m ago•0 comments

Exhibit of 2026 AI Agents

https://agent-museum-2026.halstonsellentin.chatgpt.site
1•hsellentin•46m ago•0 comments

Understanding RabbitMQ in Simple Terms

https://sushantdhiman.dev/blog/understanding-rabbitmq/
1•birdculture•48m ago•0 comments

Record-High 89% in U.S. Say Government Corruption Widespread

https://news.gallup.com/poll/713933/record-high-say-government-corruption-widespread.aspx
21•karakoram•48m ago•4 comments

DaemonCore Launches a Slew of Free Pentesting Tools

https://www.daemoncore.app/
1•DaemonCoreApp•49m ago•1 comments

Big Crocs vs. Little Crocs

https://marcrandolph.substack.com/p/big-crocs-vs-little-crocs
1•fagnerbrack•50m ago•0 comments

Send interactive life coaching worksheets [video]

https://www.youtube.com/watch?v=gNW7sSXSoW4
1•shammadahmed•51m ago•0 comments

Make money from your menu bar

https://sponsorbar.io/
1•partsch•51m ago•0 comments

Gemini vs. Claude: Which AI Model created a better perfume?

https://www.youtube.com/watch?v=YfFk050AjPw
1•yipinwong•53m ago•1 comments

A Hundred Steps Back

https://www.inventbuild.studio/blog/a-hundred-steps-back-3d12f33c95138084bb9efc107cc54d13
1•virgil_disgr4ce•53m ago•0 comments

Actively exploited sandbox RCE in all Chromium versions

https://nvd.nist.gov/vuln/detail/cve-2026-85046
47•negura•59m ago•8 comments