Date: Sat, 28 Mar 2020 23:07:57 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH 3/4] ldso: move (un)map_library functions to separate file On Sat, Mar 28, 2020 at 07:19:27PM -0500, rcombs wrote: > --- > ldso/dynlink.c | 270 +-------------------------------------------------- > ldso/map_library.h | 276 +++++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 278 insertions(+), 268 deletions(-) > create mode 100644 ldso/map_library.h > > diff --git a/ldso/dynlink.c b/ldso/dynlink.c > index 5f637fd..0e557b1 100644 > --- a/ldso/dynlink.c > +++ b/ldso/dynlink.c > @@ -154,6 +154,8 @@ extern hidden void (*const __init_array_end)(void), (*const __fini_array_end)(vo > weak_alias(__init_array_start, __init_array_end); > weak_alias(__fini_array_start, __fini_array_end); > > +#include "map_library.h" > + As discussed before, I'd rather just duplicate the relevant part of map_library for dcrt1 than refactor dynlink.c like this. There's a lot of nommu logic that you don't have ready to work for dcrt1, and the presence of that code is obscuring the fact that the operation dcrt1 needs is extremely simple. Also, there are a lot of shims (in patch 4) to fake dynamic linker interfaces and libc functions for the shared map_library.h code to use, which make the reuse clunky. I think at some point it might be possible to factor things sufficiently so that map_library is completely decoupled from dynamic linker interfaces and able to be shared between these two components, but your dcrt1 work has already been held up for around a year and I'd like it to be able to move forward without depending on any refactoring. Would you like me to propose a stripped-down/decoupled version of the function that dcrt1 could use? Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.