HP-UX 11.x patch to call C++ static constructors at dlopen()
Harri Pasanen
harri.pasanen@trema.com
Wed Dec 18 09:01:00 GMT 2002
This patch fixes PR 8360
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8360
Patch is against gcc 3.2, should apply directly to gcc-3_2-branch.
This works for me on HP-UX 11.00, 64 bit kernel, 32 bit gcc, gcc -v says:
Configured with: ../gcc-3.2/configure --prefix=/opt/gcc32 --with-gnu-as
--with-as=/usr/gnu/bin/as --enable-threads=posix --enable-languages=c,c++
Thread model: posix
gcc version 3.2
Thanks to David Edelsohn and John David Anglin for pointers.
Harri
==========================================================
bash-2.05a$ diff -c gcc/config/pa/pa-hpux11.h.~1~ gcc/config/pa/pa-hpux11.h
*** gcc/config/pa/pa-hpux11.h.~1~ Fri Apr 13 07:34:06 2001
--- gcc/config/pa/pa-hpux11.h Wed Dec 18 10:18:10 2002
***************
*** 68,70 ****
--- 68,81 ----
#define SIZE_TYPE "long unsigned int"
#define PTRDIFF_TYPE "long int"
+
+ /* HP-UX 11.0 and above provides initialization and finalization function
+ support from linker command line. */
+ #undef HAS_INIT_SECTION
+ #define HAS_INIT_SECTION
+
+ #undef LD_INIT_SWITCH
+ #define LD_INIT_SWITCH "+init"
+ #undef LD_FINI_SWITCH
+ #define LD_FINI_SWITCH "+fini"
+
More information about the Gcc-patches
mailing list