aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-iq2000.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2003-05-09 11:35:35 +0000
committerAlan Modra <amodra@gmail.com>2003-05-09 11:35:35 +0000
commit60d8b5244dbca59d8f17500cc9a09cb6f3daeb38 (patch)
treebde872b2c60bea1c4b4bb4532457ba28604bb3f7 /bfd/elf32-iq2000.c
parente57b535673bf8d486684a8c38023b9bd146d8b9f (diff)
downloadgdb-60d8b5244dbca59d8f17500cc9a09cb6f3daeb38.zip
gdb-60d8b5244dbca59d8f17500cc9a09cb6f3daeb38.tar.gz
gdb-60d8b5244dbca59d8f17500cc9a09cb6f3daeb38.tar.bz2
* cpu-arm.c (arm_check_note): Warning fix.
* elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange to keep relocs if edited. (iq2000_elf_print_private_bfd_data): Return TRUE. * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not ELF64_R_SYM. (elfNN_ia64_relax_ldxmov): Warning fix. * xtensa-isa.c (xtensa_add_isa): Warning fix. * xtensa-modules.c (get_num_opcodes): Warning fix.
Diffstat (limited to 'bfd/elf32-iq2000.c')
-rw-r--r--bfd/elf32-iq2000.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c
index c4261bf..ebdd303 100644
--- a/bfd/elf32-iq2000.c
+++ b/bfd/elf32-iq2000.c
@@ -454,8 +454,9 @@ iq2000_elf_check_relocs (abfd, info, sec, relocs)
{
Elf_Internal_Shdr *symtab_hdr;
struct elf_link_hash_entry **sym_hashes, **sym_hashes_end;
- Elf_Internal_Rela *rel;
- Elf_Internal_Rela *rel_end;
+ const Elf_Internal_Rela *rel;
+ const Elf_Internal_Rela *rel_end;
+ bfd_boolean changed = FALSE;
if (info->relocateable)
return TRUE;
@@ -499,10 +500,20 @@ iq2000_elf_check_relocs (abfd, info, sec, relocs)
if (memcmp (sec->name, ".debug", 6) == 0
|| memcmp (sec->name, ".stab", 5) == 0
|| memcmp (sec->name, ".eh_frame", 9) == 0)
- rel->r_info = ELF32_R_INFO (ELF32_R_SYM (rel->r_info), R_IQ2000_32_DEBUG);
+ {
+ ((Elf_Internal_Rela *) rel)->r_info
+ = ELF32_R_INFO (ELF32_R_SYM (rel->r_info), R_IQ2000_32_DEBUG);
+ changed = TRUE;
+ }
break;
}
}
+
+ if (changed)
+ /* Note that we've changed relocs, otherwise if !info->keep_memory
+ we'll free the relocs and lose our changes. */
+ (const Elf_Internal_Rela *) (elf_section_data (sec)->relocs) = relocs;
+
return TRUE;
}
@@ -929,6 +940,7 @@ iq2000_elf_print_private_bfd_data (abfd, ptr)
}
fputc ('\n', file);
+ return TRUE;
}
static