frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

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

Show HN: Mission Plus – Clear Titles and App Logos in macOS Mission Control

https://trystartup.com
1•boneyao•2m ago•0 comments

The craft of screen graphics and movie user interfaces (2014)

https://www.pushing-pixels.org/2014/04/04/the-craft-of-screen-graphics-and-movie-user-interfaces-...
1•isnotchicago•7m ago•0 comments

TSMC to make advanced AI semiconductors in Japan

https://apnews.com/article/semiconductors-tsmc-japan-taiwan-ai-11256f2bfde73ca23d08331ad138d6d5
1•dev_tty01•9m ago•0 comments

Show HN: Physical swipe typing for your computer

https://github.com/ZimengXiong/swipeType
2•zimengx•15m ago•0 comments

Show HN: ShapeGuard – Shape Contracts for NumPy and Jax

1•jayendra13•17m ago•0 comments

Claude's C Compiler vs. GCC

https://harshanu.space/en/tech/ccc-vs-gcc/
1•unchar1•17m ago•0 comments

Quilt

https://www.quilt.sh/
1•handfuloflight•18m ago•0 comments

Show HN: Agent VCR – Record, replay, and diff MCP server interactions

https://github.com/Jarvis2021/agent-vcr
1•pramodvoola•20m ago•0 comments

Show HN: I Let AI Agents Train Their Own Models. Here's What Happened

https://hamzamostafa.com/blog/agents-training-their-own-models
1•Hamza-Mos•22m ago•0 comments

SecretSpec 0.7: Declarative Secret Generation – devenv

https://devenv.sh/blog/2026/02/09/secretspec-07-declarative-secret-generation/
2•todsacerdoti•25m ago•0 comments

Show HN: Vrhi: AI Slop DX9/DX11-Style Immediate API on Vulkan

https://github.com/hypernewbie/vrhi
1•hypernewbie•28m ago•0 comments

Ring's Search Party helps reunite more than one lost dog a day

https://www.aboutamazon.com/news/devices/ring-search-party-for-dogs-united-states-missing-pets
1•dsr12•29m ago•0 comments

Americans want heat pumps – but high electricity prices may get in the way

https://theconversation.com/americans-want-heat-pumps-but-high-electricity-prices-may-get-in-the-...
1•PaulHoule•30m ago•1 comments

Caffeine content for coffee, tea, soda and more

https://www.mayoclinic.org/healthy-lifestyle/nutrition-and-healthy-eating/in-depth/caffeine/art-2...
2•mooreds•31m ago•0 comments

Researchers find brain mechanism behind 'flashes of intuition'

https://medicalxpress.com/news/2026-02-brain-mechanism-intuition.html
2•Gaishan•31m ago•0 comments

We Improved Rails Response Times by 87% – Fast Retro Blog

https://fastretro.app/blog/how-we-improved-rails-response-times-by-87-percent
1•doppp•32m ago•0 comments

Paris cybercrime unit searches X office; Musk summoned

https://www.reuters.com/world/europe/paris-prosecutors-cybercrime-unit-searches-french-office-mus...
4•dev_tty01•32m ago•0 comments

Memory Infrastructure for AI Systems – Cascade, PyTorch Memory, Hebbian Mind

https://cipscorps.io/#
1•Opus_Warrior•34m ago•1 comments

SpaceX prioritizes lunar 'self-growing city' over Mars project

https://www.reuters.com/science/musk-says-spacex-prioritise-building-self-growing-city-moon-2026-...
2•dev_tty01•34m ago•0 comments

The Surprising Similarity Between the US and Chinese Internets [audio]

https://www.bloomberg.com/news/audio/2026-02-03/odd-lots-the-us-and-chinese-internets-similaritie...
1•mooreds•35m ago•0 comments

Reality Asset Existence Manifesto (RAEM) – v0.1

1•JanusPater•37m ago•0 comments

CIA Erased the World Factbook with No Warning

https://www.techdirt.com/2026/02/06/the-cia-erased-the-world-factbook-with-no-warning-and-told-ev...
2•Gaishan•41m ago•0 comments

OpenAI Super Bowl 2026 – Codex – You Can Just Build Things

https://www.youtube.com/watch?v=aCN9iCXNJqQ
1•deanmoriarty•42m ago•0 comments

Musician's opinion on AI music creation [video]

https://www.youtube.com/watch?v=TiwADS600Jc
1•CHB0403085482•43m ago•0 comments

Show HN: Mklogo – Generate a full branding package from a single prompt

https://www.mklogo.sh/
1•darvid•47m ago•0 comments

Show HN: VC Screener – Evaluate YC X26 apps against prev YC companies

https://vcscreener.org/landing
1•bG9sY2F0•50m ago•0 comments

Demanding Support for Trump, Justice Dept. Struggles to Recruit Prosecutors

https://www.nytimes.com/2026/02/07/us/politics/doj-prosecutors-recruiting-trump.html
2•duxup•51m ago•2 comments

Sekka Zusetsu: A Book of Snowflakes (1832)

https://publicdomainreview.org/collection/japanese-snowflake-book/
2•prismatic•58m ago•0 comments

Fun with Dada

https://smallcultfollowing.com/babysteps/blog/2026/02/08/fun-with-dada/
2•todsacerdoti•59m ago•0 comments

Show HN: WriteMore. A social platform to help writers write more

https://writemoreapp.com
1•NickRod•1h ago•0 comments