Re: [PATCH 2/2] elf-from-memory: Refactor to get rid of nested function

2021-01-28 Thread Mark Wielaard
Hi Timm, On Fri, Jan 08, 2021 at 09:09:56AM +0100, Timm Bäder via Elfutils-devel wrote: > Try to unify the 32/64 bit code paths and get rid of the nested > handle_segment() this way. The new code does seem to do the same thing as the old code. Added a ChangeLog entry and pushed. Thanks, Mark

Re: [PATCH 1/2] elf-from-memory: Restructure code to get rid of nested handle_segment()

2021-01-28 Thread Mark Wielaard
Hi Timm, On Fri, Jan 08, 2021 at 09:09:55AM +0100, Timm Bäder via Elfutils-devel wrote: > Use one loop for both 32 and 64 bit case. This allows for only one call > site of the old handle_segment(), which we can then inline into the for > loop. It is a bit hard to see because of the reindenting,

Re: [PATCH 4/4] strip: Remove no_symtab_updates() function

2021-01-28 Thread Mark Wielaard
Hi Timm, On Fri, Jan 08, 2021 at 09:04:49AM +0100, Timm Bäder via Elfutils-devel wrote: > The no_symtab_updates() function was being called at the beginning of > all case labels in this switch, so we can just call it once before the > switch. Then it only has one call-site, so inline this short fu

Re: [PATCH 3/4] strip: Pull update_section_size() into file scope

2021-01-28 Thread Mark Wielaard
Hi Timm, On Fri, Jan 08, 2021 at 09:04:48AM +0100, Timm Bäder via Elfutils-devel wrote: > Get rid of a nested function this way. OK, it is a little messy IMHO that we have to pass 4 extra arguments to the function now, but it seems straightforward. Added a ChangeLog entry and pushed. Thanks, Ma

Re: [PATCH 2/4] strip: Pull relocate() info file scope

2021-01-28 Thread Mark Wielaard
Hi Timm, On Fri, Jan 08, 2021 at 09:04:47AM +0100, Timm Bäder via Elfutils-devel wrote: > Pull relocate() info file scope and get rid of a nested function this > way. Refactor remove_debug_relocations() to minimize the parameters we > need to pass to relocate(). OK. The diff makes it slightly har

Re: [PATCH 1/4] strip: Replace nested check_preserved function with loop

2021-01-28 Thread Mark Wielaard
Hi Timm, OK, this simply expands the inlined check_preserved function and keeps track of the section indexes with the new shdr_indices array that is populated with the sh_link and possibly the sh_info indices. Added a ChangeLog entry and pushed. Thanks, Mark

Re: Pending nested function removal

2021-01-28 Thread Navin P via Elfutils-devel
On Thu, Jan 28, 2021, 13:16 Timm Bäder wrote: > On 28/01/2021 06:19, Navin P via Elfutils-devel wrote: > > Hi, > > I tried to compile the nested functions and most of the files are > > complete. I find few others still pending. Below is the list which > > still has a nested function. > > I'm