mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-05 19:35:52 +03:00
elf: Do not add a copy of _dl_find_object to libc.so
This reduces code size and dependencies on ld.so internals from
libc.so.
Fixes commit f4c142bb9f
("arm: Use _dl_find_object on __gnu_Unwind_Find_exidx (BZ 31405)").
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
This commit is contained in:
@@ -34,7 +34,6 @@ routines = \
|
|||||||
dl-addr \
|
dl-addr \
|
||||||
dl-addr-obj \
|
dl-addr-obj \
|
||||||
dl-early_allocate \
|
dl-early_allocate \
|
||||||
dl-find_object \
|
|
||||||
dl-iteratephdr \
|
dl-iteratephdr \
|
||||||
dl-libc \
|
dl-libc \
|
||||||
dl-origin \
|
dl-origin \
|
||||||
@@ -61,6 +60,7 @@ dl-routines = \
|
|||||||
dl-deps \
|
dl-deps \
|
||||||
dl-exception \
|
dl-exception \
|
||||||
dl-execstack \
|
dl-execstack \
|
||||||
|
dl-find_object \
|
||||||
dl-fini \
|
dl-fini \
|
||||||
dl-init \
|
dl-init \
|
||||||
dl-load \
|
dl-load \
|
||||||
|
@@ -356,7 +356,7 @@ _dlfo_lookup (uintptr_t pc, struct dl_find_object_internal *first1, size_t size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
__dl_find_object (void *pc1, struct dl_find_object *result)
|
_dl_find_object (void *pc1, struct dl_find_object *result)
|
||||||
{
|
{
|
||||||
uintptr_t pc = (uintptr_t) pc1;
|
uintptr_t pc = (uintptr_t) pc1;
|
||||||
|
|
||||||
@@ -463,8 +463,7 @@ __dl_find_object (void *pc1, struct dl_find_object *result)
|
|||||||
return -1;
|
return -1;
|
||||||
} /* Transaction retry loop. */
|
} /* Transaction retry loop. */
|
||||||
}
|
}
|
||||||
hidden_def (__dl_find_object)
|
rtld_hidden_def (_dl_find_object)
|
||||||
weak_alias (__dl_find_object, _dl_find_object)
|
|
||||||
|
|
||||||
/* _dlfo_process_initial is called twice. First to compute the array
|
/* _dlfo_process_initial is called twice. First to compute the array
|
||||||
sizes from the initial loaded mappings. Second to fill in the
|
sizes from the initial loaded mappings. Second to fill in the
|
||||||
|
@@ -4,8 +4,7 @@
|
|||||||
#include <link.h> /* For ElfW. */
|
#include <link.h> /* For ElfW. */
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
extern __typeof (_dl_find_object) __dl_find_object;
|
rtld_hidden_proto (_dl_find_object)
|
||||||
hidden_proto (__dl_find_object)
|
|
||||||
|
|
||||||
/* Internally used flag. */
|
/* Internally used flag. */
|
||||||
#define __RTLD_DLOPEN 0x80000000
|
#define __RTLD_DLOPEN 0x80000000
|
||||||
|
@@ -15,6 +15,7 @@
|
|||||||
License along with the GNU C Library. If not, see
|
License along with the GNU C Library. If not, see
|
||||||
<https://www.gnu.org/licenses/>. */
|
<https://www.gnu.org/licenses/>. */
|
||||||
|
|
||||||
|
#include <ldsodefs.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
|
|
||||||
/* Find the exception index table containing PC. */
|
/* Find the exception index table containing PC. */
|
||||||
@@ -23,7 +24,7 @@ _Unwind_Ptr
|
|||||||
__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
|
__gnu_Unwind_Find_exidx (_Unwind_Ptr pc, int * pcount)
|
||||||
{
|
{
|
||||||
struct dl_find_object data;
|
struct dl_find_object data;
|
||||||
if (__dl_find_object ((void *) pc, &data) < 0)
|
if (GLRO(dl_find_object) ((void *) pc, &data) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
*pcount = data.dlfo_eh_count;
|
*pcount = data.dlfo_eh_count;
|
||||||
return (_Unwind_Ptr) data.dlfo_eh_frame;
|
return (_Unwind_Ptr) data.dlfo_eh_frame;
|
||||||
|
Reference in New Issue
Block a user