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

Alexandre Ganea via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 15:26:31 PDT 2023


aganea added a comment.

In D157136#4626520 <https://reviews.llvm.org/D157136#4626520>, @rnk wrote:

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

I agree. One argument would be that link.exe supports this scenario without a warning. But since it only came up for a single user, and their root issue will be fixed eventually, it’s not worth adding a fix. We can add an extra note when that error occurs, and suggest llvm-objcopy as a possible fix, do you think it’s worth it?


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