Fix compile time warnings
This commit is contained in:
parent
2ca0d95257
commit
1e738b87c8
11 changed files with 54 additions and 20 deletions
|
@ -1,3 +1,14 @@
|
||||||
|
2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
|
||||||
|
|
||||||
|
* elfxx-ia64.c: Fix compile time warning messages.
|
||||||
|
* bfd/coff-mcore.c: Fix compile time warning messages.
|
||||||
|
* bfd/coff-ppc.c: Fix compile time warning messages.
|
||||||
|
* bfd/coffcode.h: Fix compile time warning messages.
|
||||||
|
* bfd/elf32-mips.c: Fix compile time warning messages.
|
||||||
|
* bfd/elf64-alpha.c: Fix compile time warning messages.
|
||||||
|
* bfd/libbfd.c: Fix compile time warning messages.
|
||||||
|
* bfd/bfd-in2.h: Regenerate.
|
||||||
|
|
||||||
2001-09-21 Alan Modra <amodra@bigpond.net.au>
|
2001-09-21 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* Makefile.am: Run "make dep-am".
|
* Makefile.am: Run "make dep-am".
|
||||||
|
|
|
@ -883,11 +883,11 @@ bfd_make_readable PARAMS ((bfd *abfd));
|
||||||
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
||||||
|
|
||||||
#define bfd_get(bits, abfd, ptr) \
|
#define bfd_get(bits, abfd, ptr) \
|
||||||
((bits) == 8 ? bfd_get_8 (abfd, ptr) \
|
( (bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
|
||||||
: (bits) == 16 ? bfd_get_16 (abfd, ptr) \
|
: (bits) == 16 ? bfd_get_16 (abfd, ptr) \
|
||||||
: (bits) == 32 ? bfd_get_32 (abfd, ptr) \
|
: (bits) == 32 ? bfd_get_32 (abfd, ptr) \
|
||||||
: (bits) == 64 ? bfd_get_64 (abfd, ptr) \
|
: (bits) == 64 ? bfd_get_64 (abfd, ptr) \
|
||||||
: (abort (), (bfd_vma) - 1))
|
: (abort (), (bfd_vma) -1))
|
||||||
|
|
||||||
#define bfd_put(bits, abfd, val, ptr) \
|
#define bfd_put(bits, abfd, val, ptr) \
|
||||||
((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
|
((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
|
||||||
|
|
|
@ -39,9 +39,10 @@ Boston, MA 02111-1307, USA. */
|
||||||
final_link routine once. */
|
final_link routine once. */
|
||||||
extern boolean mcore_bfd_coff_final_link
|
extern boolean mcore_bfd_coff_final_link
|
||||||
PARAMS ((bfd *, struct bfd_link_info *));
|
PARAMS ((bfd *, struct bfd_link_info *));
|
||||||
|
#if 0
|
||||||
static struct bfd_link_hash_table * coff_mcore_link_hash_table_create
|
static struct bfd_link_hash_table * coff_mcore_link_hash_table_create
|
||||||
PARAMS ((bfd *));
|
PARAMS ((bfd *));
|
||||||
|
#endif
|
||||||
static bfd_reloc_status_type mcore_coff_unsupported_reloc
|
static bfd_reloc_status_type mcore_coff_unsupported_reloc
|
||||||
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
|
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
|
||||||
static boolean coff_mcore_relocate_section
|
static boolean coff_mcore_relocate_section
|
||||||
|
@ -55,7 +56,6 @@ static reloc_howto_type * coff_mcore_rtype_to_howto
|
||||||
static void mcore_emit_base_file_entry
|
static void mcore_emit_base_file_entry
|
||||||
PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma));
|
PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma));
|
||||||
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
|
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
|
||||||
static struct bfd_link_hash_table * coff_mcore_link_hash_table_create PARAMS ((bfd *));
|
|
||||||
|
|
||||||
/* The NT loader points the toc register to &toc + 32768, in order to
|
/* The NT loader points the toc register to &toc + 32768, in order to
|
||||||
use the complete range of a 16-bit displacement. We have to adjust
|
use the complete range of a 16-bit displacement. We have to adjust
|
||||||
|
@ -220,6 +220,7 @@ mcore_hash_table;
|
||||||
#define coff_mcore_hash_table(info) \
|
#define coff_mcore_hash_table(info) \
|
||||||
((mcore_hash_table *) ((info)->hash))
|
((mcore_hash_table *) ((info)->hash))
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* Create an MCore coff linker hash table. */
|
/* Create an MCore coff linker hash table. */
|
||||||
|
|
||||||
static struct bfd_link_hash_table *
|
static struct bfd_link_hash_table *
|
||||||
|
@ -247,6 +248,7 @@ coff_mcore_link_hash_table_create (abfd)
|
||||||
|
|
||||||
return & ret->root.root;
|
return & ret->root.root;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Add an entry to the base file. */
|
/* Add an entry to the base file. */
|
||||||
|
|
||||||
|
|
|
@ -2176,10 +2176,6 @@ ppc_coff_reloc_type_lookup (abfd, code)
|
||||||
|
|
||||||
#define RTYPE2HOWTO(cache_ptr, dst) ppc_coff_rtype2howto (cache_ptr, dst)
|
#define RTYPE2HOWTO(cache_ptr, dst) ppc_coff_rtype2howto (cache_ptr, dst)
|
||||||
|
|
||||||
#ifndef COFF_IMAGE_WITH_PE
|
|
||||||
static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* We use the special COFF backend linker, with our own special touch. */
|
/* We use the special COFF backend linker, with our own special touch. */
|
||||||
|
|
||||||
#define coff_bfd_reloc_type_lookup ppc_coff_reloc_type_lookup
|
#define coff_bfd_reloc_type_lookup ppc_coff_reloc_type_lookup
|
||||||
|
@ -2189,8 +2185,10 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
|
||||||
|
|
||||||
#ifndef COFF_IMAGE_WITH_PE
|
#ifndef COFF_IMAGE_WITH_PE
|
||||||
/* FIXME: This no longer works. */
|
/* FIXME: This no longer works. */
|
||||||
|
#if 0
|
||||||
#define coff_swap_sym_in_hook ppc_coff_swap_sym_in_hook
|
#define coff_swap_sym_in_hook ppc_coff_swap_sym_in_hook
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;}
|
#define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;}
|
||||||
|
|
||||||
|
@ -2218,6 +2216,8 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
|
||||||
#include "coffcode.h"
|
#include "coffcode.h"
|
||||||
|
|
||||||
#ifndef COFF_IMAGE_WITH_PE
|
#ifndef COFF_IMAGE_WITH_PE
|
||||||
|
/* FIXME: This no longer works. */
|
||||||
|
#if 0
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
What we're trying to do here is allocate a toc section (early), and attach
|
What we're trying to do here is allocate a toc section (early), and attach
|
||||||
it to the last bfd to be processed. This avoids the problem of having a toc
|
it to the last bfd to be processed. This avoids the problem of having a toc
|
||||||
|
@ -2231,6 +2231,7 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
|
||||||
3. Doing it on a "swap in" hook depends on when the "swap in" is called,
|
3. Doing it on a "swap in" hook depends on when the "swap in" is called,
|
||||||
and how often, etc. It's not clear to me that there isn't a hole here.
|
and how often, etc. It's not clear to me that there isn't a hole here.
|
||||||
*/
|
*/
|
||||||
|
static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
|
ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
|
||||||
|
@ -2273,6 +2274,7 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef COFF_IMAGE_WITH_PE
|
#ifndef COFF_IMAGE_WITH_PE
|
||||||
|
|
||||||
|
|
|
@ -1438,7 +1438,10 @@ coff_set_custom_section_alignment (abfd, section, alignment_table, table_size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (alignment_table[i].default_alignment_max != COFF_ALIGNMENT_FIELD_EMPTY
|
if (alignment_table[i].default_alignment_max != COFF_ALIGNMENT_FIELD_EMPTY
|
||||||
&& default_alignment > alignment_table[i].default_alignment_max)
|
#if COFF_DEFAULT_SECTION_ALIGNMENT_POWER != 0
|
||||||
|
&& default_alignment > alignment_table[i].default_alignment_max
|
||||||
|
#endif
|
||||||
|
)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
section->alignment_power = alignment_table[i].alignment_power;
|
section->alignment_power = alignment_table[i].alignment_power;
|
||||||
|
|
|
@ -323,7 +323,7 @@ static bfd *reldyn_sorting_bfd;
|
||||||
#else
|
#else
|
||||||
#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
|
#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
|
||||||
(ABI_64_P (elf_hash_table (info)->dynobj) \
|
(ABI_64_P (elf_hash_table (info)->dynobj) \
|
||||||
? (abort (), false) \
|
? (boolean) (abort (), false) \
|
||||||
: bfd_elf32_add_dynamic_entry (info, (bfd_vma) tag, (bfd_vma) val))
|
: bfd_elf32_add_dynamic_entry (info, (bfd_vma) tag, (bfd_vma) val))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6562,7 +6562,7 @@ mips_elf_obtain_contents (howto, relocation, input_bfd, contents)
|
||||||
bfd_byte *location = contents + relocation->r_offset;
|
bfd_byte *location = contents + relocation->r_offset;
|
||||||
|
|
||||||
/* Obtain the bytes. */
|
/* Obtain the bytes. */
|
||||||
x = bfd_get (8 * bfd_get_reloc_size (howto), input_bfd, location);
|
x = bfd_get (((bfd_vma)(8 * bfd_get_reloc_size (howto))), input_bfd, location);
|
||||||
|
|
||||||
if ((ELF32_R_TYPE (relocation->r_info) == R_MIPS16_26
|
if ((ELF32_R_TYPE (relocation->r_info) == R_MIPS16_26
|
||||||
|| ELF32_R_TYPE (relocation->r_info) == R_MIPS16_GPREL)
|
|| ELF32_R_TYPE (relocation->r_info) == R_MIPS16_GPREL)
|
||||||
|
@ -6981,7 +6981,11 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||||
bfd_vma high_bits;
|
bfd_vma high_bits;
|
||||||
|
|
||||||
if (addend & ((bfd_vma) 1 << 31))
|
if (addend & ((bfd_vma) 1 << 31))
|
||||||
|
#ifdef BFD64
|
||||||
sign_bits = ((bfd_vma) 1 << 32) - 1;
|
sign_bits = ((bfd_vma) 1 << 32) - 1;
|
||||||
|
#else
|
||||||
|
sign_bits = -1;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
sign_bits = 0;
|
sign_bits = 0;
|
||||||
|
|
||||||
|
@ -7103,7 +7107,11 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|
||||||
bfd_vma high_bits;
|
bfd_vma high_bits;
|
||||||
|
|
||||||
if (value & ((bfd_vma) 1 << 31))
|
if (value & ((bfd_vma) 1 << 31))
|
||||||
|
#ifdef BFD64
|
||||||
sign_bits = ((bfd_vma) 1 << 32) - 1;
|
sign_bits = ((bfd_vma) 1 << 32) - 1;
|
||||||
|
#else
|
||||||
|
sign_bits = -1;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
sign_bits = 0;
|
sign_bits = 0;
|
||||||
|
|
||||||
|
|
|
@ -1020,7 +1020,7 @@ elf64_alpha_relax_with_lituse (info, symval, irel, irelend)
|
||||||
{
|
{
|
||||||
if (ELF64_R_TYPE (urel->r_info) != R_ALPHA_LITUSE)
|
if (ELF64_R_TYPE (urel->r_info) != R_ALPHA_LITUSE)
|
||||||
break;
|
break;
|
||||||
if (urel->r_addend >= 0 && urel->r_addend <= 3)
|
if (urel->r_addend <= 3)
|
||||||
flags |= 1 << urel->r_addend;
|
flags |= 1 << urel->r_addend;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2772,10 +2772,10 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bfd_reloc_status_type
|
static bfd_reloc_status_type
|
||||||
elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
|
elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
|
||||||
bfd *abfd;
|
bfd *abfd;
|
||||||
bfd_byte *hit_addr;
|
bfd_byte *hit_addr;
|
||||||
bfd_vma val;
|
bfd_vma v;
|
||||||
unsigned int r_type;
|
unsigned int r_type;
|
||||||
{
|
{
|
||||||
const struct ia64_operand *op;
|
const struct ia64_operand *op;
|
||||||
|
@ -2784,6 +2784,11 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
|
||||||
enum ia64_opnd opnd;
|
enum ia64_opnd opnd;
|
||||||
const char *err;
|
const char *err;
|
||||||
size_t size = 8;
|
size_t size = 8;
|
||||||
|
#ifdef BFD_HOST_U_64_BIT
|
||||||
|
BFD_HOST_U_64_BIT val = (BFD_HOST_U_64_BIT) v;
|
||||||
|
#else
|
||||||
|
bfd_vma val = v;
|
||||||
|
#endif
|
||||||
|
|
||||||
opnd = IA64_OPND_NIL;
|
opnd = IA64_OPND_NIL;
|
||||||
switch (r_type)
|
switch (r_type)
|
||||||
|
@ -2945,7 +2950,7 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
|
||||||
insn = (dword >> shift) & 0x1ffffffffffLL;
|
insn = (dword >> shift) & 0x1ffffffffffLL;
|
||||||
|
|
||||||
op = elf64_ia64_operands + opnd;
|
op = elf64_ia64_operands + opnd;
|
||||||
err = (*op->insert) (op, val, &insn);
|
err = (*op->insert) (op, val, (ia64_insn *)& insn);
|
||||||
if (err)
|
if (err)
|
||||||
return bfd_reloc_overflow;
|
return bfd_reloc_overflow;
|
||||||
|
|
||||||
|
|
|
@ -581,8 +581,7 @@ bfd_bwrite (ptr, size, abfd)
|
||||||
if (nwrote != size)
|
if (nwrote != size)
|
||||||
{
|
{
|
||||||
#ifdef ENOSPC
|
#ifdef ENOSPC
|
||||||
if (nwrote >= 0)
|
errno = ENOSPC;
|
||||||
errno = ENOSPC;
|
|
||||||
#endif
|
#endif
|
||||||
bfd_set_error (bfd_error_system_call);
|
bfd_set_error (bfd_error_system_call);
|
||||||
}
|
}
|
||||||
|
@ -869,14 +868,14 @@ DESCRIPTION
|
||||||
. BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
. BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
|
||||||
.
|
.
|
||||||
.#define bfd_get(bits, abfd, ptr) \
|
.#define bfd_get(bits, abfd, ptr) \
|
||||||
. ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
|
. ( (bits) == 8 ? (bfd_vma) bfd_get_8 (abfd, ptr) \
|
||||||
. : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
|
. : (bits) == 16 ? bfd_get_16 (abfd, ptr) \
|
||||||
. : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
|
. : (bits) == 32 ? bfd_get_32 (abfd, ptr) \
|
||||||
. : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
|
. : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
|
||||||
. : (abort (), (bfd_vma) - 1))
|
. : (abort (), (bfd_vma) - 1))
|
||||||
.
|
.
|
||||||
.#define bfd_put(bits, abfd, val, ptr) \
|
.#define bfd_put(bits, abfd, val, ptr) \
|
||||||
. ((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
|
. ( (bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
|
||||||
. : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
|
. : (bits) == 16 ? bfd_put_16 (abfd, val, ptr) \
|
||||||
. : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
|
. : (bits) == 32 ? bfd_put_32 (abfd, val, ptr) \
|
||||||
. : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
|
. : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
|
||||||
|
|
||||||
|
* ti.h (GET_SCNHDR_PAGE): Fix compile time warning.
|
||||||
|
|
||||||
2001-09-18 Alan Modra <amodra@bigpond.net.au>
|
2001-09-18 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* external.h (GET_LINENO_LNNO): Use H_GET_32/16.
|
* external.h (GET_LINENO_LNNO): Use H_GET_32/16.
|
||||||
|
|
|
@ -219,7 +219,7 @@ struct external_scnhdr {
|
||||||
#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \
|
#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \
|
||||||
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
|
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
|
||||||
#define GET_SCNHDR_PAGE(ABFD, PTR) \
|
#define GET_SCNHDR_PAGE(ABFD, PTR) \
|
||||||
(COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : H_GET_8 (ABFD, (PTR) -7))
|
(COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : (unsigned) H_GET_8 (ABFD, (PTR) -7))
|
||||||
/* on output, make sure that the "reserved" field is zero */
|
/* on output, make sure that the "reserved" field is zero */
|
||||||
#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \
|
#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \
|
||||||
(COFF2_P (ABFD) \
|
(COFF2_P (ABFD) \
|
||||||
|
|
Loading…
Add table
Reference in a new issue