diff options
author | Rod Evans <Rod.Evans@Oracle.COM> | 2010-08-02 14:04:48 -0700 |
---|---|---|
committer | Rod Evans <Rod.Evans@Oracle.COM> | 2010-08-02 14:04:48 -0700 |
commit | 94c044f41192918cbba413844d4b9827dd77298c (patch) | |
tree | 407adb509444b9e95a4ae6d847e84ce280cf6dfd /usr/src/cmd/sgs/libld/common/update.c | |
parent | 8ddb3a46e1a09773609249d578c6decb530951c2 (diff) | |
download | illumos-joyent-94c044f41192918cbba413844d4b9827dd77298c.tar.gz |
6935867 .dynamic could be readonly in sharable objects
Diffstat (limited to 'usr/src/cmd/sgs/libld/common/update.c')
-rw-r--r-- | usr/src/cmd/sgs/libld/common/update.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/usr/src/cmd/sgs/libld/common/update.c b/usr/src/cmd/sgs/libld/common/update.c index 622d69d3e4..556139f858 100644 --- a/usr/src/cmd/sgs/libld/common/update.c +++ b/usr/src/cmd/sgs/libld/common/update.c @@ -2200,6 +2200,7 @@ update_odynamic(Ofl_desc *ofl) if (not_relobj) { Aliste idx; + Sg_desc *sgp; if (ofl->ofl_config) { dyn->d_tag = DT_CONFIG; @@ -2502,19 +2503,10 @@ update_odynamic(Ofl_desc *ofl) dyn++; } - if (ofl->ofl_osdynamic->os_sgdesc && - (ofl->ofl_osdynamic->os_sgdesc->sg_phdr.p_flags & PF_W)) { - if (ofl->ofl_osinterp) { - dyn->d_tag = DT_DEBUG; - dyn->d_un.d_ptr = 0; - dyn++; - } - - dyn->d_tag = DT_FEATURE_1; - if (ofl->ofl_osmove) - dyn->d_un.d_val = 0; - else - dyn->d_un.d_val = DTF_1_PARINIT; + if (((sgp = ofl->ofl_osdynamic->os_sgdesc) != NULL) && + (sgp->sg_phdr.p_flags & PF_W) && ofl->ofl_osinterp) { + dyn->d_tag = DT_DEBUG; + dyn->d_un.d_ptr = 0; dyn++; } |