frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: Help with doing statistics over machine code

2•phafu•8mo 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•8mo 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•8mo 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).

Burhan(TruthCert)fail-closed verification LLM outputs(measure false-ship rate)

https://github.com/mahmood726-cyber/Burhan
1•mahmood726•5s ago•1 comments

Exploring radio emissions from confirmed exoplanets using SKA (2024)

https://www.frontiersin.org/journals/astronomy-and-space-sciences/articles/10.3389/fspas.2024.141...
1•zeristor•2m ago•0 comments

Agent Context Graph

https://github.com/markjspivey-xwisee/agent-context-graph
1•markjspivey•5m ago•1 comments

Show HN: Bootstrapping a compiler from raw machine code

https://github.com/nineties/hex-to-compiler
1•nineties•8m ago•0 comments

Show HN: AutoShorts – Local, GPU-accelerated AI video pipeline for creators

https://github.com/divyaprakash0426/autoshorts
1•divyaprakash•16m ago•1 comments

Target 1: Baseten

https://www.silares.com/targets/target-1-baseten
1•todsacerdoti•24m ago•0 comments

A multi-entry CFG design conundrum

https://bernsteinbear.com/blog/multiple-entry/
2•fbuilesv•29m ago•0 comments

A Massacre in Mashhad

https://www.newyorker.com/news/as-told-to/a-massacre-in-mashhad
4•Tomte•31m ago•1 comments

Disney to Pay $10M in FTC Children's Data Settlement

https://natlawreview.com/article/court-approves-order-requiring-disney-pay-10mm-settle-ftc-attorn...
2•petethomas•33m ago•0 comments

Show HN: Lumina – Open-source observability for LLM applications

https://github.com/use-lumina/Lumina
3•iggycodexs•43m ago•0 comments

Hacker turned WiFi airwaves into LED art with a Raspberry Pi

https://www.theregister.com/2026/01/23/raspberry_pi_wifi_wall_art/
4•ghendelf•48m ago•0 comments

What Is Clawdbot? (and Why People Are Losing Their Minds over It)

https://twitter.com/noahepstein_/status/2015073824799371370
3•taubek•53m ago•0 comments

Kitty Cards

https://lmno.lol/alvaro/introducing-kitty-cards
3•todsacerdoti•54m ago•0 comments

'Fundamental reset': Scott Bessent has a plan to free the nation's banks

https://www.politico.com/news/2026/01/24/scott-bessent-banks-00744468
1•scrubs•57m ago•1 comments

Show HN: Markdown Viewer with LaTeX Math Support and Export to PDF/Word/HTML

https://markdownviewer.cc
1•LuckyBuddy•1h ago•0 comments

Box64 Expands into RISC-V and LoongArch territory

https://boilingsteam.com/box64-expands-into-risc-v-and-loong-arch-territory/
1•ekianjo•1h ago•0 comments

Neveragain.tech

https://neveragain.tech/
4•m-hodges•1h ago•0 comments

Show HN: Run world-class focus groups in minutes

https://chatgpt.com/g/g-6835306f9c48819185d3a665c09cc5d2-focus-groups-like-a-pro
1•vassilbek•1h ago•0 comments

Part 1: IndiaAI mission does not need compute, it needs data

https://gpt3experiments.substack.com/p/part-1-indiaai-mission-does-not-need
1•nutanc•1h ago•0 comments

JVic – The web-based VIC 20 emulator built with libGDX

https://vic20.games/
1•duck•1h ago•0 comments

The most precise mechanical indicators ever made – The Mikrokator [video]

https://www.youtube.com/watch?v=_HIKmxHcxkg
1•pillars•1h ago•0 comments

Apt-bundle: brew bundle for apt

https://github.com/apt-bundle/apt-bundle
1•sadeshmukh•1h ago•0 comments

Show HN: Document your tRPC API without mapping to OpenAPI

1•liorcodev•1h ago•0 comments

Deaths and deportations of citizens by Trump administration

https://en.wikipedia.org/wiki/Deaths,_detentions_and_deportations_of_American_citizens_in_the_sec...
16•praptak•1h ago•0 comments

Jeffrey Way: I'm Done

https://www.youtube.com/watch?v=g_Bvo0tsD9s
4•doppp•1h ago•0 comments

Ask HN

2•mekod•1h ago•1 comments

Fast Joystick Read – Elon Musk on Usenet, 1994

https://twitter.com/UsenetGems/status/2004876626161721467
1•nomilk•1h ago•0 comments

World’s most powerful literary critic is on TikTok

https://www.newstatesman.com/culture/books/2026/01/the-worlds-most-powerful-literary-critic-is-on...
2•insistey•1h ago•0 comments

Non-Functional Requirements: The Secret Sauce Nobody Wants to Season

https://blog.hermesc.gr/non-functional-requirements-the-secret-sauce-nobody-wants-to-season/
1•puppion•1h ago•0 comments

Show HN: Voice to Text– Free browser-based speech-to-text with local projects

https://www.voicetotextonline.com/
1•digi_wares•1h ago•0 comments