2003-06-16 04:41:51 +02:00
|
|
|
/* Target independent definitions for LynxOS using gas and gnu ld.
|
final.c (HAVE_READONLY_DATA_SECTION): New.
* final.c (HAVE_READONLY_DATA_SECTION): New.
(shorten_branches): Use it instead of ifdefs.
* varasm.c (enum in_section): Add in_readonly_data.
(text_section, data_section): Tidy.
(readonly_data_section): Use READONLY_DATA_SECTION_ASM_OP if present.
* config/darwin.h, config/nextstep.h, config/h8300/elf.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h
(READONLY_DATA_SECTION): Don't undef.
* config/alpha/unicosmk.h, config/h8300/elf.h, config/i386/aix386ng.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h,
config/rs6000/lynx.h (READONLY_DATA_SECTION_ASM_OP): Undef.
* config/elfos.h, config/svr3.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/c4x/c4x.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/i860/sysv3.h,
config/m88k/m88k.h, config/pa/pa64-hpux.h (USE_CONST_SECTION): Remove.
* config/elfos.h, config/netware.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/i386/dgux.h, config/i386/i386-interix.h, config/i386/sco5.h,
config/ia64/hpux.h, config/m32r/m32r.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-pe.h, config/mips/iris6.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa64-hpux.h,
config/sparc/sysv4.h (READONLY_DATA_SECTION_ASM_OP): Rename from
CONST_SECTION_ASM_OP/READONLY_SECTION_ASM_OP/RDATA_SECTION_ASM_OP.
* config/elfos.h, config/netware.h, config/1750a/1750a.h,
config/a29k/a29k.h, config/alpha/alpha-interix.h, config/alpha/alpha.h,
config/arm/coff.h, config/h8300/h8300.h, config/i386/aix386ng.h,
config/i386/i386-interix.h, config/i386/osfrose.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h, config/sparc/litecoff.h
(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i386/i386-interix.h,
config/i386/osfrose.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (READONLY_DATA_SECTION): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/c4x/c4x.h, config/i386/aix386ng.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (CONST_SECTION_FUNCTION): Remove.
* config/lynx.h, config/svr3.h, config/alpha/elf.h, config/alpha/vms.h,
config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/sysv3.h, config/i860/sysv4.h,
config/ia64/sysv4.h, config/m32r/m32r.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mips/elf.h,
config/mips/elf64.h, config/mips/iris6.h, config/mips/linux.h,
config/mips/mips.h, config/mips/rtems64.h, config/mips/vxworks.h,
config/rs6000/sysv4.h, config/v850/v850.h
(EXTRA_SECTIONS): Remove in_const/in_rdata.
(EXTRA_SECTION_FUNCTIONS): Remove accompanying function.
* config/svr3.h, config/c4x/c4x.h, config/i386/dgux.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/ia64/aix.h,
config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mmix/mmix.h,
config/sparc/sysv4.h (SELECT_RTX_SECTION): Use readonly_data_section.
* config/alpha/alpha.c (alpha_start_function): Likewise.
(alpha_write_linkage): Likewise.
* config/m32r/m32r.c (m32r_select_section): Likewise.
* config/m88k/m88k.c (m88k_select_section): Likewise.
* config/mips/mips.c (mips_select_rtx_section): Likewise.
* config/rs6000/rs6000.c (rs6000_select_rtx_section): Likewise.
(rs6000_elf_select_section): Likewise.
* config/v850/v850.c (v850_select_section): Likewise.
* config/1750a/1750a.h, config/i860/sysv3.h
(READONLY_DATA_SECTION_ASM_OP): New.
READONLY_DATA_SECTION_ASM_OP.
* config/i386/interix.c, config/i386/winnt.c
(i386_pe_unique_section): Always use .rdata prefix.
* config/pa/som.h (readonly_data): Always switch to read-only section.
(READONLY_DATA_SECTION): Predicate on flag_pic.
* config/we32k/we32k.h (READONLY_DATA_SECTION): Remove parenthesis.
* doc/tm.texi (READONLY_DATA_SECTION_ASM_OP): New.
(READONLY_DATA_SECTION): Update.
From-SVN: r53593
2002-05-18 21:27:52 +02:00
|
|
|
Copyright (C) 1993, 1994, 1995, 1996, 1999, 2000, 2002
|
|
|
|
Free Software Foundation, Inc.
|
1993-07-21 23:22:31 +02:00
|
|
|
|
2003-06-16 04:41:51 +02:00
|
|
|
This file is part of GCC.
|
1994-07-11 23:07:46 +02:00
|
|
|
|
2003-06-16 04:41:51 +02:00
|
|
|
GCC is free software; you can redistribute it and/or modify
|
1994-07-11 23:07:46 +02:00
|
|
|
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.
|
|
|
|
|
2003-06-16 04:41:51 +02:00
|
|
|
GCC is distributed in the hope that it will be useful,
|
1994-07-11 23:07:46 +02:00
|
|
|
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
|
2003-06-16 04:41:51 +02:00
|
|
|
along with GCC; see the file COPYING. If not, write to
|
1995-06-15 14:55:05 +02:00
|
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
1994-07-11 23:07:46 +02:00
|
|
|
|
|
|
|
/* LynxOS is a multi-platform Unix, similar to SVR3, but not identical.
|
2002-09-29 15:16:44 +02:00
|
|
|
We can get quite a bit from generic svr3, but have to do some overrides. */
|
1994-07-11 23:07:46 +02:00
|
|
|
|
|
|
|
#include "svr3.h"
|
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Define various macros, depending on the combination of flags. */
|
1993-07-21 23:22:31 +02:00
|
|
|
|
|
|
|
#undef CPP_SPEC
|
1994-07-11 23:07:46 +02:00
|
|
|
#define CPP_SPEC "%{mthreads:-D_MULTITHREADED} \
|
|
|
|
%{mposix:-D_POSIX_SOURCE} \
|
|
|
|
%{msystem-v:-I/usr/include_v}"
|
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* No asm spec needed, since using GNU assembler always. */
|
1993-07-21 23:22:31 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* No linker spec needed, since using GNU linker always. */
|
1993-07-21 23:22:31 +02:00
|
|
|
|
|
|
|
#undef LIB_SPEC
|
1994-07-11 23:07:46 +02:00
|
|
|
#define LIB_SPEC "%{mthreads:-L/lib/thread/} \
|
|
|
|
%{msystem-v:-lc_v} \
|
1995-02-18 18:19:55 +01:00
|
|
|
%{!msystem-v:%{mposix:-lc_p} -lc -lm}"
|
1994-07-11 23:07:46 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Set the appropriate names for the Lynx startfiles. */
|
1993-07-21 23:22:31 +02:00
|
|
|
|
|
|
|
#undef STARTFILE_SPEC
|
1995-02-18 18:19:55 +01:00
|
|
|
#define STARTFILE_SPEC "%{p:%{mthreads:thread/pinit1.o%s}%{!mthreads:pinit1.o%s}}%{!p:%{msystem-v:vinit1.o%s -e_start}%{!msystem-v:%{mthreads:thread/init1.o%s}%{!mthreads:init1.o%s}}}"
|
1993-07-21 23:22:31 +02:00
|
|
|
|
|
|
|
#undef ENDFILE_SPEC
|
1994-07-11 23:07:46 +02:00
|
|
|
#define ENDFILE_SPEC "%{p:_etext.o%s}%{!p:initn.o%s}"
|
1993-07-21 23:22:31 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Override the svr3 versions. */
|
1993-07-21 23:22:31 +02:00
|
|
|
|
|
|
|
#undef WCHAR_TYPE
|
|
|
|
#define WCHAR_TYPE "int"
|
|
|
|
|
|
|
|
#undef PTRDIFF_TYPE
|
|
|
|
#define PTRDIFF_TYPE "long int"
|
|
|
|
|
1994-07-11 23:07:46 +02:00
|
|
|
/* We want to output DBX (stabs) debugging information normally. */
|
1993-07-21 23:22:31 +02:00
|
|
|
|
2002-08-29 23:40:18 +02:00
|
|
|
#define DBX_DEBUGGING_INFO 1
|
1994-10-04 20:57:51 +01:00
|
|
|
#undef PREFERRED_DEBUGGING_TYPE
|
1993-08-28 21:19:20 +02:00
|
|
|
#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
|
|
|
|
|
1994-07-11 23:07:46 +02:00
|
|
|
/* It is convenient to be able to generate standard coff debugging
|
2002-09-29 15:16:44 +02:00
|
|
|
if requested via -gcoff. */
|
1993-08-28 21:19:20 +02:00
|
|
|
|
2002-08-29 23:40:18 +02:00
|
|
|
#define SDB_DEBUGGING_INFO 1
|
1993-07-21 23:22:31 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Be function-relative for block and source line stab directives. */
|
1994-07-11 23:07:46 +02:00
|
|
|
|
|
|
|
#define DBX_BLOCKS_FUNCTION_RELATIVE 1
|
|
|
|
|
|
|
|
/* but, to make this work, functions must appear prior to line info */
|
1993-07-21 23:22:31 +02:00
|
|
|
|
1994-07-11 23:07:46 +02:00
|
|
|
#define DBX_FUNCTION_FIRST
|
|
|
|
|
|
|
|
/* Generate a blank trailing N_SO to mark the end of the .o file, since
|
|
|
|
we can't depend upon the linker to mark .o file boundaries with
|
|
|
|
embedded stabs. */
|
|
|
|
|
|
|
|
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
|
|
|
|
fprintf (FILE, \
|
|
|
|
"\t.text\n\t.stabs \"\",%d,0,0,Letext\nLetext:\n", N_SO)
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_SOURCE_LINE
|
2003-06-17 10:06:58 +02:00
|
|
|
#define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
|
|
|
|
{ fprintf (file, ".stabn 68,0,%d,.LM%d-", \
|
|
|
|
line, counter); \
|
1994-08-11 19:09:32 +02:00
|
|
|
assemble_name (file, \
|
|
|
|
XSTR (XEXP (DECL_RTL (current_function_decl), 0), 0)); \
|
2003-06-17 10:06:58 +02:00
|
|
|
fprintf (file, "\n.LM%d:\n", counter); }
|
1993-07-21 23:22:31 +02:00
|
|
|
|
|
|
|
/* Handle #pragma pack and sometimes #pragma weak. */
|
|
|
|
|
2002-11-26 05:54:50 +01:00
|
|
|
#define HANDLE_SYSV_PRAGMA 1
|
1993-07-21 23:22:31 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Some additional command-line options. */
|
1994-07-11 23:07:46 +02:00
|
|
|
|
1993-07-21 23:22:31 +02:00
|
|
|
#define TARGET_THREADS (target_flags & MASK_THREADS)
|
|
|
|
#define MASK_THREADS 0x40000000
|
|
|
|
|
|
|
|
#define TARGET_POSIX (target_flags & MASK_POSIX)
|
|
|
|
#define MASK_POSIX 0x20000000
|
|
|
|
|
|
|
|
#define TARGET_SYSTEM_V (target_flags & MASK_SYSTEM_V)
|
|
|
|
#define MASK_SYSTEM_V 0x10000000
|
|
|
|
|
|
|
|
#undef SUBTARGET_SWITCHES
|
|
|
|
#define SUBTARGET_SWITCHES \
|
|
|
|
{"threads", MASK_THREADS}, \
|
|
|
|
{"posix", MASK_POSIX}, \
|
1994-07-11 23:07:46 +02:00
|
|
|
{"system-v", MASK_SYSTEM_V},
|
1993-07-21 23:22:31 +02:00
|
|
|
|
|
|
|
#undef SUBTARGET_OVERRIDE_OPTIONS
|
|
|
|
#define SUBTARGET_OVERRIDE_OPTIONS \
|
1995-02-18 18:19:55 +01:00
|
|
|
do { \
|
|
|
|
if (TARGET_SYSTEM_V && profile_flag) \
|
1993-07-21 23:22:31 +02:00
|
|
|
warning ("-msystem-v and -p are incompatible"); \
|
|
|
|
if (TARGET_SYSTEM_V && TARGET_THREADS) \
|
1995-02-18 18:19:55 +01:00
|
|
|
warning ("-msystem-v and -mthreads are incompatible"); \
|
|
|
|
} while (0)
|
1993-07-21 23:22:31 +02:00
|
|
|
|
1994-07-11 23:07:46 +02:00
|
|
|
/* Since init.o et al put all sorts of stuff into the init section,
|
2002-09-29 15:16:44 +02:00
|
|
|
we can't use the standard init section support in crtbegin.o. */
|
1994-07-11 23:07:46 +02:00
|
|
|
|
|
|
|
#undef INIT_SECTION_ASM_OP
|
|
|
|
|
|
|
|
#undef EXTRA_SECTIONS
|
final.c (HAVE_READONLY_DATA_SECTION): New.
* final.c (HAVE_READONLY_DATA_SECTION): New.
(shorten_branches): Use it instead of ifdefs.
* varasm.c (enum in_section): Add in_readonly_data.
(text_section, data_section): Tidy.
(readonly_data_section): Use READONLY_DATA_SECTION_ASM_OP if present.
* config/darwin.h, config/nextstep.h, config/h8300/elf.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h
(READONLY_DATA_SECTION): Don't undef.
* config/alpha/unicosmk.h, config/h8300/elf.h, config/i386/aix386ng.h,
config/i860/paragon.h, config/m68k/dpx2.h, config/m68k/hp320.h,
config/rs6000/lynx.h (READONLY_DATA_SECTION_ASM_OP): Undef.
* config/elfos.h, config/svr3.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/c4x/c4x.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/i860/sysv3.h,
config/m88k/m88k.h, config/pa/pa64-hpux.h (USE_CONST_SECTION): Remove.
* config/elfos.h, config/netware.h, config/alpha/alpha-interix.h,
config/alpha/elf.h, config/alpha/vms.h, config/arc/arc.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/i386/dgux.h, config/i386/i386-interix.h, config/i386/sco5.h,
config/ia64/hpux.h, config/m32r/m32r.h, config/m68k/tower-as.h,
config/m88k/m88k.h, config/mcore/mcore-pe.h, config/mips/iris6.h,
config/mips/mips.h, config/mmix/mmix.h, config/pa/pa64-hpux.h,
config/sparc/sysv4.h (READONLY_DATA_SECTION_ASM_OP): Rename from
CONST_SECTION_ASM_OP/READONLY_SECTION_ASM_OP/RDATA_SECTION_ASM_OP.
* config/elfos.h, config/netware.h, config/1750a/1750a.h,
config/a29k/a29k.h, config/alpha/alpha-interix.h, config/alpha/alpha.h,
config/arm/coff.h, config/h8300/h8300.h, config/i386/aix386ng.h,
config/i386/i386-interix.h, config/i386/osfrose.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h, config/sparc/litecoff.h
(EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/arm/coff.h, config/c4x/c4x.h, config/dsp16xx/dsp16xx.h,
config/h8300/h8300.h, config/i386/i386-interix.h,
config/i386/osfrose.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (READONLY_DATA_SECTION): Remove.
* config/elfos.h, config/netware.h, config/svr3.h,
config/alpha/alpha-interix.h, config/alpha/alpha.h, config/alpha/elf.h,
config/c4x/c4x.h, config/i386/aix386ng.h, config/i386/i386-interix.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/mmix/mmix.h,
config/pa/pa64-hpux.h (CONST_SECTION_FUNCTION): Remove.
* config/lynx.h, config/svr3.h, config/alpha/elf.h, config/alpha/vms.h,
config/c4x/c4x.h, config/dsp16xx/dsp16xx.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/sysv3.h, config/i860/sysv4.h,
config/ia64/sysv4.h, config/m32r/m32r.h, config/m88k/m88k.h,
config/mcore/mcore-elf.h, config/mcore/mcore-pe.h, config/mips/elf.h,
config/mips/elf64.h, config/mips/iris6.h, config/mips/linux.h,
config/mips/mips.h, config/mips/rtems64.h, config/mips/vxworks.h,
config/rs6000/sysv4.h, config/v850/v850.h
(EXTRA_SECTIONS): Remove in_const/in_rdata.
(EXTRA_SECTION_FUNCTIONS): Remove accompanying function.
* config/svr3.h, config/c4x/c4x.h, config/i386/dgux.h,
config/i386/sco5.h, config/i386/svr3gas.h, config/ia64/aix.h,
config/m88k/dgux.h, config/mcore/mcore-pe.h, config/mmix/mmix.h,
config/sparc/sysv4.h (SELECT_RTX_SECTION): Use readonly_data_section.
* config/alpha/alpha.c (alpha_start_function): Likewise.
(alpha_write_linkage): Likewise.
* config/m32r/m32r.c (m32r_select_section): Likewise.
* config/m88k/m88k.c (m88k_select_section): Likewise.
* config/mips/mips.c (mips_select_rtx_section): Likewise.
* config/rs6000/rs6000.c (rs6000_select_rtx_section): Likewise.
(rs6000_elf_select_section): Likewise.
* config/v850/v850.c (v850_select_section): Likewise.
* config/1750a/1750a.h, config/i860/sysv3.h
(READONLY_DATA_SECTION_ASM_OP): New.
READONLY_DATA_SECTION_ASM_OP.
* config/i386/interix.c, config/i386/winnt.c
(i386_pe_unique_section): Always use .rdata prefix.
* config/pa/som.h (readonly_data): Always switch to read-only section.
(READONLY_DATA_SECTION): Predicate on flag_pic.
* config/we32k/we32k.h (READONLY_DATA_SECTION): Remove parenthesis.
* doc/tm.texi (READONLY_DATA_SECTION_ASM_OP): New.
(READONLY_DATA_SECTION): Update.
From-SVN: r53593
2002-05-18 21:27:52 +02:00
|
|
|
#define EXTRA_SECTIONS in_fini
|
1994-07-11 23:07:46 +02:00
|
|
|
|
|
|
|
#undef EXTRA_SECTION_FUNCTIONS
|
|
|
|
#define EXTRA_SECTION_FUNCTIONS \
|
|
|
|
FINI_SECTION_FUNCTION
|
|
|
|
|
|
|
|
#undef CTORS_SECTION_ASM_OP
|
2000-09-25 10:23:05 +02:00
|
|
|
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors"
|
1994-07-11 23:07:46 +02:00
|
|
|
#undef DTORS_SECTION_ASM_OP
|
2000-09-25 10:23:05 +02:00
|
|
|
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors"
|
1994-07-11 23:07:46 +02:00
|
|
|
|
|
|
|
#undef DO_GLOBAL_CTORS_BODY
|
|
|
|
#undef DO_GLOBAL_DTORS_BODY
|
1995-02-18 18:19:55 +01:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* LynxOS doesn't have mcount. */
|
1995-02-18 18:19:55 +01:00
|
|
|
#undef FUNCTION_PROFILER
|
|
|
|
#define FUNCTION_PROFILER(file, profile_label_no)
|