projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ldso: fix invalid early references to extern-linkage libc.page_size
[musl]
/
ldso
/
dynlink.c
diff --git
a/ldso/dynlink.c
b/ldso/dynlink.c
index
8068fb3
..
09f3b0a
100644
(file)
--- a/
ldso/dynlink.c
+++ b/
ldso/dynlink.c
@@
-21,9
+21,15
@@
#include <sys/membarrier.h>
#include "pthread_impl.h"
#include "fork_impl.h"
#include <sys/membarrier.h>
#include "pthread_impl.h"
#include "fork_impl.h"
-#include "libc.h"
#include "dynlink.h"
#include "dynlink.h"
+static size_t ldso_page_size;
+#ifndef PAGE_SIZE
+#define PAGE_SIZE ldso_page_size
+#endif
+
+#include "libc.h"
+
#define malloc __libc_malloc
#define calloc __libc_calloc
#define realloc __libc_realloc
#define malloc __libc_malloc
#define calloc __libc_calloc
#define realloc __libc_realloc
@@
-1723,6
+1729,7
@@
hidden void __dls2(unsigned char *base, size_t *sp)
ldso.phnum = ehdr->e_phnum;
ldso.phdr = laddr(&ldso, ehdr->e_phoff);
ldso.phentsize = ehdr->e_phentsize;
ldso.phnum = ehdr->e_phnum;
ldso.phdr = laddr(&ldso, ehdr->e_phoff);
ldso.phentsize = ehdr->e_phentsize;
+ search_vec(auxv, &ldso_page_size, AT_PAGESZ);
kernel_mapped_dso(&ldso);
decode_dyn(&ldso);
kernel_mapped_dso(&ldso);
decode_dyn(&ldso);