Move PAGE_MASK into <sys/user.h>.
I'm removing the TODO on the assumption that being compatible with glibc is more useful than BSD. The new internal "bionic_page.h" header factors out some duplication between libc and the linker. Bug: http://b/22735893 Change-Id: I4aec4dcba5886fb6f6b9290a8f85660643261321
This commit is contained in:
@@ -29,13 +29,14 @@
|
||||
#ifndef _LINKER_H_
|
||||
#define _LINKER_H_
|
||||
|
||||
#include <android/dlext.h>
|
||||
#include <elf.h>
|
||||
#include <inttypes.h>
|
||||
#include <link.h>
|
||||
#include <unistd.h>
|
||||
#include <android/dlext.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "private/bionic_page.h"
|
||||
#include "private/libc_logging.h"
|
||||
#include "linked_list.h"
|
||||
|
||||
@@ -77,16 +78,6 @@
|
||||
#define ELF64_R_TYPE(info) (((info) >> 56) & 0xff)
|
||||
#endif
|
||||
|
||||
// Returns the address of the page containing address 'x'.
|
||||
#define PAGE_START(x) ((x) & PAGE_MASK)
|
||||
|
||||
// Returns the offset of address 'x' in its page.
|
||||
#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.
|
||||
#define PAGE_END(x) PAGE_START((x) + (PAGE_SIZE-1))
|
||||
|
||||
#define FLAG_LINKED 0x00000001
|
||||
#define FLAG_EXE 0x00000004 // The main executable
|
||||
#define FLAG_LINKER 0x00000010 // The linker itself
|
||||
|
||||
Reference in New Issue
Block a user