diff options
| author | Rod Evans <Rod.Evans@Sun.COM> | 2009-04-10 13:45:29 -0700 |
|---|---|---|
| committer | Rod Evans <Rod.Evans@Sun.COM> | 2009-04-10 13:45:29 -0700 |
| commit | dde769a2c00c82faaf80563ddd5610de2f4da339 (patch) | |
| tree | 1c1aa17faaee1d823ca6489db681459e6bb399f4 /usr/src/cmd/sgs/rtld/common/remove.c | |
| parent | 983a10335731bc55a0b7a37f195575fa109e30d4 (diff) | |
| download | illumos-joyent-dde769a2c00c82faaf80563ddd5610de2f4da339.tar.gz | |
6715578 AOUT (BCP) symbol lookup can be compromised with lazy loading.
6752883 ld.so.1 error message should be buffered (not sent to stderr).
6577982 ld.so.1 calls getpid() before it should when any LD_* are set
6826513 ldd gets confused by a crle(1) LD_PRELOAD setting
Diffstat (limited to 'usr/src/cmd/sgs/rtld/common/remove.c')
| -rw-r--r-- | usr/src/cmd/sgs/rtld/common/remove.c | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/usr/src/cmd/sgs/rtld/common/remove.c b/usr/src/cmd/sgs/rtld/common/remove.c index e11c4d0444..7e978f1eb5 100644 --- a/usr/src/cmd/sgs/rtld/common/remove.c +++ b/usr/src/cmd/sgs/rtld/common/remove.c @@ -465,20 +465,18 @@ remove_lists(Rt_map *lmp, int lazy) void remove_cntl(Lm_list *lml, Aliste lmco) { - if (lmco && (lmco != ALIST_OFF_DATA)) { - Aliste _lmco = lmco; + Aliste _lmco = lmco; #if DEBUG - Lm_cntl *lmc; + Lm_cntl *lmc; - lmc = (Lm_cntl *)alist_item_by_offset(lml->lm_lists, lmco); + lmc = (Lm_cntl *)alist_item_by_offset(lml->lm_lists, lmco); - /* - * This element should be empty. - */ - ASSERT(lmc->lc_head == NULL); + /* + * This element should be empty. + */ + ASSERT(lmc->lc_head == NULL); #endif - alist_delete_by_offset(lml->lm_lists, &_lmco); - } + alist_delete_by_offset(lml->lm_lists, &_lmco); } /* @@ -1068,8 +1066,12 @@ remove_hdl(Grp_hdl *ghp, Rt_map *clmp, int *removed) (GPD_FILTER | GPD_ADDEPS)) != GPD_FILTER) continue; - if (aplist_test(&lmalp, gdp->gd_depend, 0) == - ALE_EXISTS) + lmp = gdp->gd_depend; + + if (FLAGS(lmp) & FLG_RT_DELETE) + continue; + + if (aplist_test(&lmalp, lmp, 0) == ALE_EXISTS) continue; /* @@ -1078,8 +1080,7 @@ remove_hdl(Grp_hdl *ghp, Rt_map *clmp, int *removed) * that are candidates for deletion to continue this * group verification. */ - DBG_CALL(Dbg_file_hdl_collect(ghp, - NAME(gdp->gd_depend))); + DBG_CALL(Dbg_file_hdl_collect(ghp, NAME(lmp))); aplist_delete(ghalp, &idx1); free(lmalp); @@ -1398,9 +1399,7 @@ remove_hdl(Grp_hdl *ghp, Rt_map *clmp, int *removed) * sure the filtees reference count * gets decremented. */ - if ((FLAGS(lmp) & FLG_RT_DELETE) && - ((gdp->gd_flags & - GPD_PARENT) == 0)) { + if (FLAGS(lmp) & FLG_RT_DELETE) { (void) dlclose_core(ghp, lmp, lml); } |
