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

How human hearing is shaping high-end audio

https://physicstoday.aip.org/quick-study/how-human-hearing-is-shaping-high-end-audio
1•7402•3m ago•0 comments

Snakes aren't simple tubes. Their bodies have 5 regions, including a short neck

https://theconversation.com/snakes-arent-simple-tubes-their-bodies-have-five-regions-including-a-...
1•defrost•10m ago•0 comments

The Myth, the Mythos, and the Man

https://om.co/2026/06/07/the-myth-the-mythos-and-the-man/
1•sanj•12m ago•0 comments

Show HN: Every plaintext HTTP request on your Linux box captured via eBPF

https://github.com/yeet-src/httpwatch
1•r3tr0•12m ago•0 comments

Cruising for Shells in Flowise – 6 RCEs That Rode Flowise Low and Slow

https://www.elttam.com/blog/cruising-for-shells-in-flowise
1•pentestercrab•12m ago•0 comments

Show CVBoosta:Resume Optimizer that tailors your resume to every job

1•cvboosta•14m ago•0 comments

Linux manpages maintainer wants to raise memory.h from the dead

https://lore.kernel.org/linux-man/am0RdPxvbIYUKAL-@devuan/T/#m277b916c39713d644d36a42d82debbff1df...
1•potus_kushner•16m ago•1 comments

Why Airplanes Use 400 Hz Power

https://blog.monroeaerospace.com/why-airplanes-use-400-hz-power/
1•thunderbong•16m ago•3 comments

The Next Five Years – Economics of AI – Patrick Collison

https://next-five-years.vercel.app/
2•haritha1313•19m ago•0 comments

Feynman's Lecture Notes

https://www.feynmanlectures.caltech.edu/Notes.html
3•tylerdane•22m ago•1 comments

Court case involving ownership of dota (2017) [pdf]

https://s3.documentcloud.org/documents/3726401/BlizzardvLilith.pdf
1•marysminefnuf•26m ago•0 comments

Show HN: Crack Attack game vibe-ported to run in browser

https://leifkb.github.io/crack-attack-browser/
1•eurleif•27m ago•0 comments

Telegram is suspected to be removed from the App Store

3•lijialjun•27m ago•1 comments

Native Apps Should Be Avoided Whenever Possible

https://nooneshappy.com/article/native-apps-should-be-avoided-whenever-possible/
2•bigyabai•28m ago•0 comments

How are you operating AI infrastructure in production?

1•kkgupta•29m ago•0 comments

We Rewrote Our Agent to Run in a Durable Object with Pi, Agents SDK, Code Mode

https://twitter.com/Vercantez/status/2082138839888589200
1•gmays•31m ago•0 comments

Used EV Prices Are Now Going Up in America

https://www.cnbc.com/2026/07/31/used-ev-prices.html
2•m463•38m ago•0 comments

Ask HN: Why is the "Who is hiring?" post being re-aged?

1•ethanwillis•39m ago•2 comments

9router-Python – Python SDK for the 9Router AI gateway (35 models)

https://github.com/ChristopherDond/9router-python
2•ChristopherDond•39m ago•0 comments

I asked GPT 5.6 Sol to build the opening scene to The Matrix using Three.js

https://marksmayo.github.io/matrix/
3•beatthatflight•40m ago•1 comments

Curlese, Five Years Later

https://www.hypertesto.me/en/blog/2026/08/curlese-five-years-later
1•rovr138•41m ago•1 comments

Preparing for next year's Rosetta 2 demise

https://sixcolors.com/post/2026/08/preparing-for-next-years-rosetta-2-demise/
2•CharlesW•50m ago•0 comments

Whimsical DMG screens are a dying art

https://mastodon.social/@BasicAppleGuy/117032230874235692
1•allenc•51m ago•0 comments

A fundamental flaw leaves LLMs strikingly vulnerable to attack

https://www.technologyreview.com/2026/07/30/1140927/a-fundamental-flaw-leaves-llms-vulnerable-to-...
2•mikhael•51m ago•0 comments

AI's Manifesto War

https://www.axios.com/2026/08/02/ai-manifesto-open-weight-models
2•supportm•55m ago•0 comments

Alpine Linux does not make the news (2023)

https://drewdevault.com/blog/Alpine-does-not-make-news/
3•psxuaw•56m ago•0 comments

AI Stocks with a Clear Enterprise Software Edge in 2026

https://simplywall.st/stocks/ca/software/tsx-dcbo/docebo-shares/news/ai-stocks-with-a-clear-enter...
1•supportm•58m ago•0 comments

Porn addicts tried to rescue teen camgirls they worshipped from webcam pimp

https://www.thecut.com/article/cam-girls-webcam-pimp.html
4•chirau•59m ago•2 comments

Show HN: "Hedgehog" - An Opinionated workflow for building with AI

https://github.com/skyf0xx/hedgehog
1•skyf0xx•1h ago•1 comments

Cloud Agents Should Use (Some) Code Execution

https://lexifina.com/blog/code-use-tools-for-cloud-agents
2•alansaber•1h ago•0 comments