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

Ace K2: The Second Major Capability Era – Governed Autonomous Engineering

https://zenodo.org/records/23836829
1•NHApplied•1m ago•0 comments

Show HN: I build one small site per TikTok trend – here's the latest

https://tiramisufridgeai.com
1•jackking2060•1m ago•0 comments

AI startup hacks Anthropic, gains access to employee details, internal messages

https://www.indiatoday.in/technology/news/story/ai-startup-hacks-anthropic-in-12-hours-gains-acce...
4•healsdata•3m ago•0 comments

Anthropic's Claude AI blocks video game cloning and reverse-engineering

https://www.tomshardware.com/tech-industry/artificial-intelligence/anthropics-ai-model-is-now-blo...
2•gloxkiqcza•3m ago•0 comments

Pika H3 Flex Technical Deep Dive

https://pika.art/blog/pika-h3-flex-research
1•everygen_studio•3m ago•1 comments

Show HN: Built an Android simulator with businesses, investing, and real estate

https://play.google.com/store/apps/details?id=com.bbelnexgames.businesssimulator.entrepreneur_tyc...
1•Paje_mx•4m ago•0 comments

List of Pedestrian Circumnavigators

https://en.wikipedia.org/wiki/List_of_pedestrian_circumnavigators
1•conferza•4m ago•0 comments

Once again, NASA is asking for ideas to rescue Hubble from certain death

https://arstechnica.com/space/2026/10/think-you-can-save-the-hubble-space-telescope-nasa-wants-to...
1•Brajeshwar•5m ago•0 comments

Rejoice, leap seconds are dead

https://www.jeffgeerling.com/blog/2026/rejoice-the-utc-leap-second-is-dead/
1•Brajeshwar•5m ago•0 comments

BB(5) = 47,176,870 [video]

https://www.youtube.com/watch?v=kMHCl2PGloQ
1•pedropiin•7m ago•0 comments

To Bin or Not to Bin: A Tutorial on Fast Feedback Loops for AI Capabilities

https://alexhans.github.io/posts/to-bin-or-not-to-bin.html
1•Brajeshwar•7m ago•0 comments

Getting traffic from aocr.org? That's ByteDance crawling your website

https://tin.computer/blog/aocr-org-referrer-bot
2•santiago-pl•9m ago•0 comments

Obtainium Get Android app updates straight from the source

https://github.com/ImranR98/Obtainium
1•Bluestein•11m ago•0 comments

Semgrep and SonarQube found zero of 232 access-control bugs

https://medium.com/meetcyber/semgrep-and-sonarqube-found-zero-of-232-access-control-bugs-1c17c6b7...
2•jfaganel99•13m ago•0 comments

Ask HN: If AI agents can run 24/7, why is almost nothing shipped overnight?

1•siamaksalman•15m ago•0 comments

Printed cells to create everything from bone marrow to lab meat

https://english.elpais.com/science-tech/2026-10-01/a-living-tissue-factory-printed-cells-to-creat...
2•Betelbuddy•17m ago•0 comments

Prompt caching: same agent, same rules, about a quarter of the bill

https://blog.getwerk.ai/posts/prompt-caching-a-quarter-of-the-bill
1•gbaygon•18m ago•0 comments

MS Reality Check – Try hobbies before spending money

https://msrealitycheck.mihaidraghici023.workers.dev/
1•Msking•18m ago•0 comments

Beating the compiler at signed 32-bit division

https://lemire.me/blog/2026/10/31/beating-the-compiler-at-signed-32-bit-division/
1•smilelamp•19m ago•0 comments

Defrag the UK Economy

https://britains-disk.pages.dev/
1•rwmj•21m ago•0 comments

Harvard Clones Its Faculty

https://english.elpais.com/education/2026-10-19/the-time-of-avatars-in-the-classroom-has-arrived-...
2•Betelbuddy•21m ago•0 comments

What is Blocus how have the calls that worry merchants and police reached Spain

https://www.democrata.es/en/current-events/what-is-blocus-and-how-have-the-calls-that-worry-merch...
1•Bluestein•25m ago•0 comments

Show HN: Tiny Hand

https://tinyhand.app/
1•kamranahmedse•27m ago•0 comments

MCP server resource benchmark: RAM, startup time and tool counts for 11 servers

https://techfuelhq.com/data/mcp-server-bench/
1•LKWOODIV•27m ago•0 comments

Is It the Code or the Program?

https://itanium-cxx-abi.github.io/cxx-abi/abi.html#POD
1•efren6•27m ago•1 comments

I helped fix sleep-wake hangs on Linux with AMD GPUs (2025)

https://nyanpasu64.gitlab.io/blog/amdgpu-sleep-wake-hang/
1•zenincognito•28m ago•0 comments

Show HN: A language model that lives in a boot sector

https://github.com/kerlenton/bootgpt
1•kerlenton•30m ago•0 comments

How to free your email from the clutches of Google or Microsoft

https://manualdousuario.net/en/email-big-tech-purelymail-migadu/
1•rpgbr•30m ago•0 comments

Why Did Meta Suspend a US Senate Candidate's Instagram in the Middle of a Rally?

https://newrepublic.com/post/217281/meta-suspend-democratic-candidate-angie-nixon-instagram-account
2•ck2•31m ago•0 comments

Hands-On Embedded Software Design – 21 progressive steps on STM32F7

https://github.com/dysgn/Embedded_guide_publish
1•dysgn_embedded•37m ago•0 comments