haiku/src/system/runtime_loader/add_ons.h
Ingo Weinhold 94830eb226 * Moved most code of the heavy elf.cpp into several smaller source files.
* Some style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30808 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-05-21 00:57:46 +00:00

60 lines
1.0 KiB
C

/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef ADD_ONS_H
#define ADD_ONS_H
#include <OS.h>
#include <util/DoublyLinkedList.h>
#include <runtime_loader.h>
// image events
enum {
IMAGE_EVENT_LOADED,
IMAGE_EVENT_RELOCATED,
IMAGE_EVENT_INITIALIZED,
IMAGE_EVENT_UNINITIALIZING,
IMAGE_EVENT_UNLOADING
};
struct RuntimeLoaderAddOn
: public DoublyLinkedListLinkImpl<RuntimeLoaderAddOn> {
image_t* image;
runtime_loader_add_on* addOn;
RuntimeLoaderAddOn(image_t* image, runtime_loader_add_on* addOn)
:
image(image),
addOn(addOn)
{
}
};
struct RuntimeLoaderSymbolPatcher {
RuntimeLoaderSymbolPatcher* next;
runtime_loader_symbol_patcher* patcher;
void* cookie;
RuntimeLoaderSymbolPatcher(runtime_loader_symbol_patcher* patcher,
void* cookie)
:
patcher(patcher),
cookie(cookie)
{
}
};
void init_add_ons();
status_t add_add_on(image_t* image, runtime_loader_add_on* addOnStruct);
void image_event(image_t* image, uint32 event);
#endif // ADD_ONS_H