[PATCH] D157136: [LLD][COFF] Handle 'label' symbols when they point to a COMDAT section

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 14:59:32 PDT 2023


rnk added a comment.

In D157136#4583632 <https://reviews.llvm.org/D157136#4583632>, @aganea wrote:

> I'm also wondering if instead of this patch, we couldn't craft something simpler, an heuristic that "fixes" the section header and the section symbol. Usually they seems to come in a pair, `.text$mn`, `.text$x` or a trio if debug symbols are involved: `.text$mn`, `.debug$S`, `.text$x`. Opinions?

I think there is prior art for doing this for mingw, we do some convoluted stuff to associate `.text$_Z3foov` / `.pdata$_Z3foov` / `.xdata$_Z3foov` together, but IIRC it's not good for performance.

I think for the moment I'm inclined to do nothing, unless this is really high priority for some user. It sounds like we can recommend using `llvm-objcopy` in place of binutils `objcopy` as a possible solution.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157136/new/

https://reviews.llvm.org/D157136



More information about the llvm-commits mailing list