Use Rela instead of object::Relocation#5
Conversation
|
Great! I had noticed that |
|
This is ready. I've updated object to use a git version. I've left one function that was handling section symbols as dead code; it can probably be deleted. There definitely are relocations referencing section symbols in practice, and the regular symbol handling appears to work fine for section symbols too. |
|
Thanks for doing this! |
|
I deleted the dead code. It definitely seems that it's not needed. Symbols with no names and only a section are handled via a different path that's more or less the same as any other symbol. That code was for handling relocations that reference sections not via a symbol.... which erm, seems to not be a thing. |
…nker#5) Flips DebugCompression::default() from None to Zstd. Release builds emit no .debug_* sections so the post-write pass is a no-op for them; debug builds get SHF_COMPRESSED zstd automatically without needing -O1 or an explicit flag. Users opting out pass --compress-debug-sections=none. Updates the docstrings on compress_debug_sections and opt_level to reflect that the baseline (no -O) already includes debug compression; -O1 now adds the line v4→v5 upgrade on top. Signed-off-by: Giles Cope <[email protected]>
…e -O1 doc Dwarf-size-plan table rows for items wild-linker#3 (.debug_abbrev hash-and-collapse) and wild-linker#5 (default --compress-debug-sections=zstd) updated from pending to shipped. The 'What wild does today' status table gets matching ✓ entries and the wild-linker#5 prioritisation paragraph drops the 'cheapest win' framing. libwild's opt_level docstring moves .debug_abbrev dedup from the placeholder -O2 bucket to the -O1 line where it now actually runs. Signed-off-by: Giles Cope <[email protected]>
This is a draft for #4. It needs some small helpers in
objectfirst.In doing this I've been merrily deleting all the support for
RelocationTarget::Sectionbecauseobjectnever returns that for ELF, instead returning aRelocationTarget::Symbolthat may refer to a section symbol. However, maybe I shouldn't be deleting this, and instead fixing it to handle section symbols, even though it previously didn't? I don't understand enough of the code to know.