Alex Ferguson wrote:
> [...]
> I'm using OSF 3.2, however, so your kilometerage may vary considerably...
> [...]
> ghc-0.29 -o hsc [ridiculously long argument list removed]
> /bin/ld:
> Warning: Linking some objects which contain exception information sections
>         and some which do not. This may cause fatal runtime exception handling
>         problems (last obj encountered without exceptions was main/LoopHack.o).

I don't speak DECish too fluently, but here's my humble guess:
Under arcane circumstances, linking gcc-compiled code on DEC-Unix 3.2
produces the above warning. It's annoying, but it doesn't hurt (at least
apart from aesthetics :-) .  Anyway, I digged up an old gcc patch from
long forgotten sources and appended it to this mail.

BTW, stripping executables with the GNU-strip makes some trouble
on our DECs. Wise comments from a DEC-grandmaster would be greatly
appreciated...

Much fun recompiling gcc!  :-]


(My first mailing attempt failed because vanuata.dcs.gla.ac.uk and my
 Netscape apparently didn't like each other, having a dispute about
 their MIME-dialects. So here's good ol' ASCII... :-(

-- SNIP -- SNIP -- gcc-2.7.2/config/alpha/osf32.h -- SNIP -- SNIP
/* Definitions of target machine for GNU compiler, for DEC Alpha.
   Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
   Contributed by Richard Kenner ([EMAIL PROTECTED])

This file is part of GNU CC.

GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

GNU CC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GNU CC; see the file COPYING.  If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.  */


#include "alpha/osf2.h"

/* In OSF 3.2, the loader issues warnings about possible exception handling
   problems in object files which do not define a .text section and
   which define the symbols `gcc2_compiled.' and `__gnu_compiled_c'
   without any section specification. The following is a work around
   and I do not know if it really works right! But at least it
   suppresses the nasty loader warnings. */

#if defined (EXTRA_SECTIONS)
#undef  EXTRA_SECTIONS
#endif
#define EXTRA_SECTIONS  readonly_data, local_readonly_const_data

#if defined (EXTRA_SECTION_FUNCTIONS)
#undef EXTRA_SECTION_FUNCTIONS
#endif
#define EXTRA_SECTION_FUNCTIONS                                 \
void                                                            \
literal_section ()                                              \
{                                                               \
  if (in_section != readonly_data)                              \
    {                                                           \
      static int firsttime = 1;                                 \
                                                                \
      fprintf (asm_out_file, "%s\n", READONLY_DATA_SECTION_ASM_OP); \
      if (firsttime)                                            \
        {                                                       \
          firsttime = 0;                                        \
          ASM_OUTPUT_DOUBLE_INT (asm_out_file, const0_rtx);     \
        }                                                       \
                                                                \
      in_section = readonly_data;                               \
    }                                                           \
}                                                               \
void                                                            \
rconst_section ()                                               \
{                                                               \
  if (in_section != local_readonly_const_data)                  \
    {                                                           \
      fprintf (asm_out_file, ".rconst\n");                      \
      in_section = local_readonly_const_data;                   \
    }                                                           \
}                                                               \

#if defined (ASM_IDENTIFY_GCC)
#undef  ASM_IDENTIFY_GCC
#endif
#define ASM_IDENTIFY_GCC(FILE)                          \
   do { rconst_section ();                              \
        fprintf(FILE, "gcc2_compiled.:\n");} while(0)

#if defined (ASM_IDENTIFY_GCC)
#undef  ASM_IDENTIFY_LANGUAGE
#endif
#define ASM_IDENTIFY_LANGUAGE(FILE)                     \
   do { rconst_section ();                              \
        fprintf (FILE, "__gnu_compiled_%s:\n", lang_identify ());} while(0)


-- SNIP -- SNIP -- gcc-2.7.2-decAlpha3.2d.patch -- SNIP -- SNIP
*** gcc-2.7.2/ChangeLog Sun Nov 26 20:51:28 1995
--- Standard Input      Thu Feb 29 11:26:53 1996
***************
*** 1,3 ****
--- 1,14 ----
+ Wed Feb 21 14:42:05 1996  Norbert Berzen  <[EMAIL PROTECTED]>
+ 
+       * New file: config/alpha/osf32.h used when compiling gcc
+       for DEC-Unix 3.2: EXTRA_SECTIONS extended; ASM_IDENTIFY_GCC
+       and ASM_IDENTIFY_LANGUAGE re-defined in order to define the
+       symbols `gcc2_compiled.' and `__gnu_compiled_c' as `.rconst'
+       instead of unspec'ed section. This prevents the loader ld from
+       complaining about exception handling problems.
+ 
+       * configure (alpha-dec-osf3.2): New config entry added
+ 
  Sun Nov 26 14:47:42 1995  Richard Kenner  <[EMAIL PROTECTED]>
  
        * Version 2.7.2 released.
*** gcc-2.7.2/configure Sun Nov 26 20:39:15 1995
--- Standard Input      Wed Feb 21 14:36:58 1996
***************
*** 547,552 ****
--- 547,565 ----
        a29k-*-*)                       # Default a29k environment.
                use_collect2=yes
                ;;
+       alpha-dec-osf3.2)
+               tm_file=alpha/osf32.h
+               if [ x$stabs = xyes ]
+               then
+                       tm_file=alpha/gdb-osf2.h
+               fi
+               if [ x$gas != xyes ]
+               then
+                       extra_passes="mips-tfile mips-tdump"
+               fi
+               broken_install=yes
+               use_collect2=yes
+               ;;
        alpha-dec-osf[23456789]*)
                tm_file=alpha/osf2.h
                if [ x$stabs = xyes ]


-- 
Sven Panne                                        Tel.: +49/89/2178-2235
LMU, Institut fuer Informatik                     FAX : +49/89/2178-2211
LFE Programmier- und Modellierungssprachen              Oettingenstr. 67
mailto:[EMAIL PROTECTED]            D-80538 Muenchen
http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne

Reply via email to