From 0e0e49421f08cfd670975ecd3604f7f9015e1833 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Mon, 25 May 2015 00:32:37 -0400 Subject: 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. --- src/ldso/dlstart.c | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) 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