PowerPC, use size_t rather than long for indices
authorAlan Modra <amodra@gmail.com>
Thu, 19 Dec 2019 04:47:12 +0000 (15:17 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 19 Dec 2019 04:57:00 +0000 (15:27 +1030)
This is fussing about nothing really but since I was looking at signed
vs. unsigned issues, I decided to use the correct types here.

* elf32-ppc.c (ppc_elf_get_synthetic_symtab): Use size_t for vars.
* elf64-ppc.c (sym_exists_at): Use size_t for lo, hi and mid.

bfd/ChangeLog
bfd/elf32-ppc.c
bfd/elf64-ppc.c

index 5d55a41a307cff171bf2c74b6bf9d0dc1ef2aca3..302ee5ec8554e23efcca4d0ae31fdf34a8d5c152 100644 (file)
@@ -1,3 +1,8 @@
+2019-12-18  Alan Modra  <amodra@gmail.com>
+
+       * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Use size_t for vars.
+       * elf64-ppc.c (sym_exists_at): Use size_t for lo, hi and mid.
+
 2019-12-18  Alan Modra  <amodra@gmail.com>
 
        * elf-bfd.h (ELF_LOCAL_SYMBOL_HASH): Avoid signed overflow.
index 71c35ad7871ed738d7e5709775aca49da4944b6c..9c1d1b30d87be54bd926b01d6b5aef2c6360e5a8 100644 (file)
@@ -1802,7 +1802,7 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms,
   bfd_vma stub_off;
   asymbol *s;
   arelent *p;
-  long count, i, stub_delta;
+  size_t count, i, stub_delta;
   size_t size;
   char *names;
   bfd_byte buf[4];
index 52a96cffc1df5cc2ce29c416e9f2d1d0c1724096..e475421951f24b430d278abfb9892c891af3760d 100644 (file)
@@ -2120,9 +2120,10 @@ compare_symbols (const void *ap, const void *bp)
 /* Search SYMS for a symbol of the given VALUE.  */
 
 static asymbol *
-sym_exists_at (asymbol **syms, long lo, long hi, unsigned int id, bfd_vma value)
+sym_exists_at (asymbol **syms, size_t lo, size_t hi, unsigned int id,
+              bfd_vma value)
 {
-  long mid;
+  size_t mid;
 
   if (id == (unsigned) -1)
     {
This page took 0.033293 seconds and 4 git commands to generate.