* Also define the build system variables TARGET_STATIC_{LIBSTDC++,LIBSUPC++}.

* runtime loader:
  - Fixed gcc 4 warnings.
  - Enabled -Werror.
  - Renamed all remaining *.c source files to *.cpp.
  - Implemented GNU style ELF symbol versioning support.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30806 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-05-20 02:22:36 +00:00
parent 01b9223aa5
commit 003ebb0e83
14 changed files with 568 additions and 70 deletions
@@ -1,4 +1,5 @@
/*
* Copyright 2008-2009, Ingo Weinhold, [email protected].
* Copyright 2003-2006, Axel Dörfler, [email protected].
* Distributed under the terms of the MIT License.
*
@@ -20,6 +21,7 @@
struct user_space_program_args;
struct SymbolLookupInfo;
struct rld_export {
// runtime loader API export
@@ -66,6 +68,13 @@ typedef struct elf_region_t {
uint32 flags;
} elf_region_t;
typedef struct elf_version_info {
uint32 hash; // version name hash
const char *name; // version name
const char *file_name; // dependency file name (needed versions only)
bool hidden; // version hidden (needed versions only)
} elf_version_info;
typedef struct image_t {
// image identification
char path[B_PATH_NAME_LENGTH];
@@ -100,9 +109,26 @@ typedef struct image_t {
uint32 num_needed;
struct image_t **needed;
// versioning related structures
uint32 num_version_definitions;
struct Elf32_Verdef *version_definitions;
uint32 num_needed_versions;
struct Elf32_Verneed *needed_versions;
Elf32_Versym *symbol_versions;
elf_version_info *versions;
uint32 num_versions;
#ifdef __cplusplus
struct Elf32_Sym* (*find_undefined_symbol)(struct image_t* rootImage,
struct image_t* image, const char* name,
struct image_t* image,
const SymbolLookupInfo& lookupInfo,
struct image_t** foundInImage);
#else
struct Elf32_Sym* (*find_undefined_symbol)(struct image_t* rootImage,
struct image_t* image,
const struct SymbolLookupInfo* lookupInfo,
struct image_t** foundInImage);
#endif
// Singly-linked list of symbol patchers for symbols defined respectively
// referenced by this image.