--- gcc/config/svr3.h 2018/04/24 17:59:54 1.1.1.3 +++ gcc/config/svr3.h 2018/04/24 18:27:32 1.1.1.6 @@ -2,7 +2,7 @@ targeting GCC for some generic System V Release 3 system. Copyright (C) 1991 Free Software Foundation, Inc. - Written by Ron Guilmette (rfg@ncd.com). + Written by Ron Guilmette (rfg@netcom.com). This file is part of GNU CC. @@ -18,7 +18,8 @@ GNU General Public License for more deta 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, 675 Mass Ave, Cambridge, MA 02139, USA. +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. To use this file, make up a file with a name like: @@ -39,6 +40,9 @@ the Free Software Foundation, 675 Mass A appropriate define for the type of hardware that you are targeting. */ +/* Define a symbol indicating that we are using svr3.h. */ +#define USING_SVR3_H + /* Define a symbol so that libgcc* can know what sort of operating environment and assembler syntax we are targeting for. */ #define SVR3_target @@ -147,7 +151,7 @@ the Free Software Foundation, 675 Mass A #define WCHAR_TYPE_SIZE BITS_PER_WORD /* Assembler pseudos to introduce constants of various size. These - definitions hsould work for most svr3 systems. */ + definitions should work for most svr3 systems. */ #undef ASM_BYTE_OP #define ASM_BYTE_OP "\t.byte" @@ -218,7 +222,7 @@ the Free Software Foundation, 675 Mass A /* CTOR_LIST_BEGIN and CTOR_LIST_END are machine-dependent because they push on the stack. */ -#ifdef STACK_GROWS_DOWNWARD +#ifndef STACK_GROWS_DOWNWARD /* Constructor list on stack is in reverse order. Go to the end of the list and go backwards to call constructors in the right order. */ @@ -255,9 +259,20 @@ do { \ INIT_SECTION_FUNCTION \ FINI_SECTION_FUNCTION +#define BSS_SECTION_FUNCTION \ +void \ +bss_section () \ +{ \ + if (in_section != in_bss) \ + { \ + fprintf (asm_out_file, "\t%s\n", BSS_SECTION_ASM_OP); \ + in_section = in_bss; \ + } \ +} + #define INIT_SECTION_FUNCTION \ void \ -init_section () \ +init_section () \ { \ if (in_section != in_init) \ { \ @@ -293,7 +308,9 @@ const_section () \ } \ } -#if 0 +/* The ctors and dtors sections are not normally put into use + by EXTRA_SECTIONS and EXTRA_SECTION_FUNCTIONS as defined in svr3.h, + but it can't hurt to define these macros for whatever systems use them. */ #define CTORS_SECTION_FUNCTION \ void \ ctors_section () \ @@ -315,7 +332,6 @@ dtors_section () \ in_section = in_dtors; \ } \ } -#endif /* This is machine-dependent because it needs to push something on the stack. */ @@ -348,7 +364,10 @@ dtors_section () \ else if (TREE_CODE (DECL) == VAR_DECL) \ { \ if ((0 && RELOC) /* should be (flag_pic && RELOC) */ \ - || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL)) \ + || !TREE_READONLY (DECL) || TREE_SIDE_EFFECTS (DECL) \ + || !DECL_INITIAL (DECL) \ + || (DECL_INITIAL (DECL) != error_mark_node \ + && !TREE_CONSTANT (DECL_INITIAL (DECL)))) \ data_section (); \ else \ const_section (); \