This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: versioning of _Unwind_*() symbols


Daniel Jacobowitz wrote:

On Wed, Apr 21, 2004 at 12:15:16PM -0700, Mark Mitchell wrote:


While we are on it, binaries compiled by gcc may reference gcc
personality functions, which only come with gcc. That means when you
mix them with other compilers, you have to do something like

# icc .... find the right gcc personality functions

How can we address this?




The presonality routines should be either (a) included in the shared object or executable, or (b) the shared object or executable should have a dependency on a shared object providing that personality routine.



It seems to me that we need to sit down and think about what kinds of "compatibility" are really guaranteed by the ABI before we make any changes in this area. For instance, we currently satisfy references to the unwind symbols (on ELF platforms, this is) by adding a DT_NEEDED referring to "libgcc_s.so.1". Does that violate the ABI? If not, perhaps versioning the symbols doesn't either.

No, that doesn't violate the ABI. The is built atop whatever other ABIs are on the platform. On IA32 GNU/Linux (say), ELF with DT_NEEDED is part of the system ABI, so using it is just fine. Your program can depend on whatever shared objects it wants to, including libgcc.

The C++ runtime support library (containing __cxa_* and _Unwind_*) is special; the ABI specifically is designed to allow any compiler to generate code that will work with any support library. I don't think the use of versioned symbols allows that; it means, concretely, that Intel would have to emit references to versioned symbols in the code that icc generates. That didn't use to be the case, and it shouldn't be the case now.

--
Mark Mitchell
CodeSourcery, LLC
(916) 791-8304
mark@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]