205
206 /*
207 * For compatibility with libthread (TI_VERSION 1) we track the entry
208 * value. A zero value indicates we have recursed into ld.so.1 to
209 * further process a locking request. Under this recursion we disable
210 * tsort and cleanup activities.
211 */
212 entry = enter(0);
213
214 lml = LIST(lmp);
215 if ((lmflags = lml->lm_flags) & LML_FLG_RTLDLM) {
216 dbg_class = dbg_desc->d_class;
217 dbg_desc->d_class = 0;
218 }
219
220 /*
221 * Perform some basic sanity checks. If we didn't get a load map or
222 * the relocation offset is invalid then its possible someone has walked
223 * over the .got entries or jumped to plt0 out of the blue.
224 */
225 if (!lmp || ((reloff % sizeof (Rel)) != 0)) {
226 Conv_inv_buf_t inv_buf;
227
228 eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_PLTREF),
229 conv_reloc_386_type(R_386_JMP_SLOT, 0, &inv_buf),
230 EC_NATPTR(lmp), EC_XWORD(reloff), EC_NATPTR(from));
231 rtldexit(lml, 1);
232 }
233
234 /*
235 * Use relocation entry to get symbol table entry and symbol name.
236 */
237 addr = (ulong_t)JMPREL(lmp);
238 rptr = (Rel *)(addr + reloff);
239 rsymndx = ELF_R_SYM(rptr->r_info);
240 rsym = (Sym *)((ulong_t)SYMTAB(lmp) + (rsymndx * SYMENT(lmp)));
241 name = (char *)(STRTAB(lmp) + rsym->st_name);
242
243 /*
244 * Determine the last link-map of this list, this'll be the starting
245 * point for any tsort() processing.
|
205
206 /*
207 * For compatibility with libthread (TI_VERSION 1) we track the entry
208 * value. A zero value indicates we have recursed into ld.so.1 to
209 * further process a locking request. Under this recursion we disable
210 * tsort and cleanup activities.
211 */
212 entry = enter(0);
213
214 lml = LIST(lmp);
215 if ((lmflags = lml->lm_flags) & LML_FLG_RTLDLM) {
216 dbg_class = dbg_desc->d_class;
217 dbg_desc->d_class = 0;
218 }
219
220 /*
221 * Perform some basic sanity checks. If we didn't get a load map or
222 * the relocation offset is invalid then its possible someone has walked
223 * over the .got entries or jumped to plt0 out of the blue.
224 */
225 if ((reloff % sizeof (Rel)) != 0) {
226 Conv_inv_buf_t inv_buf;
227
228 eprintf(lml, ERR_FATAL, MSG_INTL(MSG_REL_PLTREF),
229 conv_reloc_386_type(R_386_JMP_SLOT, 0, &inv_buf),
230 EC_NATPTR(lmp), EC_XWORD(reloff), EC_NATPTR(from));
231 rtldexit(lml, 1);
232 }
233
234 /*
235 * Use relocation entry to get symbol table entry and symbol name.
236 */
237 addr = (ulong_t)JMPREL(lmp);
238 rptr = (Rel *)(addr + reloff);
239 rsymndx = ELF_R_SYM(rptr->r_info);
240 rsym = (Sym *)((ulong_t)SYMTAB(lmp) + (rsymndx * SYMENT(lmp)));
241 name = (char *)(STRTAB(lmp) + rsym->st_name);
242
243 /*
244 * Determine the last link-map of this list, this'll be the starting
245 * point for any tsort() processing.
|