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 the Riemann Hypothesis was cracked [video]

https://www.youtube.com/watch?v=PjGlt3y-Nco
1•jonbaer•14s ago•0 comments

Why are so many services using email magic links for login?

2•bfbf•2m ago•0 comments

Stuck in Awe

https://darshanmakwana412.github.io/2026/11/stuck-in-awe/
1•martianvoid•3m ago•0 comments

Just a Few Bugs

https://www.justafewbugs.xyz/
2•jjjegly•7m ago•0 comments

Show HN: Run LLM Benchmarks at 1/10th of the cost

https://benchmarkrouter.newmeasure.ai/
2•abhishek203r•8m ago•0 comments

Show HN: A PDF/DOC editor that changes text in its original font, in the browser

https://quicktou.ch/
2•pierrickl•11m ago•0 comments

Walt Whitman, Shortly After His Stroke, on What Makes Life Worth Living

https://www.themarginalian.org/2017/12/20/walt-whitman-specimen-days-meaning-of-life/
1•robtherobber•12m ago•0 comments

Looped Weight-Space Programming: use AI to set model weights

https://twitter.com/ahmedmm72234641/status/2124869402634129901
1•anonu•14m ago•0 comments

SignafAIde- check AI agent tool calls before they run, verify offline

https://github.com/AIME-TECH-UK-LIMITED/signafaide-sdk
1•dief0001•14m ago•0 comments

Holding the Door for Agents

https://fly.io/blog/holding-the-door-for-agents/
1•ac-ciano•14m ago•0 comments

Jevons Paradox in AI: Cheaper Tokens Won't Pay for Capex

https://philippdubach.com/posts/cheaper-ai-tokens-wont-pay-for-capex/
1•DonAtimator•15m ago•0 comments

Novanetflow

https://www.novanetflow.com/
1•maddphoto•17m ago•0 comments

Show HN: InterviewLint–The Thinking-First technical interview platform

https://interviewlint.com/
1•aburayhanalif•20m ago•0 comments

Mitigeddon by Datadog

https://mitigeddon.ai/
4•janandonly•21m ago•0 comments

Building Our E-Ink Family Calendar

https://acelpb.com/posts/2026-11-02-Four-years-in-the-basement/
2•aborsu•21m ago•0 comments

Mitigeddon: Real-world exploitation and prevalence data

https://securitylabs.datadoghq.com/articles/introducing-mitigeddon/
3•janandonly•21m ago•0 comments

Megaspeed added to entity list (export controls for US companies) [pdf]

https://public-inspection.federalregister.gov/2026-23999.pdf
1•jsiepkes•23m ago•0 comments

Show HN: AraBrief – create personal radio with your briefings between music

https://www.arabrief.com/en
1•pplonski86•25m ago•0 comments

A free Python course in the browser that ends with building a tiny GPT

https://paulspythoncourse.com/
3•bouwles•27m ago•0 comments

Manticore Search 32.1.3: Direct-to-disk bulk import and faster search

https://manticoresearch.com/blog/manticore-search-32-1-3/
5•GloVin•29m ago•0 comments

Why Transcoding and ABR Require Autoscale

https://www.red5.net/blog/why-transcoding-and-abr-require-autoscale/
2•mondainx•30m ago•0 comments

Merchants. 12 Months. Zero Fees

2•MarketPay•32m ago•0 comments

Securing Python projects from supply-chain attacks

https://astral.sh/blog/securing-from-supply-chain-attacks
1•xxmarkuski•33m ago•0 comments

Rats tricked into traps using human marketing tricks, study shows

https://www.abc.net.au/news/science/2026-11-23/tricking-rats-into-traps-with-human-marketing-psyc...
2•bushwart•35m ago•0 comments

After 8 decades in operation Rocket Amateur Radio in Akihabara closed yesterday

https://www.reddit.com/r/japanresidents/comments/1y40oyi/end_of_an_era_after_8_decades_in_operati...
2•SenHeng•37m ago•0 comments

CVE-2026-124851: information disclosure vulnerability in ZSTD 1.5.1 to 1.5.7

https://www.facebook.com/security/advisories/cve-2026-124851?_fb_noscript=1
3•st_goliath•38m ago•1 comments

Ernie 5.5 Flash Preview is now open source

https://huggingface.co/baidu/ERNIE-5.5-Flash-Preview
3•pretext•41m ago•0 comments

Note on Hidden Shifts as Hidden Subgroups

https://presheaf.blogspot.com/2026/07/note-on-hidden-shifts-as-hidden.html
1•unprovable•42m ago•1 comments

The "Leonida" Xbox PC Recompilation of GTA 6 Taken Down from GitHub

1•hnarn•43m ago•0 comments

Does anyone gets hired with himalaya, well found or other remote hiring sites?

2•rohansrma•43m ago•0 comments