This is the mail archive of the binutils@sourceware.org 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: [MIPS] Reserve a .gnu_attribute value


> diff --git a/binutils/readelf.c b/binutils/readelf.c
> index 55faf83..0471e73 100644
> --- a/binutils/readelf.c
> +++ b/binutils/readelf.c
> @@ -13196,7 +13196,8 @@ display_sparc_gnu_attribute (unsigned char * p,
>  static void
>  print_mips_fp_abi_value (int val)
>  {
> -  switch (val)
> +  /* Mask out the compatibility value, if any.  */
> +  switch (val & ~Val_GNU_MIPS_ABI_FP_NAN2008)
>      {
>      case Val_GNU_MIPS_ABI_FP_ANY:
>        printf (_("Hard or soft float\n"));

AIUI an attempt to link 4,1 code with 4,9 code would report the 9 as an
unknown attribute, whereas this part of the patch would make readelf
annotate 4,9 in the same way as 4,1.  I think that might be too confusing.
How about something like:

  if (val & Val_GNU_MIPS_ABI_FP_NAN2008)
    printf (_("Legacy NAN2008 flag + "));

before the switch?

"Moore, Catherine" <Catherine_Moore@mentor.com> writes:
> index dd8b228..dd469d2 100644
> --- a/ld/testsuite/ld-mips-elf/mips-elf.exp
> +++ b/ld/testsuite/ld-mips-elf/mips-elf.exp
> @@ -674,17 +674,18 @@ foreach firstfpabi [list 0 1 2 3 4 5 6 7 ] {
>    }
>  }
>  foreach firstfpabi [list 4 5 6 7 ] {
> -  foreach secondfpabi [list 0 1 2 3 8 9] {
> +  foreach secondfpabi [list 0 1 2 3 8 ] {
>      run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}" $o32flagslist
>    }
>  }
>  foreach firstfpabi [list 0 1 2 3 ] {
> -  foreach secondfpabi [list 0 1 2 3 8 9] {
> +  foreach secondfpabi [list 0 1 2 3 8 ] {
>      run_dump_test "attr-gnu-4-${firstfpabi}${secondfpabi}"
>    }
>  }

I think it'd make sense to keep a test for 9 (or some other value in
the range 9-15).

Thanks,
Richard


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