Posts Tagged ‘Macro’

#define ELF_PAGESTART(_v) ((_v) & ~(unsigned long)(ELF_MIN_ALIGN-1))
目的:将地址按页大小向前对齐
举例:0x1234 -> 0x1000

#define ELF_PAGEOFFSET(_v) ((_v) & (ELF_MIN_ALIGN-1))
目的:计算地址相对页大小的差值
举例:0x1234 -> 0x234

#define ELF_PAGEALIGN(_v) (((_v) + ELF_MIN_ALIGN - 1) & ~(ELF_MIN_ALIGN - 1))
目的:将地址按页大小向后对齐
举例:0x1234 -> 0x2000

World Line
Time Machine
Friendly Links
Online Tools