aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-07-11 09:28:45 +0000
committerMark Mitchell <mark@codesourcery.com>1999-07-11 09:28:45 +0000
commit9ebbd33e6f697c41861bdf9f3da0e4ffc5507cee (patch)
treef64ea3935ab8b9e4e14b2cbb5ec3c039e79c7bf8
parent65388f2d50331d138183307a91ebaa50ef608006 (diff)
downloadfsf-binutils-gdb-9ebbd33e6f697c41861bdf9f3da0e4ffc5507cee.zip
fsf-binutils-gdb-9ebbd33e6f697c41861bdf9f3da0e4ffc5507cee.tar.gz
fsf-binutils-gdb-9ebbd33e6f697c41861bdf9f3da0e4ffc5507cee.tar.bz2
* libbfd.c (bfd_put_8): Make it of type `void'.
* bfd-in2.h: Regenerated. * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize for 32-bit hosts. (_bfd_mips_elf_final_link): Likewise.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/bfd-in2.h2
-rw-r--r--bfd/elf32-mips.c21
-rw-r--r--bfd/libbfd.c2
4 files changed, 26 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index c2b99d3..8d327d2 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
1999-07-11 Mark Mitchell <mark@codesourcery.com>
+ * libbfd.c (bfd_put_8): Make it of type `void'.
+ * bfd-in2.h: Regenerated.
+ * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
+ for 32-bit hosts.
+ (_bfd_mips_elf_final_link): Likewise.
+
* elflink.h (elf_link_read_relocs_from_section): Be type-correct.
Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h
index aa20c08..93eba0d 100644
--- a/bfd/bfd-in2.h
+++ b/bfd/bfd-in2.h
@@ -768,7 +768,7 @@ bfd_make_readable PARAMS ((bfd *abfd));
/* Byte swapping macros for user section data. */
#define bfd_put_8(abfd, val, ptr) \
- (*((unsigned char *)(ptr)) = (unsigned char)(val))
+ ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val)))
#define bfd_put_signed_8 \
bfd_put_8
#define bfd_get_8(abfd, ptr) \
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 55863fe..ec53e92 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -269,10 +269,17 @@ typedef enum {
: bfd_put_32 (abfd, val, ptr))
/* Add a dynamic symbol table-entry. */
+#ifdef BFD64
#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
(ABI_64_P (elf_hash_table (info)->dynobj) \
? bfd_elf64_add_dynamic_entry (info, tag, val) \
: bfd_elf32_add_dynamic_entry (info, tag, val))
+#else
+#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
+ (ABI_64_P (elf_hash_table (info)->dynobj) \
+ ? bfd_elf64_add_dynamic_entry (info, tag, val) \
+ : (abort (), false))
+#endif
/* The number of local .got entries we reserve. */
#define MIPS_RESERVED_GOTNO (2)
@@ -4891,10 +4898,18 @@ _bfd_mips_elf_final_link (abfd, info)
}
/* Invoke the regular ELF backend linker to do all the work. */
- if (!(ABI_64_P (abfd)
- ? bfd_elf64_bfd_final_link (abfd, info)
- : bfd_elf32_bfd_final_link (abfd, info)))
+ if (ABI_64_P (abfd))
+ {
+#ifdef BFD64
+ if (!bfd_elf64_bfd_final_link (abfd, info))
+ return false;
+#else
+ abort ();
return false;
+#endif /* BFD64 */
+ }
+ else if (!bfd_elf32_bfd_final_link (abfd, info))
+ return false;
/* Now write out the computed sections. */
diff --git a/bfd/libbfd.c b/bfd/libbfd.c
index 23a27e3..d2fee39 100644
--- a/bfd/libbfd.c
+++ b/bfd/libbfd.c
@@ -792,7 +792,7 @@ DESCRIPTION
.{* Byte swapping macros for user section data. *}
.
.#define bfd_put_8(abfd, val, ptr) \
-. (*((unsigned char *)(ptr)) = (unsigned char)(val))
+. ((void) (*((unsigned char *)(ptr)) = (unsigned char)(val)))
.#define bfd_put_signed_8 \
. bfd_put_8
.#define bfd_get_8(abfd, ptr) \