projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e69ae84
)
fix order of fini_array execution for shared libs
author
Rich Felker
<dalias@aerifal.cx>
Sun, 21 Jul 2013 06:35:46 +0000
(
02:35
-0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sun, 21 Jul 2013 06:35:46 +0000
(
02:35
-0400)
src/ldso/dynlink.c
patch
|
blob
|
history
diff --git
a/src/ldso/dynlink.c
b/src/ldso/dynlink.c
index dbf404ef2dcefef43d76dd7883921f96f915b308..829696ffe29b0c211995991f8b286f242ba5347e 100644
(file)
--- a/
src/ldso/dynlink.c
+++ b/
src/ldso/dynlink.c
@@
-698,8
+698,8
@@
static void do_fini()
decode_vec(p->dynv, dyn, DYN_CNT);
if (dyn[0] & (1<<DT_FINI_ARRAY)) {
size_t n = dyn[DT_FINI_ARRAYSZ]/sizeof(size_t);
- size_t *fn = (
void *)(p->base + dyn[DT_FINI_ARRAY])
;
- while (n--) ((void (*)(void))*
fn++
)();
+ size_t *fn = (
size_t *)(p->base + dyn[DT_FINI_ARRAY])+n
;
+ while (n--) ((void (*)(void))*
--fn
)();
}
if (dyn[0] & (1<<DT_FINI))
((void (*)(void))(p->base + dyn[DT_FINI]))();