frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•1y 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•1y 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•1y 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).

The Last Boring Slide

https://twitter.com/fluxxrider/status/2125622238481371372
1•cmarschner•25s ago•0 comments

Hegseth, Pentagon officials floated using wartime law to reappoint Nvidia CEO

https://www.washingtonpost.com/technology/2026/11/25/hegseth-pentagon-officials-floated-using-war...
1•elffjs•25s ago•0 comments

Amazon says hackers' AI agents found and exploited 0-day with little human input

https://arstechnica.com/security/2026/11/amazon-says-hackers-ai-agents-found-and-exploited-0-day-...
1•gmays•29s ago•0 comments

Show HN: Hush, computer use for AI agents that runs in the background

https://github.com/OgnjenAdzic28/hush
1•Ogi28•1m ago•0 comments

Typed Indices in Zig

https://lvignoli.eu/posts/2026-11-16-typed-indexes-in-zig/
1•signa11•2m ago•0 comments

Game Autoresearch Bench: Can AI agents train strong game bots on a budget?

https://gameautoresearch.github.io/
1•luu•4m ago•0 comments

A Chinese Town Full of Vibecoders: What Afra Wang Saw in Liangzhu

https://www.bloomberg.com/news/articles/2026-11-23/how-everyday-chinese-people-are-adopting-ai
1•Alien1Being•6m ago•0 comments

History as a Social Feed

https://twitter.com/rakshithxaloori/status/2125811639513690550
1•rakshith_aloori•7m ago•0 comments

Show HN: Talira – Search engine for software, built for AI agents

https://talira.ai/
1•nathan_f77•9m ago•0 comments

Browser Tabs as a Container Runtime

https://fzakaria.com/2026/11/25/browser-tabs-as-a-container-runtime
2•setheron•13m ago•0 comments

A perfectly normal scripting language

https://psychoscript.com/
1•hn-aarvin•14m ago•1 comments

Pause anywhere: OpenCode's new bytecode VM for codemode

https://jamesbox.exe.xyz/vmblog/
2•doppp•17m ago•1 comments

Information Compression Challenges

https://gertlabs.com/challenge
1•gertlabs•26m ago•0 comments

Could astronomers be closing in on a hidden planet beyond Neptune?

https://ras.ac.uk/news-and-press/research-highlights/could-astronomers-be-closing-hidden-planet-b...
1•geox•33m ago•0 comments

Doug Lea's Malloc

https://gee.cs.oswego.edu/dl/html/malloc.html
1•grep_it•39m ago•0 comments

In which a traveling salesman digs π out of LLM temperature math

https://www.hexbites.dev/stories/2026-11-25-pi-from-simulated-annealing.html
1•kromych•44m ago•0 comments

Solar Wanderer – A 1:1 real-time solar system explorer in the browser

https://github.com/hyqzz/Solar-Wanderer
2•JulieZhao00•45m ago•0 comments

A Physical Password Manager that doesn't keep your data

https://hackaday.io/project/207443-lomenett-usb-password-manager
1•sidkukert•46m ago•0 comments

Usaciv – the United States as a strategy game

https://karpathy.ai/usaciv/
2•gmays•56m ago•0 comments

Why would a country ask to stay least developed?

https://finshots.in/archive/why-would-a-country-ask-to-stay-least-developed/
3•vismit2000•1h ago•0 comments

Qualcomm's Oryon 3 Reaches the Top

https://chipsandcheese.com/p/qualcomms-oryon-3-reaches-the-top
9•wmf•1h ago•0 comments

HNSW Hit Memory and Filter Wall: Elasticsearch, OpenSearch Faiss, Qdrant, Milvus [video]

https://www.youtube.com/watch?v=fnZiKAPpn-A
1•massengine•1h ago•0 comments

Get notified when a new vulnerability is exploited

https://pushout.app/@cve
3•vasanthv•1h ago•0 comments

OpenAI cuts GPT-6.2 usage: Astra hits limits 40% faster, Sol 25% faster

https://twitter.com/thsottiaux/status/2125784147889393806
37•Herrera•1h ago•12 comments

Darts SAM – A free darts autoscorer that uses your webcams

https://dartssam.co.uk/
1•indigodaddy•1h ago•0 comments

Ask HN: What IDE do you use and how many agents touch your tickets before merge?

1•DesaiAshu•1h ago•0 comments

Show HN: Olumino, a Markdown notes and spaced repetition app

https://olumino.app
5•Wiyseful•1h ago•5 comments

Britain needs to cut its mental-health benefits bill

https://www.economist.com/leaders/2026/11/25/britain-needs-to-cut-its-mental-health-benefits-bill
2•andsoitis•1h ago•1 comments

Show HN: LEIE Check – Search the OIG health care exclusion list by name or NPI

https://leiecheck.com
1•j1mmyhackett•1h ago•0 comments

Complex Systems Frameworks Collection (Complex Isn't Complicated)

https://www.complexsystemsframeworks.ca/
1•rramadass•1h ago•0 comments