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

Tales from the Software Factory: The Cron and the VM

https://blog.exe.dev/cron-vs-vm
1•vinhnx•5m ago•0 comments

I built a language model out of cellular automata

https://ssenthilnathan3.github.io/blog/cellular-automata-language-model/
1•nathaah3•7m ago•0 comments

Update: Source Download – Inspect, grab assets, screenshot and record video/GIF

https://chromewebstore.google.com/detail/source-download/nockdgincmpfojabnhbofkddgcmnodpd
1•2rundev•8m ago•0 comments

Omens of Exceptional Talent

https://guzey.com/talent/
1•karakoram•8m ago•0 comments

Debian Inference Portal (Unofficial)

https://inference.debian.net/
1•selfhoster1312•9m ago•0 comments

Understanding Runtime Governance for Enterprise AI Deployment

1•thespotlessmind•10m ago•0 comments

Investigate top humanity questions with your own AI agent

https://interworky.com/
1•ahmedhussam1053•10m ago•1 comments

Can open-source prompt-injection detectors catch realistic AI agent attacks?

https://github.com/rudratoshs/buried-injections
2•northbridgedev•12m ago•0 comments

AI Passport Photo

https://www.aipassportphoto.org/
4•wsm123456•15m ago•1 comments

How to Audit an AI Agent:Time-Travel Debugging and Drift Measurement

https://medium.com/@MirArshadTalpur/how-to-audit-not-observe-an-ai-agent-time-travel-debugging-an...
1•Arshad-Talpur•15m ago•0 comments

The cost and quality frontier across 29 AI coding models

https://bito.ai/benchmarks/ai-coding-model-cost/
1•kirti_soni171•15m ago•0 comments

Inferact's Kimi K3 Megakernel hits 700 tok/s on TPU, Beating GPU

https://inferact.ai/blog/tpu-megakernels
4•xutingl•16m ago•1 comments

Europe's fastest supercomputer is finally getting its domestic silicon infusion

https://www.theregister.com/systems/2026/09/23/europes-fastest-supercomputer-is-finally-getting-i...
1•doener•17m ago•0 comments

FBI investigating hacking group's claim of breach of agent info

https://www.nbcnews.com/tech/security/fbi-investigating-hacking-groups-claim-massive-breach-agent...
1•ycombinatronics•18m ago•0 comments

Dolphin Progress Release 2609

https://dolphin-emu.org/blog/2026/09/24/dolphin-progress-report-release-2609/
1•madiling•20m ago•0 comments

Show HN: I asked 5 LLMs 10k questions and indexed every domain they cited

https://citegeo.uvansa.com
1•jhaankit373•22m ago•0 comments

Meta ditches the camera on its newest smart glasses

https://www.theverge.com/tech/999281/ray-ban-meta-audio-glasses-meta-connect-2026
4•geoffbp•25m ago•0 comments

The E-Ink Monopoly [video]

https://www.youtube.com/watch?v=3QbJ7pnc1Lc
1•trymas•27m ago•0 comments

Blink – Embeddable one-pass typed decision in 33 µs

https://github.com/sqliteai/blink
1•marcobambini•28m ago•0 comments

What Changed from GPT-3.5 to GPT-4? GPT-3.5: 0/30 Empty Nulls. GPT-4: 30/30

https://www.reddit.com/r/ArtificialInteligence/comments/1wotljm/what_changed_from_gpt35_to_gpt4_s...
2•rayanpal_•30m ago•0 comments

Steve Jobs' Full iPhone 4 Antennagate Press Conference Q&A Session

https://www.youtube.com/watch?v=BiN5ERktXz0
4•aSig•31m ago•0 comments

Can You Beat Jev?

https://antics.gg/can-you-beat-jev
1•thatslast•33m ago•0 comments

Albanese says OpenAI hacked Medicare and told Australia months later

https://www.theguardian.com/australia-news/2026/sep/24/anthony-albanese-says-openai-agent-hacked-...
1•skor•35m ago•0 comments

What's Left to Get Wrong

https://blogsh.app/posts/2026/what-s-left-to-get-wrong/
1•krab•36m ago•0 comments

Meta is making a standalone Muse AI gadget

https://www.theverge.com/tech/999750/muse-charm-meta-ai-hardware
1•arbayi•36m ago•0 comments

Mysteries of AI Generalization

https://www.astralcodexten.com/p/mysteries-of-ai-generalization
1•terryf•37m ago•0 comments

Lysios – LLM red teaming org

https://lysios.ai/
2•davedx•37m ago•0 comments

The biggest surprises from a year working at OpenAI

https://aalokpatwa.substack.com/p/one-year-at-openai
1•mji•38m ago•0 comments

Ways to Encrypt Data on Servers

https://lwn.net/Articles/1092553/
1•DavideNL•41m ago•0 comments

C-to-Rust Fallacy: Automatic Refactoring != Memory Security

https://arxiv.org/abs/2609.25682
3•sbulaev•42m ago•0 comments