mold icon indicating copy to clipboard operation
mold copied to clipboard

VTT and discarded COMDAT error

Open diehard2 opened this issue 1 year ago • 3 comments
trafficstars

Hi, I'm getting an error for

[build] mold: error: /mydirectory/libflat_combine.a(flat_combine.cpp.o):(.debug_loc): VTT for mynamespace::concurrent::FlatCombineFinishedException refers to a discarded COMDAT section probably due to an ODR violation

I'm not seeing this if I link with ld, gold, or lld. I can't seem to figure out how to make a small reproducer. There is nothing unusual about the code that I can see and VTT isn't finding any hits in this repository.

I don't know if it would make the difference, but the library is compiled with gcc and the executable is compiled with clang. If both are compiled with gcc it works as expected. I'm seeing this with both the latest mold and version 2.4. Any help is appreciated.

diehard2 avatar Jul 19 '24 16:07 diehard2

Can you share your /mydirectory/libflat_combine.a with me?

rui314 avatar Jul 20 '24 02:07 rui314

thanks for the response @rui314. Do you have somewhere I can send it?

diehard2 avatar Jul 23 '24 14:07 diehard2

You can zip that file and upload to this github issue as an attachment.

rui314 avatar Jul 24 '24 07:07 rui314