1*404b540aSrobert /* Definitions for PA_RISC with ELF format 2*404b540aSrobert Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 3*404b540aSrobert Free Software Foundation, Inc. 4*404b540aSrobert 5*404b540aSrobert This file is part of GCC. 6*404b540aSrobert 7*404b540aSrobert GCC is free software; you can redistribute it and/or modify 8*404b540aSrobert it under the terms of the GNU General Public License as published by 9*404b540aSrobert the Free Software Foundation; either version 2, or (at your option) 10*404b540aSrobert any later version. 11*404b540aSrobert 12*404b540aSrobert GCC is distributed in the hope that it will be useful, 13*404b540aSrobert but WITHOUT ANY WARRANTY; without even the implied warranty of 14*404b540aSrobert MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*404b540aSrobert GNU General Public License for more details. 16*404b540aSrobert 17*404b540aSrobert You should have received a copy of the GNU General Public License 18*404b540aSrobert along with GCC; see the file COPYING. If not, write to 19*404b540aSrobert the Free Software Foundation, 51 Franklin Street, Fifth Floor, 20*404b540aSrobert Boston, MA 02110-1301, USA. */ 21*404b540aSrobert 22*404b540aSrobert 23*404b540aSrobert #undef TARGET_OS_CPP_BUILTINS 24*404b540aSrobert #define TARGET_OS_CPP_BUILTINS() \ 25*404b540aSrobert do \ 26*404b540aSrobert { \ 27*404b540aSrobert LINUX_TARGET_OS_CPP_BUILTINS(); \ 28*404b540aSrobert builtin_assert ("machine=bigendian"); \ 29*404b540aSrobert } \ 30*404b540aSrobert while (0) 31*404b540aSrobert 32*404b540aSrobert #undef CPP_SPEC 33*404b540aSrobert #define CPP_SPEC "%{posix:-D_POSIX_SOURCE}" 34*404b540aSrobert 35*404b540aSrobert #undef LIB_SPEC 36*404b540aSrobert #define LIB_SPEC \ 37*404b540aSrobert "%{pthread:-lpthread} \ 38*404b540aSrobert %{shared:-lgcc -lc} \ 39*404b540aSrobert %{!shared:%{mieee-fp:-lieee} %{shared-libgcc:-lgcc} %{profile:-lc_p}%{!profile:-lc}}" 40*404b540aSrobert 41*404b540aSrobert #undef ASM_SPEC 42*404b540aSrobert #define ASM_SPEC \ 43*404b540aSrobert "%{v:-V} %{n} %{T} %{Ym,*} %{Yd,*} %{Wa,*:%*}" 44*404b540aSrobert 45*404b540aSrobert /* Define this for shared library support because it isn't in the main 46*404b540aSrobert linux.h file. */ 47*404b540aSrobert 48*404b540aSrobert #define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1" 49*404b540aSrobert 50*404b540aSrobert #undef LINK_SPEC 51*404b540aSrobert #define LINK_SPEC "\ 52*404b540aSrobert %{shared:-shared} \ 53*404b540aSrobert %{!shared: \ 54*404b540aSrobert %{!static: \ 55*404b540aSrobert %{rdynamic:-export-dynamic} \ 56*404b540aSrobert %{!dynamic-linker:-dynamic-linker " LINUX_DYNAMIC_LINKER "}} \ 57*404b540aSrobert %{static:-static}}" 58*404b540aSrobert 59*404b540aSrobert /* glibc's profiling functions don't need gcc to allocate counters. */ 60*404b540aSrobert #define NO_DEFERRED_PROFILE_COUNTERS 1 61*404b540aSrobert 62*404b540aSrobert /* Define the strings used for the special svr4 .type and .size directives. 63*404b540aSrobert These strings generally do not vary from one system running svr4 to 64*404b540aSrobert another, but if a given system (e.g. m88k running svr) needs to use 65*404b540aSrobert different pseudo-op names for these, they may be overridden in the 66*404b540aSrobert file which includes this one. */ 67*404b540aSrobert 68*404b540aSrobert #undef STRING_ASM_OP 69*404b540aSrobert #define STRING_ASM_OP "\t.stringz\t" 70*404b540aSrobert 71*404b540aSrobert #define TEXT_SECTION_ASM_OP "\t.text" 72*404b540aSrobert #define DATA_SECTION_ASM_OP "\t.data" 73*404b540aSrobert #define BSS_SECTION_ASM_OP "\t.section\t.bss" 74*404b540aSrobert 75*404b540aSrobert #define TARGET_ASM_FILE_START pa_linux_file_start 76*404b540aSrobert 77*404b540aSrobert /* We want local labels to start with period if made with asm_fprintf. */ 78*404b540aSrobert #undef LOCAL_LABEL_PREFIX 79*404b540aSrobert #define LOCAL_LABEL_PREFIX "." 80*404b540aSrobert 81*404b540aSrobert /* Define these to generate the Linux/ELF/SysV style of internal 82*404b540aSrobert labels all the time - i.e. to be compatible with 83*404b540aSrobert ASM_GENERATE_INTERNAL_LABEL in <elfos.h>. Compare these with the 84*404b540aSrobert ones in pa.h and note the lack of dollar signs in these. FIXME: 85*404b540aSrobert shouldn't we fix pa.h to use ASM_GENERATE_INTERNAL_LABEL instead? */ 86*404b540aSrobert 87*404b540aSrobert #undef ASM_OUTPUT_ADDR_VEC_ELT 88*404b540aSrobert #define ASM_OUTPUT_ADDR_VEC_ELT(FILE, VALUE) \ 89*404b540aSrobert if (TARGET_BIG_SWITCH) \ 90*404b540aSrobert fprintf (FILE, "\t.word .L%d\n", VALUE); \ 91*404b540aSrobert else \ 92*404b540aSrobert fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE) 93*404b540aSrobert 94*404b540aSrobert #undef ASM_OUTPUT_ADDR_DIFF_ELT 95*404b540aSrobert #define ASM_OUTPUT_ADDR_DIFF_ELT(FILE, BODY, VALUE, REL) \ 96*404b540aSrobert if (TARGET_BIG_SWITCH) \ 97*404b540aSrobert fprintf (FILE, "\t.word .L%d-.L%d\n", VALUE, REL); \ 98*404b540aSrobert else \ 99*404b540aSrobert fprintf (FILE, "\tb .L%d\n\tnop\n", VALUE) 100*404b540aSrobert 101*404b540aSrobert /* Use the default. */ 102*404b540aSrobert #undef ASM_OUTPUT_LABEL 103*404b540aSrobert 104*404b540aSrobert /* NOTE: (*targetm.asm_out.internal_label)() is defined for us by elfos.h, and 105*404b540aSrobert does what we want (i.e. uses colons). It must be compatible with 106*404b540aSrobert ASM_GENERATE_INTERNAL_LABEL(), so do not define it here. */ 107*404b540aSrobert 108*404b540aSrobert /* Use the default. */ 109*404b540aSrobert #undef ASM_OUTPUT_INTERNAL_LABEL 110*404b540aSrobert 111*404b540aSrobert /* Use the default. */ 112*404b540aSrobert #undef TARGET_ASM_GLOBALIZE_LABEL 113*404b540aSrobert /* Globalizing directive for a label. */ 114*404b540aSrobert #define GLOBAL_ASM_OP ".globl " 115*404b540aSrobert 116*404b540aSrobert /* FIXME: Hacked from the <elfos.h> one so that we avoid multiple 117*404b540aSrobert labels in a function declaration (since pa.c seems determined to do 118*404b540aSrobert it differently) */ 119*404b540aSrobert 120*404b540aSrobert #undef ASM_DECLARE_FUNCTION_NAME 121*404b540aSrobert #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \ 122*404b540aSrobert do \ 123*404b540aSrobert { \ 124*404b540aSrobert ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \ 125*404b540aSrobert ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \ 126*404b540aSrobert } \ 127*404b540aSrobert while (0) 128*404b540aSrobert 129*404b540aSrobert /* As well as globalizing the label, we need to encode the label 130*404b540aSrobert to ensure a plabel is generated in an indirect call. */ 131*404b540aSrobert 132*404b540aSrobert #undef ASM_OUTPUT_EXTERNAL_LIBCALL 133*404b540aSrobert #define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ 134*404b540aSrobert do \ 135*404b540aSrobert { \ 136*404b540aSrobert if (!FUNCTION_NAME_P (XSTR (FUN, 0))) \ 137*404b540aSrobert hppa_encode_label (FUN); \ 138*404b540aSrobert (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0)); \ 139*404b540aSrobert } \ 140*404b540aSrobert while (0) 141*404b540aSrobert 142*404b540aSrobert /* Linux always uses gas. */ 143*404b540aSrobert #undef TARGET_GAS 144*404b540aSrobert #define TARGET_GAS 1 145