This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR middle-end/20218: Can't use __attribute__ ((visibility ("hidden"))) to hide a symbol


H. J. Lu wrote:
Here is the updated patch. It removes process_pending_assemble_externals
call in cgraph_optimize and uses ASM_OUTPUT_EXTERNAL to output hidden
references or definitions.

I changed maybe_assemble_visibility to return int so that we only
generate ".globl" directive for hidden references, which is needed
for Intel ia64 assembler.


H.J. ---- 2006-12-05 H.J. Lu <hongjiu.lu@intel.com>

	PR middle-end/17982
	PR middle-end/20218
	* cgraphunit.c (cgraph_optimize): Remove call to
	process_pending_assemble_externals.

* config/elfos.h (ASM_OUTPUT_EXTERNAL): New.

* config/ia64/hpux.h (TARGET_ASM_FILE_END): Removed.

	* config/ia64/ia64.c (ia64_asm_output_external): Rewritten.
	(ia64_hpux_add_extern_decl): Removed.
	(ia64_hpux_file_end): Likewise.
	(extern_func_list): Likewise.
	(extern_func_head): Likewise.

	* output.h (assemble_external): Update comments.
	(default_elf_asm_output_external): New.
	(maybe_assemble_visibility): New.

	* varasm.c (maybe_assemble_visibility): Make it extern and
	return int.
	(default_elf_asm_output_external): New.


H. J.,


I looks like this is going to cause bootstrap failure on mipsel-linux (once I get to a stage with -Werror):

In file included from ./tm.h:16,
from ../../gcc/gcc/alias.c:26:
../../gcc/gcc/config/mips/mips.h:2522:1: warning: "ASM_OUTPUT_EXTERNAL" redefined
In file included from ./tm.h:13,
from ../../gcc/gcc/alias.c:26:
../../gcc/gcc/config/elfos.h:514:1: warning: this is the location of the previous definition
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber ../../gcc/gcc/bb-reorder.c -o bb-reorder.o
In file included from ./tm.h:16,
from ../../gcc/gcc/bb-reorder.c:71:
../../gcc/gcc/config/mips/mips.h:2522:1: warning: "ASM_OUTPUT_EXTERNAL" redefined
In file included from ./tm.h:13,
from ../../gcc/gcc/bb-reorder.c:71:
../../gcc/gcc/config/elfos.h:514:1: warning: this is the location of the previous definition
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber ../../gcc/gcc/bitmap.c -o bitmap.o
In file included from ./tm.h:16,
from ../../gcc/gcc/bitmap.c:25:
../../gcc/gcc/config/mips/mips.h:2522:1: warning: "ASM_OUTPUT_EXTERNAL" redefined
In file included from ./tm.h:13,
from ../../gcc/gcc/bitmap.c:25:
../../gcc/gcc/config/elfos.h:514:1: warning: this is the location of the previous definition
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber ../../gcc/gcc/builtins.c -o builtins.o
In file included from ./tm.h:16,
from ../../gcc/gcc/builtins.c:25:
../../gcc/gcc/config/mips/mips.h:2522:1: warning: "ASM_OUTPUT_EXTERNAL" redefined
In file included from ./tm.h:13,
from ../../gcc/gcc/builtins.c:25:
../../gcc/gcc/config/elfos.h:514:1: warning: this is the location of the previous definition
gcc -c -g -fkeep-inline-functions -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../libdecnumber ../../gcc/gcc/caller-save.c -o caller-save.o
In file included from ./tm.h:16,
from ../../gcc/gcc/caller-save.c:25:
../../gcc/gcc/config/mips/mips.h:2522:1: warning: "ASM_OUTPUT_EXTERNAL" redefined
In file included from ./tm.h:13,
from ../../gcc/gcc/caller-save.c:25:
../../gcc/gcc/config/elfos.h:514:1: warning: this is the location of the previous definition



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]