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

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/libld/common/_libld.h
          +++ new/usr/src/cmd/sgs/libld/common/_libld.h
↓ open down ↓ 191 lines elided ↑ open up ↑
 192  192   *
 193  193   *      mr_assign_got
 194  194   *      mr_reloc_register
 195  195   *      mr_reloc_GOTOP
 196  196   *      mr_allocate_got
 197  197   */
 198  198  typedef struct {
 199  199          const Rel_entry *mr_reloc_table;
 200  200  
 201  201          Word            (* mr_init_rel)(Rel_desc *, Word *, void *);
 202      -        void            (* mr_mach_eflags)(Ehdr *, Ofl_desc *);
      202 +        void            (* mr_mach_eflags)(Ehdr *, Ofl_desc *);
 203  203          void            (* mr_mach_make_dynamic)(Ofl_desc *, size_t *);
 204  204          void            (* mr_mach_update_odynamic)(Ofl_desc *, Dyn **);
 205  205          Xword           (* mr_calc_plt_addr)(Sym_desc *, Ofl_desc *);
 206  206          uintptr_t       (* mr_perform_outreloc)(Rel_desc *, Ofl_desc *,
 207  207                              Boolean *);
 208  208          uintptr_t       (* mr_do_activerelocs)(Ofl_desc *);
 209  209          uintptr_t       (* mr_add_outrel)(Word, Rel_desc *, Ofl_desc *);
 210  210          uintptr_t       (* mr_reloc_register)(Rel_desc *, Is_desc *,
 211  211                              Ofl_desc *);
 212  212          uintptr_t       (* mr_reloc_local)(Rel_desc *, Ofl_desc *);
↓ open down ↓ 534 lines elided ↑ open up ↑
 747  747  #define ld_swap_reloc_data      ld64_swap_reloc_data
 748  748  #define ld_sym_add_u            ld64_sym_add_u
 749  749  #define ld_sym_adjust_vis       ld64_sym_adjust_vis
 750  750  #define ld_sym_avl_comp         ld64_sym_avl_comp
 751  751  #define ld_sym_copy             ld64_sym_copy
 752  752  #define ld_sym_enter            ld64_sym_enter
 753  753  #define ld_sym_find             ld64_sym_find
 754  754  #define ld_sym_nodirect         ld64_sym_nodirect
 755  755  #define ld_sym_process          ld64_sym_process
 756  756  #define ld_sym_resolve          ld64_sym_resolve
      757 +#define ld_sym_reducable        ld64_sym_reducable
 757  758  #define ld_sym_spec             ld64_sym_spec
 758  759  #define ld_targ                 ld64_targ
 759  760  #define ld_targ_init_sparc      ld64_targ_init_sparc
 760  761  #define ld_targ_init_x86        ld64_targ_init_x86
 761  762  #define ld_unwind_make_hdr      ld64_unwind_make_hdr
 762  763  #define ld_unwind_populate_hdr  ld64_unwind_populate_hdr
 763  764  #define ld_unwind_register      ld64_unwind_register
 764  765  #define ld_vers_base            ld64_vers_base
 765  766  #define ld_vers_check_defs      ld64_vers_check_defs
 766  767  #define ld_vers_check_need      ld64_vers_check_need
↓ open down ↓ 78 lines elided ↑ open up ↑
 845  846  #define ld_swap_reloc_data      ld32_swap_reloc_data
 846  847  #define ld_sym_add_u            ld32_sym_add_u
 847  848  #define ld_sym_adjust_vis       ld32_sym_adjust_vis
 848  849  #define ld_sym_avl_comp         ld32_sym_avl_comp
 849  850  #define ld_sym_copy             ld32_sym_copy
 850  851  #define ld_sym_enter            ld32_sym_enter
 851  852  #define ld_sym_find             ld32_sym_find
 852  853  #define ld_sym_nodirect         ld32_sym_nodirect
 853  854  #define ld_sym_process          ld32_sym_process
 854  855  #define ld_sym_resolve          ld32_sym_resolve
      856 +#define ld_sym_reducable        ld32_sym_reducable
 855  857  #define ld_sym_spec             ld32_sym_spec
 856  858  #define ld_targ                 ld32_targ
 857  859  #define ld_targ_init_sparc      ld32_targ_init_sparc
 858  860  #define ld_targ_init_x86        ld32_targ_init_x86
 859  861  #define ld_unwind_make_hdr      ld32_unwind_make_hdr
 860  862  #define ld_unwind_populate_hdr  ld32_unwind_populate_hdr
 861  863  #define ld_unwind_register      ld32_unwind_register
 862  864  #define ld_vers_base            ld32_vers_base
 863  865  #define ld_vers_check_defs      ld32_vers_check_defs
 864  866  #define ld_vers_check_need      ld32_vers_check_need
↓ open down ↓ 6 lines elided ↑ open up ↑
 871  873  #define ld_vers_verify          ld32_vers_verify
 872  874  #define ld_wrap_enter           ld32_wrap_enter
 873  875  
 874  876  #endif
 875  877  
 876  878  extern void             dbg_cleanup(void);
 877  879  extern int              dbg_setup(Ofl_desc *, const char *, int);
 878  880  
 879  881  extern uintptr_t        ld_add_actrel(Word, Rel_desc *, Ofl_desc *);
 880  882  extern uintptr_t        ld_add_libdir(Ofl_desc *, const char *);
 881      -extern void             ld_adj_movereloc(Ofl_desc *, Rel_desc *);
 882      -extern Sym_desc *       ld_am_I_partial(Rel_desc *, Xword);
      883 +extern void             ld_adj_movereloc(Ofl_desc *, Rel_desc *);
      884 +extern Sym_desc *       ld_am_I_partial(Rel_desc *, Xword);
 883  885  extern void             ld_ar_member(Ar_desc *, Elf_Arsym *, Ar_aux *,
 884  886                              Ar_mem *);
 885  887  extern Ar_desc          *ld_ar_setup(const char *, Elf *, Ofl_desc *);
 886  888  extern uintptr_t        ld_assign_got_TLS(Boolean, Rel_desc *, Ofl_desc *,
 887  889                              Sym_desc *, Gotndx *, Gotref, Word, Word,
 888  890                              Word, Word);
 889  891  
 890  892  extern Word             ld_bswap_Word(Word);
 891  893  extern Xword            ld_bswap_Xword(Xword);
 892  894  
↓ open down ↓ 97 lines elided ↑ open up ↑
 990  992  extern int              ld_sym_avl_comp(const void *, const void *);
 991  993  extern uintptr_t        ld_sym_copy(Sym_desc *);
 992  994  extern Sym_desc         *ld_sym_enter(const char *, Sym *, Word, Ifl_desc *,
 993  995                              Ofl_desc *, Word, Word, sd_flag_t, avl_index_t *);
 994  996  extern Sym_desc         *ld_sym_find(const char *, Word, avl_index_t *,
 995  997                              Ofl_desc *);
 996  998  extern uintptr_t        ld_sym_nodirect(Is_desc *, Ifl_desc *, Ofl_desc *);
 997  999  extern uintptr_t        ld_sym_process(Is_desc *, Ifl_desc *, Ofl_desc *);
 998 1000  extern uintptr_t        ld_sym_resolve(Sym_desc *, Sym *, Ifl_desc *,
 999 1001                              Ofl_desc *, int, Word, sd_flag_t);
     1002 +extern Boolean          ld_sym_reducable(Ofl_desc *, Sym_desc *);
1000 1003  extern uintptr_t        ld_sym_spec(Ofl_desc *);
1001 1004  
1002 1005  extern Target           ld_targ;
1003 1006  extern const Target     *ld_targ_init_sparc(void);
1004 1007  extern const Target     *ld_targ_init_x86(void);
1005 1008  
1006 1009  extern uintptr_t        ld_unwind_make_hdr(Ofl_desc *);
1007 1010  extern uintptr_t        ld_unwind_populate_hdr(Ofl_desc *);
1008 1011  extern uintptr_t        ld_unwind_register(Os_desc *, Ofl_desc *);
1009 1012  
↓ open down ↓ 38 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX