Rebase to GNU BInutils 2.35

Resolves: #1854613
This commit is contained in:
Nick Clifton 2020-07-26 11:33:09 +01:00
parent 5cfc5a91d2
commit 15a78ff3d8
9 changed files with 124 additions and 257 deletions

1
.gitignore vendored
View File

@ -64,3 +64,4 @@ stamp-*
/isl* /isl*
/binutils-2.34.0-5dfc0c955dbe912cd328fc2688e5fceb3239ac2a.tar.xz /binutils-2.34.0-5dfc0c955dbe912cd328fc2688e5fceb3239ac2a.tar.xz
/binutils-2.19.50.0.1-output-format.sed /binutils-2.19.50.0.1-output-format.sed
/binutils-2.35.tar.xz

View File

@ -1,6 +1,6 @@
--- binutils.orig/binutils/readelf.c 2018-01-22 15:48:10.450701702 +0000 --- binutils.orig/binutils/readelf.c 2020-07-24 14:55:25.163647522 +0100
+++ binutils-2.30.0/binutils/readelf.c 2018-01-22 15:55:26.739588657 +0000 +++ binutils-2.35/binutils/readelf.c 2020-07-24 15:02:39.613851369 +0100
@@ -19019,75 +19019,85 @@ process_file (char * file_name) @@ -20729,79 +20729,92 @@ process_file (char * file_name)
Filedata * filedata = NULL; Filedata * filedata = NULL;
struct stat statbuf; struct stat statbuf;
char armag[SARMAG]; char armag[SARMAG];
@ -61,64 +61,63 @@
if (fread (armag, SARMAG, 1, filedata->handle) != 1) if (fread (armag, SARMAG, 1, filedata->handle) != 1)
{ {
- error (_("%s: Failed to read file's magic number\n"), file_name); - error (_("%s: Failed to read file's magic number\n"), file_name);
- fclose (filedata->handle); + error (_("Failed to read file's magic number\n"));
fclose (filedata->handle);
- free (filedata); - free (filedata);
- return FALSE; - return FALSE;
- } + goto done;
- }
- filedata->file_size = (bfd_size_type) statbuf.st_size;
- filedata->file_size = (bfd_size_type) statbuf.st_size;
- if (memcmp (armag, ARMAG, SARMAG) == 0)
- { if (memcmp (armag, ARMAG, SARMAG) == 0)
{
- if (! process_archive (filedata, FALSE)) - if (! process_archive (filedata, FALSE))
- ret = FALSE; - ret = FALSE;
- } + if (process_archive (filedata, FALSE))
- else if (memcmp (armag, ARMAGT, SARMAG) == 0) + ret = TRUE;
- { }
else if (memcmp (armag, ARMAGT, SARMAG) == 0)
{
- if ( ! process_archive (filedata, TRUE)) - if ( ! process_archive (filedata, TRUE))
- ret = FALSE; - ret = FALSE;
+ error (_("Failed to read file's magic number\n")); + if (process_archive (filedata, TRUE))
+ ret = TRUE;
} }
else else
{ {
- if (do_archive_index) if (do_archive_index && !check_all)
- error (_("File %s is not an archive so its index cannot be displayed.\n"), - error (_("File %s is not an archive so its index cannot be displayed.\n"),
- file_name); - file_name);
+ filedata->file_size = (bfd_size_type) statbuf.st_size; + error (_("Not an archive so its index cannot be displayed.\n"));
rewind (filedata->handle);
filedata->archive_file_size = filedata->archive_file_offset = 0;
- rewind (filedata->handle);
- archive_file_size = archive_file_offset = 0;
-
- if (! process_object (filedata)) - if (! process_object (filedata))
- ret = FALSE; - ret = FALSE;
+ if (memcmp (armag, ARMAG, SARMAG) == 0) + if (process_object (filedata))
+ { + ret = TRUE;
+ if (process_archive (filedata, FALSE))
+ ret = TRUE;
+ }
+ else if (memcmp (armag, ARMAGT, SARMAG) == 0)
+ {
+ if (process_archive (filedata, TRUE))
+ ret = TRUE;
+ }
+ else
+ {
+ if (do_archive_index)
+ error (_("Not an archive so its index cannot be displayed.\n"));
+
+ rewind (filedata->handle);
+ archive_file_size = archive_file_offset = 0;
+
+ if (process_object (filedata))
+ ret = TRUE;
+ }
} }
fclose (filedata->handle); - fclose (filedata->handle);
- free (filedata->section_headers);
- free (filedata->program_headers);
- free (filedata->string_table);
- free (filedata->dump.dump_sects);
- free (filedata);
+ done: + done:
free (filedata); + if (filedata)
+ {
+ 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); + free (program_name);
+ program_name = saved_program_name; + program_name = saved_program_name;
return ret; free (ba_cache.strtab);
} ba_cache.strtab = NULL;

View File

@ -79,17 +79,6 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-bnd.dd binutils-2.29.1/l
+#... +#...
[ ]*[a-f0-9]+: 90 nop [ ]*[a-f0-9]+: 90 nop
#pass #pass
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 13:32:39.412064336 +0000
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2017-11-15 15:06:35.148842897 +0000
@@ -1,7 +1,3 @@
#...
-Disassembly of section .plt.got:
-
-[a-f0-9]+ <[_a-z]+@plt>:
[ ]*[a-f0-9]+: f3 0f 1e fa endbr64
-[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <[_a-z]+>
#pass
diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd diff -rup binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000 --- binutils.orig/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 13:32:39.407064397 +0000
+++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000 +++ binutils-2.29.1/ld/testsuite/ld-x86-64/plt-main.rd 2017-11-15 15:06:17.244054423 +0000
@ -264,3 +253,13 @@ diff -rup binutils.orig/ld/testsuite/ld-x86-64/tlspic2.rd binutils-2.29.1/ld/tes
0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133 0+18 00000010 0000001c FDE cie=00000000 pc=00000128..00000133
DW_CFA_nop DW_CFA_nop
DW_CFA_nop DW_CFA_nop
--- binutils.orig/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2020-07-24 14:55:25.370646189 +0100
+++ binutils-2.35/ld/testsuite/ld-x86-64/plt-main-ibt.dd 2020-07-24 15:06:58.124189348 +0100
@@ -1,7 +1,3 @@
#...
-Disassembly of section .plt.got:
-
-[a-f0-9]+ <[_a-z]+@plt>:
[ ]*[a-f0-9]+: f3 0f 1e fa endbr64
-[ ]*[a-f0-9]+: f2 ff 25 .. .. 20 00 bnd jmpq \*0x20....\(%rip\) # ...... <.*>
#pass

View File

@ -223,35 +223,6 @@ diff -rup binutils-2.32.orig/ld/testsuite/ld-srec/srec.exp binutils-2.32/ld/test
proc srec_off { l } { proc srec_off { l } {
if [string match "S1*" $l] { if [string match "S1*" $l] {
return 8 return 8
diff -rup binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp
--- binutils-2.32.orig/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:33:22.030626874 +0000
+++ binutils-2.32/ld/testsuite/ld-x86-64/x86-64.exp 2019-02-15 13:57:34.295106041 +0000
@@ -1275,25 +1275,6 @@ if { [isnative] && [which $CC] != 0 } {
"$NOPIE_CFLAGS" \
] \
]
- } else {
- run_cc_link_tests [list \
- [list \
- "Build pr22001-1b" \
- "$NOPIE_LDFLAGS -Wl,-z,nocopyreloc,--no-as-needed tmpdir/pr22001-1.so" \
- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
- { pr22001-1c.c } \
- {{error_output "pr22001-1b.err"}} \
- "pr22001-1b" \
- ] \
- [list \
- "Build pr21997-1b" \
- "$NOPIE_LDFLAGS -Wl,--no-as-needed tmpdir/pr21997-1.so" \
- "$NOPIE_CFLAGS -Wa,-mx86-used-note=yes" \
- { pr21997-1c.c } \
- {{error_output "pr21997-1b.err"}} \
- "pr21997-1b" \
- ] \
- ]
}
run_ld_link_exec_tests [list \
diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-10.d binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 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.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 +++ binutils-2.32/ld/testsuite/ld-plugin/plugin-10.d 2019-02-15 14:13:53.532300721 +0000
@ -326,3 +297,34 @@ diff -rup binutils-2.32.orig/ld/testsuite/ld-plugin/plugin-8.d binutils-2.32/ld/
Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY Sym: '_?func2' Resolution: LDPR_PREVAILING_DEF_IRONLY
#... #...
hook called: cleanup. 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"

View File

@ -1,25 +1,24 @@
diff -rup binutils.orig/binutils/readelf.c binutils-2.29/binutils/readelf.c --- binutils.orig/binutils/readelf.c 2020-07-24 15:08:30.317597020 +0100
--- binutils.orig/binutils/readelf.c 2017-12-12 16:24:19.571221194 +0000 +++ binutils-2.35/binutils/readelf.c 2020-07-24 15:09:39.029155552 +0100
+++ binutils-2.29/binutils/readelf.c 2017-12-12 16:27:26.997979803 +0000 @@ -12069,11 +12069,13 @@ print_dynamic_symbol (Filedata *filedata
@@ -11018,12 +11018,14 @@ print_dynamic_symbol (bfd_vma si, unsign
unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
printf (" %-7s", get_symbol_visibility (vis)); printf (" %-7s", get_symbol_visibility (vis));
+#if 0 +#if 0
/* Check to see if any other bits in the st_other field are set. /* Check to see if any other bits in the st_other field are set.
Note - displaying this information disrupts the layout of the Note - displaying this information disrupts the layout of the
table being generated, but for the moment this case is very table being generated, but for the moment this case is very rare. */
rare. */
if (psym->st_other ^ vis) if (psym->st_other ^ vis)
printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis)); printf (" [%s] ", get_symbol_other (filedata, psym->st_other ^ vis));
+#endif +#endif
} }
printf (" %4s ", get_symbol_index_type (filedata, psym->st_shndx));
printf (" %3.3s ", get_symbol_index_type (filedata, psym->st_shndx)); @@ -12112,7 +12114,17 @@ print_dynamic_symbol (Filedata *filedata
@@ -11031,6 +11033,15 @@ print_dynamic_symbol (bfd_vma si, unsign version_string);
print_symbol (25, GET_DYNAMIC_NAME (psym->st_name)); }
else
printf (_(" <corrupt: %14ld>"), psym->st_name); - putchar ('\n');
+#if 1 +#if 1
+ { + {
+ unsigned int vis = ELF_ST_VISIBILITY (psym->st_other); + unsigned int vis = ELF_ST_VISIBILITY (psym->st_other);
@ -29,38 +28,8 @@ diff -rup binutils.orig/binutils/readelf.c binutils-2.29/binutils/readelf.c
+ printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis)); + printf (" \t[%s]", get_symbol_other (filedata, psym->st_other ^ vis));
+ } + }
+#endif +#endif
putchar ('\n'); +
} + putchar ('\n');
--- binutils.orig/binutils/readelf.c 2017-12-12 16:36:21.806561149 +0000 if (ELF_ST_BIND (psym->st_info) == STB_LOCAL
+++ binutils-2.29.1/binutils/readelf.c 2017-12-12 16:38:17.763168514 +0000 && section != NULL
@@ -11548,11 +11548,13 @@ process_symbol_table (FILE * file)
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));
print_symbol (25, psym->st_name < strtab_size
@@ -11571,7 +11573,15 @@ process_symbol_table (FILE * file)
printf (sym_info == symbol_hidden ? "@%s" : "@@%s",
version_string);
}
+#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

View File

@ -74,24 +74,6 @@ diff -rup binutils.orig/libctf/ctf-create.c binutils-2.34.0/libctf/ctf-create.c
dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_ENUM, flag, 0); dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_ENUM, flag, 0);
dtd->dtd_data.ctt_size = fp->ctf_dmodel->ctd_int; dtd->dtd_data.ctt_size = fp->ctf_dmodel->ctd_int;
@@ -1230,6 +1245,8 @@ ctf_add_forward (ctf_file_t *fp, uint32_
if ((type = ctf_add_generic (fp, flag, name, CTF_K_FORWARD,&dtd)) == CTF_ERR)
return CTF_ERR; /* errno is set for us. */
+ if (dtd == NULL)
+ return CTF_ERR;
dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_FORWARD, flag, 0);
dtd->dtd_data.ctt_type = kind;
@@ -1254,6 +1271,8 @@ ctf_add_typedef (ctf_file_t *fp, uint32_
if ((type = ctf_add_generic (fp, flag, name, CTF_K_TYPEDEF,
&dtd)) == CTF_ERR)
return CTF_ERR; /* errno is set for us. */
+ if (dtd == NULL)
+ return CTF_ERR;
dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_TYPEDEF, flag, 0);
dtd->dtd_data.ctt_type = (uint32_t) ref;
diff -rup binutils.orig/libctf/ctf-types.c binutils-2.34.0/libctf/ctf-types.c diff -rup binutils.orig/libctf/ctf-types.c binutils-2.34.0/libctf/ctf-types.c
--- binutils.orig/libctf/ctf-types.c 2020-06-16 12:06:28.466468753 +0100 --- binutils.orig/libctf/ctf-types.c 2020-06-16 12:06:28.466468753 +0100
+++ binutils-2.34.0/libctf/ctf-types.c 2020-06-16 12:10:58.033563365 +0100 +++ binutils-2.34.0/libctf/ctf-types.c 2020-06-16 12:10:58.033563365 +0100
@ -128,18 +110,6 @@ diff -rup binutils.orig/libctf/ctf-create.c binutils-2.34.0/libctf/ctf-create.c
if (flag != CTF_ADD_NONROOT && flag != CTF_ADD_ROOT) if (flag != CTF_ADD_NONROOT && flag != CTF_ADD_ROOT)
return (ctf_set_errno (fp, EINVAL)); return (ctf_set_errno (fp, EINVAL));
diff -rup binutils.orig/opcodes/arc-dis.c binutils-2.34.0/opcodes/arc-dis.c
--- binutils.orig/opcodes/arc-dis.c 2020-06-16 14:49:06.077801330 +0100
+++ binutils-2.34.0/opcodes/arc-dis.c 2020-06-16 15:34:37.985624520 +0100
@@ -420,7 +420,7 @@ find_format (bfd_vma
struct arc_operand_iterator * iter)
{
const struct arc_opcode *opcode = NULL;
- bfd_boolean needs_limm;
+ bfd_boolean needs_limm = FALSE;
const extInstruction_t *einsn, *i;
unsigned limm = 0;
struct arc_disassemble_info *arc_infop = info->private_data;
diff -rup binutils.orig/opcodes/fr30-ibld.c binutils-2.34.0/opcodes/fr30-ibld.c diff -rup binutils.orig/opcodes/fr30-ibld.c binutils-2.34.0/opcodes/fr30-ibld.c
--- binutils.orig/opcodes/fr30-ibld.c 2020-06-16 14:49:06.074801341 +0100 --- binutils.orig/opcodes/fr30-ibld.c 2020-06-16 14:49:06.074801341 +0100
+++ binutils-2.34.0/opcodes/fr30-ibld.c 2020-06-16 16:43:31.428324833 +0100 +++ binutils-2.34.0/opcodes/fr30-ibld.c 2020-06-16 16:43:31.428324833 +0100
@ -590,15 +560,6 @@ Only in binutils-2.34.0/opcodes: fr30-ibld.c~
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value); length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 16, 32, total_length, pc, & value);
value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))))))); value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))))));
fields->f_dsp_32_s16 = value; fields->f_dsp_32_s16 = value;
@@ -2478,7 +2478,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC
break;
case M32C_OPERAND_IMM_32_SI :
{
- long value;
+ long value = 0;
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 32, 0, 32, 32, total_length, pc, & value);
value = EXTSISI (((((((((UINT) (value) >> (24))) & (255))) | (((((UINT) (value) >> (8))) & (65280))))) | (((((((value) << (8))) & (16711680))) | (((((value) << (24))) & (0xff000000)))))));
fields->f_dsp_32_s32 = value;
@@ -2486,7 +2486,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC @@ -2486,7 +2486,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC
break; break;
case M32C_OPERAND_IMM_40_HI : case M32C_OPERAND_IMM_40_HI :
@ -643,15 +604,6 @@ Only in binutils-2.34.0/opcodes: fr30-ibld.c~
length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value); length = extract_normal (cd, ex_info, insn_value, 0, 64, 0, 16, 32, total_length, pc, & value);
value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8)))); value = ((((((UHI) (value) >> (8))) & (255))) | (((((value) & (255))) << (8))));
fields->f_dsp_64_u16 = value; fields->f_dsp_64_u16 = value;
@@ -2559,7 +2559,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC
break;
case M32C_OPERAND_IMM_64_HI :
{
- long value;
+ long value = 0;
length = extract_normal (cd, ex_info, insn_value, 0|(1<<CGEN_IFLD_SIGNED), 64, 0, 16, 32, total_length, pc, & value);
value = EXTHISI (((HI) (INT) (((((((UINT) (value) >> (8))) & (255))) | (((((value) << (8))) & (65280)))))));
fields->f_dsp_64_s16 = value;
@@ -2567,7 +2567,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC @@ -2567,7 +2567,7 @@ m32c_cgen_extract_operand (CGEN_CPU_DESC
break; break;
case M32C_OPERAND_IMM_8_HI : case M32C_OPERAND_IMM_8_HI :
@ -796,17 +748,6 @@ Only in binutils-2.34.0/opcodes: fr30-ibld.c~
length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value); length = extract_normal (cd, ex_info, insn_value, 0, 0, 10, 2, 32, total_length, pc, & value);
value = ((value) - (2)); value = ((value) - (2));
fields->f_src32_rn_unprefixed_SI = value; fields->f_src32_rn_unprefixed_SI = value;
--- binutils.orig/binutils/coffdump.c 2020-06-16 17:10:22.259564445 +0100
+++ binutils-2.34.0/binutils/coffdump.c 2020-06-16 17:38:11.060608576 +0100
@@ -456,7 +456,7 @@ coff_dump (struct coff_ofile *ptr)
dump_coff_section (ptr->sections + i);
}
-char * program_name;
+extern char * program_name;
static void
show_usage (FILE *file, int status)
--- binutils.orig/binutils/srconv.c 2020-06-16 17:10:22.251564474 +0100 --- binutils.orig/binutils/srconv.c 2020-06-16 17:10:22.251564474 +0100
+++ binutils-2.34.0/binutils/srconv.c 2020-06-16 20:07:51.670025912 +0100 +++ binutils-2.34.0/binutils/srconv.c 2020-06-16 20:07:51.670025912 +0100
@@ -492,6 +492,8 @@ wr_rl (struct coff_ofile *ptr ATTRIBUTE_ @@ -492,6 +492,8 @@ wr_rl (struct coff_ofile *ptr ATTRIBUTE_
@ -818,23 +759,14 @@ Only in binutils-2.34.0/opcodes: fr30-ibld.c~
/* What sort of reloc ? Look in the section to find out. */ /* What sort of reloc ? Look in the section to find out. */
ref = r->symbol; ref = r->symbol;
@@ -1687,7 +1689,7 @@ prescan (struct coff_ofile *otree) --- binutils.orig/libctf/ctf-create.c 2020-07-24 15:33:26.100996335 +0100
} +++ binutils-2.35/libctf/ctf-create.c 2020-07-24 15:33:29.042977475 +0100
} @@ -1257,6 +1257,8 @@ ctf_add_forward (ctf_file_t *fp, uint32_
-char *program_name; if ((type = ctf_add_generic (fp, flag, name, kind, &dtd)) == CTF_ERR)
+extern char *program_name; return CTF_ERR; /* errno is set for us. */
+ if (dtd == NULL)
+ return CTF_ERR;
ATTRIBUTE_NORETURN static void dtd->dtd_data.ctt_info = CTF_TYPE_INFO (CTF_K_FORWARD, flag, 0);
show_usage (FILE *ffile, int status) dtd->dtd_data.ctt_type = kind;
--- binutils.orig/binutils/sysdump.c 2020-06-16 17:10:22.251564474 +0100
+++ binutils-2.34.0/binutils/sysdump.c 2020-06-16 20:09:09.924753464 +0100
@@ -633,7 +633,7 @@ module (void)
}
}
-char *program_name;
+extern char *program_name;
ATTRIBUTE_NORETURN static void
show_usage (FILE *ffile, int status)

View File

@ -11,19 +11,6 @@ index 6ecfab5d..f8698213 100644
} }
if (!do_wide || (fileNameLength <= MAX_FILENAME_LENGTH)) if (!do_wide || (fileNameLength <= MAX_FILENAME_LENGTH))
diff --git a/gold/target-reloc.h b/gold/target-reloc.h
index 071f211e..0f81dd13 100644
--- a/gold/target-reloc.h
+++ b/gold/target-reloc.h
@@ -259,7 +259,7 @@ issue_discarded_error(
&is_ordinary);
if (orig_shndx != elfcpp::SHN_UNDEF)
{
- unsigned int key_symndx;
+ unsigned int key_symndx = 0;
Relobj* kept_obj = object->find_kept_section_object(orig_shndx,
&key_symndx);
if (key_symndx != 0)
diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c
index 3639bfbf..ed080a1a 100644 index 3639bfbf..ed080a1a 100644
--- a/libiberty/cp-demangle.c --- a/libiberty/cp-demangle.c

View File

@ -1,8 +1,8 @@
Summary: A GNU collection of binary utilities Summary: A GNU collection of binary utilities
Name: %{?cross}binutils%{?_with_debug:-debug} Name: %{?cross}binutils%{?_with_debug:-debug}
Version: 2.34.0 Version: 2.35
Release: 10%{?dist} Release: 1%{?dist}
License: GPLv3+ License: GPLv3+
URL: https://sourceware.org/binutils URL: https://sourceware.org/binutils
@ -109,23 +109,7 @@ URL: https://sourceware.org/binutils
# too many controversial patches so we stick with the official FSF version # too many controversial patches so we stick with the official FSF version
# instead. # instead.
# The source for the binutils are normally retrieved from the official Source: https://ftp.gnu.org/gnu/binutils/binutils-%%{version}.tar.xz
# GNU repository. IE:
# Source: https://ftp.gnu.org/gnu/binutils/binutils-%%{version}.tar.xz
#
# But we have a need in this rawhide release to pull in the latest version
# on the 2.34 branch. So the tarball was created using the following
# commands:
#
# git clone git://sourceware.org/git/binutils-gdb.git -b binutils-2_34-branch
# git checkout 5dfc0c955dbe912cd328fc2688e5fceb3239ac2a
# ./src-release -x binutils
# mv binutils-2.34.0.tar.xz binutils-2.34.0-5dfc0c955dbe912cd328fc2688e5fceb3239ac2a.tar.xz
#
# FIXME: Undo this change once the next official binutils release is made.
Source: binutils-2.34.0-5dfc0c955dbe912cd328fc2688e5fceb3239ac2a.tar.xz
Source2: binutils-2.19.50.0.1-output-format.sed Source2: binutils-2.19.50.0.1-output-format.sed
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -200,11 +184,6 @@ Patch09: binutils-do-not-link-with-static-libstdc++.patch
# Lifetime: Permanent. # Lifetime: Permanent.
Patch10: binutils-attach-to-group.patch Patch10: binutils-attach-to-group.patch
# Purpose: Stop gold from complaining about relocs in the .gnu.build.attribute
# section that reference symbols in discarded sections.
# Lifetime: Fixed in 2.35 (maybe)
Patch11: binutils-gold-ignore-discarded-note-relocs.patch
# Purpose: Allow OS specific sections in section groups. # Purpose: Allow OS specific sections in section groups.
# Lifetime: Fixed in 2.35 (maybe) # Lifetime: Fixed in 2.35 (maybe)
Patch12: binutils-special-sections-in-groups.patch Patch12: binutils-special-sections-in-groups.patch
@ -223,26 +202,25 @@ Patch14: binutils-gold-mismatched-section-flags.patch
# Lifetime: Fixed in 2.35 (maybe) # Lifetime: Fixed in 2.35 (maybe)
Patch15: binutils-CVE-2019-1010204.patch Patch15: binutils-CVE-2019-1010204.patch
# Purpose: Fix a potential use of an initialised field by readelf.
# Lifetime: Fixed in 2.35
Patch16: binutils-readelf-compression-header-size.patch
# Purpose: Change the gold configuration script to only warn about # Purpose: Change the gold configuration script to only warn about
# unsupported targets. This allows the binutils to be built with # unsupported targets. This allows the binutils to be built with
# BPF support enabled. # BPF support enabled.
# Lifetime: Permanent. # Lifetime: Permanent.
Patch17: binutils-gold-warn-unsupported.patch Patch17: binutils-gold-warn-unsupported.patch
# Purpose: Enhance the error message displayed by the BFD library when # Purpose: Fix compile time warning messages building s390 target with gcc-10.
# to fails to load a plugin. # Lifetime: Should be fixed in 2.36.
# Lifetime: Should be fixed in 2.35.
Patch18: binutils-bad-plugin-err-message.patch
Patch19: binutils-s390-build.patch Patch19: binutils-s390-build.patch
# Purpose: Fix LTO problems running config mini-builds.
# Lifetime: Should be fixed in 2.36.
Patch20: binutils-config.patch Patch20: binutils-config.patch
# Purpose: Fix compile time warning messages building with gcc-10.
# Lifetime: Should be fixed in 2.36.
Patch21: binutils-warnings.patch Patch21: binutils-warnings.patch
# Purpose: Fix problems exposed by compiling with gcc-10. # Purpose: Fix compile time warning messages building with gcc-10. (part 2).
# Lifetime: Should be fixed in 2.36. # Lifetime: Should be fixed in 2.36.
Patch22: binutils-gcc-10-fixes.patch Patch22: binutils-gcc-10-fixes.patch
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -818,8 +796,8 @@ exit 0
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
%changelog %changelog
* Fri Jul 24 2020 Nick Clifton <nickc@redhat.com> - 2.34-10 * Sun Jul 26 2020 Nick Clifton <nickc@redhat.com> - 2.35-1
- Add support for debuginfod. (#1860234) - Rebase to GNU Binutils 2.35. (#1854613)
* Mon Jul 20 2020 Jeff Law <law@redhat.com> - 2.34-9 * Mon Jul 20 2020 Jeff Law <law@redhat.com> - 2.34-9
- Fix more configure tests compromised by LTO. - Fix more configure tests compromised by LTO.

View File

@ -1,2 +1,2 @@
SHA512 (binutils-2.34.0-5dfc0c955dbe912cd328fc2688e5fceb3239ac2a.tar.xz) = abeb5f35e17aa1705c7267d4a5c63c4697102422f1d1aeb0d06817eb293e119661ba437dd28315103f6f83cd8d2dc00d57b9aa2dbd6cb3ce67c0b517c9ae83aa SHA512 (binutils-2.35.tar.xz) = 9f222e4ab6720036402d03904fb11b73ab87714b85cd84997f7d357f405c7e10581d70202f9165a1ee0c70538632db27ecc9dfe627dddb1e6bc7edb1537cf786
SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2 SHA512 (binutils-2.19.50.0.1-output-format.sed) = 2f8686b0c8af13c98cda056824c2820416f6e2d003f70b78ccf5314525b9ee3684d421dfa83e638a2d42d06ea4d4bdaf5226b64d6ec26f7ff59c44ffb2a23dd2