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

Trump Administration Plans to Write Regulations Using Artificial Intelligence

https://www.propublica.org/article/trump-artificial-intelligence-google-gemini-transportation-reg...
1•beardyw•1m ago•0 comments

Show HN: An interactive timeline of computer viruses, worms, and digital threats

https://github.com/rsc-dev/malware-museum.com
1•rsc-dev•2m ago•0 comments

Tell HN: Aden, A YC company, is growth hacking by luring devs with paid work

1•theblazehen•2m ago•0 comments

The Private Equity Roll-Up of HVAC

https://talk24.ai/blog/hvac-private-equity-consolidation
1•atreeleaf•2m ago•0 comments

Building a Sovereign Portfolio Risk Calculator: Why We Ditched the Back End

https://www.pocketportfolio.app/blog
1•pocketportfolio•3m ago•1 comments

FOSDEM 2026 – The Servo project and its impact on the web platform ecosystem [video]

https://fosdem.org/2026/schedule/event/LXFKS9-servo-project-impact/
1•robin_reala•12m ago•0 comments

Robin Williams tickles Coco the monkey

https://www.koko.org/emails/when_robin_met_koko_video/
1•irthomasthomas•13m ago•0 comments

World's Biggest TikToker from Senegal sells company in $900M deal

https://africa.businessinsider.com/local/markets/worlds-biggest-tiktoker-from-senegal-sells-compa...
3•thunderbong•15m ago•0 comments

Free-Coloring-Pages-Generator

https://www.genstory.app/story-template/free-coloring-pages-generator
1•RyanMu•18m ago•1 comments

Ellen MacArthur Foundation Circularity Indicators Flawed?

1•_zero_echo_•20m ago•0 comments

Instructions in papers can manipulate AI reviewers 78-86% of the time

https://www.researchsquare.com/article/rs-8432945
2•evilscript•22m ago•1 comments

Browserbase vs. Kernel: Building a Google Flights Scraper Twice

https://medium.com/tech-stackups/browserbase-vs-kernel-cloud-browser-automation-for-ai-agents-b10...
1•sixhobbits•22m ago•0 comments

Built in 1776, the same year as the US Declaration of Independence

https://en.wikipedia.org/wiki/Hans_Bronsart_von_Schellendorff
1•MargaretBauer•23m ago•4 comments

Ask HN: Easiest way to run Claude Code on my MacBook using my iPhone, remotely?

1•rishabhpoddar•25m ago•1 comments

Show HN: AffordWhere – Affordability by City

https://affordwhere.com
1•justconvert•28m ago•0 comments

Show HN: Rekko – Stripe app to recover failed subscription payments

https://rekko.io
1•AlexRST•28m ago•0 comments

Hard Times in the Delta as Farmers Consider Letting Crops Rot

https://www.nytimes.com/2026/01/25/business/mississippi-delta-farmers-rice-prices.html
1•mitchbob•29m ago•1 comments

Ask HN: How are you handling Gmail ending POP3 and Gmailify?

1•moshetanzer•29m ago•0 comments

UK among 10 countries to build 100GW wind power grid in North Sea

https://www.theguardian.com/environment/2026/jan/26/uk-among-10-countries-to-build-100gw-wind-pow...
4•robtherobber•30m ago•0 comments

Stocks Near Highest Valuations Since 1880

https://www.apolloacademy.com/stocks-near-highest-valuations-since-1880/
1•akyuu•31m ago•0 comments

Asking the best LLMs to design a post-AGI civilization

https://technotes.substack.com/p/asking-various-llms-to-design-a-post
1•thepoet•31m ago•1 comments

Why Broken Access Control Still Dominates the OWASP Top in 2026?

https://auth0.com/blog/why-broken-access-control-still-dominates-owasp-top-10/
1•andychiare•31m ago•0 comments

MapLibre Tile: a modern and efficient vector tile format

https://maplibre.org/news/2026-01-23-mlt-release/
2•todsacerdoti•31m ago•0 comments

Long branches in compilers, assemblers, and linkers

https://maskray.me/blog/2026-01-25-long-branches-in-compilers-assemblers-and-linkers
1•epilys•32m ago•0 comments

Add four Gigabit or 2.5Gbps Ethernet ports to the Raspberry Pi 5 with this board

https://www.cnx-software.com/2025/12/30/add-four-gigabit-or-2-5gbps-ethernet-ports-to-the-raspber...
1•teleforce•36m ago•0 comments

What's still broken in Salesforce document generation?

1•hackertarzen•36m ago•0 comments

Show HN: Panda – Minimalist Meditation Timer App

https://www.chromiumone.com/apps/en-US/meditation-timer-panda/
1•joyhn•37m ago•0 comments

Being a Canadian in America (Eric Migicovsky)

https://ericmigi.com/blog/on-being-a-canadian-in-america-in-2026/
2•smig0•39m ago•0 comments

The Semantic Police: Stop or my compiler will prove a theorem

https://kp9.in/posts/cs/stop-or-my-compiler-will-prove-a-theorem
1•kp995•39m ago•0 comments

Intel's Larabee Legacy

https://thechipletter.substack.com/p/larabees-long-shadow
2•klelatti•42m ago•0 comments