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

You'll miss publishers when they're gone

https://bell.bz/youll-miss-publishers-when-theyre-gone/
1•ingve•2m ago•0 comments

Open Source 3D Emoji

https://googlefonts.github.io/noto-emoji-files/
1•lacieargyle•5m ago•0 comments

Show HN: tuisheet, a terminal spreadsheet compatible with OpenXML (xlsx) files

https://github.com/krackout/tuisheet
1•krackout•7m ago•0 comments

Show HN: Rabbit Hole – a daily Wikipedia racing game

https://rabbitholegame.net
2•harrylb14•8m ago•0 comments

Clicks Communicator

https://clicks.tech/en/communicator
2•FinnLobsien•10m ago•0 comments

Microsoft exec called AI scraping 'the largest theft of labor in human history'

https://techcrunch.com/2026/09/17/microsoft-exec-called-ai-scraping-the-largest-theft-of-labor-in...
10•pluc•17m ago•1 comments

Bring Your Own Agent

https://www.bugsink.com/blog/bring-your-own-agent/
2•vanschelven•18m ago•1 comments

On the Internet, nobody knows you're a dog

https://en.wikipedia.org/wiki/On_the_Internet,_nobody_knows_you%27re_a_dog
1•chistev•19m ago•2 comments

OpenJev

https://openjev.com/
5•ilreb•20m ago•1 comments

MostroEuropa is now a trusted Mostro community

https://mostro.community
1•shadowbip•21m ago•1 comments

Where Does the Quantum World End and Ours Begin?

https://www.quantamagazine.org/where-does-the-quantum-world-end-and-ours-begin-20260917/
1•jnord•21m ago•0 comments

Russia Uses Super App Max to Spy on Citizens

https://www.theguardian.com/world/2026/sep/18/russian-super-app-max-spy-citizens
2•endymi0n•25m ago•0 comments

Why Germany Is Building an Ark for U.S. Climate Data

https://e360.yale.edu/features/germany-us-climate-data
1•latexr•25m ago•0 comments

Show HN: Shellroute – give each shell its own proxy IP

https://github.com/shellroute/shellroute-cli
1•civilis•28m ago•1 comments

Slop Grenades, AI Didn't Make Delivery Free – Food for Agile Thought 562

https://age-of-product.com/food-agile-thought-562-slop-grenades/
1•swolpers•31m ago•0 comments

Security Through Obfuscation Is Dead

https://www.robinglauser.ch/blog/2026/09/11/security-through-obfuscation-is-dead/
3•nahakiole•33m ago•0 comments

Proton partners with Apertus, Switzerland's sovereign AI model

https://proton.me/blog/lumo-apertus-partnership
1•HelloUsername•36m ago•1 comments

The C++20's u8/char8_t Backward-Compatibility Fiasco

https://giodicanio.com/2026/09/11/the-c-plus-plus-20-s-u8-char8_t-fiasco/
2•jandeboevrie•40m ago•0 comments

Reception answers calls 24/7

https://www.reception.ai/
1•soltanov•41m ago•0 comments

Show HN: Atlarix – A Browser Agent

https://www.atlarix.dev/extension
2•Amariah•41m ago•0 comments

Chinese companies doubled down on science after US tech restrictions

https://www.nature.com/articles/d41586-026-02946-y
4•giuliomagnifico•42m ago•0 comments

Probably – a programming language for LLM workflows, powered by Jev

https://probably-lang.southpolesteve.workers.dev/
3•porridgeraisin•44m ago•0 comments

Robotic lab sets up and runs optics experiments on demand

https://news.mit.edu/2026/robotic-lab-runs-optics-experiments-on-demand-0917
2•KaushikR2•47m ago•0 comments

Tin: full-text search for Postgres

https://planetscale.com/blog/introducing-tin
2•ksec•48m ago•1 comments

Nestbalm

https://nestbalm.com/welcome
2•nikolaytonev•50m ago•0 comments

GWOT at 25 with Wesley Morgan

https://www.chinatalk.media/p/gwot-at-25-with-wesley-morgan
2•baud147258•54m ago•0 comments

Dozenal

https://dozenal.game
2•sarreph•56m ago•0 comments

Ask HN: Experiences with Anthropic's Cyber Verification Program?

3•zuInnp•56m ago•0 comments

Could AI and synthetic biology = bioweapons?

https://www.celinegounder.com/p/anthropic-claude-ai-bioweapons-biosecurity
3•gone35•1h ago•0 comments

Show HN: Three short quizzes that show a score pattern, not one type

https://loretypes.com/
2•owen090•1h ago•0 comments