This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Patch] to allow bfd to build natively using solaris cc


Fixes collateral damage..

bfd/ChangeLog
	* 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.

And a few other warnings.

	* elf.c (setup_group): Warning fixes.
	* elflink.h (elf_link_sort_relocs): Likewise.
	* pdp11.c (slurp_reloc_table): Likewise.

-- 
Alan Modra

Index: bfd/elf-m10200.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-m10200.c,v
retrieving revision 1.10
diff -u -p -r1.10 elf-m10200.c
--- elf-m10200.c	2001/09/18 09:57:23	1.10
+++ elf-m10200.c	2001/10/17 09:20:14
@@ -1225,7 +1225,7 @@ mn10200_elf_relax_section (abfd, sec, li
       else
 	{
 	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = extsyms;
+	  symtab_hdr->contents = (unsigned char *) extsyms;
 	}
       free_extsyms = NULL;
     }
Index: bfd/elf-m10300.c
===================================================================
RCS file: /cvs/src/src/bfd/elf-m10300.c,v
retrieving revision 1.17
diff -u -p -r1.17 elf-m10300.c
--- elf-m10300.c	2001/09/18 09:57:23	1.17
+++ elf-m10300.c	2001/10/17 09:20:16
@@ -1108,7 +1108,7 @@ mn10300_elf_relax_section (abfd, sec, li
 	      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, li
 	      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, li
       else
 	{
 	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = extsyms;
+	  symtab_hdr->contents = (unsigned char *) extsyms;
 	}
       free_extsyms = NULL;
     }
Index: bfd/elf.c
===================================================================
RCS file: /cvs/src/src/bfd/elf.c,v
retrieving revision 1.101
diff -u -p -r1.101 elf.c
--- elf.c	2001/10/15 09:45:45	1.101
+++ elf.c	2001/10/17 09:20:21
@@ -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);
Index: bfd/elf32-h8300.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-h8300.c,v
retrieving revision 1.7
diff -u -p -r1.7 elf32-h8300.c
--- elf32-h8300.c	2001/09/18 09:57:23	1.7
+++ elf32-h8300.c	2001/10/17 09:20:22
@@ -1230,7 +1230,7 @@ elf32_h8_relax_section (abfd, sec, link_
       else
 	{
 	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = extsyms;
+	  symtab_hdr->contents = (unsigned char *) extsyms;
 	}
       free_extsyms = NULL;
     }
Index: bfd/elf32-m68k.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68k.c,v
retrieving revision 1.28
diff -u -p -r1.28 elf32-m68k.c
--- elf32-m68k.c	2001/09/29 06:21:59	1.28
+++ elf32-m68k.c	2001/10/17 09:20:25
@@ -2202,7 +2202,7 @@ bfd_m68k_elf32_create_embedded_relocs (a
 	      != 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.  */
Index: bfd/elf32-sh.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-sh.c,v
retrieving revision 1.36
diff -u -p -r1.36 elf32-sh.c
--- elf32-sh.c	2001/10/01 00:16:27	1.36
+++ elf32-sh.c	2001/10/17 09:20:28
@@ -1392,7 +1392,7 @@ sh_elf_relax_section (abfd, sec, link_in
       else
 	{
 	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = extsyms;
+	  symtab_hdr->contents = (unsigned char *) extsyms;
 	}
       free_extsyms = NULL;
     }
Index: bfd/elf64-alpha.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-alpha.c,v
retrieving revision 1.44
diff -u -p -r1.44 elf64-alpha.c
--- elf64-alpha.c	2001/09/24 01:38:31	1.44
+++ elf64-alpha.c	2001/10/17 09:20:31
@@ -1572,7 +1572,7 @@ elf64_alpha_relax_section (abfd, sec, li
       else
 	{
 	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = extsyms;
+	  symtab_hdr->contents = (unsigned char *) extsyms;
 	}
     }
 
Index: bfd/elflink.h
===================================================================
RCS file: /cvs/src/src/bfd/elflink.h,v
retrieving revision 1.116
diff -u -p -r1.116 elflink.h
--- elflink.h	2001/10/17 01:44:10	1.116
+++ elflink.h	2001/10/17 09:20:38
@@ -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))
Index: bfd/elfxx-ia64.c
===================================================================
RCS file: /cvs/src/src/bfd/elfxx-ia64.c,v
retrieving revision 1.29
diff -u -p -r1.29 elfxx-ia64.c
--- elfxx-ia64.c	2001/10/15 09:45:48	1.29
+++ elfxx-ia64.c	2001/10/17 09:20:40
@@ -922,7 +922,7 @@ elfNN_ia64_relax_section (abfd, sec, lin
       else
 	{
 	  /* Cache the symbols for elf_link_input_bfd.  */
-	  symtab_hdr->contents = extsyms;
+	  symtab_hdr->contents = (unsigned char *) extsyms;
 	}
     }
 
Index: bfd/pdp11.c
===================================================================
RCS file: /cvs/src/src/bfd/pdp11.c,v
retrieving revision 1.10
diff -u -p -r1.10 pdp11.c
--- pdp11.c	2001/10/10 12:08:28	1.10
+++ pdp11.c	2001/10/17 09:20:43
@@ -2247,7 +2247,7 @@ NAME(aout,slurp_reloc_table) (abfd, asec
       {
 	int x;
 
-	x = GET_WORD (abfd, relocs + each_size * counter);
+	x = GET_WORD (abfd, (char *) relocs + each_size * counter);
 	if (x != 0)
 	  real_count++;
       }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]