Print this page
7323 ld(1) -zignore can erroneously discard init and fini arrays as unreferenced

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/libld/common/place.c
          +++ new/usr/src/cmd/sgs/libld/common/place.c
↓ open down ↓ 751 lines elided ↑ open up ↑
 752  752          static const Msg RefSecs[] = {
 753  753                  MSG_SCN_INIT,           /* MSG_ORIG(MSG_SCN_INIT) */
 754  754                  MSG_SCN_FINI,           /* MSG_ORIG(MSG_SCN_FINI) */
 755  755                  MSG_SCN_EX_RANGES,      /* MSG_ORIG(MSG_SCN_EX_RANGES) */
 756  756                  MSG_SCN_EX_SHARED,      /* MSG_ORIG(MSG_SCN_EX_SHARED) */
 757  757                  MSG_SCN_CTORS,          /* MSG_ORIG(MSG_SCN_CTORS) */
 758  758                  MSG_SCN_DTORS,          /* MSG_ORIG(MSG_SCN_DTORS) */
 759  759                  MSG_SCN_EHFRAME,        /* MSG_ORIG(MSG_SCN_EHFRAME) */
 760  760                  MSG_SCN_EHFRAME_HDR,    /* MSG_ORIG(MSG_SCN_EHFRAME_HDR) */
 761  761                  MSG_SCN_JCR,            /* MSG_ORIG(MSG_SCN_JCR) */
      762 +                MSG_SCN_INITARRAY,      /* MSG_ORIG(MSG_SCN_INITARRAY) */
      763 +                MSG_SCN_FINIARRAY,      /* MSG_ORIG(MSG_SCN_FINIARRAY) */
      764 +                MSG_SCN_PREINITARRAY,   /* MSG_ORIG(MSG_SCN_PREINITARRAY) */
 762  765                  0
 763  766          };
 764  767  
 765  768          DBG_CALL(Dbg_sec_in(ofl->ofl_lml, isp));
 766  769  
 767  770          /*
 768  771           * If this section identifies group members, or this section indicates
 769  772           * that it is a member of a group, determine whether the section is
 770  773           * still required.
 771  774           */
↓ open down ↓ 591 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX