frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

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

Show HN: I made a better zsh autosuggestion tool that predicts your next command

https://github.com/Giammarco-Ferranti/deja
1•giammiferr•1m ago•0 comments

Polymarket Annotation Injection

https://sam.elborai.me/articles/polymarket-prompt-injection/
1•dgellow•8m ago•0 comments

Show HN: A virtual thermal printer for testing ESC/POS receipts

https://vprinter.dev
1•seokjume•8m ago•0 comments

Pockets of Humanity

https://herman.bearblog.dev/pockets-of-humanity/
2•Tomte•9m ago•1 comments

Anthropic/OpenAI may be spending more than $1000 for every $100 you pay them

https://ea.rna.nl/2026/06/07/anthropic-openai-may-be-spending-more-than-1000-for-every-100-you-pa...
3•gctwnl•12m ago•0 comments

What It's Like to IPO

https://staysaasy.com/startups/2026/06/04/what-its-like-to-ipo.html
1•wiredone•16m ago•0 comments

ASML invites Elon Musk to internal tech event, prompting employee backlash

https://nltimes.nl/2026/06/07/asml-invites-elon-musk-internal-tech-event-prompting-employee-backlash
1•root-parent•17m ago•0 comments

LLMs are eroding my software engineering career and I don't know what to do

https://human-in-the-loop.bearblog.dev/llms-are-eroding-my-software-engineering-career-and-i-dont...
35•poisonfountain•17m ago•7 comments

AI and the Pitfalls of Innovation

https://paulkrugman.substack.com/p/ai-and-the-pitfalls-of-innovation
2•rbanffy•20m ago•0 comments

Recent LLVM hash table improvements

https://maskray.me/blog/2026-06-07-recent-llvm-hash-table-improvements
2•ingve•25m ago•0 comments

Another Warning about the Steam Controller puck. It WILL start a fire

https://old.reddit.com/r/SteamController/comments/1tz8bgu/this_is_another_warning_about_the_puck_...
2•6581•25m ago•0 comments

TikTok is not addictive, social media giant tells politicians

https://www.irishtimes.com/technology/big-tech/2026/05/07/tiktok-is-not-addictive-social-media-gi...
4•1vuio0pswjnm7•26m ago•0 comments

Realisation of Unfixable

1•iaziz786•26m ago•0 comments

What the wounds are telling us

https://www.europeanpressprize.com/article/what-the-wounds-are-telling-us/
2•amarcheschi•28m ago•0 comments

Ask HN: How are thinking efforts implemented?

3•simianwords•28m ago•0 comments

New York lawmakers pass one-year ban on new data centers

https://www.theverge.com/policy/944041/new-york-data-center-moratorium
2•1vuio0pswjnm7•28m ago•0 comments

Ask HN: What are the best unknown books you have read?

5•chistev•30m ago•1 comments

Misguided Misstatements Continue to Dismantle Biomedical Research in the U.S.

https://diabetesjournals.org/care/article/49/6/901/164764/Misguided-Brushes-of-a-Pen-Continue-to-...
5•JumpCrisscross•32m ago•2 comments

Show HN: Inbox-beam – notifications in your inbox without sending email

https://github.com/toyoshi/inbox-beam
2•toyoshi•33m ago•0 comments

Application of Pleuropterus multiflorus for treatment of androgenetic alopecia

https://www.sciencedirect.com/science/article/pii/S2707368825000627?via%3Dihub
1•bookofjoe•33m ago•0 comments

Why aren't languages/frameworks offering retrained models for their project?

1•ckluis•34m ago•0 comments

Mysterious 'Dorito-Shaped' Aircraft Spotted at Night Near Area 51

https://theaviationist.com/2026/01/18/dorito-shaped-aircraft-spotted-near-area-51/
1•bookmtn•36m ago•0 comments

Stores Will Soon Use Facial Recognition without your consent (2018)

https://www.buzzfeednews.com/article/leticiamiranda/retail-companies-are-testing-out-facial-recog...
1•downbad_•38m ago•0 comments

Chrome Sets Browser Speed Records on M5 MacBook Pro

https://www.macrumors.com/2026/06/05/chrome-browser-speed-record-2026/
1•tosh•39m ago•0 comments

Manhole mystery grips New York – just what are city's 'mole people' up to?

https://www.theguardian.com/us-news/2026/jun/07/new-york-manhole-mole-people
2•mykowebhn•40m ago•0 comments

We Need VAT and UBI

https://wilsoniumite.com/2026/06/07/we-need-vat-and-ubi/
15•Wilsoniumite•43m ago•18 comments

Beware Management Consultants

https://about.iceland.co.uk/our-story/the-dark-ages/beware-management-consultants/
2•mellosouls•52m ago•0 comments

Eternal Software Initiative

https://eternal-software.org/
2•eigenhombre•53m ago•0 comments

Show HN: Create and Maintain Filesystem Structures for LLMs [v1.0.11 Out]

https://pypi.org/project/seed-cli/
2•hunterx•56m ago•0 comments

Birth rates are declining in most of the world—here's why it really matters

https://phys.org/news/2026-06-birth-declining-world.html
3•rustoo•57m ago•0 comments