[v3,2/3] elf: avoid redundant sort in dlopen
diff mbox series

Message ID 1575394197-18006-3-git-send-email-david.kilroy@arm.com
State New
Headers show
Series
  • elf: Allow dlopen of filter object to work [BZ #16272]
Related show

Commit Message

David Kilroy Dec. 3, 2019, 5:30 p.m. UTC
l_initfini is already sorted by dependency in _dl_map_object_deps(),
so avoid sorting again in dl_open_worker().

Tested by running the testsuite on x86_64.
---
 elf/dl-open.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Adhemerval Zanella Jan. 14, 2020, 7:41 p.m. UTC | #1
On 03/12/2019 14:30, David Kilroy wrote:
> l_initfini is already sorted by dependency in _dl_map_object_deps(),
> so avoid sorting again in dl_open_worker().
> 
> Tested by running the testsuite on x86_64.

LGTM, thanks.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  elf/dl-open.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/elf/dl-open.c b/elf/dl-open.c
> index 9996fe9..c4d09c7c 100644
> --- a/elf/dl-open.c
> +++ b/elf/dl-open.c
> @@ -658,7 +658,6 @@ dl_open_worker (void *a)
>        l = new->l_initfini[++j];
>      }
>    while (l != NULL);
> -  _dl_sort_maps (maps, nmaps, NULL, false);
>  
>    int relocation_in_progress = 0;
>  
>

Patch
diff mbox series

diff --git a/elf/dl-open.c b/elf/dl-open.c
index 9996fe9..c4d09c7c 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -658,7 +658,6 @@  dl_open_worker (void *a)
       l = new->l_initfini[++j];
     }
   while (l != NULL);
-  _dl_sort_maps (maps, nmaps, NULL, false);
 
   int relocation_in_progress = 0;