diff options
author | Alan Modra <amodra@gmail.com> | 2021-03-29 09:42:37 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-03-29 11:22:21 +1030 |
commit | f4f9ede04272c1417b187afe6964e5c0687f1904 (patch) | |
tree | c8a3f5bfa5203c3fe01dba909ad82b76b4af8be6 /bfd | |
parent | 1201fda61b3bcf0028a57e622aebb16ec614f7dc (diff) | |
download | gdb-f4f9ede04272c1417b187afe6964e5c0687f1904.zip gdb-f4f9ede04272c1417b187afe6964e5c0687f1904.tar.gz gdb-f4f9ede04272c1417b187afe6964e5c0687f1904.tar.bz2 |
Miscellaneous BFD int vs bfd_boolean fixes
nds32 hyper_relax takes values of 0, 1 and 2. vms_write_data_block
return TRUE/FALSE not positive/negative.
* coff-z80.c (z80_is_local_label_name): Return bfd_boolean.
* elf32-z80.c (z80_is_local_label_name): Likewise.
* elf32-spu.c (spu_elf_modify_headers): Likewise.
* elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>):
Change type to int.
* vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test
for error return from vms_write_data_block.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 10 | ||||
-rw-r--r-- | bfd/coff-z80.c | 2 | ||||
-rw-r--r-- | bfd/elf32-nds32.h | 2 | ||||
-rw-r--r-- | bfd/elf32-spu.c | 2 | ||||
-rw-r--r-- | bfd/elf32-z80.c | 2 | ||||
-rw-r--r-- | bfd/vms-lib.c | 8 |
6 files changed, 18 insertions, 8 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 398def0..fbfc4db 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,15 @@ 2021-03-29 Alan Modra <amodra@gmail.com> + * coff-z80.c (z80_is_local_label_name): Return bfd_boolean. + * elf32-z80.c (z80_is_local_label_name): Likewise. + * elf32-spu.c (spu_elf_modify_headers): Likewise. + * elf32-nds32.h (struct elf_nds32_link_hash_table <hyper_relax>): + Change type to int. + * vms-lib.c (_bfd_vms_lib_write_archive_contents): Correct test + for error return from vms_write_data_block. + +2021-03-29 Alan Modra <amodra@gmail.com> + * elf32-i386.c (elf_i386_finish_local_dynamic_symbol): Return int. * elf64-ia64-vms.c (elf64_ia64_local_dyn_info_free): Likewise. (elf64_ia64_local_dyn_sym_thunk): Likewise. diff --git a/bfd/coff-z80.c b/bfd/coff-z80.c index 9d1d9c5..a47a538 100644 --- a/bfd/coff-z80.c +++ b/bfd/coff-z80.c @@ -452,7 +452,7 @@ extra_case (bfd *in_abfd, } } -static int +static bfd_boolean z80_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name) { diff --git a/bfd/elf32-nds32.h b/bfd/elf32-nds32.h index e7853cf..0f49636 100644 --- a/bfd/elf32-nds32.h +++ b/bfd/elf32-nds32.h @@ -126,7 +126,7 @@ struct elf_nds32_link_hash_table int relax_fp_as_gp; /* --mrelax-omit-fp. */ int eliminate_gc_relocs; /* --meliminate-gc-relocs. */ FILE *sym_ld_script; /* --mgen-symbol-ld-script=<file>. */ - bfd_boolean hyper_relax; /* Relax for symbol not in RW sections. */ + int hyper_relax; /* Relax for symbol not in RW sections. */ int tls_desc_trampoline; /* --m[no-]tlsdesc-trampoline. */ /* Disable if linking a dynamically linked executable. */ int load_store_relax; diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index c31ab98..1058df1 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -5346,7 +5346,7 @@ spu_elf_fake_sections (bfd *obfd ATTRIBUTE_UNUSED, /* Tweak phdrs before writing them out. */ -static int +static bfd_boolean spu_elf_modify_headers (bfd *abfd, struct bfd_link_info *info) { if (info != NULL) diff --git a/bfd/elf32-z80.c b/bfd/elf32-z80.c index 5634fa1..80f4ab5 100644 --- a/bfd/elf32-z80.c +++ b/bfd/elf32-z80.c @@ -550,7 +550,7 @@ z80_elf_object_p (bfd *abfd) return bfd_default_set_arch_mach (abfd, bfd_arch_z80, mach); } -static int +static bfd_boolean z80_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name) { diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c index eaac8af..72038b4 100644 --- a/bfd/vms-lib.c +++ b/bfd/vms-lib.c @@ -2280,7 +2280,7 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) else { /* Write the MHD. */ - if (vms_write_data_block (arch, &data, &off, blk, sz, 0) < 0) + if (!vms_write_data_block (arch, &data, &off, blk, sz, 0)) goto input_err; /* Write the member. */ @@ -2289,13 +2289,13 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) sz = bfd_bread (blk, sizeof (blk), current); if (sz == 0) break; - if (vms_write_data_block (arch, &data, &off, blk, sz, 0) < 0) + if (!vms_write_data_block (arch, &data, &off, blk, sz, 0)) goto input_err; } /* Write the end of module marker. */ - if (vms_write_data_block (arch, &data, &off, - eotdesc, sizeof (eotdesc), 1) < 0) + if (!vms_write_data_block (arch, &data, &off, + eotdesc, sizeof (eotdesc), 1)) goto input_err; } } |