frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Police corporal created AI porn from driver's license pics

https://arstechnica.com/tech-policy/2026/04/state-police-corporal-created-porn-deepfakes-from-dri...
1•Bender•2m ago•0 comments

Mystery over 8 missing or dead scientific experts

https://www.newsweek.com/mystery-over-8-missing-or-dead-experts-linked-to-ufo-research-11792852
1•ZunarJ5•6m ago•0 comments

What Playboy got right about men – Lust and literacy can coexist

https://unherd.com/2026/04/what-playboy-got-right-about-men/
2•pseudolus•10m ago•1 comments

I built a portfolio platform for creators (FelixPro.space)

https://www.felixpro.space
2•asabajumah•16m ago•0 comments

Sam Altman's Coworkers Say He Can Barely Code and Misunderstands Basic Concepts

https://futurism.com/artificial-intelligence/sam-altman-technical-coding
5•cebert•21m ago•2 comments

The Economics of Software Teams: Why Most Organizations Are Flying Blind

https://www.viktorcessan.com/the-economics-of-software-teams/
1•gpi•21m ago•0 comments

Vibe-Coded Ext4 for OpenBSD

https://lwn.net/Articles/1064541/
1•signa11•21m ago•0 comments

The role of LLMs in patch review

https://lwn.net/Articles/1064830/
1•signa11•22m ago•0 comments

Stream your terminal. Watch AI agents work. Like Twitch, for shells

https://github.com/sderosiaux/twitch-terminal
1•chtefi•23m ago•0 comments

The many failures leading to the LiteLLM compromise

https://lwn.net/Articles/1064693/
3•signa11•24m ago•1 comments

S3 for Non Technical Folks

https://bucketdrive.app/blog/how-to-give-non-technical-users-access-to-s3.html
2•justpeek•28m ago•0 comments

You Are Not the One – Chinese Dating Dystopia

https://terminaldrift.substack.com/p/you-are-not-the-one-chinese-dating
2•Natsu•28m ago•0 comments

Key ocean current is slowing at locations around the Atlantic

https://www.newscientist.com/article/2522463-key-ocean-current-is-slowing-at-locations-around-the...
1•bluerooibos•29m ago•0 comments

Show HN: SmolVM – open-source sandbox for coding and computer-use agents

https://github.com/CelestoAI/SmolVM
4•theaniketmaurya•30m ago•0 comments

Scientists have uncovered a "blind spot" in the research on rising seas

https://e360.yale.edu/features/sea-level-rise-land-subsidence
2•bluerooibos•32m ago•0 comments

OSS model's can't replicate the Mythos findings, it was a lie

https://github.com/stanislavfort/mythos-jagged-frontier/blob/main/prompts/openbsd-sack.md
1•kannthu•32m ago•1 comments

FT turned Bill Phillips' in-aquo macroecons simulator into VR app

https://www.ft.com/content/547a3fea-378d-45ec-a2cb-cb157ea7a9b4
1•curio_Pol_curio•35m ago•0 comments

Financial Times Phillips Machine VR App

https://apps.apple.com/us/app/ft-money-machine/id6569262299
1•curio_Pol_curio•37m ago•0 comments

Scientists invented a fake disease. AI told people it was real

https://www.nature.com/articles/d41586-026-01100-y
1•DrewADesign•55m ago•1 comments

Show HN: We scored 495 real SoC 2 audit reports – nearly all got a D or F

https://soc2quality.trenta.ai
3•rituraj_tiwari•1h ago•1 comments

Trinity-Large-Thinking: Scaling an Open Source Frontier Agent

https://www.arcee.ai/blog/trinity-large-thinking
3•somethingsome•1h ago•0 comments

Soul.md – A Meditation on AI Identity

https://soul.md/
2•znpy•1h ago•0 comments

GoScrapy: New Fast Web Scraping with Go (Built for Concurrency)

https://github.com/tech-engine/goscrapy
1•stonework•1h ago•0 comments

Mexico's President Sheinbaum Decrees Universal Healthcare for 120M

https://thedeepdive.ca/mexicos-president-sheinbaum-decrees-universal-healthcare-for-120-million/
3•testing22321•1h ago•1 comments

Show HN: AnimTOON – AI that animates SVGs with 3-4x fewer tokens than OmniLottie

https://github.com/srk0102/AnimTOON
2•srk0102•1h ago•0 comments

Open Source Alternative to Claude Managed Agents

https://agents.opencomputer.dev
5•iacguy•1h ago•1 comments

Bespoke OLAP: Using AI to Synthesize Workload-Specific DBMS Engines from Scratch

https://ucbskyadrs.github.io/blog/bespoke-olap/
1•matt_d•1h ago•0 comments

You know what I haven't ever seen? a good blogpost from an AI

1•wrqvrwvq•1h ago•0 comments

PC Repair OKC

https://okcitpros.com/
1•Veritaco•1h ago•1 comments

Automatic U.S. military draft registration planned by December, filing shows

https://www.cnbc.com/2026/04/09/military-draft-registration-automatic-iran-war.html
5•MilnerRoute•1h ago•3 comments