Clean up the argc/argv/envp/auxv handling.
There's now only one place where we deal with this stuff, it only needs to be parsed once by the dynamic linker (rather than by each recipient), and it's now easier for us to get hold of auxv data early on. Change-Id: I6314224257c736547aac2e2a650e66f2ea53bef5
This commit is contained in:
@@ -28,16 +28,29 @@
|
||||
#ifndef LIBC_INIT_COMMON_H
|
||||
#define LIBC_INIT_COMMON_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
void (**preinit_array)(void);
|
||||
void (**init_array)(void);
|
||||
void (**fini_array)(void);
|
||||
typedef struct {
|
||||
void (**preinit_array)(void);
|
||||
void (**init_array)(void);
|
||||
void (**fini_array)(void);
|
||||
} structors_array_t;
|
||||
|
||||
extern void __libc_init_common(uintptr_t *elfdata);
|
||||
extern void __libc_fini(void* finit_array);
|
||||
__BEGIN_DECLS
|
||||
|
||||
extern int main(int argc, char** argv, char** env);
|
||||
|
||||
__noreturn void __libc_init(void* raw_args,
|
||||
void (*onexit)(void),
|
||||
int (*slingshot)(int, char**, char**),
|
||||
structors_array_t const * const structors);
|
||||
void __libc_fini(void* finit_array);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#if defined(__cplusplus)
|
||||
struct KernelArgumentBlock;
|
||||
void __libc_init_common(KernelArgumentBlock& args);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user