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: Support '*' in pattern and fix a typo


On Fri, Oct 24, 2003 at 08:39:09AM -0700, H. J. Lu wrote:
> On Fri, Oct 24, 2003 at 08:43:17AM +0200, Jakub Jelinek wrote:
> > On Fri, Oct 24, 2003 at 12:07:44AM -0700, H. J. Lu wrote:
> > > Here is another update to fix a typo:
> > > 
> > > +-      if (fnmatch (expr->pattern, sym, 0) == 0)
> > > ++      if (fnmatch (expr->pattern, s, 0) == 0)
> > > 
> > > Otherwise, extern "C++" won't work.
> > 
> > Oops, sorry.  Unless you check the whole patch RSN, please check this
> > in separately so that the tree is not broken for too long.
> > 
> 
> There are 2 other typos. I will check in the following to fix it.
> 
> 
> H.J.
> ----
> 2003-10-24  H.J. Lu  <hongjiu.lu@intel.com>
> 
> 	* ldlang.c (lang_vers_match): Check demangled symbols.
> 
> --- ldlang.c.dem	2003-10-24 00:01:57.000000000 -0700
> +++ ldlang.c	2003-10-24 08:34:10.000000000 -0700
> @@ -4993,7 +4993,7 @@ lang_vers_match (struct bfd_elf_version_
>        if (!cxx_sym)
>  	cxx_sym = sym;
>      }
> -  if (head->mask & BFD_ELF_VERSION_JAVA_TYPE)
> +  else if (head->mask & BFD_ELF_VERSION_JAVA_TYPE)
>      {
>        java_sym = cplus_demangle (sym, DMGL_JAVA);
>        if (!java_sym)

This hunk doesn't look right.
Although each symbol can be either C, or C++, or Java, not a combination of
them, head->mask can have more bits set and it needs to set up
both cxx_sym and java_sym if both C++ and Java symbols need to be checked.

> @@ -5023,7 +5023,7 @@ lang_vers_match (struct bfd_elf_version_
>  	      {
>  		e.symbol = cxx_sym;
>  		expr = htab_find (head->htab, &e);
> -		while (expr && strcmp (expr->symbol, sym) == 0)
> +		while (expr && strcmp (expr->symbol, cxx_sym) == 0)
>  		  if (expr->mask == BFD_ELF_VERSION_CXX_TYPE)
>  		    goto out_ret;
>  		else
> @@ -5035,7 +5035,7 @@ lang_vers_match (struct bfd_elf_version_
>  	      {
>  		e.symbol = java_sym;
>  		expr = htab_find (head->htab, &e);
> -		while (expr && strcmp (expr->symbol, sym) == 0)
> +		while (expr && strcmp (expr->symbol, java_sym) == 0)
>  		  if (expr->mask == BFD_ELF_VERSION_JAVA_TYPE)
>  		    goto out_ret;
>  		else

These were pastos, sorry.

	Jakub


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