diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/elf.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/elf.h b/include/elf.h index f06a33f..ab76aaf 100644 --- a/include/elf.h +++ b/include/elf.h @@ -1,7 +1,19 @@ #ifndef _ELF_H #include <elf/elf.h> -# ifndef _ISOMAC +#ifndef _ISOMAC + +# include <libc-pointer-arith.h> + +/* Compute the offset of the note descriptor from size of note entry's + owner string and note alignment. */ +# define ELF_NOTE_DESC_OFFSET(namesz, align) \ + ALIGN_UP (sizeof (ElfW(Nhdr)) + (namesz), (align)) + +/* Compute the offset of the next note entry from size of note entry's + owner string, size of the note descriptor and note alignment. */ +# define ELF_NOTE_NEXT_OFFSET(namesz, descsz, align) \ + ALIGN_UP (ELF_NOTE_DESC_OFFSET ((namesz), (align)) + (descsz), (align)) /* Some information which is not meant for the public and therefore not in <elf.h>. */ @@ -13,5 +25,5 @@ (DF_1_NOW | DF_1_NODELETE | DF_1_INITFIRST | DF_1_NOOPEN \ | DF_1_ORIGIN | DF_1_NODEFLIB) -# endif /* !_ISOMAC */ +#endif /* !_ISOMAC */ #endif /* elf.h */ |