frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•7mo 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•7mo 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•7mo 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).

The snail farm don: The most brazen tax avoidance scheme of all time

https://www.theguardian.com/news/ng-interactive/2025/dec/04/the-long-read-snail-farm-tax-avoidanc...
1•gmays•1m ago•0 comments

Measuring the Adoption of TLS ECH and Its Forebear in the Wild (2023)

https://web.archive.org/web/20250701041935/https://link.springer.com/chapter/10.1007/978-3-031-25...
1•1vuio0pswjnm7•3m ago•0 comments

SpaceX Plans to Go Public. Why?

https://arstechnica.com/space/2025/12/after-years-of-resisting-it-spacex-now-plans-to-go-public-why/
1•wintercarver•4m ago•0 comments

Why Private Equity Buyouts Are Taking the Wheel of Indian Businesses

https://taghash.io/blog/why-private-equity-buyouts-are-taking-the-wheel-of-indian-businesses/
1•koolhead17•5m ago•0 comments

The Word, the Name, the Fire (Book)

https://wordnamefire.com/
1•nuevita70•6m ago•1 comments

How I Streamlined My Development Workflow – A Game Changer for Productivity

1•quchao•23m ago•1 comments

When Money Buys Thinking: A New Day in the Life of Developers

https://tamnd.notion.site/2c74b9c1b50d8049b160f073cf773187
1•tamnd•24m ago•0 comments

Show HN: Record iOS Screen with Gestures Included

https://demoscope.app/#ios
1•admtal•30m ago•0 comments

Show HN: MiddleDrag: Three-finger trackpad gestures for middle-click on macOS

https://github.com/NullPointerDepressiveDisorder/MiddleDrag
1•NullPointerDD•31m ago•1 comments

America's Debanking Witch Hunt Finds No Evil

https://www.bloomberg.com/opinion/articles/2025-12-11/debanking-witch-hunt-finds-no-evildoing-in-...
1•petethomas•35m ago•0 comments

Show HN: I got my site down to 237kb by ditching Google Analytics

https://deadstack.net/
1•dreadsword•35m ago•0 comments

Malware found in the subtitles of a fake Leonardo DiCaprio movie torrent

https://www.bitdefender.com/en-us/blog/labs/fake-leonardo-dicaprio-movie-torrent-agent-tesla-powe...
2•CGMthrowaway•37m ago•1 comments

Monumental snake engravings of the Orinoco River (2024)

https://www.cambridge.org/core/journals/antiquity/article/monumental-snake-engravings-of-the-orin...
1•bryanrasmussen•37m ago•0 comments

Rethinking armed group control (2022)

https://odi.org/en/publications/rethinking-armed-group-control/
1•bryanrasmussen•39m ago•0 comments

Modos open source e-paper monitor development update

https://www.crowdsupply.com/modos-tech/modos-paper-monitor/updates/highlights-certifications-and-...
2•Curiositry•42m ago•0 comments

Untreated sleep apnea raises risk of Parkinson's, study finds

https://medicalxpress.com/news/2025-11-untreated-apnea-parkinson.html
2•PaulHoule•43m ago•0 comments

Gemini model that would train on all gmail

1•orena•43m ago•0 comments

Show HN: Advent of Acro – A frameworkless PHP/JS video advent-calendar

https://advent.vs.digital/
1•schuhwerk•44m ago•0 comments

Google is building an experimental new browser and a new kind of web app

https://www.theverge.com/tech/842000/google-disco-browser-ai-experiment
3•cryptoz•45m ago•0 comments

Show HN: UJAS – An open-source hiring platform (like WordPress for hiring)

https://github.com/gemini45840-cmyk/UJAS
1•jayteetech•50m ago•0 comments

Mark V Shaney

https://en.wikipedia.org/wiki/Mark_V._Shaney
1•djoldman•53m ago•0 comments

Mercury Personal Banking

https://mercury.com/personal-banking
2•gregimba•1h ago•6 comments

Historic Flooding in Western Washington

https://www.kuow.org/stories/go-now-100-000-evacuated-in-historic-skagit-flood
1•measurablefunc•1h ago•0 comments

Mathgpt.today for Discord

https://mathgpt.today/
1•umeedsto•1h ago•1 comments

6.7 Magnitude Earthquake Strikes Off Northeast Japan

https://www.newsweek.com/6-7-magnitude-earthquake-strikes-off-northeast-japan-11199276
3•ls-a•1h ago•1 comments

Rescued at Sea: How Venezuela's Machado Survived the Riskiest Leg of Her Escape

https://www.wsj.com/world/americas/rescued-at-sea-how-venezuelas-machado-survived-the-riskiest-le...
1•petethomas•1h ago•1 comments

Jonathan Blow has spent the past decade designing 1,400 puzzles for you

https://arstechnica.com/gaming/2025/12/jonathan-blow-has-spent-the-past-decade-designing-1400-puz...
3•furcyd•1h ago•0 comments

Show HN: PowerKit for Tmux – 32 Plugins

https://github.com/fabioluciano/tmux-powerkit
1•fabioluciano•1h ago•0 comments

Forget flowers: These ancient plants attract pollinators by getting hot

https://www.npr.org/2025/12/11/nx-s1-5637486/ancient-heat-producing-plants-glow-infrared-scent-no...
2•andsoitis•1h ago•0 comments

Show HN: ProdE – code change impact and root cause analysis for large codebases

https://prode.ai/
1•curious_nile•1h ago•2 comments