+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>
* Makefile.am: Run "make dep-am".
BFD_SEND(abfd, bfd_getx_signed_64, (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) == 32 ? bfd_get_32 (abfd, ptr) \
: (bits) == 64 ? bfd_get_64 (abfd, ptr) \
- : (abort (), (bfd_vma) - 1))
+ : (abort (), (bfd_vma) -1))
#define bfd_put(bits, abfd, val, ptr) \
((bits) == 8 ? bfd_put_8 (abfd, val, ptr) \
final_link routine once. */
extern boolean mcore_bfd_coff_final_link
PARAMS ((bfd *, struct bfd_link_info *));
-
+#if 0
static struct bfd_link_hash_table * coff_mcore_link_hash_table_create
PARAMS ((bfd *));
+#endif
static bfd_reloc_status_type mcore_coff_unsupported_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
static boolean coff_mcore_relocate_section
static void mcore_emit_base_file_entry
PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma));
static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
-static struct bfd_link_hash_table * coff_mcore_link_hash_table_create PARAMS ((bfd *));
\f
/* 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
#define coff_mcore_hash_table(info) \
((mcore_hash_table *) ((info)->hash))
+#if 0
/* Create an MCore coff linker hash table. */
static struct bfd_link_hash_table *
return & ret->root.root;
}
+#endif
\f
/* Add an entry to the base file. */
#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. */
#define coff_bfd_reloc_type_lookup ppc_coff_reloc_type_lookup
#ifndef COFF_IMAGE_WITH_PE
/* FIXME: This no longer works. */
+#if 0
#define coff_swap_sym_in_hook ppc_coff_swap_sym_in_hook
#endif
+#endif
#define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;}
#include "coffcode.h"
\f
#ifndef COFF_IMAGE_WITH_PE
+/* FIXME: This no longer works. */
+#if 0
/* FIXME:
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
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.
*/
+static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
static void
ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
return;
}
#endif
+#endif
#ifndef COFF_IMAGE_WITH_PE
return;
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;
section->alignment_power = alignment_table[i].alignment_power;
#else
#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
(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))
#endif
bfd_byte *location = contents + relocation->r_offset;
/* 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
|| ELF32_R_TYPE (relocation->r_info) == R_MIPS16_GPREL)
bfd_vma high_bits;
if (addend & ((bfd_vma) 1 << 31))
+#ifdef BFD64
sign_bits = ((bfd_vma) 1 << 32) - 1;
+#else
+ sign_bits = -1;
+#endif
else
sign_bits = 0;
bfd_vma high_bits;
if (value & ((bfd_vma) 1 << 31))
+#ifdef BFD64
sign_bits = ((bfd_vma) 1 << 32) - 1;
+#else
+ sign_bits = -1;
+#endif
else
sign_bits = 0;
{
if (ELF64_R_TYPE (urel->r_info) != R_ALPHA_LITUSE)
break;
- if (urel->r_addend >= 0 && urel->r_addend <= 3)
+ if (urel->r_addend <= 3)
flags |= 1 << urel->r_addend;
}
}
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_byte *hit_addr;
- bfd_vma val;
+ bfd_vma v;
unsigned int r_type;
{
const struct ia64_operand *op;
enum ia64_opnd opnd;
const char *err;
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;
switch (r_type)
insn = (dword >> shift) & 0x1ffffffffffLL;
op = elf64_ia64_operands + opnd;
- err = (*op->insert) (op, val, &insn);
+ err = (*op->insert) (op, val, (ia64_insn *)& insn);
if (err)
return bfd_reloc_overflow;
if (nwrote != size)
{
#ifdef ENOSPC
- if (nwrote >= 0)
- errno = ENOSPC;
+ errno = ENOSPC;
#endif
bfd_set_error (bfd_error_system_call);
}
. BFD_SEND(abfd, bfd_getx_signed_64, (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) == 32 ? bfd_get_32 (abfd, ptr) \
. : (bits) == 64 ? bfd_get_64 (abfd, ptr) \
. : (abort (), (bfd_vma) - 1))
.
.#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) == 32 ? bfd_put_32 (abfd, val, ptr) \
. : (bits) == 64 ? bfd_put_64 (abfd, val, ptr) \
+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>
* external.h (GET_LINENO_LNNO): Use H_GET_32/16.
#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \
(COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
#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 */
#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \
(COFF2_P (ABFD) \