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: Re: ld's --no-undefined-version and '*' in pattern


On Fri, Oct 17, 2003 at 08:32:11AM -0700, H. J. Lu wrote:
> On Fri, Oct 17, 2003 at 10:13:59AM +0200, Jan Beulich wrote:
> > Thank you, that was fast. An additional note, though: While in most
> > cases (high-level languages) assuming * and certain other characters are
> > invalid for symbol names, this assumption does not generally hold, which
> > is why I'd recommend removing the other occasion of the check for that
> > character, too: The Intel IA64 assembler, as an example, permits using
> > any character in symbol names through their .alias directive. Again,
> > thanks for the quick reaction, Jan
> > 
> 
> I forgot about .alias :-). BTW, the GNU ia64 assembler should support
> .alias now. Let me know if it is not working.
> 
> I will check in this patch shortly.
> 
> 
> H.J.
> ----
> 2003-10-17  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't skip
> 	symbols with '*'.

This looks wrong.
d->pattern is a glob pattern, not necessarily a symbol name.
In glob patterns, * is special. If you want to export
foo*bar symbol, you can write foo\*bar, foo[*]bar or something similar
in pattern. But in that case the size_dynamic_sections code doesn't
work properly anyway.
See my patch from yesterday and comments about it.

> --- bfd/elflink.h.star	2003-10-16 23:22:27.000000000 -0700
> +++ bfd/elflink.h	2003-10-17 08:26:44.000000000 -0700
> @@ -2059,7 +2059,7 @@ NAME(bfd_elf,size_dynamic_sections) (bfd
>        /* Make all global versions with definiton.  */
>        for (t = verdefs; t != NULL; t = t->next)
>  	for (d = t->globals; d != NULL; d = d->next)
> -	  if (!d->symver && strchr (d->pattern, '*') == NULL)
> +	  if (!d->symver)
>  	    {
>  	      const char *verstr, *name;
>  	      size_t namelen, verlen, newlen;

	Jakub


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