redstar 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.

At first I was a bit confused about this, because the `MCAssembler` sets the 
ordinal. Well, it seems that the ELF writer overwrites those values. :-) Sure, 
I can do the same.

https://github.com/llvm/llvm-project/pull/133799
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to