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]

Re: [patches] Re: intel gas and `--32'


Thanks for taking care for this!
> -#ifdef OBJ_ELF
> -    case OPTION_32:
> +
>      case OPTION_64:
>        {
>  	const char **list, **l;
>  
> -	default_arch = c == OPTION_32 ? "i386" : "x86_64";
>  	list = bfd_target_list ();
>  	for (l = list; *l != NULL; l++)
> -	  {
> -	    if (c == OPTION_32)
> -	      {
> -		if (strcmp (*l, "elf32-i386") == 0)
> -		  break;
> -	      }
> -	    else
> -	      {
> -		if (strcmp (*l, "elf64-x86-64") == 0)
> -		  break;
> -	      }
> -	  }
> +	  if (strcmp (*l, "elf64-x86-64") == 0)
> +	    {
> +	      default_arch = "x86_64";
> +	      break;
> +	    }
>  	if (*l == NULL)
> -	  as_fatal (_("No compiled in support for %d bit object file format"),
> -		    c == OPTION_32 ? 32 : 64);
> +	  as_fatal (_("No compiled in support for x86_64"));
>  	free (list);
>        }
>        break;
>  #endif
> +
> +    case OPTION_32:
> +      default_arch = "i386";
> +      break;
It seems to me that this breaks x86_64 target - specifying --32 option
will no longer make it to switch into elf32 format and if you build
gas w/o 32bit elf support --32 option will not produce error message.

Honza

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