summaryrefslogtreecommitdiffstats
path: root/ldso/include/ldso.h
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/include/ldso.h')
-rw-r--r--ldso/include/ldso.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/ldso/include/ldso.h b/ldso/include/ldso.h
index 011974482..4fa68522b 100644
--- a/ldso/include/ldso.h
+++ b/ldso/include/ldso.h
@@ -43,6 +43,19 @@
#endif
#include <dl-hash.h>
+/* common align masks, if not specified by sysdep headers */
+#ifndef ADDR_ALIGN
+#define ADDR_ALIGN (_dl_pagesize - 1)
+#endif
+
+#ifndef PAGE_ALIGN
+#define PAGE_ALIGN (~ADDR_ALIGN)
+#endif
+
+#ifndef OFFS_ALIGN
+#define OFFS_ALIGN (PAGE_ALIGN & ~(1ul << (sizeof(_dl_pagesize) * 8 - 1)))
+#endif
+
/* For INIT/FINI dependency sorting. */
struct init_fini_list {
struct init_fini_list *next;