crash/arm-unused-but-set-variable.patch
Petr Šabata fd655eaae7 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/crash#235709a5cf0931c9791cb9d31046ba032eafa787
2020-10-14 23:18:42 +02:00

155 lines
5.4 KiB
Diff

--- crash-5.1.7/gdb-7.0.patch.orig
+++ crash-5.1.7/gdb-7.0.patch
@@ -1838,3 +1838,151 @@
a = relocation;
b = val & howto->src_mask;
+--- gdb-7.0/bfd/elf32-arm.c.orig
++++ gdb-7.0/bfd/elf32-arm.c
+@@ -3438,7 +3438,6 @@ arm_build_one_stub (struct bfd_hash_entr
+ struct elf32_arm_link_hash_table *htab;
+ asection *stub_sec;
+ bfd *stub_bfd;
+- bfd_vma stub_addr;
+ bfd_byte *loc;
+ bfd_vma sym_value;
+ int template_size;
+@@ -3471,10 +3470,6 @@ arm_build_one_stub (struct bfd_hash_entr
+
+ stub_bfd = stub_sec->owner;
+
+- /* This is the address of the start of the stub. */
+- stub_addr = stub_sec->output_section->vma + stub_sec->output_offset
+- + stub_entry->stub_offset;
+-
+ /* This is the address of the stub destination. */
+ sym_value = (stub_entry->target_value
+ + stub_entry->target_section->output_offset
+@@ -3660,16 +3655,14 @@ find_stub_size_and_template (enum elf32_
+
+ static bfd_boolean
+ arm_size_one_stub (struct bfd_hash_entry *gen_entry,
+- void * in_arg)
++ void * in_arg __attribute__ ((unused)))
+ {
+ struct elf32_arm_stub_hash_entry *stub_entry;
+- struct elf32_arm_link_hash_table *htab;
+ const insn_sequence *template_sequence;
+ int template_size, size;
+
+ /* Massage our args to the form they really have. */
+ stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
+- htab = (struct elf32_arm_link_hash_table *) in_arg;
+
+ BFD_ASSERT((stub_entry->stub_type > arm_stub_none)
+ && stub_entry->stub_type < ARRAY_SIZE(stub_definitions));
+@@ -5147,7 +5140,6 @@ record_vfp11_erratum_veneer (struct bfd_
+ struct bfd_link_hash_entry *bh;
+ bfd_vma val;
+ struct _arm_elf_section_data *sec_data;
+- int errcount;
+ elf32_vfp11_erratum_list *newerr;
+
+ hash_table = elf32_arm_hash_table (link_info);
+@@ -5186,7 +5178,7 @@ record_vfp11_erratum_veneer (struct bfd_
+ myh->forced_local = 1;
+
+ /* Link veneer back to calling location. */
+- errcount = ++(sec_data->erratumcount);
++ sec_data->erratumcount += 1;
+ newerr = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
+
+ newerr->type = VFP11_ERRATUM_ARM_VENEER;
+@@ -6035,9 +6027,8 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *a
+ {
+ elf32_vfp11_erratum_list *newerr
+ = bfd_zmalloc (sizeof (elf32_vfp11_erratum_list));
+- int errcount;
+
+- errcount = ++(elf32_arm_section_data (sec)->erratumcount);
++ elf32_arm_section_data (sec)->erratumcount += 1;
+
+ newerr->u.b.vfp_insn = veneer_of_insn;
+
+@@ -6747,8 +6738,6 @@ elf32_arm_final_link_relocate (reloc_how
+ unsigned long r_symndx;
+ bfd_byte * hit_data = contents + rel->r_offset;
+ bfd * dynobj = NULL;
+- Elf_Internal_Shdr * symtab_hdr;
+- struct elf_link_hash_entry ** sym_hashes;
+ bfd_vma * local_got_offsets;
+ asection * sgot = NULL;
+ asection * splt = NULL;
+@@ -6785,8 +6774,6 @@ elf32_arm_final_link_relocate (reloc_how
+ sgot = bfd_get_section_by_name (dynobj, ".got");
+ splt = bfd_get_section_by_name (dynobj, ".plt");
+ }
+- symtab_hdr = & elf_symtab_hdr (input_bfd);
+- sym_hashes = elf_sym_hashes (input_bfd);
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+ r_symndx = ELF32_R_SYM (rel->r_info);
+
+@@ -8886,7 +8873,7 @@ elf32_arm_relocate_section (bfd *
+ }
+ else
+ {
+- bfd_boolean warned;
++ bfd_boolean warned __attribute__((unused));
+
+ RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel,
+ r_symndx, symtab_hdr, sym_hashes,
+@@ -10740,7 +10727,6 @@ elf32_arm_check_relocs (bfd *abfd, struc
+ const Elf_Internal_Rela *rel_end;
+ bfd *dynobj;
+ asection *sreloc;
+- bfd_vma *local_got_offsets;
+ struct elf32_arm_link_hash_table *htab;
+ bfd_boolean needs_plt;
+ unsigned long nsyms;
+@@ -10763,7 +10749,6 @@ elf32_arm_check_relocs (bfd *abfd, struc
+ }
+
+ dynobj = elf_hash_table (info)->dynobj;
+- local_got_offsets = elf_local_got_offsets (abfd);
+
+ symtab_hdr = & elf_symtab_hdr (abfd);
+ sym_hashes = elf_sym_hashes (abfd);
+@@ -12864,10 +12849,8 @@ elf32_arm_output_map_sym (output_arch_sy
+ bfd_vma offset)
+ {
+ static const char *names[3] = {"$a", "$t", "$d"};
+- struct elf32_arm_link_hash_table *htab;
+ Elf_Internal_Sym sym;
+
+- htab = elf32_arm_hash_table (osi->info);
+ sym.st_value = osi->sec->output_section->vma
+ + osi->sec->output_offset
+ + offset;
+@@ -12962,10 +12945,8 @@ static bfd_boolean
+ elf32_arm_output_stub_sym (output_arch_syminfo *osi, const char *name,
+ bfd_vma offset, bfd_vma size)
+ {
+- struct elf32_arm_link_hash_table *htab;
+ Elf_Internal_Sym sym;
+
+- htab = elf32_arm_hash_table (osi->info);
+ sym.st_value = osi->sec->output_section->vma
+ + osi->sec->output_offset
+ + offset;
+@@ -12982,7 +12963,6 @@ arm_map_one_stub (struct bfd_hash_entry
+ {
+ struct elf32_arm_stub_hash_entry *stub_entry;
+ struct bfd_link_info *info;
+- struct elf32_arm_link_hash_table *htab;
+ asection *stub_sec;
+ bfd_vma addr;
+ char *stub_name;
+@@ -12999,7 +12979,6 @@ arm_map_one_stub (struct bfd_hash_entry
+
+ info = osi->info;
+
+- htab = elf32_arm_hash_table (info);
+ stub_sec = stub_entry->stub_sec;
+
+ /* Ensure this stub is attached to the current section being