mirror of
https://github.com/fluencelabs/musl
synced 2025-04-24 23:02:14 +00:00
adapt static dl_iterate_phdr not to depend on !defined(SHARED)
like elsewhere, use a weak alias that the dynamic linker will override with a more complete version capable of handling shared libraries.
This commit is contained in:
parent
4058795d49
commit
16f70388d4
@ -1,12 +1,10 @@
|
||||
#ifndef SHARED
|
||||
|
||||
#include <elf.h>
|
||||
#include <link.h>
|
||||
#include "libc.h"
|
||||
|
||||
#define AUX_CNT 38
|
||||
|
||||
int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void *data), void *data)
|
||||
static int static_dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void *data), void *data)
|
||||
{
|
||||
unsigned char *p;
|
||||
ElfW(Phdr) *phdr, *tls_phdr=0;
|
||||
@ -40,4 +38,5 @@ int dl_iterate_phdr(int(*callback)(struct dl_phdr_info *info, size_t size, void
|
||||
}
|
||||
return (callback)(&info, sizeof (info), data);
|
||||
}
|
||||
#endif
|
||||
|
||||
weak_alias(static_dl_iterate_phdr, dl_iterate_phdr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user