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: Kithland – a creature-collecting RPG you play in the browser

https://play.kithland.com/
1•alepacheco-dev•44s ago•0 comments

Bitcoin drops below $50k on fears AI will crack its encryption

https://www.cnbc.com/2026/12/04/bitcoin-price-today-quantum-fears.html
1•zzzeek•1m ago•0 comments

Black Forest Labs releases new foundational LLM

https://bfl.ai/research/flung
1•mnewme•1m ago•0 comments

If Character.AI is sold, who protects the private chats of its global users?

https://restofworld.org/2026/character-ai-bankruptcy-auction-user-data-privacy/
3•billybuckwheat•2m ago•0 comments

Elon Musk admits Tesla HW3 cars shipped with a defective chip

https://electrek.co/2026/12/04/musk-admits-tesla-hw3-chip-defect-millions/
4•cisc•2m ago•0 comments

Probabilistic counting, adding, and dividing for approximate Morris counters (as [pdf]

https://math.berkeley.edu/~rdshah/probabilistic_counters/probabilistic_counting.pdf
2•fanf2•3m ago•0 comments

Long Before Open Marriages Hit the Mainstream, Warren Buffett Did His Thing

https://www.nytimes.com/2026/12/02/style/warren-buffett-astrid-menks-susie-buffett-marriage.html
1•babelfish•3m ago•1 comments

The T480 Is Back: My FreeBSD 15.1 Laptop, from Boot to Browser

https://hofstede.it/the-t480-is-back-my-freebsd-151-laptop-from-boot-to-browser/
1•dverlaeckt80•4m ago•0 comments

Big Pharma Overpays for M&A

https://www.baybridgebio.com/blog/pharma_overpay_ma
1•aaavl2821•4m ago•0 comments

Redesigning a 23 year old casual Windows game

https://iconicgames.com/devlog/finding-the-game-in-qubx-2.html
1•phpencil•5m ago•0 comments

Breaking a key would cost at least 12M USD if there is an n^1/3 attack

https://twitter.com/benediktbuenz/status/2128869023299277221
1•extraextra•5m ago•0 comments

How Terrorists Are Weaponizing A.I

https://www.nytimes.com/video/opinion/100000011323292/how-terrorists-are-weaponizing-ai.html
2•xbryanx•8m ago•1 comments

Show HN: Free party games in the browser, phone and laptops

https://joinme.games
1•beapped•10m ago•0 comments

Owning Mathematics When Proofs Are Cheap: Guest Post by Mark Braverman

https://scottaaronson.blog/?p=10448
1•crescit_eundo•10m ago•0 comments

Quantum computers made of superconducting qubits reach milestone

https://www.science.org/content/article/quantum-computers-made-superconducting-qubits-reach-miles...
2•gmays•11m ago•0 comments

Beating Qwen3.5-2B on tool calling while being 4.4x cheaper

https://contrastivelabs.com
2•AZDR•11m ago•0 comments

From Ukraine to South America: Criminal organizations use of attack drones

https://www.kcl.ac.uk/from-ukraines-trenches-to-south-americas-borders-and-favelas-criminal-organ...
1•fidotron•12m ago•0 comments

CoreWeave Shows Markets Open for Chip Debt Deals, If Not Itself

https://www.bloomberg.com/news/articles/2026-12-04/coreweave-shows-markets-open-for-chip-debt-dea...
1•petethomas•12m ago•0 comments

EU may vote on authorising Tesla assisted-driving system at Dec 15 meeting

https://www.reuters.com/technology/eu-may-vote-authorising-tesla-assisted-driving-system-dec-15-m...
1•tosh•16m ago•0 comments

The GradScaler implosion: how filtered-out NaN gradients became NaN weights

https://www.gilesthomas.com/2026/12/gradscaler-implosion-nans-from-filtered-nans
2•gpjt•17m ago•0 comments

Darling: Steam, WebKit and the Road to Mac OS 9

https://blog.darlinghq.org/2026/12/03/steam-webkit-and-the-road-to-mac-os-9/
3•LubosD•17m ago•0 comments

Show HN: TypePart – Text to CAD that measures the part it made

https://typepart.com
3•AlexandrBel•18m ago•0 comments

GenoPix evolves images from 1-bit noise using a decision model

https://genopix.dmotz.net/
1•dmotz•21m ago•1 comments

GitHop: Jump to GitHub Locations

https://addons.mozilla.org/en-US/firefox/addon/githop/
1•madprops•22m ago•0 comments

Answering your questions about Anthropic's lattice cryptography results

https://blog.trailofbits.com/2026/12/01/answering-your-questions-about-anthropics-lattice-cryptog...
1•mikemo88•23m ago•0 comments

Show HN: Pushq – MIT-licensed, self-hostable alternative to BullMQ, GCP Task

https://pushqueue.dev/
2•spidi123q•23m ago•0 comments

Show HN: Seeing if possible to play with spacetime via browser

https://github.com/dvelton/spacetime-split
2•deevelton•23m ago•0 comments

Agent memory experiment: 0/20 with a search tool, 20/20 after one prompt line

https://github.com/hitl-systems/agent-memory-experiment
2•gamebit07•25m ago•0 comments

France will vote in favour of Tesla Assisted Driving

https://twitter.com/PhilippeTabarot/status/2128806633266413803
1•tosh•26m ago•0 comments

Garage v2.6.0

https://garagehq.deuxfleurs.fr/blog/2026-11-webadmin-release/
3•amirmasoudabdol•26m ago•0 comments