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

Cooperation Between Autonomous LLM Agents in the Prisoner's Dilemma

https://www.researchgate.net/publication/417439900_Cooperation_Between_Autonomous_LLM_Agents_in_t...
1•marojejian•24s ago•1 comments

Porting My Bots to Netlify

https://www.raymondcamden.com/2026/11/13/porting-my-bots-to-netlify
1•speckx•2m ago•0 comments

Lean in the Browser

https://klauria.tech/lean-wasm/
1•kurinikku•3m ago•0 comments

Russia loses almost half a million lives in war on Ukraine

https://www.ft.com/content/7377e093-d58e-4303-853a-5aa82b6a747e
4•pretext•4m ago•0 comments

Embracing Multi-Agent Development

https://tombedor.dev/multi-agent-orchestration/
1•jjfoooo4•4m ago•0 comments

Nvidia launches GR00T 2 and Isaac Lab 3.0 at CoRL

https://www.therobotreport.com/nvidia-launches-gr00t-2-isaac-lab-3-0-corl/
2•gmays•6m ago•0 comments

Expozine at 25: Has the Independent Print Scene Outgrown Expozine?

https://www.themain.com/articles/expozine-montreal-independent-print-scene-arcmtl
1•rdmuser•10m ago•1 comments

Show HN: Little Boxes, 20 Tic Tac Toe variants (and counting)

https://apps.apple.com/fr/app/little-boxes/id6777767346
1•thiht•11m ago•0 comments

Ampoule: Pack an Elixir or Erlang release into one executable

https://filipecabaco.github.io/ampoule/
1•clessg•11m ago•0 comments

Déjà View: Looping Transformers for Multi-View 3D Reconstruction

https://research.nvidia.com/labs/dvl/projects/dvlt/
1•pretext•11m ago•0 comments

A dumb copyright law makes it illegal to remove the spyware from your own TV

https://boingboing.net/2026/11/12/fountain-pen-fulu-smart-tv-spyware-dmca.html
3•DeepLogin•13m ago•2 comments

The Chinese city powering the country's AI ambitions with data farms

https://www.nbcnews.com/world/asia/china-ai-data-center-construction-inner-mongolia-rcna608934
1•ivewonyoung•14m ago•0 comments

DNS resolution failures in macOS 26 and 27

https://wadetregaskis.com/dns-resolution-failures-in-macos-26-27/
1•speckx•14m ago•0 comments

Using LLMs outside of reflection is an anti-pattern

1•jcarmackdaddy•14m ago•0 comments

Who do websites think you are? Browser fingerprint test

https://who.1ms.dog/
1•eustoria•15m ago•1 comments

QuantumScape unveils Osprey all-solid-state cell: 1,000 cycles at 1 ATM

https://electrek.co/2026/11/11/quantumscape-osprey-all-solid-state-sulfide-battery/
1•cisc•16m ago•0 comments

Paperwall: Design Without the Paywall

https://manoharys.github.io/paperwall/
1•eustoria•17m ago•0 comments

AI Company Employees Should Unionize

https://www.astralcodexten.com/p/ai-company-employees-should-unionize
1•LalAkash•18m ago•0 comments

Show HN: Host a site, content, or stream from a browser tab, served over WebRTC

https://fmrl.live
1•bromney•18m ago•0 comments

DeepMind opens the datasets behind its AI weather models

https://deepmind.google/blog/opening-the-datasets-behind-our-ai-weather-models/
2•ersinesen•18m ago•0 comments

Putting all your eggs in the Microsoft basket

https://insights.integrity360.com/microsoft-outage-is-relying-on-a-single-technology-provider-bec...
1•eustoria•18m ago•0 comments

Building a rocket is hard. AST SpaceMobile thinks it's "simple."

https://arstechnica.com/space/2026/11/building-a-rocket-is-hard-ast-spacemobile-thinks-its-simple/
1•titusblair•19m ago•0 comments

Chuck and Hakeem Won't Leave

https://mann.cool/leave/
1•O1111OOO•19m ago•0 comments

Marco Roth: Teaching Rails to Read Its Own Template

https://rubyonrails.org/2026/11/13/on-rails-marco-roth-herb-reaction-view
1•robbyrussell•19m ago•0 comments

Make math practice tests from existing tests (3rd to 8th grade)

https://www.testdupe.com/
1•polycycle•19m ago•1 comments

Nscale warns it needs more cash ahead of $35B IPO

https://www.ft.com/content/8d5a8642-d0a1-458d-aaa4-c1e7d344fe47
1•toomuchtodo•21m ago•1 comments

Kitesurf is now open source

https://blog.cloudflare.com/kitesurf-open-source/
1•acossta•21m ago•1 comments

Terry Rozier accused in new NBA betting claim

https://press-start.gla.ac.uk/public/journals/1/submission_421_334_coverImage_en.html?io0=9ZUJ5
1•hivuixo•21m ago•0 comments

A board game where you play an AI lab CEO racing to AGI [video]

https://www.youtube.com/watch?v=SXnxZuntM0w
1•pricepinner•22m ago•0 comments

How the U.S.'s biggest news union is fighting an AI onslaught

https://www.fastcompany.com/91637688/newsguild-jon-schleuss-ai-human-journalists
1•postalex•23m ago•0 comments