-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelfload.h
30 lines (24 loc) · 851 Bytes
/
elfload.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include <stddef.h>
#include <unistd.h>
#ifdef __cplusplus
#define BEGIN_DECLS extern "C" {
#define END_DECLS }
#else
#define BEGIN_DECLS
#define END_DECLS
#endif
/* Flags for el_execveat. May be redundant or defined by glibc later. */
/* Also provided by linux/fcntl.h, but that conflicts with glibc fcntl.h. */
#ifndef AT_EMPTY_PATH
#define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
#define AT_EMPTY_PATH 0x1000 /* Allow empty relative pathname */
#endif
BEGIN_DECLS
/**
* Like with fexecve, the FD_CLOEXEC flag should usually be set on the executable.
*/
int el_fexecve(int fd, char *const argv[], char *const envp[]);
int el_execveat(int dirfd, const char *pathname, char *const argv[], char *const envp[], int flags);
int el_execve(const char *path, char *const argv[], char *const envp[]);
END_DECLS