about summary refs log tree commit diff
path: root/elf/dl-find_object.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2023-07-07 10:11:26 +0200
committerFlorian Weimer <fweimer@redhat.com>2023-07-07 10:11:26 +0200
commit1bcfe0f732066ae5336b252295591ebe7e51c301 (patch)
treedbdb5fc80df296b97b50fb008610905786e1072f /elf/dl-find_object.c
parent0567edf1b2def04840e38e3610452c51a3f440a3 (diff)
downloadglibc-1bcfe0f732066ae5336b252295591ebe7e51c301.tar.gz
glibc-1bcfe0f732066ae5336b252295591ebe7e51c301.tar.xz
glibc-1bcfe0f732066ae5336b252295591ebe7e51c301.zip
elf: _dl_find_object may return 1 during early startup (bug 30515)
Success is reported with a 0 return value, and failure is -1.
Enhance the kitchen sink test elf/tst-audit28 to cover
_dl_find_object as well.

Fixes commit 5d28a8962dcb ("elf: Add _dl_find_object function")
and bug 30515.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'elf/dl-find_object.c')
-rw-r--r--elf/dl-find_object.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-find_object.c b/elf/dl-find_object.c
index 928eb499cc..c1390ee10f 100644
--- a/elf/dl-find_object.c
+++ b/elf/dl-find_object.c
@@ -46,7 +46,7 @@ _dl_find_object_slow (void *pc, struct dl_find_object *result)
           struct dl_find_object_internal internal;
           _dl_find_object_from_map (l, &internal);
           _dl_find_object_to_external (&internal, result);
-          return 1;
+          return 0;
         }
 
   /* Object not found.  */