From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from emagii.se (www.emagii.com [185.133.207.17]) by sourceware.org (Postfix) with ESMTPS id BED9E38515FB for ; Wed, 22 Feb 2023 16:17:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BED9E38515FB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=emagii.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=emagii.com Received: from valinor.ownit.se (84-55-68-216.customers.ownit.se [84.55.68.216]) by emagii.se (Postfix) with ESMTPSA id D63E1120275; Wed, 22 Feb 2023 17:17:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emagii.com; s=default; t=1677082664; bh=Jf+5fTEcmBK/xGytSTg+PhQ12w59ZWZC0dqNjtFcyB4=; h=From:To:Subject; b=g2a8RvJEi+g6tq0z2w+Ab+nt3Xcc9RdGLQcJK0jWOxnQIRyUWQhK8PZYQ1FS8jekw xAHy8zG/eT/SgxuHGGuHRZqlYr/UlCyGTyjnvI1I2Aj/ysBICn0WVDQ1fPhuYqbSBv CIbcmFhB3WX6VqU78G+TQloVe3ayj11IbOdBLF7g= Authentication-Results: emagii.beebytevps.io; spf=pass (sender IP is 84.55.68.216) smtp.mailfrom=binutils@emagii.com smtp.helo=valinor.ownit.se Received-SPF: pass (emagii.beebytevps.io: connection is authenticated) From: binutils@emagii.com To: binutils@sourceware.org Cc: nickc@redhat.com, Ulf Samuelsson Subject: [PATCH v5 10/10] DIGEST: testsuite Date: Wed, 22 Feb 2023 17:16:09 +0100 Message-Id: <20230222161609.239928-11-binutils@emagii.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230222161609.239928-1-binutils@emagii.com> References: <20230222161609.239928-1-binutils@emagii.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-PPP-Message-ID: <167708266344.2544952.8335257839213176343@localhost.localdomain> X-PPP-Vhost: emagii.com X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_FAIL,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Ulf Samuelsson All these examples link, but fails in the make check-ld Signed-off-by: Ulf Samuelsson --- ld/testsuite/ld-scripts/crc32-poly.d | 46 ++++++++++++++++++++++++++ ld/testsuite/ld-scripts/crc32-poly.s | 9 +++++ ld/testsuite/ld-scripts/crc32-poly.t | 38 ++++++++++++++++++++++ ld/testsuite/ld-scripts/crc32-polyi.d | 45 +++++++++++++++++++++++++ ld/testsuite/ld-scripts/crc32-polyi.s | 9 +++++ ld/testsuite/ld-scripts/crc32-polyi.t | 38 ++++++++++++++++++++++ ld/testsuite/ld-scripts/crc32.d | 37 +++++++++++++++++++++ ld/testsuite/ld-scripts/crc32.s | 9 +++++ ld/testsuite/ld-scripts/crc32.t | 39 ++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-ecma.d | 47 +++++++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-ecma.s | 9 +++++ ld/testsuite/ld-scripts/crc64-ecma.t | 40 +++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-iso.d | 47 +++++++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-iso.s | 9 +++++ ld/testsuite/ld-scripts/crc64-iso.t | 40 +++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-poly.d | 46 ++++++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-poly.s | 9 +++++ ld/testsuite/ld-scripts/crc64-poly.t | 40 +++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-polyi.d | 47 +++++++++++++++++++++++++++ ld/testsuite/ld-scripts/crc64-polyi.s | 9 +++++ ld/testsuite/ld-scripts/crc64-polyi.t | 40 +++++++++++++++++++++++ ld/testsuite/ld-scripts/script.exp | 8 +++++ 22 files changed, 661 insertions(+) create mode 100644 ld/testsuite/ld-scripts/crc32-poly.d create mode 100644 ld/testsuite/ld-scripts/crc32-poly.s create mode 100644 ld/testsuite/ld-scripts/crc32-poly.t create mode 100644 ld/testsuite/ld-scripts/crc32-polyi.d create mode 100644 ld/testsuite/ld-scripts/crc32-polyi.s create mode 100644 ld/testsuite/ld-scripts/crc32-polyi.t create mode 100644 ld/testsuite/ld-scripts/crc32.d create mode 100644 ld/testsuite/ld-scripts/crc32.s create mode 100644 ld/testsuite/ld-scripts/crc32.t create mode 100644 ld/testsuite/ld-scripts/crc64-ecma.d create mode 100644 ld/testsuite/ld-scripts/crc64-ecma.s create mode 100644 ld/testsuite/ld-scripts/crc64-ecma.t create mode 100644 ld/testsuite/ld-scripts/crc64-iso.d create mode 100644 ld/testsuite/ld-scripts/crc64-iso.s create mode 100644 ld/testsuite/ld-scripts/crc64-iso.t create mode 100644 ld/testsuite/ld-scripts/crc64-poly.d create mode 100644 ld/testsuite/ld-scripts/crc64-poly.s create mode 100644 ld/testsuite/ld-scripts/crc64-poly.t create mode 100644 ld/testsuite/ld-scripts/crc64-polyi.d create mode 100644 ld/testsuite/ld-scripts/crc64-polyi.s create mode 100644 ld/testsuite/ld-scripts/crc64-polyi.t diff --git a/ld/testsuite/ld-scripts/crc32-poly.d b/ld/testsuite/ld-scripts/crc32-poly.d new file mode 100644 index 00000000000..70fb231e116 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32-poly.d @@ -0,0 +1,46 @@ +#source: crc32-poly.s +#ld: -T crc32-poly.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 1100 434f4445 deadbeef 712c8793 0c110000 CODE....q,...... + 1110 10240000 04130000 deadbeef 434f4445 .$..........CODE + 1120 434f4445 0c110000 ffffffff ffffffff CODE............ + 1130 ffffffff ffffffff ffffffff ffffffff .* + 1140 ffffffff ffffffff ffffffff ffffffff .* + 1150 ffffffff ffffffff ffffffff ffffffff .* + 1160 ffffffff ffffffff ffffffff ffffffff .* + 1170 ffffffff ffffffff ffffffff ffffffff .* + 1180 ffffffff ffffffff ffffffff ffffffff .* +#... + 1f90 ffffffff ffffffff ffffffff ffffffff .* + 1fa0 ffffffff ffffffff ffffffff ffffffff .* + 1fb0 ffffffff ffffffff ffffffff ffffffff .* + 1fc0 ffffffff ffffffff ffffffff ffffffff .* + 1fd0 ffffffff ffffffff ffffffff ffffffff .* + 1fe0 ffffffff ffffffff ffffffff ffffffff .* + 1ff0 ffffffff ffffffff 434f4445 deadbeef ........CODE.... + 2000 00000000 d23cc1eb 7b04d96a a9381881 .....<..{..j.8.. + 2010 f608b2d5 2434733e 8d0c6bbf 5f30aa54 ....$4s>..k._0.T + 2020 336c3f16 e150fefd 4868e67c 9a542797 3l?..P..Hh.|.T'. + 2030 c5648dc3 17584c28 be6054a9 6c5c9542 .d...XL..`T.l\.B + 2040 66d87e2c b4e4bfc7 1ddca746 cfe066ad f.~,.......F..f. + 2050 90d0ccf9 42ec0d12 ebd41593 39e8d478 ....B.......9..x + 2060 55b4413a 878880d1 2eb09850 fc8c59bb U.A:.......P..Y. + 2070 a3bcf3ef 71803204 d8b82a85 0a84eb6e ....q.2...*....n + 2080 ccb0fd58 1e8c3cb3 b7b42432 6588e5d9 ...X..<...$2e... +#... + 2380 bb6fab37 69536adc c06b725d 1257b3b6 .o.7iSj..kr].W.. + 2390 4d6719e2 9f5bd809 3663c088 e45f0163 Mg...[..6c..._.c + 23a0 88039421 5a3f55ca f3074d4b 213b8ca0 ...!Z?U...MK!;.. + 23b0 7e0b26f4 ac37e71f 050fff9e d7333e75 ~.&..7.......3>u + 23c0 ddb7d51b 0f8b14f0 a6b30c71 748fcd9a ...........qt... + 23d0 2bbf67ce f983a625 50bbbea4 82877f4f +.g....%P......O + 23e0 eedbea0d 3ce72be6 95df3367 47e3f28c ....<.+...3gG... + 23f0 18d358d8 caef9933 63d781b2 b1eb4059 ..X....3c.....@Y + 2400 434f4445 deadbeef 00000000 00000000 CODE............ +#pass diff --git a/ld/testsuite/ld-scripts/crc32-poly.s b/ld/testsuite/ld-scripts/crc32-poly.s new file mode 100644 index 00000000000..704b492ae61 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32-poly.s @@ -0,0 +1,9 @@ + .extern ecc_start + .section .text +main: + .long 0x45444F43 + .long ecc_start + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/crc32-poly.t b/ld/testsuite/ld-scripts/crc32-poly.t new file mode 100644 index 00000000000..35224c2cff8 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32-poly.t @@ -0,0 +1,38 @@ +MEMORY { + rom : ORIGIN = 0x000000, LENGTH = 0x400000 + ram : ORIGIN = 0x400000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x100) : + + { + FILL(0xFF) + QUAD(0xEFBEADDE45444F43); + crc32 = .; + DIGEST POLY(32, 0xDEADBEEF)(ecc_start , ecc_end) + ecc_start = .; + LONG(ecc_start) + LONG(ecc_end); + LONG(ecc_end - ecc_start); + QUAD(0x45444F43EFBEADDE); + entry = .; + *(.text) + . = ALIGN(0x100); + BYTE(1) + . = ALIGN(4096) - 8; + QUAD(0xEFBEADDE45444F43); + DIGEST TABLE + QUAD(0xEFBEADDE45444F43); + QUAD(0); + ecc_end = .; + } > rom + + .data : AT (0x400000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/crc32-polyi.d b/ld/testsuite/ld-scripts/crc32-polyi.d new file mode 100644 index 00000000000..e3b224caeda --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32-polyi.d @@ -0,0 +1,45 @@ +#source: crc32-polyi.s +#ld: -T crc32-polyi.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 1100 434f4445 deadbeef 8d51a265 0c110000 CODE.....Q.e.... + 1110 10240000 04130000 deadbeef 434f4445 .$..........CODE + 1120 434f4445 0c110000 ffffffff ffffffff CODE............ + 1130 ffffffff ffffffff ffffffff ffffffff .* + 1140 ffffffff ffffffff ffffffff ffffffff .* + 1150 ffffffff ffffffff ffffffff ffffffff .* + 1160 ffffffff ffffffff ffffffff ffffffff .* + 1170 ffffffff ffffffff ffffffff ffffffff .* +#... + 1f80 ffffffff ffffffff ffffffff ffffffff .* + 1f90 ffffffff ffffffff ffffffff ffffffff .* + 1fa0 ffffffff ffffffff ffffffff ffffffff .* + 1fb0 ffffffff ffffffff ffffffff ffffffff .* + 1fc0 ffffffff ffffffff ffffffff ffffffff .* + 1fd0 ffffffff ffffffff ffffffff ffffffff .* + 1fe0 ffffffff ffffffff ffffffff ffffffff .* + 1ff0 ffffffff ffffffff 434f4445 deadbeef ........CODE.... + 2000 00000000 96300777 2c610eee ba510999 .....0.w,a...Q.. + 2010 19c46d07 8ff46a70 35a563e9 a395649e ..m...jp5.c...d. + 2020 3288db0e a4b8dc79 1ee9d5e0 88d9d297 2......y........ + 2030 2b4cb609 bd7cb17e 072db8e7 911dbf90 +L...|.~.-...... + 2040 6410b71d f220b06a 4871b9f3 de41be84 d.... .jHq...A.. + 2050 7dd4da1a ebe4dd6d 51b5d4f4 c785d383 }......mQ....... + 2060 56986c13 c0a86b64 7af962fd ecc9658a V.l...kdz.b...e. + 2070 4f5c0114 d96c0663 633d0ffa f50d088d O\...l.cc=...... + 2080 c8206e3b 5e10694c e44160d5 727167a2 . n;^.iL.A`.rqg. +#... + 2390 612667a7 f71660d0 4d476949 db776e3e a&g...`.MGiI.wn> + 23a0 4a6ad1ae dc5ad6d9 660bdf40 f03bd837 Jj...Z..f..@.;.7 + 23b0 53aebca9 c59ebbde 7fcfb247 e9ffb530 S..........G...0 + 23c0 1cf2bdbd 8ac2baca 3093b353 a6a3b424 ........0..S...$ + 23d0 0536d0ba 9306d7cd 2957de54 bf67d923 .6......)W.T.g.# + 23e0 2e7a66b3 b84a61c4 021b685d 942b6f2a .zf..Ja...h].+o* + 23f0 37be0bb4 a18e0cc3 1bdf055a 8def022d 7..........Z...- + 2400 434f4445 deadbeef 00000000 00000000 CODE............ + #pass diff --git a/ld/testsuite/ld-scripts/crc32-polyi.s b/ld/testsuite/ld-scripts/crc32-polyi.s new file mode 100644 index 00000000000..704b492ae61 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32-polyi.s @@ -0,0 +1,9 @@ + .extern ecc_start + .section .text +main: + .long 0x45444F43 + .long ecc_start + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/crc32-polyi.t b/ld/testsuite/ld-scripts/crc32-polyi.t new file mode 100644 index 00000000000..5a7e25a4a9f --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32-polyi.t @@ -0,0 +1,38 @@ +MEMORY { + rom : ORIGIN = 0x000000, LENGTH = 0x400000 + ram : ORIGIN = 0x400000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x100) : + + { + FILL(0xFF) + QUAD(0xEFBEADDE45444F43); + crc32 = .; + DIGEST POLYI(32,0xEDB88320)(ecc_start , ecc_end) + ecc_start = .; + LONG(ecc_start) + LONG(ecc_end); + LONG(ecc_end - ecc_start); + QUAD(0x45444F43EFBEADDE); + entry = .; + *(.text) + . = ALIGN(0x100); + BYTE(1) + . = ALIGN(4096) - 8; + QUAD(0xEFBEADDE45444F43); + DIGEST TABLE + QUAD(0xEFBEADDE45444F43); + QUAD(0); + ecc_end = .; + } > rom + + .data : AT (0x400000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/crc32.d b/ld/testsuite/ld-scripts/crc32.d new file mode 100644 index 00000000000..4bfba79ef03 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32.d @@ -0,0 +1,37 @@ +#source: crc32.s +#ld: -T crc32.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 1100 434f4445 deadbeef 8d51a265 0c110000 CODE.....Q.e.... + 1110 10240000 04130000 deadbeef 434f4445 .$..........CODE + 1120 434f4445 0c110000 ffffffff ffffffff CODE............ + 1130 ffffffff ffffffff ffffffff ffffffff .* + 1140 ffffffff ffffffff ffffffff ffffffff .* + 1150 ffffffff ffffffff ffffffff ffffffff .* +#... + 1fe0 ffffffff ffffffff ffffffff ffffffff .* + 1ff0 ffffffff ffffffff 434f4445 deadbeef ........CODE.... + 2000 00000000 96300777 2c610eee ba510999 .....0.w,a...Q.. + 2010 19c46d07 8ff46a70 35a563e9 a395649e ..m...jp5.c...d. + 2020 3288db0e a4b8dc79 1ee9d5e0 88d9d297 2......y........ + 2030 2b4cb609 bd7cb17e 072db8e7 911dbf90 +L...|.~.-...... + 2040 6410b71d f220b06a 4871b9f3 de41be84 d.... .jHq...A.. + 2050 7dd4da1a ebe4dd6d 51b5d4f4 c785d383 }......mQ....... + 2060 56986c13 c0a86b64 7af962fd ecc9658a V.l...kdz.b...e. + 2070 4f5c0114 d96c0663 633d0ffa f50d088d O\...l.cc=...... + 2080 c8206e3b 5e10694c e44160d5 727167a2 . n;^.iL.A`.rqg. +#... + 2390 612667a7 f71660d0 4d476949 db776e3e a&g...`.MGiI.wn> + 23a0 4a6ad1ae dc5ad6d9 660bdf40 f03bd837 Jj...Z..f..@.;.7 + 23b0 53aebca9 c59ebbde 7fcfb247 e9ffb530 S..........G...0 + 23c0 1cf2bdbd 8ac2baca 3093b353 a6a3b424 ........0..S...$ + 23d0 0536d0ba 9306d7cd 2957de54 bf67d923 .6......)W.T.g.# + 23e0 2e7a66b3 b84a61c4 021b685d 942b6f2a .zf..Ja...h].+o* + 23f0 37be0bb4 a18e0cc3 1bdf055a 8def022d 7..........Z...- + 2400 434f4445 deadbeef 00000000 00000000 CODE............ +#pass diff --git a/ld/testsuite/ld-scripts/crc32.s b/ld/testsuite/ld-scripts/crc32.s new file mode 100644 index 00000000000..704b492ae61 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32.s @@ -0,0 +1,9 @@ + .extern ecc_start + .section .text +main: + .long 0x45444F43 + .long ecc_start + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/crc32.t b/ld/testsuite/ld-scripts/crc32.t new file mode 100644 index 00000000000..51c8f7c834e --- /dev/null +++ b/ld/testsuite/ld-scripts/crc32.t @@ -0,0 +1,39 @@ +MEMORY { + rom : ORIGIN = 0x000000, LENGTH = 0x400000 + ram : ORIGIN = 0x400000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x100) : + + { + FILL(0xFF) + QUAD(0xEFBEADDE45444F43); + crc32 = .; + DIGEST "CRC32" (ecc_start , ecc_end) + ecc_start = .; + LONG(ecc_start) + LONG(ecc_end); + LONG(ecc_end - ecc_start); + QUAD(0x45444F43EFBEADDE); + entry = .; + *(.text) + . = ALIGN(0x100); + BYTE(1) + . = ALIGN(4096) - 8; + QUAD(0xEFBEADDE45444F43); + DIGEST TABLE + QUAD(0xEFBEADDE45444F43); + QUAD(0); + ecc_end = .; + + } > rom + + .data : AT (0x400000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/crc64-ecma.d b/ld/testsuite/ld-scripts/crc64-ecma.d new file mode 100644 index 00000000000..a8d197c3323 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-ecma.d @@ -0,0 +1,47 @@ +#source: crc-ecma.s +#ld: -T crc-ecma.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 1100 434f4445 deadbeef d89e4425 b46db823 CODE......D%.m.# + 1110 10110000 00000000 10280000 00000000 .* + 1120 00170000 00000000 deadbeef 434f4445 ............CODE + 1130 434f4445 10110000 ffffffff ffffffff CODE............ + 1140 ffffffff ffffffff ffffffff ffffffff .* + 1150 ffffffff ffffffff ffffffff ffffffff .* + 1160 ffffffff ffffffff ffffffff ffffffff .* + 1170 ffffffff ffffffff ffffffff ffffffff .* + 1180 ffffffff ffffffff ffffffff ffffffff .* +#... + 1f80 ffffffff ffffffff ffffffff ffffffff .* + 1f90 ffffffff ffffffff ffffffff ffffffff .* + 1fa0 ffffffff ffffffff ffffffff ffffffff .* + 1fb0 ffffffff ffffffff ffffffff ffffffff .* + 1fc0 ffffffff ffffffff ffffffff ffffffff .* + 1fd0 ffffffff ffffffff ffffffff ffffffff .* + 1fe0 ffffffff ffffffff ffffffff ffffffff .* + 1ff0 ffffffff ffffffff 434f4445 deadbeef ........CODE.... + 2000 00000000 00000000 9336eaa9 ebe1f042 .........6.....B + 2010 266dd453 d7c3e185 b55b3efa 3c2211c7 &m.S.....[>.<".. + 2020 dfec420e 45663349 4cdaa8a7 ae87c30b ..B.Ef3IL....... + 2030 f981965d 92a5d2cc 6ab77cf4 7944228e ...]....j.|.yD". + 2040 bed9851c 8acc6692 2def6fb5 612d96d0 ......f.-.o.a-.. + 2050 98b4514f 5d0f8717 0b82bbe6 b6ee7755 ..QO].........wU + 2060 6135c712 cfaa55db f2032dbb 244ba599 a5....U...-.$K.. + 2070 47581341 1869b45e d46ef9e8 f388441c GX.A.i.^.n....D. + 2080 ef85e190 ff783d66 7cb30b39 1499cd24 .....x=f|..9...$ +#... + 2780 d3db7c26 d56eb886 40ed968f 3e8f48c4 ..|&.n..@...>.H. + 2790 f5b6a875 02ad5903 668042dc e94ca941 ...u..Y.f.B..L.A + 27a0 0c373e28 90088bcf 9f01d481 7be97b8d .7>.........{.{. + 27b0 2a5aea7b 47cb6a4a b96c00d2 ac2a9a08 *Z.{G.jJ.l...*.. + 27c0 6d02f93a 5fa2de14 fe341393 b4432e56 m..:_....4...C.V + 27d0 4b6f2d69 88613f91 d859c7c0 6380cfd3 Ko-i.a?..Y..c... + 27e0 b2eebb34 1ac4ed5d 21d8519d f1251d1f ...4...]!.Q..%.. + 27f0 94836f67 cd070cd8 07b585ce 26e6fc9a ..og........&... + 2800 434f4445 deadbeef 00000000 00000000 CODE............ +#pass diff --git a/ld/testsuite/ld-scripts/crc64-ecma.s b/ld/testsuite/ld-scripts/crc64-ecma.s new file mode 100644 index 00000000000..704b492ae61 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-ecma.s @@ -0,0 +1,9 @@ + .extern ecc_start + .section .text +main: + .long 0x45444F43 + .long ecc_start + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/crc64-ecma.t b/ld/testsuite/ld-scripts/crc64-ecma.t new file mode 100644 index 00000000000..be50d102c2b --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-ecma.t @@ -0,0 +1,40 @@ +MEMORY { + rom : ORIGIN = 0x000000, LENGTH = 0x400000 + ram : ORIGIN = 0x400000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x100) : + + { + FILL(0xFF) + QUAD(0xEFBEADDE45444F43); + crc64 = .; + DEBUG ON + DIGEST "CRC64-ECMA" (ecc_start , ecc_end) + DEBUG OFF + ecc_start = .; + QUAD(ecc_start) + QUAD(ecc_end); + QUAD(ecc_end - ecc_start); + QUAD(0x45444F43EFBEADDE); + entry = .; + *(.text) + . = ALIGN(0x100); + BYTE(1) + . = ALIGN(4096) - 8; + QUAD(0xEFBEADDE45444F43); + DIGEST TABLE + QUAD(0xEFBEADDE45444F43); + QUAD(0); + ecc_end = .; + } > rom + + .data : AT (0x400000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/crc64-iso.d b/ld/testsuite/ld-scripts/crc64-iso.d new file mode 100644 index 00000000000..1c4cae43295 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-iso.d @@ -0,0 +1,47 @@ +#source: crc-iso.s +#ld: -T crc-iso.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 1100 434f4445 deadbeef 00000000 000000a8 CODE............ + 1110 10110000 00000000 10280000 00000000 .* + 1120 00170000 00000000 deadbeef 434f4445 ............CODE + 1130 434f4445 10110000 ffffffff ffffffff CODE............ + 1140 ffffffff ffffffff ffffffff ffffffff .* + 1150 ffffffff ffffffff ffffffff ffffffff .* + 1160 ffffffff ffffffff ffffffff ffffffff .* + 1170 ffffffff ffffffff ffffffff ffffffff .* + 1180 ffffffff ffffffff ffffffff ffffffff .* +#... + 1f80 ffffffff ffffffff ffffffff ffffffff .* + 1f90 ffffffff ffffffff ffffffff ffffffff .* + 1fa0 ffffffff ffffffff ffffffff ffffffff .* + 1fb0 ffffffff ffffffff ffffffff ffffffff .* + 1fc0 ffffffff ffffffff ffffffff ffffffff .* + 1fd0 ffffffff ffffffff ffffffff ffffffff .* + 1fe0 ffffffff ffffffff ffffffff ffffffff .* + 1ff0 ffffffff ffffffff 434f4445 deadbeef ........CODE.... + 2000 00000000 00000000 00000000 000000d8 .* + 2010 00000000 00000068 00000000 000000b0 .......h........ + 2020 00000000 000000d0 00000000 00000008 .* + 2030 00000000 000000b8 00000000 00000060 ...............` + 2040 00000000 00000078 00000000 000000a0 .......x........ + 2050 00000000 00000010 00000000 000000c8 .* + 2060 00000000 000000a8 00000000 00000070 ...............p + 2070 00000000 000000c0 00000000 00000018 .* + 2080 00000000 000000f0 00000000 00000028 .* +#... + 2780 00000000 00000058 00000000 00000080 .......X........ + 2790 00000000 00000030 00000000 000000e8 .......0........ + 27a0 00000000 00000088 00000000 00000050 ...............P + 27b0 00000000 000000e0 00000000 00000038 ...............8 + 27c0 00000000 00000020 00000000 000000f8 ....... ........ + 27d0 00000000 00000048 00000000 00000090 .......H........ + 27e0 00000000 000000f0 00000000 00000028 .* + 27f0 00000000 00000098 00000000 00000040 ...............@ + 2800 434f4445 deadbeef 00000000 00000000 CODE............ +#pass diff --git a/ld/testsuite/ld-scripts/crc64-iso.s b/ld/testsuite/ld-scripts/crc64-iso.s new file mode 100644 index 00000000000..704b492ae61 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-iso.s @@ -0,0 +1,9 @@ + .extern ecc_start + .section .text +main: + .long 0x45444F43 + .long ecc_start + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/crc64-iso.t b/ld/testsuite/ld-scripts/crc64-iso.t new file mode 100644 index 00000000000..8f5b85a37e7 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-iso.t @@ -0,0 +1,40 @@ +MEMORY { + rom : ORIGIN = 0x000000, LENGTH = 0x400000 + ram : ORIGIN = 0x400000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x100) : + + { + FILL(0xFF) + QUAD(0xEFBEADDE45444F43); + crc64 = .; + DEBUG OFF + DIGEST "CRC64-ISO" (ecc_start , ecc_end) + DEBUG OFF + ecc_start = .; + QUAD(ecc_start) + QUAD(ecc_end); + QUAD(ecc_end - ecc_start); + QUAD(0x45444F43EFBEADDE); + entry = .; + *(.text) + . = ALIGN(0x100); + BYTE(1) + . = ALIGN(4096) - 8; + QUAD(0xEFBEADDE45444F43); + DIGEST TABLE + QUAD(0xEFBEADDE45444F43); + QUAD(0); + ecc_end = .; + } > rom + + .data : AT (0x400000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/crc64-poly.d b/ld/testsuite/ld-scripts/crc64-poly.d new file mode 100644 index 00000000000..221d61fec4a --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-poly.d @@ -0,0 +1,46 @@ +#source: crc-poly.s +#ld: -T crc-poly.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 1100 434f4445 deadbeef 5da495a3 927272b3 CODE....]....rr. + 1110 10110000 00000000 10280000 00000000 ................ + 1120 00170000 00000000 deadbeef 434f4445 ............CODE + 1130 434f4445 10110000 ffffffff ffffffff CODE............ + 1140 ffffffff ffffffff ffffffff ffffffff .* + 1150 ffffffff ffffffff ffffffff ffffffff .* + 1160 ffffffff ffffffff ffffffff ffffffff .* + 1170 ffffffff ffffffff ffffffff ffffffff .* + 1180 ffffffff ffffffff ffffffff ffffffff .* +#... + 1f90 ffffffff ffffffff ffffffff ffffffff .* + 1fa0 ffffffff ffffffff ffffffff ffffffff .* + 1fb0 ffffffff ffffffff ffffffff ffffffff .* + 1fc0 ffffffff ffffffff ffffffff ffffffff .* + 1fd0 ffffffff ffffffff ffffffff ffffffff .* + 1fe0 ffffffff ffffffff ffffffff ffffffff .* + 1ff0 ffffffff ffffffff 434f4445 deadbeef ........CODE.... + 2000 00000000 00000000 efbeadde efbeadde .* + 2010 31c3f663 30c3f663 de7d5bbd df7d5bbd 1..c0..c.}[..}[. + 2020 6286edc7 6086edc7 8d384019 8f384019 b...`....8@..8@. + 2030 53451ba4 50451ba4 bcfbb67a bffbb67a SE..PE.....z...z + 2040 2bb27651 2eb27651 c40cdb8f c10cdb8f +.vQ..vQ........ + 2050 1a718032 1e718032 f5cf2dec f1cf2dec .q.2.q.2..-...-. + 2060 49349b96 4e349b96 a68a3648 a18a3648 I4..N4....6H..6H + 2070 78f76df5 7ef76df5 9749c02b 9149c02b x.m.~.m..I.+.I.+ + 2080 5664eda2 5c64eda2 b9da407c b3da407c Vd..\d....@|..@| +#... + 2780 415af2df 225af2df aee45f01 cde45f01 AZ.."Z...._..._. + 2790 709904bc 129904bc 9f27a962 fd27a962 p........'.b.'.b + 27a0 23dc1f18 42dc1f18 cc62b2c6 ad62b2c6 #...B....b...b.. + 27b0 121fe97b 721fe97b fda144a5 9da144a5 ...{r..{..D...D. + 27c0 6ae8848e 0ce8848e 85562950 e3562950 j........V.P.V.P + 27d0 5b2b72ed 3c2b72ed b495df33 d395df33 [+r.<+r....3...3 + 27e0 086e6949 6c6e6949 e7d0c497 83d0c497 .niIlniI........ + 27f0 39ad9f2a 5cad9f2a d61332f4 b31332f4 9..*\..*..2...2. + 2800 434f4445 deadbeef 00000000 00000000 CODE............ +#pass diff --git a/ld/testsuite/ld-scripts/crc64-poly.s b/ld/testsuite/ld-scripts/crc64-poly.s new file mode 100644 index 00000000000..704b492ae61 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-poly.s @@ -0,0 +1,9 @@ + .extern ecc_start + .section .text +main: + .long 0x45444F43 + .long ecc_start + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/crc64-poly.t b/ld/testsuite/ld-scripts/crc64-poly.t new file mode 100644 index 00000000000..035e79a26cf --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-poly.t @@ -0,0 +1,40 @@ +MEMORY { + rom : ORIGIN = 0x000000, LENGTH = 0x400000 + ram : ORIGIN = 0x400000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x100) : + + { + FILL(0xFF) + QUAD(0xEFBEADDE45444F43); + crc64 = .; + DEBUG ON + DIGEST POLY(64,0xDEADBEEFDEADBEEF)(ecc_start , ecc_end) + DEBUG OFF + ecc_start = .; + QUAD(ecc_start) + QUAD(ecc_end); + QUAD(ecc_end - ecc_start); + QUAD(0x45444F43EFBEADDE); + entry = .; + *(.text) + . = ALIGN(0x100); + BYTE(1) + . = ALIGN(4096) - 8; + QUAD(0xEFBEADDE45444F43); + DIGEST TABLE + QUAD(0xEFBEADDE45444F43); + QUAD(0); + ecc_end = .; + } > rom + + .data : AT (0x400000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/crc64-polyi.d b/ld/testsuite/ld-scripts/crc64-polyi.d new file mode 100644 index 00000000000..7cbb2703d05 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-polyi.d @@ -0,0 +1,47 @@ +#source: crc-polyi.s +#ld: -T crc-polyi.t +#objdump: -s -j .text +#notarget: [is_aout_format] +#xfail: tic4x-*-* tic54x-*-* + +.*: file format .* + +Contents of section .text: + 1100 434f4445 deadbeef b7f7857f d0d5802a CODE...........* + 1110 10110000 00000000 10280000 00000000 .* + 1120 00170000 00000000 deadbeef 434f4445 ............CODE + 1130 434f4445 10110000 ffffffff ffffffff CODE............ + 1140 ffffffff ffffffff ffffffff ffffffff .* + 1150 ffffffff ffffffff ffffffff ffffffff .* + 1160 ffffffff ffffffff ffffffff ffffffff .* + 1170 ffffffff ffffffff ffffffff ffffffff .* + 1180 ffffffff ffffffff ffffffff ffffffff .* +#... + 1f80 ffffffff ffffffff ffffffff ffffffff .* + 1f90 ffffffff ffffffff ffffffff ffffffff .* + 1fa0 ffffffff ffffffff ffffffff ffffffff .* + 1fb0 ffffffff ffffffff ffffffff ffffffff .* + 1fc0 ffffffff ffffffff ffffffff ffffffff .* + 1fd0 ffffffff ffffffff ffffffff ffffffff .* + 1fe0 ffffffff ffffffff ffffffff ffffffff .* + 1ff0 ffffffff ffffffff 434f4445 deadbeef ........CODE.... + 2000 00000000 00000000 efbeadde efbeadde .* + 2010 31c3f663 30c3f663 de7d5bbd df7d5bbd 1..c0..c.}[..}[. + 2020 6286edc7 6086edc7 8d384019 8f384019 b...`....8@..8@. + 2030 53451ba4 50451ba4 bcfbb67a bffbb67a SE..PE.....z...z + 2040 2bb27651 2eb27651 c40cdb8f c10cdb8f +.vQ..vQ........ + 2050 1a718032 1e718032 f5cf2dec f1cf2dec .q.2.q.2..-...-. + 2060 49349b96 4e349b96 a68a3648 a18a3648 I4..N4....6H..6H + 2070 78f76df5 7ef76df5 9749c02b 9149c02b x.m.~.m..I.+.I.+ + 2080 5664eda2 5c64eda2 b9da407c b3da407c Vd..\d....@|..@| +#... + 2780 415af2df 225af2df aee45f01 cde45f01 AZ.."Z...._..._. + 2790 709904bc 129904bc 9f27a962 fd27a962 p........'.b.'.b + 27a0 23dc1f18 42dc1f18 cc62b2c6 ad62b2c6 #...B....b...b.. + 27b0 121fe97b 721fe97b fda144a5 9da144a5 ...{r..{..D...D. + 27c0 6ae8848e 0ce8848e 85562950 e3562950 j........V)P.V)P + 27d0 5b2b72ed 3c2b72ed b495df33 d395df33 [+r.<+r....3...3 + 27e0 086e6949 6c6e6949 e7d0c497 83d0c497 .niIlniI........ + 27f0 39ad9f2a 5cad9f2a d61332f4 b31332f4 9..*\..*..2...2. + 2800 434f4445 deadbeef 00000000 00000000 CODE............ + #pass diff --git a/ld/testsuite/ld-scripts/crc64-polyi.s b/ld/testsuite/ld-scripts/crc64-polyi.s new file mode 100644 index 00000000000..704b492ae61 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-polyi.s @@ -0,0 +1,9 @@ + .extern ecc_start + .section .text +main: + .long 0x45444F43 + .long ecc_start + .section .data + .long 0x9abcdef0 + .section .bss + .long 0 diff --git a/ld/testsuite/ld-scripts/crc64-polyi.t b/ld/testsuite/ld-scripts/crc64-polyi.t new file mode 100644 index 00000000000..eefa3c63e68 --- /dev/null +++ b/ld/testsuite/ld-scripts/crc64-polyi.t @@ -0,0 +1,40 @@ +MEMORY { + rom : ORIGIN = 0x000000, LENGTH = 0x400000 + ram : ORIGIN = 0x400000, LENGTH = 0x10000 +} + +_start = 0x000000; +SECTIONS +{ + . = 0x1000 + SIZEOF_HEADERS; + .text ALIGN (0x100) : + + { + FILL(0xFF) + QUAD(0xEFBEADDE45444F43); + crc64 = .; + DEBUG OFF + DIGEST POLYI(64, 0xDEADBEEFDEADBEEF)(ecc_start , ecc_end) + DEBUG OFF + ecc_start = .; + QUAD(ecc_start) + QUAD(ecc_end); + QUAD(ecc_end - ecc_start); + QUAD(0x45444F43EFBEADDE); + entry = .; + *(.text) + . = ALIGN(0x100); + BYTE(1) + . = ALIGN(4096) - 8; + QUAD(0xEFBEADDE45444F43); + DIGEST TABLE + QUAD(0xEFBEADDE45444F43); + QUAD(0); + ecc_end = .; + } > rom + + .data : AT (0x400000) { *(.data) } >ram /* NO default AT>rom */ + . = ALIGN(0x20); + .bss : { *(.bss) } >ram /* NO default AT>rom */ + /DISCARD/ : { *(*) } +} diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp index 56e12da8e61..9d606ff9008 100644 --- a/ld/testsuite/ld-scripts/script.exp +++ b/ld/testsuite/ld-scripts/script.exp @@ -229,6 +229,14 @@ foreach test_script $test_script_list { run_dump_test "asciz" run_dump_test "ascii" +run_dump_test "crc64-ecma" +run_dump_test "crc64-iso" +run_dump_test "crc64-poly" +run_dump_test "crc64-polyi" +run_dump_test "crc32" +run_dump_test "crc32-poly" +run_dump_test "crc32-polyi" + run_dump_test "align-with-input" run_dump_test "pr20302" run_dump_test "output-section-types" -- 2.34.1