Calling all graph nerds! I've generated a graph of elf sections in firmware. How would I find the edges I could cut to remove code from my binary? (Think -fgc-sections) github.com/adafruit/elf-sectio

@tannewt I'm not sure I understand the criteria... You just pick any node you want to remove, and cut all the edges coming from it?

Follow

@deshipu Correct, find the "rogue" references that pull in a lot of code. CP modules will probably be highlighted too

· · Web · 1 · 0 · 0

@deshipu For every node with one incoming edge, find all successors that are only reachable from the first node. Each node has a size that we can sum for total byte size.

@tannewt I'm not sure it helps, but I think that finding minimal cuts (assuming all edges have the same weight) would at least give you the suspects to consider.

Sign in to participate in the conversation
Mastodon

A newer server operated by the Mastodon gGmbH non-profit