Added variables to the glue code that identify the Haiku version and ABI.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30728 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2009-05-12 21:01:26 +00:00
parent a4e151e06d
commit 51c706f70c
2 changed files with 27 additions and 1 deletions

View File

@ -0,0 +1,18 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _SYSTEM_IMAGE_DEFS_H
#define _SYSTEM_IMAGE_DEFS_H
#include <SupportDefs.h>
#define B_SHARED_OBJECT_HAIKU_VERSION_VARIABLE _gSharedObjectHaikuVersion
#define B_SHARED_OBJECT_HAIKU_VERSION_VARIABLE_NAME "_gSharedObjectHaikuVersion"
#define B_SHARED_OBJECT_HAIKU_ABI_VARIABLE _gSharedObjectHaikuABI
#define B_SHARED_OBJECT_HAIKU_ABI_VARIABLE_NAME "_gSharedObjectHaikuABI"
#endif /* _SYSTEM_IMAGE_DEFS_H */

View File

@ -3,13 +3,21 @@
* Distributed under the terms of the MIT License.
*/
#include <user_runtime.h>
#include <image.h>
#include <image_defs.h>
#include "init_term_dyn.h"
// Haiku API and ABI versions -- we compile those into shared objects so that
// the runtime loader can discriminate the versions and enable compatibility
// work-arounds, if necessary.
uint32 B_SHARED_OBJECT_HAIKU_VERSION_VARIABLE = B_HAIKU_VERSION;
uint32 B_SHARED_OBJECT_HAIKU_ABI_VARIABLE = B_HAIKU_ABI;
/** These functions are called from _init()/_fini() (in crti.S, crtn.S)
* _init/_term_before() is called before crtbegin/end code is executed,
* _init/_term_after() after this.