提交 16f70388 编写于 作者: R Rich Felker

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.
上级 4058795d
#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);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册