From 005d79fd6101dae0aaf62a1b0cee399efcbd0e21 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 26 Sep 2016 18:04:57 +0930 Subject: PowerPC .gnu.attributes This patch extends Tag_GNU_Power_ABI_FP to cover long double ABIs, makes the assembler warn about undefined tag values, and removes similar warnings from the linker. I think it is better to not warn in the linker about undefined tag values as future extensions to the tags then won't result in likely bogus warnings. This is consistent with the fact that an older linker won't warn on an entirely new tag. include/ * elf/ppc.h (Tag_GNU_Power_ABI_FP): Comment. bfd/ * elf-bfd.h (_bfd_elf_ppc_merge_fp_attributes): Declare. * elf32-ppc.c (_bfd_elf_ppc_merge_fp_attributes): New function. (ppc_elf_merge_obj_attributes): Use it. Don't copy first file attributes, merge them. Don't warn about undefined tag bits, or copy unknown values to output. * elf64-ppc.c (ppc64_elf_merge_private_bfd_data): Call _bfd_elf_ppc_merge_fp_attributes. binutils/ * readelf.c (display_power_gnu_attribute): Catch truncated section for all powerpc attributes. Display long double ABI. Don't capitalize words, except for names. Show known bits of tag values when some unknown bits are present. Whitespace fixes. gas/ * config/tc-ppc.c (ppc_elf_gnu_attribute): New function. (md_pseudo_table ): Handle "gnu_attribute". ld/ * testsuite/ld-powerpc/attr-gnu-4-4.s: Delete. * testsuite/ld-powerpc/attr-gnu-4-14.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-24.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-34.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-41.d: Delete. * testsuite/ld-powerpc/attr-gnu-4-32.d: Adjust expected warning. * testsuite/ld-powerpc/attr-gnu-8-23.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-01.d: Adjust expected output. * testsuite/ld-powerpc/attr-gnu-4-02.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-03.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-10.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-11.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-20.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-22.d: Likewise. * testsuite/ld-powerpc/attr-gnu-4-33.d: Likewise. * testsuite/ld-powerpc/attr-gnu-8-11.d: Likewise. * testsuite/ld-powerpc/powerpc.exp: Don't run deleted tests. --- ld/ChangeLog | 20 ++++++++++++++++++++ ld/testsuite/ld-powerpc/attr-gnu-4-01.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-02.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-03.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-10.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-11.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-14.d | 6 ------ ld/testsuite/ld-powerpc/attr-gnu-4-20.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-22.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-24.d | 6 ------ ld/testsuite/ld-powerpc/attr-gnu-4-32.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-33.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-4-34.d | 6 ------ ld/testsuite/ld-powerpc/attr-gnu-4-4.s | 1 - ld/testsuite/ld-powerpc/attr-gnu-4-41.d | 6 ------ ld/testsuite/ld-powerpc/attr-gnu-8-11.d | 2 +- ld/testsuite/ld-powerpc/attr-gnu-8-23.d | 2 +- ld/testsuite/ld-powerpc/powerpc.exp | 4 ---- 18 files changed, 31 insertions(+), 40 deletions(-) delete mode 100644 ld/testsuite/ld-powerpc/attr-gnu-4-14.d delete mode 100644 ld/testsuite/ld-powerpc/attr-gnu-4-24.d delete mode 100644 ld/testsuite/ld-powerpc/attr-gnu-4-34.d delete mode 100644 ld/testsuite/ld-powerpc/attr-gnu-4-4.s delete mode 100644 ld/testsuite/ld-powerpc/attr-gnu-4-41.d (limited to 'ld') diff --git a/ld/ChangeLog b/ld/ChangeLog index 56e6133..3f43b64 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,23 @@ +2016-09-26 Alan Modra + + * testsuite/ld-powerpc/attr-gnu-4-4.s: Delete. + * testsuite/ld-powerpc/attr-gnu-4-14.d: Delete. + * testsuite/ld-powerpc/attr-gnu-4-24.d: Delete. + * testsuite/ld-powerpc/attr-gnu-4-34.d: Delete. + * testsuite/ld-powerpc/attr-gnu-4-41.d: Delete. + * testsuite/ld-powerpc/attr-gnu-4-32.d: Adjust expected warning. + * testsuite/ld-powerpc/attr-gnu-8-23.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-4-01.d: Adjust expected output. + * testsuite/ld-powerpc/attr-gnu-4-02.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-4-03.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-4-10.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-4-11.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-4-20.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-4-22.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-4-33.d: Likewise. + * testsuite/ld-powerpc/attr-gnu-8-11.d: Likewise. + * testsuite/ld-powerpc/powerpc.exp: Don't run deleted tests. + 2016-09-23 Akihiko Odaki PR ld/20595 diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-01.d b/ld/testsuite/ld-powerpc/attr-gnu-4-01.d index 212e0c4..62dbec0 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-01.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-01.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Hard float + Tag_GNU_Power_ABI_FP: hard float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-02.d b/ld/testsuite/ld-powerpc/attr-gnu-4-02.d index 9bd42b5..ae270f1 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-02.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-02.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Soft float + Tag_GNU_Power_ABI_FP: soft float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-03.d b/ld/testsuite/ld-powerpc/attr-gnu-4-03.d index 03b0c3c..d79febf 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-03.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-03.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Single-precision hard float + Tag_GNU_Power_ABI_FP: single-precision hard float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-10.d b/ld/testsuite/ld-powerpc/attr-gnu-4-10.d index 93297c2..1e01549 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-10.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-10.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Hard float + Tag_GNU_Power_ABI_FP: hard float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-11.d b/ld/testsuite/ld-powerpc/attr-gnu-4-11.d index fb2b76e..5027b78 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-11.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-11.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Hard float + Tag_GNU_Power_ABI_FP: hard float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-14.d b/ld/testsuite/ld-powerpc/attr-gnu-4-14.d deleted file mode 100644 index 3bb6661..0000000 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-14.d +++ /dev/null @@ -1,6 +0,0 @@ -#source: attr-gnu-4-1.s -#source: attr-gnu-4-4.s -#as: -a32 -#ld: -r -melf32ppc -#warning: Warning: .* uses unknown floating point ABI 4 -#target: powerpc*-*-* diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-20.d b/ld/testsuite/ld-powerpc/attr-gnu-4-20.d index 3d83893..fca9de6 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-20.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-20.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Soft float + Tag_GNU_Power_ABI_FP: soft float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-22.d b/ld/testsuite/ld-powerpc/attr-gnu-4-22.d index f6bd198..80a209c 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-22.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-22.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Soft float + Tag_GNU_Power_ABI_FP: soft float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-24.d b/ld/testsuite/ld-powerpc/attr-gnu-4-24.d deleted file mode 100644 index fc17f91..0000000 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-24.d +++ /dev/null @@ -1,6 +0,0 @@ -#source: attr-gnu-4-2.s -#source: attr-gnu-4-4.s -#as: -a32 -#ld: -r -melf32ppc -#warning: Warning: .* uses unknown floating point ABI 4 -#target: powerpc*-*-* diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-32.d b/ld/testsuite/ld-powerpc/attr-gnu-4-32.d index 3b7cb29..924a3af 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-32.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-32.d @@ -2,5 +2,5 @@ #source: attr-gnu-4-2.s #as: -a32 #ld: -r -melf32ppc -#warning: Warning: .* uses soft float, .* uses single-precision hard float +#warning: Warning: .* uses hard float, .* uses soft float #target: powerpc*-*-* diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-33.d b/ld/testsuite/ld-powerpc/attr-gnu-4-33.d index 88367ae..6951b42 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-33.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-4-33.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_FP: Single-precision hard float + Tag_GNU_Power_ABI_FP: single-precision hard float, unspecified long double diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-34.d b/ld/testsuite/ld-powerpc/attr-gnu-4-34.d deleted file mode 100644 index 6f6e1fe..0000000 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-34.d +++ /dev/null @@ -1,6 +0,0 @@ -#source: attr-gnu-4-3.s -#source: attr-gnu-4-4.s -#as: -a32 -#ld: -r -melf32ppc -#warning: Warning: .* uses unknown floating point ABI 4 -#target: powerpc*-*-* diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-4.s b/ld/testsuite/ld-powerpc/attr-gnu-4-4.s deleted file mode 100644 index 3ff129a..0000000 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-4.s +++ /dev/null @@ -1 +0,0 @@ -.gnu_attribute 4,4 diff --git a/ld/testsuite/ld-powerpc/attr-gnu-4-41.d b/ld/testsuite/ld-powerpc/attr-gnu-4-41.d deleted file mode 100644 index b909476..0000000 --- a/ld/testsuite/ld-powerpc/attr-gnu-4-41.d +++ /dev/null @@ -1,6 +0,0 @@ -#source: attr-gnu-4-4.s -#source: attr-gnu-4-1.s -#as: -a32 -#ld: -r -melf32ppc -#warning: Warning: .* uses unknown floating point ABI 4 -#target: powerpc*-*-* diff --git a/ld/testsuite/ld-powerpc/attr-gnu-8-11.d b/ld/testsuite/ld-powerpc/attr-gnu-8-11.d index 7e49d4a..06d7e88 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-8-11.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-8-11.d @@ -7,4 +7,4 @@ Attribute Section: gnu File Attributes - Tag_GNU_Power_ABI_Vector: Generic + Tag_GNU_Power_ABI_Vector: generic diff --git a/ld/testsuite/ld-powerpc/attr-gnu-8-23.d b/ld/testsuite/ld-powerpc/attr-gnu-8-23.d index b22e4bd..b442884 100644 --- a/ld/testsuite/ld-powerpc/attr-gnu-8-23.d +++ b/ld/testsuite/ld-powerpc/attr-gnu-8-23.d @@ -2,5 +2,5 @@ #source: attr-gnu-8-3.s #as: -a32 #ld: -r -melf32ppc -#warning: Warning: .* uses vector ABI "SPE", .* uses "AltiVec" +#warning: Warning: .* uses AltiVec vector ABI, .* uses SPE vector ABI #target: powerpc*-*-* diff --git a/ld/testsuite/ld-powerpc/powerpc.exp b/ld/testsuite/ld-powerpc/powerpc.exp index 37e53fd..07226c6 100644 --- a/ld/testsuite/ld-powerpc/powerpc.exp +++ b/ld/testsuite/ld-powerpc/powerpc.exp @@ -319,17 +319,13 @@ run_dump_test "attr-gnu-4-10" run_dump_test "attr-gnu-4-11" run_dump_test "attr-gnu-4-12" run_dump_test "attr-gnu-4-13" -run_dump_test "attr-gnu-4-14" run_dump_test "attr-gnu-4-20" run_dump_test "attr-gnu-4-21" run_dump_test "attr-gnu-4-22" run_dump_test "attr-gnu-4-23" -run_dump_test "attr-gnu-4-24" run_dump_test "attr-gnu-4-31" run_dump_test "attr-gnu-4-32" run_dump_test "attr-gnu-4-33" -run_dump_test "attr-gnu-4-34" -run_dump_test "attr-gnu-4-41" run_dump_test "attr-gnu-8-11" run_dump_test "attr-gnu-8-23" -- cgit v1.1