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

About St Helena, in the South Atlantic Ocean

https://sainthelenaisland.info/index.htm
1•Redoubts•1m ago•0 comments

Batteries: The game has changed – and it's not what you think

https://pv-magazine-usa.com/2026/05/01/batteries-the-game-has-changed-and-its-not-what-you-think/
1•xbmcuser•2m ago•0 comments

Class Variance Authority

https://cva.style/docs
1•doener•13m ago•1 comments

Am I the only one who hates delivery robots?

https://www.latimes.com/entertainment-arts/story/2026-04-14/delivery-robots-creating-problems-gle...
3•robotlaunch•19m ago•0 comments

Driverless cars can now get citations; autonomous trucks approved for testing CA

https://abc7.com/post/california-dmv-issues-new-regulations-autonomous-vehicles-including-getting...
1•robotlaunch•19m ago•0 comments

OpenAI's o1 correctly diagnosed 67% of ER patients vs. 50-55% by triage doctors

https://www.theguardian.com/technology/2026/apr/30/ai-outperforms-doctors-in-harvard-trial-of-eme...
1•donsupreme•20m ago•0 comments

Show HN: A (de)compiler and parser/engine for custom Magic: The Gathering cards

https://chiplis.com/ironsmith/
1•nicolas-siplis•28m ago•0 comments

Introducing Advanced Account Security

https://openai.com/index/advanced-account-security/
1•Cider9986•34m ago•0 comments

Show HN: Use an Android Phone as an HTTP Proxy

https://github.com/vgaj/proxy
2•viru7•37m ago•0 comments

Find color palettes perfected over 500 years of master painting

https://paletteinspiration.com/
2•ouli•38m ago•0 comments

Blocking Copy Fail (CVE-2026-31431) in Kubernetes with Tetragon

https://isala.me/blog/mitigating-copy-fail-with-tetragon/
1•ajayvk•40m ago•0 comments

In real-world test, an AI model did better than doctors at diagnosing patients

https://www.npr.org/2026/04/30/nx-s1-5804474/ai-doctors-openai-patient-care-diagnosis
1•jawns•45m ago•0 comments

UnQLite Embedded Database Engine 1.2.1 Released

https://github.com/symisc/unqlite
1•symisc_devel•45m ago•0 comments

A Couple Million Lines of Haskell: Production Engineering at Mercury

https://blog.haskell.org/a-couple-million-lines-of-haskell/
11•unignorant•50m ago•0 comments

'Like science fiction': How a new wave of immunotherapy is eliminating cancers

https://www.bbc.com/future/article/20260410-how-a-new-wave-of-immunotherapy-is-eliminating-cancers
5•breve•1h ago•1 comments

Spirit Airlines' Abandoned Azure Booking APIs and Exposed Phishing Domains

https://braydenbte.substack.com/p/spirit-airlines-liquidation
5•BTheEPIC•1h ago•3 comments

China Pressure Canceled Largest Digital Human Rights Conference

https://www.404media.co/china-pressure-canceled-worlds-largest-digital-human-rights-conference/
7•Cider9986•1h ago•1 comments

The Google Scholar bug that erases researchers from their own work

https://matthewearnest.dev/blog/google-scholar-single-letter-surname
3•mearnest•1h ago•1 comments

Spine – verified codebase onboarding for Claude Code

https://github.com/ahmedbutt2015/spine
1•ahmedthefayyaz•1h ago•0 comments

What Silicon Valley layoffs hide about the future of the job market

https://www.yahoo.com/news/sectors/technology/articles/what-silicon-valley-layoffs-hide-about-the...
4•jnord•1h ago•0 comments

Buffon's Needle Problem Visualized

https://ivanludvig.dev/pi-needle/
2•IvanLudvig•1h ago•1 comments

EaglePress - Python3 CMS to blog

https://postwits.com/post/eaglepress-cms-latest-version
1•eagle10ne•1h ago•0 comments

Mousetrapped

https://mousetrappedcomic.blog
2•8organicbits•1h ago•1 comments

Show HN: FundSim – free browser LBO, DCF and IB deal simulator (no signup)

https://fundsimulate.com/
1•Nishkal2010•1h ago•0 comments

English Became My New Favorite User Interface

https://www.robot-future.com/preview/69e8284090457dba8223b433
2•busters4•1h ago•0 comments

AI is locking people out. At Scale

https://conesible.de/wab/
6•cdrnsf•1h ago•0 comments

VueBuds integrate low-res cameras and visual AI as a smart glasses alternative

https://spectrum.ieee.org/smart-earbuds-smart-glasses-privacy
3•sohkamyung•1h ago•0 comments

Ask HN: Is it possble to own Ask.com?

1•alexander2002•1h ago•0 comments

Pentagon strikes deals with 7 Big Tech companies after shunning Anthropic

https://www.cnn.com/2026/05/01/tech/pentagon-ai-anthropic
5•breve•1h ago•1 comments

Mac browser for a human that also gives coding agents local APIs

https://github.com/wkdomains/macos-app
2•fcpguru•1h ago•0 comments