frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Open-Source Python Script Drives Social Media Phishing Campaign

https://reliaquest.com/blog/threat-spotlight-open-source-python-script-drives-social-media-phishi...
1•speckx•1m ago•0 comments

Show HN: I built a GPT that breaks logic into jokes

https://humoropedia.com/
1•RNMI•2m ago•0 comments

Show HN: I built an app to track Autopay bills and subscriptions in one place

https://play.google.com/store/apps/details?id=com.trackautopay.app&hl=en_US
1•vamsi9640•3m ago•0 comments

Poll: When will the thinking machines be destroyed?

1•Bender•4m ago•0 comments

Charity Majors - Bring Back Ops Pride

https://charitydotwtf.substack.com/p/bring-back-ops-pride
2•milkglass•4m ago•0 comments

Generating Shakespeare Without Neural Networks

https://nathan.rs/posts/shakespeare-n-gram/
1•nathan-barry•4m ago•0 comments

DSCI – dead simple CI – better testing call

http://deadsimpleci.sparrowhub.io/doc/demo
1•melezhik•5m ago•0 comments

Internet Archive's Storage

https://blog.dshr.org/2026/01/internet-archives-storage.html
1•zdw•5m ago•0 comments

Show HN: Xv6OS – A modified MIT xv6 with GUI

https://github.com/danko1122q/xv6-os
1•danko_os•5m ago•0 comments

Share and upvote startup ideas – Problem Hunt

https://twitter.com/raj_jagiasi/status/2013000466896998709
1•RJagiasi•6m ago•0 comments

Show HN: Web API with JavaScript rendering and prompt injection defense

https://quercle.dev
1•liran_yo•7m ago•0 comments

Should a Country Speak a Single Language? (2024)

https://www.newyorker.com/magazine/2024/11/25/should-a-country-speak-a-single-language
1•mooreds•7m ago•1 comments

MySQL 8.4 disables AHI – Why and What you need to know

https://kedar.nitty-witty.com/blog/mysql-8-4-disables-ahi-why-and-what-you-need-to-know
1•tanelpoder•9m ago•0 comments

Show HN: AI crawler access control for WordPress (allow, deny, teaser previews)

https://wordpress.org/plugins/openbotauth/
1•hammadtariq•9m ago•1 comments

Archives.design

https://archives.design
2•surprisetalk•10m ago•0 comments

Tips to spot an otter in the wild (2024)

https://www.wwt.org.uk/discover-wetlands/blog/12-tips-to-spot-an-otter-in-the-wild
1•surprisetalk•10m ago•0 comments

Old Games Download: Abandonware and Retrogaming

https://oldgamesdownload.com/
1•surprisetalk•10m ago•0 comments

Webb Compare (2024)

https://www.webbcompare.com/
1•surprisetalk•10m ago•0 comments

Hacker News London Meetup #6

https://www.meetup.com/hackernewslondon/events/312720206/
2•Wdorf•10m ago•1 comments

Artificial neurons that replicate biological function

https://viterbischool.usc.edu/news/2025/10/artificial-neurons-developed-by-usc-team-replicate-bio...
2•loh•12m ago•0 comments

Antithesis – The Deterministic Computer

https://mack.work/blog/antithesis
4•akshayshah•12m ago•0 comments

Humanizer: Claude Code skill that removes signs of AI-generated writing

https://github.com/blader/humanizer
1•ayhanfuat•13m ago•0 comments

'The old order is not coming back,' Carney says in provocative speech at Davos

https://www.cbc.ca/news/politics/carney-davos-speech-9.7052725
4•martythemaniak•13m ago•0 comments

As Greenland loses ice, global sea levels will rise–and its own will fall

https://www.science.org/content/article/greenland-loses-ice-global-sea-levels-will-rise-and-its-o...
1•bikenaga•14m ago•0 comments

Show HN: Gitstory – turn a GitHub profile into a proof-of-work page

https://www.gitstory.me
1•idocohenx•14m ago•0 comments

Short AIM-style interviews with technologists who helped create the internet

https://aiminterviews.com
2•sachinkesiraju•15m ago•1 comments

FreeBSD 15 trims legacy fat and revamps how OS is built

https://www.theregister.com/2025/12/05/freebsd_15/
1•Tomte•17m ago•0 comments

Show HN: I was burnt out and failing so I built AI that give shit about me

2•kaufy•18m ago•1 comments

What happens if you keep slowing down time? [video]

https://www.youtube.com/watch?v=P-4pbFcERnk
2•bookofjoe•18m ago•0 comments

Václav Havel: The Power of the Powerless

https://web.archive.org/web/20120107141633/http://www.vaclavhavel.cz/showtrans.php?cat=clanky&val...
1•verdverm•18m ago•0 comments