From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,395a28f70ff70a4a X-Google-Attributes: gidfee84,public From: Craig Neth Subject: Re: Mixing 64 bit and 32 bit applications Date: 1996/06/24 Message-ID: <31CEB0FB.59E2@zk3.dec.com>#1/1 X-Deja-AN: 161857005 references: <31C87D22.41C6@medusa.cs.mci.com> content-type: text/plain; charset=us-ascii organization: CTG mime-version: 1.0 newsgroups: comp.unix.osf.osf1 x-mailer: Mozilla 2.01Ib7 (X11; I; OSF1 V4.0 alpha) Bill Kemp wrote: > We are attempting to build an application that uses: [... stuff deleted ...] > The C++ Library is a 64 bit application. > The ORB is a 64 bit application. > The OODB is a 32 bit application. > > Compiling and linking with the OODB .so requires the -xtaso_short > compiler flag and the -taso ld flag. The application will compile and > link successfully, however, it seems that using these flags when linking > against the 64 bit .so files for the C++ Library and ORB library is the > reason we are experiencing runtime SEGV's. > > Is this the square peg/round hole problem? Can we not compile > -xtaso_short and link -taso and expect to be able to run when linked > against a 64 bit .so? Is this a situation where all of the 32 bit code > must be in the address space of one process and the 64 bit code must be > in the address space of another process? I know it probably is, but has > anybody worked around this successfully? When you say 'application', I assume you actually mean .so, right? This can be made to work. Indeed, any -xtaso (or -xtaso_short) application that links against libc is using a 64 bit library - there is no 32 bit libc. What's more likely to be happening is that you are passing 32 bit pointers to api's (in libc, or in the ORB, or ???) that expect 64 bit pointers. How are you 'protecting' the header files of the 64 bit api's? The system header files describe the system interfaces, but those interfaces are all 64 bits. When you use -xtaso_short to compile your application you change the size of a pointer but the library doesn't change what it expects. What needs to be done is to 'protect' the system interfaces from this change in pointer size by use of some pragmas. The Digital C++ kit documents in the release notes one procedure that can be used to provide long pointer 'protection' to the header files. The Digital UNIX programmers guide documents another. If you haven't done one of these (or inserted the pragmas yourself) that this is almost certainly the problem. Craig Digital UNIX Development Environment group -------------------------------------------------------------------------------- Craig Neth ! neth@zk3.dec.com Digital Equipment Corporation ! 110 Spit Brook Road ZKO3-3/Y25 ! Nashua, NH 03062 ! Opinions expressed herein are my own.