aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2001-10-17 12:01:05 +0000
committerAlan Modra <amodra@gmail.com>2001-10-17 12:01:05 +0000
commit973ffd6335bb35d78d2ea2b844019f38ac9dbba5 (patch)
treea548469d1bf253352b594add8587d718e094299d
parent1ba7c32c230bcfb82b8a052d8fc4f9d4b7c0de2d (diff)
downloadgdb-973ffd6335bb35d78d2ea2b844019f38ac9dbba5.zip
gdb-973ffd6335bb35d78d2ea2b844019f38ac9dbba5.tar.gz
gdb-973ffd6335bb35d78d2ea2b844019f38ac9dbba5.tar.bz2
* elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
Elf_Internal_Shdr.contents now that it's no longer a PTR. * elf-m10300.c (mn10300_elf_relax_section): Likewise. * elf32-h8300.c (elf32_h8_relax_section): Likewise. * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise. * elf32-sh.c (sh_elf_relax_section): Likewise. * elf64-alpha.c (elf64_alpha_relax_section): Likewise. * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise. * elf.c (setup_group): Warning fixes. * elflink.h (elf_link_sort_relocs): Likewise. * pdp11.c (slurp_reloc_table): Likewise.
-rw-r--r--bfd/ChangeLog14
-rw-r--r--bfd/elf-m10200.c2
-rw-r--r--bfd/elf-m10300.c6
-rw-r--r--bfd/elf.c6
-rw-r--r--bfd/elf32-h8300.c2
-rw-r--r--bfd/elf32-m68k.c2
-rw-r--r--bfd/elf32-sh.c2
-rw-r--r--bfd/elf64-alpha.c2
-rw-r--r--bfd/elflink.h4
-rw-r--r--bfd/elfxx-ia64.c2
-rw-r--r--bfd/pdp11.c2
11 files changed, 29 insertions, 15 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 0cebc35..3356f8a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,17 @@
+2001-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
+ Elf_Internal_Shdr.contents now that it's no longer a PTR.
+ * elf-m10300.c (mn10300_elf_relax_section): Likewise.
+ * elf32-h8300.c (elf32_h8_relax_section): Likewise.
+ * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
+ * elf32-sh.c (sh_elf_relax_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+ * elf.c (setup_group): Warning fixes.
+ * elflink.h (elf_link_sort_relocs): Likewise.
+ * pdp11.c (slurp_reloc_table): Likewise.
+
2001-10-16 Jeff Holcomb <jeffh@redhat.com>
* elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c
index 9caf1bb..b73ebec 100644
--- a/bfd/elf-m10200.c
+++ b/bfd/elf-m10200.c
@@ -1225,7 +1225,7 @@ mn10200_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
free_extsyms = NULL;
}
diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c
index 01211ba..ff88350 100644
--- a/bfd/elf-m10300.c
+++ b/bfd/elf-m10300.c
@@ -1108,7 +1108,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
free_extsyms = NULL;
}
@@ -1381,7 +1381,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
free_extsyms = NULL;
}
@@ -2437,7 +2437,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
free_extsyms = NULL;
}
diff --git a/bfd/elf.c b/bfd/elf.c
index feffd7c..16c6fcb 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -384,7 +384,7 @@ setup_group (abfd, hdr, newsect)
}
if (num_group == 0)
- num_group = -1;
+ num_group = (unsigned) -1;
elf_tdata (abfd)->num_group = num_group;
if (num_group > 0)
@@ -402,7 +402,7 @@ setup_group (abfd, hdr, newsect)
Elf_Internal_Shdr *shdr = elf_elfsections (abfd)[i];
if (shdr->sh_type == SHT_GROUP && shdr->sh_size >= 8)
{
- char *src;
+ unsigned char *src;
Elf_Internal_Group *dest;
/* Add to list of sections. */
@@ -502,7 +502,7 @@ setup_group (abfd, hdr, newsect)
pos = elf_tdata (abfd)->symtab_hdr.sh_offset;
pos += shdr->sh_info * bed->s->sizeof_sym;
if (bfd_seek (abfd, pos, SEEK_SET) != 0
- || bfd_bread (ename, 4, abfd) != 4)
+ || bfd_bread (ename, (bfd_size_type) 4, abfd) != 4)
return false;
iname = H_GET_32 (abfd, ename);
gname = elf_string_from_elf_strtab (abfd, iname);
diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c
index 397f595..0c37002 100644
--- a/bfd/elf32-h8300.c
+++ b/bfd/elf32-h8300.c
@@ -1230,7 +1230,7 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
free_extsyms = NULL;
}
diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c
index c325224..609e91a 100644
--- a/bfd/elf32-m68k.c
+++ b/bfd/elf32-m68k.c
@@ -2202,7 +2202,7 @@ bfd_m68k_elf32_create_embedded_relocs (abfd, info, datasec, relsec, errmsg)
!= symtab_hdr->sh_size))
goto error_return;
if (info->keep_memory)
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
/* Get a copy of the native relocations. */
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index 4fd1bda..eec9642 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -1392,7 +1392,7 @@ sh_elf_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
free_extsyms = NULL;
}
diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c
index 0dd6c09..ee78d1f 100644
--- a/bfd/elf64-alpha.c
+++ b/bfd/elf64-alpha.c
@@ -1572,7 +1572,7 @@ elf64_alpha_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
}
diff --git a/bfd/elflink.h b/bfd/elflink.h
index b1f8311..7cfa0fb 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -4480,7 +4480,7 @@ elf_link_sort_relocs (abfd, info, psec)
}
}
- qsort (rela, count, sizeof (*rela), elf_link_sort_cmp1);
+ qsort (rela, (size_t) count, sizeof (*rela), elf_link_sort_cmp1);
for (ret = 0; ret < count && rela[ret].type == reloc_class_relative; ret++)
;
for (i = ret, j = ret; i < count; i++)
@@ -4489,7 +4489,7 @@ elf_link_sort_relocs (abfd, info, psec)
j = i;
rela[i].offset = rela[j].u.rel.r_offset;
}
- qsort (rela + ret, count - ret, sizeof (*rela), elf_link_sort_cmp2);
+ qsort (rela + ret, (size_t) count - ret, sizeof (*rela), elf_link_sort_cmp2);
for (o = dynobj->sections; o != NULL; o = o->next)
if ((o->flags & (SEC_HAS_CONTENTS|SEC_LINKER_CREATED))
diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c
index 5fa95b4..fbd264d 100644
--- a/bfd/elfxx-ia64.c
+++ b/bfd/elfxx-ia64.c
@@ -922,7 +922,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
}
diff --git a/bfd/pdp11.c b/bfd/pdp11.c
index 265c159..2c08497 100644
--- a/bfd/pdp11.c
+++ b/bfd/pdp11.c
@@ -2247,7 +2247,7 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
{
int x;
- x = GET_WORD (abfd, relocs + each_size * counter);
+ x = GET_WORD (abfd, (char *) relocs + each_size * counter);
if (x != 0)
real_count++;
}