From patchwork Fri Aug 21 13:55:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 141946 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 375C24BA2E1F for ; Fri, 21 Aug 2026 13:57:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 375C24BA2E1F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1787320624; bh=JfGRAa0XYKPIcG9W+LF3t4tlrr9jVFxPgcwK1Gi42sw=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=vAEmGtu8xLYiLt1JYx+ShrvwN19vb6B8iNNlS4wyHAMtvGUzww4gIa0TIH+VxMx2A tWzBQqEQIuG2SVrBFdmsycXVjXPvr8DnwGiMnLnso7aNNiQfBtc+QDdPRth+Vt8AQ5 8sdD15bc6tIUkj9hfLywywzHx559FVYbSV3NI6Bo= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [81.169.146.162]) by sourceware.org (Postfix) with ESMTPS id C79634BB1C26 for ; Fri, 21 Aug 2026 13:55:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C79634BB1C26 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C79634BB1C26 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1787320518; cv=pass; b=IRMyGNn0+Nck+IItxbkwBp/aPofDuk3QTpyMy/2+hi4ueE2zb44spHr4n7Wnw92ovkobTXd7rvP8BfScDC+lu3NksauHFSyN/Jm1Xgy8GwTixE/sh5cOFYoVZg3fLoe+CjNxWXgwlQx/PkyyxlVJ38f+kf0hTe3sxeH0OZGO/OI= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1787320518; c=relaxed/simple; bh=HYGVrVAbGTp6y9xlZ/Ja7jFaFDKl/v+dksXNS4UUdHE=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:To: From:Subject; b=iuJdGHHWgII4sc9wJRJL1pQfxgvTWEZ6w5Vl69QowbCHbzF2i8ZjmAZR2YqvTnYDroFaeUugjrW8FrEmo1CxcwKf+8AWSOKVYyqbYNa/0zlM7fRyCa3bBeumGFc+/Rq+f8+Rw3BTUjaT2XfYP0tIejeZhEGK1Vnov2UK6GZ/Y1c= ARC-Authentication-Results: i=2; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gjlay.de header.i=@gjlay.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=rdGdDTLm; dkim=pass header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=M6cp8oEd DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C79634BB1C26 ARC-Seal: i=1; a=rsa-sha256; t=1787320515; cv=none; d=strato.com; s=strato-dkim-0002; b=peWg98Bv4+KhKLAlHEY26+qswI0OehEghENjCs3thMYauKVmEzMeOVUGHWHBn8dO+Z K110vt6p/9Y4oBIEAG/Uq2EKcsGAakq3kiDLHVgvyNfujxXj+JfLgovyXyBF5wozEdTW EzbyZCbQogjQZAc+hl7I0uE6TZhykia+yeu+HrnG+UPLd3Wu2zs3RCxdCuvWoip+Vc6X 88TqgkNk+AVzq6El05gUuGI/AG9f3FXw46s9c7B7a+q4Z6ezcFBurNYNc9Qqoelj+Wqz tsO8gYTSYB0n573vtYZkrxroIMk5XraYdxPiKxWltxflWDZJoRGS4Jk/D8TA0tKU7/gM l8qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1787320515; s=strato-dkim-0002; d=strato.com; h=Subject:From:To:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=JfGRAa0XYKPIcG9W+LF3t4tlrr9jVFxPgcwK1Gi42sw=; b=eUxlFI9fkMMai5E6XU7WSprTzCpxU2IbPxjHYzWJIdzOGgEfH5tG3SDg8wY94FOs/0 pf0rYT5dTvY4g/L0mUa1z9wFxxaRd0iw9qHDEMt410iSGtgNw7XW98teUoNuj3t1hGJl OtiqcUnyDMm5Z/Wh1sQX3FHy53jtS117RgslPSS46pq0Bv1i4tPebKT/eXZ52NrqjeEn fNP3pk1Dhb4ietnXYO2YCkHei22nlN2Sf2dZ3YCpsQpX1lqdBCWxfdhHWcfloo165lAz bjPWCeoxABqgMIfyBVcxqvJfDU6k1dp4ApLODH9agcJrw0s5od2T61SPQNHRipVJJfZo p9Iw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKXKoq0dKoR0vdoTJLPTbtkmyzs2x+1Vw=" Received: from [192.168.2.106] by smtp.strato.de (RZmta 55.6.2 DYNA|AUTH) with ESMTPSA id xba5ce27LDtFG6Q (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Fri, 21 Aug 2026 15:55:15 +0200 (CEST) Message-ID: Date: Fri, 21 Aug 2026 15:55:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US To: binutils@sourceware.org, Denis Chertykov Subject: AVR: Support .gnu_attribute to encode the size of [long] double X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Georg-Johann Lay via Binutils From: Georg-Johann Lay Reply-To: Georg-Johann Lay Errors-To: binutils-bounces~patchwork=sourceware.org@sourceware.org AVR GCC allows to chose the size of double and long double at compile time by means of -m[long-]double={32|64}. As these options select a different ABI, Binutils should complain when an attempt is being made to link incompatible object files. This patch adds .gnu_attribute 8 (Tag_GNU_AVR_BITS_DOUBLE) .gnu_attribute 12 (Tag_GNU_AVR_BITS_LONG_DOUBLE) and some simple test cases. A tag value of 0 is compatible with all other tag values. Two non-zero tag values are compatible iff they are the same. Ok for trunk? Johann --- PR ld/34557 include/ * elf/avr.h (Tag_GNU_AVR_BITS_DOUBLE = 8) (Tag_GNU_AVR_BITS_LONG_DOUBLE = 12): Define new enum values. bfd/ * elf32-avr.c (avr_elf_merge_obj_attributes): Support Tag_GNU_AVR_BITS_DOUBLE, Tag_GNU_AVR_BITS_LONG_DOUBLE. binutils/ * readelf.c (display_avr_gnu_attribute): Support Tag_GNU_AVR_BITS_DOUBLE, Tag_GNU_AVR_BITS_LONG_DOUBLE. gas/ * doc/as.texi (AVR Attributes): Document Tag_GNU_AVR_BITS_DOUBLE, Tag_GNU_AVR_BITS_LONG_DOUBLE. ld/ * testsuite/ld-avr/attr-gnu-8-0.s: New file. * testsuite/ld-avr/attr-gnu-8-32.s: New file. * testsuite/ld-avr/attr-gnu-8-64.s: New file. * testsuite/ld-avr/attr-gnu-8-32.d: New test. * testsuite/ld-avr/attr-gnu-8-32_0.d: New test. * testsuite/ld-avr/attr-gnu-8-32_64.d: New test. * testsuite/ld-avr/attr-gnu-8_12.d: New test. * testsuite/ld-avr/attr-gnu-12-0.s: New file. * testsuite/ld-avr/attr-gnu-12-64.s: New file. * testsuite/ld-avr/attr-gnu-12-32.s: New file. * testsuite/ld-avr/attr-gnu-12-32.d: New test. * testsuite/ld-avr/attr-gnu-12-32_0.d: New test. * testsuite/ld-avr/attr-gnu-12-32_64.d: New test. AVR: ld/34557 - Support .gnu_attribute to encode the size of [long] double. AVR GCC allows to chose the size of double and long double at compile time by means of -m[long-]double={32|64}. As these options select a different ABI, Binutils should complain when an attempt is being made to link incompatible object files. This patch adds .gnu_attribute 8 (Tag_GNU_AVR_BITS_DOUBLE) .gnu_attribute 12 (Tag_GNU_AVR_BITS_LONG_DOUBLE) and some simple test cases. A tag value of 0 is compatible with all other tag values. Two non-zero tag values are compatible iff they are the same. PR ld/34557 include/ * elf/avr.h (Tag_GNU_AVR_BITS_DOUBLE = 8) (Tag_GNU_AVR_BITS_LONG_DOUBLE = 12): Define new enum values. bfd/ * elf32-avr.c (avr_elf_merge_obj_attributes): Support Tag_GNU_AVR_BITS_DOUBLE, Tag_GNU_AVR_BITS_LONG_DOUBLE. binutils/ * readelf.c (display_avr_gnu_attribute): Support Tag_GNU_AVR_BITS_DOUBLE, Tag_GNU_AVR_BITS_LONG_DOUBLE. gas/ * doc/as.texi (AVR Attributes): Document Tag_GNU_AVR_BITS_DOUBLE, Tag_GNU_AVR_BITS_LONG_DOUBLE. ld/ * testsuite/ld-avr/attr-gnu-8-0.s: New file. * testsuite/ld-avr/attr-gnu-8-32.s: New file. * testsuite/ld-avr/attr-gnu-8-64.s: New file. * testsuite/ld-avr/attr-gnu-8-32.d: New test. * testsuite/ld-avr/attr-gnu-8-32_0.d: New test. * testsuite/ld-avr/attr-gnu-8-32_64.d: New test. * testsuite/ld-avr/attr-gnu-8_12.d: New test. * testsuite/ld-avr/attr-gnu-12-0.s: New file. * testsuite/ld-avr/attr-gnu-12-64.s: New file. * testsuite/ld-avr/attr-gnu-12-32.s: New file. * testsuite/ld-avr/attr-gnu-12-32.d: New test. * testsuite/ld-avr/attr-gnu-12-32_0.d: New test. * testsuite/ld-avr/attr-gnu-12-32_64.d: New test. diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 929a2fe2519..3cc79adec68 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -4200,7 +4200,6 @@ avr_elf32_property_record_name (struct avr_property_record *rec) static bool avr_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) { - static bfd *last_fp; obj_attribute *in_attr, *in_attrs; obj_attribute *out_attr, *out_attrs; bfd *obfd = info->output_bfd; @@ -4208,6 +4207,9 @@ avr_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU]; out_attrs = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU]; + // Merge Tag_GNU_AVR_VTABLE_AS (4). + + static bfd *last_fp_vtab; in_attr = &in_attrs[Tag_GNU_AVR_VTABLE_AS]; out_attr = &out_attrs[Tag_GNU_AVR_VTABLE_AS]; @@ -4218,7 +4220,7 @@ avr_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) { out_attr->type = ATTR_TYPE_FLAG_INT_VAL; out_attr->i = in_attr->i; - last_fp = ibfd; + last_fp_vtab = ibfd; } } else if (in_attr->i != out_attr->i) @@ -4227,11 +4229,70 @@ avr_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) const char *const iname = avr_tag_vtable_as_name (in_attr->i); const char *const oname = avr_tag_vtable_as_name (out_attr->i); - _bfd_error_handler - /* xgettext:c-format */ - (_("%pB uses %s tag %d (%s), %pB uses %s tag %d (%s)"), - ibfd, tag, in_attr->i, iname, - last_fp, tag, out_attr->i, oname); + // xgettext:c-format + _bfd_error_handler (_("%pB uses %s tag %d (%s), %pB uses %s tag %d (%s)"), + ibfd, tag, in_attr->i, iname, + last_fp_vtab, tag, out_attr->i, oname); + + out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; + bfd_set_error (bfd_error_bad_value); + return false; + } + + // Merge Tag_GNU_AVR_BITS_DOUBLE (8). + + static bfd *last_fp_dbl; + in_attr = &in_attrs[Tag_GNU_AVR_BITS_DOUBLE]; + out_attr = &out_attrs[Tag_GNU_AVR_BITS_DOUBLE]; + + if (in_attr->i == 0 + || out_attr->i == 0) + { + if (in_attr->i != 0) + { + out_attr->type = ATTR_TYPE_FLAG_INT_VAL; + out_attr->i = in_attr->i; + last_fp_dbl = ibfd; + } + } + else if (in_attr->i != out_attr->i) + { + const char *const tag = "Tag_GNU_AVR_BITS_DOUBLE"; + + // xgettext:c-format + _bfd_error_handler (_("%pB uses %s tag %d, %pB uses %s tag %d"), + ibfd, tag, in_attr->i, + last_fp_dbl, tag, out_attr->i); + + out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; + bfd_set_error (bfd_error_bad_value); + return false; + } + + // Merge Tag_GNU_AVR_BITS_LONG_DOUBLE (12). + + static bfd *last_fp_ldbl; + in_attr = &in_attrs[Tag_GNU_AVR_BITS_LONG_DOUBLE]; + out_attr = &out_attrs[Tag_GNU_AVR_BITS_LONG_DOUBLE]; + + if (in_attr->i == 0 + || out_attr->i == 0) + { + if (in_attr->i != 0) + { + out_attr->type = ATTR_TYPE_FLAG_INT_VAL; + out_attr->i = in_attr->i; + last_fp_ldbl = ibfd; + } + } + else if (in_attr->i != out_attr->i) + { + const char *const tag = "Tag_GNU_AVR_BITS_LONG_DOUBLE"; + + // xgettext:c-format + _bfd_error_handler (_("%pB uses %s tag %d, %pB uses %s tag %d"), + ibfd, tag, in_attr->i, + last_fp_ldbl, tag, out_attr->i); out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; bfd_set_error (bfd_error_bad_value); diff --git a/binutils/readelf.c b/binutils/readelf.c index b5ccc675af6..2b594d632fa 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -18370,10 +18370,14 @@ display_avr_gnu_attribute (const unsigned char * p, unsigned int tag, const unsigned char * const end) { - if (tag == Tag_GNU_AVR_VTABLE_AS) + unsigned int val; + + switch (tag) { - unsigned int val; + default: + break; + case Tag_GNU_AVR_VTABLE_AS: printf (" Tag_GNU_AVR_VTABLE_AS (%u): ", tag); if (p == end) { @@ -18384,6 +18388,28 @@ display_avr_gnu_attribute (const unsigned char * p, READ_ULEB (val, p, end); printf ("%d (%s)\n", val, avr_tag_vtable_as_name (val)); return p; + + case Tag_GNU_AVR_BITS_DOUBLE: + printf (" Tag_GNU_AVR_BITS_DOUBLE (%u): ", tag); + if (p == end) + printf (_("\n")); + else + { + READ_ULEB (val, p, end); + printf ("%d\n", val); + } + return p; + + case Tag_GNU_AVR_BITS_LONG_DOUBLE: + printf (" Tag_GNU_AVR_BITS_LONG_DOUBLE (%u): ", tag); + if (p == end) + printf (_("\n")); + else + { + READ_ULEB (val, p, end); + printf ("%d\n", val); + } + return p; } return display_tag_value (tag & 1, p, end); diff --git a/gas/doc/as.texi b/gas/doc/as.texi index ebe23da340a..2cf4bdfe610 100644 --- a/gas/doc/as.texi +++ b/gas/doc/as.texi @@ -8117,6 +8117,12 @@ for C++ virtual tables used by this object file: @item 7 for files that use the 16-bit address space @code{__flash5}. @item 8 for files that use the 24-bit address space @code{__flashx}. @end itemize + +@item Tag_GNU_AVR_BITS_DOUBLE (8) +Bit size of the @code{double} type, or 0 if no @code{double} is used. + +@item Tag_GNU_AVR_BITS_LONG_DOUBLE (12) +Bit size of the @code{long double} type, or 0 if no @code{long double} is used. @end table @subsection M680x0 Attributes diff --git a/include/elf/avr.h b/include/elf/avr.h index 23f21ecec15..1b7cdb648bc 100644 --- a/include/elf/avr.h +++ b/include/elf/avr.h @@ -99,6 +99,12 @@ enum // VTABLE is located in some named address space. Tag_GNU_AVR_VTABLE_AS = 4, + + // Bits used by the double type, or 0 if no see. + Tag_GNU_AVR_BITS_DOUBLE = 8, + + // Bits used by the long double type, or 0 if no see. + Tag_GNU_AVR_BITS_LONG_DOUBLE = 12, }; diff --git a/ld/testsuite/ld-avr/attr-gnu-12-0.s b/ld/testsuite/ld-avr/attr-gnu-12-0.s new file mode 100644 index 00000000000..9486de20476 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-12-0.s @@ -0,0 +1 @@ +.gnu_attribute 12,0 diff --git a/ld/testsuite/ld-avr/attr-gnu-12-32.d b/ld/testsuite/ld-avr/attr-gnu-12-32.d new file mode 100644 index 00000000000..5843e18bdee --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-12-32.d @@ -0,0 +1,8 @@ +#name: AVR Tag_AVR_GNU_BITS_LONG_DOUBLE 32 +#source: attr-gnu-12-32.s +#readelf: -A +#target: avr-*-* + +Attribute Section: gnu +File Attributes + Tag_GNU_AVR_BITS_LONG_DOUBLE \(12\): 32 diff --git a/ld/testsuite/ld-avr/attr-gnu-12-32.s b/ld/testsuite/ld-avr/attr-gnu-12-32.s new file mode 100644 index 00000000000..ce87ca76660 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-12-32.s @@ -0,0 +1 @@ +.gnu_attribute 12,32 diff --git a/ld/testsuite/ld-avr/attr-gnu-12-32_0.d b/ld/testsuite/ld-avr/attr-gnu-12-32_0.d new file mode 100644 index 00000000000..114823957ba --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-12-32_0.d @@ -0,0 +1,11 @@ +#name: AVR Tag_AVR_GNU_BITS_LONG_DOUBLE 32 + 0 +#source: attr-gnu-12-32.s +#source: attr-gnu-12-0.s +#as: +#ld: +#readelf: -A +#target: avr-*-* + +Attribute Section: gnu +File Attributes + Tag_GNU_AVR_BITS_LONG_DOUBLE \(12\): 32 diff --git a/ld/testsuite/ld-avr/attr-gnu-12-32_64.d b/ld/testsuite/ld-avr/attr-gnu-12-32_64.d new file mode 100644 index 00000000000..689d8036fbe --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-12-32_64.d @@ -0,0 +1,7 @@ +#name: AVR Tag_AVR_GNU_BITS_LONG_DOUBLE conflict +#source: attr-gnu-12-32.s +#source: attr-gnu-12-64.s +#as: +#ld: +#target: avr-*-* +#error: failed to merge target specific data of file diff --git a/ld/testsuite/ld-avr/attr-gnu-12-64.s b/ld/testsuite/ld-avr/attr-gnu-12-64.s new file mode 100644 index 00000000000..883d0c791a2 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-12-64.s @@ -0,0 +1 @@ +.gnu_attribute 12,64 diff --git a/ld/testsuite/ld-avr/attr-gnu-8-0.s b/ld/testsuite/ld-avr/attr-gnu-8-0.s new file mode 100644 index 00000000000..b28c578da07 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-8-0.s @@ -0,0 +1 @@ +.gnu_attribute 8,0 diff --git a/ld/testsuite/ld-avr/attr-gnu-8-32.d b/ld/testsuite/ld-avr/attr-gnu-8-32.d new file mode 100644 index 00000000000..47918d379db --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-8-32.d @@ -0,0 +1,8 @@ +#name: AVR Tag_AVR_GNU_BITS_DOUBLE 32 +#source: attr-gnu-8-32.s +#readelf: -A +#target: avr-*-* + +Attribute Section: gnu +File Attributes + Tag_GNU_AVR_BITS_DOUBLE \(8\): 32 diff --git a/ld/testsuite/ld-avr/attr-gnu-8-32.s b/ld/testsuite/ld-avr/attr-gnu-8-32.s new file mode 100644 index 00000000000..6bfa47d0bda --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-8-32.s @@ -0,0 +1 @@ +.gnu_attribute 8,32 diff --git a/ld/testsuite/ld-avr/attr-gnu-8-32_0.d b/ld/testsuite/ld-avr/attr-gnu-8-32_0.d new file mode 100644 index 00000000000..345b1add438 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-8-32_0.d @@ -0,0 +1,11 @@ +#name: AVR Tag_AVR_GNU_BITS_DOUBLE 32 + 0 +#source: attr-gnu-8-32.s +#source: attr-gnu-8-0.s +#as: +#ld: +#readelf: -A +#target: avr-*-* + +Attribute Section: gnu +File Attributes + Tag_GNU_AVR_BITS_DOUBLE \(8\): 32 diff --git a/ld/testsuite/ld-avr/attr-gnu-8-32_64.d b/ld/testsuite/ld-avr/attr-gnu-8-32_64.d new file mode 100644 index 00000000000..3e780858661 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-8-32_64.d @@ -0,0 +1,7 @@ +#name: AVR Tag_AVR_GNU_BITS_DOUBLE conflict +#source: attr-gnu-8-32.s +#source: attr-gnu-8-64.s +#as: +#ld: +#target: avr-*-* +#error: failed to merge target specific data of file diff --git a/ld/testsuite/ld-avr/attr-gnu-8-64.s b/ld/testsuite/ld-avr/attr-gnu-8-64.s new file mode 100644 index 00000000000..34141651524 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-8-64.s @@ -0,0 +1 @@ +.gnu_attribute 8,64 diff --git a/ld/testsuite/ld-avr/attr-gnu-8_12.d b/ld/testsuite/ld-avr/attr-gnu-8_12.d new file mode 100644 index 00000000000..f35f9e48d61 --- /dev/null +++ b/ld/testsuite/ld-avr/attr-gnu-8_12.d @@ -0,0 +1,12 @@ +#name: AVR Tag_AVR_GNU_BITS DOUBLE + LONG_DOUBLE +#source: attr-gnu-8-32.s +#source: attr-gnu-12-64.s +#as: +#ld: +#readelf: -A +#target: avr-*-* + +Attribute Section: gnu +File Attributes + Tag_GNU_AVR_BITS_DOUBLE \(8\): 32 + Tag_GNU_AVR_BITS_LONG_DOUBLE \(12\): 64