Stop defining our own PAGE_SIZE and PAGE_MASK, and test dlclose(3) too.
Also remove an unnecessary #include and a now-obsolete TODO.
Change-Id: I36d923721e349a286934b9534090a67ce0786e7b
diff --git a/linker/linker.h b/linker/linker.h
index de83a8c..2a6c1cd 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -36,25 +36,14 @@
#include <link.h>
-#undef PAGE_MASK
-#undef PAGE_SIZE
-#define PAGE_SIZE 4096
-#define PAGE_MASK (PAGE_SIZE-1)
+// Returns the address of the page containing address 'x'.
+#define PAGE_START(x) ((x) & PAGE_MASK)
-/* Convenience macros to make page address/offset computations more explicit */
+// Returns the offset of address 'x' in its page.
+#define PAGE_OFFSET(x) ((x) & ~PAGE_MASK)
-/* Returns the address of the page starting at address 'x' */
-#define PAGE_START(x) ((x) & ~PAGE_MASK)
-
-/* Returns the offset of address 'x' in its memory page, i.e. this is the
- * same than 'x' - PAGE_START(x) */
-#define PAGE_OFFSET(x) ((x) & PAGE_MASK)
-
-/* Returns the address of the next page after address 'x', unless 'x' is
- * itself at the start of a page. Equivalent to:
- *
- * (x == PAGE_START(x)) ? x : PAGE_START(x)+PAGE_SIZE
- */
+// Returns the address of the next page after address 'x', unless 'x' is
+// itself at the start of a page.
#define PAGE_END(x) PAGE_START((x) + (PAGE_SIZE-1))
void debugger_init();
@@ -167,9 +156,6 @@
extern soinfo libdl_info;
-
-#include <asm/elf.h>
-
#if defined(ANDROID_ARM_LINKER)
// These aren't defined in <arch-arm/asm/elf.h>.