2001-04-12 04:13:00 +02:00
|
|
|
/* Target definitions for Darwin (Mac OS X) systems.
|
2003-01-01 13:27:02 +01:00
|
|
|
Copyright (C) 1989, 1990, 1991, 1992, 1993, 2000, 2001, 2002, 2003
|
2001-04-12 04:13:00 +02:00
|
|
|
Free Software Foundation, Inc.
|
|
|
|
Contributed by Apple Computer Inc.
|
|
|
|
|
|
|
|
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. */
|
|
|
|
|
|
|
|
/* The definitions in this file are common to all processor types
|
|
|
|
running Darwin, which is the kernel for Mac OS X. Darwin is
|
|
|
|
basically a BSD user layer laid over a Mach kernel, then evolved
|
|
|
|
for many years (at NeXT) in parallel with other Unix systems. So
|
|
|
|
while the runtime is a somewhat idiosyncratic Mach-based thing,
|
|
|
|
other definitions look like they would for a BSD variant. */
|
|
|
|
|
|
|
|
/* Although NeXT ran on many different architectures, as of Jan 2001
|
|
|
|
the only supported Darwin targets are PowerPC and x86. */
|
|
|
|
|
2001-04-29 00:18:06 +02:00
|
|
|
/* Technically, STANDARD_EXEC_PREFIX should be /usr/libexec/, but in
|
|
|
|
practice this makes it hard to install new compilers elsewhere, so
|
|
|
|
leave it undefined and expect system builders to set configure args
|
|
|
|
correctly. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-09-13 05:44:54 +02:00
|
|
|
/* One of Darwin's NeXT legacies is the Mach-O format, which is partly
|
|
|
|
like a.out and partly like COFF, with additional features like
|
|
|
|
multi-architecture binary support. */
|
|
|
|
|
|
|
|
#define OBJECT_FORMAT_MACHO
|
|
|
|
|
2001-10-17 01:22:27 +02:00
|
|
|
/* Suppress g++ attempt to link in the math library automatically.
|
|
|
|
(Some Darwin versions have a libm, but they seem to cause problems
|
|
|
|
for C++ executables.) */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2001-10-17 01:22:27 +02:00
|
|
|
#define MATH_LIBRARY ""
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
/* We have atexit. */
|
|
|
|
|
|
|
|
#define HAVE_ATEXIT
|
|
|
|
|
|
|
|
/* Define an empty body for the function do_global_dtors() in libgcc2.c. */
|
|
|
|
|
|
|
|
#define DO_GLOBAL_DTORS_BODY
|
|
|
|
|
|
|
|
/* The string value for __SIZE_TYPE__. */
|
|
|
|
|
|
|
|
#ifndef SIZE_TYPE
|
|
|
|
#define SIZE_TYPE "long unsigned int"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Type used for ptrdiff_t, as a string used in a declaration. */
|
|
|
|
|
|
|
|
#undef PTRDIFF_TYPE
|
|
|
|
#define PTRDIFF_TYPE "int"
|
|
|
|
|
|
|
|
/* wchar_t is int. */
|
|
|
|
|
|
|
|
#undef WCHAR_TYPE
|
|
|
|
#define WCHAR_TYPE "int"
|
|
|
|
#undef WCHAR_TYPE_SIZE
|
|
|
|
#define WCHAR_TYPE_SIZE 32
|
|
|
|
|
2001-04-29 00:18:06 +02:00
|
|
|
/* Default to using the NeXT-style runtime, since that's what is
|
|
|
|
pre-installed on Darwin systems. */
|
|
|
|
|
|
|
|
#define NEXT_OBJC_RUNTIME
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Don't default to pcc-struct-return, because gcc is the only compiler, and
|
|
|
|
we want to retain compatibility with older gcc versions. */
|
|
|
|
|
|
|
|
#undef DEFAULT_PCC_STRUCT_RETURN
|
|
|
|
#define DEFAULT_PCC_STRUCT_RETURN 0
|
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
/* This table intercepts weirdo options whose names would interfere
|
|
|
|
with normal driver conventions, and either translates them into
|
|
|
|
standardly-named options, or adds a 'Z' so that they can get to
|
|
|
|
specs processing without interference.
|
|
|
|
|
|
|
|
Do not expand a linker option to "-Xlinker -<option>", since that
|
|
|
|
forfeits the ability to control via spec strings later. However,
|
|
|
|
as a special exception, do this translation with -filelist, because
|
|
|
|
otherwise the driver will think there are no input files and quit.
|
|
|
|
(The alternative would be to hack the driver to recognize -filelist
|
|
|
|
specially, but it's simpler to use the translation table.)
|
|
|
|
|
|
|
|
Note that an option name with a prefix that matches another option
|
|
|
|
name, that also takes an argument, needs to be modified so the
|
|
|
|
prefix is different, otherwise a '*' after the shorter option will
|
|
|
|
match with the longer one. */
|
|
|
|
#define TARGET_OPTION_TRANSLATE_TABLE \
|
|
|
|
{ "-all_load", "-Zall_load" }, \
|
|
|
|
{ "-allowable_client", "-Zallowable_client" }, \
|
|
|
|
{ "-arch_errors_fatal", "-Zarch_errors_fatal" }, \
|
|
|
|
{ "-bind_at_load", "-Zbind_at_load" }, \
|
|
|
|
{ "-bundle", "-Zbundle" }, \
|
|
|
|
{ "-bundle_loader", "-Zbundle_loader" }, \
|
|
|
|
{ "-weak_reference_mismatches", "-Zweak_reference_mismatches" }, \
|
|
|
|
{ "-dependency-file", "-MF" }, \
|
|
|
|
{ "-dylib_file", "-Zdylib_file" }, \
|
2002-12-20 00:46:49 +01:00
|
|
|
{ "-dynamic", "-Zdynamic" }, \
|
2002-12-10 21:20:47 +01:00
|
|
|
{ "-dynamiclib", "-Zdynamiclib" }, \
|
|
|
|
{ "-exported_symbols_list", "-Zexported_symbols_list" }, \
|
|
|
|
{ "-seg_addr_table_filename", "-Zseg_addr_table_filename" }, \
|
|
|
|
{ "-filelist", "-Xlinker -filelist -Xlinker" }, \
|
|
|
|
{ "-flat_namespace", "-Zflat_namespace" }, \
|
|
|
|
{ "-force_cpusubtype_ALL", "-Zforce_cpusubtype_ALL" }, \
|
|
|
|
{ "-force_flat_namespace", "-Zforce_flat_namespace" }, \
|
|
|
|
{ "-image_base", "-Zimage_base" }, \
|
|
|
|
{ "-init", "-Zinit" }, \
|
|
|
|
{ "-install_name", "-Zinstall_name" }, \
|
|
|
|
{ "-multiply_defined_unused", "-Zmultiplydefinedunused" }, \
|
|
|
|
{ "-multiply_defined", "-Zmultiply_defined" }, \
|
|
|
|
{ "-multi_module", "-Zmulti_module" }, \
|
|
|
|
{ "-static", "-static -Wa,-static" }, \
|
|
|
|
{ "-single_module", "-Zsingle_module" }, \
|
|
|
|
{ "-unexported_symbols_list", "-Zunexported_symbols_list" }
|
|
|
|
|
|
|
|
/* These compiler options take n arguments. */
|
|
|
|
|
|
|
|
#undef WORD_SWITCH_TAKES_ARG
|
|
|
|
#define WORD_SWITCH_TAKES_ARG(STR) \
|
|
|
|
(DEFAULT_WORD_SWITCH_TAKES_ARG (STR) ? 1 : \
|
|
|
|
!strcmp (STR, "Zallowable_client") ? 1 : \
|
|
|
|
!strcmp (STR, "arch") ? 1 : \
|
|
|
|
!strcmp (STR, "arch_only") ? 1 : \
|
|
|
|
!strcmp (STR, "Zbundle_loader") ? 1 : \
|
|
|
|
!strcmp (STR, "client_name") ? 1 : \
|
|
|
|
!strcmp (STR, "compatibility_version") ? 1 : \
|
|
|
|
!strcmp (STR, "current_version") ? 1 : \
|
|
|
|
!strcmp (STR, "Zdylib_file") ? 1 : \
|
|
|
|
!strcmp (STR, "Zexported_symbols_list") ? 1 : \
|
|
|
|
!strcmp (STR, "Zimage_base") ? 1 : \
|
|
|
|
!strcmp (STR, "Zinit") ? 1 : \
|
|
|
|
!strcmp (STR, "Zinstall_name") ? 1 : \
|
|
|
|
!strcmp (STR, "Zmultiplydefinedunused") ? 1 : \
|
|
|
|
!strcmp (STR, "Zmultiply_defined") ? 1 : \
|
|
|
|
!strcmp (STR, "precomp-trustfile") ? 1 : \
|
|
|
|
!strcmp (STR, "read_only_relocs") ? 1 : \
|
|
|
|
!strcmp (STR, "sectcreate") ? 3 : \
|
|
|
|
!strcmp (STR, "sectorder") ? 3 : \
|
|
|
|
!strcmp (STR, "Zseg_addr_table_filename") ?1 :\
|
|
|
|
!strcmp (STR, "seg1addr") ? 1 : \
|
|
|
|
!strcmp (STR, "segprot") ? 3 : \
|
|
|
|
!strcmp (STR, "seg_addr_table") ? 1 : \
|
|
|
|
!strcmp (STR, "sub_library") ? 1 : \
|
|
|
|
!strcmp (STR, "sub_umbrella") ? 1 : \
|
|
|
|
!strcmp (STR, "umbrella") ? 1 : \
|
|
|
|
!strcmp (STR, "undefined") ? 1 : \
|
|
|
|
!strcmp (STR, "Zunexported_symbols_list") ? 1 : \
|
|
|
|
!strcmp (STR, "Zweak_reference_mismatches") ? 1 : \
|
|
|
|
!strcmp (STR, "pagezero_size") ? 1 : \
|
|
|
|
!strcmp (STR, "segs_read_only_addr") ? 1 : \
|
|
|
|
!strcmp (STR, "segs_read_write_addr") ? 1 : \
|
|
|
|
!strcmp (STR, "sectalign") ? 3 : \
|
|
|
|
!strcmp (STR, "sectobjectsymbols") ? 2 : \
|
|
|
|
!strcmp (STR, "segcreate") ? 3 : \
|
|
|
|
!strcmp (STR, "dylinker_install_name") ? 1 : \
|
|
|
|
0)
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Machine dependent cpp options. */
|
|
|
|
|
|
|
|
#undef CPP_SPEC
|
2002-12-20 00:46:49 +01:00
|
|
|
#define CPP_SPEC "%{static:%{!dynamic:-D__STATIC__}}%{!static:-D__DYNAMIC__}"
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
/* This is mostly a clone of the standard LINK_COMMAND_SPEC, plus
|
|
|
|
precomp, libtool, and fat build additions. Also we
|
|
|
|
don't specify a second %G after %L because libSystem is
|
|
|
|
self-contained and doesn't need to link against libgcc.a. */
|
|
|
|
/* In general, random Darwin linker flags should go into LINK_SPEC
|
|
|
|
instead of LINK_COMMAND_SPEC. The command spec is better for
|
|
|
|
specifying the handling of options understood by generic Unix
|
|
|
|
linkers, and for positional arguments like libraries. */
|
|
|
|
#define LINK_COMMAND_SPEC "\
|
|
|
|
%{!fdump=*:%{!fsyntax-only:%{!precomp:%{!c:%{!M:%{!MM:%{!E:%{!S:\
|
|
|
|
%{!Zdynamiclib:%(linker)}%{Zdynamiclib:/usr/bin/libtool} \
|
|
|
|
%l %X %{d} %{s} %{t} %{Z} \
|
|
|
|
%{!Zdynamiclib:%{A} %{e*} %{m} %{N} %{n} %{r} %{u*} %{x} %{z}} \
|
|
|
|
%{@:-o %f%u.out}%{!@:%{o*}%{!o:-o a.out}} \
|
|
|
|
%{!Zdynamiclib:%{!A:%{!nostdlib:%{!nostartfiles:%S}}}} \
|
2003-02-01 00:08:32 +01:00
|
|
|
%{L*} %(link_libgcc) %o %{fprofile-arcs:-lgcov} \
|
|
|
|
%{!nostdlib:%{!nodefaultlibs:%G %L}} \
|
2002-12-10 21:20:47 +01:00
|
|
|
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} \
|
|
|
|
%{!--help:%{!no-c++filt|c++filt:| c++filt3 }} }}}}}}}}"
|
|
|
|
|
|
|
|
/* Please keep the random linker options in alphabetical order (modulo
|
|
|
|
'Z' and 'no' prefixes). Options that can only go to one of libtool
|
|
|
|
or ld must be listed twice, under both !Zdynamiclib and
|
|
|
|
Zdynamiclib, with one of the cases reporting an error. */
|
|
|
|
/* Note that options taking arguments may appear multiple times on a
|
|
|
|
command line with different arguments each time, so put a * after
|
|
|
|
their names so all of them get passed. */
|
|
|
|
#define LINK_SPEC \
|
|
|
|
"%{static}%{!static:-dynamic} \
|
|
|
|
%{!Zdynamiclib: \
|
|
|
|
%{Zbundle:-bundle} \
|
|
|
|
%{Zbundle_loader*:-bundle_loader %*} \
|
|
|
|
%{client_name*} \
|
|
|
|
%{compatibility_version*:%e-compatibility_version only allowed with -dynamiclib\
|
|
|
|
} \
|
|
|
|
%{current_version*:%e-current_version only allowed with -dynamiclib} \
|
|
|
|
%{Zforce_cpusubtype_ALL:-force_cpusubtype_ALL} \
|
|
|
|
%{Zforce_flat_namespace:-force_flat_namespace} \
|
|
|
|
%{Zinstall_name*:%e-install_name only allowed with -dynamiclib} \
|
|
|
|
%{keep_private_externs} \
|
|
|
|
%{private_bundle} \
|
|
|
|
} \
|
|
|
|
%{Zdynamiclib: \
|
|
|
|
%{Zbundle:%e-bundle not allowed with -dynamiclib} \
|
|
|
|
%{Zbundle_loader*:%e-bundle_loader not allowed with -dynamiclib} \
|
|
|
|
%{client_name*:%e-client_name not allowed with -dynamiclib} \
|
|
|
|
%{compatibility_version*} \
|
|
|
|
%{current_version*} \
|
|
|
|
%{Zforce_cpusubtype_ALL:%e-force_cpusubtype_ALL not allowed with -dynamiclib} \
|
|
|
|
%{Zforce_flat_namespace:%e-force_flat_namespace not allowed with -dynamiclib} \
|
|
|
|
%{Zinstall_name*:-install_name %*} \
|
|
|
|
%{keep_private_externs:%e-keep_private_externs not allowed with -dynamiclib} \
|
|
|
|
%{private_bundle:%e-private_bundle not allowed with -dynamiclib} \
|
|
|
|
} \
|
|
|
|
%{Zall_load:-all_load}%{Zdynamiclib:%{!Zall_load:-noall_load}} \
|
|
|
|
%{Zallowable_client*:-allowable_client %*} \
|
|
|
|
%{Zbind_at_load:-bind_at_load} \
|
|
|
|
%{Zarch_errors_fatal:-arch_errors_fatal} \
|
|
|
|
%{Zdylib_file*:-dylib_file %*} \
|
2002-12-20 00:46:49 +01:00
|
|
|
%{Zdynamic:-dynamic}\
|
2002-12-10 21:20:47 +01:00
|
|
|
%{Zexported_symbols_list*:-exported_symbols_list %*} \
|
|
|
|
%{Zflat_namespace:-flat_namespace} \
|
|
|
|
%{headerpad_max_install_names*} \
|
|
|
|
%{Zimage_base*:-image_base %*} \
|
|
|
|
%{Zinit*:-init %*} \
|
|
|
|
%{nomultidefs} \
|
|
|
|
%{Zmulti_module:-multi_module} %{Zsingle_module:-single_module} \
|
|
|
|
%{Zmultiply_defined*:-multiply_defined %*} \
|
|
|
|
%{Zmultiplydefinedunused*:-multiply_defined_unused %*} \
|
|
|
|
%{prebind} %{noprebind} %{prebind_all_twolevel_modules} \
|
|
|
|
%{read_only_relocs} \
|
|
|
|
%{sectcreate*} %{sectorder*} %{seg1addr*} %{segprot*} %{seg_addr_table*} \
|
|
|
|
%{Zseg_addr_table_filename*:-seg_addr_table_filename %*} \
|
|
|
|
%{sub_library*} %{sub_umbrella*} \
|
|
|
|
%{twolevel_namespace} %{twolevel_namespace_hints} \
|
|
|
|
%{umbrella*} \
|
|
|
|
%{undefined*} \
|
|
|
|
%{Zunexported_symbols_list*:-unexported_symbols_list %*} \
|
|
|
|
%{Zweak_reference_mismatches*:-weak_reference_mismatches %*} \
|
|
|
|
%{X} \
|
|
|
|
%{y*} \
|
|
|
|
%{w} \
|
|
|
|
%{pagezero_size*} %{segs_read_*} %{seglinkedit} %{noseglinkedit} \
|
|
|
|
%{sectalign*} %{sectobjectsymbols*} %{segcreate*} %{whyload} \
|
|
|
|
%{whatsloaded} %{dylinker_install_name*} \
|
|
|
|
%{dylinker} %{Mach} "
|
|
|
|
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Machine dependent libraries. */
|
|
|
|
|
|
|
|
#undef LIB_SPEC
|
2001-05-15 04:17:14 +02:00
|
|
|
#define LIB_SPEC "%{!static:-lSystem}"
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* We specify crt0.o as -lcrt0.o so that ld will search the library path. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-12-10 21:20:47 +01:00
|
|
|
#undef STARTFILE_SPEC
|
2001-04-12 04:13:00 +02:00
|
|
|
#define STARTFILE_SPEC \
|
2002-12-10 21:20:47 +01:00
|
|
|
"%{!Zdynamiclib:%{Zbundle:%{!static:-lbundle1.o}} \
|
|
|
|
%{!Zbundle:%{pg:%{static:-lgcrt0.o} \
|
|
|
|
%{!static:%{object:-lgcrt0.o} \
|
|
|
|
%{!object:%{preload:-lgcrt0.o} \
|
|
|
|
%{!preload:-lgcrt1.o -lcrt2.o}}}} \
|
|
|
|
%{!pg:%{static:-lcrt0.o} \
|
|
|
|
%{!static:%{object:-lcrt0.o} \
|
|
|
|
%{!object:%{preload:-lcrt0.o} \
|
|
|
|
%{!preload:-lcrt1.o -lcrt2.o}}}}}}"
|
2002-09-13 05:44:54 +02:00
|
|
|
|
2002-11-07 07:00:07 +01:00
|
|
|
/* The native Darwin linker doesn't necessarily place files in the order
|
|
|
|
that they're specified on the link line. Thus, it is pointless
|
|
|
|
to put anything in ENDFILE_SPEC. */
|
|
|
|
/* #define ENDFILE_SPEC "" */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
/* We use Dbx symbol format. */
|
|
|
|
|
2002-08-29 23:40:18 +02:00
|
|
|
#define DBX_DEBUGGING_INFO 1
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
/* When generating stabs debugging, use N_BINCL entries. */
|
|
|
|
|
|
|
|
#define DBX_USE_BINCL
|
|
|
|
|
|
|
|
/* There is no limit to the length of stabs strings. */
|
|
|
|
|
|
|
|
#define DBX_CONTIN_LENGTH 0
|
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* gdb needs a null N_SO at the end of each file for scattered loading. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef DBX_OUTPUT_MAIN_SOURCE_FILE_END
|
|
|
|
#define DBX_OUTPUT_MAIN_SOURCE_FILE_END(FILE, FILENAME) \
|
|
|
|
do { text_section (); \
|
|
|
|
fprintf (FILE, \
|
|
|
|
"\t.stabs \"%s\",%d,0,0,Letext\nLetext:\n", "" , N_SO); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* Our profiling scheme doesn't LP labels and counter words. */
|
|
|
|
|
linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/linux.h (NO_PROFILE_COUNTERS): Define to 1.
* config/i386/freebsd.h (NO_PROFILE_COUNTERS): Likewise.
* config/i386/netbsd-elf.h (NO_PROFILE_COUNTERS): Likewise.
* config/xtensa/xtensa.h (NO_PROFILE_COUTNERS): Likewise.
* config/darwin.h (NO_PROFILE_COUNTERS): Likewise.
* final.c (NO_PROFILE_COUNTERS): Define to 0 if not defined.
(profile_function): Allow NO_PROFILE_COUNTERS to be non-constant.
* config/rs6000/rs6000.c (output_profile_hook): Likewise.
* configure.in (powerpc*-*, s390*-*): Set tls_as_opt.
Pass it to $gcc_cv_as.
* configure: Rebuilt.
* config/rs6000/rs6000.c (rs6000_abi_name): Remove initializer.
(print_operand): Allow TARGET_AIX to be non-constant.
(rs6000_aix_emit_builtin_unwind_init, rs6000_emit_eh_toc_restore):
Define unconditionally.
(rs6000_elf_declare_function_name): New function.
* config/rs6000/rs6000.md (eh_return): Allow TARGET_AIX to be
non-constant.
* config/rs6000/linux64.h [!RS6000_BI_ARCH] (TARGET_64BIT): Define
to 1.
(DEFAULT_ARCH64_P, RS6000_BI_ARCH_P): Define.
[IN_LIBGCC2] (TARGET_64BIT): Define based on whether __powerpc64__
is defined.
(TARGET_AIX): Define to 1 if TARGET_64BIT.
(PROCESSOR_DEFAULT): Remove.
(TARGET_RELOCATABLE, RS6000_ABI_NAME, INVALID_64BIT,
INVALID_32BIT, SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
[RS6000_BI_ARCH] (OVERRIDE_OPTIONS, ASM_FILE_START): Define.
(ASM_DEFAULT_SPEC, ASM_SPEC, LINK_OS_LINUX_SPEC): Define for both
-m32 and -m64.
(MULTILIB_DEFAULTS): Define.
(SUBSUBTARGET_EXTRA_SPECS): Define.
(ASM_SPEC32, ASM_SPEC64, ASM_SPEC_COMMON): Define.
(TARGET_TOC): Define only if !RS6000_BI_ARCH.
(TARGET_NO_TOC): Remove.
[!RS6000_BI_ARCH] (TARGET_RELOCATABLE, TARGET_EABI,
TARGET_PROTOTYPE): Define to 0.
(NO_PROFILE_COUNTERS): Define to TARGET_64BIT.
(PROFILE_HOOK): Only call output_profile_hook if TARGET_64BIT.
(ADJUST_FIELD_ALIGN, ROUND_TYPE_ALIGN): Adjust to work properly
if !TARGET_64BIT.
(USER_LABEL_PREFIX): Remove.
(JUMP_TABLES_IN_TEXT_SECTION): Define to TARGET_64BIT.
(SETUP_FRAME_ADDRESSES): Only call rs6000_aix_emit_builtin_unwind_init
if TARGET_64BIT.
(TARGET_OS_CPP_BUILTINS): Handle both -m32 and -m64.
(LINK_OS_LINUX_SPEC32, LINK_OS_LINUX_SPEC64): Define.
(STARTFILE_LINUX_SPEC, ENDFILE_LINUX_SPEC): Remove.
(TOC_SECTION_ASM_OP): Define depending on TARGET_64BIT.
(MINIMAL_TOC_SECTION_ASM_OP): Likewise.
(SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Define depending on
TARGET_64BIT.
(RS6000_CALL_GLUE): Likewise.
(SAVE_FP_PREFIX, SAVE_FP_SUFFIX, RESTORE_FP_PREFIX,
RESTORE_FP_SUFFIX): Likewise.
(ASM_DECLARE_FUNCTION_NAME): Remove.
(ASM_DECLARE_FUNCTION_SIZE, ASM_OUTPUT_SOURCE_LINE,
DBX_OUTPUT_BRAC, DBX_OUTPUT_NFUN): Only output dot before function
name if TARGET_64BIT.
(ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Handle both TARGET_64BIT and
!TARGET_64BIT.
(ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Remove undefs.
(ASM_PREFERRED_EH_DATA_FORMAT): Take TARGET_64BIT into account.
(DRAFT_V4_STRUCT_RET): Define.
(SIGNAL_FRAMESIZE): New enum value.
(MD_FALLBACK_FRAME_STATE_FOR): Define.
* config/rs6000/default64.h: New file.
* config/rs6000/sysv4.h (SUBTARGET_SWITCHES): Add -m32 and -m64
options.
(SUBTARGET_OVERRIDE_OPTIONS): If rs6000_abi_name is NULL, set it
to RS6000_ABI_NAME. Only disallow mixing of -fPIC with -mcall-aixdesc
if !TARGET_64BIT.
[!RS6000_BI_ARCH] (SUBSUBTARGET_OVERRIDE_OPTIONS): Define.
(ASM_DECLARE_FUNCTION_NAME): Use rs6000_elf_declare_function_name
function.
(TARGET_OS_SYSV_CPP_BUILTINS): Define.
(TARGET_OS_CPP_BUILTINS): Use it.
(CPP_SYSV_SPEC): Remove.
(CPP_SPEC): Remove cpp_sysv.
(SUBTARGET_EXTRA_SPECS): Remove cpp_sysv.
Add SUBSUBTARGET_EXTRA_SPECS.
(SUBSUBTARGET_EXTRA_SPECS): Define.
* config/rs6000/biarch64.h: New file.
* config/rs6000/rs6000-protos.h (rs6000_elf_declare_function_name):
New prototype.
* config/rs6000/x-linux64: New file.
* config/rs6000/t-linux64: Build -m64, -m32 and -m32 -msoft-float
multilibs.
* config/rs6000/eabi-ci.asm: Protect with #ifndef __powerpc64__.
* config/rs6000/eabi-cn.asm: Likewise.
* config/rs6000/tramp.asm: Likewise.
* config/rs6000/sol-ci.asm: Likewise.
* config/rs6000/sol-cn.asm: Likewise.
* config/rs6000/linux.h (TARGET_64BIT): Define to 0.
(TARGET_OS_CPP_BUILTINS): Use TARGET_OS_SYSV_CPP_BUILTINS.
* config/rs6000/ppc-asm.h: Move __powerpc64__ section before
_CALL_AIXDESC section.
* config.gcc (powerpc64-*-linux*): Configure a bi-arch compiler,
defaulting to -m64 unless --with-cpu= is one of the 32-bit CPUs
or default32.
Co-Authored-By: Alan Modra <amodra@bigpond.net.au>
From-SVN: r67442
2003-06-04 17:23:42 +02:00
|
|
|
#define NO_PROFILE_COUNTERS 1
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef INIT_SECTION_ASM_OP
|
|
|
|
#define INIT_SECTION_ASM_OP
|
|
|
|
|
|
|
|
#undef INVOKE__main
|
|
|
|
|
2001-08-10 00:33:35 +02:00
|
|
|
#define TARGET_ASM_CONSTRUCTOR machopic_asm_out_constructor
|
|
|
|
#define TARGET_ASM_DESTRUCTOR machopic_asm_out_destructor
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-09-13 06:00:56 +02:00
|
|
|
/* Always prefix with an underscore. */
|
|
|
|
|
|
|
|
#define USER_LABEL_PREFIX "_"
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Don't output a .file directive. That is only used by the assembler for
|
|
|
|
error reporting. */
|
2003-06-27 18:08:43 +02:00
|
|
|
#undef TARGET_ASM_FILE_START_FILE_DIRECTIVE
|
|
|
|
#define TARGET_ASM_FILE_START_FILE_DIRECTIVE false
|
2001-04-12 04:13:00 +02:00
|
|
|
|
config.gcc (with_cpu handling): Translate sparc64 in $machine to --with-cpu=v9.
* config.gcc (with_cpu handling): Translate sparc64 in
$machine to --with-cpu=v9.
* config/alpha/alpha.c
(TARGET_ASM_GLOBALIZE_LABEL [TARGET_ABI_UNICOSMK]): Correct definition.
(alpha_setup_incoming_varargs): #ifdef out when TARGET_ABI_UNICOSMK.
* target.h: New hook asm_out.file_end.
* target.h: Update to match. New hook macro TARGET_ASM_FILE_END.
* toplev.c (compile_file: Use targetm.asm_out.file_end.
* system.h: Poison ASM_FILE_END.
* varasm.c (file_end_indicate_exec_stack): New.
* output.h: Prototype it.
* doc/tm.texi: Document TARGET_ASM_FILE_END and
file_end_indicate_exec_stack. Delete references to attasm.h.
* config/darwin.h (TARGET_ASM_FILE_END): Reset to darwin_file_end.
(ASM_FILE_END): Delete; move code...
* config/darwin.c (darwin_file_end): Here; new function.
* config/darwin-protos.h: Prototype it.
* config/alpha/alpha.c (unicosmk_asm_file_end): Make static,
rename unicosmk_file_end.
* config/arm/aof.h (ASM_FILE_END): Delete; move code...
* config/arm/arm.c (aof_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to aof_file_end if AOF_ASSEMBLER.
Make aof_dump_imports and aof_dump_pic_table static.
* config/avr/avr.c (asm_file_end): Rename avr_file_end, make static.
Set TARGET_ASM_FILE_END to avr_file_end.
* config/c4x/c4x.c (c4x_file_end): Make static. Take no arguments.
Set TARGET_ASM_FILE_END to c4x_file_end.
* config/h8300/h8300.c (asm_file_end): Rename h8300_file_end,
make static. Take no arguments. Set TARGET_ASM_FILE_END to
h8300_file_end.
* config/i370/i370.h (ASM_FILE_END): Delete; move code...
* config/i370/i370.c (i370_file_end): ... here; new static function.
Set TARGET_ASM_FILE_END to i370_file_end.
* config/i386/i386.c (ix86_asm_file_end): Rename ix86_file_end.
Take no arguments. Call file_end_indicate_exec_stack if
NEED_INDICATE_EXEC_STACK; don't use SUBTARGET_FILE_END.
* config/i386/i386.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
Define NEED_INDICATE_EXEC_STACK to 0.
* config/i386/linux.h, config/i386/linux64.h: Redefine
NEED_INDICATE_EXEC_STACK to 1 instead of setting SUBTARGET_FILE_END.
* config/i386/winnt.c (i386_pe_asm_file_end): Rename to
i386_pe_file_end. Take no arguments. Use ix86_file_end.
* config/ia64/ia64.c (ia64_hpux_asm_file_end): Rename to
ia64_hpux_file_end, make static. Take no arguments.
* config/ip2k/ip2k.c (asm_file_start, asm_file_end,
commands_in_prologues, commands_in_epilogues): Delete.
(function_epilogue): Update to match.
* config/mips/mips.c (mips_asm_file_end): Rename mips_file_end,
make static. Take no arguments.
(iris6_asm_file_end): Rename iris6_file_end, make static, use
mips_file_end, take no arguments.
Set TARGET_ASM_FILE_END to iris6_file_end or mips_file_end as
appropriate.
* config/mmix/mmix.c (mmix_asm_file_end): Rename mmix_file_end,
make static, take no arguments. Set TARGET_ASM_FILE_END to
mmix_file_end.
* config/pa/pa.c (output_deferred_plabels): Make static, take
no arguments. Set TARGET_ASM_FILE_END to output_deferred_plabels.
* config/rs6000/xcoff.h (TARGET_ASM_FILE_END): Set it.
(ASM_FILE_END): Delete; move code...
* config/rs6000/rs6000.c (rs6000_xcoff_file_end): ... here;
new static function.
* config/avr/avr.h, config/cris/cris.h, config/h8300/h8300.h
* config/mmix/mmix.h, config/mips/iris6.h, config/mips/mips.h:
Don't set ASM_FILE_END.
* config/alpha/linux-elf.h, config/m68k/linux.h, config/rs6000/linux.h
* config/rs6000/linux64.h, config/s390/linux.h, config/sparc/linux.h
* config/sparc/linux64.h: Set TARGET_ASM_FILE_END to
file_end_indicate_exec_stack; don't set ASM_FILE_END.
* config/alpha/unicosmk.h, config/i386/cygming.h
* config/ia64/hpux.h: Set TARGET_ASM_FILE_END, not ASM_FILE_END.
* config/arm/arm-protos.h, config/alpha/alpha-protos.h
* config/avr/avr-protos.h, config/c4x/c4x-protos.h
* config/h8300/h8300-protos.h, config/ia64/ia64-protos.h
* config/ip2k/ip2k-protos.h, config/mips/mips-protos.h
* config/mmix/mmix-protos.h, config/pa/pa-protos.h: Update.
From-SVN: r67591
2003-06-07 19:11:48 +02:00
|
|
|
#undef TARGET_ASM_FILE_END
|
|
|
|
#define TARGET_ASM_FILE_END darwin_file_end
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-07-17 02:19:30 +02:00
|
|
|
#define ASM_OUTPUT_SKIP(FILE,SIZE) \
|
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz>
* expr.h (assemble_static_space): Update prototype.
* output.h (assemble_zeros, output_constant): Likewise.
* elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean
* alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make
it 64bit clean.
* elf.h (ASM_OTUPUT_SKIP): Likewise.
* unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise.
* arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect
HOST_WIDE_INT operand.
* c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP,
ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand.
* aout.h (ASM_OTUPUT_SKIP): Likewise.
* cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
* darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise.
* dsp16xx.h (ASM_OTUPUT_SKIP): Likewise.
* frv.h (ASM_OTUPUT_SKIP): Likewise.
* h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise.
* 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit
clean.
* att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand.
* bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit clean.
* darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean..
* sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect
HOST_WIDE_INT operand
* svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Expect HOST_WIDE_INT operand
* sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand
* i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand
* ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m32r.h (ASM_OUTPUT_COMMON): Likewise.
* 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* sgs.h (ASM_OUTPUT_SKIP): Likewise.
* tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP):
Likewise.
* mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise.
* iris.h (ASM_OUTPUT_LOCAL): Likewise.
* mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL):
Make it 64bit clean.
* pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it
64bit clean.
* romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument.
* sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument
* svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
HOST_WIDE_INT argument
* vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialized, assemble_zeros, assemble_static_space):
HOST_WIDE_INT argument
From-SVN: r66713
2003-05-12 11:51:36 +02:00
|
|
|
fprintf (FILE, "\t.space "HOST_WIDE_INT_PRINT_UNSIGNED"\n", SIZE)
|
2002-07-17 02:19:30 +02:00
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Give ObjC methods pretty symbol names. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef OBJC_GEN_METHOD_LABEL
|
|
|
|
#define OBJC_GEN_METHOD_LABEL(BUF,IS_INST,CLASS_NAME,CAT_NAME,SEL_NAME,NUM) \
|
|
|
|
do { if (CAT_NAME) \
|
|
|
|
sprintf (BUF, "%c[%s(%s) %s]", (IS_INST) ? '-' : '+', \
|
|
|
|
(CLASS_NAME), (CAT_NAME), (SEL_NAME)); \
|
|
|
|
else \
|
|
|
|
sprintf (BUF, "%c[%s %s]", (IS_INST) ? '-' : '+', \
|
|
|
|
(CLASS_NAME), (SEL_NAME)); \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* The RTTI data (e.g., __ti4name) is common and public (and static),
|
|
|
|
but it does need to be referenced via indirect PIC data pointers.
|
|
|
|
The machopic_define_name calls are telling the machopic subsystem
|
|
|
|
that the name *is* defined in this module, so it doesn't need to
|
|
|
|
make them indirect. */
|
|
|
|
|
|
|
|
#undef ASM_DECLARE_OBJECT_NAME
|
|
|
|
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
|
|
|
|
do { \
|
2003-07-27 03:48:11 +02:00
|
|
|
const char *xname = NAME; \
|
|
|
|
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
|
|
|
|
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
|
|
|
|
if ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL)) \
|
|
|
|
machopic_define_name (xname); \
|
|
|
|
if ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL)) \
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
|
2003-07-27 03:48:11 +02:00
|
|
|
ASM_OUTPUT_LABEL (FILE, xname); \
|
|
|
|
/* Darwin doesn't support zero-size objects, so give them a \
|
|
|
|
byte. */ \
|
|
|
|
if (tree_low_cst (DECL_SIZE_UNIT (DECL), 1) == 0) \
|
|
|
|
assemble_zeros (1); \
|
2001-09-04 22:58:19 +02:00
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
|
|
|
|
do { \
|
2001-10-24 00:39:06 +02:00
|
|
|
const char *xname = NAME; \
|
2001-09-04 22:58:19 +02:00
|
|
|
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
|
|
|
|
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
|
|
|
|
if ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL)) \
|
|
|
|
machopic_define_name (xname); \
|
|
|
|
if ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL)) \
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
|
2001-09-04 22:58:19 +02:00
|
|
|
ASM_OUTPUT_LABEL (FILE, xname); \
|
2001-12-21 11:44:50 +01:00
|
|
|
/* Avoid generating stubs for functions we've just defined by \
|
|
|
|
outputting any required stub name label now. */ \
|
|
|
|
machopic_output_possible_stub_label (FILE, xname); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} while (0)
|
|
|
|
|
2003-07-27 03:48:11 +02:00
|
|
|
#define ASM_DECLARE_CONSTANT_NAME(FILE, NAME, EXP, SIZE) \
|
|
|
|
do { \
|
|
|
|
ASM_OUTPUT_LABEL (FILE, NAME); \
|
|
|
|
/* Darwin doesn't support zero-size objects, so give them a \
|
|
|
|
byte. */ \
|
|
|
|
if ((SIZE) == 0) \
|
|
|
|
assemble_zeros (1); \
|
|
|
|
} while (0)
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
/* Wrap new method names in quotes so the assembler doesn't gag.
|
|
|
|
Make Objective-C internal symbols local. */
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_LABELREF
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
#define ASM_OUTPUT_LABELREF(FILE,NAME) \
|
|
|
|
do { \
|
|
|
|
const char *xname = darwin_strip_name_encoding (NAME); \
|
2003-07-16 21:05:53 +02:00
|
|
|
if (! strcmp (xname, "<pic base>")) \
|
|
|
|
machopic_output_function_base_name(FILE); \
|
|
|
|
else if (xname[0] == '&' || xname[0] == '*') \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
{ \
|
|
|
|
int len = strlen (xname); \
|
|
|
|
if (len > 6 && !strcmp ("$stub", xname + len - 5)) \
|
|
|
|
machopic_validate_stub_or_non_lazy_ptr (xname, 1); \
|
|
|
|
else if (len > 7 && !strcmp ("$stub\"", xname + len - 6)) \
|
|
|
|
machopic_validate_stub_or_non_lazy_ptr (xname, 1); \
|
|
|
|
else if (len > 14 && !strcmp ("$non_lazy_ptr", xname + len - 13)) \
|
|
|
|
machopic_validate_stub_or_non_lazy_ptr (xname, 0); \
|
|
|
|
fputs (&xname[1], FILE); \
|
|
|
|
} \
|
|
|
|
else if (xname[0] == '+' || xname[0] == '-') \
|
|
|
|
fprintf (FILE, "\"%s\"", xname); \
|
|
|
|
else if (!strncmp (xname, "_OBJC_", 6)) \
|
|
|
|
fprintf (FILE, "L%s", xname); \
|
|
|
|
else if (!strncmp (xname, ".objc_class_name_", 17)) \
|
|
|
|
fprintf (FILE, "%s", xname); \
|
|
|
|
else \
|
|
|
|
fprintf (FILE, "_%s", xname); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} while (0)
|
|
|
|
|
2002-07-17 02:19:30 +02:00
|
|
|
/* Output before executable code. */
|
|
|
|
#undef TEXT_SECTION_ASM_OP
|
|
|
|
#define TEXT_SECTION_ASM_OP ".text"
|
|
|
|
|
|
|
|
/* Output before writable data. */
|
|
|
|
|
|
|
|
#undef DATA_SECTION_ASM_OP
|
|
|
|
#define DATA_SECTION_ASM_OP ".data"
|
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
#undef ALIGN_ASM_OP
|
|
|
|
#define ALIGN_ASM_OP ".align"
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_ALIGN
|
|
|
|
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
|
|
|
|
if ((LOG) != 0) \
|
|
|
|
fprintf (FILE, "\t%s %d\n", ALIGN_ASM_OP, (LOG))
|
|
|
|
|
|
|
|
/* Ensure correct alignment of bss data. */
|
|
|
|
|
|
|
|
#undef ASM_OUTPUT_ALIGNED_DECL_LOCAL
|
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag.
* varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P;
invoke ENCODE_SECTION_INFO with first call flag.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
config/arm/arm.h, config/arm/pe.c, config/arm/pe.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h,
config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/m88k/m88k.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h,
config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h,
config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes
FIRST argument. As needed, examine it and do nothing.
* config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h,
config/mcore/mcore.h: Remove REDO_SECTION_INFO_P.
* config/arm/t-pe (pe.o): Add dependencies.
From-SVN: r50236
2002-03-03 05:23:21 +01:00
|
|
|
#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN) \
|
|
|
|
do { \
|
|
|
|
fputs (".lcomm ", (FILE)); \
|
|
|
|
assemble_name ((FILE), (NAME)); \
|
Mon May 12 11:32:53 CEST 2003 Jan Hubicka <jh@suse.cz>
* expr.h (assemble_static_space): Update prototype.
* output.h (assemble_zeros, output_constant): Likewise.
* elfos.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): Make it 64bit clean
* alpha.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASK_OUTPUT_LOCAL): Make
it 64bit clean.
* elf.h (ASM_OTUPUT_SKIP): Likewise.
* unicosmk.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMM): Likewise.
* arm.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* aout.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* unknown-elf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Expect HOST_WIDE_INT operand.
* avr.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP): Expect
HOST_WIDE_INT operand.
* c4x.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP,
ASM_OUTPUT_BSS): Expect HOST_WIDE_INT operand.
* aout.h (ASM_OTUPUT_SKIP): Likewise.
* cris.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Likewise.
* darwin.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON): Likewise.
* dsp16xx.h (ASM_OTUPUT_SKIP): Likewise.
* frv.h (ASM_OTUPUT_SKIP): Likewise.
* h8300.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_LOCAL): Likewise.
* 370.h (ASM_OTUPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit
clean.
* att.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand.
* bsd.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Make it 64bit clean.
* darwin.h (ASM_OUTPUT_SKIP): Make it 64bit clean..
* sco5.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL): Expect
HOST_WIDE_INT operand
* svr3gas.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
Expect HOST_WIDE_INT operand
* sysv3.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT operand
* i960.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON,
ASM_OUTPUT_ALIGNED_LOCAL): Expect HOST_WIDE_INT operand
* ip2k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m32r.h (ASM_OUTPUT_COMMON): Likewise.
* 3b1.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* amix.h (ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* crds.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_ALIGNED_LOCAL): Likewise.
* hp320.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP):
Likewise.
* m68kelf.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* m68kv4.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Likewise.
* mot3300.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* netbsd-elf.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* sgs.h (ASM_OUTPUT_SKIP): Likewise.
* tower-as.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON,
ASM_OUTPUT_SKIP): Likewise.
* m88k.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON, ASM_OUTPUT_SKIP):
Likewise.
* mcore.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_BSS, ASM_OUTPUT_SKIP): Likewise.
* iris.h (ASM_OUTPUT_LOCAL): Likewise.
* mips.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_SKIP): Likewise.
* ns32k.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* pa-pro-end.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL):
Make it 64bit clean.
* pa.h (ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL,
ASM_OUTPUT_SKIP): Make it 64bit clean.
* hpux.h (ASM_OUTPUT_LOCAL, ASM_OUTPUT_ALIGNED_LOCAL): Make it
64bit clean.
* romp.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* s390.h (ASM_OUTPUT_SKIP): Expect HOST_WIDE_INT argument.
* sh.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_LOCAL, ASM_OUTPUT_COMMON): Expect
HOST_WIDE_INT argument
* sol2.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* sparc.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON): HOST_WIDE_INT argument
* svr3.h (ASM_OUTPUT_SKIP): HOST_WIDE_INT argument
* vax.h (ASM_OUTPUT_SKIP, ASM_OUTPUT_COMMON, ASM_OUTPUT_LOCAL):
HOST_WIDE_INT argument
* vaxv.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* xtensa.h (ASM_OUTPUT_LOCAL): HOST_WIDE_INT argument
* varasm.c (asm_output_bss, asm_output_aligned_bss,
asm_emit_uninitialized, assemble_zeros, assemble_static_space):
HOST_WIDE_INT argument
From-SVN: r66713
2003-05-12 11:51:36 +02:00
|
|
|
fprintf ((FILE), ","HOST_WIDE_INT_PRINT_UNSIGNED",%u\n", (SIZE), \
|
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag.
* varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P;
invoke ENCODE_SECTION_INFO with first call flag.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
config/arm/arm.h, config/arm/pe.c, config/arm/pe.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h,
config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/m88k/m88k.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h,
config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h,
config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes
FIRST argument. As needed, examine it and do nothing.
* config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h,
config/mcore/mcore.h: Remove REDO_SECTION_INFO_P.
* config/arm/t-pe (pe.o): Add dependencies.
From-SVN: r50236
2002-03-03 05:23:21 +01:00
|
|
|
floor_log2 ((ALIGN) / BITS_PER_UNIT)); \
|
|
|
|
if ((DECL) && ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL))) \
|
target.h (encode_section_info): Add new argument carrying the RTL to be modified by the hook.
* target.h (encode_section_info): Add new argument carrying
the RTL to be modified by the hook.
* varasm.c (make_decl_rtl, output_constant_def): Update calls
to encode_section_info.
(default_encode_section_info): Take and use RTL argument,
don't use TREE_CST_RTL or DECL_RTL.
* output.h: Update prototype of default_encode_section_info.
* config/darwin.h (ASM_DECLARE_OBJECT_NAME)
(ASM_DECLARE_FUNCTION_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL):
Update calls to encode_section_info.
* config/darwin.c, config/arm/arm.c, config/arm/pe.c
* config/h8300/h8300.c, config/i386/winnt.c, config/m32r/m32r.c
* config/m68hc11/m68hc11.c, config/m88k/m88k.c, config/mcore/mcore.c
* config/mips/mips.c, config/mmix/mmix.c, config/pa/pa.c
* config/romp/romp.c, config/rs6000/rs6000.c, config/s390/s390.c
* config/v850/v850.c (TARGET_ENCODE_SECTION_INFO definitions):
Take and use RTL argument, don't use TREE_CST_RTL or DECL_RTL,
except for PE dllimport/dllexport. Update calls to
default_encode_section_info.
* config/darwin-protos.h, config/arm/arm-protos.h, config/i386-protos.h:
Update prototypes.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update.
From-SVN: r65859
2003-04-20 20:20:39 +02:00
|
|
|
(* targetm.encode_section_info) (DECL, DECL_RTL (DECL), false); \
|
varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P; invoke ENCODE_SECTION_INFO with first call flag.
* varasm.c (make_decl_rtl): Remove call to REDO_SECTION_INFO_P;
invoke ENCODE_SECTION_INFO with first call flag.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/a29k/a29k.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arc/arc.h, config/arm/arm-protos.h,
config/arm/arm.h, config/arm/pe.c, config/arm/pe.h,
config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h,
config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h,
config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.h,
config/d30v/d30v.h, config/h8300/h8300.h, config/i370/i370.h,
config/i386/cygwin.h, config/i386/i386-interix.h, config/i386/i386.h,
config/i386/osfrose.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64-protos.h, config/ia64/ia64.c, config/ia64/ia64.h,
config/m32r/m32r-protos.h, config/m32r/m32r.c, config/m32r/m32r.h,
config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c,
config/m68hc11/m68hc11.h, config/m88k/m88k.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mips/mips.h, config/ns32k/ns32k.h,
config/pa/pa.h, config/romp/romp.h, config/rs6000/linux64.h,
config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
config/rs6000/sysv4.h, config/rs6000/xcoff.h, config/s390/s390.h,
config/sh/sh.h, config/sparc/sparc.h,
config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
config/stormy16/stormy16.h, config/v850/v850.h, config/vax/vms.h,
config/xtensa/xtensa.h, doc/tm.texi: ENCODE_SECTION_INFO now takes
FIRST argument. As needed, examine it and do nothing.
* config/darwin.h, config/alpha/alpha.h, config/arm/pe.h,
config/i386/cygwin.h, config/ia64/ia64.h, config/m68hc11/m68hc11.h,
config/mcore/mcore.h: Remove REDO_SECTION_INFO_P.
* config/arm/t-pe (pe.o): Add dependencies.
From-SVN: r50236
2002-03-03 05:23:21 +01:00
|
|
|
if ((DECL) && ((TREE_STATIC (DECL) \
|
|
|
|
&& (!DECL_COMMON (DECL) || !TREE_PUBLIC (DECL))) \
|
|
|
|
|| DECL_INITIAL (DECL))) \
|
|
|
|
machopic_define_name (NAME); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* The maximum alignment which the object file format can support.
|
|
|
|
For Mach-O, this is 2^15. */
|
|
|
|
|
|
|
|
#undef MAX_OFILE_ALIGNMENT
|
|
|
|
#define MAX_OFILE_ALIGNMENT 0x8000
|
|
|
|
|
2002-09-29 15:16:44 +02:00
|
|
|
/* Create new Mach-O sections. */
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef SECTION_FUNCTION
|
2001-07-03 22:38:37 +02:00
|
|
|
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \
|
2001-10-24 00:39:06 +02:00
|
|
|
extern void FUNCTION PARAMS ((void)); \
|
2001-04-12 04:13:00 +02:00
|
|
|
void \
|
|
|
|
FUNCTION () \
|
|
|
|
{ \
|
2001-07-03 22:38:37 +02:00
|
|
|
if (in_section != SECTION) \
|
2001-04-12 04:13:00 +02:00
|
|
|
{ \
|
|
|
|
if (OBJC) \
|
|
|
|
objc_section_init (); \
|
|
|
|
data_section (); \
|
|
|
|
if (asm_out_file) \
|
|
|
|
fprintf (asm_out_file, "%s\n", DIRECTIVE); \
|
|
|
|
in_section = SECTION; \
|
|
|
|
} \
|
|
|
|
} \
|
|
|
|
|
|
|
|
/* Darwin uses many types of special sections. */
|
|
|
|
|
|
|
|
#undef EXTRA_SECTIONS
|
|
|
|
#define EXTRA_SECTIONS \
|
|
|
|
in_const, in_const_data, in_cstring, in_literal4, in_literal8, \
|
|
|
|
in_constructor, in_destructor, in_mod_init, in_mod_term, \
|
|
|
|
in_objc_class, in_objc_meta_class, in_objc_category, \
|
|
|
|
in_objc_class_vars, in_objc_instance_vars, \
|
|
|
|
in_objc_cls_meth, in_objc_inst_meth, \
|
|
|
|
in_objc_cat_cls_meth, in_objc_cat_inst_meth, \
|
|
|
|
in_objc_selector_refs, \
|
|
|
|
in_objc_selector_fixup, \
|
|
|
|
in_objc_symbols, in_objc_module_info, \
|
|
|
|
in_objc_protocol, in_objc_string_object, \
|
|
|
|
in_objc_constant_string_object, \
|
|
|
|
in_objc_class_names, in_objc_meth_var_names, \
|
|
|
|
in_objc_meth_var_types, in_objc_cls_refs, \
|
|
|
|
in_machopic_nl_symbol_ptr, \
|
|
|
|
in_machopic_lazy_symbol_ptr, \
|
|
|
|
in_machopic_symbol_stub, \
|
2003-01-04 00:09:33 +01:00
|
|
|
in_machopic_symbol_stub1, \
|
2001-04-12 04:13:00 +02:00
|
|
|
in_machopic_picsymbol_stub, \
|
2003-01-04 00:09:33 +01:00
|
|
|
in_machopic_picsymbol_stub1, \
|
2001-10-22 16:43:31 +02:00
|
|
|
in_darwin_exception, in_darwin_eh_frame, \
|
2001-04-12 04:13:00 +02:00
|
|
|
num_sections
|
|
|
|
|
|
|
|
#undef EXTRA_SECTION_FUNCTIONS
|
|
|
|
#define EXTRA_SECTION_FUNCTIONS \
|
2001-10-24 00:39:06 +02:00
|
|
|
static void objc_section_init PARAMS ((void)); \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (const_section, \
|
|
|
|
in_const, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".const", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (const_data_section, \
|
|
|
|
in_const_data, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".const_data", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (cstring_section, \
|
|
|
|
in_cstring, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".cstring", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (literal4_section, \
|
|
|
|
in_literal4, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".literal4", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (literal8_section, \
|
|
|
|
in_literal8, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".literal8", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (constructor_section, \
|
|
|
|
in_constructor, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".constructor", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (mod_init_section, \
|
|
|
|
in_mod_init, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".mod_init_func", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (mod_term_section, \
|
|
|
|
in_mod_term, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".mod_term_func", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (destructor_section, \
|
|
|
|
in_destructor, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".destructor", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_class_section, \
|
|
|
|
in_objc_class, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_class", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_meta_class_section, \
|
|
|
|
in_objc_meta_class, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_meta_class", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_category_section, \
|
|
|
|
in_objc_category, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_category", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_class_vars_section, \
|
|
|
|
in_objc_class_vars, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_class_vars", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_instance_vars_section, \
|
|
|
|
in_objc_instance_vars, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_instance_vars", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_cls_meth_section, \
|
|
|
|
in_objc_cls_meth, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_cls_meth", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_inst_meth_section, \
|
|
|
|
in_objc_inst_meth, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_inst_meth", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_cat_cls_meth_section, \
|
|
|
|
in_objc_cat_cls_meth, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_cat_cls_meth", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_cat_inst_meth_section, \
|
|
|
|
in_objc_cat_inst_meth, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_cat_inst_meth", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_selector_refs_section, \
|
|
|
|
in_objc_selector_refs, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_message_refs", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_selector_fixup_section, \
|
|
|
|
in_objc_selector_fixup, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".section __OBJC, __sel_fixup", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_symbols_section, \
|
|
|
|
in_objc_symbols, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_symbols", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_module_info_section, \
|
|
|
|
in_objc_module_info, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_module_info", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_protocol_section, \
|
|
|
|
in_objc_protocol, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_protocol", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_string_object_section, \
|
|
|
|
in_objc_string_object, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_string_object", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_constant_string_object_section, \
|
|
|
|
in_objc_constant_string_object, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".section __OBJC, __cstring_object", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_class_names_section, \
|
|
|
|
in_objc_class_names, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_class_names", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_meth_var_names_section, \
|
|
|
|
in_objc_meth_var_names, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_meth_var_names", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_meth_var_types_section, \
|
|
|
|
in_objc_meth_var_types, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_meth_var_types", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (objc_cls_refs_section, \
|
|
|
|
in_objc_cls_refs, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".objc_cls_refs", 1) \
|
2001-04-12 04:13:00 +02:00
|
|
|
\
|
|
|
|
SECTION_FUNCTION (machopic_lazy_symbol_ptr_section, \
|
|
|
|
in_machopic_lazy_symbol_ptr, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".lazy_symbol_pointer", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (machopic_nl_symbol_ptr_section, \
|
|
|
|
in_machopic_nl_symbol_ptr, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".non_lazy_symbol_pointer", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (machopic_symbol_stub_section, \
|
|
|
|
in_machopic_symbol_stub, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".symbol_stub", 0) \
|
2003-01-04 00:09:33 +01:00
|
|
|
SECTION_FUNCTION (machopic_symbol_stub1_section, \
|
|
|
|
in_machopic_symbol_stub1, \
|
|
|
|
".section __TEXT,__symbol_stub1,symbol_stubs,pure_instructions,16", 0)\
|
2001-04-12 04:13:00 +02:00
|
|
|
SECTION_FUNCTION (machopic_picsymbol_stub_section, \
|
|
|
|
in_machopic_picsymbol_stub, \
|
2001-07-03 22:38:37 +02:00
|
|
|
".picsymbol_stub", 0) \
|
2003-01-04 00:09:33 +01:00
|
|
|
SECTION_FUNCTION (machopic_picsymbol_stub1_section, \
|
|
|
|
in_machopic_picsymbol_stub1, \
|
|
|
|
".section __TEXT,__picsymbolstub1,symbol_stubs,pure_instructions,32", 0)\
|
2001-10-17 01:22:27 +02:00
|
|
|
SECTION_FUNCTION (darwin_exception_section, \
|
|
|
|
in_darwin_exception, \
|
2002-09-13 05:44:54 +02:00
|
|
|
".section __DATA,__gcc_except_tab", 0) \
|
2001-10-22 16:43:31 +02:00
|
|
|
SECTION_FUNCTION (darwin_eh_frame_section, \
|
|
|
|
in_darwin_eh_frame, \
|
|
|
|
".section __TEXT,__eh_frame", 0) \
|
2001-04-12 04:13:00 +02:00
|
|
|
\
|
2001-10-24 00:39:06 +02:00
|
|
|
static void \
|
2001-04-12 04:13:00 +02:00
|
|
|
objc_section_init () \
|
|
|
|
{ \
|
|
|
|
static int been_here = 0; \
|
|
|
|
\
|
|
|
|
if (been_here == 0) \
|
|
|
|
{ \
|
|
|
|
been_here = 1; \
|
|
|
|
/* written, cold -> hot */ \
|
|
|
|
objc_cat_cls_meth_section (); \
|
|
|
|
objc_cat_inst_meth_section (); \
|
|
|
|
objc_string_object_section (); \
|
|
|
|
objc_constant_string_object_section (); \
|
|
|
|
objc_selector_refs_section (); \
|
|
|
|
objc_selector_fixup_section (); \
|
|
|
|
objc_cls_refs_section (); \
|
|
|
|
objc_class_section (); \
|
|
|
|
objc_meta_class_section (); \
|
|
|
|
/* shared, hot -> cold */ \
|
|
|
|
objc_cls_meth_section (); \
|
|
|
|
objc_inst_meth_section (); \
|
|
|
|
objc_protocol_section (); \
|
|
|
|
objc_class_names_section (); \
|
|
|
|
objc_meth_var_types_section (); \
|
|
|
|
objc_meth_var_names_section (); \
|
|
|
|
objc_category_section (); \
|
|
|
|
objc_class_vars_section (); \
|
|
|
|
objc_instance_vars_section (); \
|
|
|
|
objc_module_info_section (); \
|
|
|
|
objc_symbols_section (); \
|
|
|
|
} \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define READONLY_DATA_SECTION const_section
|
|
|
|
|
hooks.c (hook_tree_bool_false): New.
* hooks.c (hook_tree_bool_false): New.
* hooks.h: Declare it.
* target-def.h (TARGET_ASM_SELECT_SECTION): New.
(TARGET_ASM_UNIQUE_SECTION, TARGET_IN_SMALL_DATA_P): New.
* target.h (select_section, unique_section): New.
(in_small_data_p): New.
* varasm.c (resolve_unique_section): Use hooks instead of macros.
(variable_section, output_constant_def_contents): Likewise.
(default_select_section, default_unique_section): New.
(categorize_decl_for_section, default_elf_select_section): New.
* output.h: Declare them.
* config/darwin.h (ALIAS_SECTION, try_section_alias): Remove.
(TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/darwin.c (machopic_select_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/nextstep.c (nextstep_select_section): ... here.
* config/nextstep-protos.h: Update.
* config/elfos.h (UNIQUE_SECTION, SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/svr3.h (SELECT_SECTION): Remove.
* config/alpha/alpha.c (unicosmk_unique_section): Make static.
(TARGET_ASM_UNIQUE_SECTION) [UNICOS]: New.
(TARGET_IN_SMALL_DATA_P, alpha_in_small_data_p): New.
(alpha_encode_section_info): Use it.
* config/alpha/alpha-protos.h: Update.
* config/alpha/elf.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/alpha/unicosmk.h (UNIQUE_SECTION): Remove.
* config/arm/pe.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/avr/avr.c (TARGET_ASM_UNIQUE_SECTION): New.
(avr_unique_section): Rename from unique_section; make static.
* config/avr/avr-protos.h: Update.
* config/avr/avr.h (UNIQUE_SECTION): Remove.
* config/c4x/c4x.h (SELECT_SECTION): Remove.
* config/i386/cygwin.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/i386/i386-interix.h: Likewise.
* config/i386/win32.h: Likewise.
* config/i386/djgpp.h (UNIQUE_SECTION): Remove.
* config/i386/i386.c (ix86_asm_file_end): Use target hook not macro.
* config/i386/sco5.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/i386/svr3gas.h (SELECT_SECTION): Remove.
* config/i860/paragon.h: Undef TARGET_ASM_SELECT_SECTION
instead of SELECT_SECTION.
* config/m68k/dpx2.h: Likewise.
* config/rs6000/lynx.h: Likewise.
* config/ia64/aix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/ia64/ia64.c (TARGET_IN_SMALL_DATA_P): New.
(ia64_in_small_data_p): New.
(ia64_encode_section_info): Use it. Reorganize overlarge conditional.
(ia64_aix_select_section, ia64_aix_unique_section): New.
* config/ia64/sysv4.h (DO_SELECT_SECTION): Remove.
(SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/m32r/m32r.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/m32r/m32r.c (m32r_select_section): Take align argument.
* config/m32r/m32r-protos.h: Update.
* config/m88k/m88k.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/m88k/m88k.c (m88k_select_section): ... here.
* config/mcore/mcore-pe.h (SELECT_SECTION): Remove.
* config/mcore/mcore.h (UNIQUE_SECTION): Remove.
* config/mcore/mcore.c (TARGET_ASM_UNIQUE_SECTION): New.
(mcore_unique_section): Make static.
* config/mcore/mcore-protos.h: Update.
* config/mips/elf.h (UNIQUE_SECTION): Remove.
(TARGET_ASM_UNIQUE_SECTION): New.
* config/mips/elf64.h: Likewise.
* config/mips/iris6gld.h: Likewise.
* config/mips/linux.h: Likewise.
* config/mips/mips-protos.h: Update.
* config/mips/mips.c (mips_select_section): Add align argument.
* config/mips/mips.h (SELECT_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION): New.
* config/mmix/mmix.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
* config/mmix/mmix.c (mmix_select_section): Remove.
(mmix_unique_section): Remove.
* config/mmix/mmix-protos.h: Update.
* config/pa/pa.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/pa/pa.c (pa_select_section): ... here.
* config/pa/pa64-hpux.h (UNIQUE_SECTION): Remove.
* config/rs6000/rs6000.c (rs6000_elf_select_section): Rename
from rs6000_select_section and make static.
(rs6000_elf_unique_section): Similarly.
(rs6000_xcoff_select_section): From xcoff.h.
(rs6000_xcoff_unique_section): Likewise.
* config/rs6000/rs6000-protos.h: Update.
* config/rs6000/sysv4.h (SELECT_SECTION, UNIQUE_SECTION): Remove.
(TARGET_ASM_SELECT_SECTION, TARGET_ASM_UNIQUE_SECTION): New.
* config/rs6000/xcoff.h: Likewise.
* config/sparc/aout.h (TARGET_ASM_SELECT_SECTION): New.
(SELECT_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_section): ... here.
* config/v850/v850.h (SELECT_SECTION): Move ...
* config/v850/v850.c (v850_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* config/vax/vms.h (SELECT_SECTION): Move ...
* config/vax/vax.c (vms_select_section): ... here.
(TARGET_ASM_SELECT_SECTION): New.
* doc/tm.texi: Update SELECT_SECTION and UNIQUE_SECTION docs
for the target hooks.
From-SVN: r53550
2002-05-17 09:43:41 +02:00
|
|
|
#undef TARGET_ASM_SELECT_SECTION
|
|
|
|
#define TARGET_ASM_SELECT_SECTION machopic_select_section
|
system.h (SELECT_RTX_SECTION): Poison.
* system.h (SELECT_RTX_SECTION): Poison.
* target-def.h (TARGET_ASM_SELECT_RTX_SECTION): New.
* target.h (select_rtx_section): New.
* varasm.c (output_constant_pool): Use it.
(default_select_rtx_section, default_elf_select_rtx_section): New.
* output.h: Declare them.
* config/darwin.h (SELECT_RTX_SECTION): Move ...
* config/darwin.c (machopic_select_rtx_section): ... here.
* config/darwin-protos.h: Update.
* config/nextstep.h (SELECT_RTX_SECTION): Move ...
* config/nextstep.c (machopic_select_rtx_section): ... here.
(nextstep_select_section): Rename variable to avoid macro clash.
* config/nextstep-protos.h: Update.
* config/elfos.h, config/svr3.h, config/arm/aof.h, config/c4x/c4x.h,
config/i386/dgux.h, config/i386/osfrose.h, config/i386/sco5.h,
config/i386/svr3gas.h, config/i860/paragon.h, config/ia64/aix.h,
config/m32r/m32r.h, config/m68k/dpx2.h, config/m68k/lynx.h,
config/m68k/m68k.h, config/m68k/tower-as.h, config/m88k/dgux.h,
config/mcore/mcore-pe.h, config/mips/mips.h, config/mmix/mmix.h,
config/pa/pa-linux.h, config/pa/pa.h, config/romp/romp.h,
config/rs6000/lynx.h, config/rs6000/sysv4.h, config/s390/linux.h,
config/sparc/sysv4.h, config/xtensa/elf.h, config/xtensa/linux.h
(SELECT_RTX_SECTION): Remove.
* config/darwin.h, config/elfos.h, config/nextstep.h,
config/ia64/aix.h, config/ia64/sysv4.h, config/alpha/alpha.c,
config/mips/mips.c, config/romp/romp.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/s390/s390.c, config/sparc/aout.h,
config/sparc/lynx.h, config/xtensa/xtensa.c
(TARGET_ASM_SELECT_RTX_SECTION): New.
* config/alpha/elf.h (SELECT_RTX_SECTION): Move ...
* config/alpha/alpha.c (alpha_elf_select_rtx_section): ... here.
* config/ia64/sysv4.h (SELECT_RTX_SECTION): Move ...
* config/ia64/ia64.c (ia64_select_rtx_section): ... here.
(ia64_aix_select_rtx_section): New.
* config/mips/iris6.h (READONLY_DATA_SECTION_ASM_OP): Undef before
redefining.
* config/mips/mips.c (mips_select_rtx_section): Make static.
Support ELF SHF_MERGE features.
* config/mips/mips-protos.h: Update.
* config/rs6000/xcoff.h (SELECT_RTX_SECTION): Move ...
* config/rs6000/rs6000.c (rs6000_xcoff_select_rtx_section): ... here.
(rs6000_elf_select_rtx_section): Rename from rs6000_select_rtx_section;
make static, fall back to default_elf_select_rtx_section.
* config/rs6000/rs6000-protos.h: Update.
* config/sparc/sparc.h (SELECT_RTX_SECTION): Move ...
* config/sparc/sparc.c (sparc_aout_select_rtx_section): ... here.
* config/sparc/sunos4.h (on_exit): Declare only if IN_LIBGCC2.
* config/romp/romp.c (romp_select_rtx_section): New.
* config/s390/s390.c (s390_select_rtx_section): New.
* config/xtensa/xtensa.c: Include output.h. Shuffle local function
declarations before target macro definition.
(xtensa_emit_call): Use static buffer.
(xtensa_select_rtx_section): New.
* config/xtensa/xtensa.h (MAX_INT_TYPE_SIZE): Remove.
(IMPLICIT_FIX_EXPR, EASY_DIV_EXPR): Remove.
(ASM_OUTPUT_POOL_PROLOGUE): Update call to resolve_unique_section.
* doc/tm.texi (TARGET_ASM_SELECT_RTX_SECTION): Update from
SELECT_RTX_SECTION docs.
From-SVN: r53600
2002-05-19 01:47:22 +02:00
|
|
|
#undef TARGET_ASM_SELECT_RTX_SECTION
|
|
|
|
#define TARGET_ASM_SELECT_RTX_SECTION machopic_select_rtx_section
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2001-04-29 02:12:51 +02:00
|
|
|
#define ASM_DECLARE_UNRESOLVED_REFERENCE(FILE,NAME) \
|
|
|
|
do { \
|
|
|
|
if (FILE) { \
|
2003-03-11 02:41:11 +01:00
|
|
|
if (MACHOPIC_INDIRECT) \
|
2001-04-29 02:12:51 +02:00
|
|
|
fprintf (FILE, "\t.lazy_reference "); \
|
2001-04-12 04:13:00 +02:00
|
|
|
else \
|
2001-04-29 02:12:51 +02:00
|
|
|
fprintf (FILE, "\t.reference "); \
|
|
|
|
assemble_name (FILE, NAME); \
|
|
|
|
fprintf (FILE, "\n"); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2001-06-28 03:34:25 +02:00
|
|
|
#define ASM_DECLARE_CLASS_REFERENCE(FILE,NAME) \
|
|
|
|
do { \
|
|
|
|
if (FILE) { \
|
|
|
|
fprintf (FILE, "\t"); \
|
|
|
|
assemble_name (FILE, NAME); \
|
|
|
|
fprintf (FILE, "=0\n"); \
|
2002-08-21 04:41:51 +02:00
|
|
|
(*targetm.asm_out.globalize_label) (FILE, NAME); \
|
2001-04-12 04:13:00 +02:00
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2002-08-21 04:41:51 +02:00
|
|
|
/* Globalizing directive for a label. */
|
|
|
|
#define GLOBAL_ASM_OP ".globl "
|
|
|
|
#define TARGET_ASM_GLOBALIZE_LABEL darwin_globalize_label
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
#undef ASM_GENERATE_INTERNAL_LABEL
|
|
|
|
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
|
2001-10-24 00:39:06 +02:00
|
|
|
sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM))
|
2001-04-12 04:13:00 +02:00
|
|
|
|
|
|
|
/* Since we have a separate readonly data section, define this so that
|
|
|
|
jump tables end up in text rather than data. */
|
|
|
|
|
|
|
|
#ifndef JUMP_TABLES_IN_TEXT_SECTION
|
|
|
|
#define JUMP_TABLES_IN_TEXT_SECTION 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Symbolic names for various things we might know about a symbol. */
|
|
|
|
|
|
|
|
enum machopic_addr_class {
|
|
|
|
MACHOPIC_UNDEFINED,
|
|
|
|
MACHOPIC_DEFINED_DATA,
|
|
|
|
MACHOPIC_UNDEFINED_DATA,
|
|
|
|
MACHOPIC_DEFINED_FUNCTION,
|
|
|
|
MACHOPIC_UNDEFINED_FUNCTION
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Macros defining the various PIC cases. */
|
|
|
|
|
2003-03-11 02:41:11 +01:00
|
|
|
#define MACHO_DYNAMIC_NO_PIC_P (TARGET_DYNAMIC_NO_PIC)
|
|
|
|
#define MACHOPIC_INDIRECT (flag_pic || MACHO_DYNAMIC_NO_PIC_P)
|
|
|
|
#define MACHOPIC_JUST_INDIRECT (flag_pic == 1 || MACHO_DYNAMIC_NO_PIC_P)
|
|
|
|
#define MACHOPIC_PURE (flag_pic == 2 && ! MACHO_DYNAMIC_NO_PIC_P)
|
2001-04-12 04:13:00 +02:00
|
|
|
|
2002-08-01 01:18:44 +02:00
|
|
|
#undef TARGET_ENCODE_SECTION_INFO
|
system.h (ENCODE_SECTION_INFO): Poison it.
* system.h (ENCODE_SECTION_INFO): Poison it.
* target-def.h (TARGET_ENCODE_SECTION_INFO): New.
* target.h (encode_section_info): New.
* varasm.c (make_decl_rtl, output_constant_def): Use it.
* hooks.c (hook_tree_int_void): New.
* hooks.h: Declare it.
* config/darwin.h, config/alpha/alpha-protos.h, config/alpha/alpha.c,
config/alpha/alpha.h, config/arm/pe.h, config/avr/avr-protos.h,
config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h,
config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris-protos.h,
config/cris/cris.c, config/cris/cris.h, config/i386/cygwin.h,
config/i386/win32.h, config/ia64/ia64-protos.h, config/ia64/ia64.c,
config/ia64/ia64.h, config/m32r/m32r-protos.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/m68hc11/m68hc11-protos.h,
config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h,
config/mcore/mcore-protos.h, config/mcore/mcore.c,
config/mcore/mcore.h, config/mmix/mmix-protos.h, config/mmix/mmix.c,
config/mmix/mmix.h, config/rs6000/rs6000-protos.h,
config/rs6000/sysv4.h, config/stormy16/stormy16-protos.h,
config/stormy16/stormy16.c, config/stormy16/stormy16.h:
Replace ENCODE_SECTION_INFO with TARGET_ENCODE_SECTION_INFO
referencing existing function. Make function static.
* config/a29k/a29k.c, config/a29k/a29k.h, config/arc/arc.c,
config/arc/arc.h, config/arm/arm.c, config/arm/arm.h,
config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c,
config/i370/i370.h, config/i386/i386-interix.h, config/i386/i386.c,
config/i386/i386.h, config/i386/interix.c, config/m88k/m88k.c,
config/m88k/m88k.h, config/mips/mips.c, config/mips/mips.h,
config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c,
config/pa/pa.h, config/romp/romp.c, config/romp/romp.h,
config/rs6000/linux64.h, config/rs6000/xcoff.h, config/s390/s390.c,
config/s390/s390.h, config/sh/sh.c, config/sh/sh.h,
config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c,
config/v850/v850.h, config/vax/vax.c, config/vax/vms.h,
config/xtensa/xtensa.c, config/xtensa/xtensa.h:
Move ENCODE_SECTION_INFO to out-of-line function and add
TARGET_ENCODE_SECTION_INFO.
* config/darwin.h (ASM_DECLARE_FUNCTION_NAME): Use hook, not macro.
(ASM_DECLARE_OBJECT_NAME, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Likewise.
* config/arm/pe.h (EXTRA_SECTIONS, EXTRA_SECTION_FUNCTIONS): Rename
from SUBTARGET_*
(switch_to_section): Replace in_rdata case with in_readonly_data.
* config/h8300/h8300.c (h8300_encode_label): Make static.
* config/h8300/h8300-protos.h: Update.
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Rename
from rs6000_encode_section_info; make static.
(rs6000_xcoff_encode_section_info): New.
* config/v850/v850.c (v850_encode_data_area): Make static.
* config/v850/v850-protos.h: Update.
* config/vax/vax.c: Include flags.h.
(vms_select_section): Fix typo.
* doc/tm.texi (TARGET_ENCODE_SECTION_INFO): Update from previous
ENCODE_SECTION_INFO docs.
From-SVN: r53606
2002-05-19 07:23:27 +02:00
|
|
|
#define TARGET_ENCODE_SECTION_INFO darwin_encode_section_info
|
2002-08-01 01:18:44 +02:00
|
|
|
#undef TARGET_STRIP_NAME_ENCODING
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
#define TARGET_STRIP_NAME_ENCODING darwin_strip_name_encoding
|
2001-06-08 04:28:04 +02:00
|
|
|
|
2001-04-12 04:13:00 +02:00
|
|
|
#define GEN_BINDER_NAME_FOR_STUB(BUF,STUB,STUB_LENGTH) \
|
|
|
|
do { \
|
c-parse.in (yyerror): Const-ification and/or static-ization.
* c-parse.in (yyerror): Const-ification and/or static-ization.
* c-typeck.c (push_member_name): Likewise.
* collect2.c (main): Likewise.
* dbxout.c (dbxout_parms): Likewise.
* diagnostic.c (format_with_decl): Likewise.
* dwarf2out.c (output_ranges): Likewise.
* dwarfout.c (fundamental_type_code): Likewise.
* except.c (dw2_output_call_site_table): Likewise.
* gcc.c (do_spec_1): Likewise.
* genopinit.c (optabs): Likewise.
* objc/objc-act.c (synth_id_with_class_suffix, start_class,
gen_declaration_1, handle_impent): Likewise.
* protoize.c (default_include, in_system_include_dir, abspath):
Likewise.
* sched-vis.c (visualize_stall_cycles): Likewise.
* sdbout.c (plain_type_1, sdbout_end_function,
sdbout_end_epilogue): Likewise.
* varasm.c (decode_reg_name): Likewise.
* 1750a.c (mod_regno_adjust): Likewise.
* alpha.c (alpha_write_one_linkage,
unicosmk_output_default_externs): Likewise.
* arm.c (arm_condition_codes): Likewise.
* arm.h (arm_condition_codes): Likewise.
* avr.c (output_movsisf, encode_section_info): Likewise.
* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
Likewise.
* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* m88k.c (output_function_profiler): Likewise.
* mips.c (mips_output_conditional_branch): Likewise.
* ns32k.c (ns32k_out_reg_names): Likewise.
* ns32k.h (ns32k_out_reg_names): Likewise.
* pj.c (pj_output_rval): Likewise.
* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
* sparc.c (sparc_flat_function_prologue,
sparc_flat_function_epilogue): Likewise.
cp:
* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
Const-ification.
* pt.c (tsubst_decl): Likewise.
f:
* bad.c (ffebad_finish): Const-ification and/or static-ization.
* intrin.c (ffeintrin_cmp_name_): Likewise.
* stc.c (ffestc_R904): Likewise.
java:
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
From-SVN: r45581
2001-09-13 16:37:29 +02:00
|
|
|
const char *const stub_ = (STUB); \
|
2001-04-12 04:13:00 +02:00
|
|
|
char *buffer_ = (BUF); \
|
|
|
|
strcpy (buffer_, stub_); \
|
|
|
|
if (stub_[0] == '"') \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_ + (STUB_LENGTH) - 1, "_binder\""); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_ + (STUB_LENGTH), "_binder"); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
#define GEN_SYMBOL_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
|
|
|
|
do { \
|
c-parse.in (yyerror): Const-ification and/or static-ization.
* c-parse.in (yyerror): Const-ification and/or static-ization.
* c-typeck.c (push_member_name): Likewise.
* collect2.c (main): Likewise.
* dbxout.c (dbxout_parms): Likewise.
* diagnostic.c (format_with_decl): Likewise.
* dwarf2out.c (output_ranges): Likewise.
* dwarfout.c (fundamental_type_code): Likewise.
* except.c (dw2_output_call_site_table): Likewise.
* gcc.c (do_spec_1): Likewise.
* genopinit.c (optabs): Likewise.
* objc/objc-act.c (synth_id_with_class_suffix, start_class,
gen_declaration_1, handle_impent): Likewise.
* protoize.c (default_include, in_system_include_dir, abspath):
Likewise.
* sched-vis.c (visualize_stall_cycles): Likewise.
* sdbout.c (plain_type_1, sdbout_end_function,
sdbout_end_epilogue): Likewise.
* varasm.c (decode_reg_name): Likewise.
* 1750a.c (mod_regno_adjust): Likewise.
* alpha.c (alpha_write_one_linkage,
unicosmk_output_default_externs): Likewise.
* arm.c (arm_condition_codes): Likewise.
* arm.h (arm_condition_codes): Likewise.
* avr.c (output_movsisf, encode_section_info): Likewise.
* darwin.h (GEN_BINDER_NAME_FOR_STUB, GEN_SYMBOL_NAME_FOR_SYMBOL):
Likewise.
* i386.c (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* i386.h (hi_reg_name, qi_reg_name, qi_high_reg_name): Likewise.
* m88k.c (output_function_profiler): Likewise.
* mips.c (mips_output_conditional_branch): Likewise.
* ns32k.c (ns32k_out_reg_names): Likewise.
* ns32k.h (ns32k_out_reg_names): Likewise.
* pj.c (pj_output_rval): Likewise.
* rs6000.c (GEN_LOCAL_LABEL_FOR_SYMBOL): Likewise.
* sparc.c (sparc_flat_function_prologue,
sparc_flat_function_epilogue): Likewise.
cp:
* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
Const-ification.
* pt.c (tsubst_decl): Likewise.
f:
* bad.c (ffebad_finish): Const-ification and/or static-ization.
* intrin.c (ffeintrin_cmp_name_): Likewise.
* stc.c (ffestc_R904): Likewise.
java:
* expr.c (expand_invoke): Const-ification.
* parse.y (patch_method_invocation): Likewise.
From-SVN: r45581
2001-09-13 16:37:29 +02:00
|
|
|
const char *const symbol_ = (SYMBOL); \
|
2001-04-12 04:13:00 +02:00
|
|
|
char *buffer_ = (BUF); \
|
|
|
|
if (name_needs_quotes (symbol_) && symbol_[0] != '"') \
|
|
|
|
{ \
|
|
|
|
sprintf (buffer_, "\"%s\"", symbol_); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_, symbol_); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/* Given a symbol name string, create the lazy pointer version
|
|
|
|
of the symbol name. */
|
|
|
|
|
|
|
|
#define GEN_LAZY_PTR_NAME_FOR_SYMBOL(BUF,SYMBOL,SYMBOL_LENGTH) \
|
|
|
|
do { \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
const char *symbol_ = darwin_strip_name_encoding (SYMBOL); \
|
2001-04-12 04:13:00 +02:00
|
|
|
char *buffer_ = (BUF); \
|
|
|
|
if (symbol_[0] == '"') \
|
|
|
|
{ \
|
system.h (STRIP_NAME_ENCODING): Poison it.
* system.h (STRIP_NAME_ENCODING): Poison it.
* output.h (STRIP_NAME_ENCODING): Remove.
(default_strip_name_encoding): Declare.
* target-def.h (TARGET_STRIP_NAME_ENCODING): New.
* target.h (strip_name_encoding): New.
* varasm.c (default_strip_name_encoding): New.
* dwarf2asm.c, varasm.c, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/arm/pe.c, config/avr/avr.c,
config/cris/cris.c, config/i386/cygwin.h, config/i386/interix.c,
config/i386/winnt.c, config/m32r/m32r.h, config/mcore/mcore-elf.h,
config/mcore/mcore-pe.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/mips/mips.c, config/mn10200/mn10200.h, config/mn10300/mn10300.h,
config/pa/pa.c, config/pa/pa.h, config/pa/som.h,
config/rs6000/rs6000.c, config/rs6000/sysv4.h, config/rs6000/xcoff.h,
config/v850/v850.h: Use the hook, not the macro.
* config/darwin-protos.h, config/darwin.c, config/darwin.h,
config/alpha/alpha.c, config/alpha/alpha.h, config/h8300/h8300.c,
config/h8300/h8300.h, config/i386/cygwin.h, config/i386/i386-interix.h,
config/i386/i386-protos.h, config/i386/win32.h, config/i386/winnt.c,
config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c,
config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h,
config/pa/pa.c, config/rs6000/rs6000.c, config/rs6000/sysv4.h,
config/rs6000/xcoff.h, config/sh/sh.c, config/sh/sh.h,
config/v850/v850.c, config/v850/v850.h:
Move STRIP_NAME_ENCODING to out-of-line function and add
TARGET_STRIP_NAME_ENCODING.
* config/arm/arm.c, config/arm/arm.h, config/mmix/mmix-protos.h,
config/mmix/mmix.c, config/mmix/mmix.h: Replace STRIP_NAME_ENCODING
with TARGET_STRIP_NAME_ENCODING referencing existing function;
make function static.
* xcoffout.c: Include target.h
* Makefile.in (xcoffout.o): Update.
* config/avr/avr.c (avr_encode_section_info): Correct prototype.
* config/avr/avr.h (STRIP_NAME_ENCODING): Remove.
* config/rs6000/rs6000.c (rs6000_xcoff_unique_section): Mark
reloc argument unused.
* config/sh/sh.c (TARGET_ENCODE_SECTION_INFO): New.
* doc/tm.texi (TARGET_STRIP_NAME_ENCODING): Update from previous
STRIP_NAME_ENCODING docs.
From-SVN: r53615
2002-05-19 09:55:48 +02:00
|
|
|
strcpy (buffer_, "\"L"); \
|
2001-04-12 04:13:00 +02:00
|
|
|
strcpy (buffer_ + 2, symbol_ + 1); \
|
|
|
|
strcpy (buffer_ + (SYMBOL_LENGTH), "$lazy_ptr\""); \
|
|
|
|
} \
|
|
|
|
else if (name_needs_quotes (symbol_)) \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_, "\"L"); \
|
|
|
|
strcpy (buffer_ + 2, symbol_); \
|
|
|
|
strcpy (buffer_ + (SYMBOL_LENGTH) + 2, "$lazy_ptr\""); \
|
|
|
|
} \
|
|
|
|
else \
|
|
|
|
{ \
|
|
|
|
strcpy (buffer_, "L"); \
|
|
|
|
strcpy (buffer_ + 1, symbol_); \
|
|
|
|
strcpy (buffer_ + (SYMBOL_LENGTH) + 1, "$lazy_ptr"); \
|
|
|
|
} \
|
|
|
|
} while (0)
|
|
|
|
|
2001-10-22 16:43:31 +02:00
|
|
|
#define TARGET_ASM_EXCEPTION_SECTION darwin_exception_section
|
2001-10-17 01:22:27 +02:00
|
|
|
|
2001-10-22 16:43:31 +02:00
|
|
|
#define TARGET_ASM_EH_FRAME_SECTION darwin_eh_frame_section
|
|
|
|
|
2002-08-01 01:18:44 +02:00
|
|
|
#undef ASM_PREFERRED_EH_DATA_FORMAT
|
2001-10-17 01:22:27 +02:00
|
|
|
#define ASM_PREFERRED_EH_DATA_FORMAT(CODE,GLOBAL) \
|
2002-09-13 05:44:54 +02:00
|
|
|
(((CODE) == 2 && (GLOBAL) == 1) \
|
|
|
|
? (DW_EH_PE_pcrel | DW_EH_PE_indirect) : \
|
|
|
|
((CODE) == 1 || (GLOBAL) == 0) ? DW_EH_PE_pcrel : DW_EH_PE_absptr)
|
|
|
|
|
|
|
|
#define ASM_OUTPUT_DWARF_DELTA(FILE,SIZE,LABEL1,LABEL2) \
|
|
|
|
darwin_asm_output_dwarf_delta (FILE, SIZE, LABEL1, LABEL2)
|
|
|
|
|
|
|
|
#define TARGET_TERMINATE_DW2_EH_FRAME_INFO false
|
2001-10-17 01:22:27 +02:00
|
|
|
|
2003-01-01 13:27:02 +01:00
|
|
|
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
|
|
|
|
do { \
|
|
|
|
c_register_pragma (0, "mark", darwin_pragma_ignore); \
|
|
|
|
c_register_pragma (0, "options", darwin_pragma_options); \
|
|
|
|
c_register_pragma (0, "segment", darwin_pragma_ignore); \
|
|
|
|
c_register_pragma (0, "unused", darwin_pragma_unused); \
|
2001-06-28 21:55:53 +02:00
|
|
|
} while (0)
|
2002-07-17 02:19:30 +02:00
|
|
|
|
|
|
|
#undef ASM_APP_ON
|
|
|
|
#define ASM_APP_ON ""
|
|
|
|
#undef ASM_APP_OFF
|
|
|
|
#define ASM_APP_OFF ""
|