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: A guided 3D Leonardo da Vinci museum, built in code

https://museumofages.org/w/vinci
1•micstradev•3m ago•0 comments

The operation of Starlink terminals in Ukraine was restricted above 160 kph

https://www.reddit.com/r/UkraineWarVideoReport/comments/1x5kefw/last_night_the_operation_of_starl...
1•jacquesm•8m ago•0 comments

Science Corp implants its vision-restoring chip in its first Stargardt patient

https://techcrunch.com/2026/10/13/science-corporation-implants-its-vision-restoring-chip-in-its-f...
1•bookofjoe•9m ago•0 comments

Ask HN: What is the current trajectory of a senior engineer?

2•guitarlimeo•9m ago•0 comments

Can I offer you a nice CI Pipeline in this trying time?

https://practicalai.co.nz/blog/6.html
1•sgrnz•12m ago•0 comments

Legendary FPS level designer Richard 'Levelord' Gray passes away at 68

https://www.shacknews.com/article/150993/richard-gray-levelord-obituary
2•neversaydie•14m ago•0 comments

Ask HN: Why does Windows Update overrite the Linux boot record?

1•roschdal•16m ago•1 comments

The Birth of Living God

https://vamaai.substack.com/p/the-birth-of-a-living-god-truth-appearance
2•hemantv•19m ago•0 comments

Plasma 6.8 – 30th Anniversary Edition

https://kde.org/announcements/plasma/6/6.8.0/
1•HieronymusBosch•21m ago•0 comments

When Bacteria Become Masons

https://ethz.ch/en/news-and-events/eth-news/news/2026/10/when-bacteria-become-masons.html
1•JeanKage•21m ago•0 comments

Haskell: Origins, evolution, and future. Peyton Jones at JuliaCon Global 2026 [video]

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

Free Website Traffic Checker

https://scopesynthesis.com/
1•tubesmedia•24m ago•0 comments

Basic Atomic Swap Proof of Concept

https://github.com/basicswap
2•dRK-U•24m ago•0 comments

Jane Goodall Supports Moby

https://www.facebook.com/mobymusic/videos/on-the-anniversary-of-jane-goodalls-passing-i-wanted-to...
1•hochmartinez•26m ago•0 comments

Who Is Planting Backdoors in Ledger Crypto Wallets?

https://www.zetter-zeroday.com/who-is-planting-backdoors-in-ledger-crypto-wallets/
3•hacb•26m ago•0 comments

Starlink restricted in Ukraine with no notice

https://malcontentnews.substack.com/p/starlink-restricted-in-ukraine-with
8•vrganj•30m ago•0 comments

RTX 5090 joins AirPods and cigarettes in Macau smuggling seizures

https://videocardz.com/newz/rtx-5090-once-a-consumer-gaming-card-is-now-on-smugglers-menu-alongsi...
2•theanonymousone•31m ago•0 comments

The Economic Complexity of the Western Roman Empire

https://www.michelecoscia.com/?p=2613
3•mikk14•31m ago•0 comments

How to read QR codes by hand (and make bad ones that work) [video]

https://www.youtube.com/watch?v=RYqX8CNgzwM
2•sandebert•31m ago•0 comments

AutoQuant KV: Automatic Mixed-Precision KV Cache Quantization

https://nvidia.github.io/Model-Optimizer/announcements/autoquant-kv.html
2•khalidkhair•34m ago•0 comments

AI isn't just a tool and it might be dangerous

https://waspdev.com/articles/2026-10-14/ai-is-not-just-a-tool-and-it-might-be-dangerous
1•senfiaj•34m ago•0 comments

Amazon pushes up prices across the Internet

https://www.not-ship.com/how-amazon-pushes-up-prices-all-across-the-internet/
4•sighborg•35m ago•0 comments

OpenAI Engineer Allegedly Hid Toilet Paper-Wrapped Mic in Conference Room

https://www.wsj.com/tech/ai/saudi-national-charged-with-bugging-openais-office-7e960aad
2•itisit•37m ago•0 comments

Hive – Coding Agens That Don't Clock Out

https://hive.admir-saheta.com/
2•admirxsaheta•45m ago•0 comments

Why I Wrote PGP (1991, revised 1999)

https://philzimmermann.com/EN/essays/WhyIWrotePGP.html
1•GaryBluto•46m ago•0 comments

DX Garden, DX7 and other FM patches and browser audition

https://dxgarden.ticalun.net
1•jstsch•49m ago•0 comments

Show HN: AI investment agreement review for startup founders

https://www.orchardagentic.cloud/#browse/funding-review
1•iop030290•50m ago•0 comments

Atomising Fraction Addition

https://fivetwelvethirteen.substack.com/p/atomising-fraction-addition
1•yorwba•52m ago•0 comments

Starlink limit hits Ukraine's drones. The battlefield depends on SpaceX

https://defence24.com/geopolitics/starlink-limit-hits-ukraines-drones-the-battlefield-depends-on-...
32•uxhacker•52m ago•14 comments

Accelerating Audio Processing with SpeexDSP Optimizations for RISC-V

https://riseproject.dev/2026/10/13/accelerating-audio-processing-with-speexdsp-optimizations-for-...
5•captain_bender•53m ago•0 comments