* pa/t-pa, pa/t-pro, pa/som.h: Revert last patch.
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>
Sat, 16 Feb 2002 22:30:35 +0000 (22:30 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Sat, 16 Feb 2002 22:30:35 +0000 (22:30 +0000)
From-SVN: r49811

gcc/ChangeLog
gcc/config/pa/som.h
gcc/config/pa/t-pa
gcc/config/pa/t-pro

index c1ba0e9c802c1353257d90613d01af9422fca3e5..144e6c9cebe0efd2e474a7f0729d1ffa0559bd9c 100644 (file)
@@ -1,3 +1,7 @@
+2002-02-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
+
+       * pa/t-pa, pa/t-pro, som.h: Revert last patch.
+
 2002-02-16  John David Anglin  <dave@hiauly1.hia.nrc.ca>
 
        * pa/t-pa (LIB2FUNCS_EXTRA): Don't build lib2funcs.asm.
index 5b8b198346f4bfb7e8afa6b7f17eaab1915e7030..5604f54a4354b6fd4a242c954f5e92d23ead1ffc 100644 (file)
@@ -351,6 +351,22 @@ readonly_data ()                                                   \
 
 #define ASM_FILE_END(FILE) output_deferred_plabels (FILE)
 
+/* We want __gcc_plt_call to appear in every program built by
+   gcc, so we make a reference to it out of __main.
+   We use the asm statement to fool the optimizer into not
+   removing the dead (but important) initialization of
+   REFERENCE.  */
+
+#define DO_GLOBAL_DTORS_BODY                   \
+do {                                           \
+  extern void __gcc_plt_call ();               \
+  void (*reference)() = &__gcc_plt_call;       \
+  func_ptr *p;                                 \
+  __asm__ ("" : : "r" (reference));            \
+  for (p = __DTOR_LIST__ + 1; *p; )            \
+    (*p++) ();                                 \
+} while (0)
+
 /* The .align directive in the HP assembler allows up to a 32 alignment.  */
 #define MAX_OFILE_ALIGNMENT 32768
 
index ddb44ab60ed7253f50f2323796c06436b15bae18..863e8432015385ac24bc4cf152dc0a5980fbd363 100644 (file)
@@ -1,5 +1,9 @@
 T_ADAFLAGS=-mdisable-indexing
-LIB2FUNCS_EXTRA=quadlib.c
+LIB2FUNCS_EXTRA=lib2funcs.asm quadlib.c
+
+lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
+       rm -f lib2funcs.asm
+       cp $(srcdir)/config/pa/lib2funcs.asm .
 
 quadlib.c: $(srcdir)/config/pa/quadlib.c
        rm -f quadlib.c
index 0f523134d0637fb01d825c7c7b5c22ee7873c430..a47d72f98c9a5166ed1d07cf6fbc0fbf5e061261 100644 (file)
@@ -1,5 +1,7 @@
 T_ADAFLAGS=-mdisable-indexing
 
+LIB2FUNCS_EXTRA=lib2funcs.asm 
+
 # We want fine grained libraries, so use the new code to build the
 # floating point emulation libraries.
 FPBIT = fp-bit.c
@@ -11,3 +13,7 @@ dp-bit.c: $(srcdir)/config/fp-bit.c
 fp-bit.c: $(srcdir)/config/fp-bit.c
        echo '#define FLOAT' > fp-bit.c
        cat $(srcdir)/config/fp-bit.c >> fp-bit.c
+
+lib2funcs.asm: $(srcdir)/config/pa/lib2funcs.asm
+       rm -f lib2funcs.asm
+       cp $(srcdir)/config/pa/lib2funcs.asm .