From bf0e35375461ef2a17e2872e7f5c1446a5924b64 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 8 Mar 2023 21:26:52 +1030 Subject: lddigest 32-bit support and gcc-4 compile errors * ld.texi: Revert 2023-03-08 commit 9a534b9f8e3d. * testsuite/ld-scripts/crc64-poly.d: Likewise. * testsuite/ld-scripts/crc64-poly.t: Likewise. * lddigest.c: Formatting. (get_uint64_t): New function. (lang_add_digest): Take etree_type* args. Replace "illegal" with "invalid" in error message. * lddigest.h (lang_add_digest): Update prototype. * lddigest_tab.c (algorithms): Work around gcc-4 errors. * ldgram.y (polynome): Adjust lang_add_digest call. * testsuite/ld-scripts/crc64-poly-size.d: Update expected error. --- ld/testsuite/ld-scripts/crc64-poly-size.d | 2 +- ld/testsuite/ld-scripts/crc64-poly.d | 2 +- ld/testsuite/ld-scripts/crc64-poly.t | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'ld/testsuite') diff --git a/ld/testsuite/ld-scripts/crc64-poly-size.d b/ld/testsuite/ld-scripts/crc64-poly-size.d index 6a3651c..1c7b3c4 100644 --- a/ld/testsuite/ld-scripts/crc64-poly-size.d +++ b/ld/testsuite/ld-scripts/crc64-poly-size.d @@ -1,5 +1,5 @@ #source: crc64-poly-size.s #ld: -T crc64-poly-size.t -# error: .*: Illegal Size in DIGEST: .* +# error: .*: Invalid Size in DIGEST #target: [is_elf_format] [is_coff_format] #skip: tic4x-*-* tic54x-*-* diff --git a/ld/testsuite/ld-scripts/crc64-poly.d b/ld/testsuite/ld-scripts/crc64-poly.d index a1e6eb8..b54ac47 100644 --- a/ld/testsuite/ld-scripts/crc64-poly.d +++ b/ld/testsuite/ld-scripts/crc64-poly.d @@ -9,7 +9,7 @@ Contents of section .text: 1200 434f4445 deadbeef 00000000 00000000 CODE............ 1210 6c40df5f 0b497347 00000000 00000000 l@._.IsG........ - 1220 ee5e1ecd 02f31206 00000000 00000000 ................ + 1220 6c40df5f 0b497347 00000000 00000000 l@._.IsG........ 1230 00000000 00000000 deadbeef 434f4445 ............CODE 1240 31323334 35363738 3900ffff ffffffff 123456789....... 1250 434f4445 00000000 00000000 00000000 CODE............ diff --git a/ld/testsuite/ld-scripts/crc64-poly.t b/ld/testsuite/ld-scripts/crc64-poly.t index 00a2155..fb357ca 100644 --- a/ld/testsuite/ld-scripts/crc64-poly.t +++ b/ld/testsuite/ld-scripts/crc64-poly.t @@ -26,7 +26,7 @@ SECTIONS QUAD(0x0); crc64 = .; - DIGEST "_CRC64#BE" POLY(64,0xA9EA3693,0,0,0,0,0)(ecc_start , ecc_end) + DIGEST "_CRC64#BE" POLY(64,0x42F0E1EBA9EA3693,0,0,0,0,0)(ecc_start , ecc_end) QUAD(0x0); INCLUDE "end_tag.inc" -- cgit v1.1