This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils 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: Fix the weak undefined symbols with non-default visibility


On Sun, May 04, 2003 at 09:02:22PM -0700, H. J. Lu wrote:
> 	* elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
> 	relocation entries for weak undefined symbols with non-default
> 	visibility.
> 	(elf_i386_relocate_section): Initialize the GOT entries and
> 	skip R_386_32/R_386_PC32 for weak undefined symbols with
> 	non-default visibility.
>  
> 	* elfxx-ia64.c (allocate_fptr): Don't allocate function
> 	descriptors for weak undefined symbols with non-default
> 	visibility.
> 	(allocate_dynrel_entries): Don't allocate relocation entries
> 	for symbols resolved to 0.
> 	(set_got_entry): Don't install dynamic relocation for weak
> 	undefined symbols with non-default visibility.
> 	(set_pltoff_entry): Likewise.
> 
> 	* elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
> 	with non-default visibility.
> 	(elf_link_output_extsym): Don't make weak undefined symbols
> 	with non-default visibility dynamic.
> 
> 	* ld-elfvsb/main.c: Updated.
> 	* ld-elfvsb/sh1.c: Likewise.

OK, looks good to me.

> +++ binutils/bfd/elfxx-ia64.c	2003-04-08 09:26:07.000000000 -0700
> +  resolved_zero = dyn_i->h
> +    && ELF_ST_VISIBILITY (dyn_i->h->other)
> +    && dyn_i->h->root.type == bfd_link_hash_undefweak;

Add parens so that emacs auto-format works.

  resolved_zero = (dyn_i->h
		   && ELF_ST_VISIBILITY (dyn_i->h->other)
		   && dyn_i->h->root.type == bfd_link_hash_undefweak);

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre


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