Patch-ID# 107734-11 Keywords: security dlerror linker audit libdl mcs read-only tsorted cyclic Synopsis: SunOS 5.6_x86: linker patch Date: Jul/28/2003 Install Requirements: None Solaris Release: 2.6_x86 SunOS Release: 5.6_x86 Unbundled Product: Unbundled Release: Xref: This patch available for SPARC as patch 107733 Topic: SunOS 5.6_x86: linker patch Relevant Architectures: i386 BugId's fixed with this patch: 1046594 1182346 4008477 4040628 4044285 4050759 4058928 4062757 4064724 4066815 4067926 4068108 4069849 4074398 4075643 4077245 4079003 4079633 4081897 4084466 4085036 4085734 4088306 4092335 4092511 4092633 4093064 4095156 4095586 4096079 4096995 4097806 4099108 4099127 4099713 4100002 4102130 4102797 4103449 4104963 4105877 4106398 4107294 4107525 4108699 4108808 4110994 4112585 4114006 4116970 4118404 4121152 4121546 4122351 4124773 4126137 4126405 4127674 4128742 4128755 4129745 4134302 4134367 4135749 4141174 4143820 4145987 4150646 4153501 4156854 4159122 4160709 4161775 4165487 4165899 4168556 4173576 4174468 4176579 4176796 4179880 4187211 4188527 4188843 4204447 4205087 4210412 4213100 4214649 4215164 4215587 4219652 4225937 4234657 4235241 4235315 4238071 4239213 4243097 4248250 4248290 4250694 4254171 4255943 4256518 4267980 4270931 4287274 4289232 4291384 4292238 4295613 4297563 4300018 4300120 4303609 4306415 4309212 4310324 4310901 4311226 4312449 4313765 4316531 4318162 4321634 4322528 4322581 4324134 4324324 4324775 4327653 4329785 4334617 4335801 4336102 4336980 4343417 4343801 4344528 4346001 4346144 4346615 4349137 4349563 4351197 4352233 4352330 4354500 4356879 4357805 4358751 4358862 4366905 4367118 4367405 4368846 4369068 4371114 4372554 4377735 4377941 4381116 4381783 4385402 4390308 4393044 4394212 4394698 4401232 4401815 4402861 4404547 4413168 4413322 4418274 4421842 4429371 4432224 4433643 4446115 4446564 4447560 4448531 4450225 4450433 4452202 4452220 4453241 4453398 4455802 4460230 4461760 4461890 4462245 4462748 4463473 4465871 4467068 4468779 4469031 4469400 4469566 4469684 4470493 4475174 4475514 4481851 4482035 4485320 4488954 4491434 4492883 4496718 4496963 4497270 4499413 4503457 4503625 4503731 4503748 4503768 4505289 4506164 4510264 4513842 4515913 4516434 4518079 4518966 4519569 4521931 4522999 4523798 4524008 4524512 4524735 4524767 4526745 4532729 4587441 4619282 4620846 4621122 4872634 Changes incorporated in this version: 4872634 Patches accumulated and obsoleted by this patch: 105491-09 Patches which conflict with this patch: Patches required with this patch: Obsoleted by: Files included with this patch: /etc/lib/ld.so.1 /etc/lib/libdl.so.1 /usr/bin/crle /usr/bin/ldd /usr/bin/pvs /usr/bin/sotruss /usr/bin/whocalls /usr/ccs/bin/ar /usr/ccs/bin/dump /usr/ccs/bin/elfdump /usr/ccs/bin/gprof /usr/ccs/bin/ld /usr/ccs/bin/lorder /usr/ccs/bin/mcs /usr/ccs/bin/nm /usr/ccs/bin/size /usr/ccs/bin/strip /usr/ccs/lib/libld.so.2 /usr/ccs/lib/liblddbg.so.4 /usr/ccs/lib/link_audit/ldprof.so.1 /usr/ccs/lib/link_audit/truss.so.1 /usr/ccs/lib/link_audit/who.so.1 /usr/demo/link_audit/00README /usr/demo/link_audit/Makefile /usr/demo/link_audit/man/dumpbind.man /usr/demo/link_audit/man/perfcnt.man /usr/demo/link_audit/man/sotruss.man /usr/demo/link_audit/man/symbindrep.man /usr/demo/link_audit/man/whocalls.man /usr/demo/link_audit/src/bindings.c /usr/demo/link_audit/src/bindings.h /usr/demo/link_audit/src/dumpbind.c /usr/demo/link_audit/src/env.c /usr/demo/link_audit/src/env.h /usr/demo/link_audit/src/hash.c /usr/demo/link_audit/src/hash.h /usr/demo/link_audit/src/mach.h /usr/demo/link_audit/src/perfcnt.c /usr/demo/link_audit/src/perfcnt.ksh /usr/demo/link_audit/src/sotruss.ksh /usr/demo/link_audit/src/symbindrep.c /usr/demo/link_audit/src/symbindrep.ksh /usr/demo/link_audit/src/truss.c /usr/demo/link_audit/src/who.c /usr/demo/link_audit/src/who.h /usr/demo/link_audit/src/whocalls.ksh /usr/include/dlfcn.h /usr/include/gelf.h /usr/include/libelf.h /usr/include/link.h /usr/include/proc_service.h /usr/include/rtld_db.h /usr/include/sys/elf.h /usr/include/sys/elf_386.h /usr/include/sys/elf_M32.h /usr/include/sys/elf_SPARC.h /usr/include/sys/elf_notes.h /usr/include/sys/elftypes.h /usr/include/sys/link.h /usr/include/sys/machelf.h /usr/include/sys/note.h /usr/lib/0@0.so.1 /usr/lib/ld.so.1 /usr/lib/ld/map.bssalign /usr/lib/ld/map.default /usr/lib/ld/map.noexstk /usr/lib/lddstub /usr/lib/libcrle.so.1 /usr/lib/libdl.so /usr/lib/libdl.so.1 /usr/lib/libelf.a /usr/lib/libelf.so /usr/lib/libelf.so.1 /usr/lib/libld.so.2 /usr/lib/liblddbg.so.4 /usr/lib/libldfeature.a /usr/lib/libldstab.so.1 /usr/lib/librtld.so.1 /usr/lib/librtld_db.so /usr/lib/librtld_db.so.1 /usr/lib/link_audit/ldprof.so.1 /usr/lib/link_audit/truss.so.1 /usr/lib/link_audit/who.so.1 /usr/lib/llib-lelf.ln /usr/xpg4/bin/ar /usr/xpg4/bin/nm Problem Description: 4872634 Large LD_PRELOAD values can cause SEGV of process (from 107734-10) 4381783 dlopen/dlclose of a libCrun+libthread can dump core 4210412 versioning a static executable causes ld to core dump 4219652 Linker gives misleading error about not finding main (xarch=v9) 4103449 ld command needs a command line flag to force 64-bits 4187211 problem with RDISP32 linking in copy-relocated objects 4287274 dladdr, dlinfo do not provide the full path name of a shared object 4297563 dlclose still does not remove all objects. 4250694 rtld_db needs a new auxvec entry 4235315 new features for rtld_db (DT_CHECKSUM, dynamic linked .o files 4303609 64bit libelf.so.1 does not properly implement elf_hash() 4310901 su.static fails when OSNet build with lazy-loading 4310324 elf_errno() causes Bus Error(coredump) in 64-bit multithreaded programs 4306415 ld core dump 4316531 BCP: possible failure with dlclose/_preexec_exit_handlers 4313765 LD_BREADTH should be shot 4318162 crle uses automatic strings in putenv. 4255943 Description of -t option incomplete. 4322528 sgs message test infrastructure needs improvement 4239213 Want an API to obtain linker's search path 4324134 use of extern mapfile directives can contribute unused symbols 4322581 ELF data structures could be laid out more efficiently... 4040628 Unnecessary section header symbols should be removed from .dynsym 4300018 rtld: bindlock should be freed before calling call_fini() 4336102 dlclose with non-deletable objects can mishandle dependencies 4329785 mixing of SHT_SUNW_COMDAT & SHF_ORDERED causes ld to seg fault 4334617 COPY relocations should be produces for references to .bss symbols 4248250 relocation of local ABS symbols incorrect 4335801 For complimentary alignments eliminate ld: warning: symbol `ll' has differing a 4336980 ld.so.1 relative path processing revisited 4243097 dlerror(3DL) is not affected by setlocale(3C). 4344528 dump should remove -D and -l usage message 4346144 link-auditing: plt_tracing fails if LA_SYMB_NOPLTENTER given after being bound 4346001 The ld should support mapfile syntax to generate PT_SUNWSTACK segment 4349137 rtld_db: A third fallback method for locating the linkmap 4343417 dladdr interface information inadequate 4343801 RFE: crle(1): provide option for updating configuration files 4346615 ld.so.1 attempting to open a directory gives: No such device 4352233 crle should not honor umask 4352330 LD_PRELOAD cannot use absolute path for privileged program 4357805 RFE: man page for ld(1) does not document all -z or -B options in Solaris 8 9/00 4358751 ld.so.1: LD_XXX environ variables and LD_FLAGS should be synchronized. 4358862 link editors should reference "64" symlinks instead of sparcv9 (ia64). 4356879 PLTs could use faster code sequences in some cases 4367118 new fast baplt's fail when traversed twice in threaded application 4366905 Need a way to determine path to a shared library 4351197 nfs performance problem by 103627-13 4367405 LD_LIBRARY_PATH_64 not being used 4354500 SHF_ORDERED ordered sections does not properly sort sections 4369068 ld(1)'s weak symbol processing is inefficient (slow and doesn't scale). 4368846 ld(1) fails to version some interfaces given in a mapfile 4077245 dump core dump on null pointer. 4372554 elfdump should demangle symbols (like nm, dump) 4371114 dlclose may unmap a promiscuous object while it's still in use. 4204447 elfdump should understand SHN_AFTER/SHN_BEGIN macro 4377941 initialization of interposers may not occur 4381116 ldd/ld.so.1 could aid in detecting unused dependencies 4385402 linker & run-time linker must support gABI ELF updates 4394698 ld.so.1 does not process DF_SYMBOLIC - not gABI conforming 4394212 the link editor quietly ignores missing support libraries 4390308 ld.so.1 should provide more flexibility LD_PRELOAD'ing 32-bit/64-bit objects 4401232 crle(1) could provide better flexibility for alternatives 4401815 fix misc nits in debugging output... 4402861 cleanup /usr/demo/link_audit & /usr/tmp/librtld_db demo source code... 4393044 elfdump should allow raw dumping of sections 4413168 SHF_ORDERED bit causes linker to generate a separate section 4452202 Typos in 4452220 dump doesn't support RUNPATH 4421842 fixups in SHT_GROUP processing required... 4450433 problem with liblddbg output on -Dsection,detail when processing SHF_LINK_ORDER 4463473 pldd showing wrong output 4488954 ld.so.1 reuses same buffer to send unmapping range to _preexec_exit_handlers() 4505289 incorrect handling of _START_ and _END_ 4506164 mcs does not recognize #linkbefore or #linkafter qualifiers 4447560 strip is creating unexecutable files... 4513842 library names not in ld.so string pool cause corefile bugs 4291384 ld -M with a mapfile does not properly align Fortran REAL*8 data 4413322 SunOS 5.9 librtld_db doesn't show dlopened ".o" files anymore? 4429371 librtld_db busted on ia32 with SC6.x compilers... 4418274 elfdump dumps core on invalid input 4432224 libelf xlate routines are out of date 4433643 Memory leak using dlopen()/dlclose() in Solaris 8 4446564 ldd/lddstub - core dump conditions 4446115 translating SUNW_move sections is broken 4450225 The rdb command can fall into an infinite loop 4448531 Linker Causes Segmentation Fault 4453241 Regression in 4291384 can result in empty symbol table. 4453398 invalid runpath token can cause ld to spin. 4460230 ld (for OS 5.8 and 5.9) loses error message 4462245 ld.so.1 core dumps when executed directly... 4455802 need more flexibility in establishing a support library for ld 4467068 dyn_plt_entsize not properly initialized in ld.so.1 4468779 elf_plt_trace_write() broken on i386 (link-auditing) 4465871 -zld32 and -zld64 does not work the way it should 4461890 bad shared object created with -zredlocsym 4469400 ld.so.1: is_so_loaded isn't as efficient as we thought... 4469566 lazy loading fallback can reference un-relocated objects 4470493 libelf incorrectly translates NOTE sections across architectures... 4469684 rtld leaks dl_handles and permits on dlopen/dlclose 4475174 ld.so.1 prematurely reports the failure to load a object... 4475514 ld.so.1 can core dump in memory allocation fails (no swap) 4481851 Setting ld.so.1 environment variables globally would be useful 4482035 setting LD_PROFILE & LD_AUDIT causes ping command to issue warnings on 5.8 4377735 segment reservations cause sbrk() to fail 4491434 ld.so.1 can leak file-descriptors when loading same named objects 4289232 some of warning/error/debugging messages from libld.so can be revised 4462748 Linker Portion of TLS Support 4496718 run-time linkers mutex_locks not working with ld_libc interface 4497270 The -zredlocsym option should not eliminate partially initialized local symbols 4496963 dumping an object with crle(1) that uses $ORIGIN can loose its dependencies 4499413 Sun linker orders of magnitude slower than gnu linker 4461760 lazy loading libXm and libXt can fail. 4469031 The partial initialized (local) symbols for intel platform is not working. 4492883 Add link-editor option to multi-pass archives to resolve unsatisfied symbols 4503731 linker-related commands misspell "argument" 4503768 whocalls(1) should output messages to stderr, not stdout 4503748 whocalls(1) usage message and manpage could be improved 4503625 nm should be taught about TLS symbols - that they aren't allowed that is 4300120 segment address validation is too simplistic to handle segment reservations 4404547 krtld/reloc.h could have better error message, has typos 4270931 R_SPARC_HIX22 relocation is not handled properly 4485320 ld needs to support more the 32768 PLTs 4516434 sotruss can not watch libc_psr.so.1 4213100 sotruss could use more flexible pattern matching 4503457 ld seg fault with comdat 4510264 sections with SHF_TLS can come in different orders... 4518079 link-editor support library unable to modify section header flags 4515913 ld.so.1 can incorrectly decrement external reference counts on dlclose() 4519569 ld -V does not return a interesting value... 4524512 ld.so.1 should allow alternate termination signals 4524767 elfdump dies on bogus sh_name fields... 4524735 ld getopt processing of '-' changed 4521931 subroutine in a shared object as LOCL instead of GLOB 4522999 Solaris linker one order of magnitude slower than GNU linker 4532729 tentative definition of TLS variable causes linker to dump core 4526745 fixup ld error message about duplicate dependencies/needed names 4518966 dldump undoes existing relocations with no thought of alignment or size. 4587441 Certain libraries have race conditions when setting error codes 4523798 linker option to align bss to large pagesize alignments. 4524008 ld can improperly set st_size of symbols named "_init" or "_fini" 4619282 ld cannot link a program with the option -sb 4620846 Perl Configure probing broken by ld changes 4621122 multiple ld '-zinitarray=' on a commandline fails (from 107734-09) 4349563 auxiliary filter error handling regression introduced in 4165487 (from 107734-08) 4324775 non-PIC code & -zcombreloc don't mix very well... 4327653 run-time linker should preload tables it will process (madvise) 4324324 shared object code can be referenced before .init has fired 4321634 .init firing of multiple INITFIRST objects can fail (from 107734-07) 4311226 rejection of preloading in secure apps is inconsistent 4309212 dlsym can't find symbol 4312449 dlclose: invalid deletion of dependency can occur using RTLD_GLOBAL (from 107734-06) 4292238 linking a library which has a static char ptr invokes mprotect() call 4295613 COMMON symbol resolution can be incorrect (from 107734-05) Repatch and uprev to 05 due to missing tsort.c. (from 107734-04) 4256518 miscalculated calloc() during dlclose/tsorting can result in segv 4254171 DT_SPARC_REGISTER has invalid value associated with it. 4267980 INITFIRST flag of the shared object could be ignored. (from 107734-03) 4248290 inetd dumps core upon bootup - failure in dlclose() logic. 4238071 dlopen() leaks file descriptors under low memory conditions (from 107734-02) 4215587 using ld and the -r option on solaris 7 with compiler option -xarch=v9 causes 4234657 103627-08 breaks purify 4.2 (plt padding should not be enabled for 32-bit) 4235241 dbx no longer gets dlclose notification. 4215164 shf_order flag handling broken by fix for 4194028 4225937 i386 linker emits sparc specific warning messages (from 107734-01) 4214649 cyclic dependencies within tsorted inits can fail with lazy loading 4165487 lazy loading updates required (from 105491-09) 4173576 Segmentation Fault on register-symbol declaration building a.out 4174468 scratch register symbol has multiple entries in .dynamic for same register 4179880 DT_RELASZ in .dynamic incorrectly calculated when .rela for reg-sym present 4188527 lorder output incorrect for v9 objects with global register ELF records 4188843 nm -p produces key letter of 13 for global register records 4205087 linker patch 103627-08 breaks viewpathing (from 105491-08) 4159122 UNIX98: dlclose() to invalid handle may dump core (from 105491-07) 4176579 problem loading dynamically linked libraries with setuid root 4176796 the Intel version of visu crashes before main (from 105491-06) 4107294 contents of /usr/ccs/lib should be moved to /usr/lib and symlink created 4106398 size of .bss section is truncated 4110994 patch 103627-02 and 105490-02 breaks implicit arch dependence result from libs 4092633 rtld_db only returns link-map lists for ld.so.1 & base 4116970 gelf.h fails to compile under C++ 4114006 dlopen() and symbol addressing failures 4118404 link_audit: pltglue applied on functions which don't need it. 1046594 RFE: allow multiple initializations of a COMMON block 4122351 need 64-bit port of rdb_demo 4121546 rtld_db: displaying 32bit link_maps from 64bit process is broken 4124773 ld has 2GB file size limit 4069849 mcs: multiple -a xxx with null .comment section is ignored 4105877 patch 103627-02 causes sources to core dump 4126137 EF_SPARC_SUN_US3 flag added to v9 ABI 4127674 dlopen() doesn't always use the correct link map 4129745 fix WDISP30 relocations won't reach errors on sparcv9 4099108 dladdr returns argv[0] in dli_fname 4121152 linker does not complain about type mismatches 4128742 register symbols are not implemented for sparc 4135749 gelf_getehdr segmentation faults 4141174 elf utilities are not consistent printing 64-bit fields 4143820 change to v9 ABI spec for PCPLT10 relocation 4145987 32-bit nlist(3E) on 64-bit object leaks fd's 4134302 dlopen/dlclose leaks memory 4134367 libthread panic: alloc_chunk due to too many open files 4128755 doreloc() is truncating relocation error messages... 4153501 patch 103627-02 causes ksh to core dump 4156854 Symbol yp_get_default_domain not found by the gethostent() function 4160709 dlopen() fails on library (libxil) built with -lthread 4161775 nm dumps core on ELF with no symbol table. 4159122 UNIX98: dlclose() to invalid handle may dump core 4165899 ld execs 64-bit ld when linking Elf32, can break apps using procfs. 4168556 elfdump truncates 64-bit symbol values (from 105491-05) 4150646 security bug 1241843 resurfaces in 2.6 (from 105491-04) 4112585 mcs -p fails on read-only binaries 4126405 compiling MSTC* test suites abort; Elf64_Half is not defined (from 105491-03) This revision fixes a packaging issue with the previous rev where the header file /usr/include/sys/elftypes.h was omitted from the patch package. No other bug fixes are being delivered. (from 105491-02) 1182346 utilities need to use cplus_demangle from latest version of libC.so 4008477 change where executable finds its libraries without re-linking 4044285 combining relocation sections yields performance gain 4050759 /usr/ccs/bin/dump -sv or -r hit SIGBUS on -dn stripped binaries 4058928 segment reservations made too soon 4064724 linking against EM_SPARC32PLUS dynamic library results in a EM_SPARC32PLUS obj 4066815 GOT table on x86 has empty fields 4067926 strip breaks hard links 4068108 dlerror() messages printed to stderr during link-auditing 4074398 2.4 app takes up 8X more space under 2.5.1 4075643 -zallextract can corrupt relocation section placement 4079003 multiplication fails intermittently with libthread linked against program 4079633 typo in new "gelf.h" wyoming header file 4081897 stripping shared object makes an illegal binary that crashes ld 4084466 elf32_newehdr() hangs in programs linked with libthread. 4085036 need lazy loading with Solaris 4085734 ld: V9 default load address is different to V8 4088306 introduce new section SHT_COMDAT 4092335 chkmesg not able to find xlate.c during build of libelf 4092511 object size silently truncated to 32 bits 4093064 elfdump coredumps inside of syminfo processing 4095156 64-bit link auditing 4095586 need LD_PROFILE for 64-bit libraries 4096079 ABI requires HIX22 and LOX10 reloc types (Hal additions) 4096995 gelf needs to be made MT-safe 4097806 runtime linker references a unmapped address causing libthread panic 4099127 dlopen failure in link auditing context can be hazardous to your health 4099713 stripping and scoping create invalid init/fini dynamic tags. 4100002 /usr/ccs/bin/dump gives different results on 2.7 compared with 2.6 4102130 linker needs dependency search continuation 4102797 elftypes.h uses new 2.7 inttypes data structures 4104963 either EM_NUM or EM_SPARCV9 needs to change 4107525 locking in eprint() is incorrect; causes hangs on MT applications on 2.6 4108699 lazy loading can cause .init sections to fire off to soon. 4108808 text segment re-mapped read-write when not required (from 105491-01) 4068108 dlerror() messages printed to stderr during link-auditing 4062757 link auditing breaks apps using libdl Patch Installation Instructions: -------------------------------- Refer to the Install.info file within the patch for instructions on using the generic 'installpatch' and 'backoutpatch' scripts provided with each patch. Any other special or non-generic installation instructions should be described below. Special Install Instructions: ----------------------------- None. README -- Last modified date: Monday, July 28, 2003