Print this page
10346 ld(1) should not reduce symbol visibility of COMDAT symbols when producing relocatable objects

*** 1011,1021 **** * Only needed symbols are copied to the output symbol table. */ if (sdp->sd_ref == REF_DYN_SEEN) continue; ! if (SYM_IS_HIDDEN(sdp) && (flags & FLG_OF_PROCRED)) local = 1; else local = 0; if (local || (ofl->ofl_hashbkts == 0)) { --- 1011,1021 ---- * Only needed symbols are copied to the output symbol table. */ if (sdp->sd_ref == REF_DYN_SEEN) continue; ! if (ld_sym_reducable(ofl, sdp)) local = 1; else local = 0; if (local || (ofl->ofl_hashbkts == 0)) {
*** 1222,1232 **** * If this symbol has been marked as being reduced to local * scope then it will have to be placed in the scoped portion * of the .symtab. Retain the appropriate index for use in * version symbol indexing and relocation. */ ! if (SYM_IS_HIDDEN(sdp) && (flags & FLG_OF_PROCRED)) { local = 1; if (!(sdp->sd_flags & FLG_SY_ELIM) && !dynsym) sdp->sd_symndx = scopesym_ndx; else sdp->sd_symndx = 0; --- 1222,1232 ---- * If this symbol has been marked as being reduced to local * scope then it will have to be placed in the scoped portion * of the .symtab. Retain the appropriate index for use in * version symbol indexing and relocation. */ ! if (ld_sym_reducable(ofl, sdp)) { local = 1; if (!(sdp->sd_flags & FLG_SY_ELIM) && !dynsym) sdp->sd_symndx = scopesym_ndx; else sdp->sd_symndx = 0;
*** 1887,1897 **** * If the symbol definition has been scoped then assign it to * be local, otherwise if it's from a shared object then we need * to maintain the binding of the original reference. */ if (SYM_IS_HIDDEN(sdp)) { ! if (flags & FLG_OF_PROCRED) bind = STB_LOCAL; else bind = STB_WEAK; } else if ((sdp->sd_ref == REF_DYN_NEED) && (sdp->sd_flags & FLG_SY_GLOBREF)) --- 1887,1897 ---- * If the symbol definition has been scoped then assign it to * be local, otherwise if it's from a shared object then we need * to maintain the binding of the original reference. */ if (SYM_IS_HIDDEN(sdp)) { ! if (ld_sym_reducable(ofl, sdp)) bind = STB_LOCAL; else bind = STB_WEAK; } else if ((sdp->sd_ref == REF_DYN_NEED) && (sdp->sd_flags & FLG_SY_GLOBREF))