This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [MIPS] Reserve a .gnu_attribute value
- From: Richard Sandiford <rdsandiford at googlemail dot com>
- To: "Moore\, Catherine" <Catherine_Moore at mentor dot com>
- Cc: "Maciej W. Rozycki" <macro at linux-mips dot org>, Richard Sandiford <richard dot sandiford at arm dot com>, "binutils\ at sourceware dot org" <binutils at sourceware dot org>, "andrew dot bennett\ at imgtec dot com" <andrew dot bennett at imgtec dot com>, Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- Date: Sat, 18 Jul 2015 11:20:19 +0100
- Subject: Re: [MIPS] Reserve a .gnu_attribute value
- Authentication-results: sourceware.org; auth=none
- References: <FD3DCEAC5B03E9408544A1E416F112420192C36A82 at NA-MBX-01 dot mgc dot mentorg dot com> <87mvzqbzne dot fsf at e105548-lin dot cambridge dot arm dot com> <FD3DCEAC5B03E9408544A1E416F112420192C3C84C at NA-MBX-01 dot mgc dot mentorg dot com> <87wpyatqvn dot fsf at googlemail dot com> <alpine dot LFD dot 2 dot 11 dot 1507082004480 dot 31060 at eddie dot linux-mips dot org> <FD3DCEAC5B03E9408544A1E416F112420192C3C93B at NA-MBX-01 dot mgc dot mentorg dot com> <alpine dot LFD dot 2 dot 11 dot 1507091908050 dot 31060 at eddie dot linux-mips dot org> <FD3DCEAC5B03E9408544A1E416F112420192C8A2E8 at NA-MBX-04 dot mgc dot mentorg dot com>
> 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