[llvm-dev] [LLD] Support DWARF64, debug_info "sorting"

Igor Kudrin via llvm-dev llvm-dev at lists.llvm.org
Tue Nov 17 23:32:09 PST 2020


On 18.11.2020 0:20, Robinson, Paul wrote:
> This is a problem only if the .debug_str section *by itself* exceeds 4GB;
> are we anticipating that will happen IRL?  The section is just a string
> section, by itself it has no 32/64 format.
> 
> If the .debug_str section *by itself* exceeds 4GB, then yes any string
> with a 32-bit reference to it must be in the first 4GB.  Strings that
> have only 64-bit references to them can be sorted to the end of the
> section, if necessary.  I wouldn't think anyone guarantees or cares
> about the order of strings within a string section.
> 
> But I think this would be the very last thing to care about, with regard
> to DWARF-64 concerns.

I guess that the relative size of the ".debug_str" section may vary and depends on the source code, particular build environment, and lots of other circumstances. I've checked some fresh built samples and always see that the section is usually close in size to ".debug_info" and sometimes even bigger. So, this section must be ordered similarly as all other debugging info sections.

-- 
Best Regards,
Igor Kudrin
C++ Developer, Access Softek, Inc.


More information about the llvm-dev mailing list