[PATCH] D53234: Don't remove COMDATs when internalizing global objects
Aaron Hill via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 16 15:07:42 PST 2018
Aaron1011 added a comment.
> so yes the system linker is perfectly legal to remove some parts of a COMDAT group from the final output.
That would seem to defeat the entire point of section groups - their whole purpose is to force certain sections to stay together.
> Right, but in this case, if the function is removed then the !associated metadata will be dangling and should have no effect on the output object file, no?
The BFD linker will refuse to link if two combined sections (e.g. with the same name) have different SHF_LINKER_ORDER flags. When the !associated metadata is removed, LLVM wont emit the `SHF_LINK_ORDER` flag for one of the sections.
https://reviews.llvm.org/D53234
More information about the llvm-commits
mailing list