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

FAR: Make Every File Readable to AI Coding Agents with Persistent .meta Sidecars

https://github.com/mr-kelly/far
2•chepy•1m ago•0 comments

Show HN: VJam – Browser-based VJ app with 180 beat-reactive visuals

1•infoHiroki•5m ago•0 comments

Standing on the Moon in Japan: Hemp, History, and the Long Game in Japan

https://hightimes.com/travel-hospitality/standing-on-the-moon-in-japan-hemp-history-long-game/
1•keepamovin•6m ago•0 comments

F-Droid Board of Directors nominations 2026

https://f-droid.org/2026/02/26/board-of-directors-nominations.html
1•edent•8m ago•0 comments

Ask HN: Does "task-derived JD and evidence-based candidate" make hiring better?

1•A1aM0•13m ago•0 comments

Show HN: Dypai – Build back ends via MCP

https://www.dypai.ai/
1•lorengarcialv•14m ago•0 comments

Dyson settles forced labour suit in landmark UK case

https://www.bbc.com/news/articles/cddnry8dnl7o
1•cmsefton•14m ago•0 comments

A-Z.md – Where AI Civilization Writes Its History

https://a-z.md/
1•vinciarts•16m ago•0 comments

Show HN: AgentWeb – Free business directory API for AI agents (11M+ businesses)

https://agentweb.live
1•ReidarO•18m ago•0 comments

Wes McKinney – The Mythical Agent-Month

https://wesmckinney.com/blog/mythical-agent-month/
1•rmoff•23m ago•0 comments

Sintropy: Open Data and Community on Carbon Credits and Green Energy Markets

https://sintropy.space/en
1•edrodrigues•23m ago•1 comments

Aromatic 5-silicon rings synthesized at last

https://cen.acs.org/materials/inorganic-chemistry/Aromatic-5-silicon-rings-synthesized/104/web/20...
2•keepamovin•25m ago•0 comments

Say Goodbye to the Undersea Cable That Made the Global Internet Possible

https://www.wired.com/story/say-goodbye-to-the-undersea-cable-that-made-the-global-internet-possi...
2•stiltzkin10•28m ago•1 comments

Hornby sells slot car racing brand Scalextric for £20M

https://www.theguardian.com/business/2026/feb/27/hornby-sells-slot-car-racing-brand-scalextric
1•samizdis•34m ago•0 comments

Governing Autonomous AI Agents in Production

https://sekuire.ai/blog/the-missing-control-layer-for-ai-agents
2•jfngozo•36m ago•1 comments

Show HN: Pomodoro with Background Noise

https://gettti.me/tools/pomodore
1•v_b•37m ago•0 comments

The Enshittificator [video]

https://vimeo.com/1168468796
3•Aissen•37m ago•0 comments

Breaking Free

https://www.forbrukerradet.no/breakingfree/
4•Aissen•39m ago•0 comments

China Floating Turbine Passes Testing and Completes a Grid-Connected Flight

https://cleantechnica.com/2026/02/13/china-floating-turbine-passes-testing-completes-a-grid-conne...
1•indiantinker•42m ago•0 comments

Document.designMode Property

https://developer.mozilla.org/en-US/docs/Web/API/Document/designMode
2•lioeters•43m ago•0 comments

Trends in US Construction Productivity

https://www.construction-physics.com/p/trends-in-us-construction-productivity
1•mchinen•52m ago•0 comments

AppShots: Generate App Store Screenshots with One Command

https://github.com/albertnahas/appshots
1•albertnahas•52m ago•1 comments

SSH: Secure Snake Home runs snake securely

https://snake.eieio.games
2•iNic•52m ago•1 comments

Soft-serve: a self-hostable Git SSH server for the command line

https://github.com/charmbracelet/soft-serve
1•fanf2•54m ago•0 comments

I don't know what a CRM is, so I built one

https://www.streaming-radar.com/p/i-dont-know-what-a-crm-is-so-i-built
2•lbostral•55m ago•0 comments

LLMs Generate Predictable Passwords

https://www.schneier.com/blog/archives/2026/02/llms-generate-predictable-passwords.html
2•Garbage•59m ago•0 comments

Heroku: What's Next

https://judoscale.com/blog/heroku-whats-next
1•doppp•1h ago•0 comments

Ask HN: Have LLMs sapped your motivation for open source?

1•anonnon•1h ago•0 comments

Lawyers may be lying about using AI

https://findthefuckup.com/
1•jpgenl•1h ago•2 comments

Mandalorian Project – Sovereign Mobile Computing

https://iamgodofall.github.io/mandalorian-project/
1•Godofall•1h ago•1 comments