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


On Tue, Dec 12, 2006 at 09:28:11AM -0800, David Daney wrote:
> 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):
> 

The easy work around is to add

#undef ASM_OUTPUT_EXTERNAL

to mips.h. But Linux/mips won't get the bug fix. The better way
is to rewrite mips_output_external and remove mips_file_end like
what I did for ia64.


H.J.


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