apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@xbc.nu>
Subject Re: svn commit: r434327 - in /apr/apr/trunk: CHANGES include/arch/win32/apr_arch_threadproc.h misc/win32/start.c threadproc/win32/threadpriv.c
Date Tue, 29 Aug 2006 18:30:58 GMT
Mladen Turk wrote:
> Branko ─îibej wrote:
>>
>> I know that boost_thread uses this method, and I've verified that it
>> works on AMD64 and IA64; the tric is, I believe, that Boost inserts a
>> single static handler into the static constructor and destructor
>> segments, and lets that handler maintain its own list of hooks.
>>
>
> Well I was copied the needed things from boost.
> When building .dll with VS2005 on AMD64 I get
>
> Linking...
> MSVCRT.lib(tlssup.obj) : warning LNK4078: multiple '.CRT' sections
> found with different attributes (40400040)
>    Creating library .\Release/libapr-1.lib and object
> .\Release/libapr-1.exp
> MSVCRT.lib(cinitexe.obj) : warning LNK4254: section '.CRT' (C0000040)
> merged into '.rdata' (40000040) with different attributes
>
> The LNK4078 according to the MSDN says:
>
> LINK found two or more sections that have the same name but different
> attributes.
>
>
> Here i the code I used.
> As you can see its (at least segment declaration) is
> identical to boost. Didn't try to build the AMD64 version
> of boost library by myself, but has found lots of similar
> problems googling.
>
>
> #if (_MSC_VER < 1310)
> typedef void (__cdecl *_PVFV)(void);
> #define INIRETSUCCESS
> #define PVAPI void
> #else
> typedef int (__cdecl *_PVFV)(void);
> #define INIRETSUCCESS 0
> #define PVAPI int
> #endif
>
> typedef void (NTAPI* _TLSCB)(HINSTANCE, DWORD, PVOID);
> /* Symbols for connection to the runtime environment */
> extern DWORD _tls_used;
You have to declare _tls_used in the ".rodata" section, which you can
declare yourself, with read-only attributes.

-- Brane


Mime
View raw message