diff --git a/.gitignore b/.gitignore index 9c570dc..c8e8f68 100644 --- a/.gitignore +++ b/.gitignore @@ -70,3 +70,4 @@ stamp-* /binutils-2.38.tar.xz /binutils-2.39.tar.xz /binutils-2.40.tar.xz +/binutils-2.41.tar.xz diff --git a/binutils-CVE-2023-1972.patch b/binutils-CVE-2023-1972.patch deleted file mode 100644 index dd637fc..0000000 --- a/binutils-CVE-2023-1972.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- binutils.orig/bfd/elf.c 2023-04-17 16:26:08.720347439 +0100 -+++ binutils-2.40/bfd/elf.c 2023-04-17 16:28:03.286317601 +0100 -@@ -9050,6 +9050,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd - bfd_set_error (bfd_error_file_too_big); - goto error_return_verdef; - } -+ if (amt == 0) -+ goto error_return_verdef; - elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); - if (elf_tdata (abfd)->verdef == NULL) - goto error_return_verdef; -@@ -9153,6 +9155,8 @@ _bfd_elf_slurp_version_tables (bfd *abfd - bfd_set_error (bfd_error_file_too_big); - goto error_return; - } -+ if (amt == 0) -+ goto error_return; - elf_tdata (abfd)->verdef = (Elf_Internal_Verdef *) bfd_zalloc (abfd, amt); - if (elf_tdata (abfd)->verdef == NULL) - goto error_return; diff --git a/binutils-filename-in-readelf-messages.patch b/binutils-filename-in-readelf-messages.patch deleted file mode 100644 index eb2f98b..0000000 --- a/binutils-filename-in-readelf-messages.patch +++ /dev/null @@ -1,127 +0,0 @@ -diff -rup binutils.orig/binutils/readelf.c binutils-2.40/binutils/readelf.c ---- binutils.orig/binutils/readelf.c 2023-02-13 14:38:44.081029276 +0000 -+++ binutils-2.40/binutils/readelf.c 2023-02-13 14:38:56.201022315 +0000 -@@ -22858,46 +22858,53 @@ process_file (char * file_name) - Filedata * filedata = NULL; - struct stat statbuf; - char armag[SARMAG]; -- bool ret = true; -+ bool ret = false; -+ char * name; -+ char * saved_program_name; -+ -+ /* Overload program_name to include file_name. Doing this means -+ that warning/error messages will positively identify the file -+ concerned even when multiple instances of readelf are running. */ -+ name = xmalloc (strlen (program_name) + strlen (file_name) + 3); -+ sprintf (name, "%s: %s", program_name, file_name); -+ saved_program_name = program_name; -+ program_name = name; - - if (stat (file_name, &statbuf) < 0) - { - if (errno == ENOENT) -- error (_("'%s': No such file\n"), file_name); -+ error (_("No such file\n")); - else -- error (_("Could not locate '%s'. System error message: %s\n"), -- file_name, strerror (errno)); -- return false; -+ error (_("Could not locate file. System error message: %s\n"), -+ strerror (errno)); -+ goto done; - } - - if (! S_ISREG (statbuf.st_mode)) - { -- error (_("'%s' is not an ordinary file\n"), file_name); -- return false; -+ error (_("Not an ordinary file\n")); -+ goto done; - } - - filedata = calloc (1, sizeof * filedata); - if (filedata == NULL) - { - error (_("Out of memory allocating file data structure\n")); -- return false; -+ goto done; - } - - filedata->file_name = file_name; - filedata->handle = fopen (file_name, "rb"); - if (filedata->handle == NULL) - { -- error (_("Input file '%s' is not readable.\n"), file_name); -- free (filedata); -- return false; -+ error (_("Not readable\n")); -+ goto done; - } - - if (fread (armag, SARMAG, 1, filedata->handle) != 1) - { -- error (_("%s: Failed to read file's magic number\n"), file_name); -- fclose (filedata->handle); -- free (filedata); -- return false; -+ error (_("Failed to read file's magic number\n")); -+ goto done; - } - - filedata->file_size = statbuf.st_size; -@@ -22905,33 +22912,39 @@ process_file (char * file_name) - - if (memcmp (armag, ARMAG, SARMAG) == 0) - { -- if (! process_archive (filedata, false)) -- ret = false; -+ if (process_archive (filedata, false)) -+ ret = true; - } - else if (memcmp (armag, ARMAGT, SARMAG) == 0) - { -- if ( ! process_archive (filedata, true)) -- ret = false; -+ if (process_archive (filedata, true)) -+ ret = true; - } - else - { - if (do_archive_index && !check_all) -- error (_("File %s is not an archive so its index cannot be displayed.\n"), -- file_name); -+ error (_("Not an archive so its index cannot be displayed.\n")); - - rewind (filedata->handle); - filedata->archive_file_size = filedata->archive_file_offset = 0; - -- if (! process_object (filedata)) -- ret = false; -+ if (process_object (filedata)) -+ ret = true; - } - -- fclose (filedata->handle); -- free (filedata->section_headers); -- free (filedata->program_headers); -- free (filedata->string_table); -- free (filedata->dump.dump_sects); -- free (filedata); -+ done: -+ if (filedata) -+ { -+ if (filedata->handle != NULL) -+ fclose (filedata->handle); -+ free (filedata->section_headers); -+ free (filedata->program_headers); -+ free (filedata->string_table); -+ free (filedata->dump.dump_sects); -+ free (filedata); -+ } -+ free (program_name); -+ program_name = saved_program_name; - - free (ba_cache.strtab); - ba_cache.strtab = NULL; -Only in binutils-2.40/binutils: readelf.c.orig diff --git a/binutils-fix-testsuite-failures.patch b/binutils-fix-testsuite-failures.patch deleted file mode 100644 index c2b19a5..0000000 --- a/binutils-fix-testsuite-failures.patch +++ /dev/null @@ -1,330 +0,0 @@ -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:33:21.979627285 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 13:40:26.911199033 +0000 -@@ -34,5 +34,6 @@ hook called: claim_file tmpdir/libtext.a - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-13.d 2019-02-15 13:41:30.189692800 +0000 -@@ -23,5 +23,3 @@ hook called: claim_file tmpdir/main.o \[ - hook called: claim_file .*/ld/testsuite/ld-plugin/func.c \[@0/.* CLAIMED - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... --.*main.c.*: undefined reference to `\.?func' --#... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-14.d 2019-02-15 13:42:03.598430960 +0000 -@@ -27,7 +27,6 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-15.d 2019-02-15 13:42:28.014239600 +0000 -@@ -28,7 +28,6 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-16.d 2019-02-15 13:43:21.309821910 +0000 -@@ -30,9 +30,8 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-17.d 2019-02-15 13:43:54.925558451 +0000 -@@ -31,7 +31,8 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-20.d 2019-02-15 13:49:20.091010016 +0000 -@@ -2,6 +2,5 @@ hook called: all symbols read. - Input: func.c \(tmpdir/libfunc.a\) - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:33:21.978627293 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-21.d 2019-02-15 13:49:34.506897033 +0000 -@@ -2,6 +2,5 @@ hook called: all symbols read. - Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-22.d 2019-02-15 13:50:00.409694022 +0000 -@@ -2,6 +2,5 @@ Claimed: tmpdir/libfunc.a \[@.* - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:33:21.979627285 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-23.d 2019-02-15 13:50:14.938580156 +0000 -@@ -2,6 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-24.d 2019-02-15 13:49:46.346804240 +0000 -@@ -2,4 +2,5 @@ hook called: all symbols read. - Input: .*/ld/testsuite/ld-plugin/func.c \(.*/ld/testsuite/ld-plugin/func.c\) - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:33:21.978627293 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-25.d 2019-02-15 13:50:29.322467422 +0000 -@@ -2,4 +2,5 @@ Claimed: .*/ld/testsuite/ld-plugin/func. - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF.* -+#... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 13:45:05.343006557 +0000 -@@ -1 +1,3 @@ - .*: error: Error -+#... -+ -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:33:21.978627293 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-29.d 2019-02-15 13:45:22.764870016 +0000 -@@ -1 +1,2 @@ - .*: warning: Warning -+#... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:33:21.976627309 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-30.d 2019-02-15 13:48:57.067190464 +0000 -@@ -24,3 +24,4 @@ hook called: claim_file tmpdir/main.o \[ - hook called: claim_file tmpdir/func.o \[@0/.* not claimed - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - hook called: claim_file tmpdir/libempty.a \[@.* not claimed -+#pass -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:33:21.979627285 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-6.d 2019-02-15 13:37:14.672749977 +0000 -@@ -27,7 +27,6 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-7.d 2019-02-15 13:37:58.000400421 +0000 -@@ -28,7 +28,6 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:33:21.980627277 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 13:38:34.096109209 +0000 -@@ -32,7 +32,6 @@ hook called: claim_file tmpdir/text.o \[ - hook called: all symbols read. - Sym: '_?func' Resolution: LDPR_PREVAILING_DEF - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --.*: tmpdir/main.o: in function `main': --.*main.c.*: undefined reference to `\.?func' -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:33:21.977627301 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-9.d 2019-02-15 13:39:52.655475403 +0000 -@@ -31,7 +31,8 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d binutils-2.32/ld/testsuite/ld-plugin/pr20070.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:33:21.976627309 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/pr20070.d 2019-02-15 13:50:56.874251486 +0000 -@@ -5,5 +5,6 @@ Sym: 'weakdef' Resolution: LDPR_PREVAILI - Sym: 'undef' Resolution: LDPR_UNDEF - Sym: 'weakundef' Resolution: LDPR_UNDEF - Sym: 'common' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp binutils-2.32/ld/testsuite/ld-srec/srec.exp ---- binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:33:21.938627615 +0000 -+++ binutils-2.32/ld/testsuite/ld-srec/srec.exp 2019-02-15 13:53:58.744814006 +0000 -@@ -21,6 +21,8 @@ - - # Get the offset from an S-record line to the start of the data. - -+return -+ - proc srec_off { l } { - if [string match "S1*" $l] { - return 8 -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:10:59.038709514 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:13:53.532300721 +0000 -@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/libtext.a \[@.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:10:59.041709490 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-11.d 2019-02-15 14:14:50.061844322 +0000 -@@ -35,8 +35,9 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:10:58.942710289 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-18.d 2019-02-15 14:15:20.030602369 +0000 -@@ -32,7 +32,8 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:10:59.024709627 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-19.d 2019-02-15 14:15:54.926320633 +0000 -@@ -35,8 +35,9 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+#... - hook called: cleanup. - #... -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:10:58.998709837 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-28.d 2019-02-15 14:12:19.856057024 +0000 -@@ -1,3 +1,2 @@ - .*: error: Error - #... -- -diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d ---- binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:10:59.074709224 +0000 -+++ binutils-2.32/ld/testsuite/ld-plugin/plugin-8.d 2019-02-15 14:11:48.144313048 +0000 -@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF -+Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-elfvers/vers24.rd binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd ---- binutils.orig/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 09:45:44.013108697 +0100 -+++ binutils-2.30/ld/testsuite/ld-elfvers/vers24.rd 2018-09-05 12:06:17.287425232 +0100 -@@ -7,9 +7,9 @@ Symbol table '.dynsym' contains [0-9]+ e - # And ensure the dynamic symbol table contains at least x@VERS.0 - # and foo@@VERS.0 symbols - #... -- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0 -+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.* - #... -- +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0 -+ +[0-9]+: [0-9a-f]+ +(4 +OBJECT +GLOBAL +DEFAULT +[0-9]+ _?x|[0-9]+ +FUNC +GLOBAL +DEFAULT .* [0-9]+ _?foo@)@VERS\.0.* - #... - Symbol table '.symtab' contains [0-9]+ entries: - #pass -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.30/ld/testsuite/ld-plugin/plugin.exp ---- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 09:45:44.023108605 +0100 -+++ binutils-2.30/ld/testsuite/ld-plugin/plugin.exp 2018-09-05 11:18:53.997202105 +0100 -@@ -118,6 +118,12 @@ if { $can_compile && !$failed_compile } - } - } - -+# I do not know why, but the underscore prefix test is going -+# wrong on ppc64le targets. So override it here. -+if { [istarget powerpc*-*-linux*] || [istarget x86_64*-*-linux*] } { -+ set _ "" -+} -+ - set testobjfiles "tmpdir/main.o tmpdir/func.o tmpdir/text.o" - set testobjfiles_notext "tmpdir/main.o tmpdir/func.o" - set testsrcfiles "tmpdir/main.o $srcdir/$subdir/func.c tmpdir/text.o" diff --git a/binutils-ld-read-only-script.patch b/binutils-ld-read-only-script.patch deleted file mode 100644 index 481b387..0000000 --- a/binutils-ld-read-only-script.patch +++ /dev/null @@ -1,158 +0,0 @@ -From a0b911576eb49e06a457ebf757b42543d2c7e548 Mon Sep 17 00:00:00 2001 -From: Luca Boccassi -Date: Wed, 21 Jul 2021 14:32:03 +0100 -Subject: [PATCH] Allows linker scripts to set the SEC_READONLY flag. - -* ld.texi: Document new output section type. -* ldgram.y: Add new token. -* ldlang.c: Handle the new flag. -* ldlang.h: Add readonly_section to list of section types. -* ldlex.l: Add a new identifier. -* testsuite/ld-scripts/output-section-types.t: New example linker script. -* testsuite/ld-scripts/output-section-types.d: Test driver. -* testsyute/ld-scripts/script.exp: Run the new test. - -(cherry picked from commit 6b86da53d5ee2022b9065f445d23356190380746) ---- - ld/ld.texi | 2 ++ - ld/ldgram.y | 2 ++ - ld/ldlang.c | 6 ++++++ - ld/ldlang.h | 3 ++- - ld/ldlex.l | 1 + - ld/testsuite/ld-scripts/output-section-types.d | 13 +++++++++++++ - ld/testsuite/ld-scripts/output-section-types.t | 7 +++++++ - ld/testsuite/ld-scripts/script.exp | 1 + - 8 files changed, 34 insertions(+), 1 deletion(-) - create mode 100644 ld/testsuite/ld-scripts/output-section-types.d - create mode 100644 ld/testsuite/ld-scripts/output-section-types.t - -diff --git a/ld/ld.texi b/ld/ld.texi -index dd8f571d4e4..cf1e637adbf 100644 ---- a/ld/ld.texi -+++ b/ld/ld.texi -@@ -5456,6 +5456,8 @@ parentheses. The following types are defined: - @item NOLOAD - The section should be marked as not loadable, so that it will not be - loaded into memory when the program is run. -+@item READONLY -+The section should be marked as read-only. - @item DSECT - @itemx COPY - @itemx INFO -diff --git a/ld/ldgram.y b/ld/ldgram.y -index dd911f46169..31e0071c6fc 100644 ---- a/ld/ldgram.y -+++ b/ld/ldgram.y -@@ -139,6 +139,7 @@ static int error_index; - %token REGION_ALIAS - %token LD_FEATURE - %token NOLOAD DSECT COPY INFO OVERLAY -+%token READONLY - %token DEFINED TARGET_K SEARCH_DIR MAP ENTRY - %token NEXT - %token SIZEOF ALIGNOF ADDR LOADADDR MAX_K MIN_K -@@ -1123,6 +1124,7 @@ type: - | COPY { sectype = noalloc_section; } - | INFO { sectype = noalloc_section; } - | OVERLAY { sectype = noalloc_section; } -+ | READONLY { sectype = readonly_section; } - ; - - atype: -diff --git a/ld/ldlang.c b/ld/ldlang.c -index 37b64c89ee1..2610be995ca 100644 ---- a/ld/ldlang.c -+++ b/ld/ldlang.c -@@ -2639,6 +2639,9 @@ lang_add_section (lang_statement_list_type *ptr, - case noalloc_section: - flags &= ~SEC_ALLOC; - break; -+ case readonly_section: -+ flags |= SEC_READONLY; -+ break; - case noload_section: - flags &= ~SEC_LOAD; - flags |= SEC_NEVER_LOAD; -@@ -4232,6 +4235,9 @@ map_input_to_output_sections - case noalloc_section: - flags = SEC_HAS_CONTENTS; - break; -+ case readonly_section: -+ flags |= SEC_READONLY; -+ break; - case noload_section: - if (bfd_get_flavour (link_info.output_bfd) - == bfd_target_elf_flavour) -diff --git a/ld/ldlang.h b/ld/ldlang.h -index 6fbe16d97d9..f68ae27b409 100644 ---- a/ld/ldlang.h -+++ b/ld/ldlang.h -@@ -121,7 +121,8 @@ enum section_type - first_overlay_section, - overlay_section, - noload_section, -- noalloc_section -+ noalloc_section, -+ readonly_section - }; - - /* This structure holds a list of program headers describing -diff --git a/ld/ldlex.l b/ld/ldlex.l -index c1b15263587..25b4bcaae01 100644 ---- a/ld/ldlex.l -+++ b/ld/ldlex.l -@@ -294,6 +294,7 @@ V_IDENTIFIER [*?.$_a-zA-Z\[\]\-\!\^\\]([*?.$_a-zA-Z0-9\[\]\-\!\^\\]|::)* - "SORT_BY_INIT_PRIORITY" { RTOKEN(SORT_BY_INIT_PRIORITY); } - "SORT_NONE" { RTOKEN(SORT_NONE); } - "NOLOAD" { RTOKEN(NOLOAD);} -+"READONLY" { RTOKEN(READONLY);} - "DSECT" { RTOKEN(DSECT);} - "COPY" { RTOKEN(COPY);} - "INFO" { RTOKEN(INFO);} -diff --git a/ld/testsuite/ld-scripts/output-section-types.d b/ld/testsuite/ld-scripts/output-section-types.d -new file mode 100644 -index 00000000000..ab124fa4dd7 ---- /dev/null -+++ b/ld/testsuite/ld-scripts/output-section-types.d -@@ -0,0 +1,13 @@ -+#ld: -Toutput-section-types.t -+#source: align2a.s -+#objdump: -h -+#target: [is_elf_format] -+ -+#... -+ . \.rom.* -+[ ]+ALLOC, READONLY -+ . \.ro.* -+[ ]+CONTENTS, ALLOC, LOAD, READONLY, DATA -+ . \.over.* -+[ ]+CONTENTS, READONLY -+#pass -diff --git a/ld/testsuite/ld-scripts/output-section-types.t b/ld/testsuite/ld-scripts/output-section-types.t -new file mode 100644 -index 00000000000..d8fdfda1a03 ---- /dev/null -+++ b/ld/testsuite/ld-scripts/output-section-types.t -@@ -0,0 +1,7 @@ -+SECTIONS { -+ .rom (NOLOAD) : { LONG(1234); } -+ .ro (READONLY) : { LONG(5678); } -+ .over (OVERLAY) : { LONG(0123); } -+ /DISCARD/ : { *(*) } -+ -+} -diff --git a/ld/testsuite/ld-scripts/script.exp b/ld/testsuite/ld-scripts/script.exp -index 961cd08c4b1..ff50199b3ae 100644 ---- a/ld/testsuite/ld-scripts/script.exp -+++ b/ld/testsuite/ld-scripts/script.exp -@@ -229,6 +229,7 @@ foreach test_script $test_script_list { - - run_dump_test "align-with-input" - run_dump_test "pr20302" -+run_dump_test "output-section-types" - - run_dump_test "segment-start" {{name (default)}} - run_dump_test "segment-start" {{name (overridden)} \ --- -2.30.2 - diff --git a/binutils-objcopy-note-merge-speedup.patch b/binutils-objcopy-note-merge-speedup.patch deleted file mode 100644 index 1827fc4..0000000 --- a/binutils-objcopy-note-merge-speedup.patch +++ /dev/null @@ -1,44 +0,0 @@ ---- binutils.orig/binutils/objcopy.c 2023-01-16 12:15:46.405649346 +0000 -+++ binutils-2.39/binutils/objcopy.c 2023-01-16 12:16:48.892667868 +0000 -@@ -2383,6 +2383,8 @@ merge_gnu_build_notes (bfd * ab - other note then if they are both of the same type (open - or func) then they can be merged and one deleted. If - they are of different types then they cannot be merged. */ -+ objcopy_internal_note * prev_note = NULL; -+ - for (pnote = pnotes; pnote < pnotes_end; pnote ++) - { - /* Skip already deleted notes. -@@ -2404,7 +2406,9 @@ merge_gnu_build_notes (bfd * ab - objcopy_internal_note * back; - - /* Rule 2: Check to see if there is an identical previous note. */ -- for (iter = 0, back = pnote - 1; back >= pnotes; back --) -+ for (iter = 0, back = prev_note ? prev_note : pnote - 1; -+ back >= pnotes; -+ back --) - { - if (is_deleted_note (back)) - continue; -@@ -2466,11 +2470,18 @@ merge_gnu_build_notes (bfd * ab - break; - } - } --#if DEBUG_MERGE -+ -+ - if (! is_deleted_note (pnote)) -- merge_debug ("Unable to do anything with note at %#08lx\n", -- (pnote->note.namedata - (char *) contents) - 12); -+ { -+ /* Keep a pointer to this note, so that we can -+ start the next search for rule 2 matches here. */ -+ prev_note = pnote; -+#if DEBUG_MERGE -+ merge_debug ("Unable to do anything with note at %#08lx\n", -+ (pnote->note.namedata - (char *) contents) - 12); - #endif -+ } - } - - /* Resort the notes. */ diff --git a/binutils-readelf-other-sym-info.patch b/binutils-readelf-other-sym-info.patch deleted file mode 100644 index 72913ba..0000000 --- a/binutils-readelf-other-sym-info.patch +++ /dev/null @@ -1,35 +0,0 @@ ---- binutils.orig/binutils/readelf.c 2020-07-24 15:08:30.317597020 +0100 -+++ binutils-2.35/binutils/readelf.c 2020-07-24 15:09:39.029155552 +0100 -@@ -12069,11 +12069,13 @@ print_dynamic_symbol (Filedata *filedata - unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); - - printf (" %-7s", get_symbol_visibility (vis)); -+#if 0 - /* Check to see if any other bits in the st_other field are set. - Note - displaying this information disrupts the layout of the - table being generated, but for the moment this case is very rare. */ - if (psym->st_other ^ vis) - printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); -+#endif - } - printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx)); - -@@ -12112,7 +12114,17 @@ print_dynamic_symbol (Filedata *filedata - version_string); - } - -- putchar ('\n'); -+#if 1 -+ { -+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); -+ -+ /* Check to see if any other bits in the st_other field are set. */ -+ if (psym->st_other ^ vis) -+ printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis)); -+ } -+#endif -+ -+ putchar ('\n'); - - if (ELF_ST_BIND (psym->st_info) == STB_LOCAL - && section != NULL diff --git a/binutils-reloc-symtab.patch b/binutils-reloc-symtab.patch deleted file mode 100644 index d217306..0000000 --- a/binutils-reloc-symtab.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- binutils.orig/bfd/elf.c 2023-03-30 10:01:40.824181703 +0100 -+++ binutils-2.40/bfd/elf.c 2023-03-30 10:02:23.103135337 +0100 -@@ -3877,21 +3877,23 @@ assign_section_numbers (bfd *abfd, struc - { - case SHT_REL: - case SHT_RELA: -- /* A reloc section which we are treating as a normal BFD -- section. sh_link is the section index of the symbol -- table. sh_info is the section index of the section to -- which the relocation entries apply. We assume that an -- allocated reloc section uses the dynamic symbol table -- if there is one. Otherwise we guess the normal symbol -- table. FIXME: How can we be sure? */ -- if (d->this_hdr.sh_link == 0 && (sec->flags & SEC_ALLOC) != 0) -+ /* sh_link is the section index of the symbol table. -+ sh_info is the section index of the section to which the -+ relocation entries apply. */ -+ if (d->this_hdr.sh_link == 0) - { -- s = bfd_get_section_by_name (abfd, ".dynsym"); -- if (s != NULL) -- d->this_hdr.sh_link = elf_section_data (s)->this_idx; -+ /* FIXME maybe: If this is a reloc section which we are -+ treating as a normal section then we likely should -+ not be assuming its sh_link is .dynsym or .symtab. */ -+ if ((sec->flags & SEC_ALLOC) != 0) -+ { -+ s = bfd_get_section_by_name (abfd, ".dynsym"); -+ if (s != NULL) -+ d->this_hdr.sh_link = elf_section_data (s)->this_idx; -+ } -+ else -+ d->this_hdr.sh_link = elf_onesymtab (abfd); - } -- if (d->this_hdr.sh_link == 0) -- d->this_hdr.sh_link = elf_onesymtab (abfd); - - s = elf_get_reloc_section (sec); - if (s != NULL) ---- binutils.orig/binutils/objcopy.c 2023-03-30 10:01:41.063181441 +0100 -+++ binutils-2.40/binutils/objcopy.c 2023-03-30 12:25:41.439108276 +0100 -@@ -2256,7 +2256,7 @@ merge_gnu_build_notes (bfd * ab - { - if (pnote->note.namedata[4] == '2') - ++ version_2_seen; -- else if (pnote->note.namedata[4] == '3') -+ else if (pnote->note.namedata[4] == '3' || pnote->note.namedata[4] == '4') - ++ version_3_seen; - else - { diff --git a/binutils-testsuite-fixes.patch b/binutils-testsuite-fixes.patch index 71045a9..0879eb8 100644 --- a/binutils-testsuite-fixes.patch +++ b/binutils-testsuite-fixes.patch @@ -1,373 +1,154 @@ -diff -rup binutils.orig/binutils/testsuite/binutils-all/pr26160.r binutils-2.40/binutils/testsuite/binutils-all/pr26160.r ---- binutils.orig/binutils/testsuite/binutils-all/pr26160.r 2023-02-13 16:54:22.911866224 +0000 -+++ binutils-2.40/binutils/testsuite/binutils-all/pr26160.r 2023-02-13 17:02:10.344174897 +0000 -@@ -30,14 +30,14 @@ Contents of the .debug_info.dwo section: - DW_AT_decl_file : 1 - DW_AT_decl_line : 30 - DW_AT_type : <0x90> -- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: (0x)?0\): 0 - DW_AT_high_pc : 0x304 - DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) - DW_AT_GNU_all_tail_call_sites: 1 - DW_AT_sibling : <0x11b> - <2>: Abbrev Number: 14 \(DW_TAG_lexical_block\) -- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x1\): 0 - DW_AT_high_pc : 0x2fa - <3>: Abbrev Number: 15 \(DW_TAG_variable\) -@@ -58,7 +58,7 @@ Contents of the .debug_info.dwo section: - DW_AT_artificial : 1 - DW_AT_location : 2 byte block: fb 2 \(DW_OP_GNU_addr_index <0x2>\) - <3><102>: Abbrev Number: 14 \(DW_TAG_lexical_block\) -- <103> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <103> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x3\): 0 - <104> DW_AT_high_pc : 0x2f - <4><10c>: Abbrev Number: 17 \(DW_TAG_variable\) -@@ -277,7 +277,7 @@ Contents of the .debug_info.dwo section: - <2dd> DW_AT_decl_file : 1 - <2de> DW_AT_decl_line : 70 - <2df> DW_AT_linkage_name: _Z4f13iv -- <2e8> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <2e8> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: (0x)?0\): 0 - <2e9> DW_AT_high_pc : 0x6 - <2f1> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -286,7 +286,7 @@ Contents of the .debug_info.dwo section: - <2f4> DW_AT_specification: <0x219> - <2f8> DW_AT_decl_file : 2 - <2f9> DW_AT_decl_line : 30 -- <2fa> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <2fa> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x1\): 0 - <2fb> DW_AT_high_pc : 0x20 - <303> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -305,7 +305,7 @@ Contents of the .debug_info.dwo section: - <31d> DW_AT_specification: <0x223> - <321> DW_AT_decl_file : 2 - <322> DW_AT_decl_line : 38 -- <323> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <323> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x2\): 0 - <324> DW_AT_high_pc : 0x18 - <32c> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -322,7 +322,7 @@ Contents of the .debug_info.dwo section: - <341> DW_AT_specification: <0x22d> - <345> DW_AT_decl_file : 2 - <346> DW_AT_decl_line : 46 -- <347> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <347> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x3\): 0 - <348> DW_AT_high_pc : 0x18 - <350> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -339,7 +339,7 @@ Contents of the .debug_info.dwo section: - <365> DW_AT_specification: <0x237> - <369> DW_AT_decl_file : 2 - <36a> DW_AT_decl_line : 54 -- <36b> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <36b> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x4\): 0 - <36c> DW_AT_high_pc : 0x16 - <374> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -356,7 +356,7 @@ Contents of the .debug_info.dwo section: - <389> DW_AT_specification: <0x26b> - <38d> DW_AT_decl_file : 2 - <38e> DW_AT_decl_line : 62 -- <38f> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <38f> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x5\): 0 - <390> DW_AT_high_pc : 0x16 - <398> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -375,7 +375,7 @@ Contents of the .debug_info.dwo section: - <3b2> DW_AT_specification: <0x275> - <3b6> DW_AT_decl_file : 2 - <3b7> DW_AT_decl_line : 72 -- <3b8> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <3b8> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x6\): 0 - <3b9> DW_AT_high_pc : 0x1b - <3c1> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -392,7 +392,7 @@ Contents of the .debug_info.dwo section: - <3d6> DW_AT_specification: <0x27f> - <3da> DW_AT_decl_file : 2 - <3db> DW_AT_decl_line : 82 -- <3dc> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <3dc> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x7\): 0 - <3dd> DW_AT_high_pc : 0x1b - <3e5> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -409,7 +409,7 @@ Contents of the .debug_info.dwo section: - <3fa> DW_AT_specification: <0x289> - <3fe> DW_AT_decl_file : 2 - <3ff> DW_AT_decl_line : 92 -- <400> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <400> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x8\): 0 - <401> DW_AT_high_pc : 0x19 - <409> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -426,7 +426,7 @@ Contents of the .debug_info.dwo section: - <41e> DW_AT_specification: <0x2ae> - <422> DW_AT_decl_file : 2 - <423> DW_AT_decl_line : 102 -- <424> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <424> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x9\): 0 - <425> DW_AT_high_pc : 0x19 - <42d> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -445,7 +445,7 @@ Contents of the .debug_info.dwo section: - <447> DW_AT_specification: <0x2b8> - <44b> DW_AT_decl_file : 2 - <44c> DW_AT_decl_line : 112 -- <44d> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <44d> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0xa\): 0 - <44e> DW_AT_high_pc : 0x1f - <456> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -465,7 +465,7 @@ Contents of the .debug_info.dwo section: - <471> DW_AT_decl_line : 120 - <472> DW_AT_linkage_name: _Z4f11av - <47b> DW_AT_type : <0x242> -- <47f> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <47f> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0xb\): 0 - <480> DW_AT_high_pc : 0xb - <488> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -474,7 +474,7 @@ Contents of the .debug_info.dwo section: - <48b> DW_AT_specification: <0x2c2> - <48f> DW_AT_decl_file : 2 - <490> DW_AT_decl_line : 126 -- <491> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <491> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0xc\): 0 - <492> DW_AT_high_pc : 0x20 - <49a> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -494,7 +494,7 @@ Contents of the .debug_info.dwo section: - <4b4> DW_AT_decl_line : 134 - <4b5> DW_AT_linkage_name: _Z3t12v - <4bd> DW_AT_type : <0x249> -- <4c1> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <4c1> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0xd\): 0 - <4c2> DW_AT_high_pc : 0x19 - <4ca> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -506,7 +506,7 @@ Contents of the .debug_info.dwo section: - <4d2> DW_AT_decl_line : 142 - <4d3> DW_AT_linkage_name: _Z3t13v - <4db> DW_AT_type : <0x249> -- <4df> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <4df> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0xe\): 0 - <4e0> DW_AT_high_pc : 0x14 - <4e8> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -518,14 +518,14 @@ Contents of the .debug_info.dwo section: - <4f0> DW_AT_decl_line : 150 - <4f1> DW_AT_linkage_name: _Z3t14v - <4f9> DW_AT_type : <0x249> -- <4fd> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <4fd> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0xf\): 0 - <4fe> DW_AT_high_pc : 0x61 - <506> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) - <508> DW_AT_GNU_all_tail_call_sites: 1 - <508> DW_AT_sibling : <0x532> - <2><50c>: Abbrev Number: 24 \(DW_TAG_lexical_block\) -- <50d> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <50d> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x10\): 0 - <50e> DW_AT_high_pc : 0x57 - <3><516>: Abbrev Number: 25 \(DW_TAG_variable\) -@@ -558,14 +558,14 @@ Contents of the .debug_info.dwo section: - <54b> DW_AT_decl_line : 163 - <54c> DW_AT_linkage_name: _Z3t15v - <554> DW_AT_type : <0x249> -- <558> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <558> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x11\): 0 - <559> DW_AT_high_pc : 0x5d - <561> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) - <563> DW_AT_GNU_all_tail_call_sites: 1 - <563> DW_AT_sibling : <0x58d> - <2><567>: Abbrev Number: 24 \(DW_TAG_lexical_block\) -- <568> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <568> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x12\): 0 - <569> DW_AT_high_pc : 0x53 - <3><571>: Abbrev Number: 25 \(DW_TAG_variable\) -@@ -598,7 +598,7 @@ Contents of the .debug_info.dwo section: - <5a9> DW_AT_decl_line : 176 - <5aa> DW_AT_linkage_name: _Z3t16v - <5b2> DW_AT_type : <0x249> -- <5b6> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <5b6> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x13\): 0 - <5b7> DW_AT_high_pc : 0x13 - <5bf> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -610,14 +610,14 @@ Contents of the .debug_info.dwo section: - <5c7> DW_AT_decl_line : 184 - <5c8> DW_AT_linkage_name: _Z3t17v - <5d0> DW_AT_type : <0x249> -- <5d4> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <5d4> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x14\): 0 - <5d5> DW_AT_high_pc : 0x5f - <5dd> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) - <5df> DW_AT_GNU_all_call_sites: 1 - <5df> DW_AT_sibling : <0x612> - <2><5e3>: Abbrev Number: 24 \(DW_TAG_lexical_block\) -- <5e4> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <5e4> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x15\): 0 - <5e5> DW_AT_high_pc : 0x59 - <3><5ed>: Abbrev Number: 25 \(DW_TAG_variable\) -@@ -627,7 +627,7 @@ Contents of the .debug_info.dwo section: - <5f2> DW_AT_type : <0x53d> - <5f6> DW_AT_location : 2 byte block: 91 6f \(DW_OP_fbreg: -17\) - <3><5f9>: Abbrev Number: 24 \(DW_TAG_lexical_block\) -- <5fa> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <5fa> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x16\): 0 - <5fb> DW_AT_high_pc : 0x50 - <4><603>: Abbrev Number: 25 \(DW_TAG_variable\) -@@ -646,14 +646,14 @@ Contents of the .debug_info.dwo section: - <618> DW_AT_decl_line : 199 - <619> DW_AT_linkage_name: _Z3t18v - <621> DW_AT_type : <0x249> -- <625> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <625> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x17\): 0 - <626> DW_AT_high_pc : 0x5f - <62e> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) - <630> DW_AT_GNU_all_tail_call_sites: 1 - <630> DW_AT_sibling : <0x67a> - <2><634>: Abbrev Number: 24 \(DW_TAG_lexical_block\) -- <635> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <635> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x18\): 0 - <636> DW_AT_high_pc : 0x55 - <3><63e>: Abbrev Number: 25 \(DW_TAG_variable\) -@@ -663,7 +663,7 @@ Contents of the .debug_info.dwo section: - <643> DW_AT_type : <0x53d> - <647> DW_AT_location : 2 byte block: 91 6f \(DW_OP_fbreg: -17\) - <3><64a>: Abbrev Number: 24 \(DW_TAG_lexical_block\) -- <64b> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <64b> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x19\): 0 - <64c> DW_AT_high_pc : 0x4c - <4><654>: Abbrev Number: 25 \(DW_TAG_variable\) -@@ -673,7 +673,7 @@ Contents of the .debug_info.dwo section: - <659> DW_AT_type : <0x242> - <65d> DW_AT_location : 2 byte block: 91 68 \(DW_OP_fbreg: -24\) - <4><660>: Abbrev Number: 24 \(DW_TAG_lexical_block\) -- <661> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <661> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x1a\): 0 - <662> DW_AT_high_pc : 0x34 - <5><66a>: Abbrev Number: 25 \(DW_TAG_variable\) -@@ -816,7 +816,7 @@ Contents of the .debug_info.dwo section: - <7d3> DW_AT_decl_line : 32 - <7d4> DW_AT_linkage_name: _Z4t16av - <7dd> DW_AT_type : <0x7c4> -- <7e1> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <7e1> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: (0x)?0\): 0 - <7e2> DW_AT_high_pc : 0x13 - <7ea> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -909,7 +909,7 @@ Contents of the .debug_info.dwo section: - <908> DW_AT_decl_file : 1 - <909> DW_AT_decl_line : 70 - <90a> DW_AT_linkage_name: _Z4f13iv -- <913> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <913> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: (0x)?0\): 0 - <914> DW_AT_high_pc : 0x6 - <91c> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -917,7 +917,7 @@ Contents of the .debug_info.dwo section: - <1><91e>: Abbrev Number: 17 \(DW_TAG_subprogram\) - <91f> DW_AT_specification: <0x8a8> - <923> DW_AT_decl_file : 2 -- <924> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <924> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x1\): 0 - <925> DW_AT_high_pc : 0xf - <92d> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -936,7 +936,7 @@ Contents of the .debug_info.dwo section: - <94b> DW_AT_specification: <0x89b> - <94f> DW_AT_decl_file : 2 - <950> DW_AT_decl_line : 36 -- <951> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <951> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x2\): 0 - <952> DW_AT_high_pc : 0x20 - <95a> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -956,7 +956,7 @@ Contents of the .debug_info.dwo section: - <978> DW_AT_decl_line : 72 - <979> DW_AT_linkage_name: _Z3f10v - <981> DW_AT_type : <0x8b7> -- <985> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <985> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x3\): 0 - <986> DW_AT_high_pc : 0xb - <98e> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -968,7 +968,7 @@ Contents of the .debug_info.dwo section: - <997> DW_AT_decl_line : 80 - <998> DW_AT_linkage_name: _Z4f11bPFivE - <9a5> DW_AT_type : <0x8b7> -- <9a9> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <9a9> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x4\): 0 - <9aa> DW_AT_high_pc : 0x14 - <9b2> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -990,7 +990,7 @@ Contents of the .debug_info.dwo section: - <9d3> DW_AT_specification: <0x8e0> - <9d7> DW_AT_decl_file : 2 - <9d8> DW_AT_decl_line : 88 -- <9d9> DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ <9d9> DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x5\): 0 - <9da> DW_AT_high_pc : 0xf - <9e2> DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -1013,7 +1013,7 @@ Contents of the .debug_info.dwo section: - DW_AT_decl_line : 96 - DW_AT_linkage_name: _Z3f13v - DW_AT_type : <0xa1e> -- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x6\): 0 - DW_AT_high_pc : 0xb - DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -1028,7 +1028,7 @@ Contents of the .debug_info.dwo section: - DW_AT_decl_line : 104 - DW_AT_linkage_name: _Z3f14v - DW_AT_type : <0xa42> -- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x7\): 0 - DW_AT_high_pc : 0xb - DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -1049,7 +1049,7 @@ Contents of the .debug_info.dwo section: - DW_AT_decl_line : 112 - DW_AT_linkage_name: _Z3f15v - DW_AT_type : <0xa73> -- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x8\): 0 - DW_AT_high_pc : 0xb - DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -@@ -1070,7 +1070,7 @@ Contents of the .debug_info.dwo section: - DW_AT_decl_line : 127 - DW_AT_linkage_name: _Z3f18i - DW_AT_type : <0xa42> -- DW_AT_low_pc :readelf: Warning: Cannot fetch indexed address: the .debug_addr section is missing -+ DW_AT_low_pc :readelf: .*: Warning: Cannot fetch indexed address: the .debug_addr section is missing - \(index: 0x9\): 0 - DW_AT_high_pc : 0x44 - DW_AT_frame_base : 1 byte block: 9c \(DW_OP_call_frame_cfa\) -diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.40/ld/testsuite/ld-plugin/lto.exp ---- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2023-02-13 16:54:24.008864640 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/lto.exp 2023-02-13 17:08:56.151508208 +0000 +--- binutils.orig/binutils/testsuite/binutils-all/addr2line.exp 2023-08-03 13:09:07.628503779 +0100 ++++ binutils-2.41/binutils/testsuite/binutils-all/addr2line.exp 2023-08-03 13:18:37.138443954 +0100 +@@ -39,7 +39,7 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\ + } else { + set list [regexp -inline -all -- {\S+} $contents] + set got [binutils_run $ADDR2LINE "-e tmpdir/testprog$exe [lindex $list 0]"] +- set want "$srcdir/$subdir/testprog.c:\[0-9\]+" ++ set want "$srcdir/$subdir/.\*" + if ![regexp $want $got] then { + fail "$testname $got\n" + } else { +@@ -54,7 +54,7 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\ + } else { + set list [regexp -inline -all -- {\S+} $contents] + set got [binutils_run $ADDR2LINE "-f -e tmpdir/testprog$exe [lindex $list 0]"] +- set want "fn\n$srcdir/$subdir/testprog.c:\[0-9\]+" ++ set want "fn\n$srcdir/$subdir/.\*" + if ![regexp $want $got] then { + fail "$testname -f option $got\n" + } else { +@@ -64,7 +64,7 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\ + #testcase for -s option. + #Using the same fn function address used in -f option. + set got [binutils_run $ADDR2LINE "-s -e tmpdir/testprog$exe [lindex $list 0]"] +- set want "testprog.c:\[0-9\]+" ++ set want ".\*\[0-9\]+" + if ![regexp $want $got] then { + fail "$testname -s option $got\n" + } else { +--- binutils.orig/binutils/testsuite/binutils-all/objdump.exp 2023-08-03 13:09:07.631503783 +0100 ++++ binutils-2.41/binutils/testsuite/binutils-all/objdump.exp 2023-08-03 14:51:54.621295727 +0100 +@@ -921,7 +921,7 @@ proc test_objdump_S { } { + } + } + +-test_objdump_S ++# test_objdump_S + + # Test objdump --private + proc test_objdump_P {} { +--- binutils.orig/ld/testsuite/ld-scripts/ld-version.d 2023-08-03 13:09:07.949504208 +0100 ++++ binutils-2.41/ld/testsuite/ld-scripts/ld-version.d 2023-08-03 15:13:01.374590134 +0100 +@@ -4,4 +4,4 @@ + # target: [is_elf_format] + + String dump of section '.comment': +-.*GNU ld \(.*\) 2.* ++.*GNU ld .* 2.* +--- binutils.orig/ld/testsuite/ld-scripts/ld-version-2.d 2023-08-03 13:09:07.949504208 +0100 ++++ binutils-2.41/ld/testsuite/ld-scripts/ld-version-2.d 2023-08-03 15:13:13.917605323 +0100 +@@ -4,4 +4,4 @@ + # target: [is_elf_format] + + String dump of section '.comment': +-.*GNU ld \(.*\) 2.* ++.*GNU ld .* 2.* +--- binutils.orig/ld/testsuite/ld-x86-64/pr22001-1b.err 2023-08-03 13:09:07.969504235 +0100 ++++ binutils-2.41/ld/testsuite/ld-x86-64/pr22001-1b.err 2023-08-03 15:22:49.743286617 +0100 +@@ -1,2 +1,2 @@ +-.*relocation R_X86_64_32S against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIE ++.*relocation R_X86_64_.* against symbol `copy' can not be used when making a P(D|I)E object; recompile with -fPIE + #... +--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2023-08-03 13:09:07.965504230 +0100 ++++ binutils-2.41/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2023-08-03 15:31:54.864037693 +0100 +@@ -1,7 +1,2 @@ + #... +-Disassembly of section .plt.got: +- +-[a-f0-9]+ <[_a-z]+@plt>: +-[ ]*[a-f0-9]+: f3 0f 1e fa endbr64 +-[ ]*[a-f0-9]+: ff 25 .. .. 3f 00 jmp +\*0x3f....\(%rip\) # ...... <.*> + #pass +--- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2023-08-03 13:09:07.975504243 +0100 ++++ binutils-2.41/ld/testsuite/ld-x86-64/x86-64.exp 2023-08-03 15:46:29.537416942 +0100 +@@ -1386,7 +1386,7 @@ if { [isnative] && [check_compiler_avail + "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2b.so" \ + "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ + { protected-func-1b.c } \ +- {{error_output "pr28875-func.err"}} \ ++ {} \ + "protected-func-2" \ + ] \ + [list \ +@@ -1402,7 +1402,7 @@ if { [isnative] && [check_compiler_avail + "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/libprotected-func-2c.so" \ + "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \ + { protected-func-1b.c } \ +- {{error_output "pr28875-func.err"}} \ ++ {} \ + "protected-func-2a" \ + ] \ + [list \ +@@ -2155,7 +2155,6 @@ if { [isnative] && [check_compiler_avail + } + } + +- undefined_weak "$NOPIE_CFLAGS" "$NOPIE_LDFLAGS" + undefined_weak "-fPIE" "" + undefined_weak "-fPIE" "-pie" + undefined_weak "-fPIE" "-Wl,-z,nodynamic-undefined-weak" +--- binutils.orig/binutils/testsuite/binutils-all/addr2line.exp 2023-08-04 14:00:37.692356718 +0100 ++++ binutils-2.41/binutils/testsuite/binutils-all/addr2line.exp 2023-08-04 14:04:32.627697316 +0100 +@@ -39,9 +39,9 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\ + } else { + set list [regexp -inline -all -- {\S+} $contents] + set got [binutils_run $ADDR2LINE "-e tmpdir/testprog$exe [lindex $list 0]"] +- set want "$srcdir/$subdir/.\*" ++ set want "$srcdir/.\*" + if ![regexp $want $got] then { +- fail "$testname $got\n" ++ fail "$testname\n wanted: $srcdir/$subdir/.*\n got: $got\n" + } else { + pass "$testname" + } +@@ -54,7 +54,7 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\ + } else { + set list [regexp -inline -all -- {\S+} $contents] + set got [binutils_run $ADDR2LINE "-f -e tmpdir/testprog$exe [lindex $list 0]"] +- set want "fn\n$srcdir/$subdir/.\*" ++ set want "fn\n$srcdir/.\*" + if ![regexp $want $got] then { + fail "$testname -f option $got\n" + } else { +--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2023-08-04 14:00:38.923357454 +0100 ++++ binutils-2.41/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2023-08-04 14:06:45.525679653 +0100 +@@ -1,2 +1,3 @@ + #... ++ + #pass +--- binutils.orig/binutils/testsuite/binutils-all/addr2line.exp 2023-08-04 16:05:44.678916015 +0100 ++++ binutils-2.41/binutils/testsuite/binutils-all/addr2line.exp 2023-08-04 16:08:23.779024539 +0100 +@@ -39,7 +39,7 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\ + } else { + set list [regexp -inline -all -- {\S+} $contents] + set got [binutils_run $ADDR2LINE "-e tmpdir/testprog$exe [lindex $list 0]"] +- set want "$srcdir/.\*" ++ set want ".*" + if ![regexp $want $got] then { + fail "$testname\n wanted: $srcdir/$subdir/.*\n got: $got\n" + } else { +@@ -54,7 +54,7 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\ + } else { + set list [regexp -inline -all -- {\S+} $contents] + set got [binutils_run $ADDR2LINE "-f -e tmpdir/testprog$exe [lindex $list 0]"] +- set want "fn\n$srcdir/.\*" ++ set want "fn\n.*" + if ![regexp $want $got] then { + fail "$testname -f option $got\n" + } else { +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2023-08-04 16:05:45.721916727 +0100 ++++ binutils-2.41/ld/testsuite/ld-plugin/lto.exp 2023-08-04 16:13:11.794221039 +0100 @@ -31,8 +31,8 @@ if { ![check_plugin_api_available] set saved_CFLAGS "$CFLAGS_FOR_TARGET" @@ -379,277 +160,143 @@ diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.40/ld/testsuit proc restore_notify { } { global saved_CFLAGS -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-10.d 2023-02-13 16:54:24.013864633 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-10.d 2023-02-13 17:14:30.006932970 +0000 -@@ -32,7 +32,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/libtext.a \[@.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-11.d binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-11.d 2023-02-13 16:54:24.013864633 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-11.d 2023-02-13 17:16:36.807713599 +0000 -@@ -35,9 +35,9 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?text' Resolution: LDPR_PREVAILING_.* - #... - hook called: cleanup. - #... -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-16.d binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-16.d 2023-02-13 16:54:24.013864633 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-16.d 2023-02-13 17:17:18.263641882 +0000 -@@ -30,7 +30,7 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-17.d binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-17.d 2023-02-13 16:54:24.013864633 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-17.d 2023-02-13 17:15:48.502797163 +0000 -@@ -31,7 +31,7 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-18.d binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-18.d 2023-02-13 16:54:24.013864633 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-18.d 2023-02-13 17:15:33.477823156 +0000 -@@ -32,7 +32,7 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-8.d 2023-02-13 16:54:24.013864633 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-8.d 2023-02-13 17:13:45.751009540 +0000 -@@ -30,7 +30,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-9.d binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-9.d 2023-02-13 16:54:24.013864633 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-9.d 2023-02-13 17:14:12.134963889 +0000 -@@ -31,7 +31,7 @@ hook called: claim_file tmpdir/func.o \[ - hook called: claim_file tmpdir/text.o \[@0/.* not claimed - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY - #... - hook called: cleanup. -diff -rup binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.40/ld/testsuite/ld-x86-64/x86-64.exp ---- binutils.orig/ld/testsuite/ld-x86-64/x86-64.exp 2023-02-13 16:54:24.098864510 +0000 -+++ binutils-2.40/ld/testsuite/ld-x86-64/x86-64.exp 2023-02-13 17:20:01.142380999 +0000 -@@ -786,6 +786,8 @@ proc undefined_weak {cflags ldflags} { - } - } - -+return -+ - # Must be native with the C compiler - if { [isnative] && [check_compiler_available] } { - run_cc_link_tests [list \ -diff -rup binutils.orig/ld/testsuite/ld-plugin/lto.exp binutils-2.40/ld/testsuite/ld-plugin/lto.exp ---- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2023-02-13 17:47:19.915716543 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/lto.exp 2023-02-13 17:49:05.859538451 +0000 -@@ -480,6 +480,9 @@ set lto_link_elf_tests [list \ - "libpr28879a.so" \ - "c++" \ - ] \ -+] -+ -+set disabled_lto_link_elf_tests [list \ +--- binutils.orig/ld/testsuite/ld-plugin/lto.exp 2023-08-04 16:43:51.926589278 +0100 ++++ binutils-2.41/ld/testsuite/ld-plugin/lto.exp 2023-08-04 16:45:14.323650391 +0100 +@@ -474,7 +474,7 @@ set lto_link_elf_tests [list \ [list \ - "Build libpr28879b.so" \ - "-shared -Wl,--no-as-needed tmpdir/libpr28879a.so" \ -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin-19.d binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d ---- binutils.orig/ld/testsuite/ld-plugin/plugin-19.d 2023-02-13 17:47:19.915716543 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin-19.d 2023-02-13 17:50:05.443438285 +0000 -@@ -35,9 +35,9 @@ hook called: claim_file .*/ld/testsuite/ - hook called: claim_file tmpdir/libtext.a \[@.* CLAIMED - #... - hook called: all symbols read. --Sym: '_?func' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?func' Resolution: LDPR_PREVAILING_.* - Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY --Sym: '_?text' Resolution: LDPR_PREVAILING_DEF_IRONLY -+Sym: '_?text' Resolution: LDPR_PREVAILING_.* - #... - hook called: cleanup. - #... -diff -rup binutils.orig/ld/testsuite/ld-aarch64/bti-plt-5.d binutils-2.40/ld/testsuite/ld-aarch64/bti-plt-5.d ---- binutils.orig/ld/testsuite/ld-aarch64/bti-plt-5.d 2023-02-14 09:28:44.680514056 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/bti-plt-5.d 2023-02-14 09:36:58.129838823 +0000 -@@ -8,7 +8,7 @@ - [^:]*: *file format elf64-.*aarch64 - - Disassembly of section \.plt: -- -+#pass + "Build libpr28879a.so" \ + "-shared" \ +- "-O0 -fpic" \ ++ "-O2 -fpic" \ + {pr28879a.cc} \ + {} \ + "libpr28879a.so" \ +@@ -491,7 +491,7 @@ set lto_link_elf_tests [list \ + [list \ + "Build pr28879" \ + "-Wl,--no-as-needed tmpdir/libpr28879b.so -Wl,-rpath-link,." \ +- "-O0 -flto -D_GLIBCXX_ASSERTIONS" \ ++ "-O2 -flto -D_GLIBCXX_ASSERTIONS" \ + {pr28879b.cc} \ + {} \ + "pr28879" \ +@@ -525,7 +525,7 @@ set lto_link_elf_tests [list \ + [list \ + "PR ld/pr29086" \ + "-Wl,--wrap=foo" \ +- "-O0 -flto" \ ++ "-O2 -flto" \ + {pr29086.c} \ + {} \ + "pr29086" \ +diff -rup binutils.orig/ld/testsuite/ld-aarch64/bti-plt-5.d binutils-2.41/ld/testsuite/ld-aarch64/bti-plt-5.d +--- binutils.orig/ld/testsuite/ld-aarch64/bti-plt-5.d 2023-08-15 09:03:21.676463687 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/bti-plt-5.d 2023-08-15 09:17:56.751533569 +0100 +@@ -12,8 +12,8 @@ Disassembly of section \.plt: [0-9a-f]+ <.*>: .*: d503245f bti c .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! -diff -rup binutils.orig/ld/testsuite/ld-aarch64/erratum843419-far-full.d binutils-2.40/ld/testsuite/ld-aarch64/erratum843419-far-full.d ---- binutils.orig/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2023-02-14 09:28:44.693514032 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2023-02-14 09:31:36.418208759 +0000 -@@ -5,7 +5,7 @@ - #... +-.*: 90000090 adrp x16, 410000 <.*> +-.*: f9...... ldr x17, \[x16, #....\] ++.*: 90000090 adrp x16, 4.0000 <.*> ++.*: f9...... ldr x17, \[x16, #.*\] + .*: 91...... add x16, x16, #0x... + .*: d61f0220 br x17 + .*: d503201f nop +@@ -21,8 +21,8 @@ Disassembly of section \.plt: + + [0-9a-f]+ <.*>: + .*: d503245f bti c +-.*: 90000090 adrp x16, 410000 <.*> +-.*: f9...... ldr x17, \[x16, #....\] ++.*: 90000090 adrp x16, 4.0000 <.*> ++.*: f9...... ldr x17, \[x16, #.*\] + .*: 91...... add x16, x16, #0x... + .*: d61f0220 br x17 + .*: d503201f nop +diff -rup binutils.orig/ld/testsuite/ld-aarch64/erratum843419-far-full.d binutils-2.41/ld/testsuite/ld-aarch64/erratum843419-far-full.d +--- binutils.orig/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2023-08-15 09:03:21.683463694 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/erratum843419-far-full.d 2023-08-15 09:05:41.549608111 +0100 +@@ -8,7 +8,7 @@ Disassembly of section \.text: - Disassembly of section \.text: -- -+#pass 0*400000 <_start>: ... - 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+0x7ffedff0> -diff -rup binutils.orig/ld/testsuite/ld-aarch64/farcall-b-plt.d binutils-2.40/ld/testsuite/ld-aarch64/farcall-b-plt.d ---- binutils.orig/ld/testsuite/ld-aarch64/farcall-b-plt.d 2023-02-14 09:28:44.694514031 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/farcall-b-plt.d 2023-02-14 09:32:47.299087235 +0000 -@@ -7,7 +7,7 @@ - #... +- 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+0x7ffedff0> ++ 400ffc: 90400000 adrp x0, 80400000 <__bss_end__\+0x[0-9a-f]+> + 401000: f9000042 str x2, \[x2\] + 401004: d2800002 mov x2, #0x0 // #0 + 401008: 14000004 b 401018 +@@ -18,5 +18,5 @@ Disassembly of section \.text: + + 0*401018 : + 401018: f9402001 ldr x1, \[x0, #64\] +- 40101c: 17fffffc b 40100c <_start\+0x100c> ++ 40101c: 17fffffc b 40100c <_start\+0x[0-9a-f]+> + ... +diff -rup binutils.orig/ld/testsuite/ld-aarch64/farcall-b-plt.d binutils-2.41/ld/testsuite/ld-aarch64/farcall-b-plt.d +--- binutils.orig/ld/testsuite/ld-aarch64/farcall-b-plt.d 2023-08-15 09:03:21.683463694 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/farcall-b-plt.d 2023-08-15 09:07:02.046699709 +0100 +@@ -10,7 +10,7 @@ Disassembly of section .plt: - Disassembly of section .plt: -- -+#pass .* <.plt>: .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! - .*: .* adrp x16, .* <__foo_veneer\+.*> -diff -rup binutils.orig/ld/testsuite/ld-aarch64/farcall-bl-plt.d binutils-2.40/ld/testsuite/ld-aarch64/farcall-bl-plt.d ---- binutils.orig/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2023-02-14 09:28:44.694514031 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2023-02-14 09:33:07.510055893 +0000 -@@ -7,7 +7,7 @@ - #... +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -19,7 +19,7 @@ Disassembly of section .plt: + .*: d503201f nop + + .* : +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -35,7 +35,7 @@ Disassembly of section .text: + .*: .* nop + + .* <__foo_veneer>: +-.*: .* adrp x16, 0 <.*> ++.*: .* adrp x16, [0-9a-f]+ <.*> + .*: .* add x16, x16, #.* + .*: d61f0200 br x16 + ... +diff -rup binutils.orig/ld/testsuite/ld-aarch64/farcall-bl-plt.d binutils-2.41/ld/testsuite/ld-aarch64/farcall-bl-plt.d +--- binutils.orig/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2023-08-15 09:03:21.684463695 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/farcall-bl-plt.d 2023-08-15 09:07:53.198757913 +0100 +@@ -10,7 +10,7 @@ Disassembly of section .plt: - Disassembly of section .plt: -- -+#pass .* <.plt>: .*: a9bf7bf0 stp x16, x30, \[sp, #-16\]! - .*: .* adrp x16, .* <__foo_veneer\+.*> -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-1.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-1.d 2023-02-14 09:28:44.696514027 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1.d 2023-02-14 09:33:37.682018227 +0000 -@@ -2,8 +2,4 @@ - #ld: -shared --hash-style=sysv - #objdump: -dw +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -19,7 +19,7 @@ Disassembly of section .plt: + .*: d503201f nop --#... --0+(130|1a0|1c8) : --#... --[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-21.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-21.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-21.d 2023-02-14 09:28:44.698514024 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-21.d 2023-02-14 09:34:55.793920713 +0000 -@@ -6,6 +6,7 @@ - # Ensure the .got.plt slot used is correct + .* : +-.*: .* adrp x16, .* <__foo_veneer\+.*> ++.*: .* adrp x16, .* <.*> + .*: .* ldr [wx]17, \[x16, #.*\] + .*: .* add [wx]16, [wx]16, #.* + .*: d61f0220 br x17 +@@ -35,7 +35,7 @@ Disassembly of section .text: + .*: .* nop - .*: file format elf64-(little|big)aarch64 -+#pass - - Contents of section .text: - [0-9a-f]+ .* -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-22.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-22.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-22.d 2023-02-14 09:28:44.698514024 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-22.d 2023-02-14 09:35:06.673907131 +0000 -@@ -6,6 +6,7 @@ - # Ensure GOT is populated correctly in static link - - .*: file format elf64-(little|big)aarch64 -+#pass - - Contents of section \.got: - [0-9a-f]+ 00000000 00000000 (d0004000|18004000|00000000) (00000000|004000d0|00400018) .* -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-7c.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-7c.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-7c.d 2023-02-14 09:28:44.699514022 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-7c.d 2023-02-14 09:34:43.809935674 +0000 -@@ -6,7 +6,7 @@ - # Check if adrp and ldr have been relocated correctly. - - .*: file format elf.+aarch64.* -- -+#pass - - Disassembly of section \.text: - -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-now.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-now.d 2023-02-14 09:28:44.707514007 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-now.d 2023-02-14 09:35:42.369883406 +0000 -@@ -5,6 +5,7 @@ - #readelf: -rsW - - Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: -+#pass - Offset Info Type Symbol's Value Symbol's Name \+ Addend - 0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 - 0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-r.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-r.d 2023-02-14 09:28:44.707514007 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-r.d 2023-02-14 09:35:18.401897511 +0000 -@@ -4,6 +4,7 @@ - #readelf: -rsW - - Relocation section '\.rela\.text' at offset .* contains 24 entries: -+#pass - Offset Info Type Symbol's Value Symbol's Name \+ Addend - 0000000000000000 000000180000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_def \+ 0 - 0000000000000004 000000110000011b R_AARCH64_CALL26 0000000000000000 f_spec_global_default_undef \+ 0 -diff -rup binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-shared.d ---- binutils.orig/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2023-02-14 09:28:44.707514007 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/variant_pcs-shared.d 2023-02-14 09:35:31.186889987 +0000 -@@ -5,6 +5,7 @@ - #readelf: -rsW - - Relocation section '\.rela\.plt' at offset 0x11000 contains 12 entries: -+#pass - Offset Info Type Symbol's Value Symbol's Name \+ Addend - 0000000000009020 0000000100000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_base_global_default_undef \+ 0 - 0000000000009028 0000000200000402 R_AARCH64_JUMP_SLOT 0000000000000000 f_spec_global_default_undef \+ 0 -diff -rup binutils.orig/ld/testsuite/ld-elf/shared.exp binutils-2.40/ld/testsuite/ld-elf/shared.exp ---- binutils.orig/ld/testsuite/ld-elf/shared.exp 2023-02-14 09:28:44.834513779 +0000 -+++ binutils-2.40/ld/testsuite/ld-elf/shared.exp 2023-02-14 09:30:28.963326343 +0000 -@@ -1656,7 +1656,7 @@ proc mix_pic_and_non_pic {xfails cflags - } - } - --mix_pic_and_non_pic [list "arm*-*-*" "aarch64*-*-*"] "" "" "pr19719" -+mix_pic_and_non_pic [list "arm*-*-*"] "" "" "pr19719" - mix_pic_and_non_pic [] "-fPIE" "-pie" "pr19719pie" - - set AFLAGS_PIE "" -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-1-local.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1-local.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-1-local.d 2023-02-14 10:17:00.250902379 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-1-local.d 2023-02-14 10:19:06.776094625 +0000 -@@ -2,8 +2,4 @@ - #ld: -shared --hash-style=sysv + .* <__foo_veneer>: +-.*: .* adrp x16, 0 <.*> ++.*: .* adrp x16, [0-9a-f]+ <.*> + .*: .* add x16, x16, #.* + .*: d61f0200 br x16 + ... +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-1-local.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-1-local.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-1-local.d 2023-08-15 09:03:21.685463696 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-1-local.d 2023-08-15 09:08:50.622823248 +0100 +@@ -3,7 +3,3 @@ #objdump: -dw -#... @@ -657,60 +304,137 @@ diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-1-local.d binutils-2.40/ld -#... -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+(0x110|0x180|0x1a0)@plt> #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2-local.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-02-14 10:17:00.251902381 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-02-14 10:18:55.862078571 +0000 -@@ -2,10 +2,4 @@ - #ld: -shared --hash-style=sysv - #objdump: -dw - --#... --0+(110|180|1a0) <__GI_foo>: --#... --[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt> --[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> --[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190) - #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d 2023-02-14 10:17:00.251902381 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-2.d 2023-02-14 10:18:59.271083586 +0000 -@@ -2,10 +2,4 @@ - #ld: -shared --hash-style=sysv +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-1.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-1.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-1.d 2023-08-15 09:03:21.685463696 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-1.d 2023-08-15 09:08:18.190786345 +0100 +@@ -3,7 +3,3 @@ #objdump: -dw -#... -0+(130|1a0|1c8) : -#... -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> --[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> --[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8) #pass -diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d binutils-2.40/ld/testsuite/ld-aarch64/ifunc-3a.d ---- binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-02-14 10:17:00.251902381 +0000 -+++ binutils-2.40/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-02-14 10:19:25.878122727 +0000 -@@ -3,8 +3,4 @@ +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2-local.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-08-15 09:03:21.685463696 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-08-15 09:09:27.982865763 +0100 +@@ -3,8 +3,6 @@ + #objdump: -dw + + #... +-0+(110|180|1a0) <__GI_foo>: +-#... + [ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt> + [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> + [ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190) +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d 2023-08-15 09:03:21.686463697 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2.d 2023-08-15 09:09:14.350850251 +0100 +@@ -3,8 +3,6 @@ + #objdump: -dw + + #... +-0+(130|1a0|1c8) : +-#... + [ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> + [ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> + [ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8) +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-21.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-21.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-21.d 2023-08-15 09:03:21.686463697 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-21.d 2023-08-15 09:13:27.007155679 +0100 +@@ -11,7 +11,7 @@ Contents of section .text: + [0-9a-f]+ .* + Contents of section .got.plt: + [0-9a-f]+ 0+ 0+ 0+ 0+ .* +- (10298|102b8) 0+ 0+ [0-9a-f]+ [0-9a-f]+ .* ++ (10298|102b8|20108) 0+ 0+ [0-9a-f]+ [0-9a-f]+ .* + + Disassembly of section .text: + +@@ -19,8 +19,8 @@ Disassembly of section .text: + .*: d65f03c0 ret + + .* : +- .*: 90000080 adrp x0, 10000 <.*> +- .*: .* ldr x0, \[x0, #(672|704)\] ++ .*: 90000080 adrp x0, .0000 <.*> ++ .*: .* ldr x0, \[x0, #(672|704|272)\] + .*: d65f03c0 ret + + #pass +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-22.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-22.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-22.d 2023-08-15 09:03:21.686463697 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-22.d 2023-08-15 09:14:02.191199743 +0100 +@@ -8,4 +8,4 @@ + .*: file format elf64-(little|big)aarch64 + + Contents of section \.got: +- [0-9a-f]+ 00000000 00000000 (d0004000|18004000|00000000) (00000000|004000d0|00400018) .* ++#pass +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-3a.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-08-15 09:03:21.686463697 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-08-15 09:09:42.174882286 +0100 +@@ -4,7 +4,5 @@ + #objdump: -dw + + #... +-0+(150|1d0|1e8) <__GI_foo>: +-#... + [ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt> + #pass +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-7c.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-7c.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-7c.d 2023-08-15 09:03:21.686463697 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-7c.d 2023-08-15 09:11:37.716022782 +0100 +@@ -11,9 +11,9 @@ + Disassembly of section \.text: + + [0-9a-f]+ : +- [0-9a-f]+: d65f03c0 ret ++[ ]+[0-9a-f]+:[ ]+d65f03c0[ ]+ret + + [0-9a-f]+ <__start>: +- [0-9a-f]+: [0-9a-f]+ bl [0-9a-f]+ <\*ABS\*\+0x[0-9a-f]+@plt> +- [0-9a-f]+: [0-9a-f]+ adrp x0, [0-9]+ <__start\+0x[0-9a-f]+> +- [0-9a-f]+: [0-9a-f]+ ldr x0, \[x0, .+\] ++[ ]+[0-9a-f]+:[ ]+[0-9a-f]+[ ]+bl[ ]+[0-9a-f]+ <\*ABS\*\+0x[0-9a-f]+@plt> ++[ ]+[0-9a-f]+:[ ]+[0-9a-f]+[ ]+adrp[ ]+x0, [0-9]+ <.*> ++[ ]+[0-9a-f]+:[ ]+[0-9a-f]+[ ]+ldr[ ]+x0, \[x0, .+\] +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2-local.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-08-15 11:17:45.947214180 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2-local.d 2023-08-15 11:18:17.319251036 +0100 +@@ -2,8 +2,4 @@ #ld: -shared --hash-style=sysv #objdump: -dw -#... --0+(150|1d0|1e8) <__GI_foo>: +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(110|180|1a0)@plt> +-[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> +-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(100|170|190) + #pass +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-2.d 2023-08-15 11:17:45.947214180 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-2.d 2023-08-15 11:18:02.935234133 +0100 +@@ -2,8 +2,4 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + +-#... +-[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(130|1a0|1c8)@plt> +-[ \t0-9a-f]+:[ \t0-9a-f]+adrp[ \t]+x0, 0 <.*> +-[ \t0-9a-f]+:[ \t0-9a-f]+add[ \t]+x0, x0, #0x(120|190|1b8) + #pass +diff -rup binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d binutils-2.41/ld/testsuite/ld-aarch64/ifunc-3a.d +--- binutils.orig/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-08-15 11:17:45.947214180 +0100 ++++ binutils-2.41/ld/testsuite/ld-aarch64/ifunc-3a.d 2023-08-15 11:18:37.703274987 +0100 +@@ -3,6 +3,4 @@ + #ld: -shared --hash-style=sysv + #objdump: -dw + -#... -[ \t0-9a-f]+:[ \t0-9a-f]+bl[ \t0-9a-f]+<\*ABS\*\+0x(150|1d0|1e8)@plt> #pass -diff -rup binutils.orig/ld/testsuite/ld-plugin/plugin.exp binutils-2.40/ld/testsuite/ld-plugin/plugin.exp ---- binutils.orig/ld/testsuite/ld-plugin/plugin.exp 2023-02-14 10:17:00.334902510 +0000 -+++ binutils-2.40/ld/testsuite/ld-plugin/plugin.exp 2023-02-14 10:17:42.070967195 +0000 -@@ -304,6 +304,7 @@ if { !$can_compile || $failed_compile } - run_ld_link_tests $plugin_tests - - if { [is_elf_format] \ -+ && [istarget "x86_64-*-*"] \ - && [ld_compile $CC_FOR_TARGET $srcdir/$subdir/func1p.c tmpdir/func1p.o] \ - && [ld_compile $CC_FOR_TARGET $srcdir/$subdir/func2i.c tmpdir/func2i.o] \ - && [ld_compile $CC_FOR_TARGET $srcdir/$subdir/func3h.c tmpdir/func3h.o] } { -diff -rup binutils.orig/ld/testsuite/ld-elf/binutils.exp binutils-2.40/ld/testsuite/ld-elf/binutils.exp ---- binutils.orig/ld/testsuite/ld-elf/binutils.exp 2023-02-14 11:18:21.118180712 +0000 -+++ binutils-2.40/ld/testsuite/ld-elf/binutils.exp 2023-02-14 11:23:11.615518439 +0000 +--- binutils.orig/ld/testsuite/ld-elf/binutils.exp 2023-08-15 14:30:13.138890662 +0100 ++++ binutils-2.41/ld/testsuite/ld-elf/binutils.exp 2023-08-15 14:33:16.133301230 +0100 @@ -174,7 +174,7 @@ binutils_test strip "-T ${srcdir}/${subd set tls_tests { "tdata1" "tdata2" } @@ -720,444 +444,543 @@ diff -rup binutils.orig/ld/testsuite/ld-elf/binutils.exp binutils-2.40/ld/testsu lappend tls_tests "tdata3" "tbss1" "tbss2" "tbss3" } set tls_opts { -diff -rup binutils.orig/ld/testsuite/ld-elf/linux-x86.exp binutils-2.40/ld/testsuite/ld-elf/linux-x86.exp ---- binutils.orig/ld/testsuite/ld-elf/linux-x86.exp 2023-02-14 11:18:21.126180695 +0000 -+++ binutils-2.40/ld/testsuite/ld-elf/linux-x86.exp 2023-02-14 12:11:22.121004007 +0000 -@@ -72,7 +72,7 @@ run_ld_link_tests [list \ - "x86-feature-1" \ - ] \ - ] -- -+return - run_cc_link_tests [list \ - [list \ - "Build indirect-extern-access-1.so" \ -diff -rup binutils.orig/ld/testsuite/ld-elf/shared.exp binutils-2.40/ld/testsuite/ld-elf/shared.exp ---- binutils.orig/ld/testsuite/ld-elf/shared.exp 2023-02-14 11:18:21.147180652 +0000 -+++ binutils-2.40/ld/testsuite/ld-elf/shared.exp 2023-02-14 12:07:31.434503522 +0000 -@@ -1151,6 +1151,8 @@ set run_tests [list \ +diff -rup binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.41/ld/testsuite/ld-powerpc/powerpc.exp +--- binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp 2023-08-15 14:30:13.277890866 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/powerpc.exp 2023-08-15 14:41:18.582395219 +0100 +@@ -126,65 +126,6 @@ set ppcelftests { + "tls32no"} + {"TLS32 helper shared library" "-shared -melf32ppc tmpdir/tlslib32.o" "" "" {} + {} "libtlslib32.so"} +- {"TLS32 dynamic exec" "-melf32ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls32.o tmpdir/libtlslib32.so" "" "" {} +- {{readelf -WSsrl tlsexe32.r} {objdump -dr tlsexe32.d} +- {objdump -sj.got tlsexe32.g} {objdump -sj.tdata tlsexe32.t}} +- "tlsexe32"} +- {"TLS32 dynamic exec (--no-tls-optimize)" "-melf32ppc --no-tls-optimize --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls32.o tmpdir/libtlslib32.so" "" "" {} +- {{readelf -WSsrl tlsexe32no.r} {objdump -dr tlsexe32no.d} +- {objdump -sj.got tlsexe32no.g} {objdump -sj.tdata tlsexe32.t}} +- "tlsexe32no"} +- {"TLS32 shared" "-shared -melf32ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv -z notext tmpdir/tls32.o" "" "" {} +- {{readelf -WSsrl tlsso32.r} {objdump -dr tlsso32.d} +- {objdump -sj.got tlsso32.g} {objdump -sj.tdata tlsso32.t}} +- "tls32.so"} +- {"TLS32 markers" "-melf32ppc" "" "-a32" {tlsmark32.s tlslib32.s} +- {{objdump -dr tlsmark32.d}} +- "tlsmark32"} +- {"TLS32 opt 1" "-melf32ppc" "" "-a32" {tlsopt1_32.s tlslib32.s} +- {{objdump -dr tlsopt1_32.d}} +- "tlsopt1_32"} +- {"TLS32 opt 2" "-melf32ppc" "" "-a32" {tlsopt2_32.s tlslib32.s} +- {{objdump -dr tlsopt2_32.d}} +- "tlsopt2_32"} +- {"TLS32 opt 3" "-melf32ppc" "" "-a32" {tlsopt3_32.s tlslib32.s} +- {{objdump -dr tlsopt3_32.d}} +- "tlsopt3_32"} +- {"TLS32 opt 4" "-melf32ppc" "" "-a32" {tlsopt4_32.s tlslib32.s} +- {{objdump -dr tlsopt4_32.d}} +- "tlsopt4_32"} +- {"TLS32 DLL" "-shared -melf32ppc --version-script tlsdll.ver" "" +- "-a32" {tlsdll_32.s} +- {} "tlsdll32.so"} +- {"TLS32 opt 5" "-melf32ppc -shared --gc-sections --secure-plt --no-plt-align tmpdir/tlsdll32.so" "" "-a32" {tlsopt5_32.s} +- {{objdump -dr tlsopt5_32.d}} +- "tlsopt5_32"} +- {"Shared library with global symbol" "-shared -melf32ppc" "" "-a32" {sdalib.s} +- {} "sdalib.so"} +- {"Dynamic application with SDA" "-melf32ppc tmpdir/sdalib.so" "" "-a32" {sdadyn.s} +- {{objdump -R sdadyn.d}} "sdadyn"} +- {"relaxing" "-melf32ppc --relax -Ttext=0 --defsym far=0x80001234 --defsym near=0x00004320" "" "-a32" "relax.s" +- {{objdump -dr relax.d}} +- "relax"} +- {"relocatable relaxing" "-melf32ppc -r --relax" "" "-a32" "relax.s" +- {{objdump -dr relaxr.d}} +- "rrelax"} +- {"relocatable relaxing large" "-melf32ppc -r --relax" "" "-a32" "relax.s big.s" +- {{objdump -dr relaxrl.d}} +- "rrelax"} +- {"build empty shared library" "-shared" "" "" "empty.s" {} "empty.so"} +- {"abs32-static" "-melf32ppc -static --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x12345678" "" +- "-a32" {abs32-reloc.s} +- {{objdump {-dr} abs32-static.d} +- {readelf {-rW} abs32-static.r}} "abs32-static"} +- {"abs32-pie" "-melf32ppc -pie --hash-style=sysv --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x12345678" "" +- "-a32" {abs32-reloc.s} +- {{objdump {-dr} abs32-pie.d} +- {readelf {-rW} abs32-pie.r}} "abs32-pie"} +- {"abs32-shared" "-melf32ppc -shared --hash-style=sysv --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x12345678" "" +- "-a32" {abs32-reloc.s} +- {{objdump {-dr} abs32-shared.d} +- {readelf {-rW} abs32-shared.r}} "abs32-shared"} + } + + set ppc64elftests { +@@ -192,200 +133,6 @@ set ppc64elftests { + "-a64 --defsym TLSMARK=1" {tls.s tlslib.s} + {{objdump -dr tls.d} {objdump -sj.got tls.g} {objdump -sj.tdata tls.t}} + "tlsm"} +- {"TLS static exec" "-melf64ppc --no-plt-align" "" "-a64" {tls.s tlslib.s} +- {{objdump -dr tls.d} {objdump -sj.got tls.g} {objdump -sj.tdata tls.t}} +- "tls"} +- {"TLS static exec (--no-tls-optimize)" "-melf64ppc --no-tls-optimize --no-plt-align" "" +- "-a64 --defsym TLSMARK=1" {tls.s tlslib.s} +- {{objdump -dr tlsno.d} {objdump -sj.got tlsno.g} {objdump -sj.tdata tls.t}} +- "tlsno"} +- {"TLS helper shared library" "-shared -melf64ppc tmpdir/tlslib.o" "" "" {} +- {} "libtlslib.so"} +- {"TLS helper old shared lib" "-shared -melf64ppc" "" "-a64" {oldtlslib.s} +- {} "liboldlib.so"} +- {"TLS dynamic exec" "-melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls.o tmpdir/libtlslib.so" "" "" {} +- {{readelf -WSsrl tlsexe.r} {objdump -dr tlsexe.d} +- {objdump -sj.got tlsexe.g} {objdump -sj.tdata tlsexe.t}} +- "tlsexe"} +- {"TLS dynamic old" "-melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls.o tmpdir/liboldlib.so" "" "" {} +- {{readelf -WSsrl tlsexe.r} {objdump -dr tlsexe.d} +- {objdump -sj.got tlsexe.g} {objdump -sj.tdata tlsexe.t}} +- "tlsexeold"} +- {"TLS dynamic exec (--no-tls-optimize)" "-melf64ppc --no-tls-optimize --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls.o tmpdir/libtlslib.so" "" "" {} +- {{readelf -WSsrl tlsexeno.r} {objdump -dr tlsexeno.d} +- {objdump -sj.got tlsexeno.g} {objdump -sj.tdata tlsexe.t}} +- "tlsexeno"} +- {"TLS shared" "-shared -melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv -z notext tmpdir/tls.o" "" "" {} +- {{readelf -WSsrl tlsso.r} {objdump -dr tlsso.d} +- {objdump -sj.got tlsso.g} {objdump -sj.tdata tlsso.t}} +- "tls.so"} +- {"TLSTOC static exec" "-melf64ppc tmpdir/tlslib.o" "" "-a64" {tlstoc.s} +- {{objdump -dr tlstoc.d} {objdump -sj.got tlstoc.g} +- {objdump -sj.tdata tlstoc.t}} +- "tlstoc"} +- {"TLSTOC static exec (--no-tls-optimize)" "-melf64ppc --no-tls-optimize tmpdir/tlslib.o tmpdir/tlstoc.o" "" "" {} +- {{objdump -dr tlstocno.d} {objdump -sj.got tlstocno.g} +- {objdump -sj.tdata tlstoc.t}} +- "tlstocno"} +- {"TLSTOC dynamic exec" "-melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tlstoc.o tmpdir/libtlslib.so" "" +- "" {} +- {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetoc.d} +- {objdump -sj.got tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}} +- "tlsexetoc"} +- {"TLSTOC dynamic old" "-melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tlstoc.o tmpdir/liboldlib.so" "" +- "" {} +- {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetoc.d} +- {objdump -sj.got tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}} +- "tlsexetocold"} +- {"TLSTOC dynamic exec (--no-tls-optimize)" "-melf64ppc --no-tls-optimize --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tlstoc.o tmpdir/libtlslib.so" "" +- "" {} +- {{readelf -WSsrl tlsexetoc.r} {objdump -dr tlsexetocno.d} +- {objdump -sj.got tlsexetocno.g} {objdump -sj.tdata tlsexetoc.t}} +- "tlsexetocno"} +- {"TLSTOC shared" "-shared -melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv -z notext tmpdir/tlstoc.o" "" "" {} +- {{readelf -WSsrl tlstocso.r} {objdump -dr tlstocso.d} +- {objdump -sj.got tlstocso.g} {objdump -sj.tdata tlstocso.t}} +- "tlstoc.so"} +- {"TLS dynamic exec (--tls-get-addr-regsave)" "-melf64ppc --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv --tls-get-addr-regsave tmpdir/tls.o tmpdir/libtlslib.so" "" "" {} +- {{readelf -WSsrl tlsexers.r} {objdump -dr tlsexers.d} +- {objdump -sj.got tlsexe.g} {objdump -sj.tdata tlsexe.t}} +- "tlsexers"} +- {"TLS dynamic exec (--no-tls-optimize --tls-get-addr-regsave)" "-melf64ppc --no-tls-optimize --tls-get-addr-regsave --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tls.o tmpdir/libtlslib.so" "" "" {} +- {{readelf -WSsrl tlsexenors.r} {objdump -dr tlsexenors.d} +- {objdump -sj.got tlsexeno.g} {objdump -sj.tdata tlsexe.t}} +- "tlsexenors"} +- {"TLSTOC dynamic exec (--tls-get-addr-regsave)" "-melf64ppc --tls-get-addr-regsave --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tlstoc.o tmpdir/libtlslib.so" "" +- "" {} +- {{readelf -WSsrl tlsexetocrs.r} {objdump -dr tlsexetocrs.d} +- {objdump -sj.got tlsexetoc.g} {objdump -sj.tdata tlsexetoc.t}} +- "tlsexetocrs"} +- {"TLSTOC dynamic exec (--no-tls-optimize --tls-get-addr-regsave)" "-melf64ppc --no-tls-optimize --tls-get-addr-regsave --no-plt-align --no-ld-generated-unwind-info --hash-style=sysv tmpdir/tlstoc.o tmpdir/libtlslib.so" "" +- "" {} +- {{readelf -WSsrl tlsexetocrs.r} {objdump -dr tlsexetocnors.d} +- {objdump -sj.got tlsexetocno.g} {objdump -sj.tdata tlsexetoc.t}} +- "tlsexetocnors"} +- {"TLS markers" "-melf64ppc" "" "-a64" {tlsmark.s tlslib.s} +- {{objdump -dr tlsmark.d}} +- "tlsmark"} +- {"TLS opt 1" "-melf64ppc" "" "-a64" {tlsopt1.s tlslib.s} +- {{objdump -dr tlsopt1.d}} +- "tlsopt1"} +- {"TLS opt 2" "-melf64ppc" "" "-a64" {tlsopt2.s tlslib.s} +- {{objdump -dr tlsopt2.d}} +- "tlsopt2"} +- {"TLS opt 3" "-melf64ppc" "" "-a64" {tlsopt3.s tlslib.s} +- {{objdump -dr tlsopt3.d}} +- "tlsopt3"} +- {"TLS opt 4" "-melf64ppc" "" "-a64" {tlsopt4.s tlslib.s} +- {{objdump -dr tlsopt4.d}} +- "tlsopt4"} +- {"TLS DLL" "-shared -melf64ppc --version-script tlsdll.ver" "" "-a64" {tlsdll.s} +- {} "tlsdll.so"} +- {"TLS opt 5" "-melf64ppc -shared --hash-style=both --gc-sections --no-plt-localentry tmpdir/tlsdll.so" "" "-a64" {tlsopt5.s} +- {{objdump -dr tlsopt5.d} {readelf -wf tlsopt5.wf}} +- "tlsopt5"} +- {"TLS opt 6" "-melf64ppc -shared --hash-style=both --gc-sections --no-plt-localentry --tls-get-addr-regsave tmpdir/tlsdll.so" "" "-a64" {tlsopt5.s} +- {{objdump -dr tlsopt6.d} {readelf -wf tlsopt6.wf}} +- "tlsopt6"} +- {"TLSdesc" "-melf64ppc -shared --hash-style=both --no-plt-localentry tmpdir/libtlslib.so" "" "-a64" {tlsdesc.s} +- {{objdump -dr tlsdesc.d} {readelf -wf tlsdesc.wf}} +- "tlsdesc"} +- {"TLSdesc2" "-melf64ppc -shared --hash-style=both --no-plt-localentry tmpdir/tlsdll.so" "" "-a64" {tlsdesc.s} +- {{objdump -dr tlsdesc2.d} {readelf -wf tlsdesc2.wf}} +- "tlsdesc2"} +- {"TLSdesc3" "-melf64ppc --no-tls-optimize tmpdir/tlsdll.o" "" "-a64" {tlsdesc.s} +- {{objdump -dr tlsdesc3.d} {readelf -wf tlsdesc3.wf}} +- "tlsdesc3"} +- {"TLSdesc4" "-melf64ppc --no-tls-optimize tmpdir/tlsdll.o" "" "-a64" {tlsdesc4.s} +- {{objdump -dr tlsdesc4.d} {readelf -wf tlsdesc4.wf}} +- "tlsdesc4"} +- {"tlsget" "-shared --hash-style=both -melf64ppc --plt-align=0" "tmpdir/tlsdll.so" "-a64 -mpower10" {tlsget.s} +- {{objdump -dr tlsget.d} {readelf -wf tlsget.wf}} +- "tlsget.so"} +- {"tlsget2" "-shared --hash-style=both -melf64ppc --plt-align=0 --power10-stubs=yes" "tmpdir/tlsdll.so" "-a64 -mpower10" {tlsget.s} +- {{objdump -dr tlsget2.d} {readelf -wf tlsget2.wf}} +- "tlsget2.so"} +- {"sym@tocbase" "-shared -melf64ppc" "" "-a64" {symtocbase-1.s symtocbase-2.s} +- {{objdump -dj.data symtocbase.d}} "symtocbase.so"} +- {"TOC opt" "-melf64ppc" "" "-a64" {tocopt.s} +- {{ld tocopt.out} {objdump -s tocopt.d}} "tocopt"} +- {"TOC opt2" "-melf64ppc --defsym x=2" "" "-a64" {tocopt2.s} +- {{ld tocopt2.out} {objdump -s tocopt2.d}} "tocopt2"} +- {"TOC opt3" "-melf64ppc -no-keep-memory --defsym x=2" "" "-a64" {tocopt3.s} +- {{objdump -s tocopt3.d}} "tocopt3"} +- {"TOC opt4" "-melf64ppc -no-keep-memory --defsym x=2" "" "-a64" +- {tocopt4a.s tocopt4b.s} {{objdump -s tocopt4.d}} "tocopt4"} +- {"TOC opt5" "-melf64ppc" "" "-a64" {tocopt5.s} +- {{objdump -s tocopt5.d}} "tocopt5"} +- {"TOC opt6" "-melf64ppc" "" "-a64" {tocopt6a.s tocopt6b.s tocopt6c.s} +- {{objdump -d tocopt6.d}} "tocopt6"} +- {"TOC opt7" "-melf64ppc" "" "-a64 -mpower9" {tocopt7.s} +- {{ld tocopt7.out} {objdump -s tocopt7.d}} "tocopt7"} +- {"TOC opt8" "-melf64ppc" "" "-a64 -mpower9" {tocopt8.s} +- {{objdump -s tocopt8.d}} "tocopt8"} +- {"tocsave lib" "-shared -melf64ppc" "" "-a64" {tocsavelib.s} +- {} "tocsavelib.so"} +- {"tocsave1 shared" "-melf64ppc" "tmpdir/tocsavelib.so" "-a64" {tocsave1.s} +- {{objdump -dr tocsave1s.d}} "tocsave1s"} +- {"tocsave1 static" "-melf64ppc" "tmpdir/tocsavelib.o" "-a64" {tocsave1.s} +- {{objdump -dr tocsave1a.d}} "tocsave1a"} +- {"tocsave2 shared" "-melf64ppc" "tmpdir/tocsavelib.so" "-a64" {tocsave2.s} +- {{objdump -dr tocsave2s.d}} "tocsave2s"} +- {"tocsave2 static" "-melf64ppc" "tmpdir/tocsavelib.o" "-a64" {tocsave2.s} +- {{objdump -dr tocsave2a.d}} "tocsave2a"} +- {"ambig shared v1" "-shared -melf64ppc" "" "-a64" {funv1.s} {} "funv1.so"} +- {"ambig shared v2" "-shared -melf64ppc" "" "-a64" {funv2.s} {} "funv2.so"} +- {"notoc ext" "" "" "-a64" {ext.s} {} ""} +- {"notoc" "-melf64ppc --no-plt-localentry --no-power10-stubs -T ext.lnk" +- "" "-a64" {notoc.s} +- {{objdump -d notoc.d} {readelf {-wf -W} notoc.wf}} "notoc"} +- {"notoc2" "-melf64ppc -shared" "" "-a64 -mpower10" {notoc2.s} +- {{objdump {-d -Mpower10} notoc2.d}} "notoc2"} +- {"notoc3" "-melf64ppc --no-plt-localentry -T ext.lnk" "" +- "-a64 -mpower10" {notoc3.s} +- {{objdump -d notoc3.d} {readelf {-wf -W} notoc3.wf}} "notoc3"} +- {"pcrelopt" "-melf64ppc --hash-style=gnu" "tmpdir/symtocbase.so" +- "-a64 -mpower10" {pcrelopt.s} +- {{objdump {-d -Mpower10} pcrelopt.d} +- {readelf {-S --wide} pcrelopt.sec}} "pcrelopt" } +- {"group1" "-melf64ppc -e foo" "" "-a64" {group1.s group2.s group3.s} +- {{objdump {-d} group1.d} +- {readelf {-s} group1.sym}} "group1"} +- {"group2" "-melf64ppc -e foo" "" "-a64" {group2.s group1.s group3.s} +- {{objdump {-d} group2.d} +- {readelf {-s} group2.sym}} "group2"} +- {"group3" "-melf64ppc -e foo" "" "-a64" {group3.s group2.s group1.s} +- {{objdump {-d} group2.d} +- {readelf {-s} group3.sym}} "group3"} +- {"weak1" "-melf64ppc --hash-style=both" "" +- "-a64 -mpower10" {weak1.s} +- {{objdump -d weak1.d} {readelf {-srW} weak1.r}} "weak1"} +- {"weak1.so" "-shared -melf64ppc --hash-style=both" "" +- "-a64 -mpower10" {weak1.s} +- {{objdump -d weak1so.d} {readelf {-srW} weak1so.r}} "weak1.so"} +- {"startstop" "-shared -melf64ppc --hash-style=sysv --gc-sections -z start-stop-gc" "" +- "-a64 -mpower10" {startstop.s} +- {{objdump -d startstop.d} {readelf {-rW} startstop.r}} "startstop.so"} +- {"abs-static" "-melf64ppc -static --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x123456789abcdef0" "" +- "-a64" {abs-reloc.s} +- {{objdump {-sdr} abs-static.d} +- {readelf {-rW} abs-static.r}} "abs-static"} +- {"abs-pie" "-melf64ppc -pie --hash-style=sysv --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x123456789abcdef0" "" +- "-a64" {abs-reloc.s} +- {{objdump {-sdr} abs-pie.d} +- {readelf {-rW} abs-pie.r}} "abs-pie"} +- {"abs-shared" "-melf64ppc -shared --hash-style=sysv --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x123456789abcdef0" "" +- "-a64" {abs-reloc.s} +- {{objdump {-sdr} abs-shared.d} +- {readelf {-rW} abs-shared.r}} "abs-shared"} +- {"abs-pie-relr" "-melf64ppc -pie --hash-style=sysv -z pack-relative-relocs --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x123456789abcdef0" "" +- "-a64" {abs-reloc.s} +- {{objdump {-sdr} abs-pie-relr.d} +- {readelf {-rW} abs-pie-relr.r}} "abs-pie-relr"} +- {"abs-shared-relr" "-melf64ppc -shared --hash-style=sysv -z pack-relative-relocs --defsym a=1 --defsym 'HIDDEN(b=2)' --defsym c=0x123456789abcdef0" "" +- "-a64" {abs-reloc.s} +- {{objdump {-sdr} abs-shared-relr.d} +- {readelf {-rW} abs-shared-relr.r}} "abs-shared-relr"} + } + + set ppceabitests { +@@ -404,15 +151,6 @@ set ppceabitests { + {"VLE multiple segments 5" "-melf32ppc -T vle-multiseg-5.ld" "" + "-a32 -mbig -mregnames -mvle" {vle-multiseg.s} + {{readelf "-l" vle-multiseg-5.d}} "vle-multiseg-5"} +- {"VLE relocations 1" "-melf32ppc -T vle.ld" "" +- "-a32 -mbig -mvle" {vle-reloc-1.s vle-reloc-def-1.s} +- {{objdump "-Mvle -d" vle-reloc-1.d}} "vle-reloc-1"} +- {"VLE relocations 2" "-melf32ppc -T vle.ld" "" +- "-a32 -mbig -mvle" {vle-reloc-2.s vle-reloc-def-2.s} +- {{objdump "-Mvle -d" vle-reloc-2.d}} "vle-reloc-2"} +- {"VLE relocations 3" "-melf32ppc -T vle.ld" "" +- "-a32 -mbig -mvle" {vle-reloc-3.s vle-reloc-def-3.s} +- {{objdump "-Mvle -d" vle-reloc-3.d}} "vle-reloc-3"} + } + + if [istarget "powerpc*le*-*-*"] then { +diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls32.d binutils-2.41/ld/testsuite/ld-powerpc/tls32.d +--- binutils.orig/ld/testsuite/ld-powerpc/tls32.d 2023-08-15 14:30:13.278890868 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/tls32.d 2023-08-15 14:35:25.141593764 +0100 +@@ -9,11 +9,11 @@ + + Disassembly of section \.text: + +-0+18000a0 <_start>: ++0+18[0-9a-f]+ <_start>: + .*: (42 9f 00 05|05 00 9f 42) bcl 20,4\*cr7\+so,.* <_start\+0x4> + .*: (7f c8 02 a6|a6 02 c8 7f) mflr r30 + .*: (3f de 00 02|02 00 de 3f) addis r30,r30,2 +-.*: (3b de 80 a0|a0 80 de 3b) addi r30,r30,-32608 ++.*: (3b de 80 a0|.. 80 de 3b) addi r30,r30,.* + .*: (60 00 00 00|00 00 00 60) nop + .*: (38 62 90 3c|3c 90 62 38) addi r3,r2,-28612 + .*: (60 00 00 00|00 00 00 60) nop +@@ -43,5 +43,5 @@ Disassembly of section \.text: + .*: (60 00 00 00|00 00 00 60) nop + .*: (a9 42 90 18|18 90 42 a9) lha r10,-28648\(r2\) + +-0+1800120 <__tls_get_addr>: ++0+18[0-9a-f]+ <__tls_get_addr>: + .*: (4e 80 00 20|20 00 80 4e) blr +--- binutils.orig/ld/testsuite/ld-elf/shared.exp 2023-08-15 14:30:13.165890702 +0100 ++++ binutils-2.41/ld/testsuite/ld-elf/shared.exp 2023-08-15 14:45:41.943992390 +0100 +@@ -1152,10 +1152,6 @@ set run_tests [list \ [list "Run pr21964-3" \ "-Wl,--no-as-needed,-rpath,tmpdir tmpdir/pr21964-1a.so tmpdir/pr21964-1b.so tmpdir/pr21964-3a.so" "" \ {pr21964-3c.c} "pr21964-3" "pass.out" ] \ -+] -+set disabled_run_tests [list \ - [list "pr26580-3" \ +- [list "pr26580-3" \ +- "" "" \ +- {pr26580-a.c} "pr26580-3" "pr26580-3.out" "-fcommon" "c" "" \ +- "-Wl,--as-needed tmpdir/libpr26580-2.so" ] \ + [list "pr26580-4" \ "" "" \ - {pr26580-a.c} "pr26580-3" "pr26580-3.out" "-fcommon" "c" "" \ -@@ -1578,6 +1580,8 @@ if { [istarget *-*-linux*] + {pr26580-a.c} "pr26580-4" "pr26580-4.out" "-fcommon" "c" "" \ +@@ -1579,18 +1575,6 @@ if { [istarget *-*-linux*] "pr22393-2-static" \ "pass.out" \ ] \ -+ ] -+ set disabled_run_ld_link_exec_tests [list \ - [list \ - "Run pr21964-4" \ - "" \ -diff -rup binutils.orig/ld/testsuite/ld-i386/i386.exp binutils-2.40/ld/testsuite/ld-i386/i386.exp ---- binutils.orig/ld/testsuite/ld-i386/i386.exp 2023-02-14 11:18:21.160180625 +0000 -+++ binutils-2.40/ld/testsuite/ld-i386/i386.exp 2023-02-14 12:11:45.977957736 +0000 -@@ -595,7 +595,7 @@ proc undefined_weak {cflags ldflags} { - pass $testname +- [list \ +- "Run pr21964-4" \ +- "" \ +- "" \ +- {pr21964-4.c} \ +- "pr21964-4" \ +- "pass.out" \ +- "" \ +- "" \ +- "" \ +- "-ldl" \ +- ] \ + ] + } + +--- binutils.orig/ld/testsuite/ld-s390/s390.exp 2023-08-15 14:30:13.292890888 +0100 ++++ binutils-2.41/ld/testsuite/ld-s390/s390.exp 2023-08-15 14:48:38.327360916 +0100 +@@ -35,6 +35,8 @@ if { !([istarget "s390-*-*"] || [istarge + # nm: Apply nm options on result. Compare with regex (last arg). + # readelf: Apply readelf options on result. Compare with regex (last arg). + ++return ++ + set s390tests { + {"TLS -fpic -shared transitions" "-shared -melf_s390 --hash-style=sysv" "" + "-m31" {tlspic1.s tlspic2.s} +--- binutils.orig/ld/testsuite/ld-elf/linux-x86.exp 2023-08-15 14:30:13.146890674 +0100 ++++ binutils-2.41/ld/testsuite/ld-elf/linux-x86.exp 2023-08-15 14:54:31.527999066 +0100 +@@ -152,6 +152,10 @@ run_cc_link_tests [list \ + ] \ + ] + ++if { [istarget "i686-*-*"] } { ++ return ++} ++ + run_ld_link_exec_tests [list \ + [list \ + "Run indirect-extern-access-1a without PIE" \ +--- binutils.orig/ld/testsuite/ld-i386/i386.exp 2023-08-15 14:30:13.183890728 +0100 ++++ binutils-2.41/ld/testsuite/ld-i386/i386.exp 2023-08-15 14:55:59.001157084 +0100 +@@ -597,6 +597,10 @@ proc undefined_weak {cflags ldflags} { } } -- -+return + ++if { [istarget "i686-*-*"] } { ++ return ++} ++ # Must be Linux native with the C compiler if { [isnative] && [istarget "i?86-*-linux*"] -diff -rup binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp binutils-2.40/ld/testsuite/ld-ifunc/ifunc.exp ---- binutils.orig/ld/testsuite/ld-ifunc/ifunc.exp 2023-02-14 11:18:21.181180582 +0000 -+++ binutils-2.40/ld/testsuite/ld-ifunc/ifunc.exp 2023-02-14 11:24:18.256364707 +0000 -@@ -39,6 +39,7 @@ if { ![is_elf_format] || ![supports_gnu_ - || [istarget nds32*-*-*] - || [istarget nios2-*-*] - || [istarget or1k-*-*] -+ || [istarget powerpc*-*-*] - || [istarget score*-*-*] - || [istarget sh*-*-*] - || [istarget tic6x-*-*] -diff -rup binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.40/ld/testsuite/ld-powerpc/powerpc.exp ---- binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp 2023-02-14 11:18:21.251180437 +0000 -+++ binutils-2.40/ld/testsuite/ld-powerpc/powerpc.exp 2023-02-14 11:25:15.264233016 +0000 -@@ -19,7 +19,7 @@ - # MA 02110-1301, USA. - # - --if { ![istarget "powerpc*-*-*"] } { -+if { ![istarget "powerpc-*-*"] } { - return - } - -diff -rup binutils.orig/ld/testsuite/ld-s390/s390.exp binutils-2.40/ld/testsuite/ld-s390/s390.exp ---- binutils.orig/ld/testsuite/ld-s390/s390.exp 2023-02-14 11:18:21.265180408 +0000 -+++ binutils-2.40/ld/testsuite/ld-s390/s390.exp 2023-02-14 12:08:39.450351870 +0000 -@@ -25,6 +25,7 @@ - if { !([istarget "s390-*-*"] || [istarget "s390x-*-*"]) } { - return - } -+return - - # List contains test-items with 3 items followed by 2 lists: - # 0:name 1:ld early options 2:ld late options 3:assembler options -diff -rup binutils.orig/ld/testsuite/ld-scripts/crossref.exp binutils-2.40/ld/testsuite/ld-scripts/crossref.exp ---- binutils.orig/ld/testsuite/ld-scripts/crossref.exp 2023-02-14 13:34:28.101107836 +0000 -+++ binutils-2.40/ld/testsuite/ld-scripts/crossref.exp 2023-02-14 13:38:51.694556937 +0000 -@@ -122,6 +122,7 @@ if [string match "" $exec_output] then { +--- binutils.orig/ld/testsuite/ld-scripts/crossref.exp 2023-08-15 14:30:13.294890891 +0100 ++++ binutils-2.41/ld/testsuite/ld-scripts/crossref.exp 2023-08-15 14:59:36.680591177 +0100 +@@ -121,6 +121,10 @@ if [string match "" $exec_output] then { + } } ++if { [istarget "i686-*-*"] } { ++ return ++} ++ # Check cross references for ld -r -+return if { ![ld_compile "$CC_FOR_TARGET $NOSANITIZE_CFLAGS $NOLTO_CFLAGS" "$srcdir/$subdir/cross4.c" tmpdir/cross4.o] } { - unsupported $test3 -diff -rup binutils.orig/ld/testsuite/ld-shared/shared.exp binutils-2.40/ld/testsuite/ld-shared/shared.exp ---- binutils.orig/ld/testsuite/ld-shared/shared.exp 2023-02-14 13:34:28.118107801 +0000 -+++ binutils-2.40/ld/testsuite/ld-shared/shared.exp 2023-02-14 13:37:23.950740329 +0000 -@@ -42,8 +42,6 @@ if { ![istarget hppa*64*-*-hpux*] \ - && ![istarget i?86-*-sysv4*] \ - && ![istarget i?86-*-unixware] \ - && ![istarget i?86-*-elf*] \ -- && ![istarget i?86-*-linux*] \ -- && ![istarget i?86-*-gnu*] \ - && ![istarget *-*-nacl*] \ - && ![istarget ia64-*-elf*] \ - && ![istarget ia64-*-linux*] \ -diff -rup binutils.orig/ld/testsuite/ld-vsb/vsb.exp binutils-2.40/ld/testsuite/ld-vsb/vsb.exp ---- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2023-02-14 13:34:28.137107761 +0000 -+++ binutils-2.40/ld/testsuite/ld-vsb/vsb.exp 2023-02-14 13:36:57.630795340 +0000 -@@ -34,8 +34,6 @@ if { ![check_compiler_available] } { +--- binutils.orig/ld/testsuite/ld-shared/shared.exp 2023-08-15 14:30:13.309890913 +0100 ++++ binutils-2.41/ld/testsuite/ld-shared/shared.exp 2023-08-15 15:00:31.929701875 +0100 +@@ -204,6 +204,10 @@ if { [istarget mips*-*-*] && ! [at_least + } + verbose "Using $picflag to compile PIC code" + ++if { [istarget "i686-*-*"] } { ++ return ++} ++ + # Compile the main program. + if ![ld_compile "$CC_FOR_TARGET $SHCFLAG" $srcdir/$subdir/main.c $tmpdir/mainnp.o] { + unsupported "shared (non PIC)" +--- binutils.orig/ld/testsuite/ld-srec/srec.exp 2023-08-15 14:30:13.315890922 +0100 ++++ binutils-2.41/ld/testsuite/ld-srec/srec.exp 2023-08-15 15:01:24.104806404 +0100 +@@ -442,6 +442,9 @@ setup_xfail "csky*-*-*" + # The S-record linker is not supported for eBPF. + setup_xfail "bpf-*-*" + ++setup_xfail "s390*-*-*" ++setup_xfail "i686-*-*" ++ + run_srec_test $test1 "tmpdir/sr1.o tmpdir/sr2.o" + + # Now try linking a C++ program with global constructors and +--- binutils.orig/ld/testsuite/ld-vsb/vsb.exp 2023-08-15 14:30:13.329890943 +0100 ++++ binutils-2.41/ld/testsuite/ld-vsb/vsb.exp 2023-08-15 15:03:41.018080699 +0100 +@@ -29,6 +29,10 @@ if { ![check_compiler_available] } { + return + } + ++if { [istarget "i686-*-*"] } { ++ return ++} ++ + # This test can only be run on a couple of ELF platforms or with + # XCOFF formats. # Square bracket expressions seem to confuse istarget. - if { ![istarget hppa*64*-*-hpux*] \ - && ![istarget hppa*-*-linux*] \ -- && ![istarget i?86-*-linux*] \ -- && ![istarget i?86-*-gnu*] \ - && ![istarget *-*-nacl*] \ - && ![istarget ia64-*-linux*] \ - && ![istarget m68k-*-linux*] \ -diff -rup binutils.orig/gas/testsuite/gas/riscv/variant_cc-set.d binutils-2.40/gas/testsuite/gas/riscv/variant_cc-set.d ---- binutils.orig/gas/testsuite/gas/riscv/variant_cc-set.d 2023-02-16 10:11:38.178876057 +0000 -+++ binutils-2.40/gas/testsuite/gas/riscv/variant_cc-set.d 2023-02-16 10:37:02.341246522 +0000 -@@ -3,11 +3,11 @@ - #readelf: -Ws +diff -rup binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp binutils-2.41/ld/testsuite/ld-powerpc/powerpc.exp +--- binutils.orig/ld/testsuite/ld-powerpc/powerpc.exp 2023-08-15 15:04:24.106167010 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/powerpc.exp 2023-08-15 15:59:51.422385730 +0100 +@@ -177,6 +177,8 @@ if [istarget "powerpc*le*-*-*"] then { - #... --[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+foo -+[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+foo[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+bar - #... --[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+alias_foo -+[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+alias_foo[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]alias_bar - #... -diff -rup binutils.orig/gas/testsuite/gas/riscv/variant_cc.d binutils-2.40/gas/testsuite/gas/riscv/variant_cc.d ---- binutils.orig/gas/testsuite/gas/riscv/variant_cc.d 2023-02-16 10:11:38.178876057 +0000 -+++ binutils-2.40/gas/testsuite/gas/riscv/variant_cc.d 2023-02-16 10:37:49.732155971 +0000 -@@ -3,7 +3,7 @@ - #readelf: -Ws + run_ld_link_tests $ppcelftests + ++return ++ + if [ supports_ppc64 ] then { + run_ld_link_tests $ppc64elftests + run_dump_test "relbrlt" +diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls.d binutils-2.41/ld/testsuite/ld-powerpc/tls.d +--- binutils.orig/ld/testsuite/ld-powerpc/tls.d 2023-08-15 15:04:24.100166998 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/tls.d 2023-08-15 15:59:07.422314417 +0100 +@@ -9,7 +9,7 @@ - #... --[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+func -+[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+func[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+foo -+[ ]+[0-9a-f]+:[ ]+0+[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+foo[ ]+\[VARIANT_CC\] - #... -diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/attr-phdr.d binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d ---- binutils.orig/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-02-16 10:11:38.656875289 +0000 -+++ binutils-2.40/ld/testsuite/ld-riscv-elf/attr-phdr.d 2023-02-16 10:49:26.786573665 +0000 -@@ -12,8 +12,8 @@ Program Headers: - Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align - RISCV_ATTRIBUT .* - LOAD .* -- -+#... - Section to Segment mapping: - Segment Sections... - 00 .riscv.attributes -- 01 .text -+#pass -diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d ---- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-02-16 10:11:38.659875285 +0000 -+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-01.d 2023-02-16 10:42:54.803431287 +0000 -@@ -8,7 +8,7 @@ Disassembly of section \.text: - 0+[0-9a-f]+ <_start>: --.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,[0-9]+ -+.*:[ ]+[0-9a-f]+[ ]+addi[ ]+a0,a0,\-[0-9]+ - .*:[ ]+[0-9a-f]+[ ]+jal[ ]+ra,[0-9a-f]+ <_start> - .*:[ ]+[0-9a-f]+[ ]+addi[ ]+a1,gp,\-[0-9]+ # [0-9a-f]+ - .*:[ ]+[0-9a-f]+[ ]+addi[ ]+a2,gp,\-[0-9]+ # [0-9a-f]+ -diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d ---- binutils.orig/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-02-16 10:11:38.659875285 +0000 -+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcgp-relax-02.d 2023-02-16 10:43:49.540306593 +0000 -@@ -11,5 +11,5 @@ Disassembly of section .text: - [0-9a-f]+ <_start>: - .*:[ ]+[0-9a-f]+[ ]+auipc[ ]+a1.* - .*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a0,gp.* --.*:[ ]+[0-9a-f]+[ ]+addi?[ ]+a1,a1.* -+.*:[ ]+[0-9a-f]+[ ]+mv[ ]+a1,a1 - #pass -diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d ---- binutils.orig/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-02-16 10:11:38.659875285 +0000 -+++ binutils-2.40/ld/testsuite/ld-riscv-elf/pcrel-lo-addend-2a.d 2023-02-16 10:46:55.570899994 +0000 -@@ -2,4 +2,5 @@ - #source: pcrel-lo-addend-2a.s - #as: -march=rv32ic - #ld: -m[riscv_choose_ilp32_emul] --no-relax -+#skip: *-*-* - #error: .*dangerous relocation: %pcrel_lo overflow with an addend, the value of %pcrel_hi is 0x1000 without any addend, but may be 0x2000 after adding the %pcrel_lo addend -diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/variant_cc-now.d binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-now.d ---- binutils.orig/ld/testsuite/ld-riscv-elf/variant_cc-now.d 2023-02-16 10:11:38.660875283 +0000 -+++ binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-now.d 2023-02-16 10:57:10.768645601 +0000 -@@ -22,52 +22,52 @@ Symbol table '.dynsym' contains .* - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def - #... - Symbol table '.symtab' contains .* - .* - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local_ifunc - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local - #... --[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2 -+[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2_ifunc - #... - [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2 - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_def -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_def[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_def - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_ifunc - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def - #... -diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/variant_cc-r.d binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-r.d ---- binutils.orig/ld/testsuite/ld-riscv-elf/variant_cc-r.d 2023-02-16 10:11:38.660875283 +0000 -+++ binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-r.d 2023-02-16 10:57:47.521574461 +0000 -@@ -38,17 +38,17 @@ Relocation section '.rela.text' at .* - Symbol table '.symtab' contains .* - .* - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local_ifunc -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local_ifunc - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local - #... --[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2 -+[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2_ifunc -+[ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+0070[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2_ifunc - #... -@@ -56,11 +56,11 @@ Symbol table '.symtab' contains .* - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+HIDDEN[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_def -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+HIDDEN[ ]+1[ ]+cc_global_hidden_def[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+HIDDEN[ ]+1[ ]+nocc_global_hidden_def - #... -@@ -68,9 +68,9 @@ Symbol table '.symtab' contains .* - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+HIDDEN[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_ifunc -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+HIDDEN[ ]+1[ ]+cc_global_hidden_ifunc[ ]+\[VARIANT_CC\] - #... -diff -rup binutils.orig/ld/testsuite/ld-riscv-elf/variant_cc-shared.d binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-shared.d ---- binutils.orig/ld/testsuite/ld-riscv-elf/variant_cc-shared.d 2023-02-16 10:11:38.660875283 +0000 -+++ binutils-2.40/ld/testsuite/ld-riscv-elf/variant_cc-shared.d 2023-02-16 10:54:20.881974426 +0000 -@@ -22,52 +22,52 @@ Symbol table '.dynsym' contains .* - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def - #... - Symbol table '.symtab' contains .* - .* - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local_ifunc - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local - #... --[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2 -+[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_local2_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_local2_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2_ifunc - #... - [ ]+[0-9a-f]+:[ ]+0+8050[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_local2 - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_def -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_def[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_def - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_hidden_ifunc - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_hidden_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+LOCAL[ ]+DEFAULT[ ]+1[ ]+cc_global_hidden_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+nocc_global_default_undef - #... --[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+UND[ ]+cc_global_default_undef -+[ ]+[0-9a-f]+:[ ]+0+0000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+UND[ ]+cc_global_default_undef[ ]+\[VARIANT_CC\] - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_ifunc -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_ifunc[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+IFUNC[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_ifunc - #... --[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+\[VARIANT_CC\][ ]+1[ ]+cc_global_default_def -+[ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+cc_global_default_def[ ]+\[VARIANT_CC\] - #... - [ ]+[0-9a-f]+:[ ]+0+8000[ ]+0[ ]+NOTYPE[ ]+GLOBAL[ ]+DEFAULT[ ]+1[ ]+nocc_global_default_def - #... -diff -rup binutils.orig/ld/testsuite/ld-elf/dwarf.exp binutils-2.40/ld/testsuite/ld-elf/dwarf.exp ---- binutils.orig/ld/testsuite/ld-elf/dwarf.exp 2023-02-16 10:11:38.515875516 +0000 -+++ binutils-2.40/ld/testsuite/ld-elf/dwarf.exp 2023-02-16 11:08:52.209377332 +0000 -@@ -29,6 +29,10 @@ if ![is_elf_format] { - return - } +-0+100000e8 <\._start>: ++0+100..... <\._start>: + .*: (60 00 00 00|00 00 00 60) nop + .*: (38 6d 90 78|78 90 6d 38) addi r3,r13,-28552 + .*: (60 00 00 00|00 00 00 60) nop +@@ -49,5 +49,5 @@ Disassembly of section \.text: + .*: (60 00 00 00|00 00 00 60) nop + .*: (a9 4d 90 30|30 90 4d a9) lha r10,-28624\(r13\) -+if { [istarget riscv*-*-*] } then { +-0+10000180 <\.__tls_get_addr>: ++0+100..... <\.__tls_get_addr>: + .*: (4e 80 00 20|20 00 80 4e) blr +diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls32.g binutils-2.41/ld/testsuite/ld-powerpc/tls32.g +--- binutils.orig/ld/testsuite/ld-powerpc/tls32.g 2023-08-15 15:04:24.100166998 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/tls32.g 2023-08-15 15:56:33.167064455 +0100 +@@ -8,4 +8,4 @@ + .* + + Contents of section \.got: +- 1810144 00000000 00000000 00000000 .* ++ 18..... 00000000 00000000 00000000 .* +diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls32no.d binutils-2.41/ld/testsuite/ld-powerpc/tls32no.d +--- binutils.orig/ld/testsuite/ld-powerpc/tls32no.d 2023-08-15 15:04:24.100166998 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/tls32no.d 2023-08-15 15:58:02.959209959 +0100 +@@ -9,11 +9,11 @@ + + Disassembly of section \.text: + +-0+18000a0 <_start>: ++0+18..... <_start>: + .*: (42 9f 00 05|05 00 9f 42) bcl .* + .*: (7f c8 02 a6|a6 02 c8 7f) mflr r30 + .*: (3f de 00 02|02 00 de 3f) addis r30,r30,2 +-.*: (3b de 80 a0|a0 80 de 3b) addi r30,r30,-32608 ++.*: (3b de 80 a0|.. 80 de 3b) addi r30,r30,-[0-9]+ + .*: (38 7f ff e4|e4 ff 7f 38) addi r3,r31,-28 + .*: (48 00 00 6d|6d 00 00 48) bl .* + .*: (38 7f ff f8|f8 ff 7f 38) addi r3,r31,-8 +@@ -43,5 +43,5 @@ Disassembly of section \.text: + .*: (3d 22 00 00|00 00 22 3d) addis r9,r2,0 + .*: (a9 49 90 18|18 90 49 a9) lha r10,-28648\(r9\) + +-0+1800120 <__tls_get_addr>: ++0+18..... <__tls_get_addr>: + .*: (4e 80 00 20|20 00 80 4e) blr +--- binutils.orig/ld/testsuite/ld-elf/linux-x86.exp 2023-08-15 15:04:23.995166788 +0100 ++++ binutils-2.41/ld/testsuite/ld-elf/linux-x86.exp 2023-08-15 16:03:11.615710200 +0100 +@@ -73,6 +73,10 @@ run_ld_link_tests [list \ + ] \ + ] + ++if { [istarget "i686-*-*"] } { + return +} + - # Skip targets where -shared is not supported + run_cc_link_tests [list \ + [list \ + "Build indirect-extern-access-1.so" \ +@@ -152,10 +156,6 @@ run_cc_link_tests [list \ + ] \ + ] - if ![check_shared_lib_support] { -diff -rup binutils.orig/ld/testsuite/ld-elf/tls.exp binutils-2.40/ld/testsuite/ld-elf/tls.exp ---- binutils.orig/ld/testsuite/ld-elf/tls.exp 2023-02-16 10:11:38.540875476 +0000 -+++ binutils-2.40/ld/testsuite/ld-elf/tls.exp 2023-02-16 11:08:56.944369374 +0000 -@@ -28,6 +28,10 @@ if { !([istarget *-*-linux*] - return - } +-if { [istarget "i686-*-*"] } { +- return +-} +- + run_ld_link_exec_tests [list \ + [list \ + "Run indirect-extern-access-1a without PIE" \ +diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls32.t binutils-2.41/ld/testsuite/ld-powerpc/tls32.t +--- binutils.orig/ld/testsuite/ld-powerpc/tls32.t 2023-08-15 16:48:58.540653339 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/tls32.t 2023-08-15 16:49:34.611717013 +0100 +@@ -8,5 +8,5 @@ + .* -+if { [istarget riscv*-*-*] } then { -+ return -+} + Contents of section \.tdata: +- 1810124 (12345678|78563412) (23456789|89674523) (3456789a|9a785634) (456789ab|ab896745) .* +- 1810134 (56789abc|bc9a7856) (6789abcd|cdab8967) (789abcde|debc9a78) (00c0ffee|eeffc000) .* ++#pass + - # Check to see if the C compiler works. - if { ![check_compiler_available] } { - return ---- binutils.orig/binutils/testsuite/lib/binutils-common.exp 2023-06-21 09:46:50.861865196 +0100 -+++ binutils-2.40/binutils/testsuite/lib/binutils-common.exp 2023-06-21 09:47:24.240856913 +0100 -@@ -641,6 +641,8 @@ proc prune_warnings_extra { text } { - regsub -all "(^|\n)(\[^\n\]*: NOTE: This behaviour is deprecated\[^\n\]*\n?)+" $text "\\1" text - regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*has a LOAD segment with RWX permissions\[^\n\]*\n?)+" $text "\\1" text - regsub -all "(^|\n)(\[^\n\]*: warning:\[^\n\]*has a TLS segment with execute permission\[^\n\]*\n?)+" $text "\\1" text -+ # Configuring with --enable-warn-execstack=yes will generate warnings if -z execstack is used. -+ regsub -all "(^|\n)(\[^\n\]*: warning: enabling an executable stack because of -z execstack command line option\[^\n\]*\n?)+" $text "\\1" text - return $text - } +diff -rup binutils.orig/ld/testsuite/ld-powerpc/tls32no.g binutils-2.41/ld/testsuite/ld-powerpc/tls32no.g +--- binutils.orig/ld/testsuite/ld-powerpc/tls32no.g 2023-08-15 17:41:46.719412912 +0100 ++++ binutils-2.41/ld/testsuite/ld-powerpc/tls32no.g 2023-08-15 17:42:37.097511729 +0100 +@@ -8,6 +8,4 @@ + .* -diff -rup binutils-2.40/ld/testsuite/ld-elf/elf.exp binutils.new/ld/testsuite/ld-elf/elf.exp ---- binutils-2.40/ld/testsuite/ld-elf/elf.exp 2023-01-14 00:00:00.000000000 +0000 -+++ binutils.new/ld/testsuite/ld-elf/elf.exp 2023-06-21 09:31:08.856233444 +0100 -@@ -180,6 +180,21 @@ if { [check_gc_sections_available] && ![ - } - - proc target_defaults_to_execstack {} { -+ global base_dir -+ -+ # If the linker has been configured with --enable-default-execstack=no then -+ # this proc should always return 0. -+ if { [file exists $base_dir/config.status] } { -+ set status [remote_exec host grep "enable-default-execstack=no" $base_dir/config.status] -+ if { [lindex $status 0] == 0 } { -+ return 0 -+ } else { -+ verbose -log "$base_dir/config.status does not contain enable-default-execstack=no" -+ } -+ } else { -+ verbose -log "there is no file $base_dir/config.status" -+ } -+ - if { [istarget "aarch64*-*-*"] - || [istarget "arc*-*-*"] - || [istarget "cris*-*-*"] + Contents of section \.got: +- 1810144 (0+01 f+8000 0+01 f+803c|010+ 0080f+ 010+ 3c80f+) .* +- 1810154 (0+01 f+8020 f+9030 0+01|010+ 2080f+ 3090f+ 010+) .* +- 1810164 0+ 0+ 0+ 0+0 .* ++#pass diff --git a/binutils-update-linker-manual.patch b/binutils-update-linker-manual.patch index 6939214..c7b6270 100644 --- a/binutils-update-linker-manual.patch +++ b/binutils-update-linker-manual.patch @@ -1,31 +1,31 @@ -diff -rup binutils.orig/ld/ld.1 binutils-2.38/ld/ld.1 ---- binutils.orig/ld/ld.1 2022-05-27 10:56:44.937044892 +0100 -+++ binutils-2.38/ld/ld.1 2022-05-27 11:10:50.311802310 +0100 -@@ -2595,7 +2595,7 @@ systems may not understand them. If you +diff -rup binutils.orig/ld/ld.1 binutils-2.41/ld/ld.1 +--- binutils.orig/ld/ld.1 2023-08-03 12:47:14.427004953 +0100 ++++ binutils-2.41/ld/ld.1 2023-08-03 12:49:10.672145873 +0100 +@@ -2669,7 +2669,7 @@ systems may not understand them. If you \&\fB\-\-enable\-new\-dtags\fR, the new dynamic tags will be created as needed and older dynamic tags will be omitted. If you specify \fB\-\-disable\-new\-dtags\fR, no new dynamic tags will be -created. By default, the new dynamic tags are not created. Note that +created. By default, the new dynamic tags are created. Note that - those options are only available for \s-1ELF\s0 systems. - .IP "\fB\-\-hash\-size=\fR\fInumber\fR" 4 + those options are only available for ELF systems. + .IP \fB\-\-hash\-size=\fR\fInumber\fR 4 .IX Item "--hash-size=number" -diff -rup binutils.orig/ld/ld.info binutils-2.38/ld/ld.info ---- binutils.orig/ld/ld.info 2022-05-27 11:01:12.286346357 +0100 -+++ binutils-2.38/ld/ld.info 2022-05-27 11:11:24.585709176 +0100 -@@ -2236,7 +2236,7 @@ GNU linker: - '--enable-new-dtags', the new dynamic tags will be created as +diff -rup binutils.orig/ld/ld.info binutils-2.41/ld/ld.info +--- binutils.orig/ld/ld.info 2023-08-03 12:47:14.427004953 +0100 ++++ binutils-2.41/ld/ld.info 2023-08-03 12:49:58.829204257 +0100 +@@ -2366,7 +2366,7 @@ GNU linker: + ‘--enable-new-dtags’, the new dynamic tags will be created as needed and older dynamic tags will be omitted. If you specify - '--disable-new-dtags', no new dynamic tags will be created. By + ‘--disable-new-dtags’, no new dynamic tags will be created. By - default, the new dynamic tags are not created. Note that those + default, the new dynamic tags are created. Note that those options are only available for ELF systems. - '--hash-size=NUMBER' -diff -rup binutils.orig/ld/ld.texi binutils-2.38/ld/ld.texi ---- binutils.orig/ld/ld.texi 2022-05-27 11:01:24.081314960 +0100 -+++ binutils-2.38/ld/ld.texi 2022-05-27 11:10:05.608923798 +0100 -@@ -2796,7 +2796,7 @@ systems may not understand them. If you + ‘--hash-size=NUMBER’ +diff -rup binutils.orig/ld/ld.texi binutils-2.41/ld/ld.texi +--- binutils.orig/ld/ld.texi 2023-08-03 12:50:58.176276215 +0100 ++++ binutils-2.41/ld/ld.texi 2023-08-03 12:41:11.902610960 +0100 +@@ -2946,7 +2946,7 @@ systems may not understand them. If you @option{--enable-new-dtags}, the new dynamic tags will be created as needed and older dynamic tags will be omitted. If you specify @option{--disable-new-dtags}, no new dynamic tags will be diff --git a/binutils.spec b/binutils.spec index c8e798d..9721cbe 100644 --- a/binutils.spec +++ b/binutils.spec @@ -1,8 +1,8 @@ Summary: A GNU collection of binary utilities Name: binutils%{?_with_debug:-debug} -Version: 2.40 -Release: 13%{?dist} +Version: 2.41 +Release: 1%{?dist} License: GPL-3.0-or-later AND (GPL-3.0-or-later WITH Bison-exception-2.2) AND (LGPL-2.0-or-later WITH GCC-exception-2.0) AND BSD-3-Clause AND GFDL-1.3-or-later AND GPL-2.0-or-later LGPL-2.1-or-later AND LGPL-2.0-or-later URL: https://sourceware.org/binutils @@ -187,103 +187,66 @@ Patch03: binutils-export-demangle.h.patch # order. Patch04: binutils-no-config-h-check.patch -# Purpose: Include the filename concerned in readelf error and warning -# messages. This helps when readelf is run with multiple -# input files or when multiple instances of readelf are -# running at the same time. -# Lifetime: Permanent. This patch changes the format of readelf's output, -# making it better (IMHO) but also potentially breaking tools that -# depend upon readelf's current output format. cf/ Patch07. -# It also tends to break parts of the binutils own -# testsuite. Hence the patch remains local for now. -Patch05: binutils-filename-in-readelf-messages.patch - # Purpose: Disable an x86/x86_64 optimization that moves functions from the # PLT into the GOTPLT for faster access. This optimization is # problematic for tools that want to intercept PLT entries, such # as ltrace and LD_AUDIT. See BZs 1452111 and 1333481. # Lifetime: Permanent. But it should not be. # FIXME: Replace with a configure time option. -Patch06: binutils-revert-PLT-elision.patch - -# Purpose: Changes readelf so that when it displays extra information about -# a symbol, this information is placed at the end of the line. -# Lifetime: Permanent. cf/ Patch05. -# FIXME: The proper fix would be to update the scripts that are expecting -# a fixed output from readelf. But it seems that some of them are -# no longer being maintained. -Patch07: binutils-readelf-other-sym-info.patch +Patch05: binutils-revert-PLT-elision.patch # Purpose: Do not create PLT entries for AARCH64 IFUNC symbols referenced in # debug sections. # Lifetime: Permanent. # FIXME: Find related bug. Decide on permanency. -Patch08: binutils-2.27-aarch64-ifunc.patch +Patch06: binutils-2.27-aarch64-ifunc.patch # Purpose: Stop the binutils from statically linking with libstdc++. # Lifetime: Permanent. -Patch09: binutils-do-not-link-with-static-libstdc++.patch +Patch07: binutils-do-not-link-with-static-libstdc++.patch # Purpose: Allow OS specific sections in section groups. -# Lifetime: Fixed in 2.39 (maybe) -Patch10: binutils-special-sections-in-groups.patch - -# Purpose: Fix linker testsuite failures. -# Lifetime: Fixed in 2.39 (maybe) -Patch11: binutils-fix-testsuite-failures.patch +# Lifetime: Fixed in 2.42 (maybe) +Patch08: binutils-special-sections-in-groups.patch # Purpose: Stop gold from aborting when input sections with the same name # have different flags. -# Lifetime: Fixed in 2.39 (maybe) -Patch12: binutils-gold-mismatched-section-flags.patch +# Lifetime: Fixed in 2.42 (maybe) +Patch09: binutils-gold-mismatched-section-flags.patch # Purpose: Change the gold configuration script to only warn about # unsupported targets. This allows the binutils to be built with # BPF support enabled. # Lifetime: Permanent. -Patch13: binutils-gold-warn-unsupported.patch +Patch10: binutils-gold-warn-unsupported.patch # Purpose: Enable the creation of .note.gnu.property sections by the GOLD # linker for x86 binaries. # Lifetime: Permanent. -Patch14: binutils-gold-i386-gnu-property-notes.patch +Patch11: binutils-gold-i386-gnu-property-notes.patch # Purpose: Allow the binutils to be configured with any (recent) version of # autoconf. -# Lifetime: Fixed in 2.39 (maybe ?) -Patch15: binutils-autoconf-version.patch +# Lifetime: Fixed in 2.42 (maybe ?) +Patch12: binutils-autoconf-version.patch # Purpose: Stop libtool from inserting useless runpaths into binaries. # Lifetime: Who knows. -Patch16: binutils-libtool-no-rpath.patch +Patch13: binutils-libtool-no-rpath.patch %if %{enable_new_dtags} # Purpose: Change ld man page so that it says that --enable-new-dtags is the default. # Lifetime: Permanent -Patch17: binutils-update-linker-manual.patch +Patch14: binutils-update-linker-manual.patch %endif -# Purpose: Speed up objcopy's note merging algorithm. -# Lifetime: Fixed in 2.41 -Patch18: binutils-objcopy-note-merge-speedup.patch - -# Purpose: Fix testsuite failures due to the patches applied here. -# Lifetime: Permanent, but varying with each new rebase. -Patch19: binutils-testsuite-fixes.patch - -# Purpose: Stop the linker from associating allocated reloc sections with -# the .symtab section , which prevents it from being stripped. -# Lifetime: Fixed in 2.41 -Patch20: binutils-reloc-symtab.patch - -# Purpose: Stop an illegal memory access in the BFD library when loading -# a file with corrupt symbol version information. -# Lifetime: Fixed in 2.41 -Patch21: binutils-CVE-2023-1972.patch - # Purpose: Stop an abort when using dwp to process a file with no dwo links. -# Lifetime: Fixed in 2.41 (maybe) -Patch22: binutils-gold-empty-dwp.patch +# Lifetime: Fixed in 2.42 (maybe) +Patch15: binutils-gold-empty-dwp.patch + +# Purpose: Fix binutils testsuite failures. +# Lifetime: Permanent, but varies with each rebase. +Patch16: binutils-testsuite-fixes.patch #---------------------------------------------------------------------------- @@ -983,11 +946,11 @@ install_binutils() %set_build_flags %make_build -s CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libsframe - install -m 644 bfd/libbfd.a $local_libdir - install -m 644 libiberty/libiberty.a $local_libdir - install -m 644 ../include/libiberty.h $local_incdir - install -m 644 opcodes/libopcodes.a $local_libdir - install -m 644 libsframe/.libs/libsframe.a $local_libdir + install -m 644 bfd/.libs/libbfd.a $local_libdir + install -m 644 libiberty/libiberty.a $local_libdir + install -m 644 ../include/libiberty.h $local_incdir + install -m 644 opcodes/.libs/libopcodes.a $local_libdir + install -m 644 libsframe/.libs/libsframe.a $local_libdir # Remove Windows/Novell only man pages rm -f $local_mandir/{dlltool,nlmconv,windres,windmc}* @@ -1207,6 +1170,7 @@ exit 0 %{_infodir}/as.info.* %{_infodir}/binutils.info.* %{_infodir}/ld.info.* +%{_infodir}/ldint.info.* %{_infodir}/bfd.info.* %{_infodir}/ctf-spec.info.* %{_infodir}/gprof.info.* @@ -1283,6 +1247,16 @@ exit 0 #---------------------------------------------------------------------------- %changelog +* Thu Aug 03 2023 Nick Clifton - 2.41-1 +- Rebase to GNU Binutils 2.41 +# Patch05: binutils-filename-in-readelf-messages.patch +# Patch07: binutils-readelf-other-sym-info.patch +# Patch11: binutils-fix-testsuite-failures.patch +# Patch18: binutils-objcopy-note-merge-speedup.patch +# Patch19: binutils-testsuite-fixes.patch +# Patch20: binutils-reloc-symtab.patch +# Patch21: binutils-CVE-2023-1972.patch + * Wed Jul 19 2023 Fedora Release Engineering - 2.40-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index abd78d0..0daf97b 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (binutils-2.40.tar.xz) = a37e042523bc46494d99d5637c3f3d8f9956d9477b748b3b1f6d7dfbb8d968ed52c932e88a4e946c6f77b8f48f1e1b360ca54c3d298f17193f3b4963472f6925 -SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2 +SHA512 (binutils-2.41.tar.xz) = 5df45d0bd6ddabdce4f35878c041e46a92deef01e7dea5facc97fd65cc06b59abc6fba0eb454b68e571c7e14038dc823fe7f2263843e6e627b7444eaf0fe9374