about summary refs log tree commit diff
path: root/src/ldso/dynlink.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2012-08-05 14:03:17 -0400
committerRich Felker <dalias@aerifal.cx>2012-08-05 14:03:17 -0400
commit7d9a5c6af7738abe31d7631d6ae7194f94e850eb (patch)
tree6cd38f098daafc1064becc6e928210b97436dbda /src/ldso/dynlink.c
parentfa91df41e82f0dc84edab3e9ec7dcb47d7195fa1 (diff)
downloadmusl-7d9a5c6af7738abe31d7631d6ae7194f94e850eb.tar.gz
musl-7d9a5c6af7738abe31d7631d6ae7194f94e850eb.tar.xz
musl-7d9a5c6af7738abe31d7631d6ae7194f94e850eb.zip
more changes that were lost when committing mips dynamic linker
Diffstat (limited to 'src/ldso/dynlink.c')
-rw-r--r--src/ldso/dynlink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ldso/dynlink.c b/src/ldso/dynlink.c
index 6801d5fd..31ef6847 100644
--- a/src/ldso/dynlink.c
+++ b/src/ldso/dynlink.c
@@ -174,6 +174,8 @@ static void do_relocs(struct dso *dso, size_t *rel, size_t rel_size, size_t stri
 				_exit(127);
 			}
 			sym_size = sym->st_size;
+		} else {
+			sym_val = sym_size = 0;
 		}
 		do_single_reloc(reloc_addr, type, sym_val, sym_size, base, rel[2]);
 	}
@@ -688,9 +690,11 @@ void *__dynlink(int argc, char **argv)
 	 * all memory used by the dynamic linker. */
 	runtime = 1;
 
+#ifndef DYNAMIC_IS_RO
 	for (i=0; app->dynv[i]; i+=2)
 		if (app->dynv[i]==DT_DEBUG)
 			app->dynv[i+1] = (size_t)&debug;
+#endif
 	debug.ver = 1;
 	debug.bp = _dl_debug_state;
 	debug.head = head;