/* Definitions of target machine for GNU compiler, for HPs running
HPUX using the 64bit runtime model.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU CC.
#ifndef CROSS_COMPILE
#undef MD_EXEC_PREFIX
-#define MD_EXEC_PREFIX "/opt/langtools/bin"
+#define MD_EXEC_PREFIX "/usr/ccs/bin"
#endif
-/* Under hpux11 the normal location of the various *crt*.o files is the
- /usr/ccs/lib directory. */
+/* Under hpux11 the normal location of the various pa20_64 *crt*.o files
+ is the /usr/ccs/lib/pa20_64 directory. Some files may also be in the
+ /opt/langtools/lib/pa20_64 directory. */
#ifndef CROSS_COMPILE
#undef MD_STARTFILE_PREFIX
-#define MD_STARTFILE_PREFIX "/opt/langtools/lib/pa20_64/"
+#define MD_STARTFILE_PREFIX "/usr/ccs/lib/pa20_64/"
+#endif
+
+#ifndef CROSS_COMPILE
+#undef MD_STARTFILE_PREFIX_1
+#define MD_STARTFILE_PREFIX_1 "/opt/langtools/lib/pa20_64/"
#endif
/* hpux11 has the new HP assembler. It's still lousy, but it's a whole lot
would like to simply include svr4.h instead of copying all these
definitions. */
-/* Support const sections and the ctors and dtors sections for g++.
- Note that there appears to be two different ways to support const
- sections at the moment. You can either #define the symbol
- READONLY_DATA_SECTION (giving it some code which switches to the
- readonly data section) or else you can #define the symbols
- EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS, SELECT_SECTION, and
- SELECT_RTX_SECTION. We do both here just to be on the safe side. */
-
-#define USE_CONST_SECTION 1
-
-#define CONST_SECTION_ASM_OP "\t.section\t.rodata"
+#define READONLY_DATA_SECTION_ASM_OP "\t.section\t.rodata"
/* On svr4, we *do* have support for the .init and .fini sections, and we
can put stuff in there to be executed before and after `main'. We let
The definitions say how to change sections to the .init and .fini
sections. This is the same for all known svr4 assemblers. */
-/* ??? For the time being, we aren't using init sections. */
+/* For the time being, we aren't using init sections. `P' relocations
+ are currently used for function references. However, P relocations are
+ treated as data references and data references are bound by dld.sl
+ immediately at program startup. This causes an abort due to undefined
+ weak symbols in crtbegin.o (e.g., __register_frame_info). Possibly
+ Q relocations might avoid this problem but the GNU assembler doesn't
+ support them. */
#if 0
#define INIT_SECTION_ASM_OP "\t.section\t.init"
#define FINI_SECTION_ASM_OP "\t.section\t.fini"
-#endif
-
-/* A default list of other sections which we might be "in" at any given
- time. For targets that use additional sections (e.g. .tdesc) you
- should override this definition in the target-specific file which
- includes this file. */
+#else
+#define EH_FRAME_IN_DATA_SECTION 1
-#undef EXTRA_SECTIONS
-#define EXTRA_SECTIONS in_const
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC ""
-/* A default list of extra section function definitions. For targets
- that use additional sections (e.g. .tdesc) you should override this
- definition in the target-specific file which includes this file. */
-
-#undef EXTRA_SECTION_FUNCTIONS
-#define EXTRA_SECTION_FUNCTIONS \
- CONST_SECTION_FUNCTION
-
-
-#define READONLY_DATA_SECTION() const_section ()
-
-#define CONST_SECTION_FUNCTION \
-void \
-const_section () \
-{ \
- if (!USE_CONST_SECTION) \
- text_section(); \
- else if (in_section != in_const) \
- { \
- fprintf (asm_out_file, "%s\n", CONST_SECTION_ASM_OP); \
- in_section = in_const; \
- } \
-}
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "%{!shared: \
+ %{!symbolic: \
+ %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}}"
+#endif
/* Switch into a generic section. */
#define TARGET_ASM_NAMED_SECTION default_elf_asm_named_section
#define MAKE_DECL_ONE_ONLY(DECL) (DECL_WEAK (DECL) = 1)
-#define UNIQUE_SECTION(DECL,RELOC) \
-do { \
- int len; \
- char *string; \
- const char *prefix, \
- *const name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (DECL));\
- \
- if (! DECL_ONE_ONLY (DECL)) \
- { \
- prefix = "."; \
- if (TREE_CODE (DECL) == FUNCTION_DECL) \
- prefix = ".text."; \
- else if (DECL_READONLY_SECTION (DECL, RELOC)) \
- prefix = ".rodata."; \
- else \
- prefix = ".data."; \
- } \
- else if (TREE_CODE (DECL) == FUNCTION_DECL) \
- prefix = ".gnu.linkonce.t."; \
- else if (DECL_READONLY_SECTION (DECL, RELOC)) \
- prefix = ".gnu.linkonce.r."; \
- else \
- prefix = ".gnu.linkonce.d."; \
- \
- len = strlen (name) + strlen (prefix); \
- string = alloca (len + 1); \
- sprintf (string, "%s%s", prefix, name); \
- \
- DECL_SECTION_NAME (DECL) = build_string (len, string); \
-} while (0)
-
-/* Define the strings used for the special svr4 .type and .size directives.
- These strings generally do not vary from one system running svr4 to
- another, but if a given system (e.g. m88k running svr) needs to use
- different pseudo-op names for these, they may be overridden in the
- file which includes this one. */
-
-#define TYPE_ASM_OP "\t.type\t"
-#define SIZE_ASM_OP "\t.size\t"
/* This is how we tell the assembler that a symbol is weak. */
do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
fputc ('\n', FILE); } while (0)
-/* The following macro defines the format used to output the second
- operand of the .type assembler directive. Different svr4 assemblers
- expect various different forms for this operand. The one given here
- is just a default. You may need to override it in your machine-
- specific tm.h file (depending upon the particulars of your assembler). */
-
-#define TYPE_OPERAND_FMT "@%s"
-
/* Write the extra assembler code needed to declare a function's result.
Most svr4 assemblers don't require any special declaration of the
result value, but there are exceptions. */