From: Rich Felker Date: Mon, 25 May 2015 04:32:37 +0000 (-0400) Subject: simplify/shrink relocation processing in dynamic linker stage 1 X-Git-Tag: v1.1.10~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e0e49421f08cfd670975ecd3604f7f9015e1833;p=musl simplify/shrink relocation processing in dynamic linker stage 1 the outer-loop approach made sense when we were also processing DT_JMPREL, which might be in REL or RELA form, to avoid major code duplication. commit 09db855b35709aa627d7055c57a98e1e471920ab removed processing of DT_JMPREL, and in the remaining two tables, the format (REL or RELA) is known by the name of the table. simply writing two versions of the loop results in smaller and simpler code. --- diff --git a/src/ldso/dlstart.c b/src/ldso/dlstart.c index caa974a2..5f84465c 100644 --- a/src/ldso/dlstart.c +++ b/src/ldso/dlstart.c @@ -56,30 +56,22 @@ void _dlstart_c(size_t *sp, size_t *dynv) for (i=0; i