[llvm-dev] LLD: question about debug_info relocs with emit-relocs + gc-sections.

Alexander Yermolovich via llvm-dev llvm-dev at lists.llvm.org
Tue Oct 20 17:25:31 PDT 2020


Hello.

I have been looking in to what relocs are emitted when --emit-relcos and --gc-sections flags are set.
Seems like relocs sections for .debug_* are not emitted.
Looking into it the debug sections are marked live in MarkLive.cpp:MarkLive on first pass through all the inputSections, but their dependendSections are not marked as live.
It then goes to rest of the algorithm that handles some special sections, but mainly deals with sections based on defined symbols in symtab.

As the result when -gc-sections flag is set relocations for debug_* would not be in output. Is that intentional, or oversight?

Thank You
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201021/a6c1699c/attachment.html>


More information about the llvm-dev mailing list