commit | 9f17413c753030811761d576fdb95f200bd818d7 | [log] [tgz] |
---|---|---|
author | Rich Felker <dalias@aerifal.cx> | Wed Jun 29 00:29:08 2011 -0400 |
committer | Rich Felker <dalias@aerifal.cx> | Wed Jun 29 00:29:08 2011 -0400 |
tree | c069c66819bb91df9bcfff9fb227528b96ae4395 | |
parent | 2cee45762a1e69444cd711a1a8112a401540081a [diff] [blame] |
textrel support, cheap and ugly
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c index 031e1f0..465fe4c 100644 --- a/src/ldso/dynlink.c +++ b/src/ldso/dynlink.c
@@ -248,6 +248,11 @@ } } } + for (i=0; ((size_t *)(base+dyn))[i]; i+=2) + if (((size_t *)(base+dyn))[i]==DT_TEXTREL) { + mprotect(map, map_len, PROT_READ|PROT_WRITE|PROT_EXEC); + break; + } if (!runtime) reclaim_gaps(base, (void *)((char *)buf + eh->e_phoff), eh->e_phentsize, eh->e_phnum); *lenp = map_len;