[llvm-branch-commits] [llvm] [GOFF] Add writing of section symbols (PR #133799)

Ulrich Weigand via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Apr 7 13:07:44 PDT 2025


uweigand wrote:

> I use the ordinal number +1 of the section as the section number, but still need a counter for the symbols.

Can't we just set the ordinal to the correct value to begin with?  ELF sets the ordinals while writing out the sections; I think we might as well do the same.  (The point being that if we have already ensured we write sections in the correct order, then we will only ever need to refer to ordinals of sections that have already been written.)  Then we'd be back to a single counter used by the writer for all GOFF symbol records, those that come from sections as well as those that come from symbols.

https://github.com/llvm/llvm-project/pull/133799


More information about the llvm-branch-commits mailing list