These int vars are really unsigned, so make them so.
* section.c (struct bfd_section): Make "id" and "index" unsigned.
* coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
* elf.c (elf_map_symbols): Likewise.
* elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
(struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
(ppc64_elf_setup_section_lists): Ditto for local vars.
* elf32-arm.c: Similarly to elf64-ppc.c.
* elf32-avr.c: Likewise.
* elf32-hppa.c: Likewise.
* elf32-m68hc1x.c: Likewise.
* elf32-metag.c: Likewise.
* elf32-nios2.c: Likewise.
* elfnn-aarch64.c: Likewise.
* simple.c (struct saved_offsets): Make "section_count" unsigned.
* bfd-in2.h: Regenerate.
+2015-08-31 Alan Modra <amodra@gmail.com>
+
+ * section.c (struct bfd_section): Make "id" and "index" unsigned.
+ * coff-rs6000.c (_bfd_xcoff_sizeof_headers): Adjust local var to suit.
+ * elf.c (elf_map_symbols): Likewise.
+ * elf64-ppc.c (sym_exists_at): Make "id" param unsigned.
+ (struct ppc_link_hash_table): Make "top_id" and "top_index" unsigned.
+ (ppc64_elf_setup_section_lists): Ditto for local vars.
+ * elf32-arm.c: Similarly to elf64-ppc.c.
+ * elf32-avr.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-m68hc1x.c: Likewise.
+ * elf32-metag.c: Likewise.
+ * elf32-nios2.c: Likewise.
+ * elfnn-aarch64.c: Likewise.
+ * simple.c (struct saved_offsets): Make "section_count" unsigned.
+ * bfd-in2.h: Regenerate.
+
2015-08-27 Alan Modra <amodra@gmail.com>
PR 18867
const char *name;
/* A unique sequence number. */
- int id;
+ unsigned int id;
/* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
- int index;
+ unsigned int index;
/* The next section in the list belonging to the BFD, or NULL. */
struct bfd_section *next;
};
struct nbr_reloc_lineno *n_rl;
bfd *sub;
- int max_index;
+ unsigned int max_index;
asection *s;
/* Although the number of sections is known, the maximum value of
unsigned int num_globals = 0;
unsigned int num_locals2 = 0;
unsigned int num_globals2 = 0;
- int max_index = 0;
+ unsigned int max_index = 0;
unsigned int idx;
asection *asect;
asymbol **new_syms;
struct map_stub *stub_group;
/* Number of elements in stub_group. */
- int top_id;
+ unsigned int top_id;
/* Assorted information used by elf32_arm_size_stubs. */
unsigned int bfd_count;
- int top_index;
+ unsigned int top_index;
asection **input_list;
};
{
bfd *input_bfd;
unsigned int bfd_count;
- int top_id, top_index;
+ unsigned int top_id, top_index;
asection *section;
asection **input_list, **list;
bfd_size_type amt;
/* Process stub sections (eg BE8 encoding, ...). */
struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info);
- int i;
+ unsigned int i;
for (i=0; i<htab->top_id; i++)
{
sec = htab->stub_group[i].stub_sec;
/* Assorted information used by elf32_avr_size_stubs. */
unsigned int bfd_count;
- int top_index;
+ unsigned int top_index;
asection ** input_list;
Elf_Internal_Sym ** all_local_syms;
{
bfd *input_bfd;
unsigned int bfd_count;
- int top_id, top_index;
+ unsigned int top_id, top_index;
asection *section;
asection **input_list, **list;
bfd_size_type amt;
/* Assorted information used by elf32_hppa_size_stubs. */
unsigned int bfd_count;
- int top_index;
+ unsigned int top_index;
asection **input_list;
Elf_Internal_Sym **all_local_syms;
{
bfd *input_bfd;
unsigned int bfd_count;
- int top_id, top_index;
+ unsigned int top_id, top_index;
asection *section;
asection **input_list, **list;
bfd_size_type amt;
{
bfd *input_bfd;
unsigned int bfd_count;
- int top_id, top_index;
+ unsigned int top_id, top_index;
asection *section;
asection **input_list, **list;
bfd_size_type amt;
/* Assorted information used by elf_metag_size_stubs. */
unsigned int bfd_count;
- int top_index;
+ unsigned int top_index;
asection **input_list;
Elf_Internal_Sym **all_local_syms;
{
bfd *input_bfd;
unsigned int bfd_count;
- int top_id, top_index;
+ unsigned int top_id, top_index;
asection *section;
asection **input_list, **list;
bfd_size_type amt;
/* Assorted information used by nios2_elf32_size_stubs. */
unsigned int bfd_count;
- int top_index;
+ unsigned int top_index;
asection **input_list;
Elf_Internal_Sym **all_local_syms;
{
bfd *input_bfd;
unsigned int bfd_count;
- int top_id, top_index;
+ unsigned int top_id, top_index;
asection *section;
asection **input_list, **list;
bfd_size_type amt;
/* Search SYMS for a symbol of the given VALUE. */
static asymbol *
-sym_exists_at (asymbol **syms, long lo, long hi, int id, bfd_vma value)
+sym_exists_at (asymbol **syms, long lo, long hi, unsigned int id, bfd_vma value)
{
long mid;
- if (id == -1)
+ if (id == (unsigned) -1)
{
while (lo < hi)
{
asection *toc_first_sec;
/* Highest input section id. */
- int top_id;
+ unsigned int top_id;
/* Highest output section index. */
- int top_index;
+ unsigned int top_index;
/* Used when adding symbols. */
struct ppc_link_hash_entry *dot_syms;
ppc64_elf_setup_section_lists (struct bfd_link_info *info)
{
bfd *input_bfd;
- int top_id, top_index, id;
+ unsigned int top_id, top_index, id;
asection *section;
asection **input_list;
bfd_size_type amt;
/* Assorted information used by elfNN_aarch64_size_stubs. */
unsigned int bfd_count;
- int top_index;
+ unsigned int top_index;
asection **input_list;
/* The offset into splt of the PLT entry for the TLS descriptor
{
bfd *input_bfd;
unsigned int bfd_count;
- int top_id, top_index;
+ unsigned int top_id, top_index;
asection *section;
asection **input_list, **list;
bfd_size_type amt;
. const char *name;
.
. {* A unique sequence number. *}
-. int id;
+. unsigned int id;
.
. {* Which section in the bfd; 0..n-1 as sections are created in a bfd. *}
-. int index;
+. unsigned int index;
.
. {* The next section in the list belonging to the BFD, or NULL. *}
. struct bfd_section *next;
static asection *
bfd_section_init (bfd *abfd, asection *newsect)
{
- static int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */
+ static unsigned int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */
newsect->id = section_id;
newsect->index = abfd->section_count;
struct saved_offsets
{
- int section_count;
+ unsigned int section_count;
struct saved_output_info *sections;
};