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

HTML6 the Distributed Specification

https://www.html6.network/
1•tpwalinga•44s ago•0 comments

A code inspection of 'serious' LLM-generated code

https://ea.rna.nl/2026/10/27/serious-coding-with-llms-lab-notes-2026-10-27-a-code-audit-of-llm-ge...
1•gctwnl•53s ago•1 comments

Show HN: Markdown is 40× more token-efficient with SQLite

https://www.withnative.ai/research-and-posts/markdown-context-benchmark
1•richardcrng•2m ago•0 comments

Here Be Monsters: What Do You Still Need to Know When Agents Do the Work?

https://blog.adrq.dev/here-be-monsters-what-do-you-still-need-to-know-when-agents-do-the-work
2•adrq•3m ago•0 comments

ReaderFunded, a search engine ranked by whether readers pay for sites

https://readerfunded.com/
2•ggeorgi•3m ago•0 comments

Same price, different reason: Probing AI pricing agents for collusion

https://www.maxtaylor.me/articles/same-price-different-reason-probing-ai-pricing-agents-for-collu...
1•max-t-dev•3m ago•0 comments

AI Talent War Has Quant Firms Racing to Fund PhDs, Build Labs

https://www.bloomberg.com/news/articles/2026-10-27/ai-talent-war-has-quant-firms-racing-to-fund-p...
2•wslh•3m ago•0 comments

Reverse-engineered MLB The Show 16's servers to play it online on RPCS3 emulator

https://github.com/MatRanc/mlb16-revival-server
1•matranc•5m ago•0 comments

We're Missing a Kind of Asteroid

https://signoregalilei.com/2026/10/11/were-missing-an-entire-kind-of-asteroid/
1•surprisetalk•6m ago•0 comments

Zero-shot anomaly detection with Timestral

https://github.com/mourjo/zero-shot-forecasting/
1•mourjo•7m ago•0 comments

Show HN: Which big sites block AI training crawlers but let AI search in

https://getkavel.com/ai-crawlers/
1•alishaikha•8m ago•1 comments

eMudhra are now blocking access to their certificate revocation list

https://bugzilla.mozilla.org/show_bug.cgi?id=2085612
2•deadliftdouche•10m ago•2 comments

Hi Accords – an open draft of AI principles that anyone can vote on

https://github.com/hiaccords/hi-accords
1•hiaccords•10m ago•0 comments

The Cloudflare PHP Capture the Flag Challenge

https://blog.cloudflare.com/php-ctf/
2•ilreb•11m ago•0 comments

Static reasoning can't prove runtime behavior: benchmark of AI PR reviewers

https://www.heal.dev/benchmark
3•batikha•12m ago•1 comments

Reading a novel chapter by chapter: how Authrot's scanner evolved

https://authrot.app/blog/how-authrot-reads-a-novel
1•JoeOfTexas•13m ago•1 comments

Friendly UI and server and agent for local LLMs

https://github.com/yudhanjaya/Zest
1•icaruswept•13m ago•1 comments

2026 ChatGPT Ads Holiday Playbook

https://webinar.openai.com/2026-chatgpt-ads-holiday-playbook/
2•iamflimflam1•13m ago•0 comments

An AI-assisted break of the Enigma M4 Triton message of 6 March 1945

https://cryptocellar.org/bgac/the-m4-triton-break.html
1•makmanalp•15m ago•0 comments

Native addon camouflage: 42 armed GitHub repos reveal hidden NPM publisher

https://research.jfrog.com/post/beyond-testmetest-42-hijacked-github-repos/
1•wondersky•17m ago•0 comments

A free point and click adventure game in the browser teaching you Drupal AI

https://macpackwala.workflows-of-ai.com/
1•marcus_johansso•19m ago•0 comments

Industry Knew for Decades That Microplastics Could Infiltrate Human Bodies

https://e360.yale.edu/digest/chemical-industry-microplastics
1•YaleE360•19m ago•0 comments

Show HN: Samosa – Linter for Math Derivations

https://samosa-math.vercel.app
1•Hussain04•20m ago•0 comments

Why still do Graphic Design [video]

https://www.youtube.com/watch?v=fs2GpXHE3Os
2•gessha•21m ago•0 comments

Greg Abbott Took $9M from Data-Center Donors. Now He Regulates Them

https://www.gadgetreview.com/greg-abbott-took-9m-from-data-center-donors-now-he-regulates-them
2•robtherobber•22m ago•0 comments

Apple Creator Studio adds powerful new AI features and more creative tools

https://www.apple.com/newsroom/2026/10/apple-creator-studio-adds-powerful-new-ai-features-and-eve...
2•johnbehnke•22m ago•1 comments

Show HN: CiteWing – AI backlink outreach agent

https://citewing.com/
1•tomhan245•22m ago•0 comments

The Actual State of Machine Translation

https://redvice.org/2026/actual-state-of-mtl/
1•1317•22m ago•0 comments

Dollar and 12 peers: 79%+ of purchasing power destroyed in just three episodes

https://eco3min.fr/en/inflation-episodes-currencies/
1•latentframe•23m ago•0 comments

Apple Announces iMac with M6

https://www.apple.com/newsroom/2026/10/apple-unveils-new-imac-with-m6/
1•notfried•23m ago•0 comments