2683488378
Funded by: OpenOffice.org community.
112 lines
4.4 KiB
Text
112 lines
4.4 KiB
Text
catch up to recent bridge also fixes following issues
|
|
for i386
|
|
http://www.openoffice.org/issues/show_bug.cgi?id=98781
|
|
http://www.openoffice.org/issues/show_bug.cgi?id=82690
|
|
http://www.freebsd.org/cgi/query-pr.cgi?pr=127946
|
|
|
|
We also need
|
|
#define USE_DOUBLE_MMAP for FreeBSD as well. The patch was included
|
|
in files/patches-i85126
|
|
|
|
--- bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx 2009-12-12 18:15:33.000000000 +0900
|
|
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/cpp2uno.cxx 2009-12-06 13:19:58.000000000 +0900
|
|
@@ -362,7 +362,7 @@
|
|
int const codeSnippetSize = 16;
|
|
|
|
unsigned char * codeSnippet(
|
|
- unsigned char * code, sal_Int32 functionIndex, sal_Int32 vtableOffset,
|
|
+ unsigned char * code, sal_PtrDiff writetoexecdiff, sal_Int32 functionIndex, sal_Int32 vtableOffset,
|
|
typelib_TypeClass returnTypeClass)
|
|
{
|
|
if (!bridges::cpp_uno::shared::isSimpleType(returnTypeClass)) {
|
|
@@ -408,7 +408,7 @@
|
|
// jmp privateSnippetExecutor:
|
|
*p++ = 0xE9;
|
|
*reinterpret_cast< sal_Int32 * >(p)
|
|
- = ((unsigned char *) exec) - p - sizeof (sal_Int32);
|
|
+ = ((unsigned char *) exec) - p - sizeof (sal_Int32) - writetoexecdiff;
|
|
p += sizeof (sal_Int32);
|
|
OSL_ASSERT(p - code <= codeSnippetSize);
|
|
return code + codeSnippetSize;
|
|
@@ -419,8 +419,7 @@
|
|
struct bridges::cpp_uno::shared::VtableFactory::Slot { void * fn; };
|
|
|
|
bridges::cpp_uno::shared::VtableFactory::Slot *
|
|
-bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block)
|
|
-{
|
|
+bridges::cpp_uno::shared::VtableFactory::mapBlockToVtable(void * block) {
|
|
return static_cast< Slot * >(block) + 2;
|
|
}
|
|
|
|
@@ -441,7 +440,7 @@
|
|
}
|
|
|
|
unsigned char * bridges::cpp_uno::shared::VtableFactory::addLocalFunctions(
|
|
- Slot ** slots, unsigned char * code,
|
|
+ Slot ** slots, unsigned char * code, sal_PtrDiff writetoexecdiff,
|
|
typelib_InterfaceTypeDescription const * type, sal_Int32 functionOffset,
|
|
sal_Int32 functionCount, sal_Int32 vtableOffset)
|
|
{
|
|
@@ -454,9 +453,9 @@
|
|
switch (member->eTypeClass) {
|
|
case typelib_TypeClass_INTERFACE_ATTRIBUTE:
|
|
// Getter:
|
|
- (s++)->fn = code;
|
|
+ (s++)->fn = code + writetoexecdiff;
|
|
code = codeSnippet(
|
|
- code, functionOffset++, vtableOffset,
|
|
+ code, writetoexecdiff, functionOffset++, vtableOffset,
|
|
reinterpret_cast< typelib_InterfaceAttributeTypeDescription * >(
|
|
member)->pAttributeTypeRef->eTypeClass);
|
|
// Setter:
|
|
@@ -464,17 +463,17 @@
|
|
typelib_InterfaceAttributeTypeDescription * >(
|
|
member)->bReadOnly)
|
|
{
|
|
- (s++)->fn = code;
|
|
+ (s++)->fn = code + writetoexecdiff;
|
|
code = codeSnippet(
|
|
- code, functionOffset++, vtableOffset,
|
|
+ code, writetoexecdiff, functionOffset++, vtableOffset,
|
|
typelib_TypeClass_VOID);
|
|
}
|
|
break;
|
|
|
|
case typelib_TypeClass_INTERFACE_METHOD:
|
|
- (s++)->fn = code;
|
|
+ (s++)->fn = code + writetoexecdiff;
|
|
code = codeSnippet(
|
|
- code, functionOffset++, vtableOffset,
|
|
+ code, writetoexecdiff, functionOffset++, vtableOffset,
|
|
reinterpret_cast< typelib_InterfaceMethodTypeDescription * >(
|
|
member)->pReturnTypeRef->eTypeClass);
|
|
break;
|
|
|
|
--- bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx 2009-12-12 18:15:33.000000000 +0900
|
|
+++ bridges/source/cpp_uno/gcc3_freebsd_intel/except.cxx 2009-12-06 13:19:58.000000000 +0900
|
|
@@ -32,6 +32,7 @@
|
|
#include "precompiled_bridges.hxx"
|
|
|
|
#include <stdio.h>
|
|
+#include <string.h>
|
|
#include <dlfcn.h>
|
|
#include <cxxabi.h>
|
|
#include <hash_map>
|
|
@@ -121,7 +122,7 @@
|
|
};
|
|
//__________________________________________________________________________________________________
|
|
RTTI::RTTI() SAL_THROW( () )
|
|
-#if __FreeBSD_version < 602103
|
|
+#if __FreeBSD_version < 702104 /* #i22253# */
|
|
: m_hApp( dlopen( 0, RTLD_NOW | RTLD_GLOBAL ) )
|
|
#else
|
|
: m_hApp( dlopen( 0, RTLD_LAZY ) )
|
|
@@ -160,7 +161,7 @@
|
|
buf.append( 'E' );
|
|
|
|
OString symName( buf.makeStringAndClear() );
|
|
-#if __FreeBSD_version < 602103 /* #i22253# */
|
|
+#if __FreeBSD_version < 702104 /* #i22253# */
|
|
rtti = (type_info *)dlsym( RTLD_DEFAULT, symName.getStr() );
|
|
#else
|
|
rtti = (type_info *)dlsym( m_hApp, symName.getStr() );
|