Required for the build under Linux. Defines dl_iterate_phdr() which is a Linux specific glibc dependency.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11604 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2005-03-06 16:49:13 +00:00
parent 078898ebf8
commit a8bd76eb3f

51
src/build/cpp_support.cpp Normal file
View File

@ -0,0 +1,51 @@
/*
* Copyright 2005, Ingo Weinhold, bonefish@users.sf.net.
* Distributed under the terms of the MIT License.
*/
#include <sys/types.h>
struct dl_phdr_info;
extern "C" int dl_iterate_phdr(int (*callback)(struct dl_phdr_info *info, size_t size,
void *data), void *data);
#if defined(_BOOT_MODE) || defined(_KERNEL_MODE)
// compiled into the kernel/boot loader
#include "KernelExport.h"
int
dl_iterate_phdr(int (*callback)(struct dl_phdr_info *info, size_t size,
void *data), void *data)
{
// This function should never be called, since it is only needed when
// exception are used, and we don't do that in the kernel. Hence we
// don't need to implement it.
panic("dl_iterate_phdr() called\n");
return 0;
}
#else // !( defined(_BOOT_MODE) || defined(_KERNEL_MODE) )
// compiled into libroot.so (well, not yet)
//#include <link.h>
int
dl_iterate_phdr(int (*callback)(struct dl_phdr_info *info, size_t size,
void *data), void *data)
{
// TODO: Here we need to implement the function, since we want exceptions
// in userland.
return 0;
}
#endif