From 062e23589d2fdda4a6de3e540150a8df23671a36 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Mon, 7 May 2001 09:15:26 +0000 Subject: [PATCH] * ecoff.c (bfd_debug_section): Fix initialization. * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it is always a positive integer. Cast away sign mismatch. * elf32-mips.c: Fix misleading comment and typo. (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use correct data type. * elflink.c: Fix typo. (_bfd_elf_create_dynamic_sections): Remove superfluous initialization. * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch. --- bfd/ChangeLog | 12 ++++++++++++ bfd/ecoff.c | 12 ++++++------ bfd/ecoffswap.h | 2 +- bfd/elf.c | 6 +++--- bfd/elf32-mips.c | 10 +++++----- bfd/elflink.c | 4 ++-- 6 files changed, 29 insertions(+), 17 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 80a2f49..37d444f 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,15 @@ +2001-05-07 Thiemo Seufer + + * ecoff.c (bfd_debug_section): Fix initialization. + * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it + is always a positive integer. Cast away sign mismatch. + * elf32-mips.c: Fix misleading comment and typo. + (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use + correct data type. + * elflink.c: Fix typo. + (_bfd_elf_create_dynamic_sections): Remove superfluous initialization. + * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch. + 2001-05-04 Richard Henderson * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true. diff --git a/bfd/ecoff.c b/bfd/ecoff.c index d88846b..2237441 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -75,19 +75,19 @@ static unsigned int ecoff_armap_hash PARAMS ((CONST char *s, static asection bfd_debug_section = { /* name, id, index, next, flags, user_set_vma, reloc_done, */ - "*DEBUG*", 0, 0, 0, 0, 0, 0, + "*DEBUG*", 0, 0, NULL, 0, 0, 0, /* linker_mark, gc_mark, segment_mark, vma, lma, _cooked_size, */ 0, 0, 0, 0, 0, 0, /* _raw_size, output_offset, output_section, alignment_power, */ 0, 0, NULL, 0, /* relocation, orelocation, reloc_count, filepos, rel_filepos, */ - 0, 0, 0, 0, 0, + NULL, NULL, 0, 0, 0, /* line_filepos, userdata, contents, lineno, lineno_count, */ 0, NULL, NULL, NULL, 0, - /* comdat, kept_section, moving_line_filepos, target_index, */ - NULL, NULL, 0, 0, - /* used_by_bfd, constructor_chain, owner, */ - NULL, NULL, NULL, + /* entsize, comdat, kept_section, moving_line_filepos, */ + 0, NULL, NULL, 0, + /* target_index, used_by_bfd, constructor_chain, owner, */ + 0, NULL, NULL, NULL, /* symbol, */ (struct symbol_cache_entry *) NULL, /* symbol_ptr_ptr, */ diff --git a/bfd/ecoffswap.h b/bfd/ecoffswap.h index daa61cb..dd6fa6f 100644 --- a/bfd/ecoffswap.h +++ b/bfd/ecoffswap.h @@ -196,7 +196,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern) intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr); intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss); #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) - if (intern->rss == 0xffffffff) + if (intern->rss == (signed long) 0xffffffff) intern->rss = -1; #endif intern->issBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_issBase); diff --git a/bfd/elf.c b/bfd/elf.c index 602ebcd..d0cd62d 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4734,7 +4734,7 @@ _bfd_elf_slurp_version_tables (abfd) Elf_Internal_Verdef *iverdefarr; Elf_Internal_Verdef iverdefmem; unsigned int i; - int maxidx; + unsigned int maxidx; hdr = &elf_tdata (abfd)->dynverdef_hdr; @@ -4754,8 +4754,8 @@ _bfd_elf_slurp_version_tables (abfd) { _bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem); - if ((iverdefmem.vd_ndx & VERSYM_VERSION) > maxidx) - maxidx = iverdefmem.vd_ndx & VERSYM_VERSION; + if ((iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION)) > maxidx) + maxidx = iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION); everdef = ((Elf_External_Verdef *) ((bfd_byte *) everdef + iverdefmem.vd_next)); diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 065e7d7..7f077e9 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -1,4 +1,4 @@ -/* MIPS-specific support for 32-bit ELF +l/* MIPS-specific support for 32-bit ELF Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. @@ -539,7 +539,7 @@ static reloc_howto_type elf_mips_howto_table[] = 0xffffffff, /* dst_mask */ false), /* pcrel_offset */ - /* 26 bit branch address. */ + /* 26 bit jump address. */ HOWTO (R_MIPS_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ @@ -1667,7 +1667,7 @@ gprel32_with_gp (abfd, symbol, reloc_entry, input_section, relocateable, data, } /* Handle a 64 bit reloc in a 32 bit MIPS ELF file. These are - generated when addreses are 64 bits. The upper 32 bits are a simle + generated when addresses are 64 bits. The upper 32 bits are a simple sign extension. */ static bfd_reloc_status_type @@ -3071,8 +3071,8 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec) boolean _bfd_mips_elf_section_from_bfd_section (abfd, hdr, sec, retval) - bfd *abfd ATTRIBUTE_UNUSED; - Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED; + bfd *abfd; + Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED; asection *sec; int *retval; { diff --git a/bfd/elflink.c b/bfd/elflink.c index 9b6a708..b971311 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -108,7 +108,7 @@ _bfd_elf_create_dynamic_sections (abfd, info) flagword flags, pltflags; register asection *s; struct elf_backend_data *bed = get_elf_backend_data (abfd); - int ptralign = 0; + int ptralign; switch (bed->s->arch_size) { @@ -333,7 +333,7 @@ elf_link_renumber_hash_table_dynsyms (h, data) return true; } -/* Assign dynsym indicies. In a shared library we generate a section +/* Assign dynsym indices. In a shared library we generate a section symbol for each output section, which come first. Next come all of the back-end allocated local dynamic syms, followed by the rest of the global symbols. */ -- 2.7.4