Deleted Added
full compact
varasm.c (169690) varasm.c (215840)
1/* Output variables, constants and external declarations, for GNU compiler.
2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under

--- 112 unchanged lines hidden (view full) ---

121static int compare_constant (const tree, const tree);
122static tree copy_constant (tree);
123static void output_constant_def_contents (rtx);
124static void output_addressed_constants (tree);
125static unsigned HOST_WIDE_INT array_size_for_constructor (tree);
126static unsigned min_align (unsigned, unsigned);
127static void output_constructor (tree, unsigned HOST_WIDE_INT, unsigned int);
128static void globalize_decl (tree);
1/* Output variables, constants and external declarations, for GNU compiler.
2 Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4 Free Software Foundation, Inc.
5
6This file is part of GCC.
7
8GCC is free software; you can redistribute it and/or modify it under

--- 112 unchanged lines hidden (view full) ---

121static int compare_constant (const tree, const tree);
122static tree copy_constant (tree);
123static void output_constant_def_contents (rtx);
124static void output_addressed_constants (tree);
125static unsigned HOST_WIDE_INT array_size_for_constructor (tree);
126static unsigned min_align (unsigned, unsigned);
127static void output_constructor (tree, unsigned HOST_WIDE_INT, unsigned int);
128static void globalize_decl (tree);
129static void maybe_assemble_visibility (tree);
130#ifdef BSS_SECTION_ASM_OP
131#ifdef ASM_OUTPUT_BSS
132static void asm_output_bss (FILE *, tree, const char *,
133 unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT);
134#endif
135#ifdef ASM_OUTPUT_ALIGNED_BSS
136static void asm_output_aligned_bss (FILE *, tree, const char *,
137 unsigned HOST_WIDE_INT, int)

--- 1814 unchanged lines hidden (view full) ---

1952 testing, on all platforms, we make sure that the ASM_OUT_FILE is
1953 open. If it's not, we should not be calling this function. */
1954 gcc_assert (asm_out_file);
1955
1956#ifdef ASM_OUTPUT_EXTERNAL
1957 if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
1958 return;
1959
129#ifdef BSS_SECTION_ASM_OP
130#ifdef ASM_OUTPUT_BSS
131static void asm_output_bss (FILE *, tree, const char *,
132 unsigned HOST_WIDE_INT, unsigned HOST_WIDE_INT);
133#endif
134#ifdef ASM_OUTPUT_ALIGNED_BSS
135static void asm_output_aligned_bss (FILE *, tree, const char *,
136 unsigned HOST_WIDE_INT, int)

--- 1814 unchanged lines hidden (view full) ---

1951 testing, on all platforms, we make sure that the ASM_OUT_FILE is
1952 open. If it's not, we should not be calling this function. */
1953 gcc_assert (asm_out_file);
1954
1955#ifdef ASM_OUTPUT_EXTERNAL
1956 if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
1957 return;
1958
1960 if (flag_unit_at_a_time)
1961 pending_assemble_externals = tree_cons (0, decl,
1962 pending_assemble_externals);
1963 else
1964 assemble_external_real (decl);
1959 /* We want to output external symbols at very last to check if they
1960 are references or not. */
1961 pending_assemble_externals = tree_cons (0, decl,
1962 pending_assemble_externals);
1965#endif
1966}
1967
1968/* Similar, for calling a library function FUN. */
1969
1970void
1971assemble_external_libcall (rtx fun)
1972{

--- 3086 unchanged lines hidden (view full) ---

5059#else
5060 warning (OPT_Wattributes, "visibility attribute not supported "
5061 "in this configuration; ignored");
5062#endif
5063}
5064
5065/* A helper function to call assemble_visibility when needed for a decl. */
5066
1963#endif
1964}
1965
1966/* Similar, for calling a library function FUN. */
1967
1968void
1969assemble_external_libcall (rtx fun)
1970{

--- 3086 unchanged lines hidden (view full) ---

5057#else
5058 warning (OPT_Wattributes, "visibility attribute not supported "
5059 "in this configuration; ignored");
5060#endif
5061}
5062
5063/* A helper function to call assemble_visibility when needed for a decl. */
5064
5067static void
5065int
5068maybe_assemble_visibility (tree decl)
5069{
5070 enum symbol_visibility vis = DECL_VISIBILITY (decl);
5071
5072 if (vis != VISIBILITY_DEFAULT)
5066maybe_assemble_visibility (tree decl)
5067{
5068 enum symbol_visibility vis = DECL_VISIBILITY (decl);
5069
5070 if (vis != VISIBILITY_DEFAULT)
5073 targetm.asm_out.visibility (decl, vis);
5071 {
5072 targetm.asm_out.visibility (decl, vis);
5073 return 1;
5074 }
5075 else
5076 return 0;
5074}
5075
5076/* Returns 1 if the target configuration supports defining public symbols
5077 so that one of them will be chosen at link time instead of generating a
5078 multiply-defined symbol error, whether through the use of weak symbols or
5079 a target-specific mechanism for having duplicates discarded. */
5080
5081int

--- 1137 unchanged lines hidden (view full) ---

6219/* Output the definitions of all object_blocks. */
6220
6221void
6222output_object_blocks (void)
6223{
6224 htab_traverse (object_block_htab, output_object_block_htab, NULL);
6225}
6226
5077}
5078
5079/* Returns 1 if the target configuration supports defining public symbols
5080 so that one of them will be chosen at link time instead of generating a
5081 multiply-defined symbol error, whether through the use of weak symbols or
5082 a target-specific mechanism for having duplicates discarded. */
5083
5084int

--- 1137 unchanged lines hidden (view full) ---

6222/* Output the definitions of all object_blocks. */
6223
6224void
6225output_object_blocks (void)
6226{
6227 htab_traverse (object_block_htab, output_object_block_htab, NULL);
6228}
6229
6230/* Emit text to declare externally defined symbols. It is needed to
6231 properly support non-default visibility. */
6232void
6233default_elf_asm_output_external (FILE *file ATTRIBUTE_UNUSED,
6234 tree decl,
6235 const char *name ATTRIBUTE_UNUSED)
6236{
6237 /* We output the name if and only if TREE_SYMBOL_REFERENCED is
6238 set in order to avoid putting out names that are never really
6239 used. */
6240 if (TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl))
6241 && targetm.binds_local_p (decl))
6242 maybe_assemble_visibility (decl);
6243}
6244
6227#include "gt-varasm.h"
6245#include "gt-varasm.h"