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

82nd Airborne Division Using AI to Support 'Project Freedom'

https://www.wral.com/news/local/82nd-airborne-division-ready-support-project-freedom-iran-war-may...
1•Noaidi•55s ago•0 comments

Cryptographic hashing as a transformer attention head

https://github.com/ffr1/unbounded-context-attention
1•SkorpSeven•59s ago•0 comments

Show HN: Design Taste for AI Agents

https://aidesigntaste.com/
3•novateg•12m ago•0 comments

Incus 7.0 LTS has been released

https://discuss.linuxcontainers.org/t/incus-7-0-lts-has-been-released/26641
1•ropyeett•17m ago•1 comments

Two alleged murder plots brought India, US and Canada to a diplomatic crisis

https://www.bloomberg.com/features/2025-india-sikh-separatist-deaths/
4•areoform•17m ago•0 comments

Makúh Residencial – buy land in Yucatán with an online quote tool and financing

https://makuhresidencial.com/
1•Sabu87•19m ago•0 comments

From Nand to Tetris

https://www.nand2tetris.org
1•lopespm•25m ago•0 comments

Perspectival Ball Mixing

https://www.mint-teapot.com/balls/perspective/
1•mint-teapot•28m ago•0 comments

Chinese court rules firms can't lay off workers on AI grounds

https://fortune.com/2026/05/03/chinese-court-layoffs-workers-ai-replacement-labor-market/
2•latexr•31m ago•1 comments

CollectorVision Part 8: The Sol Ring Benchmark –Testing Hardest Card Recognition

https://blog.hanclin.to/posts/gh-26/
3•fragmede•32m ago•0 comments

Codex's precision and attention to detail is *crazy* when set up correctly

3•ditchfieldcaleb•34m ago•2 comments

Whole-body ultrasound captures full cross-sections in 10 seconds

https://medicalxpress.com/news/2026-04-body-ultrasound-captures-full-sections.html
3•PaulHoule•44m ago•0 comments

DeepSeek V4 Pro: The First Chinese Model at the Frontier

https://foodtruckbench.com/blog/deepseek-v4-pro
3•nnx•46m ago•0 comments

Show HN: Better Design – 28 Shadcn design systems (OSS, MCP: Cursor/Claude Code)

https://github.com/marvkr/better-design
3•marvinkr•48m ago•0 comments

The Physics Behind the Thumb on Hose Trick

https://practical.engineering/blog/2026/5/5/the-physics-behind-the-thumb-trick
3•sohkamyung•49m ago•0 comments

VECT: Ransomware by Design, Wiper by Accident

https://research.checkpoint.com/2026/vect-ransomware-by-design-wiper-by-accident/
2•gnabgib•49m ago•0 comments

Apache HTTP Server: HTTP2: double free and possible RCE on early reset

https://www.cve.org/CVERecord?id=CVE-2026-23918
3•IncandescentGas•50m ago•0 comments

We Analyzed 20 Most Common Fake WordPress Plugins. Here's What They Do

https://blog.imunify360.com/20-most-common-fake-wordpress-plugins
2•shaunpud•52m ago•0 comments

Izeria.com a website/app to discover spots and gamify visiting your local area

https://www.izeria.com/en
3•eltados•53m ago•3 comments

Human brain changes after first psilocybin use

https://www.nature.com/articles/s41467-026-71962-3
5•karma_daemon•56m ago•2 comments

Ubuntu Is Run by "N00bs" (and It Shows)

https://techrights.org/n/2026/05/05/Ubuntu_is_Run_by_N00bs_and_It_Shows.shtml
4•amcclure•57m ago•1 comments

How much of the scientific literature is generated by AI?

https://www.nature.com/articles/d41586-025-03504-8
2•warbaker•59m ago•0 comments

IronMap – Self-hosted fitness tracker with community gym equipment database

https://github.com/bhman792/ironmap
2•bhman79•59m ago•0 comments

An atmosphere around a tiny, icy world beyond Pluto

https://apnews.com/article/pluto-atmosphere-kuiper-belt-c6b0ec2e0631f47c25ce18479b14e1ed
4•tcp_handshaker•1h ago•0 comments

AI tools could enable bioterrorism

https://www.economist.com/science-and-technology/2026/05/05/how-ai-tools-could-enable-bioterrorism
5•pseudolus•1h ago•1 comments

AI Has America's Oldest Monopoly Problem – Part 1

https://easydays.substack.com/p/ai-has-americas-oldest-monopoly-problem
5•marcammann•1h ago•0 comments

How SSA Makes Long Context Practical

https://subq.ai/how-ssa-makes-long-context-practical
3•sirobg•1h ago•0 comments

Ukrainian forces test direct-to-device satellite imagery for frontline troops

https://spacenews.com/ukrainian-forces-test-direct-to-device-satellite-imagery-for-frontline-troops/
4•tcp_handshaker•1h ago•0 comments

When a Search Stack Starts to Strain

https://www.searchplex.net/blog/when-a-search-stack-starts-to-strain
3•eskimo87•1h ago•0 comments

Beware the Man of One Study (2014)

https://www.slatestarcodexabridged.com/Beware-The-Man-Of-One-Study
3•caminanteblanco•1h ago•0 comments