usr/src/cmd/sgs/libld/common/files.c
changeset 12449 a87750d92895
parent 12254 ff5bb54e2a40
child 13086 787bf65954d0
equal deleted inserted replaced
12448:f60856ebe541 12449:a87750d92895
  2201 			    (const char *)S_ERROR)
  2201 			    (const char *)S_ERROR)
  2202 				return (S_ERROR);
  2202 				return (S_ERROR);
  2203 
  2203 
  2204 		} else if (dyn->d_tag == DT_SUNW_RTLDINF) {
  2204 		} else if (dyn->d_tag == DT_SUNW_RTLDINF) {
  2205 			/*
  2205 			/*
  2206 			 * If a library has the SUNW_RTLDINF .dynamic entry
  2206 			 * If this dependency has the DT_SUNW_RTLDINF .dynamic
  2207 			 * then we must not permit lazyloading of this library.
  2207 			 * entry, then ensure no specialized dependency
  2208 			 * This is because critical startup information (TLS
  2208 			 * processing is in effect.  This tag identifies libc,
  2209 			 * routines) are provided as part of these interfaces
  2209 			 * which provides critical startup information (TLS
  2210 			 * and we must have them as part of process startup.
  2210 			 * routines, threads initialization, etc.) that must
       
  2211 			 * be exercised as part of process initialization.
  2211 			 */
  2212 			 */
  2212 			ifl->ifl_flags &= ~FLG_IF_LAZYLD;
  2213 			ifl->ifl_flags &= ~MSK_IF_POSFLAG1;
  2213 		}
  2214 		}
  2214 	}
  2215 	}
  2215 
  2216 
  2216 	/*
  2217 	/*
  2217 	 * Perform some SONAME sanity checks.
  2218 	 * Perform some SONAME sanity checks.
  3277 				ifl->ifl_soname = ifl->ifl_name;
  3278 				ifl->ifl_soname = ifl->ifl_name;
  3278 			else
  3279 			else
  3279 				ifl->ifl_soname = soname;
  3280 				ifl->ifl_soname = soname;
  3280 
  3281 
  3281 			/*
  3282 			/*
  3282 			 * If direct bindings, lazy loading, or group
  3283 			 * If direct bindings, lazy loading, group permissions,
  3283 			 * permissions need to be established, mark this object.
  3284 			 * or deferred dependencies need to be established, mark
       
  3285 			 * this object.
  3284 			 */
  3286 			 */
  3285 			if (ofl->ofl_flags1 & FLG_OF1_ZDIRECT)
  3287 			if (ofl->ofl_flags1 & FLG_OF1_ZDIRECT)
  3286 				ifl->ifl_flags |= FLG_IF_DIRECT;
  3288 				ifl->ifl_flags |= FLG_IF_DIRECT;
  3287 			if (ofl->ofl_flags1 & FLG_OF1_LAZYLD)
  3289 			if (ofl->ofl_flags1 & FLG_OF1_LAZYLD)
  3288 				ifl->ifl_flags |= FLG_IF_LAZYLD;
  3290 				ifl->ifl_flags |= FLG_IF_LAZYLD;
  3289 			if (ofl->ofl_flags1 & FLG_OF1_GRPPRM)
  3291 			if (ofl->ofl_flags1 & FLG_OF1_GRPPRM)
  3290 				ifl->ifl_flags |= FLG_IF_GRPPRM;
  3292 				ifl->ifl_flags |= FLG_IF_GRPPRM;
       
  3293 			if (ofl->ofl_flags1 & FLG_OF1_DEFERRED)
       
  3294 				ifl->ifl_flags |=
       
  3295 				    (FLG_IF_LAZYLD | FLG_IF_DEFERRED);
       
  3296 
  3291 			error = process_elf(ifl, elf, ofl);
  3297 			error = process_elf(ifl, elf, ofl);
  3292 
  3298 
  3293 			/*
  3299 			/*
  3294 			 * At this point we know if this file will be
  3300 			 * Determine whether this dependency requires a syminfo.
  3295 			 * lazyloaded, or whether bindings to it must be direct.
       
  3296 			 * In either case, a syminfo section is required.
       
  3297 			 */
  3301 			 */
  3298 			if (ifl->ifl_flags & (FLG_IF_LAZYLD | FLG_IF_DIRECT))
  3302 			if (ifl->ifl_flags & MSK_IF_SYMINFO)
  3299 				ofl->ofl_flags |= FLG_OF_SYMINFO;
  3303 				ofl->ofl_flags |= FLG_OF_SYMINFO;
  3300 
  3304 
  3301 			break;
  3305 			break;
  3302 		default:
  3306 		default:
  3303 			(void) elf_errno();
  3307 			(void) elf_errno();