diff options
author | Alan Modra <amodra@gmail.com> | 2003-05-09 11:35:35 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2003-05-09 11:35:35 +0000 |
commit | 60d8b5244dbca59d8f17500cc9a09cb6f3daeb38 (patch) | |
tree | bde872b2c60bea1c4b4bb4532457ba28604bb3f7 /bfd | |
parent | e57b535673bf8d486684a8c38023b9bd146d8b9f (diff) | |
download | gdb-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')
-rw-r--r-- | bfd/ChangeLog | 12 | ||||
-rw-r--r-- | bfd/cpu-arm.c | 2 | ||||
-rw-r--r-- | bfd/elf32-iq2000.c | 18 | ||||
-rw-r--r-- | bfd/elfxx-ia64.c | 4 | ||||
-rw-r--r-- | bfd/xtensa-isa.c | 2 | ||||
-rw-r--r-- | bfd/xtensa-modules.c | 4 |
6 files changed, 33 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0248133..b9fb970 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,15 @@ +2003-05-09 Alan Modra <amodra@bigpond.net.au> + + * 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. + 2003-05-09 Andrey Petrov <petrov@netbsd.org> * elf.c (elf_fake_sections): Use correct cast for sh_name. diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index 66c3a46..9ef527c 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -260,7 +260,7 @@ arm_check_note (abfd, buffer, buffer_size, expected_name, description_return) } else { - if (namesz != (strlen (expected_name) + 1 + 3) & ~3) + if (namesz != ((strlen (expected_name) + 1 + 3) & ~3)) return FALSE; if (strcmp (descr, expected_name) != 0) 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 diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 65713a0..ab2ff21 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -796,7 +796,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again) goto error_return; } - isym = isymbuf + ELF64_R_SYM (irel->r_info); + isym = isymbuf + ELFNN_R_SYM (irel->r_info); if (isym->st_shndx == SHN_UNDEF) continue; /* We can't do anthing with undefined symbols. */ else if (isym->st_shndx == SHN_ABS) @@ -1089,7 +1089,7 @@ elfNN_ia64_relax_ldxmov (abfd, contents, off) case 0: shift = 5; break; case 1: shift = 14; off += 3; break; case 2: shift = 23; off += 6; break; - case 3: + default: abort (); } diff --git a/bfd/xtensa-isa.c b/bfd/xtensa-isa.c index ffbef53..761e5c6 100644 --- a/bfd/xtensa-isa.c +++ b/bfd/xtensa-isa.c @@ -159,7 +159,7 @@ configuration.\n" static int xtensa_add_isa (xtensa_isa_internal *isa, libisa_module_specifier libisa) { - const int (*get_num_opcodes_fn) (void); + int (*get_num_opcodes_fn) (void); struct config_struct *(*get_config_table_fn) (void); xtensa_opcode_internal **(*get_opcodes_fn) (void); int (*decode_insn_fn) (const xtensa_insnbuf); diff --git a/bfd/xtensa-modules.c b/bfd/xtensa-modules.c index d023b52..e5d7682 100644 --- a/bfd/xtensa-modules.c +++ b/bfd/xtensa-modules.c @@ -41,7 +41,7 @@ tie_undo_reloc_l (uint32 offset, uint32 pc) } xtensa_opcode_internal** get_opcodes (void); -const int get_num_opcodes (void); +int get_num_opcodes (void); int decode_insn (const xtensa_insnbuf); int interface_version (void); @@ -5463,7 +5463,7 @@ get_opcodes (void) return &opcodes[0]; } -const int +int get_num_opcodes (void) { return 149; |