https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91239

--- Comment #15 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 20 Apr 2022, jakub at gcc dot gnu.org wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91239
> 
> --- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> No, I can't.  For one, many targets GCC supports don't support visibility.
> And, even for those that do, such a change would be effectively an ABI change,
> as mixing *.o files from older gcc version and newer one could result in the
> invalid DW_MACRO_import operands if the old version produced comdat wins.

To avoid that we'd need to change the mangling of the comdat symbol
(add a 'v2' suffix?), so I think it would be feasible.

I agree that it's unfortunate to not have a way to collect unused
symbols after link editing is done.  ELF is lacking there - we
get biten by this as well with LTO and hidden symbols used across
LTRANS units - they still consume symtab entries after link editing.

Reply via email to