* 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.
This commit is contained in:
Alan Modra
2001-05-07 09:15:26 +00:00
parent ff88f59d5a
commit 062e23589d
6 changed files with 29 additions and 17 deletions

View File

@ -1,3 +1,15 @@
2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* 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 <rth@redhat.com> 2001-05-04 Richard Henderson <rth@redhat.com>
* elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true. * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.

View File

@ -75,19 +75,19 @@ static unsigned int ecoff_armap_hash PARAMS ((CONST char *s,
static asection bfd_debug_section = static asection bfd_debug_section =
{ {
/* name, id, index, next, flags, user_set_vma, reloc_done, */ /* 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, */ /* linker_mark, gc_mark, segment_mark, vma, lma, _cooked_size, */
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
/* _raw_size, output_offset, output_section, alignment_power, */ /* _raw_size, output_offset, output_section, alignment_power, */
0, 0, NULL, 0, 0, 0, NULL, 0,
/* relocation, orelocation, reloc_count, filepos, rel_filepos, */ /* relocation, orelocation, reloc_count, filepos, rel_filepos, */
0, 0, 0, 0, 0, NULL, NULL, 0, 0, 0,
/* line_filepos, userdata, contents, lineno, lineno_count, */ /* line_filepos, userdata, contents, lineno, lineno_count, */
0, NULL, NULL, NULL, 0, 0, NULL, NULL, NULL, 0,
/* comdat, kept_section, moving_line_filepos, target_index, */ /* entsize, comdat, kept_section, moving_line_filepos, */
NULL, NULL, 0, 0, 0, NULL, NULL, 0,
/* used_by_bfd, constructor_chain, owner, */ /* target_index, used_by_bfd, constructor_chain, owner, */
NULL, NULL, NULL, 0, NULL, NULL, NULL,
/* symbol, */ /* symbol, */
(struct symbol_cache_entry *) NULL, (struct symbol_cache_entry *) NULL,
/* symbol_ptr_ptr, */ /* symbol_ptr_ptr, */

View File

@ -196,7 +196,7 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr); intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr);
intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss); intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss);
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64) #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
if (intern->rss == 0xffffffff) if (intern->rss == (signed long) 0xffffffff)
intern->rss = -1; intern->rss = -1;
#endif #endif
intern->issBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_issBase); intern->issBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_issBase);

View File

@ -4734,7 +4734,7 @@ _bfd_elf_slurp_version_tables (abfd)
Elf_Internal_Verdef *iverdefarr; Elf_Internal_Verdef *iverdefarr;
Elf_Internal_Verdef iverdefmem; Elf_Internal_Verdef iverdefmem;
unsigned int i; unsigned int i;
int maxidx; unsigned int maxidx;
hdr = &elf_tdata (abfd)->dynverdef_hdr; hdr = &elf_tdata (abfd)->dynverdef_hdr;
@ -4754,8 +4754,8 @@ _bfd_elf_slurp_version_tables (abfd)
{ {
_bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem); _bfd_elf_swap_verdef_in (abfd, everdef, &iverdefmem);
if ((iverdefmem.vd_ndx & VERSYM_VERSION) > maxidx) if ((iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION)) > maxidx)
maxidx = iverdefmem.vd_ndx & VERSYM_VERSION; maxidx = iverdefmem.vd_ndx & ((unsigned) VERSYM_VERSION);
everdef = ((Elf_External_Verdef *) everdef = ((Elf_External_Verdef *)
((bfd_byte *) everdef + iverdefmem.vd_next)); ((bfd_byte *) everdef + iverdefmem.vd_next));

View File

@ -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 Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc. Free Software Foundation, Inc.
@ -539,7 +539,7 @@ static reloc_howto_type elf_mips_howto_table[] =
0xffffffff, /* dst_mask */ 0xffffffff, /* dst_mask */
false), /* pcrel_offset */ false), /* pcrel_offset */
/* 26 bit branch address. */ /* 26 bit jump address. */
HOWTO (R_MIPS_26, /* type */ HOWTO (R_MIPS_26, /* type */
2, /* rightshift */ 2, /* rightshift */
2, /* size (0 = byte, 1 = short, 2 = long) */ 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 /* 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. */ sign extension. */
static bfd_reloc_status_type static bfd_reloc_status_type
@ -3071,8 +3071,8 @@ _bfd_mips_elf_fake_sections (abfd, hdr, sec)
boolean boolean
_bfd_mips_elf_section_from_bfd_section (abfd, hdr, sec, retval) _bfd_mips_elf_section_from_bfd_section (abfd, hdr, sec, retval)
bfd *abfd ATTRIBUTE_UNUSED; bfd *abfd;
Elf32_Internal_Shdr *hdr ATTRIBUTE_UNUSED; Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED;
asection *sec; asection *sec;
int *retval; int *retval;
{ {

View File

@ -108,7 +108,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
flagword flags, pltflags; flagword flags, pltflags;
register asection *s; register asection *s;
struct elf_backend_data *bed = get_elf_backend_data (abfd); struct elf_backend_data *bed = get_elf_backend_data (abfd);
int ptralign = 0; int ptralign;
switch (bed->s->arch_size) switch (bed->s->arch_size)
{ {
@ -333,7 +333,7 @@ elf_link_renumber_hash_table_dynsyms (h, data)
return true; 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 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 back-end allocated local dynamic syms, followed by the rest of
the global symbols. */ the global symbols. */