master
1#ifndef _ELF_H
2#include <elf/elf.h>
3
4#ifndef _ISOMAC
5
6# include <libc-pointer-arith.h>
7
8/* Compute the offset of the note descriptor from size of note entry's
9 owner string and note alignment. */
10# define ELF_NOTE_DESC_OFFSET(namesz, align) \
11 ALIGN_UP (sizeof (ElfW(Nhdr)) + (namesz), (align))
12
13/* Compute the offset of the next note entry from size of note entry's
14 owner string, size of the note descriptor and note alignment. */
15# define ELF_NOTE_NEXT_OFFSET(namesz, descsz, align) \
16 ALIGN_UP (ELF_NOTE_DESC_OFFSET ((namesz), (align)) + (descsz), (align))
17
18# ifdef HIDDEN_VAR_NEEDS_DYNAMIC_RELOC
19# define DL_ADDRESS_WITHOUT_RELOC(expr) (expr)
20# else
21/* Evaluate EXPR without run-time relocation for it. EXPR should be an
22 array, an address of an object, or a string literal. */
23# define DL_ADDRESS_WITHOUT_RELOC(expr) \
24 ({ \
25 __auto_type _result = (expr); \
26 asm ("" : "+r" (_result)); \
27 _result; \
28 })
29# endif
30
31/* Some information which is not meant for the public and therefore not
32 in <elf.h>. */
33# include <dl-dtprocnum.h>
34# ifdef DT_1_SUPPORTED_MASK
35# error DT_1_SUPPORTED_MASK is defined!
36# endif
37# define DT_1_SUPPORTED_MASK \
38 (DF_1_NOW | DF_1_NODELETE | DF_1_INITFIRST | DF_1_NOOPEN \
39 | DF_1_ORIGIN | DF_1_NODEFLIB | DF_1_PIE)
40
41#endif /* !_ISOMAC */
42#endif /* elf.h */