frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•6mo 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•6mo 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•6mo 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: TidesDB – A storage engine that outperforms RocksDB

https://github.com/tidesdb/tidesdb
1•alexpadula•2m ago•0 comments

Russia Bans Roblox

https://www.bbc.com/news/articles/cn41q11gy58o
4•disqard•7m ago•0 comments

Cassette tapes are making a comeback. Yes

https://theconversation.com/cassette-tapes-are-making-a-comeback-yes-really-268108
3•devonnull•11m ago•0 comments

Trees – J Wiki

https://code.jsoftware.com/wiki/User:Devon_McCormick/Trees
1•todsacerdoti•17m ago•0 comments

I Think I Found Something Weird About Physical Constants

https://quantummarmelade.substack.com/p/i-think-i-found-something-weird-about
2•obius_prime•26m ago•1 comments

Thieves are starting to steal RAM now that it's as expensive as gold

https://www.tomshardware.com/pc-components/ddr5/package-theft-leaves-pc-builder-without-ddr5
1•pabs3•28m ago•0 comments

Why is Anthropic saying "software engineering is done"?

https://www.augmentedswe.com/p/ai-augmented-software-engineering
2•wordsaboutcode•34m ago•2 comments

Rare earths startup Vulcan Elements scores $600M US federal government deal

https://www.ft.com/content/952f37ba-78b4-42a4-8d1b-2258de65f2c0
2•petethomas•38m ago•0 comments

Nano Banana Pro – AI Image Editor with Perfect Text Rendering and 4K

https://nanobanana.org
2•MikeMoh•41m ago•1 comments

From stadiums to cyberspace: How the metaverse will redefine sports fandom

https://phys.org/news/2025-11-stadiums-cyberspace-metaverse-redefine-sports.html
1•PaulHoule•48m ago•1 comments

Show HN: From Personal Script to Public Tool – How I Built a Windows Setup Gen

https://kaicbento.substack.com/p/from-personal-script-to-public-tool
2•kaicbento•50m ago•0 comments

New homes in London were delayed by 'energy-hungry' data centres

https://www.bbc.com/news/articles/c0mpr1mvwj3o
17•1659447091•50m ago•1 comments

Euler Conjecture and CDC 6600

https://fortran-lang.discourse.group/t/euler-conjecture-and-cdc-6600/10501
8•zaikunzhang•51m ago•1 comments

Show HN: Kling O1 Image –Consistent Image Generation from Multi-Reference Inputs

https://www.klingo1ai.net/kling-o1-image
1•lu794377•54m ago•0 comments

AI coaching tool for Engineering Managers

https://www.managercommit.dev/
1•kentwills•54m ago•0 comments

How Epstein Infiltrated the Silicon Valley Network Behind Trump's New Tech Order

https://bylinetimes.com/2025/12/03/how-epstein-infiltrated-the-silicon-valley-network-behind-trum...
10•salkahfi•56m ago•0 comments

Marvell Acquires Celestial AI

https://techstartups.com/2025/12/03/top-tech-news-today-december-3-2025/
1•CodeCrusader•1h ago•0 comments

Automatic fix for React CVE-2025-55182

https://neurolint.dev/
1•Just_Clive•1h ago•2 comments

Static analysis to prevent Zip Bombs and architectural bottlenecks

https://codeprot.com/articles/program-performance.html
1•allenz_cheung•1h ago•3 comments

The 'extinct' antelope bringing hope in the Sahara Desert

https://www.bbc.com/future/article/20251202-the-extinct-antelope-bringing-hope-in-the-sahara-desert
2•1659447091•1h ago•0 comments

Show HN: Win Setup Generator – My setup script turned into an open-source tool

https://kaic.me/win-post-install/
1•kaicbento•1h ago•0 comments

KEF: A file format for easy encryption/decryption of data

https://github.com/tpkarras/KEF
3•tpkarras•1h ago•0 comments

Apple to resist India order to preload state-run app as political outcry builds

https://www.reuters.com/sustainability/boards-policy-regulation/apple-resist-india-order-preload-...
3•happyopossum•1h ago•1 comments

Can you discover unknown elements by calculating their spectra?

https://www.scannedinavian.com/can-you-discover-unknown-elements-by-calculating-their-spectra.html
2•shae•1h ago•0 comments

JWST discovers an ancient Milky Way-like spiral galaxy

https://scienceclock.com/jwst-discovers-alaknanda-milky-way-twin-galaxy/
7•ashishgupta2209•1h ago•0 comments

Show HN: Video Watermark Remover – Remove Watermarks from Videos Instantly

https://vdraw.ai/video-watermark-remover
1•larkin_ward•1h ago•0 comments

'End-to-end encrypted' smart toilet camera is not end-to-end encrypted

https://techcrunch.com/2025/12/03/end-to-end-encrypted-smart-toilet-camera-is-not-actually-end-to...
7•bparsons•1h ago•1 comments

Understand Research Papers

https://knowthepaper.com/
2•harryhoffman•1h ago•0 comments

Show HN: A free AI Room Design tool that redesigns any room in seconds

https://vdraw.ai/ai-room-design
6•passioner•1h ago•0 comments

Ask HN: Time Travel

2•jsxyzb•1h ago•2 comments