From 0a1b45a20eaa98d4d9026dc1fd17e79e741183af Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 31 Mar 2021 10:30:54 +1030 Subject: [PATCH] Use bool in bfd * sysdep.h: POISON_BFD_BOOLEAN: Define. * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c, * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c, * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c, * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c, * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c, * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c, * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c, * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c, * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c, * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c, * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c, * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c, * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c, * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c, * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c, * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c, * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c, * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c, * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c, * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c, * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c, * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c, * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c, * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c, * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c, * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c, * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c, * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c, * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c, * elf-nacl.h, * elf-properties.c, * elf-s390-common.c, * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h, * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c, * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c, * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c, * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c, * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c, * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c, * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c, * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h, * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h, * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c, * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h, * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c, * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c, * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c, * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c, * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h, * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h, * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h, * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h, * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c, * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h, * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h, * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c, * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c, * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c, * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c, * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c, * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c, * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c, * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c, * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h, * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c, * xsym.h: Replace bfd_boolean with bool, FALSE with false, and TRUE with true throughout. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * libcoff.h: Regenerate. --- bfd/ChangeLog | 91 ++ bfd/aix5ppc-core.c | 10 +- bfd/aout-cris.c | 12 +- bfd/aout-ns32k.c | 74 +- bfd/aout-target.h | 20 +- bfd/aoutx.h | 619 +++++++------ bfd/arc-got.h | 32 +- bfd/archive.c | 250 +++--- bfd/archive64.c | 44 +- bfd/archures.c | 53 +- bfd/bfd-in.h | 29 +- bfd/bfd-in2.h | 435 +++++---- bfd/bfd.c | 118 +-- bfd/bfdwin.c | 14 +- bfd/binary.c | 26 +- bfd/cache.c | 38 +- bfd/coff-alpha.c | 184 ++-- bfd/coff-arm.c | 244 ++--- bfd/coff-arm.h | 6 +- bfd/coff-bfd.c | 12 +- bfd/coff-bfd.h | 12 +- bfd/coff-go32.c | 10 +- bfd/coff-i386.c | 56 +- bfd/coff-ia64.c | 4 +- bfd/coff-mcore.c | 74 +- bfd/coff-mips.c | 100 +-- bfd/coff-rs6000.c | 592 ++++++------ bfd/coff-sh.c | 368 ++++---- bfd/coff-stgo32.c | 34 +- bfd/coff-tic30.c | 20 +- bfd/coff-tic4x.c | 34 +- bfd/coff-tic54x.c | 84 +- bfd/coff-x86_64.c | 90 +- bfd/coff-z80.c | 80 +- bfd/coff-z8k.c | 40 +- bfd/coff64-rs6000.c | 340 +++---- bfd/coffcode.h | 470 +++++----- bfd/coffgen.c | 253 +++--- bfd/cofflink.c | 344 +++---- bfd/compress.c | 82 +- bfd/corefile.c | 16 +- bfd/cpu-aarch64.c | 20 +- bfd/cpu-aarch64.h | 2 +- bfd/cpu-alpha.c | 8 +- bfd/cpu-arc.c | 16 +- bfd/cpu-arm.c | 104 +-- bfd/cpu-arm.h | 6 +- bfd/cpu-avr.c | 38 +- bfd/cpu-bfin.c | 2 +- bfd/cpu-bpf.c | 4 +- bfd/cpu-cr16.c | 28 +- bfd/cpu-cris.c | 4 +- bfd/cpu-crx.c | 2 +- bfd/cpu-csky.c | 20 +- bfd/cpu-d10v.c | 6 +- bfd/cpu-d30v.c | 2 +- bfd/cpu-dlx.c | 2 +- bfd/cpu-epiphany.c | 5 +- bfd/cpu-fr30.c | 2 +- bfd/cpu-frv.c | 16 +- bfd/cpu-ft32.c | 6 +- bfd/cpu-h8300.c | 26 +- bfd/cpu-hppa.c | 8 +- bfd/cpu-i386.c | 36 +- bfd/cpu-ia64.c | 4 +- bfd/cpu-iamcu.c | 5 +- bfd/cpu-ip2k.c | 4 +- bfd/cpu-iq2000.c | 4 +- bfd/cpu-k1om.c | 9 +- bfd/cpu-l1om.c | 9 +- bfd/cpu-lm32.c | 2 +- bfd/cpu-m10200.c | 2 +- bfd/cpu-m10300.c | 6 +- bfd/cpu-m32c.c | 8 +- bfd/cpu-m32r.c | 6 +- bfd/cpu-m68hc11.c | 2 +- bfd/cpu-m68hc12.c | 4 +- bfd/cpu-m68k.c | 84 +- bfd/cpu-m9s12x.c | 2 +- bfd/cpu-m9s12xg.c | 2 +- bfd/cpu-mcore.c | 2 +- bfd/cpu-mep.c | 6 +- bfd/cpu-metag.c | 2 +- bfd/cpu-microblaze.c | 2 +- bfd/cpu-mips.c | 98 +- bfd/cpu-mmix.c | 2 +- bfd/cpu-moxie.c | 2 +- bfd/cpu-msp430.c | 50 +- bfd/cpu-mt.c | 6 +- bfd/cpu-nds32.c | 10 +- bfd/cpu-nfp.c | 4 +- bfd/cpu-nios2.c | 6 +- bfd/cpu-ns32k.c | 14 +- bfd/cpu-or1k.c | 4 +- bfd/cpu-pdp11.c | 2 +- bfd/cpu-pj.c | 2 +- bfd/cpu-powerpc.c | 52 +- bfd/cpu-pru.c | 2 +- bfd/cpu-riscv.c | 14 +- bfd/cpu-rl78.c | 2 +- bfd/cpu-rs6000.c | 8 +- bfd/cpu-rx.c | 8 +- bfd/cpu-s12z.c | 2 +- bfd/cpu-s390.c | 8 +- bfd/cpu-score.c | 4 +- bfd/cpu-sh.c | 40 +- bfd/cpu-sparc.c | 44 +- bfd/cpu-spu.c | 2 +- bfd/cpu-tic30.c | 2 +- bfd/cpu-tic4x.c | 10 +- bfd/cpu-tic54x.c | 2 +- bfd/cpu-tic6x.c | 2 +- bfd/cpu-tilegx.c | 4 +- bfd/cpu-tilepro.c | 2 +- bfd/cpu-v850.c | 14 +- bfd/cpu-v850_rh850.c | 16 +- bfd/cpu-vax.c | 2 +- bfd/cpu-visium.c | 2 +- bfd/cpu-wasm32.c | 4 +- bfd/cpu-xc16x.c | 6 +- bfd/cpu-xgate.c | 2 +- bfd/cpu-xstormy16.c | 2 +- bfd/cpu-xtensa.c | 2 +- bfd/cpu-z80.c | 20 +- bfd/cpu-z8k.c | 4 +- bfd/dwarf1.c | 64 +- bfd/dwarf2.c | 482 +++++----- bfd/ecoff-bfd.h | 20 +- bfd/ecoff.c | 382 ++++---- bfd/ecofflink.c | 218 ++--- bfd/elf-attrs.c | 36 +- bfd/elf-bfd.h | 484 +++++----- bfd/elf-eh-frame.c | 204 ++--- bfd/elf-hppa.h | 524 +++++------ bfd/elf-ifunc.c | 36 +- bfd/elf-m10200.c | 104 +-- bfd/elf-m10300.c | 448 +++++----- bfd/elf-nacl.c | 34 +- bfd/elf-nacl.h | 6 +- bfd/elf-properties.c | 52 +- bfd/elf-s390-common.c | 48 +- bfd/elf-s390.h | 4 +- bfd/elf-strtab.c | 12 +- bfd/elf-vxworks.c | 38 +- bfd/elf-vxworks.h | 16 +- bfd/elf.c | 1254 +++++++++++++------------- bfd/elf32-am33lin.c | 12 +- bfd/elf32-arc.c | 306 +++---- bfd/elf32-arm.c | 1932 ++++++++++++++++++++-------------------- bfd/elf32-arm.h | 20 +- bfd/elf32-avr.c | 437 +++++---- bfd/elf32-avr.h | 9 +- bfd/elf32-bfin.c | 548 ++++++------ bfd/elf32-bfin.h | 2 +- bfd/elf32-cr16.c | 324 +++---- bfd/elf32-cr16.h | 2 +- bfd/elf32-cris.c | 358 ++++---- bfd/elf32-crx.c | 176 ++-- bfd/elf32-csky.c | 636 ++++++------- bfd/elf32-csky.h | 4 +- bfd/elf32-d10v.c | 76 +- bfd/elf32-d30v.c | 90 +- bfd/elf32-dlx.c | 76 +- bfd/elf32-epiphany.c | 82 +- bfd/elf32-fr30.c | 100 +-- bfd/elf32-frv.c | 641 +++++++------ bfd/elf32-ft32.c | 199 ++--- bfd/elf32-gen.c | 22 +- bfd/elf32-h8300.c | 162 ++-- bfd/elf32-hppa.c | 278 +++--- bfd/elf32-hppa.h | 8 +- bfd/elf32-i386.c | 438 ++++----- bfd/elf32-ip2k.c | 164 ++-- bfd/elf32-iq2000.c | 130 +-- bfd/elf32-lm32.c | 298 +++---- bfd/elf32-m32c.c | 212 +++-- bfd/elf32-m32r.c | 476 +++++----- bfd/elf32-m68hc11.c | 142 +-- bfd/elf32-m68hc12.c | 148 +-- bfd/elf32-m68hc1x.c | 158 ++-- bfd/elf32-m68hc1x.h | 22 +- bfd/elf32-m68k.c | 454 +++++----- bfd/elf32-m68k.h | 2 +- bfd/elf32-mcore.c | 102 +-- bfd/elf32-mep.c | 56 +- bfd/elf32-metag.c | 420 ++++----- bfd/elf32-metag.h | 4 +- bfd/elf32-microblaze.c | 380 ++++---- bfd/elf32-mips.c | 704 +++++++-------- bfd/elf32-moxie.c | 36 +- bfd/elf32-msp430.c | 336 +++---- bfd/elf32-mt.c | 126 ++- bfd/elf32-nds32.c | 1610 ++++++++++++++++----------------- bfd/elf32-nios2.c | 892 +++++++++---------- bfd/elf32-nios2.h | 6 +- bfd/elf32-or1k.c | 510 +++++------ bfd/elf32-pj.c | 62 +- bfd/elf32-ppc.c | 810 ++++++++--------- bfd/elf32-ppc.h | 10 +- bfd/elf32-pru.c | 146 +-- bfd/elf32-rl78.c | 317 ++++--- bfd/elf32-rx.c | 512 +++++------ bfd/elf32-s12z.c | 60 +- bfd/elf32-s390.c | 408 ++++----- bfd/elf32-score.c | 576 ++++++------ bfd/elf32-score.h | 44 +- bfd/elf32-score7.c | 512 +++++------ bfd/elf32-sh-relocs.h | 330 +++---- bfd/elf32-sh.c | 461 +++++----- bfd/elf32-sparc.c | 30 +- bfd/elf32-spu.c | 636 ++++++------- bfd/elf32-spu.h | 7 +- bfd/elf32-tic6x.c | 648 +++++++------- bfd/elf32-tic6x.h | 10 +- bfd/elf32-tilegx.c | 10 +- bfd/elf32-tilepro.c | 386 ++++---- bfd/elf32-v850.c | 634 ++++++------- bfd/elf32-v850.h | 4 +- bfd/elf32-vax.c | 247 +++-- bfd/elf32-visium.c | 150 ++-- bfd/elf32-wasm32.c | 14 +- bfd/elf32-xc16x.c | 70 +- bfd/elf32-xgate.c | 130 +-- bfd/elf32-xstormy16.c | 160 ++-- bfd/elf32-xtensa.c | 1370 ++++++++++++++-------------- bfd/elf32-z80.c | 102 +-- bfd/elf64-alpha.c | 666 +++++++------- bfd/elf64-bpf.c | 106 +-- bfd/elf64-gen.c | 22 +- bfd/elf64-hppa.c | 362 ++++---- bfd/elf64-ia64-vms.c | 560 ++++++------ bfd/elf64-mips.c | 1326 +++++++++++++-------------- bfd/elf64-mmix.c | 374 ++++---- bfd/elf64-nfp.c | 126 +-- bfd/elf64-ppc.c | 1426 ++++++++++++++--------------- bfd/elf64-ppc.h | 26 +- bfd/elf64-s390.c | 464 +++++----- bfd/elf64-sparc.c | 94 +- bfd/elf64-tilegx.c | 10 +- bfd/elf64-x86-64.c | 632 ++++++------- bfd/elfcode.h | 80 +- bfd/elfcore.h | 16 +- bfd/elflink.c | 1774 ++++++++++++++++++------------------ bfd/elfn32-mips.c | 1294 +++++++++++++-------------- bfd/elfnn-aarch64.c | 1264 +++++++++++++------------- bfd/elfnn-ia64.c | 481 +++++----- bfd/elfnn-riscv.c | 520 +++++------ bfd/elfxx-aarch64.c | 24 +- bfd/elfxx-aarch64.h | 16 +- bfd/elfxx-ia64.c | 210 ++--- bfd/elfxx-ia64.h | 2 +- bfd/elfxx-mips.c | 1474 +++++++++++++++--------------- bfd/elfxx-mips.h | 98 +- bfd/elfxx-riscv.c | 438 ++++----- bfd/elfxx-riscv.h | 8 +- bfd/elfxx-sparc.c | 456 +++++----- bfd/elfxx-sparc.h | 30 +- bfd/elfxx-target.h | 10 +- bfd/elfxx-tilegx.c | 412 ++++----- bfd/elfxx-tilegx.h | 18 +- bfd/elfxx-x86.c | 178 ++-- bfd/elfxx-x86.h | 34 +- bfd/format.c | 34 +- bfd/genlink.h | 8 +- bfd/hash.c | 40 +- bfd/i386aout.c | 4 +- bfd/i386lynx.c | 40 +- bfd/i386msdos.c | 18 +- bfd/ihex.c | 92 +- bfd/libaout.h | 76 +- bfd/libbfd-in.h | 208 ++--- bfd/libbfd.c | 96 +- bfd/libbfd.h | 236 ++--- bfd/libcoff-in.h | 80 +- bfd/libcoff.h | 126 +-- bfd/libecoff.h | 52 +- bfd/libpei.h | 50 +- bfd/libxcoff.h | 22 +- bfd/linker.c | 434 +++++---- bfd/mach-o-aarch64.c | 118 +-- bfd/mach-o-arm.c | 130 +-- bfd/mach-o-i386.c | 110 +-- bfd/mach-o-x86-64.c | 116 +-- bfd/mach-o.c | 784 ++++++++-------- bfd/mach-o.h | 62 +- bfd/merge.c | 68 +- bfd/mmo.c | 227 +++-- bfd/netbsd.h | 6 +- bfd/opncls.c | 118 +-- bfd/pc532-mach.c | 4 +- bfd/pdp11.c | 512 +++++------ bfd/pe-arm.c | 2 +- bfd/pe-i386.c | 2 +- bfd/pe-mcore.c | 2 +- bfd/pe-sh.c | 2 +- bfd/pe-x86_64.c | 12 +- bfd/peXXigen.c | 284 +++--- bfd/pef.c | 4 +- bfd/pei-arm.c | 2 +- bfd/pei-i386.c | 2 +- bfd/pei-ia64.c | 2 +- bfd/pei-mcore.c | 2 +- bfd/pei-sh.c | 2 +- bfd/pei-x86_64.c | 42 +- bfd/peicode.h | 48 +- bfd/plugin.c | 58 +- bfd/plugin.h | 6 +- bfd/ppcboot.c | 24 +- bfd/reloc.c | 58 +- bfd/reloc16.c | 20 +- bfd/rs6000-core.c | 27 +- bfd/section.c | 124 ++- bfd/simple.c | 2 +- bfd/som.c | 402 ++++----- bfd/som.h | 21 +- bfd/srec.c | 106 +-- bfd/stabs.c | 54 +- bfd/syms.c | 102 +-- bfd/sysdep.h | 2 + bfd/targets.c | 265 +++--- bfd/tekhex.c | 110 +-- bfd/verilog.c | 40 +- bfd/vms-alpha.c | 822 +++++++++-------- bfd/vms-lib.c | 188 ++-- bfd/vms-misc.c | 10 +- bfd/vms.h | 2 +- bfd/wasm-module.c | 136 +-- bfd/xcofflink.c | 622 ++++++------- bfd/xcofflink.h | 24 +- bfd/xsym.c | 6 +- bfd/xsym.h | 4 +- 331 files changed, 28339 insertions(+), 28278 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8b7e53e1ad..9a9152609d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,94 @@ +2021-03-31 Alan Modra + + * sysdep.h: POISON_BFD_BOOLEAN: Define. + * aix5ppc-core.c, * aout-cris.c, * aout-ns32k.c, * aout-target.h, + * aoutx.h, * arc-got.h, * archive.c, * archive64.c, * archures.c, + * bfd-in.h, * bfd.c, * bfdwin.c, * binary.c, * cache.c, + * coff-alpha.c, * coff-arm.c, * coff-arm.h, * coff-bfd.c, + * coff-bfd.h, * coff-go32.c, * coff-i386.c, * coff-ia64.c, + * coff-mcore.c, * coff-mips.c, * coff-rs6000.c, * coff-sh.c, + * coff-stgo32.c, * coff-tic30.c, * coff-tic4x.c, * coff-tic54x.c, + * coff-x86_64.c, * coff-z80.c, * coff-z8k.c, * coff64-rs6000.c, + * coffcode.h, * coffgen.c, * cofflink.c, * compress.c, + * corefile.c, * cpu-aarch64.c, * cpu-aarch64.h, * cpu-alpha.c, + * cpu-arc.c, * cpu-arm.c, * cpu-arm.h, * cpu-avr.c, * cpu-bfin.c, + * cpu-bpf.c, * cpu-cr16.c, * cpu-cris.c, * cpu-crx.c, + * cpu-csky.c, * cpu-d10v.c, * cpu-d30v.c, * cpu-dlx.c, + * cpu-epiphany.c, * cpu-fr30.c, * cpu-frv.c, * cpu-ft32.c, + * cpu-h8300.c, * cpu-hppa.c, * cpu-i386.c, * cpu-ia64.c, + * cpu-iamcu.c, * cpu-ip2k.c, * cpu-iq2000.c, * cpu-k1om.c, + * cpu-l1om.c, * cpu-lm32.c, * cpu-m10200.c, * cpu-m10300.c, + * cpu-m32c.c, * cpu-m32r.c, * cpu-m68hc11.c, * cpu-m68hc12.c, + * cpu-m68k.c, * cpu-m9s12x.c, * cpu-m9s12xg.c, * cpu-mcore.c, + * cpu-mep.c, * cpu-metag.c, * cpu-microblaze.c, * cpu-mips.c, + * cpu-mmix.c, * cpu-moxie.c, * cpu-msp430.c, * cpu-mt.c, + * cpu-nds32.c, * cpu-nfp.c, * cpu-nios2.c, * cpu-ns32k.c, + * cpu-or1k.c, * cpu-pdp11.c, * cpu-pj.c, * cpu-powerpc.c, + * cpu-pru.c, * cpu-riscv.c, * cpu-rl78.c, * cpu-rs6000.c, + * cpu-rx.c, * cpu-s12z.c, * cpu-s390.c, * cpu-score.c, + * cpu-sh.c, * cpu-sparc.c, * cpu-spu.c, * cpu-tic30.c, + * cpu-tic4x.c, * cpu-tic54x.c, * cpu-tic6x.c, * cpu-tilegx.c, + * cpu-tilepro.c, * cpu-v850.c, * cpu-v850_rh850.c, * cpu-vax.c, + * cpu-visium.c, * cpu-wasm32.c, * cpu-xc16x.c, * cpu-xgate.c, + * cpu-xstormy16.c, * cpu-xtensa.c, * cpu-z80.c, * cpu-z8k.c, + * dwarf1.c, * dwarf2.c, * ecoff-bfd.h, * ecoff.c, * ecofflink.c, + * elf-attrs.c, * elf-bfd.h, * elf-eh-frame.c, * elf-hppa.h, + * elf-ifunc.c, * elf-m10200.c, * elf-m10300.c, * elf-nacl.c, + * elf-nacl.h, * elf-properties.c, * elf-s390-common.c, + * elf-s390.h, * elf-strtab.c, * elf-vxworks.c, * elf-vxworks.h, + * elf.c, * elf32-am33lin.c, * elf32-arc.c, * elf32-arm.c, + * elf32-arm.h, * elf32-avr.c, * elf32-avr.h, * elf32-bfin.c, + * elf32-bfin.h, * elf32-cr16.c, * elf32-cr16.h, * elf32-cris.c, + * elf32-crx.c, * elf32-csky.c, * elf32-csky.h, * elf32-d10v.c, + * elf32-d30v.c, * elf32-dlx.c, * elf32-epiphany.c, + * elf32-fr30.c, * elf32-frv.c, * elf32-ft32.c, * elf32-gen.c, + * elf32-h8300.c, * elf32-hppa.c, * elf32-hppa.h, * elf32-i386.c, + * elf32-ip2k.c, * elf32-iq2000.c, * elf32-lm32.c, * elf32-m32c.c, + * elf32-m32r.c, * elf32-m68hc11.c, * elf32-m68hc12.c, + * elf32-m68hc1x.c, * elf32-m68hc1x.h, * elf32-m68k.c, + * elf32-m68k.h, * elf32-mcore.c, * elf32-mep.c, * elf32-metag.c, + * elf32-metag.h, * elf32-microblaze.c, * elf32-mips.c, + * elf32-moxie.c, * elf32-msp430.c, * elf32-mt.c, * elf32-nds32.c, + * elf32-nios2.c, * elf32-nios2.h, * elf32-or1k.c, * elf32-pj.c, + * elf32-ppc.c, * elf32-ppc.h, * elf32-pru.c, * elf32-rl78.c, + * elf32-rx.c, * elf32-s12z.c, * elf32-s390.c, * elf32-score.c, + * elf32-score.h, * elf32-score7.c, * elf32-sh-relocs.h, + * elf32-sh.c, * elf32-sparc.c, * elf32-spu.c, * elf32-spu.h, + * elf32-tic6x.c, * elf32-tic6x.h, * elf32-tilegx.c, + * elf32-tilepro.c, * elf32-v850.c, * elf32-v850.h, + * elf32-vax.c, * elf32-visium.c, * elf32-wasm32.c, + * elf32-xc16x.c, * elf32-xgate.c, * elf32-xstormy16.c, + * elf32-xtensa.c, * elf32-z80.c, * elf64-alpha.c, * elf64-bpf.c, + * elf64-gen.c, * elf64-hppa.c, * elf64-ia64-vms.c, + * elf64-mips.c, * elf64-mmix.c, * elf64-nfp.c, * elf64-ppc.c, + * elf64-ppc.h, * elf64-s390.c, * elf64-sparc.c, + * elf64-tilegx.c, * elf64-x86-64.c, * elfcode.h, + * elfcore.h, * elflink.c, * elfn32-mips.c, * elfnn-aarch64.c, + * elfnn-ia64.c, * elfnn-riscv.c, * elfxx-aarch64.c, + * elfxx-aarch64.h, * elfxx-ia64.c, * elfxx-ia64.h, + * elfxx-mips.c, * elfxx-mips.h, * elfxx-riscv.c, * elfxx-riscv.h, + * elfxx-sparc.c, * elfxx-sparc.h, * elfxx-target.h, + * elfxx-tilegx.c, * elfxx-tilegx.h, * elfxx-x86.c, * elfxx-x86.h, + * format.c, * genlink.h, * hash.c, * i386aout.c, * i386lynx.c, + * i386msdos.c, * ihex.c, * libaout.h, * libbfd-in.h, + * libbfd.c, * libcoff-in.h, * libecoff.h, * libpei.h, + * libxcoff.h, * linker.c, * mach-o-aarch64.c, * mach-o-arm.c, + * mach-o-i386.c, * mach-o-x86-64.c, * mach-o.c, * mach-o.h, + * merge.c, * mmo.c, * netbsd.h, * opncls.c, * pc532-mach.c, + * pdp11.c, * pe-arm.c, * pe-i386.c, * pe-mcore.c, * pe-sh.c, + * pe-x86_64.c, * peXXigen.c, * pef.c, * pei-arm.c, * pei-i386.c, + * pei-ia64.c, * pei-mcore.c, * pei-sh.c, * pei-x86_64.c, + * peicode.h, * plugin.c, * plugin.h, * ppcboot.c, * reloc.c, + * reloc16.c, * rs6000-core.c, * section.c, * simple.c, * som.c, + * som.h, * srec.c, * stabs.c, * syms.c, * targets.c, * tekhex.c, + * verilog.c, * vms-alpha.c, * vms-lib.c, * vms-misc.c, * vms.h, + * wasm-module.c, * xcofflink.c, * xcofflink.h, * xsym.c, + * xsym.h: Replace bfd_boolean with bool, FALSE with false, and + TRUE with true throughout. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + * libcoff.h: Regenerate. + 2021-03-31 Alan Modra * bfd-in.h: Include stdbool.h. diff --git a/bfd/aix5ppc-core.c b/bfd/aix5ppc-core.c index dbab6462dd..51f2d781fa 100644 --- a/bfd/aix5ppc-core.c +++ b/bfd/aix5ppc-core.c @@ -24,7 +24,7 @@ #include "bfd.h" bfd_cleanup xcoff64_core_p (bfd *); -bfd_boolean xcoff64_core_file_matches_executable_p (bfd *, bfd *); +bool xcoff64_core_file_matches_executable_p (bfd *, bfd *); char *xcoff64_core_file_failing_command (bfd *); int xcoff64_core_file_failing_signal (bfd *); @@ -238,14 +238,14 @@ xcoff64_core_p (bfd *abfd) /* Return `TRUE' if given core is from the given executable. */ -bfd_boolean +bool xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) { struct core_dumpxx core; char *path, *s; size_t alloc; const char *str1, *str2; - bfd_boolean return_value = FALSE; + bool return_value = false; /* Get the header. */ if (bfd_seek (core_bfd, 0, SEEK_SET) != 0) @@ -295,7 +295,7 @@ xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) str2 = str2 != NULL ? str2 + 1 : bfd_get_filename (exec_bfd); if (strcmp (str1, str2) == 0) - return_value = TRUE; + return_value = true; xcoff64_core_file_matches_executable_p_end_1: free (path); @@ -335,7 +335,7 @@ xcoff64_core_p (bfd *abfd ATTRIBUTE_UNUSED) return 0; } -bfd_boolean +bool xcoff64_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) { return generic_core_file_matches_executable_p (core_bfd, exec_bfd); diff --git a/bfd/aout-cris.c b/bfd/aout-cris.c index 00c4791ced..a650225914 100644 --- a/bfd/aout-cris.c +++ b/bfd/aout-cris.c @@ -69,7 +69,7 @@ #define MY_exec_hdr_flags 1 #define MY_write_object_contents MY (write_object_contents) -static bfd_boolean MY (write_object_contents) (bfd *); +static bool MY (write_object_contents) (bfd *); /* Forward this, so we can use a pointer to it in PARAMS. */ struct reloc_ext_external; @@ -82,7 +82,7 @@ static void MY (swap_ext_reloc_in) (bfd *, struct reloc_ext_external *, arelent *, asymbol **, bfd_size_type); #define MY_set_sizes MY (set_sizes) -static bfd_boolean MY (set_sizes) (bfd *); +static bool MY (set_sizes) (bfd *); /* To set back reloc_size to ext, we make MY (set_sizes) be called through this construct. Note that MY_set_arch_mach is only called @@ -110,7 +110,7 @@ static bfd_boolean MY (set_sizes) (bfd *); /* We need our own version to set header flags. */ -static bfd_boolean +static bool MY (write_object_contents) (bfd *abfd) { struct external_exec exec_bytes; @@ -131,7 +131,7 @@ MY (write_object_contents) (bfd *abfd) WRITE_HEADERS (abfd, execp); - return TRUE; + return true; } /* We need our own for these reasons: @@ -269,7 +269,7 @@ MY (swap_ext_reloc_in) (bfd *abfd, "obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;", to avoid changing NAME (aout, set_arch_mach) in aoutx. */ -static bfd_boolean +static bool MY (set_sizes) (bfd *abfd) { /* Just as the default in aout-target.h (with some #ifdefs folded)... */ @@ -286,5 +286,5 @@ MY (set_sizes) (bfd *abfd) obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE; - return TRUE; + return true; } diff --git a/bfd/aout-ns32k.c b/bfd/aout-ns32k.c index a2415568e5..83fde67cc2 100644 --- a/bfd/aout-ns32k.c +++ b/bfd/aout-ns32k.c @@ -31,7 +31,7 @@ reloc_howto_type * MYNS (bfd_reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * MYNS (bfd_reloc_name_lookup) (bfd *, const char *); -bfd_boolean MYNS (write_object_contents) (bfd *); +bool MYNS (write_object_contents) (bfd *); /* Avoid multiple definitions from aoutx if supporting standard a.out format(s) as well as this one. */ @@ -79,58 +79,58 @@ void bfd_ns32k_arch (void); reloc_howto_type MY (howto_table)[] = { /* ns32k immediate operands. */ - HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, FALSE, 0, complain_overflow_signed, + HOWTO (BFD_RELOC_NS32K_IMM_8, 0, 0, 8, false, 0, complain_overflow_signed, _bfd_ns32k_reloc_imm, "NS32K_IMM_8", - TRUE, 0x000000ff,0x000000ff, FALSE), - HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, FALSE, 0, complain_overflow_signed, + true, 0x000000ff,0x000000ff, false), + HOWTO (BFD_RELOC_NS32K_IMM_16, 0, 1, 16, false, 0, complain_overflow_signed, _bfd_ns32k_reloc_imm, "NS32K_IMM_16", - TRUE, 0x0000ffff,0x0000ffff, FALSE), - HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, FALSE, 0, complain_overflow_signed, + true, 0x0000ffff,0x0000ffff, false), + HOWTO (BFD_RELOC_NS32K_IMM_32, 0, 2, 32, false, 0, complain_overflow_signed, _bfd_ns32k_reloc_imm, "NS32K_IMM_32", - TRUE, 0xffffffff,0xffffffff, FALSE), - HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed, + true, 0xffffffff,0xffffffff, false), + HOWTO (BFD_RELOC_NS32K_IMM_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed, _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_8", - TRUE, 0x000000ff, 0x000000ff, FALSE), - HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed, + true, 0x000000ff, 0x000000ff, false), + HOWTO (BFD_RELOC_NS32K_IMM_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed, _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_16", - TRUE, 0x0000ffff,0x0000ffff, FALSE), - HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed, + true, 0x0000ffff,0x0000ffff, false), + HOWTO (BFD_RELOC_NS32K_IMM_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed, _bfd_ns32k_reloc_imm, "PCREL_NS32K_IMM_32", - TRUE, 0xffffffff,0xffffffff, FALSE), + true, 0xffffffff,0xffffffff, false), /* ns32k displacements. */ - HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, FALSE, 0, complain_overflow_signed, + HOWTO (BFD_RELOC_NS32K_DISP_8, 0, 0, 7, false, 0, complain_overflow_signed, _bfd_ns32k_reloc_disp, "NS32K_DISP_8", - TRUE, 0x000000ff,0x000000ff, FALSE), - HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, FALSE, 0, complain_overflow_signed, + true, 0x000000ff,0x000000ff, false), + HOWTO (BFD_RELOC_NS32K_DISP_16, 0, 1, 14, false, 0, complain_overflow_signed, _bfd_ns32k_reloc_disp, "NS32K_DISP_16", - TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, FALSE, 0, complain_overflow_signed, + true, 0x0000ffff, 0x0000ffff, false), + HOWTO (BFD_RELOC_NS32K_DISP_32, 0, 2, 30, false, 0, complain_overflow_signed, _bfd_ns32k_reloc_disp, "NS32K_DISP_32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, TRUE, 0, complain_overflow_signed, + true, 0xffffffff, 0xffffffff, false), + HOWTO (BFD_RELOC_NS32K_DISP_8_PCREL, 0, 0, 7, true, 0, complain_overflow_signed, _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_8", - TRUE, 0x000000ff,0x000000ff, FALSE), - HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, TRUE, 0, complain_overflow_signed, + true, 0x000000ff,0x000000ff, false), + HOWTO (BFD_RELOC_NS32K_DISP_16_PCREL, 0, 1, 14, true, 0, complain_overflow_signed, _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_16", - TRUE, 0x0000ffff,0x0000ffff, FALSE), - HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, TRUE, 0, complain_overflow_signed, + true, 0x0000ffff,0x0000ffff, false), + HOWTO (BFD_RELOC_NS32K_DISP_32_PCREL, 0, 2, 30, true, 0, complain_overflow_signed, _bfd_ns32k_reloc_disp, "PCREL_NS32K_DISP_32", - TRUE, 0xffffffff,0xffffffff, FALSE), + true, 0xffffffff,0xffffffff, false), /* Normal 2's complement. */ - HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,0, - "8", TRUE, 0x000000ff,0x000000ff, FALSE), - HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,0, - "16", TRUE, 0x0000ffff,0x0000ffff, FALSE), - HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0, - "32", TRUE, 0xffffffff,0xffffffff, FALSE), - HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, - "PCREL_8", TRUE, 0x000000ff,0x000000ff, FALSE), - HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, - "PCREL_16", TRUE, 0x0000ffff,0x0000ffff, FALSE), - HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, - "PCREL_32", TRUE, 0xffffffff,0xffffffff, FALSE), + HOWTO (BFD_RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield,0, + "8", true, 0x000000ff,0x000000ff, false), + HOWTO (BFD_RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield,0, + "16", true, 0x0000ffff,0x0000ffff, false), + HOWTO (BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield,0, + "32", true, 0xffffffff,0xffffffff, false), + HOWTO (BFD_RELOC_8_PCREL, 0, 0, 8, true, 0, complain_overflow_signed, 0, + "PCREL_8", true, 0x000000ff,0x000000ff, false), + HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, complain_overflow_signed, 0, + "PCREL_16", true, 0x0000ffff,0x0000ffff, false), + HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_signed, 0, + "PCREL_32", true, 0xffffffff,0xffffffff, false), }; #define CTOR_TABLE_RELOC_HOWTO(BFD) (MY (howto_table) + 14) diff --git a/bfd/aout-target.h b/bfd/aout-target.h index 92fc3ed4dd..b5155ac36c 100644 --- a/bfd/aout-target.h +++ b/bfd/aout-target.h @@ -193,7 +193,7 @@ MY (object_p) (bfd *abfd) #ifndef MY_mkobject -static bfd_boolean +static bool MY (mkobject) (bfd *abfd) { return NAME (aout, mkobject (abfd)); @@ -210,7 +210,7 @@ MY (mkobject) (bfd *abfd) section contents, and copy_private_bfd_data is not called until after the section contents have been set. */ -static bfd_boolean +static bool MY_bfd_copy_private_section_data (bfd *ibfd, asection *isec ATTRIBUTE_UNUSED, bfd *obfd, @@ -219,7 +219,7 @@ MY_bfd_copy_private_section_data (bfd *ibfd, if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour && bfd_get_flavour (obfd) == bfd_target_aout_flavour) obj_aout_subformat (obfd) = obj_aout_subformat (ibfd); - return TRUE; + return true; } #endif @@ -230,7 +230,7 @@ MY_bfd_copy_private_section_data (bfd *ibfd, #ifndef MY_write_object_contents -static bfd_boolean +static bool MY (write_object_contents) (bfd *abfd) { struct external_exec exec_bytes; @@ -240,14 +240,14 @@ MY (write_object_contents) (bfd *abfd) WRITE_HEADERS (abfd, execp); - return TRUE; + return true; } #define MY_write_object_contents MY (write_object_contents) #endif #ifndef MY_set_sizes -static bfd_boolean +static bool MY (set_sizes) (bfd *abfd) { adata(abfd).page_size = TARGET_PAGE_SIZE; @@ -260,7 +260,7 @@ MY (set_sizes) (bfd *abfd) #endif adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE; - return TRUE; + return true; } #define MY_set_sizes MY (set_sizes) #endif @@ -345,7 +345,7 @@ MY_final_link_callback (bfd *abfd, /* Final link routine. We need to use a call back to get the correct offsets in the output file. */ -static bfd_boolean +static bool MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { return NAME (aout, final_link) (abfd, info, MY_final_link_callback); @@ -598,11 +598,11 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info) /* Handle closing of a BFD including the resource-releasing parts. */ -static bfd_boolean +static bool MY_close_and_cleanup (bfd *abfd) { if (!MY_bfd_free_cached_info (abfd)) - return FALSE; + return false; return _bfd_generic_close_and_cleanup (abfd); } diff --git a/bfd/aoutx.h b/bfd/aoutx.h index 8761a6ac85..76bb13c8e8 100644 --- a/bfd/aoutx.h +++ b/bfd/aoutx.h @@ -190,34 +190,34 @@ DESCRIPTION reloc_howto_type howto_table_ext[] = { /* Type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone. */ - HOWTO (RELOC_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, 0, "8", FALSE, 0, 0x000000ff, FALSE), - HOWTO (RELOC_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "16", FALSE, 0, 0x0000ffff, FALSE), - HOWTO (RELOC_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "32", FALSE, 0, 0xffffffff, FALSE), - HOWTO (RELOC_DISP8, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0, "DISP8", FALSE, 0, 0x000000ff, FALSE), - HOWTO (RELOC_DISP16, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "DISP16", FALSE, 0, 0x0000ffff, FALSE), - HOWTO (RELOC_DISP32, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "DISP32", FALSE, 0, 0xffffffff, FALSE), - HOWTO (RELOC_WDISP30, 2, 2, 30, TRUE, 0, complain_overflow_signed, 0, "WDISP30", FALSE, 0, 0x3fffffff, FALSE), - HOWTO (RELOC_WDISP22, 2, 2, 22, TRUE, 0, complain_overflow_signed, 0, "WDISP22", FALSE, 0, 0x003fffff, FALSE), - HOWTO (RELOC_HI22, 10, 2, 22, FALSE, 0, complain_overflow_bitfield, 0, "HI22", FALSE, 0, 0x003fffff, FALSE), - HOWTO (RELOC_22, 0, 2, 22, FALSE, 0, complain_overflow_bitfield, 0, "22", FALSE, 0, 0x003fffff, FALSE), - HOWTO (RELOC_13, 0, 2, 13, FALSE, 0, complain_overflow_bitfield, 0, "13", FALSE, 0, 0x00001fff, FALSE), - HOWTO (RELOC_LO10, 0, 2, 10, FALSE, 0, complain_overflow_dont, 0, "LO10", FALSE, 0, 0x000003ff, FALSE), - HOWTO (RELOC_SFA_BASE,0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "SFA_BASE", FALSE, 0, 0xffffffff, FALSE), - HOWTO (RELOC_SFA_OFF13,0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "SFA_OFF13", FALSE, 0, 0xffffffff, FALSE), - HOWTO (RELOC_BASE10, 0, 2, 10, FALSE, 0, complain_overflow_dont, 0, "BASE10", FALSE, 0, 0x000003ff, FALSE), - HOWTO (RELOC_BASE13, 0, 2, 13, FALSE, 0, complain_overflow_signed, 0, "BASE13", FALSE, 0, 0x00001fff, FALSE), - HOWTO (RELOC_BASE22, 10, 2, 22, FALSE, 0, complain_overflow_bitfield, 0, "BASE22", FALSE, 0, 0x003fffff, FALSE), - HOWTO (RELOC_PC10, 0, 2, 10, TRUE, 0, complain_overflow_dont, 0, "PC10", FALSE, 0, 0x000003ff, TRUE), - HOWTO (RELOC_PC22, 10, 2, 22, TRUE, 0, complain_overflow_signed, 0, "PC22", FALSE, 0, 0x003fffff, TRUE), - HOWTO (RELOC_JMP_TBL, 2, 2, 30, TRUE, 0, complain_overflow_signed, 0, "JMP_TBL", FALSE, 0, 0x3fffffff, FALSE), - HOWTO (RELOC_SEGOFF16,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "SEGOFF16", FALSE, 0, 0x00000000, FALSE), - HOWTO (RELOC_GLOB_DAT,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "GLOB_DAT", FALSE, 0, 0x00000000, FALSE), - HOWTO (RELOC_JMP_SLOT,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "JMP_SLOT", FALSE, 0, 0x00000000, FALSE), - HOWTO (RELOC_RELATIVE,0, 2, 0, FALSE, 0, complain_overflow_bitfield, 0, "RELATIVE", FALSE, 0, 0x00000000, FALSE), - HOWTO (0, 0, 3, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE), - HOWTO (0, 0, 3, 0, FALSE, 0, complain_overflow_dont, 0, "R_SPARC_NONE",FALSE, 0, 0x00000000, TRUE), + HOWTO (RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield, 0, "8", false, 0, 0x000000ff, false), + HOWTO (RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield, 0, "16", false, 0, 0x0000ffff, false), + HOWTO (RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield, 0, "32", false, 0, 0xffffffff, false), + HOWTO (RELOC_DISP8, 0, 0, 8, true, 0, complain_overflow_signed, 0, "DISP8", false, 0, 0x000000ff, false), + HOWTO (RELOC_DISP16, 0, 1, 16, true, 0, complain_overflow_signed, 0, "DISP16", false, 0, 0x0000ffff, false), + HOWTO (RELOC_DISP32, 0, 2, 32, true, 0, complain_overflow_signed, 0, "DISP32", false, 0, 0xffffffff, false), + HOWTO (RELOC_WDISP30, 2, 2, 30, true, 0, complain_overflow_signed, 0, "WDISP30", false, 0, 0x3fffffff, false), + HOWTO (RELOC_WDISP22, 2, 2, 22, true, 0, complain_overflow_signed, 0, "WDISP22", false, 0, 0x003fffff, false), + HOWTO (RELOC_HI22, 10, 2, 22, false, 0, complain_overflow_bitfield, 0, "HI22", false, 0, 0x003fffff, false), + HOWTO (RELOC_22, 0, 2, 22, false, 0, complain_overflow_bitfield, 0, "22", false, 0, 0x003fffff, false), + HOWTO (RELOC_13, 0, 2, 13, false, 0, complain_overflow_bitfield, 0, "13", false, 0, 0x00001fff, false), + HOWTO (RELOC_LO10, 0, 2, 10, false, 0, complain_overflow_dont, 0, "LO10", false, 0, 0x000003ff, false), + HOWTO (RELOC_SFA_BASE,0, 2, 32, false, 0, complain_overflow_bitfield, 0, "SFA_BASE", false, 0, 0xffffffff, false), + HOWTO (RELOC_SFA_OFF13,0, 2, 32, false, 0, complain_overflow_bitfield, 0, "SFA_OFF13", false, 0, 0xffffffff, false), + HOWTO (RELOC_BASE10, 0, 2, 10, false, 0, complain_overflow_dont, 0, "BASE10", false, 0, 0x000003ff, false), + HOWTO (RELOC_BASE13, 0, 2, 13, false, 0, complain_overflow_signed, 0, "BASE13", false, 0, 0x00001fff, false), + HOWTO (RELOC_BASE22, 10, 2, 22, false, 0, complain_overflow_bitfield, 0, "BASE22", false, 0, 0x003fffff, false), + HOWTO (RELOC_PC10, 0, 2, 10, true, 0, complain_overflow_dont, 0, "PC10", false, 0, 0x000003ff, true), + HOWTO (RELOC_PC22, 10, 2, 22, true, 0, complain_overflow_signed, 0, "PC22", false, 0, 0x003fffff, true), + HOWTO (RELOC_JMP_TBL, 2, 2, 30, true, 0, complain_overflow_signed, 0, "JMP_TBL", false, 0, 0x3fffffff, false), + HOWTO (RELOC_SEGOFF16,0, 2, 0, false, 0, complain_overflow_bitfield, 0, "SEGOFF16", false, 0, 0x00000000, false), + HOWTO (RELOC_GLOB_DAT,0, 2, 0, false, 0, complain_overflow_bitfield, 0, "GLOB_DAT", false, 0, 0x00000000, false), + HOWTO (RELOC_JMP_SLOT,0, 2, 0, false, 0, complain_overflow_bitfield, 0, "JMP_SLOT", false, 0, 0x00000000, false), + HOWTO (RELOC_RELATIVE,0, 2, 0, false, 0, complain_overflow_bitfield, 0, "RELATIVE", false, 0, 0x00000000, false), + HOWTO (0, 0, 3, 0, false, 0, complain_overflow_dont, 0, "R_SPARC_NONE",false, 0, 0x00000000, true), + HOWTO (0, 0, 3, 0, false, 0, complain_overflow_dont, 0, "R_SPARC_NONE",false, 0, 0x00000000, true), #define RELOC_SPARC_REV32 RELOC_WDISP19 - HOWTO (RELOC_SPARC_REV32, 0, 2, 32, FALSE, 0, complain_overflow_dont, 0,"R_SPARC_REV32",FALSE, 0, 0xffffffff, FALSE), + HOWTO (RELOC_SPARC_REV32, 0, 2, 32, false, 0, complain_overflow_dont, 0,"R_SPARC_REV32",false, 0, 0xffffffff, false), }; /* Convert standard reloc records to "arelent" format (incl byte swap). */ @@ -225,23 +225,23 @@ reloc_howto_type howto_table_ext[] = reloc_howto_type howto_table_std[] = { /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone. */ -HOWTO ( 0, 0, 0, 8, FALSE, 0, complain_overflow_bitfield,0,"8", TRUE, 0x000000ff,0x000000ff, FALSE), -HOWTO ( 1, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,0,"16", TRUE, 0x0000ffff,0x0000ffff, FALSE), -HOWTO ( 2, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"32", TRUE, 0xffffffff,0xffffffff, FALSE), -HOWTO ( 3, 0, 4, 64, FALSE, 0, complain_overflow_bitfield,0,"64", TRUE, 0xdeaddead,0xdeaddead, FALSE), -HOWTO ( 4, 0, 0, 8, TRUE, 0, complain_overflow_signed, 0,"DISP8", TRUE, 0x000000ff,0x000000ff, FALSE), -HOWTO ( 5, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0,"DISP16", TRUE, 0x0000ffff,0x0000ffff, FALSE), -HOWTO ( 6, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0,"DISP32", TRUE, 0xffffffff,0xffffffff, FALSE), -HOWTO ( 7, 0, 4, 64, TRUE, 0, complain_overflow_signed, 0,"DISP64", TRUE, 0xfeedface,0xfeedface, FALSE), -HOWTO ( 8, 0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"GOT_REL", FALSE, 0,0x00000000, FALSE), -HOWTO ( 9, 0, 1, 16, FALSE, 0, complain_overflow_bitfield,0,"BASE16", FALSE,0xffffffff,0xffffffff, FALSE), -HOWTO (10, 0, 2, 32, FALSE, 0, complain_overflow_bitfield,0,"BASE32", FALSE,0xffffffff,0xffffffff, FALSE), +HOWTO ( 0, 0, 0, 8, false, 0, complain_overflow_bitfield,0,"8", true, 0x000000ff,0x000000ff, false), +HOWTO ( 1, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"16", true, 0x0000ffff,0x0000ffff, false), +HOWTO ( 2, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"32", true, 0xffffffff,0xffffffff, false), +HOWTO ( 3, 0, 4, 64, false, 0, complain_overflow_bitfield,0,"64", true, 0xdeaddead,0xdeaddead, false), +HOWTO ( 4, 0, 0, 8, true, 0, complain_overflow_signed, 0,"DISP8", true, 0x000000ff,0x000000ff, false), +HOWTO ( 5, 0, 1, 16, true, 0, complain_overflow_signed, 0,"DISP16", true, 0x0000ffff,0x0000ffff, false), +HOWTO ( 6, 0, 2, 32, true, 0, complain_overflow_signed, 0,"DISP32", true, 0xffffffff,0xffffffff, false), +HOWTO ( 7, 0, 4, 64, true, 0, complain_overflow_signed, 0,"DISP64", true, 0xfeedface,0xfeedface, false), +HOWTO ( 8, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"GOT_REL", false, 0,0x00000000, false), +HOWTO ( 9, 0, 1, 16, false, 0, complain_overflow_bitfield,0,"BASE16", false,0xffffffff,0xffffffff, false), +HOWTO (10, 0, 2, 32, false, 0, complain_overflow_bitfield,0,"BASE32", false,0xffffffff,0xffffffff, false), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), - HOWTO (16, 0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"JMP_TABLE", FALSE, 0,0x00000000, FALSE), + HOWTO (16, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false, 0,0x00000000, false), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), @@ -257,7 +257,7 @@ EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), - HOWTO (32, 0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"RELATIVE", FALSE, 0,0x00000000, FALSE), + HOWTO (32, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"RELATIVE", false, 0,0x00000000, false), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), @@ -265,7 +265,7 @@ EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), - HOWTO (40, 0, 2, 0, FALSE, 0, complain_overflow_bitfield,0,"BASEREL", FALSE, 0,0x00000000, FALSE), + HOWTO (40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false), }; #define TABLE_SIZE(TABLE) (sizeof (TABLE) / sizeof (TABLE[0])) @@ -434,16 +434,16 @@ NAME (aout, swap_exec_header_out) (bfd *abfd, /* Make all the section for an a.out file. */ -bfd_boolean +bool NAME (aout, make_sections) (bfd *abfd) { if (obj_textsec (abfd) == NULL && bfd_make_section (abfd, ".text") == NULL) - return FALSE; + return false; if (obj_datasec (abfd) == NULL && bfd_make_section (abfd, ".data") == NULL) - return FALSE; + return false; if (obj_bsssec (abfd) == NULL && bfd_make_section (abfd, ".bss") == NULL) - return FALSE; - return TRUE; + return false; + return true; } /* @@ -672,13 +672,13 @@ FUNCTION aout_@var{size}_mkobject SYNOPSIS - bfd_boolean aout_@var{size}_mkobject, (bfd *abfd); + bool aout_@var{size}_mkobject, (bfd *abfd); DESCRIPTION Initialize BFD @var{abfd} for use with a.out files. */ -bfd_boolean +bool NAME (aout, mkobject) (bfd *abfd) { struct aout_data_struct *rawptr; @@ -688,7 +688,7 @@ NAME (aout, mkobject) (bfd *abfd) rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt); if (rawptr == NULL) - return FALSE; + return false; abfd->tdata.aout_data = rawptr; exec_hdr (abfd) = &(rawptr->e); @@ -697,7 +697,7 @@ NAME (aout, mkobject) (bfd *abfd) obj_datasec (abfd) = NULL; obj_bsssec (abfd) = NULL; - return TRUE; + return true; } /* @@ -708,7 +708,7 @@ SYNOPSIS enum machine_type aout_@var{size}_machine_type (enum bfd_architecture arch, unsigned long machine, - bfd_boolean *unknown); + bool *unknown); DESCRIPTION Keep track of machine architecture and machine type for @@ -723,12 +723,12 @@ DESCRIPTION enum machine_type NAME (aout, machine_type) (enum bfd_architecture arch, unsigned long machine, - bfd_boolean *unknown) + bool *unknown) { enum machine_type arch_flags; arch_flags = M_UNKNOWN; - *unknown = TRUE; + *unknown = true; switch (arch) { @@ -830,7 +830,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch, break; case bfd_arch_vax: - *unknown = FALSE; + *unknown = false; break; case bfd_arch_cris: @@ -843,7 +843,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch, } if (arch_flags != M_UNKNOWN) - *unknown = FALSE; + *unknown = false; return arch_flags; } @@ -853,7 +853,7 @@ FUNCTION aout_@var{size}_set_arch_mach SYNOPSIS - bfd_boolean aout_@var{size}_set_arch_mach, + bool aout_@var{size}_set_arch_mach, (bfd *, enum bfd_architecture arch, unsigned long machine); @@ -864,21 +864,21 @@ DESCRIPTION can support the architecture required. */ -bfd_boolean +bool NAME (aout, set_arch_mach) (bfd *abfd, enum bfd_architecture arch, unsigned long machine) { if (! bfd_default_set_arch_mach (abfd, arch, machine)) - return FALSE; + return false; if (arch != bfd_arch_unknown) { - bfd_boolean unknown; + bool unknown; NAME (aout, machine_type) (arch, machine, &unknown); if (unknown) - return FALSE; + return false; } /* Determine the size of a relocation entry. */ @@ -962,7 +962,7 @@ adjust_z_magic (bfd *abfd, struct internal_exec *execp) file_ptr text_end; const struct aout_backend_data *abdp; /* TRUE if text includes exec header. */ - bfd_boolean ztih; + bool ztih; asection *text = obj_textsec (abfd); asection *data = obj_datasec (abfd); asection *bss = obj_bsssec (abfd); @@ -1104,16 +1104,16 @@ adjust_n_magic (bfd *abfd, struct internal_exec *execp) N_SET_MAGIC (execp, NMAGIC); } -bfd_boolean +bool NAME (aout, adjust_sizes_and_vmas) (bfd *abfd) { struct internal_exec *execp = exec_hdr (abfd); if (! NAME (aout, make_sections) (abfd)) - return FALSE; + return false; if (adata (abfd).magic != undecided_magic) - return TRUE; + return true; execp->a_text = align_power (obj_textsec (abfd)->size, obj_textsec (abfd)->alignment_power); @@ -1188,7 +1188,7 @@ NAME (aout, adjust_sizes_and_vmas) (bfd *abfd) obj_bsssec (abfd)->vma, execp->a_bss); #endif - return TRUE; + return true; } /* @@ -1196,7 +1196,7 @@ FUNCTION aout_@var{size}_new_section_hook SYNOPSIS - bfd_boolean aout_@var{size}_new_section_hook, + bool aout_@var{size}_new_section_hook, (bfd *abfd, asection *newsect); @@ -1204,7 +1204,7 @@ DESCRIPTION Called by the BFD in response to a @code{bfd_make_section} request. */ -bfd_boolean +bool NAME (aout, new_section_hook) (bfd *abfd, asection *newsect) { /* Align to double at least. */ @@ -1233,7 +1233,7 @@ NAME (aout, new_section_hook) (bfd *abfd, asection *newsect) return _bfd_generic_new_section_hook (abfd, newsect); } -bfd_boolean +bool NAME (aout, set_section_contents) (bfd *abfd, sec_ptr section, const void * location, @@ -1243,13 +1243,13 @@ NAME (aout, set_section_contents) (bfd *abfd, if (! abfd->output_has_begun) { if (! NAME (aout, adjust_sizes_and_vmas) (abfd)) - return FALSE; + return false; } if (section == obj_bsssec (abfd)) { bfd_set_error (bfd_error_no_contents); - return FALSE; + return false; } if (section != obj_textsec (abfd) @@ -1265,7 +1265,7 @@ NAME (aout, set_section_contents) (bfd *abfd, (_("%pB: can not represent section `%pA' in a.out object file format"), abfd, section); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } } @@ -1273,15 +1273,15 @@ NAME (aout, set_section_contents) (bfd *abfd, { if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; } - return TRUE; + return true; } /* Read the external symbols from an a.out file. */ -static bfd_boolean +static bool aout_get_external_symbols (bfd *abfd) { if (obj_aout_external_syms (abfd) == NULL) @@ -1292,22 +1292,22 @@ aout_get_external_symbols (bfd *abfd) count = amt / EXTERNAL_NLIST_SIZE; if (count == 0) - return TRUE; /* Nothing to do. */ + return true; /* Nothing to do. */ #ifdef USE_MMAP if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd), amt, - &obj_aout_sym_window (abfd), TRUE)) - return FALSE; + &obj_aout_sym_window (abfd), true)) + return false; syms = (struct external_nlist *) obj_aout_sym_window (abfd).data; #else /* We allocate using malloc to make the values easy to free later on. If we put them on the objalloc it might not be possible to free them. */ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) - return FALSE; + return false; syms = (struct external_nlist *) _bfd_malloc_and_read (abfd, amt, amt); if (syms == NULL) - return FALSE; + return false; #endif obj_aout_external_syms (abfd) = syms; @@ -1325,7 +1325,7 @@ aout_get_external_symbols (bfd *abfd) /* Get the size of the strings. */ if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0 || bfd_bread ((void *) string_chars, amt, abfd) != amt) - return FALSE; + return false; stringsize = GET_WORD (abfd, string_chars); if (stringsize == 0) stringsize = 1; @@ -1333,15 +1333,15 @@ aout_get_external_symbols (bfd *abfd) || (size_t) stringsize != stringsize) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } #ifdef USE_MMAP if (stringsize >= BYTES_IN_WORD) { if (! bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize + 1, - &obj_aout_string_window (abfd), TRUE)) - return FALSE; + &obj_aout_string_window (abfd), true)) + return false; strings = (char *) obj_aout_string_window (abfd).data; } else @@ -1349,7 +1349,7 @@ aout_get_external_symbols (bfd *abfd) { strings = (char *) bfd_malloc (stringsize + 1); if (strings == NULL) - return FALSE; + return false; if (stringsize >= BYTES_IN_WORD) { @@ -1359,7 +1359,7 @@ aout_get_external_symbols (bfd *abfd) if (bfd_bread (strings + BYTES_IN_WORD, amt, abfd) != amt) { free (strings); - return FALSE; + return false; } } } @@ -1373,7 +1373,7 @@ aout_get_external_symbols (bfd *abfd) obj_aout_external_string_size (abfd) = stringsize; } - return TRUE; + return true; } /* Translate an a.out symbol into a BFD symbol. The desc, other, type @@ -1381,7 +1381,7 @@ aout_get_external_symbols (bfd *abfd) nlist structure. This function is responsible for setting symbol->flags and symbol->section, and adjusting symbol->value. */ -static bfd_boolean +static bool translate_from_native_sym_flags (bfd *abfd, aout_symbol_type *cache_ptr) { flagword visible; @@ -1416,7 +1416,7 @@ translate_from_native_sym_flags (bfd *abfd, aout_symbol_type *cache_ptr) cache_ptr->symbol.section = sec; cache_ptr->symbol.value -= sec->vma; - return TRUE; + return true; } /* Get the default visibility. This does not apply to all types, so @@ -1547,12 +1547,12 @@ translate_from_native_sym_flags (bfd *abfd, aout_symbol_type *cache_ptr) break; } - return TRUE; + return true; } /* Set the fields of SYM_POINTER according to CACHE_PTR. */ -static bfd_boolean +static bool translate_to_native_sym_flags (bfd *abfd, asymbol *cache_ptr, struct external_nlist *sym_pointer) @@ -1579,7 +1579,7 @@ translate_to_native_sym_flags (bfd *abfd, abfd, cache_ptr->name != NULL ? cache_ptr->name : _("*unknown*")); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } if (sec->output_section != NULL) @@ -1613,7 +1613,7 @@ translate_to_native_sym_flags (bfd *abfd, (_("%pB: can not represent section `%pA' in a.out object file format"), abfd, sec); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } } @@ -1662,7 +1662,7 @@ translate_to_native_sym_flags (bfd *abfd, PUT_WORD (abfd, value, sym_pointer->e_value); - return TRUE; + return true; } /* Native-level interface to symbols. */ @@ -1682,14 +1682,14 @@ NAME (aout, make_empty_symbol) (bfd *abfd) /* Translate a set of external symbols into internal symbols. */ -bfd_boolean +bool NAME (aout, translate_symbol_table) (bfd *abfd, aout_symbol_type *in, struct external_nlist *ext, bfd_size_type count, char *str, bfd_size_type strsize, - bfd_boolean dynamic) + bool dynamic) { struct external_nlist *ext_end; @@ -1716,7 +1716,7 @@ NAME (aout, translate_symbol_table) (bfd *abfd, (_("%pB: invalid string offset %" PRIu64 " >= %" PRIu64), abfd, (uint64_t) x, (uint64_t) strsize); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } in->symbol.value = GET_SWORD (abfd, ext->e_value); @@ -1726,20 +1726,20 @@ NAME (aout, translate_symbol_table) (bfd *abfd, in->symbol.udata.p = NULL; if (! translate_from_native_sym_flags (abfd, in)) - return FALSE; + return false; if (dynamic) in->symbol.flags |= BSF_DYNAMIC; } - return TRUE; + return true; } /* We read the symbols into a buffer, which is discarded when this function exits. We read the strings into a buffer large enough to hold them all plus all the cached symbol entries. */ -bfd_boolean +bool NAME (aout, slurp_symbol_table) (bfd *abfd) { struct external_nlist *old_external_syms; @@ -1748,21 +1748,21 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) /* If there's no work to be done, don't do any. */ if (obj_aout_symbols (abfd) != NULL) - return TRUE; + return true; old_external_syms = obj_aout_external_syms (abfd); if (! aout_get_external_symbols (abfd)) - return FALSE; + return false; cached_size = obj_aout_external_sym_count (abfd); if (cached_size == 0) - return TRUE; /* Nothing to do. */ + return true; /* Nothing to do. */ cached_size *= sizeof (aout_symbol_type); cached = (aout_symbol_type *) bfd_zmalloc (cached_size); if (cached == NULL) - return FALSE; + return false; /* Convert from external symbol information to internal. */ if (! (NAME (aout, translate_symbol_table) @@ -1771,10 +1771,10 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) obj_aout_external_sym_count (abfd), obj_aout_external_strings (abfd), obj_aout_external_string_size (abfd), - FALSE))) + false))) { free (cached); - return FALSE; + return false; } abfd->symcount = obj_aout_external_sym_count (abfd); @@ -1796,7 +1796,7 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) obj_aout_external_syms (abfd) = NULL; } - return TRUE; + return true; } /* We use a hash table when writing out symbols so that we only write @@ -1815,9 +1815,9 @@ static inline bfd_size_type add_to_stringtab (bfd *abfd, struct bfd_strtab_hash *tab, const char *str, - bfd_boolean copy) + bool copy) { - bfd_boolean hash; + bool hash; bfd_size_type str_index; /* An index of 0 always means the empty string. */ @@ -1826,9 +1826,9 @@ add_to_stringtab (bfd *abfd, /* Don't hash if BFD_TRADITIONAL_FORMAT is set, because SunOS dbx doesn't understand a hashed string table. */ - hash = TRUE; + hash = true; if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0) - hash = FALSE; + hash = false; str_index = _bfd_stringtab_add (tab, str, hash, copy); @@ -1843,7 +1843,7 @@ add_to_stringtab (bfd *abfd, /* Write out a strtab. ABFD is already at the right location in the file. */ -static bfd_boolean +static bool emit_stringtab (bfd *abfd, struct bfd_strtab_hash *tab) { bfd_byte buffer[BYTES_IN_WORD]; @@ -1852,12 +1852,12 @@ emit_stringtab (bfd *abfd, struct bfd_strtab_hash *tab) /* The string table starts with the size. */ PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer); if (bfd_bwrite ((void *) buffer, amt, abfd) != amt) - return FALSE; + return false; return _bfd_stringtab_emit (abfd, tab); } -bfd_boolean +bool NAME (aout, write_syms) (bfd *abfd) { unsigned int count ; @@ -1866,7 +1866,7 @@ NAME (aout, write_syms) (bfd *abfd) strtab = _bfd_stringtab_init (); if (strtab == NULL) - return FALSE; + return false; for (count = 0; count < bfd_get_symcount (abfd); count++) { @@ -1875,7 +1875,7 @@ NAME (aout, write_syms) (bfd *abfd) struct external_nlist nsp; size_t amt; - indx = add_to_stringtab (abfd, strtab, g->name, FALSE); + indx = add_to_stringtab (abfd, strtab, g->name, false); if (indx == (bfd_size_type) -1) goto error_return; PUT_WORD (abfd, indx, (bfd_byte *) nsp.e_strx); @@ -1910,11 +1910,11 @@ NAME (aout, write_syms) (bfd *abfd) _bfd_stringtab_free (strtab); - return TRUE; + return true; error_return: _bfd_stringtab_free (strtab); - return FALSE; + return false; } long @@ -2298,7 +2298,7 @@ NAME (aout, swap_std_reloc_in) (bfd *abfd, /* Read and swap the relocs for a section. */ -bfd_boolean +bool NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) { bfd_size_type count; @@ -2311,10 +2311,10 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) bfd_size_type amt; if (asect->relocation) - return TRUE; + return true; if (asect->flags & SEC_CONSTRUCTOR) - return TRUE; + return true; if (asect == obj_datasec (abfd)) reloc_size = exec_hdr (abfd)->a_drsize; @@ -2325,26 +2325,26 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) else { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } each_size = obj_reloc_entry_size (abfd); count = reloc_size / each_size; if (count == 0) - return TRUE; /* Nothing to be done. */ + return true; /* Nothing to be done. */ if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0) - return FALSE; + return false; relocs = _bfd_malloc_and_read (abfd, reloc_size, reloc_size); if (relocs == NULL) - return FALSE; + return false; amt = count * sizeof (arelent); reloc_cache = (arelent *) bfd_zmalloc (amt); if (reloc_cache == NULL) { free (relocs); - return FALSE; + return false; } cache_ptr = reloc_cache; @@ -2370,12 +2370,12 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) asect->relocation = reloc_cache; asect->reloc_count = cache_ptr - reloc_cache; - return TRUE; + return true; } /* Write out a relocation section into an object file. */ -bfd_boolean +bool NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) { arelent **generic; @@ -2386,13 +2386,13 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) bfd_size_type natsize; if (count == 0 || section->orelocation == NULL) - return TRUE; + return true; each_size = obj_reloc_entry_size (abfd); natsize = (bfd_size_type) each_size * count; native = (unsigned char *) bfd_zalloc (abfd, natsize); if (!native) - return FALSE; + return false; generic = section->orelocation; @@ -2411,7 +2411,7 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) bfd_set_error (bfd_error_invalid_operation); _bfd_error_handler (_("%pB: attempt to write out " "unknown reloc type"), abfd); - return FALSE; + return false; } MY_swap_ext_reloc_out (abfd, *generic, (struct reloc_ext_external *) natptr); @@ -2429,7 +2429,7 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) bfd_set_error (bfd_error_invalid_operation); _bfd_error_handler (_("%pB: attempt to write out " "unknown reloc type"), abfd); - return FALSE; + return false; } MY_swap_std_reloc_out (abfd, *generic, (struct reloc_std_external *) natptr); @@ -2439,11 +2439,11 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) if (bfd_bwrite ((void *) native, natsize, abfd) != natsize) { bfd_release (abfd, native); - return FALSE; + return false; } bfd_release (abfd, native); - return TRUE; + return true; } /* This is stupid. This function should be a boolean predicate. */ @@ -2613,7 +2613,7 @@ NAME (aout, print_symbol) (bfd *abfd, long NAME (aout, read_minisymbols) (bfd *abfd, - bfd_boolean dynamic, + bool dynamic, void * *minisymsp, unsigned int *sizep) { @@ -2646,7 +2646,7 @@ NAME (aout, read_minisymbols) (bfd *abfd, asymbol * NAME (aout, minisymbol_to_symbol) (bfd *abfd, - bfd_boolean dynamic, + bool dynamic, const void * minisym, asymbol *sym) { @@ -2664,7 +2664,7 @@ NAME (aout, minisymbol_to_symbol) (bfd *abfd, (bfd_size_type) 1, obj_aout_external_strings (abfd), obj_aout_external_string_size (abfd), - FALSE))) + false))) return NULL; return sym; @@ -2674,7 +2674,7 @@ NAME (aout, minisymbol_to_symbol) (bfd *abfd, and return the name of the source file and the line nearest to the wanted location. */ -bfd_boolean +bool NAME (aout, find_nearest_line) (bfd *abfd, asymbol **symbols, asection *section, @@ -2836,7 +2836,7 @@ NAME (aout, find_nearest_line) (bfd *abfd, buf = (char *) bfd_malloc (filelen + funclen + 3); adata (abfd).line_buf = buf; if (buf == NULL) - return FALSE; + return false; } if (main_file_name != NULL) @@ -2868,7 +2868,7 @@ NAME (aout, find_nearest_line) (bfd *abfd, { /* PR binutils/20892: In a corrupt input file func can be empty. */ * functionname_ptr = NULL; - return TRUE; + return true; } /* The caller expects a symbol name. We actually have a function name, without the leading underscore. Put the @@ -2887,7 +2887,7 @@ NAME (aout, find_nearest_line) (bfd *abfd, *functionname_ptr = buf; } - return TRUE; + return true; } int @@ -2900,14 +2900,14 @@ NAME (aout, sizeof_headers) (bfd *abfd, /* Free all information we have cached for this BFD. We can always read it again later if we need it. */ -bfd_boolean +bool NAME (aout, bfd_free_cached_info) (bfd *abfd) { asection *o; if (bfd_get_format (abfd) != bfd_object || abfd->tdata.aout_data == NULL) - return TRUE; + return true; #define BFCI_FREE(x) do { free (x); x = NULL; } while (0) BFCI_FREE (obj_aout_symbols (abfd)); @@ -2924,7 +2924,7 @@ NAME (aout, bfd_free_cached_info) (bfd *abfd) BFCI_FREE (o->relocation); #undef BFCI_FREE - return TRUE; + return true; } /* a.out link code. */ @@ -2953,7 +2953,7 @@ NAME (aout, link_hash_newfunc) (struct bfd_hash_entry *entry, if (ret) { /* Set local fields. */ - ret->written = FALSE; + ret->written = false; ret->indx = -1; } @@ -2962,7 +2962,7 @@ NAME (aout, link_hash_newfunc) (struct bfd_hash_entry *entry, /* Initialize an a.out link hash table. */ -bfd_boolean +bool NAME (aout, link_hash_table_init) (struct aout_link_hash_table *table, bfd *abfd, struct bfd_hash_entry *(*newfunc) @@ -2997,17 +2997,16 @@ NAME (aout, link_hash_table_create) (bfd *abfd) /* Add all symbols from an object file to the hash table. */ -static bfd_boolean +static bool aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean (*add_one_symbol) + bool (*add_one_symbol) (struct bfd_link_info *, bfd *, const char *, flagword, asection *, - bfd_vma, const char *, bfd_boolean, bfd_boolean, - struct bfd_link_hash_entry **); + bfd_vma, const char *, bool, bool, struct bfd_link_hash_entry **); struct external_nlist *syms; bfd_size_type sym_count; char *strings; - bfd_boolean copy; + bool copy; struct aout_link_hash_entry **sym_hash; struct external_nlist *p; struct external_nlist *pend; @@ -3017,19 +3016,19 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) sym_count = obj_aout_external_sym_count (abfd); strings = obj_aout_external_strings (abfd); if (info->keep_memory) - copy = FALSE; + copy = false; else - copy = TRUE; + copy = true; if (aout_backend_info (abfd)->add_dynamic_symbols != NULL) { if (! ((*aout_backend_info (abfd)->add_dynamic_symbols) (abfd, info, &syms, &sym_count, &strings))) - return FALSE; + return false; } if (sym_count == 0) - return TRUE; /* Nothing to do. */ + return true; /* Nothing to do. */ /* We keep a list of the linker hash table entries that correspond to particular symbols. We could just look them up in the hash @@ -3038,7 +3037,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) amt = sym_count * sizeof (struct aout_link_hash_entry *); sym_hash = (struct aout_link_hash_entry **) bfd_alloc (abfd, amt); if (sym_hash == NULL) - return FALSE; + return false; obj_aout_sym_hashes (abfd) = sym_hash; add_one_symbol = aout_backend_info (abfd)->add_one_symbol; @@ -3066,7 +3065,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) /* PR 19629: Corrupt binaries can contain illegal string offsets. */ if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd)) - return FALSE; + return false; name = strings + GET_WORD (abfd, p->e_strx); value = GET_WORD (abfd, p->e_value); flags = BSF_GLOBAL; @@ -3125,11 +3124,11 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) which this one really is. */ /* See PR 20925 for a reproducer. */ if (p + 1 >= pend) - return FALSE; + return false; ++p; /* PR 19629: Corrupt binaries can contain illegal string offsets. */ if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd)) - return FALSE; + return false; string = strings + GET_WORD (abfd, p->e_strx); section = bfd_ind_section_ptr; flags |= BSF_INDIRECT; @@ -3160,12 +3159,12 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) /* A warning symbol. The next symbol is the one to warn about. If there is no next symbol, just look away. */ if (p + 1 >= pend) - return TRUE; + return true; ++p; string = name; /* PR 19629: Corrupt binaries can contain illegal string offsets. */ if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd)) - return FALSE; + return false; name = strings + GET_WORD (abfd, p->e_strx); section = bfd_und_section_ptr; flags |= BSF_WARNING; @@ -3196,9 +3195,9 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } if (! ((*add_one_symbol) - (info, abfd, name, flags, section, value, string, copy, FALSE, + (info, abfd, name, flags, section, value, string, copy, false, (struct bfd_link_hash_entry **) sym_hash))) - return FALSE; + return false; /* Restrict the maximum alignment of a common symbol based on the architecture, since a.out has no way to represent @@ -3224,12 +3223,12 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) ++sym_hash; } - return TRUE; + return true; } /* Free up the internal symbols read from an a.out file. */ -static bfd_boolean +static bool aout_link_free_symbols (bfd *abfd) { if (obj_aout_external_syms (abfd) != NULL) @@ -3250,24 +3249,24 @@ aout_link_free_symbols (bfd *abfd) #endif obj_aout_external_strings (abfd) = NULL; } - return TRUE; + return true; } /* Add symbols from an a.out object file. */ -static bfd_boolean +static bool aout_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { if (! aout_get_external_symbols (abfd)) - return FALSE; + return false; if (! aout_link_add_symbols (abfd, info)) - return FALSE; + return false; if (! info->keep_memory) { if (! aout_link_free_symbols (abfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Look through the internal symbols to see if this object file should @@ -3277,17 +3276,17 @@ aout_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) known symbol but we do not include the object file in the link (unless there is some other reason to include it). */ -static bfd_boolean +static bool aout_link_check_ar_symbols (bfd *abfd, struct bfd_link_info *info, - bfd_boolean *pneeded, + bool *pneeded, bfd **subsbfd) { struct external_nlist *p; struct external_nlist *pend; char *strings; - *pneeded = FALSE; + *pneeded = false; /* Look through all the symbols. */ p = obj_aout_external_syms (abfd); @@ -3317,7 +3316,7 @@ aout_link_check_ar_symbols (bfd *abfd, } name = strings + GET_WORD (abfd, p->e_strx); - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, name, false, false, true); /* We are only interested in symbols that are currently undefined or common. */ @@ -3378,9 +3377,9 @@ aout_link_check_ar_symbols (bfd *abfd, if (!(*info->callbacks ->add_archive_element) (info, abfd, name, subsbfd)) - return FALSE; - *pneeded = TRUE; - return TRUE; + return false; + *pneeded = true; + return true; } if (type == (N_UNDF | N_EXT)) @@ -3406,9 +3405,9 @@ aout_link_check_ar_symbols (bfd *abfd, option in the linker. */ if (!(*info->callbacks ->add_archive_element) (info, abfd, name, subsbfd)) - return FALSE; - *pneeded = TRUE; - return TRUE; + return false; + *pneeded = true; + return true; } /* Turn the current link symbol into a common symbol. It is already on the undefs list. */ @@ -3417,7 +3416,7 @@ aout_link_check_ar_symbols (bfd *abfd, bfd_hash_allocate (&info->hash->table, sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) - return FALSE; + return false; h->u.c.size = value; @@ -3455,37 +3454,37 @@ aout_link_check_ar_symbols (bfd *abfd, { if (!(*info->callbacks ->add_archive_element) (info, abfd, name, subsbfd)) - return FALSE; - *pneeded = TRUE; - return TRUE; + return false; + *pneeded = true; + return true; } } } /* We do not need this object file. */ - return TRUE; + return true; } /* Check a single archive element to see if we need to include it in the link. *PNEEDED is set according to whether this element is needed in the link or not. This is called from _bfd_generic_link_add_archive_symbols. */ -static bfd_boolean +static bool aout_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded) + bool *pneeded) { bfd *oldbfd; - bfd_boolean needed; + bool needed; if (!aout_get_external_symbols (abfd)) - return FALSE; + return false; oldbfd = abfd; if (!aout_link_check_ar_symbols (abfd, info, pneeded, &abfd)) - return FALSE; + return false; needed = *pneeded; if (needed) @@ -3496,27 +3495,27 @@ aout_link_check_archive_element (bfd *abfd, { if (!info->keep_memory && !aout_link_free_symbols (oldbfd)) - return FALSE; + return false; if (!aout_get_external_symbols (abfd)) - return FALSE; + return false; } if (!aout_link_add_symbols (abfd, info)) - return FALSE; + return false; } if (!info->keep_memory || !needed) { if (!aout_link_free_symbols (abfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Given an a.out BFD, add symbols to the global hash table as appropriate. */ -bfd_boolean +bool NAME (aout, link_add_symbols) (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -3528,7 +3527,7 @@ NAME (aout, link_add_symbols) (bfd *abfd, struct bfd_link_info *info) (abfd, info, aout_link_check_archive_element); default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } @@ -3623,7 +3622,7 @@ aout_link_includes_newfunc (struct bfd_hash_entry *entry, /* Write out a symbol that was not associated with an a.out input object. */ -static bfd_boolean +static bool aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) { struct aout_link_hash_entry *h = (struct aout_link_hash_entry *) bh; @@ -3639,7 +3638,7 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) { h = (struct aout_link_hash_entry *) h->root.u.i.link; if (h->root.type == bfd_link_hash_new) - return TRUE; + return true; } output_bfd = flaginfo->output_bfd; @@ -3655,17 +3654,17 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) } if (h->written) - return TRUE; + return true; - h->written = TRUE; + h->written = true; /* An indx of -2 means the symbol must be written. */ if (h->indx != -2 && (flaginfo->info->strip == strip_all || (flaginfo->info->strip == strip_some && bfd_hash_lookup (flaginfo->info->keep_hash, h->root.root.string, - FALSE, FALSE) == NULL))) - return TRUE; + false, false) == NULL))) + return true; switch (h->root.type) { @@ -3673,11 +3672,11 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) case bfd_link_hash_warning: abort (); /* Avoid variable not initialized warnings. */ - return TRUE; + return true; case bfd_link_hash_new: /* This can happen for set symbols when sets are not being built. */ - return TRUE; + return true; case bfd_link_hash_undefined: type = N_UNDF | N_EXT; val = 0; @@ -3715,14 +3714,14 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) case bfd_link_hash_indirect: /* We ignore these symbols, since the indirected symbol is already in the hash table. */ - return TRUE; + return true; } H_PUT_8 (output_bfd, type, outsym.e_type); H_PUT_8 (output_bfd, 0, outsym.e_other); H_PUT_16 (output_bfd, 0, outsym.e_desc); indx = add_to_stringtab (output_bfd, flaginfo->strtab, h->root.root.string, - FALSE); + false); if (indx == - (bfd_size_type) 1) /* FIXME: No way to handle errors. */ abort (); @@ -3740,12 +3739,12 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) h->indx = obj_aout_external_sym_count (output_bfd); ++obj_aout_external_sym_count (output_bfd); - return TRUE; + return true; } /* Handle a link order which is supposed to generate a reloc. */ -static bfd_boolean +static bool aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, asection *o, struct bfd_link_order *p) @@ -3781,7 +3780,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, r_extern = 1; h = ((struct aout_link_hash_entry *) bfd_wrapped_link_hash_lookup (flaginfo->output_bfd, flaginfo->info, - pr->u.name, FALSE, FALSE, TRUE)); + pr->u.name, false, false, true)); if (h != NULL && h->indx >= 0) r_index = h->indx; @@ -3792,9 +3791,9 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, here. I don't think that will ever matter for a global symbol. */ h->indx = -2; - h->written = FALSE; + h->written = false; if (!aout_link_write_other_symbol (&h->root.root, flaginfo)) - return FALSE; + return false; r_index = h->indx; } else @@ -3809,7 +3808,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, if (howto == 0) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (o == obj_textsec (flaginfo->output_bfd)) @@ -3882,12 +3881,12 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, bfd_size_type size; bfd_reloc_status_type r; bfd_byte *buf; - bfd_boolean ok; + bool ok; size = bfd_get_reloc_size (howto); buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL && size != 0) - return FALSE; + return false; r = MY_relocate_contents (howto, flaginfo->output_bfd, (bfd_vma) pr->addend, buf); switch (r) @@ -3910,7 +3909,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, (file_ptr) p->offset, size); free (buf); if (! ok) - return FALSE; + return false; } } else @@ -3949,7 +3948,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, amt = obj_reloc_entry_size (flaginfo->output_bfd); if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0 || bfd_bwrite (rel_ptr, amt, flaginfo->output_bfd) != amt) - return FALSE; + return false; *reloff_ptr += obj_reloc_entry_size (flaginfo->output_bfd); @@ -3960,7 +3959,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, || (*reloff_ptr <= obj_datasec (flaginfo->output_bfd)->rel_filepos))); - return TRUE; + return true; } /* Get the section corresponding to a reloc index. */ @@ -3982,7 +3981,7 @@ aout_reloc_index_to_section (bfd *abfd, int indx) /* Relocate an a.out section using standard a.out relocs. */ -static bfd_boolean +static bool aout_link_input_section_std (struct aout_final_link_info *flaginfo, bfd *input_bfd, asection *input_section, @@ -3990,12 +3989,11 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, bfd_size_type rel_size, bfd_byte *contents) { - bfd_boolean (*check_dynamic_reloc) + bool (*check_dynamic_reloc) (struct bfd_link_info *, bfd *, asection *, - struct aout_link_hash_entry *, void *, bfd_byte *, bfd_boolean *, - bfd_vma *); + struct aout_link_hash_entry *, void *, bfd_byte *, bool *, bfd_vma *); bfd *output_bfd; - bfd_boolean relocatable; + bool relocatable; struct external_nlist *syms; char *strings; struct aout_link_hash_entry **sym_hashes; @@ -4087,7 +4085,7 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, _bfd_error_handler (_("%pB: unsupported relocation type"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (relocatable) @@ -4147,10 +4145,10 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, if (h->indx < 0) { h->indx = -2; - h->written = FALSE; + h->written = false; if (!aout_link_write_other_symbol (&h->root.root, flaginfo)) - return FALSE; + return false; } r_index = h->indx; } @@ -4222,11 +4220,11 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, } else { - bfd_boolean hundef; + bool hundef; /* We are generating an executable, and must do a full relocation. */ - hundef = FALSE; + hundef = false; if (r_extern) { @@ -4245,7 +4243,7 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, relocation = 0; else { - hundef = TRUE; + hundef = true; relocation = 0; } } @@ -4263,12 +4261,12 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, if (check_dynamic_reloc != NULL) { - bfd_boolean skip; + bool skip; if (! ((*check_dynamic_reloc) (flaginfo->info, input_bfd, input_section, h, (void *) rel, contents, &skip, &relocation))) - return FALSE; + return false; if (skip) continue; } @@ -4285,7 +4283,7 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, else name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); (*flaginfo->info->callbacks->undefined_symbol) - (flaginfo->info, name, input_bfd, input_section, r_addr, TRUE); + (flaginfo->info, name, input_bfd, input_section, r_addr, true); } r = MY_final_link_relocate (howto, @@ -4326,12 +4324,12 @@ aout_link_input_section_std (struct aout_final_link_info *flaginfo, } } - return TRUE; + return true; } /* Relocate an a.out section using extended a.out relocs. */ -static bfd_boolean +static bool aout_link_input_section_ext (struct aout_final_link_info *flaginfo, bfd *input_bfd, asection *input_section, @@ -4339,12 +4337,11 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, bfd_size_type rel_size, bfd_byte *contents) { - bfd_boolean (*check_dynamic_reloc) + bool (*check_dynamic_reloc) (struct bfd_link_info *, bfd *, asection *, - struct aout_link_hash_entry *, void *, bfd_byte *, bfd_boolean *, - bfd_vma *); + struct aout_link_hash_entry *, void *, bfd_byte *, bool *, bfd_vma *); bfd *output_bfd; - bfd_boolean relocatable; + bool relocatable; struct external_nlist *syms; char *strings; struct aout_link_hash_entry **sym_hashes; @@ -4408,7 +4405,7 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (relocatable) @@ -4484,10 +4481,10 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, if (h->indx < 0) { h->indx = -2; - h->written = FALSE; + h->written = false; if (!aout_link_write_other_symbol (&h->root.root, flaginfo)) - return FALSE; + return false; } r_index = h->indx; } @@ -4564,12 +4561,12 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, } else { - bfd_boolean hundef; + bool hundef; bfd_reloc_status_type r; /* We are generating an executable, and must do a full relocation. */ - hundef = FALSE; + hundef = false; if (r_extern) { @@ -4588,7 +4585,7 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, relocation = 0; else { - hundef = TRUE; + hundef = true; relocation = 0; } } @@ -4661,12 +4658,12 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, if (check_dynamic_reloc != NULL) { - bfd_boolean skip; + bool skip; if (! ((*check_dynamic_reloc) (flaginfo->info, input_bfd, input_section, h, (void *) rel, contents, &skip, &relocation))) - return FALSE; + return false; if (skip) continue; } @@ -4687,7 +4684,7 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, else name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); (*flaginfo->info->callbacks->undefined_symbol) - (flaginfo->info, name, input_bfd, input_section, r_addr, TRUE); + (flaginfo->info, name, input_bfd, input_section, r_addr, true); } if (r_type != (unsigned int) RELOC_SPARC_REV32) @@ -4742,12 +4739,12 @@ aout_link_input_section_ext (struct aout_final_link_info *flaginfo, } } - return TRUE; + return true; } /* Link an a.out section into the output file. */ -static bfd_boolean +static bool aout_link_input_section (struct aout_final_link_info *flaginfo, bfd *input_bfd, asection *input_section, @@ -4762,7 +4759,7 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, if (! bfd_get_section_contents (input_bfd, input_section, (void *) flaginfo->contents, (file_ptr) 0, input_size)) - return FALSE; + return false; /* Read in the relocs if we haven't already done it. */ if (aout_section_data (input_section) != NULL @@ -4775,7 +4772,7 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, { if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 || bfd_bread (relocs, rel_size, input_bfd) != rel_size) - return FALSE; + return false; } } @@ -4785,14 +4782,14 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, if (! aout_link_input_section_std (flaginfo, input_bfd, input_section, (struct reloc_std_external *) relocs, rel_size, flaginfo->contents)) - return FALSE; + return false; } else { if (! aout_link_input_section_ext (flaginfo, input_bfd, input_section, (struct reloc_ext_external *) relocs, rel_size, flaginfo->contents)) - return FALSE; + return false; } /* Write out the section contents. */ @@ -4801,16 +4798,16 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, (void *) flaginfo->contents, (file_ptr) input_section->output_offset, input_size)) - return FALSE; + return false; /* If we are producing relocatable output, the relocs were modified, and we now write them out. */ if (bfd_link_relocatable (flaginfo->info) && rel_size > 0) { if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bwrite (relocs, rel_size, flaginfo->output_bfd) != rel_size) - return FALSE; + return false; *reloff_ptr += rel_size; /* Assert that the relocs have not run into the symbols, and @@ -4822,13 +4819,13 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, <= obj_datasec (flaginfo->output_bfd)->rel_filepos))); } - return TRUE; + return true; } /* Adjust and write out the symbols for an a.out file. Set the new symbol indices into a symbol_map. */ -static bfd_boolean +static bool aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) { bfd *output_bfd; @@ -4842,8 +4839,8 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) struct external_nlist *sym_end; struct aout_link_hash_entry **sym_hash; int *symbol_map; - bfd_boolean pass; - bfd_boolean skip_next; + bool pass; + bool skip_next; output_bfd = flaginfo->output_bfd; sym_count = obj_aout_external_sym_count (input_bfd); @@ -4858,16 +4855,16 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) && (strip != strip_some || bfd_hash_lookup (flaginfo->info->keep_hash, bfd_get_filename (input_bfd), - FALSE, FALSE) != NULL) + false, false) != NULL) && discard != discard_all) { H_PUT_8 (output_bfd, N_TEXT, outsym->e_type); H_PUT_8 (output_bfd, 0, outsym->e_other); H_PUT_16 (output_bfd, 0, outsym->e_desc); strtab_index = add_to_stringtab (output_bfd, flaginfo->strtab, - bfd_get_filename (input_bfd), FALSE); + bfd_get_filename (input_bfd), false); if (strtab_index == (bfd_size_type) -1) - return FALSE; + return false; PUT_WORD (output_bfd, strtab_index, outsym->e_strx); PUT_WORD (output_bfd, (bfd_section_vma (obj_textsec (input_bfd)->output_section) @@ -4877,8 +4874,8 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) ++outsym; } - pass = FALSE; - skip_next = FALSE; + pass = false; + skip_next = false; sym = obj_aout_external_syms (input_bfd); sym_end = sym + sym_count; sym_hash = obj_aout_sym_hashes (input_bfd); @@ -4889,10 +4886,10 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) const char *name; int type; struct aout_link_hash_entry *h; - bfd_boolean skip; + bool skip; asection *symsec; bfd_vma val = 0; - bfd_boolean copy; + bool copy; /* We set *symbol_map to 0 above for all symbols. If it has already been set to -1 for this symbol, it means that we are @@ -4916,14 +4913,14 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) /* Pass this symbol through. It is the target of an indirect or warning symbol. */ val = GET_WORD (input_bfd, sym->e_value); - pass = FALSE; + pass = false; } else if (skip_next) { /* Skip this symbol, which is the target of an indirect symbol that we have changed to no longer be an indirect symbol. */ - skip_next = FALSE; + skip_next = false; continue; } else @@ -4965,34 +4962,34 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) { if ((type & N_TYPE) == N_INDR || type == N_WARNING) - skip_next = TRUE; + skip_next = true; *symbol_map = h->indx; continue; } /* See if we are stripping this symbol. */ - skip = FALSE; + skip = false; switch (strip) { case strip_none: break; case strip_debugger: if ((type & N_STAB) != 0) - skip = TRUE; + skip = true; break; case strip_some: - if (bfd_hash_lookup (flaginfo->info->keep_hash, name, FALSE, FALSE) + if (bfd_hash_lookup (flaginfo->info->keep_hash, name, false, false) == NULL) - skip = TRUE; + skip = true; break; case strip_all: - skip = TRUE; + skip = true; break; } if (skip) { if (h != NULL) - h->written = TRUE; + h->written = true; continue; } @@ -5021,7 +5018,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) the indirect symbol was defined, we output it with the correct definition so the debugger will understand it. */ - pass = TRUE; + pass = true; val = GET_WORD (input_bfd, sym->e_value); symsec = NULL; } @@ -5037,7 +5034,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) a case we do not want to output the next symbol, which is the target of the indirection. */ if ((type & N_TYPE) == N_INDR) - skip_next = TRUE; + skip_next = true; symsec = NULL; @@ -5129,7 +5126,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) it is a local symbol see if we should discard it. */ if (h != NULL) { - h->written = TRUE; + h->written = true; h->indx = obj_aout_external_sym_count (output_bfd); } else if ((type & N_TYPE) != N_SETT @@ -5145,15 +5142,15 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) case discard_l: if ((type & N_STAB) == 0 && bfd_is_local_label_name (input_bfd, name)) - skip = TRUE; + skip = true; break; case discard_all: - skip = TRUE; + skip = true; break; } if (skip) { - pass = FALSE; + pass = false; continue; } } @@ -5211,9 +5208,9 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) symbol. */ copy = !flaginfo->info->keep_memory; incl_entry = aout_link_includes_lookup (&flaginfo->includes, - name, TRUE, copy); + name, true, copy); if (incl_entry == NULL) - return FALSE; + return false; for (t = incl_entry->totals; t != NULL; t = t->next) if (t->total == val) break; @@ -5225,7 +5222,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) bfd_hash_allocate (&flaginfo->includes.root, sizeof *t); if (t == NULL) - return FALSE; + return false; t->total = val; t->next = incl_entry->totals; incl_entry->totals = t; @@ -5270,7 +5267,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) H_PUT_8 (output_bfd, type, outsym->e_type); H_PUT_8 (output_bfd, H_GET_8 (input_bfd, sym->e_other), outsym->e_other); H_PUT_16 (output_bfd, H_GET_16 (input_bfd, sym->e_desc), outsym->e_desc); - copy = FALSE; + copy = false; if (! flaginfo->info->keep_memory) { /* name points into a string table which we are going to @@ -5279,12 +5276,12 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) if (h != NULL) name = h->root.root.string; else - copy = TRUE; + copy = true; } strtab_index = add_to_stringtab (output_bfd, flaginfo->strtab, name, copy); if (strtab_index == (bfd_size_type) -1) - return FALSE; + return false; PUT_WORD (output_bfd, strtab_index, outsym->e_strx); PUT_WORD (output_bfd, val, outsym->e_value); *symbol_map = obj_aout_external_sym_count (output_bfd); @@ -5298,21 +5295,21 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) bfd_size_type outsym_size; if (bfd_seek (output_bfd, flaginfo->symoff, SEEK_SET) != 0) - return FALSE; + return false; outsym_size = outsym - flaginfo->output_syms; outsym_size *= EXTERNAL_NLIST_SIZE; if (bfd_bwrite ((void *) flaginfo->output_syms, outsym_size, output_bfd) != outsym_size) - return FALSE; + return false; flaginfo->symoff += outsym_size; } - return TRUE; + return true; } /* Link an a.out input BFD into the output file. */ -static bfd_boolean +static bool aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) { BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object); @@ -5326,12 +5323,12 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) /* Get the symbols. We probably have them already, unless flaginfo->info->keep_memory is FALSE. */ if (! aout_get_external_symbols (input_bfd)) - return FALSE; + return false; /* Write out the symbols and get a map of the new indices. The map is placed into flaginfo->symbol_map. */ if (! aout_link_write_symbols (flaginfo, input_bfd)) - return FALSE; + return false; /* Relocate and write out the sections. These functions use the symbol map created by aout_link_write_symbols. The linker_mark @@ -5343,7 +5340,7 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) obj_textsec (input_bfd), &flaginfo->treloff, exec_hdr (input_bfd)->a_trsize)) - return FALSE; + return false; } if (obj_datasec (input_bfd)->linker_mark) { @@ -5351,7 +5348,7 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) obj_datasec (input_bfd), &flaginfo->dreloff, exec_hdr (input_bfd)->a_drsize)) - return FALSE; + return false; } /* If we are not keeping memory, we don't need the symbols any @@ -5360,10 +5357,10 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) if (! flaginfo->info->keep_memory) { if (! aout_link_free_symbols (input_bfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Do the final link step. This is called on the output BFD. The @@ -5373,13 +5370,13 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) of bfd_link_order structures which list all the input sections for the output section. */ -bfd_boolean +bool NAME (aout, final_link) (bfd *abfd, struct bfd_link_info *info, void (*callback) (bfd *, file_ptr *, file_ptr *, file_ptr *)) { struct aout_final_link_info aout_info; - bfd_boolean includes_hash_initialized = FALSE; + bool includes_hash_initialized = false; bfd *sub; bfd_size_type trsize, drsize; bfd_size_type max_contents_size; @@ -5387,7 +5384,7 @@ NAME (aout, final_link) (bfd *abfd, bfd_size_type max_sym_count; struct bfd_link_order *p; asection *o; - bfd_boolean have_link_order_relocs; + bool have_link_order_relocs; if (bfd_link_pic (info)) abfd->flags |= DYNAMIC; @@ -5404,7 +5401,7 @@ NAME (aout, final_link) (bfd *abfd, sizeof (struct aout_link_includes_entry), 251)) goto error_return; - includes_hash_initialized = TRUE; + includes_hash_initialized = true; /* Figure out the largest section size. Also, if generating relocatable output, count the relocs. */ @@ -5525,7 +5522,7 @@ NAME (aout, final_link) (bfd *abfd, struct aout_link_hash_entry *h; h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC", - FALSE, FALSE, FALSE); + false, false, false); if (h != NULL) aout_link_write_other_symbol (&h->root.root, &aout_info); } @@ -5552,7 +5549,7 @@ NAME (aout, final_link) (bfd *abfd, We use the output_has_begun field of the input BFDs to see whether we have already handled it. */ for (sub = info->input_bfds; sub != NULL; sub = sub->link.next) - sub->output_has_begun = FALSE; + sub->output_has_begun = false; /* Mark all sections which are to be included in the link. This will normally be every section. We need to do this so that we @@ -5562,10 +5559,10 @@ NAME (aout, final_link) (bfd *abfd, { for (p = o->map_head.link_order; p != NULL; p = p->next) if (p->type == bfd_indirect_link_order) - p->u.indirect.section->linker_mark = TRUE; + p->u.indirect.section->linker_mark = true; } - have_link_order_relocs = FALSE; + have_link_order_relocs = false; for (o = abfd->sections; o != NULL; o = o->next) { for (p = o->map_head.link_order; @@ -5583,14 +5580,14 @@ NAME (aout, final_link) (bfd *abfd, { if (! aout_link_input_bfd (&aout_info, input_bfd)) goto error_return; - input_bfd->output_has_begun = TRUE; + input_bfd->output_has_begun = true; } } else if (p->type == bfd_section_reloc_link_order || p->type == bfd_symbol_reloc_link_order) { /* These are handled below. */ - have_link_order_relocs = TRUE; + have_link_order_relocs = true; } else { @@ -5639,7 +5636,7 @@ NAME (aout, final_link) (bfd *abfd, if (includes_hash_initialized) { bfd_hash_table_free (&aout_info.includes.root); - includes_hash_initialized = FALSE; + includes_hash_initialized = false; } /* Finish up any dynamic linking we may be doing. */ @@ -5675,7 +5672,7 @@ NAME (aout, final_link) (bfd *abfd, goto error_return; } - return TRUE; + return true; error_return: free (aout_info.contents); @@ -5684,5 +5681,5 @@ NAME (aout, final_link) (bfd *abfd, free (aout_info.output_syms); if (includes_hash_initialized) bfd_hash_table_free (&aout_info.includes.root); - return FALSE; + return false; } diff --git a/bfd/arc-got.h b/bfd/arc-got.h index ed5eb3b4f3..76fc761a8c 100644 --- a/bfd/arc-got.h +++ b/bfd/arc-got.h @@ -49,8 +49,8 @@ struct got_entry struct got_entry *next; enum tls_type_e type; bfd_vma offset; - bfd_boolean processed; - bfd_boolean created_dyn_relocation; + bool processed; + bool created_dyn_relocation; enum tls_got_entries existing_entries; }; @@ -114,8 +114,8 @@ new_got_entry_to_list (struct got_entry **list, entry->type = type; entry->offset = offset; entry->next = NULL; - entry->processed = FALSE; - entry->created_dyn_relocation = FALSE; + entry->processed = false; + entry->created_dyn_relocation = false; entry->existing_entries = existing_entries; ARC_DEBUG ("New GOT got entry added to list: " @@ -210,11 +210,11 @@ arc_got_entry_type_for_reloc (reloc_howto_type *howto) if (H) \ if (H->dynindx == -1 && !H->forced_local) \ if (! bfd_elf_link_record_dynamic_symbol (info, H)) \ - return FALSE; \ + return false; \ htab->s##SECNAME->size += 4; \ } \ -static bfd_boolean +static bool arc_fill_got_info_for_reloc (enum tls_type_e type, struct got_entry **list, struct bfd_link_info * info, @@ -223,7 +223,7 @@ arc_fill_got_info_for_reloc (enum tls_type_e type, struct elf_link_hash_table *htab = elf_hash_table (info); if (got_entry_for_type (list, type) != NULL) - return TRUE; + return true; switch (type) { @@ -240,9 +240,9 @@ arc_fill_got_info_for_reloc (enum tls_type_e type, case GOT_TLS_GD: { bfd_vma offset - = ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h); + = ADD_SYMBOL_REF_SEC_AND_RELOC (got, true, h); bfd_vma ATTRIBUTE_UNUSED notneeded - = ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h); + = ADD_SYMBOL_REF_SEC_AND_RELOC (got, true, h); new_got_entry_to_list (list, type, offset, TLS_GOT_MOD_AND_OFF); } break; @@ -250,16 +250,16 @@ arc_fill_got_info_for_reloc (enum tls_type_e type, case GOT_TLS_LE: { bfd_vma offset - = ADD_SYMBOL_REF_SEC_AND_RELOC (got, TRUE, h); + = ADD_SYMBOL_REF_SEC_AND_RELOC (got, true, h); new_got_entry_to_list (list, type, offset, TLS_GOT_OFF); } break; default: - return FALSE; + return false; break; } - return TRUE; + return true; } @@ -284,7 +284,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p, BFD_ASSERT (entry); if (h == NULL - || h->forced_local == TRUE + || h->forced_local == true || (! elf_hash_table (info)->dynamic_sections_created || (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h)))) @@ -425,7 +425,7 @@ relocate_fix_got_relocs_for_got_info (struct got_entry ** list_p, BFD_ASSERT (0); break; } - entry->processed = TRUE; + entry->processed = true; } } @@ -460,7 +460,7 @@ create_got_dynrelocs_for_single_entry (struct got_entry *list, { ADD_RELA (output_bfd, got, got_offset, h->dynindx, R_ARC_GLOB_DAT, 0); } - list->created_dyn_relocation = TRUE; + list->created_dyn_relocation = true; } else if (list->existing_entries != TLS_GOT_NONE && !list->created_dyn_relocation) @@ -515,7 +515,7 @@ GOT_OFFSET = %#lx, GOT_VMA = %#lx, INDEX = %ld, ADDEND = %#lx\n", + htab->sgot->output_offset + got_offset), (long) dynindx, (long) addend); } - list->created_dyn_relocation = TRUE; + list->created_dyn_relocation = true; } } diff --git a/bfd/archive.c b/bfd/archive.c index 2a9ca56b65..2f3a1d4194 100644 --- a/bfd/archive.c +++ b/bfd/archive.c @@ -186,7 +186,7 @@ _bfd_ar_spacepad (char *p, size_t n, const char *fmt, long val) memcpy (p, buf, n); } -bfd_boolean +bool _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size) { char buf[21]; @@ -197,7 +197,7 @@ _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size) if (len > n) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } if (len < n) { @@ -206,17 +206,17 @@ _bfd_ar_sizepad (char *p, size_t n, bfd_size_type size) } else memcpy (p, buf, n); - return TRUE; + return true; } -bfd_boolean +bool _bfd_generic_mkarchive (bfd *abfd) { size_t amt = sizeof (struct artdata); abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt); if (bfd_ardata (abfd) == NULL) - return FALSE; + return false; /* Already cleared by bfd_zalloc above. bfd_ardata (abfd)->cache = NULL; @@ -226,7 +226,7 @@ _bfd_generic_mkarchive (bfd *abfd) bfd_ardata (abfd)->extended_names_size = 0; bfd_ardata (abfd)->tdata = NULL; */ - return TRUE; + return true; } /* @@ -284,18 +284,18 @@ FUNCTION bfd_set_archive_head SYNOPSIS - bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head); + bool bfd_set_archive_head (bfd *output, bfd *new_head); DESCRIPTION Set the head of the chain of BFDs contained in the archive @var{output} to @var{new_head}. */ -bfd_boolean +bool bfd_set_archive_head (bfd *output_archive, bfd *new_head) { output_archive->archive_head = new_head; - return TRUE; + return true; } bfd * @@ -349,7 +349,7 @@ _bfd_calloc_wrapper (size_t a, size_t b) /* Kind of stupid to call cons for each one, but we don't do too many. */ -bfd_boolean +bool _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt) { struct ar_cache *cache; @@ -361,7 +361,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt) hash_table = htab_create_alloc (16, hash_file_ptr, eq_file_ptr, NULL, _bfd_calloc_wrapper, free); if (hash_table == NULL) - return FALSE; + return false; bfd_ardata (arch_bfd)->cache = hash_table; } @@ -375,7 +375,7 @@ _bfd_add_bfd_to_archive_cache (bfd *arch_bfd, file_ptr filepos, bfd *new_elt) arch_eltdata (new_elt)->parent_cache = hash_table; arch_eltdata (new_elt)->key = filepos; - return TRUE; + return true; } static bfd * @@ -924,7 +924,7 @@ bfd_generic_archive_p (bfd *abfd) abfd->no_element_cache = save; if (first != NULL) { - first->target_defaulted = FALSE; + first->target_defaulted = false; if (bfd_check_format (first, bfd_object) && first->xvec != abfd->xvec) bfd_set_error (bfd_error_wrong_object_format); @@ -955,7 +955,7 @@ bfd_generic_archive_p (bfd *abfd) /* Read a BSD-style archive symbol table. Returns FALSE on error, TRUE otherwise. */ -static bfd_boolean +static bool do_slurp_bsd_armap (bfd *abfd) { struct areltdata *mapdata; @@ -969,7 +969,7 @@ do_slurp_bsd_armap (bfd *abfd) mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (mapdata == NULL) - return FALSE; + return false; parsed_size = mapdata->parsed_size; free (mapdata); /* PR 17512: file: 883ff754. */ @@ -977,12 +977,12 @@ do_slurp_bsd_armap (bfd *abfd) if (parsed_size < BSD_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } raw_armap = (bfd_byte *) _bfd_alloc_and_read (abfd, parsed_size, parsed_size); if (raw_armap == NULL) - return FALSE; + return false; parsed_size -= BSD_SYMDEF_COUNT_SIZE + BSD_STRING_COUNT_SIZE; amt = H_GET_32 (abfd, raw_armap); @@ -1028,20 +1028,20 @@ do_slurp_bsd_armap (bfd *abfd) /* FIXME, we should provide some way to free raw_ardata when we are done using the strings from it. For now, it seems to be allocated on an objalloc anyway... */ - abfd->has_armap = TRUE; - return TRUE; + abfd->has_armap = true; + return true; release_armap: ardata->symdef_count = 0; ardata->symdefs = NULL; bfd_release (abfd, raw_armap); - return FALSE; + return false; } /* Read a COFF archive symbol table. Returns FALSE on error, TRUE otherwise. */ -static bfd_boolean +static bool do_slurp_coff_armap (bfd *abfd) { struct areltdata *mapdata; @@ -1060,12 +1060,12 @@ do_slurp_coff_armap (bfd *abfd) mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (mapdata == NULL) - return FALSE; + return false; parsed_size = mapdata->parsed_size; free (mapdata); if (bfd_bread (int_buf, 4, abfd) != 4) - return FALSE; + return false; /* It seems that all numeric information in a coff archive is always in big endian format, no matter the host or target. */ @@ -1078,7 +1078,7 @@ do_slurp_coff_armap (bfd *abfd) if (_bfd_mul_overflow (nsymz, sizeof (carsym), &carsym_size)) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } filesize = bfd_get_file_size (abfd); @@ -1088,7 +1088,7 @@ do_slurp_coff_armap (bfd *abfd) || parsed_size - 4 < ptrsize) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } stringsize = parsed_size - ptrsize - 4; @@ -1096,13 +1096,13 @@ do_slurp_coff_armap (bfd *abfd) if (carsym_size + stringsize + 1 <= carsym_size) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } /* Allocate and read in the raw offsets. */ raw_armap = (int *) _bfd_malloc_and_read (abfd, ptrsize, ptrsize); if (raw_armap == NULL) - return FALSE; + return false; ardata->symdefs = (struct carsym *) bfd_alloc (abfd, carsym_size + stringsize + 1); @@ -1135,7 +1135,7 @@ do_slurp_coff_armap (bfd *abfd) if (bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET) != 0) goto release_symdefs; - abfd->has_armap = TRUE; + abfd->has_armap = true; free (raw_armap); /* Check for a second archive header (as used by PE). */ @@ -1149,31 +1149,31 @@ do_slurp_coff_armap (bfd *abfd) free (tmp); } - return TRUE; + return true; release_symdefs: bfd_release (abfd, (ardata)->symdefs); free_armap: free (raw_armap); - return FALSE; + return false; } /* This routine can handle either coff-style or bsd-style armaps (archive symbol table). Returns FALSE on error, TRUE otherwise */ -bfd_boolean +bool bfd_slurp_armap (bfd *abfd) { char nextname[17]; int i = bfd_bread (nextname, 16, abfd); if (i == 0) - return TRUE; + return true; if (i != 16) - return FALSE; + return false; if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) - return FALSE; + return false; if (startswith (nextname, "__.SYMDEF ") || startswith (nextname, "__.SYMDEF/ ")) /* Old Linux archives. */ @@ -1187,7 +1187,7 @@ bfd_slurp_armap (bfd *abfd) return _bfd_archive_64_bit_slurp_armap (abfd); #else bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; #endif } else if (startswith (nextname, "#1/20 ")) @@ -1199,20 +1199,20 @@ bfd_slurp_armap (bfd *abfd) char extname[21]; if (bfd_bread (&hdr, sizeof (hdr), abfd) != sizeof (hdr)) - return FALSE; + return false; /* Read the extended name. We know its length. */ if (bfd_bread (extname, 20, abfd) != 20) - return FALSE; + return false; if (bfd_seek (abfd, -(file_ptr) (sizeof (hdr) + 20), SEEK_CUR) != 0) - return FALSE; + return false; extname[20] = 0; if (startswith (extname, "__.SYMDEF SORTED") || startswith (extname, "__.SYMDEF")) return do_slurp_bsd_armap (abfd); } - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } /** Extended name table. @@ -1227,7 +1227,7 @@ bfd_slurp_armap (bfd *abfd) /* Returns FALSE on error, TRUE otherwise. */ -bfd_boolean +bool _bfd_slurp_extended_name_table (bfd *abfd) { char nextname[17]; @@ -1235,7 +1235,7 @@ _bfd_slurp_extended_name_table (bfd *abfd) /* FIXME: Formatting sucks here, and in case of failure of BFD_READ, we probably don't want to return TRUE. */ if (bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bread (nextname, 16, abfd) == 16) { @@ -1244,19 +1244,19 @@ _bfd_slurp_extended_name_table (bfd *abfd) ufile_ptr filesize; if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) - return FALSE; + return false; if (! startswith (nextname, "ARFILENAMES/ ") && ! startswith (nextname, "// ")) { bfd_ardata (abfd)->extended_names = NULL; bfd_ardata (abfd)->extended_names_size = 0; - return TRUE; + return true; } namedata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (namedata == NULL) - return FALSE; + return false; filesize = bfd_get_file_size (abfd); amt = namedata->parsed_size; @@ -1274,7 +1274,7 @@ _bfd_slurp_extended_name_table (bfd *abfd) free (namedata); bfd_ardata (abfd)->extended_names = NULL; bfd_ardata (abfd)->extended_names_size = 0; - return FALSE; + return false; } if (bfd_bread (bfd_ardata (abfd)->extended_names, amt, abfd) != amt) @@ -1314,7 +1314,7 @@ _bfd_slurp_extended_name_table (bfd *abfd) free (namedata); } - return TRUE; + return true; } #ifdef VMS @@ -1497,35 +1497,35 @@ adjust_relative_path (const char * path, const char * ref_path) /* Build a BFD style extended name table. */ -bfd_boolean +bool _bfd_archive_bsd_construct_extended_name_table (bfd *abfd, char **tabloc, bfd_size_type *tablen, const char **name) { *name = "ARFILENAMES/"; - return _bfd_construct_extended_name_table (abfd, FALSE, tabloc, tablen); + return _bfd_construct_extended_name_table (abfd, false, tabloc, tablen); } /* Build an SVR4 style extended name table. */ -bfd_boolean +bool _bfd_archive_coff_construct_extended_name_table (bfd *abfd, char **tabloc, bfd_size_type *tablen, const char **name) { *name = "//"; - return _bfd_construct_extended_name_table (abfd, TRUE, tabloc, tablen); + return _bfd_construct_extended_name_table (abfd, true, tabloc, tablen); } -bfd_boolean +bool _bfd_noarchive_construct_extended_name_table (bfd *abfd ATTRIBUTE_UNUSED, char **tabloc ATTRIBUTE_UNUSED, bfd_size_type *len ATTRIBUTE_UNUSED, const char **name ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Follows archive_head and produces an extended name table if @@ -1536,9 +1536,9 @@ _bfd_noarchive_construct_extended_name_table (bfd *abfd ATTRIBUTE_UNUSED, something went wrong. A successful return may still involve a zero-length tablen! */ -bfd_boolean +bool _bfd_construct_extended_name_table (bfd *abfd, - bfd_boolean trailing_slash, + bool trailing_slash, char **tabloc, bfd_size_type *tablen) { @@ -1598,7 +1598,7 @@ _bfd_construct_extended_name_table (bfd *abfd, normal = normalize (abfd, bfd_get_filename (current)); if (normal == NULL) - return FALSE; + return false; thislen = strlen (normal); @@ -1634,11 +1634,11 @@ _bfd_construct_extended_name_table (bfd *abfd, } if (total_namelen == 0) - return TRUE; + return true; *tabloc = (char *) bfd_alloc (abfd, total_namelen); if (*tabloc == NULL) - return FALSE; + return false; *tablen = total_namelen; strptr = *tabloc; @@ -1679,7 +1679,7 @@ _bfd_construct_extended_name_table (bfd *abfd, { normal = normalize (abfd, filename); if (normal == NULL) - return FALSE; + return false; } thislen = strlen (normal); @@ -1716,13 +1716,13 @@ _bfd_construct_extended_name_table (bfd *abfd, } } - return TRUE; + return true; } /* Do not construct an extended name table but transforms name field into its extended form. */ -bfd_boolean +bool _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd, char **tabloc, bfd_size_type *tablen, @@ -1744,7 +1744,7 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd, unsigned int len; if (normal == NULL) - return FALSE; + return false; for (len = 0; normal[len]; len++) if (normal[len] == ' ') @@ -1760,24 +1760,24 @@ _bfd_archive_bsd44_construct_extended_name_table (bfd *abfd, } } - return TRUE; + return true; } /* Write an archive header. */ -bfd_boolean +bool _bfd_generic_write_ar_hdr (bfd *archive, bfd *abfd) { struct ar_hdr *hdr = arch_hdr (abfd); if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) - return FALSE; - return TRUE; + return false; + return true; } /* Write an archive header using BSD4.4 convention. */ -bfd_boolean +bool _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd) { struct ar_hdr *hdr = arch_hdr (abfd); @@ -1793,13 +1793,13 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd) if (!_bfd_ar_sizepad (hdr->ar_size, sizeof (hdr->ar_size), arch_eltdata (abfd)->parsed_size + padded_len)) - return FALSE; + return false; if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) - return FALSE; + return false; if (bfd_bwrite (fullname, len, archive) != len) - return FALSE; + return false; if (len & 3) { @@ -1807,18 +1807,18 @@ _bfd_bsd44_write_ar_hdr (bfd *archive, bfd *abfd) len = 4 - (len & 3); if (bfd_bwrite (pad, len, archive) != len) - return FALSE; + return false; } } else { if (bfd_bwrite (hdr, sizeof (*hdr), archive) != sizeof (*hdr)) - return FALSE; + return false; } - return TRUE; + return true; } -bfd_boolean +bool _bfd_noarchive_write_ar_hdr (bfd *archive, bfd *abfd ATTRIBUTE_UNUSED) { return _bfd_bool_bfd_false_error (archive); @@ -2095,16 +2095,16 @@ _bfd_noarchive_truncate_arname (bfd *abfd ATTRIBUTE_UNUSED, /* The BFD is open for write and has its format set to bfd_archive. */ -bfd_boolean +bool _bfd_write_archive_contents (bfd *arch) { bfd *current; char *etable = NULL; bfd_size_type elength = 0; const char *ename = NULL; - bfd_boolean makemap = bfd_has_map (arch); + bool makemap = bfd_has_map (arch); /* If no .o's, don't bother to make a map. */ - bfd_boolean hasobjects = FALSE; + bool hasobjects = false; bfd_size_type wrote; int tries; char *armag; @@ -2143,27 +2143,27 @@ _bfd_write_archive_contents (bfd *arch) if (makemap && ! hasobjects) { /* Don't bother if we won't make a map! */ if ((bfd_check_format (current, bfd_object))) - hasobjects = TRUE; + hasobjects = true; } } if (!BFD_SEND (arch, _bfd_construct_extended_name_table, (arch, &etable, &elength, &ename))) - return FALSE; + return false; if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; + return false; armag = ARMAG; if (bfd_is_thin_archive (arch)) armag = ARMAGT; wrote = bfd_bwrite (armag, SARMAG, arch); if (wrote != SARMAG) - return FALSE; + return false; if (makemap && hasobjects) { if (! _bfd_compute_and_write_armap (arch, (unsigned int) elength)) - return FALSE; + return false; } if (elength != 0) @@ -2175,16 +2175,16 @@ _bfd_write_archive_contents (bfd *arch) /* Round size up to even number in archive header. */ if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), (elength + 1) & ~(bfd_size_type) 1)) - return FALSE; + return false; memcpy (hdr.ar_fmag, ARFMAG, 2); if ((bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) || bfd_bwrite (etable, elength, arch) != elength) - return FALSE; + return false; if ((elength % 2) == 1) { if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1) - return FALSE; + return false; } } @@ -2197,7 +2197,7 @@ _bfd_write_archive_contents (bfd *arch) /* Write ar header. */ if (!_bfd_write_ar_hdr (arch, current)) - return FALSE; + return false; if (bfd_is_thin_archive (arch)) continue; if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0) @@ -2213,14 +2213,14 @@ _bfd_write_archive_contents (bfd *arch) if (bfd_bread (buffer, amt, current) != amt) goto input_err; if (bfd_bwrite (buffer, amt, arch) != amt) - return FALSE; + return false; remaining -= amt; } if ((arelt_size (current) % 2) == 1) { if (bfd_bwrite (&ARFMAG[1], 1, arch) != 1) - return FALSE; + return false; } } @@ -2243,16 +2243,16 @@ _bfd_write_archive_contents (bfd *arch) while (++tries < 6); } - return TRUE; + return true; input_err: bfd_set_input_error (current, bfd_get_error ()); - return FALSE; + return false; } /* Note that the namidx for the first symbol is 0. */ -bfd_boolean +bool _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) { char *first_name = NULL; @@ -2264,9 +2264,9 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) int stridx = 0; asymbol **syms = NULL; long syms_max = 0; - bfd_boolean ret; + bool ret; size_t amt; - static bfd_boolean report_plugin_err = TRUE; + static bool report_plugin_err = true; /* Dunno if this is the best place for this info... */ if (elength != 0) @@ -2303,7 +2303,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) if (current->lto_slim_object && report_plugin_err) { - report_plugin_err = FALSE; + report_plugin_err = false; _bfd_error_handler (_("%pB: plugin needed to handle lto object"), current); @@ -2363,7 +2363,7 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) "__gnu_lto_slim") == 0 && report_plugin_err) { - report_plugin_err = FALSE; + report_plugin_err = false; _bfd_error_handler (_("%pB: plugin needed to handle lto object"), current); @@ -2411,10 +2411,10 @@ _bfd_compute_and_write_armap (bfd *arch, unsigned int elength) if (first_name != NULL) bfd_release (arch, first_name); - return FALSE; + return false; } -bfd_boolean +bool _bfd_bsd_write_armap (bfd *arch, unsigned int elength, struct orl *map, @@ -2498,14 +2498,14 @@ _bfd_bsd_write_armap (bfd *arch, _bfd_ar_spacepad (hdr.ar_uid, sizeof (hdr.ar_uid), "%ld", uid); _bfd_ar_spacepad (hdr.ar_gid, sizeof (hdr.ar_gid), "%ld", gid); if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) - return FALSE; + return false; memcpy (hdr.ar_fmag, ARFMAG, 2); if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) - return FALSE; + return false; H_PUT_32 (arch, ranlibsize, temp); if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp)) - return FALSE; + return false; firstreal = first; current = arch->archive_head; @@ -2536,7 +2536,7 @@ _bfd_bsd_write_armap (bfd *arch, if (firstreal != (file_ptr) offset) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } last_elt = current; @@ -2544,19 +2544,19 @@ _bfd_bsd_write_armap (bfd *arch, H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE); if (bfd_bwrite (buf, BSD_SYMDEF_SIZE, arch) != BSD_SYMDEF_SIZE) - return FALSE; + return false; } /* Now write the strings themselves. */ H_PUT_32 (arch, stringsize, temp); if (bfd_bwrite (temp, sizeof (temp), arch) != sizeof (temp)) - return FALSE; + return false; for (count = 0; count < orl_count; count++) { size_t len = strlen (*map[count].name) + 1; if (bfd_bwrite (*map[count].name, len, arch) != len) - return FALSE; + return false; } /* The spec sez this should be a newline. But in order to be @@ -2564,10 +2564,10 @@ _bfd_bsd_write_armap (bfd *arch, if (padit) { if (bfd_bwrite ("", 1, arch) != 1) - return FALSE; + return false; } - return TRUE; + return true; } /* At the end of archive file handling, update the timestamp in the @@ -2576,7 +2576,7 @@ _bfd_bsd_write_armap (bfd *arch, Return TRUE if the timestamp was OK, or an unusual problem happened. Return FALSE if we updated the timestamp. */ -bfd_boolean +bool _bfd_archive_bsd_update_armap_timestamp (bfd *arch) { struct stat archstat; @@ -2584,7 +2584,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) /* If creating deterministic archives, just leave the timestamp as-is. */ if ((arch->flags & BFD_DETERMINISTIC_OUTPUT) != 0) - return TRUE; + return true; /* Flush writes, get last-write timestamp from file, and compare it to the timestamp IN the file. */ @@ -2594,11 +2594,11 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) bfd_perror (_("Reading archive file mod timestamp")); /* Can't read mod time for some reason. */ - return TRUE; + return true; } if (((long) archstat.st_mtime) <= bfd_ardata (arch)->armap_timestamp) /* OK by the linker's rules. */ - return TRUE; + return true; /* Update the timestamp. */ bfd_ardata (arch)->armap_timestamp = archstat.st_mtime + ARMAP_TIME_OFFSET; @@ -2618,11 +2618,11 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) bfd_perror (_("Writing updated armap timestamp")); /* Some error while writing. */ - return TRUE; + return true; } /* We updated the timestamp successfully. */ - return FALSE; + return false; } /* A coff armap looks like : @@ -2638,7 +2638,7 @@ _bfd_archive_bsd_update_armap_timestamp (bfd *arch) symbol name n-1 */ -bfd_boolean +bool _bfd_coff_write_armap (bfd *arch, unsigned int elength, struct orl *map, @@ -2701,7 +2701,7 @@ _bfd_coff_write_armap (bfd *arch, memset (&hdr, ' ', sizeof (struct ar_hdr)); hdr.ar_name[0] = '/'; if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) - return FALSE; + return false; _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", ((arch->flags & BFD_DETERMINISTIC_OUTPUT) == 0 ? time (NULL) : 0)); @@ -2714,10 +2714,10 @@ _bfd_coff_write_armap (bfd *arch, /* Write the ar header for this item and the number of symbols. */ if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) - return FALSE; + return false; if (!bfd_write_bigendian_4byte_int (arch, symbol_count)) - return FALSE; + return false; /* Two passes, first write the file offsets for each symbol - remembering that each offset is on a two byte boundary. */ @@ -2741,10 +2741,10 @@ _bfd_coff_write_armap (bfd *arch, if (archive_member_file_ptr != (file_ptr) offset) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (!bfd_write_bigendian_4byte_int (arch, offset)) - return FALSE; + return false; count++; } archive_member_file_ptr += sizeof (struct ar_hdr); @@ -2764,7 +2764,7 @@ _bfd_coff_write_armap (bfd *arch, size_t len = strlen (*map[count].name) + 1; if (bfd_bwrite (*map[count].name, len, arch) != len) - return FALSE; + return false; } /* The spec sez this should be a newline. But in order to be @@ -2772,13 +2772,13 @@ _bfd_coff_write_armap (bfd *arch, if (padit) { if (bfd_bwrite ("", 1, arch) != 1) - return FALSE; + return false; } - return TRUE; + return true; } -bfd_boolean +bool _bfd_noarchive_write_armap (bfd *arch ATTRIBUTE_UNUSED, unsigned int elength ATTRIBUTE_UNUSED, @@ -2786,7 +2786,7 @@ _bfd_noarchive_write_armap unsigned int orl_count ATTRIBUTE_UNUSED, int stridx ATTRIBUTE_UNUSED) { - return TRUE; + return true; } static int @@ -2822,7 +2822,7 @@ _bfd_unlink_from_archive_parent (bfd *abfd) } } -bfd_boolean +bool _bfd_archive_close_and_cleanup (bfd *abfd) { if (bfd_read_p (abfd) && abfd->format == bfd_archive) @@ -2852,5 +2852,5 @@ _bfd_archive_close_and_cleanup (bfd *abfd) if (abfd->is_linker_output) (*abfd->link.hash->hash_table_free) (abfd); - return TRUE; + return true; } diff --git a/bfd/archive64.c b/bfd/archive64.c index 6d76b4d779..3962b74548 100644 --- a/bfd/archive64.c +++ b/bfd/archive64.c @@ -34,7 +34,7 @@ /* Read an Irix 6 armap. */ -bfd_boolean +bool _bfd_archive_64_bit_slurp_armap (bfd *abfd) { struct artdata *ardata = bfd_ardata (abfd); @@ -54,12 +54,12 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) /* Get the name of the first element. */ i = bfd_bread (nextname, 16, abfd); if (i == 0) - return TRUE; + return true; if (i != 16) - return FALSE; + return false; if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0) - return FALSE; + return false; /* Archives with traditional armaps are still permitted. */ if (startswith (nextname, "/ ")) @@ -67,13 +67,13 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) if (! startswith (nextname, "/SYM64/ ")) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (mapdata == NULL) - return FALSE; + return false; parsed_size = mapdata->parsed_size; free (mapdata); @@ -81,14 +81,14 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) if (filesize != 0 && parsed_size > filesize) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } if (bfd_bread (int_buf, 8, abfd) != 8) { if (bfd_get_error () != bfd_error_system_call) bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } nsymz = bfd_getb64 (int_buf); @@ -108,11 +108,11 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) || amt <= stringsize) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } ardata->symdefs = (struct carsym *) bfd_alloc (abfd, amt); if (ardata->symdefs == NULL) - return FALSE; + return false; carsyms = ardata->symdefs; stringbase = ((char *) ardata->symdefs) + carsym_size; @@ -142,21 +142,21 @@ _bfd_archive_64_bit_slurp_armap (bfd *abfd) /* Pad to an even boundary if you have to. */ ardata->first_file_filepos += (ardata->first_file_filepos) % 2; - abfd->has_armap = TRUE; + abfd->has_armap = true; bfd_release (abfd, raw_armap); - return TRUE; + return true; release_symdefs: bfd_release (abfd, ardata->symdefs); - return FALSE; + return false; } /* Write out an Irix 6 armap. The Irix 6 tools are supposed to be able to handle ordinary ELF armaps, but at least on Irix 6.2 the linker crashes. */ -bfd_boolean +bool _bfd_archive_64_bit_write_armap (bfd *arch, unsigned int elength, struct orl *map, @@ -185,7 +185,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch, memset (&hdr, ' ', sizeof (struct ar_hdr)); memcpy (hdr.ar_name, "/SYM64/", strlen ("/SYM64/")); if (!_bfd_ar_sizepad (hdr.ar_size, sizeof (hdr.ar_size), mapsize)) - return FALSE; + return false; _bfd_ar_spacepad (hdr.ar_date, sizeof (hdr.ar_date), "%ld", time (NULL)); /* This, at least, is what Intel coff sets the values to.: */ @@ -198,11 +198,11 @@ _bfd_archive_64_bit_write_armap (bfd *arch, if (bfd_bwrite (&hdr, sizeof (struct ar_hdr), arch) != sizeof (struct ar_hdr)) - return FALSE; + return false; bfd_putb64 ((bfd_vma) symbol_count, buf); if (bfd_bwrite (buf, 8, arch) != 8) - return FALSE; + return false; /* Two passes, first write the file offsets for each symbol - remembering that each offset is on a two byte boundary. */ @@ -223,7 +223,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch, { bfd_putb64 ((bfd_vma) archive_member_file_ptr, buf); if (bfd_bwrite (buf, 8, arch) != 8) - return FALSE; + return false; } /* Add size of this archive entry */ @@ -240,7 +240,7 @@ _bfd_archive_64_bit_write_armap (bfd *arch, size_t len = strlen (*map[count].name) + 1; if (bfd_bwrite (*map[count].name, len, arch) != len) - return FALSE; + return false; } /* The spec says that this should be padded to an 8 byte boundary. @@ -248,9 +248,9 @@ _bfd_archive_64_bit_write_armap (bfd *arch, while (padding != 0) { if (bfd_bwrite ("", 1, arch) != 1) - return FALSE; + return false; --padding; } - return TRUE; + return true; } diff --git a/bfd/archures.c b/bfd/archures.c index 8c1d32ca93..390691bfba 100644 --- a/bfd/archures.c +++ b/bfd/archures.c @@ -581,17 +581,16 @@ DESCRIPTION . {* TRUE if this is the default machine for the architecture. . The default arch should be the first entry for an arch so that . all the entries for that arch can be accessed via <>. *} -. bfd_boolean the_default; +. bool the_default; . const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, . const struct bfd_arch_info *); . -. bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); +. bool (*scan) (const struct bfd_arch_info *, const char *); . . {* Allocate via bfd_malloc and return a fill buffer of size COUNT. If . IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is . TRUE, the buffer contains code. *} -. void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian, -. bfd_boolean code); +. void *(*fill) (bfd_size_type count, bool is_bigendian, bool code); . . const struct bfd_arch_info *next; . @@ -892,7 +891,7 @@ FUNCTION SYNOPSIS const bfd_arch_info_type *bfd_arch_get_compatible - (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns); + (const bfd *abfd, const bfd *bbfd, bool accept_unknowns); DESCRIPTION Determine whether two BFDs' architectures and machine types @@ -905,7 +904,7 @@ DESCRIPTION const bfd_arch_info_type * bfd_arch_get_compatible (const bfd *abfd, const bfd *bbfd, - bfd_boolean accept_unknowns) + bool accept_unknowns) { const bfd *ubfd, *kbfd; @@ -946,7 +945,7 @@ DESCRIPTION const bfd_arch_info_type bfd_default_arch_struct = { - 32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, TRUE, + 32, 32, 8, bfd_arch_unknown, 0, "unknown", "unknown", 2, true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, @@ -975,7 +974,7 @@ FUNCTION bfd_default_set_arch_mach SYNOPSIS - bfd_boolean bfd_default_set_arch_mach + bool bfd_default_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach); DESCRIPTION @@ -985,18 +984,18 @@ DESCRIPTION pointer. */ -bfd_boolean +bool bfd_default_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach) { abfd->arch_info = bfd_lookup_arch (arch, mach); if (abfd->arch_info != NULL) - return TRUE; + return true; abfd->arch_info = &bfd_default_arch_struct; bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* @@ -1107,7 +1106,7 @@ INTERNAL_FUNCTION bfd_default_scan SYNOPSIS - bfd_boolean bfd_default_scan + bool bfd_default_scan (const struct bfd_arch_info *info, const char *string); DESCRIPTION @@ -1115,7 +1114,7 @@ DESCRIPTION architecture hit and a machine hit. */ -bfd_boolean +bool bfd_default_scan (const bfd_arch_info_type *info, const char *string) { const char *ptr_src; @@ -1128,11 +1127,11 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string) default architecture? */ if (strcasecmp (string, info->arch_name) == 0 && info->the_default) - return TRUE; + return true; /* Exact match of the machine name (PRINTABLE_NAME)? */ if (strcasecmp (string, info->printable_name) == 0) - return TRUE; + return true; /* Given that printable_name contains no colon, attempt to match: ARCH_NAME [ ":" ] PRINTABLE_NAME? */ @@ -1146,13 +1145,13 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string) { if (strcasecmp (string + strlen_arch_name + 1, info->printable_name) == 0) - return TRUE; + return true; } else { if (strcasecmp (string + strlen_arch_name, info->printable_name) == 0) - return TRUE; + return true; } } } @@ -1165,7 +1164,7 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string) if (strncasecmp (string, info->printable_name, colon_index) == 0 && strcasecmp (string + colon_index, info->printable_name + colon_index + 1) == 0) - return TRUE; + return true; } /* Given that PRINTABLE_NAME has the form: ":" ; Do not @@ -1295,16 +1294,16 @@ bfd_default_scan (const bfd_arch_info_type *info, const char *string) break; default: - return FALSE; + return false; } if (arch != info->arch) - return FALSE; + return false; if (number != info->mach) - return FALSE; + return false; - return TRUE; + return true; } /* @@ -1441,8 +1440,8 @@ INTERNAL_FUNCTION SYNOPSIS void *bfd_arch_default_fill (bfd_size_type count, - bfd_boolean is_bigendian, - bfd_boolean code); + bool is_bigendian, + bool code); DESCRIPTION Allocate via bfd_malloc and return a fill buffer of size COUNT. @@ -1452,8 +1451,8 @@ DESCRIPTION void * bfd_arch_default_fill (bfd_size_type count, - bfd_boolean is_bigendian ATTRIBUTE_UNUSED, - bfd_boolean code ATTRIBUTE_UNUSED) + bool is_bigendian ATTRIBUTE_UNUSED, + bool code ATTRIBUTE_UNUSED) { void *fill = bfd_malloc (count); if (fill != NULL) @@ -1461,7 +1460,7 @@ bfd_arch_default_fill (bfd_size_type count, return fill; } -bfd_boolean +bool _bfd_nowrite_set_arch_mach (bfd *abfd, enum bfd_architecture arch ATTRIBUTE_UNUSED, unsigned long mach ATTRIBUTE_UNUSED) diff --git a/bfd/bfd-in.h b/bfd/bfd-in.h index 88f1e867a6..6f72cc4539 100644 --- a/bfd/bfd-in.h +++ b/bfd/bfd-in.h @@ -339,7 +339,7 @@ struct bfd_hash_table }; /* Initialize a hash table. */ -extern bfd_boolean bfd_hash_table_init +extern bool bfd_hash_table_init (struct bfd_hash_table *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -347,7 +347,7 @@ extern bfd_boolean bfd_hash_table_init unsigned int); /* Initialize a hash table specifying a size. */ -extern bfd_boolean bfd_hash_table_init_n +extern bool bfd_hash_table_init_n (struct bfd_hash_table *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -363,8 +363,7 @@ extern void bfd_hash_table_free COPY argument must be TRUE if this routine should copy the string into newly allocated memory when adding an entry. */ extern struct bfd_hash_entry *bfd_hash_lookup - (struct bfd_hash_table *, const char *, bfd_boolean create, - bfd_boolean copy); + (struct bfd_hash_table *, const char *, bool create, bool copy); /* Insert an entry in a hash table. */ extern struct bfd_hash_entry *bfd_hash_insert @@ -392,7 +391,7 @@ extern void *bfd_hash_allocate INFO argument is passed to the function. */ extern void bfd_hash_traverse (struct bfd_hash_table *, - bfd_boolean (*) (struct bfd_hash_entry *, void *), + bool (*) (struct bfd_hash_entry *, void *), void *info); /* Allows the default size of a hash table to be configured. New hash @@ -455,15 +454,15 @@ extern int bfd_stat (bfd *, struct stat *); #endif extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); -extern bfd_boolean bfd_cache_close +extern bool bfd_cache_close (bfd *abfd); /* NB: This declaration should match the autogenerated one in libbfd.h. */ -extern bfd_boolean bfd_cache_close_all (void); +extern bool bfd_cache_close_all (void); -extern bfd_boolean bfd_record_phdr - (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, - bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); +extern bool bfd_record_phdr + (bfd *, unsigned long, bool, flagword, bool, bfd_vma, + bool, bool, unsigned int, struct bfd_section **); /* Byte swapping routines. */ @@ -490,8 +489,8 @@ void bfd_putl16 (bfd_vma, void *); /* Byte swapping routines which take size and endiannes as arguments. */ -bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); -void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); +bfd_uint64_t bfd_get_bits (const void *, int, bool); +void bfd_put_bits (bfd_uint64_t, void *, int, bool); /* mmap hacks */ @@ -518,8 +517,8 @@ extern void bfd_init_window (bfd_window *); extern void bfd_free_window (bfd_window *); -extern bfd_boolean bfd_get_file_window - (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); +extern bool bfd_get_file_window + (bfd *, file_ptr, bfd_size_type, bfd_window *, bool); /* Externally visible ELF routines. */ @@ -551,7 +550,7 @@ struct bfd_link_hash_entry; /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */ -static inline bfd_boolean +static inline bool startswith (const char *str, const char *prefix) { return strncmp (str, prefix, strlen (prefix)) == 0; diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 9fbde9d95c..40d35a1a43 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -346,7 +346,7 @@ struct bfd_hash_table }; /* Initialize a hash table. */ -extern bfd_boolean bfd_hash_table_init +extern bool bfd_hash_table_init (struct bfd_hash_table *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -354,7 +354,7 @@ extern bfd_boolean bfd_hash_table_init unsigned int); /* Initialize a hash table specifying a size. */ -extern bfd_boolean bfd_hash_table_init_n +extern bool bfd_hash_table_init_n (struct bfd_hash_table *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -370,8 +370,7 @@ extern void bfd_hash_table_free COPY argument must be TRUE if this routine should copy the string into newly allocated memory when adding an entry. */ extern struct bfd_hash_entry *bfd_hash_lookup - (struct bfd_hash_table *, const char *, bfd_boolean create, - bfd_boolean copy); + (struct bfd_hash_table *, const char *, bool create, bool copy); /* Insert an entry in a hash table. */ extern struct bfd_hash_entry *bfd_hash_insert @@ -399,7 +398,7 @@ extern void *bfd_hash_allocate INFO argument is passed to the function. */ extern void bfd_hash_traverse (struct bfd_hash_table *, - bfd_boolean (*) (struct bfd_hash_entry *, void *), + bool (*) (struct bfd_hash_entry *, void *), void *info); /* Allows the default size of a hash table to be configured. New hash @@ -462,15 +461,15 @@ extern int bfd_stat (bfd *, struct stat *); #endif extern void _bfd_warn_deprecated (const char *, const char *, int, const char *); -extern bfd_boolean bfd_cache_close +extern bool bfd_cache_close (bfd *abfd); /* NB: This declaration should match the autogenerated one in libbfd.h. */ -extern bfd_boolean bfd_cache_close_all (void); +extern bool bfd_cache_close_all (void); -extern bfd_boolean bfd_record_phdr - (bfd *, unsigned long, bfd_boolean, flagword, bfd_boolean, bfd_vma, - bfd_boolean, bfd_boolean, unsigned int, struct bfd_section **); +extern bool bfd_record_phdr + (bfd *, unsigned long, bool, flagword, bool, bfd_vma, + bool, bool, unsigned int, struct bfd_section **); /* Byte swapping routines. */ @@ -497,8 +496,8 @@ void bfd_putl16 (bfd_vma, void *); /* Byte swapping routines which take size and endiannes as arguments. */ -bfd_uint64_t bfd_get_bits (const void *, int, bfd_boolean); -void bfd_put_bits (bfd_uint64_t, void *, int, bfd_boolean); +bfd_uint64_t bfd_get_bits (const void *, int, bool); +void bfd_put_bits (bfd_uint64_t, void *, int, bool); /* mmap hacks */ @@ -525,8 +524,8 @@ extern void bfd_init_window (bfd_window *); extern void bfd_free_window (bfd_window *); -extern bfd_boolean bfd_get_file_window - (bfd *, file_ptr, bfd_size_type, bfd_window *, bfd_boolean); +extern bool bfd_get_file_window + (bfd *, file_ptr, bfd_size_type, bfd_window *, bool); /* Externally visible ELF routines. */ @@ -558,7 +557,7 @@ struct bfd_link_hash_entry; /* Return TRUE if the start of STR matches PREFIX, FALSE otherwise. */ -static inline bfd_boolean +static inline bool startswith (const char *str, const char *prefix) { return strncmp (str, prefix, strlen (prefix)) == 0; @@ -602,15 +601,15 @@ bfd *bfd_openr_iovec (const char *filename, const char *target, bfd *bfd_openw (const char *filename, const char *target); -bfd_boolean bfd_close (bfd *abfd); +bool bfd_close (bfd *abfd); -bfd_boolean bfd_close_all_done (bfd *); +bool bfd_close_all_done (bfd *); bfd *bfd_create (const char *filename, bfd *templ); -bfd_boolean bfd_make_writable (bfd *abfd); +bool bfd_make_writable (bfd *abfd); -bfd_boolean bfd_make_readable (bfd *abfd); +bool bfd_make_readable (bfd *abfd); void *bfd_alloc (bfd *abfd, bfd_size_type wanted); @@ -632,7 +631,7 @@ char *bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir); struct bfd_section *bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename); -bfd_boolean bfd_fill_in_gnu_debuglink_section +bool bfd_fill_in_gnu_debuglink_section (bfd *abfd, struct bfd_section *sect, const char *filename); char *bfd_follow_build_id_debuglink (bfd *abfd, const char *dir); @@ -1244,7 +1243,7 @@ bfd_section_userdata (const asection *sec) { return sec->userdata; } -static inline bfd_boolean +static inline bool bfd_is_com_section (const asection *sec) { return (sec->flags & SEC_IS_COMMON) != 0; @@ -1254,33 +1253,33 @@ bfd_is_com_section (const asection *sec) because not all callers use the return value. A macro implementation would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some compilers will complain about comma expressions that have no effect. */ -static inline bfd_boolean +static inline bool bfd_set_section_userdata (asection *sec, void *val) { sec->userdata = val; - return TRUE; + return true; } -static inline bfd_boolean +static inline bool bfd_set_section_vma (asection *sec, bfd_vma val) { sec->vma = sec->lma = val; - sec->user_set_vma = TRUE; - return TRUE; + sec->user_set_vma = true; + return true; } -static inline bfd_boolean +static inline bool bfd_set_section_lma (asection *sec, bfd_vma val) { sec->lma = val; - return TRUE; + return true; } -static inline bfd_boolean +static inline bool bfd_set_section_alignment (asection *sec, unsigned int val) { sec->alignment_power = val; - return TRUE; + return true; } /* These sections are global, and are managed by BFD. The application @@ -1302,25 +1301,25 @@ extern asection _bfd_std_section[4]; /* Pointer to the indirect section. */ #define bfd_ind_section_ptr (&_bfd_std_section[3]) -static inline bfd_boolean +static inline bool bfd_is_und_section (const asection *sec) { return sec == bfd_und_section_ptr; } -static inline bfd_boolean +static inline bool bfd_is_abs_section (const asection *sec) { return sec == bfd_abs_section_ptr; } -static inline bfd_boolean +static inline bool bfd_is_ind_section (const asection *sec) { return sec == bfd_ind_section_ptr; } -static inline bfd_boolean +static inline bool bfd_is_const_section (const asection *sec) { return (sec >= _bfd_std_section @@ -1329,7 +1328,7 @@ bfd_is_const_section (const asection *sec) } /* Return TRUE if input section SEC has been discarded. */ -static inline bfd_boolean +static inline bool discarded_section (const asection *sec) { return (!bfd_is_abs_section (sec) @@ -1400,7 +1399,7 @@ asection *bfd_get_linker_section (bfd *abfd, const char *name); asection *bfd_get_section_by_name_if (bfd *abfd, const char *name, - bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj), + bool (*func) (bfd *abfd, asection *sect, void *obj), void *obj); char *bfd_get_unique_section_name @@ -1418,7 +1417,7 @@ asection *bfd_make_section_with_flags asection *bfd_make_section (bfd *, const char *name); -bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); +bool bfd_set_section_flags (asection *sec, flagword flags); void bfd_rename_section (asection *sec, const char *newname); @@ -1430,33 +1429,33 @@ void bfd_map_over_sections asection *bfd_sections_find_if (bfd *abfd, - bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), + bool (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); -bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); +bool bfd_set_section_size (asection *sec, bfd_size_type val); -bfd_boolean bfd_set_section_contents +bool bfd_set_section_contents (bfd *abfd, asection *section, const void *data, file_ptr offset, bfd_size_type count); -bfd_boolean bfd_get_section_contents +bool bfd_get_section_contents (bfd *abfd, asection *section, void *location, file_ptr offset, bfd_size_type count); -bfd_boolean bfd_malloc_and_get_section +bool bfd_malloc_and_get_section (bfd *abfd, asection *section, bfd_byte **buf); -bfd_boolean bfd_copy_private_section_data +bool bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); #define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \ BFD_SEND (obfd, _bfd_copy_private_section_data, \ (ibfd, isection, obfd, osection)) -bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); +bool bfd_generic_is_group_section (bfd *, const asection *sec); const char *bfd_generic_group_name (bfd *, const asection *sec); -bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); +bool bfd_generic_discard_group (bfd *abfd, asection *group); /* Extracted from archures.c. */ enum bfd_architecture @@ -1965,17 +1964,16 @@ typedef struct bfd_arch_info /* TRUE if this is the default machine for the architecture. The default arch should be the first entry for an arch so that all the entries for that arch can be accessed via <>. */ - bfd_boolean the_default; + bool the_default; const struct bfd_arch_info * (*compatible) (const struct bfd_arch_info *, const struct bfd_arch_info *); - bfd_boolean (*scan) (const struct bfd_arch_info *, const char *); + bool (*scan) (const struct bfd_arch_info *, const char *); /* Allocate via bfd_malloc and return a fill buffer of size COUNT. If IS_BIGENDIAN is TRUE, the order of bytes is big endian. If CODE is TRUE, the buffer contains code. */ - void *(*fill) (bfd_size_type count, bfd_boolean is_bigendian, - bfd_boolean code); + void *(*fill) (bfd_size_type count, bool is_bigendian, bool code); const struct bfd_arch_info *next; @@ -1998,11 +1996,11 @@ const bfd_arch_info_type *bfd_scan_arch (const char *string); const char **bfd_arch_list (void); const bfd_arch_info_type *bfd_arch_get_compatible - (const bfd *abfd, const bfd *bbfd, bfd_boolean accept_unknowns); + (const bfd *abfd, const bfd *bbfd, bool accept_unknowns); void bfd_set_arch_info (bfd *abfd, const bfd_arch_info_type *arg); -bfd_boolean bfd_default_set_arch_mach +bool bfd_default_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach); enum bfd_architecture bfd_get_arch (const bfd *abfd); @@ -2187,8 +2185,8 @@ struct reloc_howto_struct { (unsigned) type, size < 0 ? -size : size, bits, right, left, ovf, \ size < 0, pcrel, inplace, pcrel_off, src_mask, dst_mask, func, name } #define EMPTY_HOWTO(C) \ - HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ - NULL, FALSE, 0, 0, FALSE) + HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \ + NULL, false, 0, 0, false) unsigned int bfd_get_reloc_size (reloc_howto_type *); @@ -2206,7 +2204,7 @@ bfd_reloc_status_type bfd_check_overflow unsigned int addrsize, bfd_vma relocation); -bfd_boolean bfd_reloc_offset_in_range +bool bfd_reloc_offset_in_range (reloc_howto_type *howto, bfd *abfd, asection *section, @@ -6440,14 +6438,14 @@ asymbol; #define bfd_get_symtab_upper_bound(abfd) \ BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd)) -bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); +bool bfd_is_local_label (bfd *abfd, asymbol *sym); -bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); +bool bfd_is_local_label_name (bfd *abfd, const char *name); #define bfd_is_local_label_name(abfd, name) \ BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name)) -bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); +bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); #define bfd_is_target_special_symbol(abfd, sym) \ BFD_SEND (abfd, _bfd_is_target_special_symbol, (abfd, sym)) @@ -6455,7 +6453,7 @@ bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); #define bfd_canonicalize_symtab(abfd, location) \ BFD_SEND (abfd, _bfd_canonicalize_symtab, (abfd, location)) -bfd_boolean bfd_set_symtab +bool bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); void bfd_print_symbol_vandf (bfd *abfd, void *file, asymbol *symbol); @@ -6470,11 +6468,11 @@ asymbol *_bfd_generic_make_empty_symbol (bfd *); int bfd_decode_symclass (asymbol *symbol); -bfd_boolean bfd_is_undefined_symclass (int symclass); +bool bfd_is_undefined_symclass (int symclass); void bfd_symbol_info (asymbol *symbol, symbol_info *ret); -bfd_boolean bfd_copy_private_symbol_data +bool bfd_copy_private_symbol_data (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); #define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \ @@ -6819,7 +6817,7 @@ bfd_get_filename (const bfd *abfd) return abfd->filename; } -static inline bfd_boolean +static inline bool bfd_get_cacheable (const bfd *abfd) { return abfd->cacheable; @@ -6867,13 +6865,13 @@ bfd_count_sections (const bfd *abfd) return abfd->section_count; } -static inline bfd_boolean +static inline bool bfd_has_map (const bfd *abfd) { return abfd->has_armap; } -static inline bfd_boolean +static inline bool bfd_is_thin_archive (const bfd *abfd) { return abfd->is_thin_archive; @@ -6886,15 +6884,15 @@ bfd_usrdata (const bfd *abfd) } /* See note beside bfd_set_section_userdata. */ -static inline bfd_boolean -bfd_set_cacheable (bfd * abfd, bfd_boolean val) +static inline bool +bfd_set_cacheable (bfd * abfd, bool val) { abfd->cacheable = val; - return TRUE; + return true; } static inline void -bfd_set_thin_archive (bfd *abfd, bfd_boolean val) +bfd_set_thin_archive (bfd *abfd, bool val) { abfd->is_thin_archive = val; } @@ -7029,7 +7027,7 @@ bfd_section_list_insert_before (bfd *abfd, asection *b, asection *s) abfd->sections = s; } -static inline bfd_boolean +static inline bool bfd_section_removed_from_list (const bfd *abfd, const asection *s) { return s->next ? s->next->prev != s : abfd->section_last != s; @@ -7101,13 +7099,13 @@ void bfd_set_reloc #define bfd_set_reloc(abfd, asect, location, count) \ BFD_SEND (abfd, _bfd_set_reloc, (abfd, asect, location, count)) -bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); +bool bfd_set_file_flags (bfd *abfd, flagword flags); int bfd_get_arch_size (bfd *abfd); int bfd_get_sign_extend_vma (bfd *abfd); -bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); +bool bfd_set_start_address (bfd *abfd, bfd_vma vma); unsigned int bfd_get_gp_size (bfd *abfd); @@ -7115,17 +7113,17 @@ void bfd_set_gp_size (bfd *abfd, unsigned int i); bfd_vma bfd_scan_vma (const char *string, const char **end, int base); -bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); +bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_header_data(ibfd, obfd) \ BFD_SEND (obfd, _bfd_copy_private_header_data, \ (ibfd, obfd)) -bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); +bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); #define bfd_copy_private_bfd_data(ibfd, obfd) \ BFD_SEND (obfd, _bfd_copy_private_bfd_data, \ (ibfd, obfd)) -bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); +bool bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_set_private_flags(abfd, flags) \ BFD_SEND (abfd, _bfd_set_private_flags, (abfd, flags)) @@ -7225,20 +7223,20 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); extern bfd_byte *bfd_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, - bfd_boolean, asymbol **); + bool, asymbol **); -bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); +bool bfd_alt_mach_code (bfd *abfd, int alternative); bfd_vma bfd_emul_get_maxpagesize (const char *); -bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); +bfd_vma bfd_emul_get_commonpagesize (const char *, bool); char *bfd_demangle (bfd *, const char *, int); void bfd_update_compression_header (bfd *abfd, bfd_byte *contents, asection *sec); -bfd_boolean bfd_check_compression_header +bool bfd_check_compression_header (bfd *abfd, bfd_byte *contents, asection *sec, bfd_size_type *uncompressed_size, unsigned int *uncompressed_alignment_power); @@ -7248,7 +7246,7 @@ int bfd_get_compression_header_size (bfd *abfd, asection *sec); bfd_size_type bfd_convert_section_size (bfd *ibfd, asection *isec, bfd *obfd, bfd_size_type size); -bfd_boolean bfd_convert_section_contents +bool bfd_convert_section_contents (bfd *ibfd, asection *isec, bfd *obfd, bfd_byte **ptr, bfd_size_type *ptr_size); @@ -7256,7 +7254,7 @@ bfd_boolean bfd_convert_section_contents symindex bfd_get_next_mapent (bfd *abfd, symindex previous, carsym **sym); -bfd_boolean bfd_set_archive_head (bfd *output, bfd *new_head); +bool bfd_set_archive_head (bfd *output, bfd *new_head); bfd *bfd_openr_next_archived_file (bfd *archive, bfd *previous); @@ -7267,10 +7265,10 @@ int bfd_core_file_failing_signal (bfd *abfd); int bfd_core_file_pid (bfd *abfd); -bfd_boolean core_file_matches_executable_p +bool core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); -bfd_boolean generic_core_file_matches_executable_p +bool generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); /* Extracted from targets.c. */ @@ -7297,7 +7295,7 @@ bfd_boolean generic_core_file_matches_executable_p /* Defined to TRUE if unused section symbol should be kept. */ #ifndef TARGET_KEEP_UNUSED_SECTION_SYMBOLS -#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS TRUE +#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true #endif enum bfd_flavour @@ -7374,7 +7372,7 @@ typedef struct bfd_target unsigned char match_priority; /* TRUE if unused section symbols should be kept. */ - bfd_boolean keep_unused_section_symbols; + bool keep_unused_section_symbols; /* Entries for byte swapping for data. These are different from the other entry points, since they don't take a BFD as the first argument. @@ -7408,10 +7406,10 @@ typedef struct bfd_target bfd_cleanup (*_bfd_check_format[bfd_type_end]) (bfd *); /* Set the format of a file being written. */ - bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); + bool (*_bfd_set_format[bfd_type_end]) (bfd *); /* Write cached information into a file being written, at <>. */ - bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *); + bool (*_bfd_write_contents[bfd_type_end]) (bfd *); /* Generic entry points. */ @@ -7423,17 +7421,16 @@ typedef struct bfd_target NAME##_get_section_contents_in_window /* Called when the BFD is being closed to do any necessary cleanup. */ - bfd_boolean (*_close_and_cleanup) (bfd *); + bool (*_close_and_cleanup) (bfd *); /* Ask the BFD to free all cached information. */ - bfd_boolean (*_bfd_free_cached_info) (bfd *); + bool (*_bfd_free_cached_info) (bfd *); /* Called when a new section is created. */ - bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); + bool (*_new_section_hook) (bfd *, sec_ptr); /* Read the contents of a section. */ - bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, - bfd_size_type); - bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, - bfd_window *, file_ptr, - bfd_size_type); + bool (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, + bfd_size_type); + bool (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, bfd_window *, + file_ptr, bfd_size_type); /* Entry points to copy private data. */ #define BFD_JUMP_TABLE_COPY(NAME) \ @@ -7448,34 +7445,32 @@ typedef struct bfd_target /* Called to copy BFD general private data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); + bool (*_bfd_copy_private_bfd_data) (bfd *, bfd *); /* Called to merge BFD general private data from one object file to a common output file when linking. */ - bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); + bool (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); /* Called to initialize BFD private section data from one object file to another. */ #define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ BFD_SEND (obfd, _bfd_init_private_section_data, \ (ibfd, isec, obfd, osec, link_info)) - bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, - sec_ptr, - struct bfd_link_info *); + bool (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr, + struct bfd_link_info *); /* Called to copy BFD private section data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, - sec_ptr); + bool (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr); /* Called to copy BFD private symbol data from one symbol to another. */ - bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, - asymbol *); + bool (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, + bfd *, asymbol *); /* Called to copy BFD private header data from one object file to another. */ - bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); + bool (*_bfd_copy_private_header_data) (bfd *, bfd *); /* Called to set private backend flags. */ - bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); + bool (*_bfd_set_private_flags) (bfd *, flagword); /* Called to print private BFD data. */ - bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *); + bool (*_bfd_print_private_bfd_data) (bfd *, void *); /* Core file entry points. */ #define BFD_JUMP_TABLE_CORE(NAME) \ @@ -7484,10 +7479,10 @@ typedef struct bfd_target NAME##_core_file_matches_executable_p, \ NAME##_core_file_pid - char * (*_core_file_failing_command) (bfd *); - int (*_core_file_failing_signal) (bfd *); - bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *); - int (*_core_file_pid) (bfd *); + char *(*_core_file_failing_command) (bfd *); + int (*_core_file_failing_signal) (bfd *); + bool (*_core_file_matches_executable_p) (bfd *, bfd *); + int (*_core_file_pid) (bfd *); /* Archive entry points. */ #define BFD_JUMP_TABLE_ARCHIVE(NAME) \ @@ -7503,22 +7498,21 @@ typedef struct bfd_target NAME##_generic_stat_arch_elt, \ NAME##_update_armap_timestamp - bfd_boolean (*_bfd_slurp_armap) (bfd *); - bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); - bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, - bfd_size_type *, - const char **); - void (*_bfd_truncate_arname) (bfd *, const char *, char *); - bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, - unsigned int, int); - void * (*_bfd_read_ar_hdr_fn) (bfd *); - bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); - bfd * (*openr_next_archived_file) (bfd *, bfd *); + bool (*_bfd_slurp_armap) (bfd *); + bool (*_bfd_slurp_extended_name_table) (bfd *); + bool (*_bfd_construct_extended_name_table) (bfd *, char **, + bfd_size_type *, + const char **); + void (*_bfd_truncate_arname) (bfd *, const char *, char *); + bool (*write_armap) (bfd *, unsigned, struct orl *, unsigned, int); + void *(*_bfd_read_ar_hdr_fn) (bfd *); + bool (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); + bfd *(*openr_next_archived_file) (bfd *, bfd *); #define bfd_get_elt_at_index(b,i) \ BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) - bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); - int (*_bfd_stat_arch_elt) (bfd *, struct stat *); - bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); + bfd *(*_bfd_get_elt_at_index) (bfd *, symindex); + int (*_bfd_stat_arch_elt) (bfd *, struct stat *); + bool (*_bfd_update_armap_timestamp) (bfd *); /* Entry points used for symbols. */ #define BFD_JUMP_TABLE_SYMBOLS(NAME) \ @@ -7538,47 +7532,47 @@ typedef struct bfd_target NAME##_read_minisymbols, \ NAME##_minisymbol_to_symbol - long (*_bfd_get_symtab_upper_bound) (bfd *); - long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); + long (*_bfd_get_symtab_upper_bound) (bfd *); + long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); struct bfd_symbol * - (*_bfd_make_empty_symbol) (bfd *); - void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, - bfd_print_symbol_type); + (*_bfd_make_empty_symbol) (bfd *); + void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, + bfd_print_symbol_type); #define bfd_print_symbol(b,p,s,e) \ BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) - void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, - symbol_info *); + void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, symbol_info *); #define bfd_get_symbol_info(b,p,e) \ BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) - const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, - bfd_boolean, - bfd_boolean *); + const char * + (*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, + bool, bool *); #define bfd_get_symbol_version_string(b,s,p,h) \ BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h)) - bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); - bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); - alent * (*_get_lineno) (bfd *, struct bfd_symbol *); - bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, - struct bfd_section *, bfd_vma, - const char **, const char **, - unsigned int *, unsigned int *); - bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, - struct bfd_symbol *, const char **, - unsigned int *); - bfd_boolean (*_bfd_find_inliner_info) + bool (*_bfd_is_local_label_name) (bfd *, const char *); + bool (*_bfd_is_target_special_symbol) (bfd *, asymbol *); + alent * + (*_get_lineno) (bfd *, struct bfd_symbol *); + bool (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, + struct bfd_section *, bfd_vma, + const char **, const char **, + unsigned int *, unsigned int *); + bool (*_bfd_find_line) (bfd *, struct bfd_symbol **, + struct bfd_symbol *, const char **, + unsigned int *); + bool (*_bfd_find_inliner_info) (bfd *, const char **, const char **, unsigned int *); /* Back-door to allow format-aware applications to create debug symbols while using BFD for everything else. Currently used by the assembler when creating COFF files. */ - asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); + asymbol * + (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); #define bfd_read_minisymbols(b, d, m, s) \ BFD_SEND (b, _read_minisymbols, (b, d, m, s)) - long (*_read_minisymbols) (bfd *, bfd_boolean, void **, - unsigned int *); + long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *); #define bfd_minisymbol_to_symbol(b, d, m, f) \ BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) - asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, - asymbol *); + asymbol * + (*_minisymbol_to_symbol) (bfd *, bool, const void *, asymbol *); /* Routines for relocs. */ #define BFD_JUMP_TABLE_RELOCS(NAME) \ @@ -7588,25 +7582,25 @@ typedef struct bfd_target NAME##_bfd_reloc_type_lookup, \ NAME##_bfd_reloc_name_lookup - long (*_get_reloc_upper_bound) (bfd *, sec_ptr); - long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, - struct bfd_symbol **); - void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); + long (*_get_reloc_upper_bound) (bfd *, sec_ptr); + long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, + struct bfd_symbol **); + void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); /* See documentation on reloc types. */ reloc_howto_type * - (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); + (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); reloc_howto_type * - (*reloc_name_lookup) (bfd *, const char *); + (*reloc_name_lookup) (bfd *, const char *); /* Routines used when writing an object file. */ #define BFD_JUMP_TABLE_WRITE(NAME) \ NAME##_set_arch_mach, \ NAME##_set_section_contents - bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, + bool (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, unsigned long); - bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, - file_ptr, bfd_size_type); + bool (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); /* Routines used by the linker. */ #define BFD_JUMP_TABLE_LINK(NAME) \ @@ -7631,72 +7625,73 @@ typedef struct bfd_target NAME##_bfd_link_hide_symbol, \ NAME##_bfd_define_start_stop - int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); - bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, - struct bfd_link_info *, - struct bfd_link_order *, - bfd_byte *, bfd_boolean, - struct bfd_symbol **); + int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); + bfd_byte * + (*_bfd_get_relocated_section_contents) (bfd *, + struct bfd_link_info *, + struct bfd_link_order *, + bfd_byte *, bool, + struct bfd_symbol **); - bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, - struct bfd_link_info *, bfd_boolean *); + bool (*_bfd_relax_section) (bfd *, struct bfd_section *, + struct bfd_link_info *, bool *); /* Create a hash table for the linker. Different backends store different information in this table. */ struct bfd_link_hash_table * - (*_bfd_link_hash_table_create) (bfd *); + (*_bfd_link_hash_table_create) (bfd *); /* Add symbols from this object file into the hash table. */ - bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); + bool (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); /* Indicate that we are only retrieving symbol values from this section. */ - void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); + void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); /* Copy the symbol type and other attributes for a linker script assignment of one symbol to another. */ #define bfd_copy_link_hash_symbol_type(b, t, f) \ BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) - void (*_bfd_copy_link_hash_symbol_type) (bfd *, - struct bfd_link_hash_entry *, - struct bfd_link_hash_entry *); + void (*_bfd_copy_link_hash_symbol_type) (bfd *, + struct bfd_link_hash_entry *, + struct bfd_link_hash_entry *); /* Do a link based on the link_order structures attached to each section of the BFD. */ - bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *); + bool (*_bfd_final_link) (bfd *, struct bfd_link_info *); /* Should this section be split up into smaller pieces during linking. */ - bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); + bool (*_bfd_link_split_section) (bfd *, struct bfd_section *); /* Check the relocations in the bfd for validity. */ - bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); + bool (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); /* Remove sections that are not referenced from the output. */ - bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); + bool (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); /* Sets the bitmask of allowed and disallowed section flags. */ - bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, - struct flag_info *, asection *); + bool (*_bfd_lookup_section_flags) (struct bfd_link_info *, + struct flag_info *, asection *); /* Attempt to merge SEC_MERGE sections. */ - bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); + bool (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); /* Is this section a member of a group? */ - bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); + bool (*_bfd_is_group_section) (bfd *, const struct bfd_section *); /* The group name, if section is a member of a group. */ const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); /* Discard members of a group. */ - bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); + bool (*_bfd_discard_group) (bfd *, struct bfd_section *); /* Check if SEC has been already linked during a reloceatable or final link. */ - bfd_boolean (*_section_already_linked) (bfd *, asection *, - struct bfd_link_info *); + bool (*_section_already_linked) (bfd *, asection *, + struct bfd_link_info *); /* Define a common symbol. */ - bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, - struct bfd_link_hash_entry *); + bool (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, + struct bfd_link_hash_entry *); /* Hide a symbol. */ void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, @@ -7704,8 +7699,8 @@ typedef struct bfd_target /* Define a __start, __stop, .startof. or .sizeof. symbol. */ struct bfd_link_hash_entry * - (*_bfd_define_start_stop) (struct bfd_link_info *, const char *, - asection *); + (*_bfd_define_start_stop) (struct bfd_link_info *, const char *, + asection *); /* Routines to handle dynamic symbols and relocs. */ #define BFD_JUMP_TABLE_DYNAMIC(NAME) \ @@ -7716,18 +7711,18 @@ typedef struct bfd_target NAME##_canonicalize_dynamic_reloc /* Get the amount of memory required to hold the dynamic symbols. */ - long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); + long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); /* Read in the dynamic symbols. */ - long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); /* Create synthetized symbols. */ - long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, - long, struct bfd_symbol **, - struct bfd_symbol **); + long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, + long, struct bfd_symbol **, + struct bfd_symbol **); /* Get the amount of memory required to hold the dynamic relocs. */ - long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); + long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); /* Read in the dynamic relocs. */ - long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, - struct bfd_symbol **); + long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, + struct bfd_symbol **); /* Opposite endian version of this target. */ const struct bfd_target *alternative_target; @@ -7756,31 +7751,31 @@ bfd_applicable_file_flags (const bfd *abfd) return abfd->xvec->object_flags; } -static inline bfd_boolean +static inline bool bfd_family_coff (const bfd *abfd) { return (bfd_get_flavour (abfd) == bfd_target_coff_flavour || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); } -static inline bfd_boolean +static inline bool bfd_big_endian (const bfd *abfd) { return abfd->xvec->byteorder == BFD_ENDIAN_BIG; } -static inline bfd_boolean +static inline bool bfd_little_endian (const bfd *abfd) { return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; } -static inline bfd_boolean +static inline bool bfd_header_big_endian (const bfd *abfd) { return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; } -static inline bfd_boolean +static inline bool bfd_header_little_endian (const bfd *abfd) { return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; @@ -7806,19 +7801,19 @@ bfd_asymbol_flavour (const asymbol *sy) return sy->the_bfd->xvec->flavour; } -static inline bfd_boolean +static inline bool bfd_keep_unused_section_symbols (const bfd *abfd) { return abfd->xvec->keep_unused_section_symbols; } -bfd_boolean bfd_set_default_target (const char *name); +bool bfd_set_default_target (const char *name); const bfd_target *bfd_find_target (const char *target_name, bfd *abfd); const bfd_target *bfd_get_target_info (const char *target_name, bfd *abfd, - bfd_boolean *is_bigendian, + bool *is_bigendian, int *underscoring, const char **def_target_arch); const char ** bfd_target_list (void); @@ -7830,12 +7825,12 @@ const bfd_target *bfd_iterate_over_targets const char *bfd_flavour_name (enum bfd_flavour flavour); /* Extracted from format.c. */ -bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); +bool bfd_check_format (bfd *abfd, bfd_format format); -bfd_boolean bfd_check_format_matches +bool bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching); -bfd_boolean bfd_set_format (bfd *abfd, bfd_format format); +bool bfd_set_format (bfd *abfd, bfd_format format); const char *bfd_format_string (bfd_format format); @@ -7851,19 +7846,19 @@ const char *bfd_format_string (bfd_format format); && bfd_is_abs_section ((H)->u.def.section) \ && !(H)->rel_from_abs) -bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); +bool bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) -bfd_boolean bfd_section_already_linked (bfd *abfd, +bool bfd_section_already_linked (bfd *abfd, asection *sec, struct bfd_link_info *info); #define bfd_section_already_linked(abfd, sec, info) \ BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) -bfd_boolean bfd_generic_define_common_symbol +bool bfd_generic_define_common_symbol (bfd *output_bfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h); @@ -7886,18 +7881,18 @@ struct bfd_link_hash_entry *bfd_generic_define_start_stop struct bfd_elf_version_tree * bfd_find_version_for_sym (struct bfd_elf_version_tree *verdefs, - const char *sym_name, bfd_boolean *hide); + const char *sym_name, bool *hide); -bfd_boolean bfd_hide_sym_by_version +bool bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); -bfd_boolean bfd_link_check_relocs +bool bfd_link_check_relocs (bfd *abfd, struct bfd_link_info *info); -bfd_boolean _bfd_generic_link_check_relocs +bool _bfd_generic_link_check_relocs (bfd *abfd, struct bfd_link_info *info); -bfd_boolean bfd_merge_private_bfd_data +bool bfd_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info); #define bfd_merge_private_bfd_data(ibfd, info) \ @@ -7908,28 +7903,28 @@ bfd_byte *bfd_simple_get_relocated_section_contents (bfd *abfd, asection *sec, bfd_byte *outbuf, asymbol **symbol_table); /* Extracted from compress.c. */ -bfd_boolean bfd_get_full_section_contents +bool bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); void bfd_cache_section_contents (asection *sec, void *contents); -bfd_boolean bfd_is_section_compressed_with_header +bool bfd_is_section_compressed_with_header (bfd *abfd, asection *section, int *compression_header_size_p, bfd_size_type *uncompressed_size_p, unsigned int *uncompressed_alignment_power_p); -bfd_boolean bfd_is_section_compressed +bool bfd_is_section_compressed (bfd *abfd, asection *section); -bfd_boolean bfd_init_section_decompress_status +bool bfd_init_section_decompress_status (bfd *abfd, asection *section); -bfd_boolean bfd_init_section_compress_status +bool bfd_init_section_compress_status (bfd *abfd, asection *section); -bfd_boolean bfd_compress_section +bool bfd_compress_section (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); #ifdef __cplusplus diff --git a/bfd/bfd.c b/bfd/bfd.c index 757fa5f281..abe50939e2 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -372,7 +372,7 @@ CODE_FRAGMENT . return abfd->filename; .} . -.static inline bfd_boolean +.static inline bool .bfd_get_cacheable (const bfd *abfd) .{ . return abfd->cacheable; @@ -420,13 +420,13 @@ CODE_FRAGMENT . return abfd->section_count; .} . -.static inline bfd_boolean +.static inline bool .bfd_has_map (const bfd *abfd) .{ . return abfd->has_armap; .} . -.static inline bfd_boolean +.static inline bool .bfd_is_thin_archive (const bfd *abfd) .{ . return abfd->is_thin_archive; @@ -439,15 +439,15 @@ CODE_FRAGMENT .} . .{* See note beside bfd_set_section_userdata. *} -.static inline bfd_boolean -.bfd_set_cacheable (bfd * abfd, bfd_boolean val) +.static inline bool +.bfd_set_cacheable (bfd * abfd, bool val) .{ . abfd->cacheable = val; -. return TRUE; +. return true; .} . .static inline void -.bfd_set_thin_archive (bfd *abfd, bfd_boolean val) +.bfd_set_thin_archive (bfd *abfd, bool val) .{ . abfd->is_thin_archive = val; .} @@ -582,7 +582,7 @@ CODE_FRAGMENT . abfd->sections = s; .} . -.static inline bfd_boolean +.static inline bool .bfd_section_removed_from_list (const bfd *abfd, const asection *s) .{ . return s->next ? s->next->prev != s : abfd->section_last != s; @@ -1615,7 +1615,7 @@ FUNCTION bfd_set_file_flags SYNOPSIS - bfd_boolean bfd_set_file_flags (bfd *abfd, flagword flags); + bool bfd_set_file_flags (bfd *abfd, flagword flags); DESCRIPTION Set the flag word in the BFD @var{abfd} to the value @var{flags}. @@ -1630,29 +1630,29 @@ DESCRIPTION */ -bfd_boolean +bool bfd_set_file_flags (bfd *abfd, flagword flags) { if (abfd->format != bfd_object) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } if (bfd_read_p (abfd)) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } abfd->flags = flags; if ((flags & bfd_applicable_file_flags (abfd)) != flags) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } - return TRUE; + return true; } void @@ -1769,7 +1769,7 @@ FUNCTION bfd_set_start_address SYNOPSIS - bfd_boolean bfd_set_start_address (bfd *abfd, bfd_vma vma); + bool bfd_set_start_address (bfd *abfd, bfd_vma vma); DESCRIPTION Make @var{vma} the entry point of output BFD @var{abfd}. @@ -1778,11 +1778,11 @@ RETURNS Returns <> on success, <> otherwise. */ -bfd_boolean +bool bfd_set_start_address (bfd *abfd, bfd_vma vma) { abfd->start_address = vma; - return TRUE; + return true; } /* @@ -1970,7 +1970,7 @@ FUNCTION bfd_copy_private_header_data SYNOPSIS - bfd_boolean bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); + bool bfd_copy_private_header_data (bfd *ibfd, bfd *obfd); DESCRIPTION Copy private BFD header information from the BFD @var{ibfd} to the @@ -1993,7 +1993,7 @@ FUNCTION bfd_copy_private_bfd_data SYNOPSIS - bfd_boolean bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); + bool bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd); DESCRIPTION Copy private BFD information from the BFD @var{ibfd} to the @@ -2014,7 +2014,7 @@ FUNCTION bfd_set_private_flags SYNOPSIS - bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); + bool bfd_set_private_flags (bfd *abfd, flagword flags); DESCRIPTION Set private BFD flag information in the BFD @var{abfd}. @@ -2132,7 +2132,7 @@ DESCRIPTION . .extern bfd_byte *bfd_get_relocated_section_contents . (bfd *, struct bfd_link_info *, struct bfd_link_order *, bfd_byte *, -. bfd_boolean, asymbol **); +. bool, asymbol **); . */ @@ -2142,12 +2142,12 @@ bfd_get_relocated_section_contents (bfd *abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { bfd *abfd2; bfd_byte *(*fn) (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **); + bfd_byte *, bool, asymbol **); if (link_order->type == bfd_indirect_link_order) { @@ -2165,15 +2165,15 @@ bfd_get_relocated_section_contents (bfd *abfd, /* Record information about an ELF program header. */ -bfd_boolean +bool bfd_record_phdr (bfd *abfd, unsigned long type, - bfd_boolean flags_valid, + bool flags_valid, flagword flags, - bfd_boolean at_valid, + bool at_valid, bfd_vma at, /* Bytes. */ - bfd_boolean includes_filehdr, - bfd_boolean includes_phdrs, + bool includes_filehdr, + bool includes_phdrs, unsigned int count, asection **secs) { @@ -2182,13 +2182,13 @@ bfd_record_phdr (bfd *abfd, unsigned int opb = bfd_octets_per_byte (abfd, NULL); if (bfd_get_flavour (abfd) != bfd_target_elf_flavour) - return TRUE; + return true; amt = sizeof (struct elf_segment_map); amt += ((bfd_size_type) count - 1) * sizeof (asection *); m = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (m == NULL) - return FALSE; + return false; m->p_type = type; m->p_flags = flags; @@ -2205,13 +2205,13 @@ bfd_record_phdr (bfd *abfd, ; *pm = m; - return TRUE; + return true; } #ifdef BFD64 /* Return true iff this target is 32-bit. */ -static bfd_boolean +static bool is32bit (bfd *abfd) { if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) @@ -2259,7 +2259,7 @@ FUNCTION bfd_alt_mach_code SYNOPSIS - bfd_boolean bfd_alt_mach_code (bfd *abfd, int alternative); + bool bfd_alt_mach_code (bfd *abfd, int alternative); DESCRIPTION @@ -2270,7 +2270,7 @@ DESCRIPTION machine codes. */ -bfd_boolean +bool bfd_alt_mach_code (bfd *abfd, int alternative) { if (bfd_get_flavour (abfd) == bfd_target_elf_flavour) @@ -2286,25 +2286,25 @@ bfd_alt_mach_code (bfd *abfd, int alternative) case 1: code = get_elf_backend_data (abfd)->elf_machine_alt1; if (code == 0) - return FALSE; + return false; break; case 2: code = get_elf_backend_data (abfd)->elf_machine_alt2; if (code == 0) - return FALSE; + return false; break; default: - return FALSE; + return false; } elf_elfheader (abfd)->e_machine = code; - return TRUE; + return true; } - return FALSE; + return false; } /* @@ -2340,7 +2340,7 @@ FUNCTION bfd_emul_get_commonpagesize SYNOPSIS - bfd_vma bfd_emul_get_commonpagesize (const char *, bfd_boolean); + bfd_vma bfd_emul_get_commonpagesize (const char *, bool); DESCRIPTION Returns the common page size, in bytes, as determined by @@ -2351,7 +2351,7 @@ RETURNS */ bfd_vma -bfd_emul_get_commonpagesize (const char *emul, bfd_boolean relro) +bfd_emul_get_commonpagesize (const char *emul, bool relro) { const bfd_target *target; @@ -2391,7 +2391,7 @@ bfd_demangle (bfd *abfd, const char *name, int options) char *res, *alloc; const char *pre, *suf; size_t pre_len; - bfd_boolean skip_lead; + bool skip_lead; skip_lead = (abfd != NULL && *name != '\0' @@ -2542,7 +2542,7 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents, bfd_check_compression_header SYNOPSIS - bfd_boolean bfd_check_compression_header + bool bfd_check_compression_header (bfd *abfd, bfd_byte *contents, asection *sec, bfd_size_type *uncompressed_size, unsigned int *uncompressed_alignment_power); @@ -2557,7 +2557,7 @@ RETURNS Return TRUE if the compression header is valid. */ -bfd_boolean +bool bfd_check_compression_header (bfd *abfd, bfd_byte *contents, asection *sec, bfd_size_type *uncompressed_size, @@ -2587,11 +2587,11 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents, { *uncompressed_size = chdr.ch_size; *uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign); - return TRUE; + return true; } } - return FALSE; + return false; } /* @@ -2686,7 +2686,7 @@ FUNCTION bfd_convert_section_contents SYNOPSIS - bfd_boolean bfd_convert_section_contents + bool bfd_convert_section_contents (bfd *ibfd, asection *isec, bfd *obfd, bfd_byte **ptr, bfd_size_type *ptr_size); @@ -2698,24 +2698,24 @@ DESCRIPTION function, and the new size written to @var{ptr_size}. */ -bfd_boolean +bool bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd, bfd_byte **ptr, bfd_size_type *ptr_size) { bfd_byte *contents; bfd_size_type ihdr_size, ohdr_size, size; Elf_Internal_Chdr chdr; - bfd_boolean use_memmove; + bool use_memmove; /* Do nothing if either input or output aren't ELF. */ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; /* Do nothing if ELF classes of input and output are the same. */ if (get_elf_backend_data (ibfd)->s->elfclass == get_elf_backend_data (obfd)->s->elfclass) - return TRUE; + return true; /* Convert GNU properties. */ if (startswith (isec->name, NOTE_GNU_PROPERTY_SECTION_NAME)) @@ -2724,18 +2724,18 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd, /* Do nothing if input file will be decompressed. */ if ((ibfd->flags & BFD_DECOMPRESS)) - return TRUE; + return true; /* Do nothing if the input section isn't a SHF_COMPRESSED section. */ ihdr_size = bfd_get_compression_header_size (ibfd, isec); if (ihdr_size == 0) - return TRUE; + return true; /* PR 25221. Check for corrupt input sections. */ if (ihdr_size > bfd_get_section_limit (ibfd, isec)) /* FIXME: Issue a warning about a corrupt compression header size field ? */ - return FALSE; + return false; contents = *ptr; @@ -2751,13 +2751,13 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd, ohdr_size = sizeof (Elf64_External_Chdr); - use_memmove = FALSE; + use_memmove = false; } else if (ihdr_size != sizeof (Elf64_External_Chdr)) { /* FIXME: Issue a warning about a corrupt compression header size field ? */ - return FALSE; + return false; } else { @@ -2767,7 +2767,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd, chdr.ch_addralign = bfd_get_64 (ibfd, &echdr->ch_addralign); ohdr_size = sizeof (Elf32_External_Chdr); - use_memmove = TRUE; + use_memmove = true; } size = bfd_section_size (isec) - ihdr_size + ohdr_size; @@ -2775,7 +2775,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd, { contents = (bfd_byte *) bfd_malloc (size); if (contents == NULL) - return FALSE; + return false; } /* Write out the output compression header. */ @@ -2806,7 +2806,7 @@ bfd_convert_section_contents (bfd *ibfd, sec_ptr isec, bfd *obfd, } *ptr_size = size; - return TRUE; + return true; } /* Get the linker information. */ diff --git a/bfd/bfdwin.c b/bfd/bfdwin.c index 2a823a84cd..be4682b2f5 100644 --- a/bfd/bfdwin.c +++ b/bfd/bfdwin.c @@ -104,12 +104,12 @@ bfd_free_window (bfd_window *windowp) static int ok_to_map = 1; -bfd_boolean +bool bfd_get_file_window (bfd *abfd, file_ptr offset, bfd_size_type size, bfd_window *windowp, - bfd_boolean writable) + bool writable) { static size_t pagesize; bfd_window_internal *i = windowp->i; @@ -131,7 +131,7 @@ bfd_get_file_window (bfd *abfd, { i = bfd_zmalloc (sizeof (bfd_window_internal)); if (i == NULL) - return FALSE; + return false; i->data = NULL; } #ifdef HAVE_MMAP @@ -199,7 +199,7 @@ bfd_get_file_window (bfd *abfd, i->mapped = 1; i->refcount = 1; windowp->i = i; - return TRUE; + return true; } else if (debug_windows) { @@ -231,7 +231,7 @@ bfd_get_file_window (bfd *abfd, if (size_to_alloc == 0) { windowp->i = i; - return TRUE; + return true; } goto free_and_fail; } @@ -254,12 +254,12 @@ bfd_get_file_window (bfd *abfd, windowp->data = i->data; windowp->size = i->size; windowp->i = i; - return TRUE; + return true; free_and_fail: /* We have a bfd_window_internal, but an error occurred. Free it. */ free (i); - return FALSE; + return false; } #endif /* USE_MMAP */ diff --git a/bfd/binary.c b/bfd/binary.c index 942c66bbd6..0761a0ba89 100644 --- a/bfd/binary.c +++ b/bfd/binary.c @@ -43,10 +43,10 @@ /* Create a binary object. Invoked via bfd_set_format. */ -static bfd_boolean +static bool binary_mkobject (bfd *abfd ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Any file may be considered to be a binary file, provided the target @@ -95,7 +95,7 @@ binary_object_p (bfd *abfd) /* Get contents of the only section. */ -static bfd_boolean +static bool binary_get_section_contents (bfd *abfd, asection *section, void * location, @@ -104,8 +104,8 @@ binary_get_section_contents (bfd *abfd, { if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bread (location, count, abfd) != count) - return FALSE; - return TRUE; + return false; + return true; } /* Return the amount of memory needed to read the symbol table. */ @@ -218,7 +218,7 @@ binary_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED, /* Write section contents of a binary file. */ -static bfd_boolean +static bool binary_set_section_contents (bfd *abfd, asection *sec, const void * data, @@ -226,18 +226,18 @@ binary_set_section_contents (bfd *abfd, bfd_size_type size) { if (size == 0) - return TRUE; + return true; if (! abfd->output_has_begun) { - bfd_boolean found_low; + bool found_low; bfd_vma low; asection *s; /* The lowest section LMA sets the virtual address of the start of the file. We use this to set the file position of all the sections. */ - found_low = FALSE; + found_low = false; low = 0; for (s = abfd->sections; s != NULL; s = s->next) if (((s->flags @@ -247,7 +247,7 @@ binary_set_section_contents (bfd *abfd, && (! found_low || s->lma < low)) { low = s->lma; - found_low = TRUE; + found_low = true; } for (s = abfd->sections; s != NULL; s = s->next) @@ -278,16 +278,16 @@ binary_set_section_contents (bfd *abfd, s); } - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; } /* We don't want to output anything for a section that is neither loaded nor allocated. The contents of such a section are not meaningful in the binary format. */ if ((sec->flags & (SEC_LOAD | SEC_ALLOC)) == 0) - return TRUE; + return true; if ((sec->flags & SEC_NEVER_LOAD) != 0) - return TRUE; + return true; return _bfd_generic_set_section_contents (abfd, sec, data, offset, size); } diff --git a/bfd/cache.c b/bfd/cache.c index 690fe57cfb..1935359c6e 100644 --- a/bfd/cache.c +++ b/bfd/cache.c @@ -160,16 +160,16 @@ snip (bfd *abfd) /* Close a BFD and remove it from the cache. */ -static bfd_boolean +static bool bfd_cache_delete (bfd *abfd) { - bfd_boolean ret; + bool ret; if (fclose ((FILE *) abfd->iostream) == 0) - ret = TRUE; + ret = true; else { - ret = FALSE; + ret = false; bfd_set_error (bfd_error_system_call); } @@ -184,7 +184,7 @@ bfd_cache_delete (bfd *abfd) /* We need to open a new file, and the cache is full. Find the least recently used cacheable BFD and close it. */ -static bfd_boolean +static bool close_one (void) { register bfd *to_kill; @@ -208,7 +208,7 @@ close_one (void) if (to_kill == NULL) { /* There are no open cacheable BFD's. */ - return TRUE; + return true; } to_kill->where = _bfd_real_ftell ((FILE *) to_kill->iostream); @@ -485,25 +485,25 @@ INTERNAL_FUNCTION bfd_cache_init SYNOPSIS - bfd_boolean bfd_cache_init (bfd *abfd); + bool bfd_cache_init (bfd *abfd); DESCRIPTION Add a newly opened BFD to the cache. */ -bfd_boolean +bool bfd_cache_init (bfd *abfd) { BFD_ASSERT (abfd->iostream != NULL); if (open_files >= bfd_cache_max_open ()) { if (! close_one ()) - return FALSE; + return false; } abfd->iovec = &cache_iovec; insert (abfd); ++open_files; - return TRUE; + return true; } /* @@ -511,7 +511,7 @@ INTERNAL_FUNCTION bfd_cache_close SYNOPSIS - bfd_boolean bfd_cache_close (bfd *abfd); + bool bfd_cache_close (bfd *abfd); DESCRIPTION Remove the BFD @var{abfd} from the cache. If the attached file is open, @@ -522,15 +522,15 @@ RETURNS returned if all is well. */ -bfd_boolean +bool bfd_cache_close (bfd *abfd) { if (abfd->iovec != &cache_iovec) - return TRUE; + return true; if (abfd->iostream == NULL) /* Previously closed. */ - return TRUE; + return true; return bfd_cache_delete (abfd); } @@ -540,7 +540,7 @@ FUNCTION bfd_cache_close_all SYNOPSIS - bfd_boolean bfd_cache_close_all (void); + bool bfd_cache_close_all (void); DESCRIPTION Remove all BFDs from the cache. If the attached file is open, @@ -551,10 +551,10 @@ RETURNS returned if all is well. */ -bfd_boolean +bool bfd_cache_close_all (void) { - bfd_boolean ret = TRUE; + bool ret = true; while (bfd_last_cache != NULL) ret &= bfd_cache_close (bfd_last_cache); @@ -580,7 +580,7 @@ DESCRIPTION FILE * bfd_open_file (bfd *abfd) { - abfd->cacheable = TRUE; /* Allow it to be closed later. */ + abfd->cacheable = true; /* Allow it to be closed later. */ if (open_files >= bfd_cache_max_open ()) { @@ -634,7 +634,7 @@ bfd_open_file (bfd *abfd) #endif abfd->iostream = _bfd_real_fopen (bfd_get_filename (abfd), FOPEN_WUB); - abfd->opened_once = TRUE; + abfd->opened_once = true; } break; } diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index 8031ab9590..15fea1fde3 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -118,45 +118,45 @@ static reloc_howto_type alpha_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ reloc_nil, /* special_function */ "IGNORE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32 bit reference to a symbol. */ HOWTO (ALPHA_R_REFLONG, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "REFLONG", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 64 bit reference to a symbol. */ HOWTO (ALPHA_R_REFQUAD, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "REFQUAD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit GP relative offset. This is just like REFLONG except that when the value is used the value of the gp register will be @@ -165,15 +165,15 @@ static reloc_howto_type alpha_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "GPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Used for an instruction that refers to memory off the GP register. The offset is 16 bits of the 32 bit instruction. This @@ -182,15 +182,15 @@ static reloc_howto_type alpha_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This reloc only appears immediately following a LITERAL reloc. It identifies a use of the literal. It seems that the linker can @@ -205,15 +205,15 @@ static reloc_howto_type alpha_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ reloc_nil, /* special_function */ "LITUSE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Load the gp register. This is always used for a ldah instruction which loads the upper 16 bits of the gp register. The next reloc @@ -230,15 +230,15 @@ static reloc_howto_type alpha_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ reloc_nil, /* special_function */ "GPDISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 21 bit branch. The native assembler generates these for branches within the text segment, and also fills in the PC @@ -247,90 +247,90 @@ static reloc_howto_type alpha_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "BRADDR", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A hint for a jump to a register. */ HOWTO (ALPHA_R_HINT, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 14, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "HINT", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3fff, /* src_mask */ 0x3fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit PC relative offset. */ HOWTO (ALPHA_R_SREL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "SREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit PC relative offset. */ HOWTO (ALPHA_R_SREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "SREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 64 bit PC relative offset. */ HOWTO (ALPHA_R_SREL64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "SREL64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Push a value on the reloc evaluation stack. */ HOWTO (ALPHA_R_OP_PUSH, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "OP_PUSH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Store the value from the stack at the given address. Store it in a bitfield of size r_size starting at bit position r_offset. */ @@ -338,15 +338,15 @@ static reloc_howto_type alpha_howto_table[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "OP_STORE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Subtract the reloc address from the value on the top of the relocation stack. */ @@ -354,15 +354,15 @@ static reloc_howto_type alpha_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "OP_PSUB", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Shift the value on the top of the relocation stack right by the given value. */ @@ -370,30 +370,30 @@ static reloc_howto_type alpha_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "OP_PRSHIFT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Adjust the GP value for a new range in the object file. */ HOWTO (ALPHA_R_GPVALUE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "GPVALUE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; /* Recognize an Alpha ECOFF file. */ @@ -436,14 +436,14 @@ alpha_ecoff_object_p (bfd *abfd) /* See whether the magic number matches. */ -static bfd_boolean +static bool alpha_ecoff_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED, void * filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; if (! ALPHA_ECOFF_BADMAG (*internal_f)) - return TRUE; + return true; if (ALPHA_ECOFF_COMPRESSEDMAG (*internal_f)) _bfd_error_handler @@ -451,7 +451,7 @@ alpha_ecoff_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED, "use compiler flags, or objZ, to generate uncompressed binaries"), abfd); - return FALSE; + return false; } /* This is a hook called by coff_real_object_p to create any backend @@ -727,7 +727,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { bfd *input_bfd = link_order->u.indirect.section->owner; @@ -737,7 +737,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd, long reloc_count; bfd *output_bfd = relocatable ? abfd : (bfd *) NULL; bfd_vma gp; - bfd_boolean gp_undefined; + bool gp_undefined; bfd_vma stack[RELOC_STACKSIZE]; int tos = 0; @@ -766,7 +766,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd, goto successful_return; /* Get the GP value for the output BFD. */ - gp_undefined = FALSE; + gp_undefined = false; gp = _bfd_get_gp_value (abfd); if (gp == 0) { @@ -794,11 +794,11 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd, { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (link_info->hash, "_gp", FALSE, FALSE, - TRUE); + h = bfd_link_hash_lookup (link_info->hash, "_gp", false, false, + true); if (h == (struct bfd_link_hash_entry *) NULL || h->type != bfd_link_hash_defined) - gp_undefined = TRUE; + gp_undefined = true; else { gp = (h->u.def.value @@ -1086,7 +1086,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd, case ALPHA_R_GPVALUE: /* I really don't know if this does the right thing. */ gp = rel->addend; - gp_undefined = FALSE; + gp_undefined = false; break; default: @@ -1109,7 +1109,7 @@ alpha_ecoff_get_relocated_section_contents (bfd *abfd, case bfd_reloc_undefined: (*link_info->callbacks->undefined_symbol) (link_info, bfd_asymbol_name (*rel->sym_ptr_ptr), - input_bfd, input_section, rel->address, TRUE); + input_bfd, input_section, rel->address, true); break; case bfd_reloc_dangerous: (*link_info->callbacks->reloc_dangerous) @@ -1331,7 +1331,7 @@ alpha_convert_external_reloc (bfd *output_bfd ATTRIBUTE_UNUSED, quite similar to get_relocated_section_contents. Perhaps they could be combined somehow. */ -static bfd_boolean +static bool alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -1342,7 +1342,7 @@ alpha_relocate_section (bfd *output_bfd, asection **symndx_to_section, *lita_sec; struct ecoff_link_hash_entry **sym_hashes; bfd_vma gp; - bfd_boolean gp_undefined; + bool gp_undefined; bfd_vma stack[RELOC_STACKSIZE]; int tos = 0; struct external_reloc *ext_rel; @@ -1358,7 +1358,7 @@ alpha_relocate_section (bfd *output_bfd, amt = NUM_RELOC_SECTIONS * sizeof (asection *); symndx_to_section = (asection **) bfd_alloc (input_bfd, amt); if (!symndx_to_section) - return FALSE; + return false; symndx_to_section[RELOC_SECTION_NONE] = NULL; symndx_to_section[RELOC_SECTION_TEXT] = @@ -1447,7 +1447,7 @@ alpha_relocate_section (bfd *output_bfd, _("using multiple gp values"), (char *) NULL, output_bfd, (asection *) NULL, (bfd_vma) 0); - ecoff_data (output_bfd)->issued_multiple_gp_warning = TRUE; + ecoff_data (output_bfd)->issued_multiple_gp_warning = true; } if (lita_vma < gp - 0x8000) gp = lita_vma + lita_size - 0x8000; @@ -1477,9 +1477,9 @@ alpha_relocate_section (bfd *output_bfd, int r_extern; int r_offset; int r_size; - bfd_boolean relocatep; - bfd_boolean adjust_addrp; - bfd_boolean gp_usedp; + bool relocatep; + bool adjust_addrp; + bool gp_usedp; bfd_vma addend; r_vaddr = H_GET_64 (input_bfd, ext_rel->r_vaddr); @@ -1494,9 +1494,9 @@ alpha_relocate_section (bfd *output_bfd, r_size = ((ext_rel->r_bits[3] & RELOC_BITS3_SIZE_LITTLE) >> RELOC_BITS3_SIZE_SH_LITTLE); - relocatep = FALSE; - adjust_addrp = TRUE; - gp_usedp = FALSE; + relocatep = false; + adjust_addrp = true; + gp_usedp = false; addend = 0; switch (r_type) @@ -1530,13 +1530,13 @@ alpha_relocate_section (bfd *output_bfd, if (bfd_link_relocatable (info)) H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr, ext_rel->r_vaddr); - adjust_addrp = FALSE; + adjust_addrp = false; break; case ALPHA_R_REFLONG: case ALPHA_R_REFQUAD: case ALPHA_R_HINT: - relocatep = TRUE; + relocatep = true; break; case ALPHA_R_BRADDR: @@ -1545,7 +1545,7 @@ alpha_relocate_section (bfd *output_bfd, case ALPHA_R_SREL64: if (r_extern) addend += - (r_vaddr + 4); - relocatep = TRUE; + relocatep = true; break; case ALPHA_R_GPREL32: @@ -1553,9 +1553,9 @@ alpha_relocate_section (bfd *output_bfd, bit offset from the current GP value. We must adjust it by the different between the original GP value and the current GP value. */ - relocatep = TRUE; + relocatep = true; addend = ecoff_data (input_bfd)->gp - gp; - gp_usedp = TRUE; + gp_usedp = true; break; case ALPHA_R_LITERAL: @@ -1586,9 +1586,9 @@ alpha_relocate_section (bfd *output_bfd, || ((insn >> 26) & 0x3f) == 0x28); } - relocatep = TRUE; + relocatep = true; addend = ecoff_data (input_bfd)->gp - gp; - gp_usedp = TRUE; + gp_usedp = true; break; case ALPHA_R_LITUSE: @@ -1652,7 +1652,7 @@ alpha_relocate_section (bfd *output_bfd, bfd_put_32 (input_bfd, (bfd_vma) insn2, contents + r_vaddr - input_section->vma + r_symndx); - gp_usedp = TRUE; + gp_usedp = true; } break; @@ -1695,7 +1695,7 @@ alpha_relocate_section (bfd *output_bfd, relocated. */ (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, - input_section, (bfd_vma) 0, TRUE); + input_section, (bfd_vma) 0, true); addend = 0; } } @@ -1750,7 +1750,7 @@ alpha_relocate_section (bfd *output_bfd, } } - adjust_addrp = FALSE; + adjust_addrp = false; break; case ALPHA_R_OP_STORE: @@ -1787,7 +1787,7 @@ alpha_relocate_section (bfd *output_bfd, case ALPHA_R_GPVALUE: /* I really don't know if this does the right thing. */ gp = ecoff_data (input_bfd)->gp + r_symndx; - gp_undefined = FALSE; + gp_undefined = false; break; } @@ -1892,7 +1892,7 @@ alpha_relocate_section (bfd *output_bfd, { (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - r_vaddr - input_section->vma, TRUE); + r_vaddr - input_section->vma, true); relocation = 0; } } @@ -1962,20 +1962,20 @@ alpha_relocate_section (bfd *output_bfd, /* Only give the error once per link. */ gp = 4; _bfd_set_gp_value (output_bfd, gp); - gp_undefined = FALSE; + gp_undefined = false; } } if (tos != 0) abort (); - return TRUE; + return true; } /* Do final adjustments to the filehdr and the aouthdr. This routine sets the dynamic bits in the file header. */ -static bfd_boolean +static bool alpha_adjust_headers (bfd *abfd, struct internal_filehdr *fhdr, struct internal_aouthdr *ahdr ATTRIBUTE_UNUSED) @@ -1984,7 +1984,7 @@ alpha_adjust_headers (bfd *abfd, fhdr->f_flags |= F_ALPHA_CALL_SHARED; else if ((abfd->flags & DYNAMIC) != 0) fhdr->f_flags |= F_ALPHA_SHARABLE; - return TRUE; + return true; } /* Archive handling. In OSF/1 (or Digital Unix) v3.2, Digital @@ -2163,7 +2163,7 @@ alpha_ecoff_get_elt_at_filepos (bfd *archive, file_ptr filepos) bim->size = size; bim->buffer = buf; - nbfd->mtime_set = TRUE; + nbfd->mtime_set = true; nbfd->mtime = strtol (hdr->ar_date, (char **) NULL, 10); nbfd->flags |= BFD_IN_MEMORY; @@ -2303,8 +2303,8 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = alpha_ecoff_swap_coff_reloc_out, alpha_ecoff_swap_filehdr_out, alpha_ecoff_swap_aouthdr_out, alpha_ecoff_swap_scnhdr_out, - FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, - ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, + FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, + ECOFF_NO_LONG_SECTION_NAMES, 4, false, 2, 32768, alpha_ecoff_swap_filehdr_in, alpha_ecoff_swap_aouthdr_in, alpha_ecoff_swap_scnhdr_in, NULL, alpha_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, @@ -2323,7 +2323,7 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = /* TRUE if the .rdata section is part of the text segment, as on the Alpha. FALSE if .rdata is part of the data segment, as on the MIPS. */ - TRUE, + true, /* Bitsize of constructor entries. */ 64, /* Reloc to use for constructor entries. */ diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c index 694350331d..89f6926fd0 100644 --- a/bfd/coff-arm.c +++ b/bfd/coff-arm.c @@ -167,7 +167,7 @@ coff_arm_reloc (bfd *abfd, #endif #ifndef PCRELOFFSET -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #endif /* These most certainly belong somewhere else. Just had to get rid of @@ -223,12 +223,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 2, 2, 24, - TRUE, + true, 0, complain_overflow_dont, aoutarm_fix_pcrel_26_done, "ARM_26D", - TRUE, /* partial_inplace. */ + true, /* partial_inplace. */ 0x00ffffff, 0x0, PCRELOFFSET), @@ -236,12 +236,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 2, 32, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_32", - TRUE, /* partial_inplace. */ + true, /* partial_inplace. */ 0xffffffff, 0xffffffff, PCRELOFFSET), @@ -249,12 +249,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 2, 32, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_RVA32", - TRUE, /* partial_inplace. */ + true, /* partial_inplace. */ 0xffffffff, 0xffffffff, PCRELOFFSET), @@ -262,12 +262,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 2, 2, 24, - TRUE, + true, 0, complain_overflow_signed, aoutarm_fix_pcrel_26 , "ARM_26", - FALSE, + false, 0x00ffffff, 0x00ffffff, PCRELOFFSET), @@ -275,12 +275,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 1, 1, 11, - TRUE, + true, 0, complain_overflow_signed, coff_thumb_pcrel_12 , "ARM_THUMB12", - FALSE, + false, 0x000007ff, 0x000007ff, PCRELOFFSET), @@ -297,12 +297,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 1, 16, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_SECTION", - TRUE, /* partial_inplace. */ + true, /* partial_inplace. */ 0x0000ffff, 0x0000ffff, PCRELOFFSET), @@ -310,12 +310,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 2, 32, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_SECREL", - TRUE, /* partial_inplace. */ + true, /* partial_inplace. */ 0xffffffff, 0xffffffff, PCRELOFFSET), @@ -324,12 +324,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 0, 8, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_8", - TRUE, + true, 0x000000ff, 0x000000ff, PCRELOFFSET), @@ -337,12 +337,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 1, 16, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_16", - TRUE, + true, 0x0000ffff, 0x0000ffff, PCRELOFFSET), @@ -350,12 +350,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 2, 32, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_32", - TRUE, + true, 0xffffffff, 0xffffffff, PCRELOFFSET), @@ -363,12 +363,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 2, 2, 24, - TRUE, + true, 0, complain_overflow_signed, aoutarm_fix_pcrel_26 , "ARM_26", - FALSE, + false, 0x00ffffff, 0x00ffffff, PCRELOFFSET), @@ -376,92 +376,92 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 0, 0, 8, - TRUE, + true, 0, complain_overflow_signed, coff_arm_reloc, "ARM_DISP8", - TRUE, + true, 0x000000ff, 0x000000ff, - TRUE), + true), HOWTO (ARM_DISP16, 0, 1, 16, - TRUE, + true, 0, complain_overflow_signed, coff_arm_reloc, "ARM_DISP16", - TRUE, + true, 0x0000ffff, 0x0000ffff, - TRUE), + true), HOWTO (ARM_DISP32, 0, 2, 32, - TRUE, + true, 0, complain_overflow_signed, coff_arm_reloc, "ARM_DISP32", - TRUE, + true, 0xffffffff, 0xffffffff, - TRUE), + true), HOWTO (ARM_26D, 2, 2, 24, - FALSE, + false, 0, complain_overflow_dont, aoutarm_fix_pcrel_26_done, "ARM_26D", - TRUE, + true, 0x00ffffff, 0x0, - FALSE), + false), /* 8 is unused */ EMPTY_HOWTO (-1), HOWTO (ARM_NEG16, 0, -1, 16, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_NEG16", - TRUE, + true, 0x0000ffff, 0x0000ffff, - FALSE), + false), HOWTO (ARM_NEG32, 0, -2, 32, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_NEG32", - TRUE, + true, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (ARM_RVA32, 0, 2, 32, - FALSE, + false, 0, complain_overflow_bitfield, coff_arm_reloc, "ARM_RVA32", - TRUE, + true, 0xffffffff, 0xffffffff, PCRELOFFSET), @@ -469,12 +469,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 1, 1, 8, - TRUE, + true, 0, complain_overflow_signed, coff_thumb_pcrel_9 , "ARM_THUMB9", - FALSE, + false, 0x000000ff, 0x000000ff, PCRELOFFSET), @@ -482,12 +482,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 1, 1, 11, - TRUE, + true, 0, complain_overflow_signed, coff_thumb_pcrel_12 , "ARM_THUMB12", - FALSE, + false, 0x000007ff, 0x000007ff, PCRELOFFSET), @@ -495,12 +495,12 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = 1, 2, 22, - TRUE, + true, 0, complain_overflow_signed, coff_thumb_pcrel_23 , "ARM_THUMB23", - FALSE, + false, 0x07ff07ff, 0x07ff07ff, PCRELOFFSET) @@ -513,7 +513,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] = /* Return TRUE if this relocation should appear in the output .reloc section. */ -static bfd_boolean +static bool in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type * howto) { @@ -942,7 +942,7 @@ coff_arm_link_hash_table_create (bfd * abfd) return & ret->root.root; } -static bfd_boolean +static bool arm_emit_base_file_entry (struct bfd_link_info *info, bfd *output_bfd, asection *input_section, @@ -956,10 +956,10 @@ arm_emit_base_file_entry (struct bfd_link_info *info, if (coff_data (output_bfd)->pe) addr -= pe_data (output_bfd)->pe_opthdr.ImageBase; if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1) - return TRUE; + return true; bfd_set_error (bfd_error_system_call); - return FALSE; + return false; } #ifndef ARM_WINCE @@ -1035,7 +1035,7 @@ find_thumb_glue (struct bfd_link_info *info, sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name); myh = coff_link_hash_lookup - (coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); + (coff_hash_table (info), tmp_name, false, false, true); if (myh == NULL) /* xgettext:c-format */ @@ -1064,7 +1064,7 @@ find_arm_glue (struct bfd_link_info *info, sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); myh = coff_link_hash_lookup - (coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); + (coff_hash_table (info), tmp_name, false, false, true); if (myh == NULL) /* xgettext:c-format */ @@ -1165,7 +1165,7 @@ static const insn32 t2a6_bx_insn = 0xe12fff1e; ARM/Thumb builds. It is only the code marked THUMBEXTENSION that is different from the original. */ -static bfd_boolean +static bool coff_arm_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -1222,7 +1222,7 @@ coff_arm_relocate_section (bfd *output_bfd, howto = coff_rtype_to_howto (input_bfd, input_section, rel, h, sym, &addend); if (howto == NULL) - return FALSE; + return false; /* The relocation_section function will skip pcrel_offset relocs when doing a relocatable link. However, we want to convert @@ -1243,15 +1243,15 @@ coff_arm_relocate_section (bfd *output_bfd, 2, 2, 24, - TRUE, + true, 0, complain_overflow_signed, aoutarm_fix_pcrel_26 , "ARM_26", - TRUE, + true, 0x00ffffff, 0x00ffffff, - FALSE); + false); addend -= rel->r_vaddr - input_section->vma; #ifdef ARM_WINCE @@ -1347,7 +1347,7 @@ coff_arm_relocate_section (bfd *output_bfd, myh = find_arm_glue (info, name, input_bfd); if (myh == NULL) - return FALSE; + return false; globals = coff_arm_hash_table (info); @@ -1389,7 +1389,7 @@ coff_arm_relocate_section (bfd *output_bfd, if (info->base_file && !arm_emit_base_file_entry (info, output_bfd, s, my_offset + 8)) - return FALSE; + return false; } BFD_ASSERT (my_offset <= globals->arm_glue_size); @@ -1435,7 +1435,7 @@ coff_arm_relocate_section (bfd *output_bfd, myh = find_thumb_glue (info, name, input_bfd); if (myh == NULL) - return FALSE; + return false; globals = coff_arm_hash_table (info); @@ -1496,7 +1496,7 @@ coff_arm_relocate_section (bfd *output_bfd, && !arm_emit_base_file_entry (info, output_bfd, s, my_offset + 16)) - return FALSE; + return false; } else { @@ -1574,7 +1574,7 @@ coff_arm_relocate_section (bfd *output_bfd, else if (! bfd_link_relocatable (info)) (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, TRUE); + rel->r_vaddr - input_section->vma, true); } /* Emit a reloc if the backend thinks it needs it. */ @@ -1583,7 +1583,7 @@ coff_arm_relocate_section (bfd *output_bfd, && pe_data(output_bfd)->in_reloc_p(output_bfd, howto) && !arm_emit_base_file_entry (info, output_bfd, input_section, rel->r_vaddr)) - return FALSE; + return false; if (done) rstat = bfd_reloc_ok; @@ -1608,7 +1608,7 @@ coff_arm_relocate_section (bfd *output_bfd, { bfd_vma relocation = val + addend; int size = bfd_get_reloc_size (howto); - bfd_boolean overflow = FALSE; + bool overflow = false; bfd_byte *location = contents + address; bfd_vma x = bfd_get_32 (input_bfd, location); bfd_vma src_mask = 0x007FFFFE; @@ -1674,7 +1674,7 @@ coff_arm_relocate_section (bfd *output_bfd, /* Assumes two's complement. */ if ( signed_check > reloc_signed_max || signed_check < reloc_signed_min) - overflow = TRUE; + overflow = true; /* Put the relocation into the correct bits. For a BLX instruction, make sure that the relocation is rounded up @@ -1718,13 +1718,13 @@ coff_arm_relocate_section (bfd *output_bfd, { /* Determine if we need to set the bottom bit of a relocated address because the address is the address of a Thumb code symbol. */ - int patchit = FALSE; + int patchit = false; if (h != NULL && ( h->symbol_class == C_THUMBSTATFUNC || h->symbol_class == C_THUMBEXTFUNC)) { - patchit = TRUE; + patchit = true; } else if (sym != NULL && sym->n_scnum > N_UNDEF) @@ -1732,7 +1732,7 @@ coff_arm_relocate_section (bfd *output_bfd, /* No hash entry - use the symbol instead. */ if ( sym->n_sclass == C_THUMBSTATFUNC || sym->n_sclass == C_THUMBEXTFUNC) - patchit = TRUE; + patchit = true; } if (patchit) @@ -1755,7 +1755,7 @@ coff_arm_relocate_section (bfd *output_bfd, /* xgettext:c-format */ (_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"), input_bfd, (uint64_t) rel->r_vaddr, input_section); - return FALSE; + return false; case bfd_reloc_overflow: { const char *name; @@ -1769,7 +1769,7 @@ coff_arm_relocate_section (bfd *output_bfd, { name = _bfd_coff_internal_syment_name (input_bfd, sym, buf); if (name == NULL) - return FALSE; + return false; } (*info->callbacks->reloc_overflow) @@ -1780,12 +1780,12 @@ coff_arm_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } #ifndef COFF_IMAGE_WITH_PE -bfd_boolean +bool bfd_arm_allocate_interworking_sections (struct bfd_link_info * info) { asection * s; @@ -1826,7 +1826,7 @@ bfd_arm_allocate_interworking_sections (struct bfd_link_info * info) s->contents = foo; } - return TRUE; + return true; } static void @@ -1860,7 +1860,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * info, sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); myh = coff_link_hash_lookup - (coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); + (coff_hash_table (info), tmp_name, false, false, true); if (myh != NULL) { @@ -1875,7 +1875,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * info, bh = NULL; val = globals->arm_glue_size + 1; bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, - BSF_GLOBAL, s, val, NULL, TRUE, FALSE, &bh); + BSF_GLOBAL, s, val, NULL, true, false, &bh); free (tmp_name); @@ -1916,7 +1916,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info, sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name); myh = coff_link_hash_lookup - (coff_hash_table (info), tmp_name, FALSE, FALSE, TRUE); + (coff_hash_table (info), tmp_name, false, false, true); if (myh != NULL) { @@ -1928,7 +1928,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info, bh = NULL; val = globals->thumb_glue_size + 1; bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, - BSF_GLOBAL, s, val, NULL, TRUE, FALSE, &bh); + BSF_GLOBAL, s, val, NULL, true, false, &bh); /* If we mark it 'thumb', the disassembler will do a better job. */ myh = (struct coff_link_hash_entry *) bh; @@ -1951,7 +1951,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info, bh = NULL; val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4); bfd_coff_link_add_one_symbol (info, globals->bfd_of_glue_owner, tmp_name, - BSF_LOCAL, s, val, NULL, TRUE, FALSE, &bh); + BSF_LOCAL, s, val, NULL, true, false, &bh); free (tmp_name); @@ -1965,7 +1965,7 @@ record_thumb_to_arm_glue (struct bfd_link_info * info, This function is called from the linker scripts in ld/emultempl/ {armcoff/pe}.em */ -bfd_boolean +bool bfd_arm_get_bfd_for_interworking (bfd * abfd, struct bfd_link_info * info) { @@ -1976,14 +1976,14 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd, /* If we are only performing a partial link do not bother getting a bfd to hold the glue. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; globals = coff_arm_hash_table (info); BFD_ASSERT (globals != NULL); if (globals->bfd_of_glue_owner != NULL) - return TRUE; + return true; sec = bfd_get_section_by_name (abfd, ARM2THUMB_GLUE_SECTION_NAME); @@ -1995,7 +1995,7 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd, flags); if (sec == NULL || !bfd_set_section_alignment (sec, 2)) - return FALSE; + return false; } sec = bfd_get_section_by_name (abfd, THUMB2ARM_GLUE_SECTION_NAME); @@ -2009,16 +2009,16 @@ bfd_arm_get_bfd_for_interworking (bfd * abfd, if (sec == NULL || !bfd_set_section_alignment (sec, 2)) - return FALSE; + return false; } /* Save the bfd for later use. */ globals->bfd_of_glue_owner = abfd; - return TRUE; + return true; } -bfd_boolean +bool bfd_arm_process_before_allocation (bfd * abfd, struct bfd_link_info * info, int support_old_code) @@ -2029,7 +2029,7 @@ bfd_arm_process_before_allocation (bfd * abfd, /* If we are only performing a partial link do not bother to construct any glue. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; /* Here we have a bfd that is to be included on the link. We have a hook to do reloc rummaging, before section sizes are nailed down. */ @@ -2046,7 +2046,7 @@ bfd_arm_process_before_allocation (bfd * abfd, sec = abfd->sections; if (sec == NULL) - return TRUE; + return true; for (; sec != NULL; sec = sec->next) { @@ -2130,7 +2130,7 @@ bfd_arm_process_before_allocation (bfd * abfd, } } - return TRUE; + return true; } #endif /* ! defined (COFF_IMAGE_WITH_PE) */ @@ -2151,13 +2151,13 @@ bfd_arm_process_before_allocation (bfd * abfd, /* When doing a relocatable link, we want to convert ARM_26 relocs into ARM_26D relocs. */ -static bfd_boolean +static bool coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, bfd *ibfd, asection *sec, struct internal_reloc *irel, - bfd_boolean *adjustedp) + bool *adjustedp) { if (irel->r_type == ARM_26) { @@ -2170,8 +2170,8 @@ coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED, && h->root.u.def.section->output_section == sec->output_section) irel->r_type = ARM_26D; } - *adjustedp = FALSE; - return TRUE; + *adjustedp = false; + return true; } /* Called when merging the private data areas of two BFDs. @@ -2179,26 +2179,26 @@ coff_arm_adjust_symndx (bfd *obfd ATTRIBUTE_UNUSED, attempting to merge binaries compiled for different ARM targets, eg different CPUs or different APCS's. */ -static bfd_boolean +static bool coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; BFD_ASSERT (ibfd != NULL && obfd != NULL); if (ibfd == obfd) - return TRUE; + return true; /* If the two formats are different we cannot merge anything. This is not an error, since it is permissable to change the input and output formats. */ if ( ibfd->xvec->flavour != bfd_target_coff_flavour || obfd->xvec->flavour != bfd_target_coff_flavour) - return TRUE; + return true; /* Determine what should happen if the input ARM architecture does not match the output ARM architecture. */ if (! bfd_arm_merge_machines (ibfd, obfd)) - return FALSE; + return false; /* Verify that the APCS is the same for the two BFDs. */ if (APCS_SET (ibfd)) @@ -2217,7 +2217,7 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) ); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } if (APCS_FLOAT_FLAG (obfd) != APCS_FLOAT_FLAG (ibfd)) @@ -2236,7 +2236,7 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) ibfd, obfd); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } if (PIC_FLAG (obfd) != PIC_FLAG (ibfd)) @@ -2255,7 +2255,7 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) ibfd, obfd); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } else @@ -2294,12 +2294,12 @@ coff_arm_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) } } - return TRUE; + return true; } /* Display the flags field. */ -static bfd_boolean +static bool coff_arm_print_private_bfd_data (bfd * abfd, void * ptr) { FILE * file = (FILE *) ptr; @@ -2333,7 +2333,7 @@ coff_arm_print_private_bfd_data (bfd * abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } /* Copies the given flags into the coff_tdata.flags field. @@ -2343,7 +2343,7 @@ coff_arm_print_private_bfd_data (bfd * abfd, void * ptr) Note: Although this function is static, it is explicitly called from both coffcode.h and peicode.h. */ -static bfd_boolean +static bool _bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags) { flagword flag; @@ -2359,7 +2359,7 @@ _bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags) || (APCS_FLOAT_FLAG (abfd) != (flags & F_APCS_FLOAT)) || (PIC_FLAG (abfd) != (flags & F_PIC)) )) - return FALSE; + return false; flag |= (flags & (F_APCS_FLOAT | F_PIC)); @@ -2384,24 +2384,24 @@ _bfd_coff_arm_set_private_flags (bfd * abfd, flagword flags) SET_INTERWORK_FLAG (abfd, flag); - return TRUE; + return true; } /* Copy the important parts of the target specific data from one instance of a BFD to another. */ -static bfd_boolean +static bool coff_arm_copy_private_bfd_data (bfd * src, bfd * dest) { BFD_ASSERT (src != NULL && dest != NULL); if (src == dest) - return TRUE; + return true; /* If the destination is not in the same format as the source, do not do the copy. */ if (src->xvec != dest->xvec) - return TRUE; + return true; /* Copy the flags field. */ if (APCS_SET (src)) @@ -2410,13 +2410,13 @@ coff_arm_copy_private_bfd_data (bfd * src, bfd * dest) { /* If the src and dest have different APCS flag bits set, fail. */ if (APCS_26_FLAG (dest) != APCS_26_FLAG (src)) - return FALSE; + return false; if (APCS_FLOAT_FLAG (dest) != APCS_FLOAT_FLAG (src)) - return FALSE; + return false; if (PIC_FLAG (dest) != PIC_FLAG (src)) - return FALSE; + return false; } else SET_APCS_FLAGS (dest, APCS_26_FLAG (src) | APCS_FLOAT_FLAG (src) @@ -2450,7 +2450,7 @@ coff_arm_copy_private_bfd_data (bfd * src, bfd * dest) } } - return TRUE; + return true; } /* Note: the definitions here of LOCAL_LABEL_PREFIX and USER_LABEL_PREIFX @@ -2468,7 +2468,7 @@ coff_arm_copy_private_bfd_data (bfd * src, bfd * dest) b) Allow other prefixes than ".", e.g. an empty prefix would cause all labels of the form Lxxx to be stripped. */ -static bfd_boolean +static bool coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name) { @@ -2478,7 +2478,7 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, size_t len = strlen (USER_LABEL_PREFIX); if (strncmp (name, USER_LABEL_PREFIX, len) == 0) - return FALSE; + return false; } #endif @@ -2491,7 +2491,7 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, size_t len = strlen (LOCAL_LABEL_PREFIX); if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0) - return FALSE; + return false; /* Perform the checks below for the rest of the name. */ name += len; @@ -2507,14 +2507,14 @@ coff_arm_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, This does depend on bfd_make_section attaching a new section to the end of the section list for the bfd. */ -static bfd_boolean +static bool coff_arm_link_output_has_begun (bfd * sub, struct coff_final_link_info * info) { return (sub->output_has_begun || sub == coff_arm_hash_table (info->info)->bfd_of_glue_owner); } -static bfd_boolean +static bool coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED, struct coff_final_link_info * pfinfo) { @@ -2527,9 +2527,9 @@ coff_arm_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED, if (globals->bfd_of_glue_owner != NULL) { if (! _bfd_coff_link_input_bfd (pfinfo, globals->bfd_of_glue_owner)) - return FALSE; + return false; - globals->bfd_of_glue_owner->output_has_begun = TRUE; + globals->bfd_of_glue_owner->output_has_begun = true; } return bfd_arm_update_notes (abfd, ARM_NOTE_SECTION); diff --git a/bfd/coff-arm.h b/bfd/coff-arm.h index 3d735d0e6f..7260b71a69 100644 --- a/bfd/coff-arm.h +++ b/bfd/coff-arm.h @@ -19,11 +19,11 @@ MA 02110-1301, USA. */ /* ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_arm_allocate_interworking_sections +extern bool bfd_arm_allocate_interworking_sections (struct bfd_link_info *); -extern bfd_boolean bfd_arm_process_before_allocation +extern bool bfd_arm_process_before_allocation (bfd *, struct bfd_link_info *, int); -extern bfd_boolean bfd_arm_get_bfd_for_interworking +extern bool bfd_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); diff --git a/bfd/coff-bfd.c b/bfd/coff-bfd.c index 6e15bdc716..8af084ef29 100644 --- a/bfd/coff-bfd.c +++ b/bfd/coff-bfd.c @@ -27,7 +27,7 @@ /* Return the COFF syment for a symbol. */ -bfd_boolean +bool bfd_coff_get_syment (bfd *abfd, asymbol *symbol, struct internal_syment *psyment) @@ -39,7 +39,7 @@ bfd_coff_get_syment (bfd *abfd, || ! csym->native->is_sym) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } *psyment = csym->native->u.syment; @@ -50,12 +50,12 @@ bfd_coff_get_syment (bfd *abfd, /* FIXME: We should handle fix_line here. */ - return TRUE; + return true; } /* Return the COFF auxent for a symbol. */ -bfd_boolean +bool bfd_coff_get_auxent (bfd *abfd, asymbol *symbol, int indx, @@ -72,7 +72,7 @@ bfd_coff_get_auxent (bfd *abfd, || indx >= csym->native->u.syment.n_numaux) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } ent = csym->native + indx + 1; @@ -95,5 +95,5 @@ bfd_coff_get_auxent (bfd *abfd, ((combined_entry_type *) pauxent->x_csect.x_scnlen.p - obj_raw_syments (abfd)); - return TRUE; + return true; } diff --git a/bfd/coff-bfd.h b/bfd/coff-bfd.h index cfc5201078..e735148ad2 100644 --- a/bfd/coff-bfd.h +++ b/bfd/coff-bfd.h @@ -44,13 +44,13 @@ struct coff_section_tdata /* The relocs, swapped into COFF internal form. This may be NULL. */ struct internal_reloc *relocs; /* If this is TRUE, the relocs entry may not be freed. */ - bfd_boolean keep_relocs; + bool keep_relocs; /* The section contents. This may be NULL. */ bfd_byte *contents; /* If this is TRUE, the contents entry may not be freed. */ - bfd_boolean keep_contents; + bool keep_contents; /* Information cached by coff_find_nearest_line. */ - bfd_boolean saved_bias; + bool saved_bias; bfd_signed_vma bias; bfd_vma offset; unsigned int i; @@ -81,11 +81,11 @@ struct coff_section_tdata struct internal_syment; union internal_auxent; -extern bfd_boolean bfd_coff_get_syment +extern bool bfd_coff_get_syment (bfd *, struct bfd_symbol *, struct internal_syment *); -extern bfd_boolean bfd_coff_get_auxent +extern bool bfd_coff_get_auxent (bfd *, struct bfd_symbol *, int, union internal_auxent *); -extern bfd_boolean bfd_coff_set_symbol_class +extern bool bfd_coff_set_symbol_class (bfd *, struct bfd_symbol *, unsigned int); diff --git a/bfd/coff-go32.c b/bfd/coff-go32.c index ca33648804..d73c32b215 100644 --- a/bfd/coff-go32.c +++ b/bfd/coff-go32.c @@ -51,7 +51,7 @@ /* The following functions are not static, because they are also used for coff-go32-exe (coff-stgo32.c). */ -bfd_boolean _bfd_go32_mkobject (bfd *); +bool _bfd_go32_mkobject (bfd *); void _bfd_go32_swap_scnhdr_in (bfd *, void *, void *); unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *); @@ -61,18 +61,18 @@ unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *); #include "coff-i386.c" -bfd_boolean +bool _bfd_go32_mkobject (bfd * abfd) { const bfd_size_type amt = sizeof (coff_data_type); abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt); if (abfd->tdata.coff_obj_data == NULL) - return FALSE; + return false; - coff_data (abfd)->go32 = TRUE; + coff_data (abfd)->go32 = true; - return TRUE; + return true; } void diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c index e02519564d..c6e085f9b6 100644 --- a/bfd/coff-i386.c +++ b/bfd/coff-i386.c @@ -187,8 +187,8 @@ coff_i386_reloc (bfd *abfd, /* Return TRUE if this relocation should appear in the output .reloc section. */ -static bfd_boolean in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, - reloc_howto_type *howto) +static bool +in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto) { return ! howto->pc_relative && howto->type != R_IMAGEBASE && howto->type != R_SECREL32; @@ -196,7 +196,7 @@ static bfd_boolean in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, #endif /* COFF_WITH_PE */ #ifndef PCRELOFFSET -#define PCRELOFFSET FALSE +#define PCRELOFFSET false #endif static reloc_howto_type howto_table[] = @@ -211,29 +211,29 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "dir32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* PE IMAGE_REL_I386_DIR32NB relocation (7). */ HOWTO (R_IMAGEBASE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "rva32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (010), EMPTY_HOWTO (011), EMPTY_HOWTO (012), @@ -243,15 +243,15 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "secrel32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ #else EMPTY_HOWTO (013), #endif @@ -263,12 +263,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -277,12 +277,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -291,12 +291,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -305,12 +305,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "DISP8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -319,12 +319,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "DISP16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -333,12 +333,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_i386_reloc, /* special_function */ "DISP32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET) /* pcrel_offset */ @@ -411,7 +411,7 @@ static reloc_howto_type howto_table[] = and the regular routine is that we don't want to do anything for a relocatable link. */ -static bfd_boolean +static bool coff_pe_i386_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -422,7 +422,7 @@ coff_pe_i386_relocate_section (bfd *output_bfd, asection **sections) { if (bfd_link_relocatable (info)) - return TRUE; + return true; return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd, input_section, contents, @@ -602,11 +602,11 @@ coff_i386_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, a leading dot for local labels, so if TARGET_UNDERSCORE is defined we treat all symbols starting with L as local. */ -static bfd_boolean +static bool coff_i386_is_local_label_name (bfd *abfd, const char *name) { if (name[0] == 'L') - return TRUE; + return true; return _bfd_coff_is_local_label_name (abfd, name); } diff --git a/bfd/coff-ia64.c b/bfd/coff-ia64.c index 887c7aae77..7aa2984187 100644 --- a/bfd/coff-ia64.c +++ b/bfd/coff-ia64.c @@ -53,11 +53,11 @@ static reloc_howto_type howto_table[] = /* Return TRUE if this relocation should appear in the output .reloc section. */ -static bfd_boolean +static bool in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto ATTRIBUTE_UNUSED) { - return FALSE; /* We don't do relocs for now... */ + return false; /* We don't do relocs for now... */ } #endif diff --git a/bfd/coff-mcore.c b/bfd/coff-mcore.c index 120064fa97..712cc4d154 100644 --- a/bfd/coff-mcore.c +++ b/bfd/coff-mcore.c @@ -37,7 +37,7 @@ /* This file is compiled more than once, but we only compile the final_link routine once. */ -extern bfd_boolean mcore_bfd_coff_final_link +extern bool mcore_bfd_coff_final_link (bfd *, struct bfd_link_info *); static bfd_reloc_status_type mcore_coff_unsupported_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); @@ -63,29 +63,29 @@ static reloc_howto_type mcore_coff_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* dont complain_on_overflow */ NULL, /* special_function */ "ABSOLUTE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00, /* src_mask */ 0x00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (IMAGE_REL_MCORE_ADDR32,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ NULL, /* special_function */ "ADDR32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8 bits + 2 zero bits; jmpi/jsri/lrw instructions. Should not appear in object files. */ @@ -93,15 +93,15 @@ static reloc_howto_type mcore_coff_howto_table[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mcore_coff_unsupported_reloc, /* special_function */ "IMM8BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* bsr/bt/bf/br instructions; 11 bits + 1 zero bit Span 2k instructions == 4k bytes. @@ -110,45 +110,45 @@ static reloc_howto_type mcore_coff_howto_table[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ NULL, /* special_function */ "IMM11BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x7ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 4 bits + 1 zero bit; 'loopt' instruction only; unsupported. */ HOWTO (IMAGE_REL_MCORE_PCREL_IMM4BY2, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mcore_coff_unsupported_reloc, /* special_function */ "IMM4BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32-bit pc-relative. Eventually this will help support PIC code. */ HOWTO (IMAGE_REL_MCORE_PCREL_32,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ NULL, /* special_function */ "PCREL_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Like PCREL_IMM11BY2, this relocation indicates that there is a 'jsri' at the specified address. There is a separate relocation @@ -161,29 +161,29 @@ static reloc_howto_type mcore_coff_howto_table[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ NULL, /* special_function */ "JSR_IMM11BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x7ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (IMAGE_REL_MCORE_RVA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ NULL, /* special_function */ "MCORE_RVA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE) /* pcrel_offset */ + true) /* pcrel_offset */ }; /* Extend the coff_link_hash_table structure with a few M*Core specific fields. @@ -209,7 +209,7 @@ mcore_hash_table; /* Add an entry to the base file. */ -static bfd_boolean +static bool mcore_emit_base_file_entry (struct bfd_link_info *info, bfd *output_bfd, asection *input_section, @@ -224,10 +224,10 @@ mcore_emit_base_file_entry (struct bfd_link_info *info, addr -= pe_data (output_bfd)->pe_opthdr.ImageBase; if (fwrite (&addr, sizeof (addr), 1, (FILE *) info->base_file) == 1) - return TRUE; + return true; bfd_set_error (bfd_error_system_call); - return FALSE; + return false; } static bfd_reloc_status_type @@ -336,14 +336,14 @@ coff_mcore_rtype_to_howto (bfd * abfd ATTRIBUTE_UNUSED, /* Return TRUE if this relocation should appear in the output .reloc section. This function is referenced in pe_mkobject in peicode.h. */ -static bfd_boolean +static bool in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type * howto) { return ! howto->pc_relative && howto->type != IMAGE_REL_MCORE_RVA; } /* The reloc processing routine for the optimized COFF linker. */ -static bfd_boolean +static bool coff_mcore_relocate_section (bfd * output_bfd, struct bfd_link_info * info, bfd * input_bfd, @@ -360,7 +360,7 @@ coff_mcore_relocate_section (bfd * output_bfd, thing. The caller will take care of adjusting the reloc addresses and symbol indices. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; /* Check if we have the same endianness */ if ( input_bfd->xvec->byteorder != output_bfd->xvec->byteorder @@ -374,7 +374,7 @@ coff_mcore_relocate_section (bfd * output_bfd, bfd_big_endian (output_bfd) ? _("big endian") : _("little endian")); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } rel = relocs; @@ -414,7 +414,7 @@ coff_mcore_relocate_section (bfd * output_bfd, howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h, sym, & addend); if (howto == NULL) - return FALSE; + return false; val = 0; @@ -457,7 +457,7 @@ coff_mcore_relocate_section (bfd * output_bfd, else (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, TRUE); + rel->r_vaddr - input_section->vma, true); my_name = h->root.root.string; } @@ -472,7 +472,7 @@ coff_mcore_relocate_section (bfd * output_bfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; case IMAGE_REL_MCORE_ABSOLUTE: _bfd_error_handler @@ -508,7 +508,7 @@ coff_mcore_relocate_section (bfd * output_bfd, && pe_data (output_bfd)->in_reloc_p (output_bfd, howto) && !mcore_emit_base_file_entry (info, output_bfd, input_section, rel->r_vaddr)) - return FALSE; + return false; switch (rstat) { @@ -526,7 +526,7 @@ coff_mcore_relocate_section (bfd * output_bfd, } } - return TRUE; + return true; } /* Tailor coffcode.h -- macro heaven. */ diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c index d20f4b4659..963ab24911 100644 --- a/bfd/coff-mips.c +++ b/bfd/coff-mips.c @@ -86,52 +86,52 @@ static reloc_howto_type mips_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "IGNORE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit reference to a symbol, normally from a data section. */ HOWTO (MIPS_R_REFHALF, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mips_generic_reloc, /* special_function */ "REFHALF", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit reference to a symbol, normally from a data section. */ HOWTO (MIPS_R_REFWORD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mips_generic_reloc, /* special_function */ "REFWORD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 26 bit absolute jump address. */ HOWTO (MIPS_R_JMPADDR, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -139,10 +139,10 @@ static reloc_howto_type mips_howto_table[] = bits must match the PC. */ mips_generic_reloc, /* special_function */ "JMPADDR", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The high 16 bits of a symbol value. Handled by the function mips_refhi_reloc. */ @@ -150,30 +150,30 @@ static reloc_howto_type mips_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mips_refhi_reloc, /* special_function */ "REFHI", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The low 16 bits of a symbol value. */ HOWTO (MIPS_R_REFLO, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mips_reflo_reloc, /* special_function */ "REFLO", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A reference to an offset from the gp register. Handled by the function mips_gprel_reloc. */ @@ -181,15 +181,15 @@ static reloc_howto_type mips_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_gprel_reloc, /* special_function */ "GPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A reference to a literal using an offset from the gp register. Handled by the function mips_gprel_reloc. */ @@ -197,15 +197,15 @@ static reloc_howto_type mips_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_gprel_reloc, /* special_function */ "LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (8), EMPTY_HOWTO (9), @@ -219,15 +219,15 @@ static reloc_howto_type mips_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_generic_reloc, /* special_function */ "PCREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; #define MIPS_HOWTO_COUNT \ @@ -235,7 +235,7 @@ static reloc_howto_type mips_howto_table[] = /* See whether the magic number matches. */ -static bfd_boolean +static bool mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; @@ -244,7 +244,7 @@ mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr) { case MIPS_MAGIC_1: /* I don't know what endianness this implies. */ - return TRUE; + return true; case MIPS_MAGIC_BIG: case MIPS_MAGIC_BIG2: @@ -257,7 +257,7 @@ mips_ecoff_bad_format_hook (bfd * abfd, void * filehdr) return bfd_little_endian (abfd); default: - return FALSE; + return false; } } @@ -562,7 +562,7 @@ mips_gprel_reloc (bfd *abfd ATTRIBUTE_UNUSED, bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED) { - bfd_boolean relocatable; + bool relocatable; bfd_vma gp; bfd_vma relocation; unsigned long val; @@ -581,10 +581,10 @@ mips_gprel_reloc (bfd *abfd ATTRIBUTE_UNUSED, } if (output_bfd != (bfd *) NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -792,7 +792,7 @@ mips_relocate_hi (struct internal_reloc *refhi, /* Relocate a section while linking a MIPS ECOFF file. */ -static bfd_boolean +static bool mips_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -803,11 +803,11 @@ mips_relocate_section (bfd *output_bfd, asection **symndx_to_section; struct ecoff_link_hash_entry **sym_hashes; bfd_vma gp; - bfd_boolean gp_undefined; + bool gp_undefined; struct external_reloc *ext_rel; struct external_reloc *ext_rel_end; unsigned int i; - bfd_boolean got_lo; + bool got_lo; struct internal_reloc lo_int_rel; bfd_size_type amt; @@ -823,7 +823,7 @@ mips_relocate_section (bfd *output_bfd, amt = NUM_RELOC_SECTIONS * sizeof (asection *); symndx_to_section = (asection **) bfd_alloc (input_bfd, amt); if (!symndx_to_section) - return FALSE; + return false; symndx_to_section[RELOC_SECTION_NONE] = NULL; symndx_to_section[RELOC_SECTION_TEXT] = @@ -858,18 +858,18 @@ mips_relocate_section (bfd *output_bfd, gp = _bfd_get_gp_value (output_bfd); if (gp == 0) - gp_undefined = TRUE; + gp_undefined = true; else - gp_undefined = FALSE; + gp_undefined = false; - got_lo = FALSE; + got_lo = false; ext_rel = (struct external_reloc *) external_relocs; ext_rel_end = ext_rel + input_section->reloc_count; for (i = 0; ext_rel < ext_rel_end; ext_rel++, i++) { struct internal_reloc int_rel; - bfd_boolean use_lo = FALSE; + bool use_lo = false; bfd_vma addend; reloc_howto_type *howto; struct ecoff_link_hash_entry *h = NULL; @@ -882,7 +882,7 @@ mips_relocate_section (bfd *output_bfd, else { int_rel = lo_int_rel; - got_lo = FALSE; + got_lo = false; } BFD_ASSERT (int_rel.r_type @@ -912,9 +912,9 @@ mips_relocate_section (bfd *output_bfd, && int_rel.r_extern == lo_int_rel.r_extern && int_rel.r_symndx == lo_int_rel.r_symndx) { - use_lo = TRUE; + use_lo = true; if (lo_ext_rel == ext_rel + 1) - got_lo = TRUE; + got_lo = true; } } @@ -956,7 +956,7 @@ mips_relocate_section (bfd *output_bfd, /* Only give the error once per link. */ gp = 4; _bfd_set_gp_value (output_bfd, gp); - gp_undefined = FALSE; + gp_undefined = false; } if (! int_rel.r_extern) { @@ -1158,7 +1158,7 @@ mips_relocate_section (bfd *output_bfd, { (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - int_rel.r_vaddr - input_section->vma, TRUE); + int_rel.r_vaddr - input_section->vma, true); relocation = 0; } } @@ -1236,7 +1236,7 @@ mips_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } static void @@ -1313,8 +1313,8 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = mips_ecoff_swap_coff_reloc_out, mips_ecoff_swap_filehdr_out, mips_ecoff_swap_aouthdr_out, mips_ecoff_swap_scnhdr_out, - FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, TRUE, - ECOFF_NO_LONG_SECTION_NAMES, 4, FALSE, 2, 32768, + FILHSZ, AOUTSZ, SCNHSZ, 0, 0, 0, 0, FILNMLEN, true, + ECOFF_NO_LONG_SECTION_NAMES, 4, false, 2, 32768, mips_ecoff_swap_filehdr_in, mips_ecoff_swap_aouthdr_in, mips_ecoff_swap_scnhdr_in, NULL, mips_ecoff_bad_format_hook, _bfd_ecoff_set_arch_mach_hook, @@ -1333,7 +1333,7 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = /* TRUE if the .rdata section is part of the text segment, as on the Alpha. FALSE if .rdata is part of the data segment, as on the MIPS. */ - FALSE, + false, /* Bitsize of constructor entries. */ 32, /* Reloc to use for constructor entries. */ diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index a29cf5b958..237c7ed6d6 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -32,19 +32,19 @@ #include "libcoff.h" #include "libxcoff.h" -extern bfd_boolean _bfd_xcoff_mkobject (bfd *); -extern bfd_boolean _bfd_xcoff_copy_private_bfd_data (bfd *, bfd *); -extern bfd_boolean _bfd_xcoff_is_local_label_name (bfd *, const char *); +extern bool _bfd_xcoff_mkobject (bfd *); +extern bool _bfd_xcoff_copy_private_bfd_data (bfd *, bfd *); +extern bool _bfd_xcoff_is_local_label_name (bfd *, const char *); extern reloc_howto_type *_bfd_xcoff_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -extern bfd_boolean _bfd_xcoff_slurp_armap (bfd *); +extern bool _bfd_xcoff_slurp_armap (bfd *); extern bfd_cleanup _bfd_xcoff_archive_p (bfd *); extern void * _bfd_xcoff_read_ar_hdr (bfd *); extern bfd *_bfd_xcoff_openr_next_archived_file (bfd *, bfd *); extern int _bfd_xcoff_stat_arch_elt (bfd *, struct stat *); -extern bfd_boolean _bfd_xcoff_write_armap +extern bool _bfd_xcoff_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int); -extern bfd_boolean _bfd_xcoff_write_archive_contents (bfd *); +extern bool _bfd_xcoff_write_archive_contents (bfd *); extern int _bfd_xcoff_sizeof_headers (bfd *, struct bfd_link_info *); extern void _bfd_xcoff_swap_sym_in (bfd *, void *, void *); extern unsigned int _bfd_xcoff_swap_sym_out (bfd *, void *, void *); @@ -78,7 +78,7 @@ void xcoff_rtype2howto (arelent *, struct internal_reloc *); #define coff_bfd_is_local_label_name _bfd_xcoff_is_local_label_name #ifdef AIX_CORE extern bfd_cleanup rs6000coff_core_p (bfd *abfd); -extern bfd_boolean rs6000coff_core_file_matches_executable_p +extern bool rs6000coff_core_file_matches_executable_p (bfd *cbfd, bfd *ebfd); extern char *rs6000coff_core_file_failing_command (bfd *abfd); extern int rs6000coff_core_file_failing_signal (bfd *abfd); @@ -119,33 +119,33 @@ extern int rs6000coff_core_file_failing_signal (bfd *abfd); /* The main body of code is in coffcode.h. */ static const char *normalize_filename (bfd *); -static bfd_boolean xcoff_write_armap_old +static bool xcoff_write_armap_old (bfd *, unsigned int, struct orl *, unsigned int, int); -static bfd_boolean xcoff_write_armap_big +static bool xcoff_write_armap_big (bfd *, unsigned int, struct orl *, unsigned int, int); -static bfd_boolean xcoff_write_archive_contents_old (bfd *); -static bfd_boolean xcoff_write_archive_contents_big (bfd *); +static bool xcoff_write_archive_contents_old (bfd *); +static bool xcoff_write_archive_contents_big (bfd *); static void xcoff_swap_ldhdr_in (bfd *, const void *, struct internal_ldhdr *); static void xcoff_swap_ldhdr_out (bfd *, const struct internal_ldhdr *, void *); static void xcoff_swap_ldsym_in (bfd *, const void *, struct internal_ldsym *); static void xcoff_swap_ldsym_out (bfd *, const struct internal_ldsym *, void *); static void xcoff_swap_ldrel_in (bfd *, const void *, struct internal_ldrel *); static void xcoff_swap_ldrel_out (bfd *, const struct internal_ldrel *, void *); -static bfd_boolean xcoff_ppc_relocate_section +static bool xcoff_ppc_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); -static bfd_boolean _bfd_xcoff_put_ldsymbol_name +static bool _bfd_xcoff_put_ldsymbol_name (bfd *, struct xcoff_loader_info *, struct internal_ldsym *, const char *); static asection *xcoff_create_csect_from_smclas (bfd *, union internal_auxent *, const char *); -static bfd_boolean xcoff_is_lineno_count_overflow (bfd *, bfd_vma); -static bfd_boolean xcoff_is_reloc_count_overflow (bfd *, bfd_vma); +static bool xcoff_is_lineno_count_overflow (bfd *, bfd_vma); +static bool xcoff_is_reloc_count_overflow (bfd *, bfd_vma); static bfd_vma xcoff_loader_symbol_offset (bfd *, struct internal_ldhdr *); static bfd_vma xcoff_loader_reloc_offset (bfd *, struct internal_ldhdr *); -static bfd_boolean xcoff_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); -static bfd_boolean do_pad (bfd *, unsigned int); -static bfd_boolean do_copy (bfd *, bfd *); +static bool xcoff_generate_rtinit + (bfd *, const char *, const char *, bool); +static bool do_pad (bfd *, unsigned int); +static bool do_copy (bfd *, bfd *); /* Relocation functions */ static xcoff_reloc_function xcoff_reloc_type_br; @@ -318,11 +318,11 @@ archive_iterator_begin (struct archive_iterator *iterator, /* Make ITERATOR visit the first unvisited archive member. Return true on success; return false if all members have been visited. */ -static bfd_boolean +static bool archive_iterator_next (struct archive_iterator *iterator) { if (!iterator->next.member) - return FALSE; + return false; iterator->current = iterator->next; member_layout_init (&iterator->next, iterator->archive, @@ -331,13 +331,13 @@ archive_iterator_next (struct archive_iterator *iterator) + iterator->current.header_size + iterator->current.contents_size + iterator->current.trailing_padding); - return TRUE; + return true; } /* We use our own tdata type. Its first field is the COFF tdata type, so the COFF routines are compatible. */ -bfd_boolean +bool _bfd_xcoff_mkobject (bfd *abfd) { coff_data_type *coff; @@ -345,7 +345,7 @@ _bfd_xcoff_mkobject (bfd *abfd) abfd->tdata.xcoff_obj_data = (struct xcoff_tdata *) bfd_zalloc (abfd, amt); if (abfd->tdata.xcoff_obj_data == NULL) - return FALSE; + return false; coff = coff_data (abfd); coff->symbols = (coff_symbol_type *) NULL; coff->conversion_table = (unsigned int *) NULL; @@ -364,19 +364,19 @@ _bfd_xcoff_mkobject (bfd *abfd) /* text section alignment is different than the default */ bfd_xcoff_text_align_power (abfd) = 2; - return TRUE; + return true; } /* Copy XCOFF data from one BFD to another. */ -bfd_boolean +bool _bfd_xcoff_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { struct xcoff_tdata *ix, *ox; asection *sec; if (ibfd->xvec != obfd->xvec) - return TRUE; + return true; ix = xcoff_data (ibfd); ox = xcoff_data (obfd); ox->full_aouthdr = ix->full_aouthdr; @@ -407,7 +407,7 @@ _bfd_xcoff_copy_private_bfd_data (bfd *ibfd, bfd *obfd) ox->cputype = ix->cputype; ox->maxdata = ix->maxdata; ox->maxstack = ix->maxstack; - return TRUE; + return true; } /* I don't think XCOFF really has a notion of local labels based on @@ -415,11 +415,11 @@ _bfd_xcoff_copy_private_bfd_data (bfd *ibfd, bfd *obfd) The AIX native linker does not have a -X option, and it ignores the -x option. */ -bfd_boolean +bool _bfd_xcoff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED) { - return FALSE; + return false; } void @@ -694,105 +694,105 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_POS", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x01: 32 bit relocation, but store negative value. */ HOWTO (R_NEG, /* type */ 0, /* rightshift */ -2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_NEG", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x02: 32 bit PC relative relocation. */ HOWTO (R_REL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_REL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x03: 16 bit TOC relative relocation. */ HOWTO (R_TOC, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TOC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x04: Same as R_TOC */ HOWTO (R_TRL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TRL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x05: External TOC relative symbol. */ HOWTO (R_GL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_GL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x06: Local TOC relative symbol. */ HOWTO (R_TCL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TCL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (7), @@ -801,15 +801,15 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_BA_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (9), @@ -818,15 +818,15 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_BR", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0xb), @@ -835,30 +835,30 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x0d: Same as R_POS. */ HOWTO (R_RLA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RLA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0xe), @@ -867,15 +867,15 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "R_REF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0x10), EMPTY_HOWTO (0x11), @@ -886,180 +886,180 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TRLA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x14: Modifiable relative branch. */ HOWTO (R_RRTBI, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RRTBI", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x15: Modifiable absolute branch. */ HOWTO (R_RRTBA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RRTBA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x16: Modifiable call absolute indirect. */ HOWTO (R_CAI, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_CAI", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x17: Modifiable call relative. */ HOWTO (R_CREL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_CREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x18: Modifiable branch absolute. */ HOWTO (R_RBA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RBA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x19: Modifiable branch absolute. */ HOWTO (R_RBAC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RBAC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1a: Modifiable branch relative. */ HOWTO (R_RBR, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_RBR_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1b: Modifiable branch absolute. */ HOWTO (R_RBRC, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RBRC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1c: 16 bit Non modifiable absolute branch. */ HOWTO (R_BA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_BA_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfffc, /* src_mask */ 0xfffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1d: Modifiable branch relative. */ HOWTO (R_RBR, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_RBR_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfffc, /* src_mask */ 0xfffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1e: Modifiable branch relative. */ HOWTO (R_RBA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_RBA_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0x1f), @@ -1068,75 +1068,75 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x21: Initial-exec TLS relocation. */ HOWTO (R_TLS_IE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS_IE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x22: Local-dynamic TLS relocation. */ HOWTO (R_TLS_LD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS_LD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x23: Local-exec TLS relocation. */ HOWTO (R_TLS_LE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS_LE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x24: TLS relocation. */ HOWTO (R_TLSM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLSM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x25: TLS module relocation. */ @@ -1144,15 +1144,15 @@ reloc_howto_type xcoff_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLSM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO(0x26), EMPTY_HOWTO(0x27), @@ -1170,30 +1170,30 @@ reloc_howto_type xcoff_howto_table[] = 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TOCU", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x31: Low-order 16 bit TOC relative relocation. */ HOWTO (R_TOCL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "R_TOCL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -1375,7 +1375,7 @@ _bfd_strntoll (const char * nptr, int base, unsigned int maxlen) /* Read in the armap of an XCOFF archive. */ -bfd_boolean +bool _bfd_xcoff_slurp_armap (bfd *abfd) { file_ptr off; @@ -1388,8 +1388,8 @@ _bfd_xcoff_slurp_armap (bfd *abfd) if (xcoff_ardata (abfd) == NULL) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } if (! xcoff_big_format_p (abfd)) @@ -1400,35 +1400,35 @@ _bfd_xcoff_slurp_armap (bfd *abfd) GET_VALUE_IN_FIELD (off, xcoff_ardata (abfd)->symoff, 10); if (off == 0) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } if (bfd_seek (abfd, off, SEEK_SET) != 0) - return FALSE; + return false; /* The symbol table starts with a normal archive header. */ if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR) - return FALSE; + return false; /* Skip the name (normally empty). */ GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10); off = ((namlen + 1) & ~ (size_t) 1) + SXCOFFARFMAG; if (bfd_seek (abfd, off, SEEK_CUR) != 0) - return FALSE; + return false; GET_VALUE_IN_FIELD (sz, hdr.size, 10); if (sz + 1 < 5) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Read in the entire symbol table. */ contents = (bfd_byte *) _bfd_alloc_and_read (abfd, sz + 1, sz); if (contents == NULL) - return FALSE; + return false; /* Ensure strings are NULL terminated so we don't wander off the end of the buffer. */ @@ -1440,13 +1440,13 @@ _bfd_xcoff_slurp_armap (bfd *abfd) if (c >= sz / 4) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_ardata (abfd)->symdefs = ((carsym *) bfd_alloc (abfd, c * sizeof (carsym))); if (bfd_ardata (abfd)->symdefs == NULL) - return FALSE; + return false; /* After the count comes a list of four byte file offsets. */ for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 4; @@ -1462,35 +1462,35 @@ _bfd_xcoff_slurp_armap (bfd *abfd) GET_VALUE_IN_FIELD (off, xcoff_ardata_big (abfd)->symoff, 10); if (off == 0) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } if (bfd_seek (abfd, off, SEEK_SET) != 0) - return FALSE; + return false; /* The symbol table starts with a normal archive header. */ if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG) - return FALSE; + return false; /* Skip the name (normally empty). */ GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10); off = ((namlen + 1) & ~ (size_t) 1) + SXCOFFARFMAG; if (bfd_seek (abfd, off, SEEK_CUR) != 0) - return FALSE; + return false; GET_VALUE_IN_FIELD (sz, hdr.size, 10); if (sz + 1 < 9) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Read in the entire symbol table. */ contents = (bfd_byte *) _bfd_alloc_and_read (abfd, sz + 1, sz); if (contents == NULL) - return FALSE; + return false; /* Ensure strings are NULL terminated so we don't wander off the end of the buffer. */ @@ -1502,13 +1502,13 @@ _bfd_xcoff_slurp_armap (bfd *abfd) if (c >= sz / 8) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_ardata (abfd)->symdefs = ((carsym *) bfd_alloc (abfd, c * sizeof (carsym))); if (bfd_ardata (abfd)->symdefs == NULL) - return FALSE; + return false; /* After the count comes a list of eight byte file offsets. */ for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 8; @@ -1526,15 +1526,15 @@ _bfd_xcoff_slurp_armap (bfd *abfd) if (p >= cend) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } arsym->name = (char *) p; } bfd_ardata (abfd)->symdef_count = c; - abfd->has_armap = TRUE; + abfd->has_armap = true; - return TRUE; + return true; } /* See if this is an XCOFF archive. */ @@ -1815,7 +1815,7 @@ normalize_filename (bfd *abfd) /* Write out an XCOFF armap. */ -static bfd_boolean +static bool xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, struct orl *map, unsigned int orl_count, int stridx) { @@ -1844,11 +1844,11 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, != SIZEOF_AR_HDR || (bfd_bwrite (XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd) != SXCOFFARFMAG)) - return FALSE; + return false; H_PUT_32 (abfd, orl_count, buf); if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4) - return FALSE; + return false; i = 0; archive_iterator_begin (&iterator, abfd); @@ -1857,7 +1857,7 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, { H_PUT_32 (abfd, iterator.current.offset, buf); if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4) - return FALSE; + return false; ++i; } @@ -1869,7 +1869,7 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, name = *map[i].name; namlen = strlen (name); if (bfd_bwrite (name, (bfd_size_type) (namlen + 1), abfd) != namlen + 1) - return FALSE; + return false; } if ((stridx & 1) != 0) @@ -1878,10 +1878,10 @@ xcoff_write_armap_old (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, b = '\0'; if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) - return FALSE; + return false; } - return TRUE; + return true; } static char buff20[XCOFFARMAGBIG_ELEMENT_SIZE + 1]; @@ -1916,30 +1916,30 @@ static char buff20[XCOFFARMAGBIG_ELEMENT_SIZE + 1]; memcpy (buff20, (d), 20), \ (v) = bfd_scan_vma (buff20, (const char **) NULL, 10) -static bfd_boolean +static bool do_pad (bfd *abfd, unsigned int number) { bfd_byte b = 0; /* Limit pad to <= 4096. */ if (number > 4096) - return FALSE; + return false; while (number--) if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool do_copy (bfd *out_bfd, bfd *in_bfd) { bfd_size_type remaining; bfd_byte buffer[DEFAULT_BUFFERSIZE]; if (bfd_seek (in_bfd, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; + return false; remaining = arelt_size (in_bfd); @@ -1947,7 +1947,7 @@ do_copy (bfd *out_bfd, bfd *in_bfd) { if (bfd_bread (buffer, DEFAULT_BUFFERSIZE, in_bfd) != DEFAULT_BUFFERSIZE || bfd_bwrite (buffer, DEFAULT_BUFFERSIZE, out_bfd) != DEFAULT_BUFFERSIZE) - return FALSE; + return false; remaining -= DEFAULT_BUFFERSIZE; } @@ -1956,13 +1956,13 @@ do_copy (bfd *out_bfd, bfd *in_bfd) { if (bfd_bread (buffer, remaining, in_bfd) != remaining || bfd_bwrite (buffer, remaining, out_bfd) != remaining) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, struct orl *map, unsigned int orl_count, int stridx) { @@ -2050,7 +2050,7 @@ xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, symbol_table = bfd_zmalloc (symbol_table_size); if (symbol_table == NULL) - return FALSE; + return false; hdr = (struct xcoff_ar_hdr_big *) symbol_table; @@ -2135,7 +2135,7 @@ xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, symbol_table = bfd_zmalloc (symbol_table_size); if (symbol_table == NULL) - return FALSE; + return false; hdr = (struct xcoff_ar_hdr_big *) symbol_table; @@ -2199,10 +2199,10 @@ xcoff_write_armap_big (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, else PRINT20 (fhdr->symoff64, 0); - return TRUE; + return true; } -bfd_boolean +bool _bfd_xcoff_write_armap (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, struct orl *map, unsigned int orl_count, int stridx) { @@ -2215,7 +2215,7 @@ _bfd_xcoff_write_armap (bfd *abfd, unsigned int elength ATTRIBUTE_UNUSED, /* Write out an XCOFF archive. We always write an entire archive, rather than fussing with the freelist and so forth. */ -static bfd_boolean +static bool xcoff_write_archive_contents_old (bfd *abfd) { struct archive_iterator iterator; @@ -2223,8 +2223,8 @@ xcoff_write_archive_contents_old (bfd *abfd) bfd_size_type count; bfd_size_type total_namlen; file_ptr *offsets; - bfd_boolean makemap; - bfd_boolean hasobjects; + bool makemap; + bool hasobjects; file_ptr prevoff, nextoff; bfd *sub; size_t i; @@ -2248,7 +2248,7 @@ xcoff_write_archive_contents_old (bfd *abfd) { sub->arelt_data = bfd_zmalloc (sizeof (struct areltdata)); if (sub->arelt_data == NULL) - return FALSE; + return false; } if (arch_xhdr (sub) == NULL) { @@ -2269,7 +2269,7 @@ xcoff_write_archive_contents_old (bfd *abfd) else if (stat (bfd_get_filename (sub), &s) != 0) { bfd_set_input_error (sub, bfd_error_system_call); - return FALSE; + return false; } if ((abfd->flags & BFD_DETERMINISTIC_OUTPUT) != 0) @@ -2282,7 +2282,7 @@ xcoff_write_archive_contents_old (bfd *abfd) ahdrp = bfd_zalloc (sub, sizeof (*ahdrp)); if (ahdrp == NULL) - return FALSE; + return false; sprintf (ahdrp->size, "%ld", (long) s.st_size); sprintf (ahdrp->date, "%ld", (long) s.st_mtime); @@ -2296,13 +2296,13 @@ xcoff_write_archive_contents_old (bfd *abfd) } offsets = (file_ptr *) bfd_alloc (abfd, count * sizeof (file_ptr)); if (offsets == NULL) - return FALSE; + return false; if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR, SEEK_SET) != 0) - return FALSE; + return false; makemap = bfd_has_map (abfd); - hasobjects = FALSE; + hasobjects = false; prevoff = 0; for (archive_iterator_begin (&iterator, abfd), i = 0; archive_iterator_next (&iterator); @@ -2314,7 +2314,7 @@ xcoff_write_archive_contents_old (bfd *abfd) if (makemap && ! hasobjects) { if (bfd_check_format (iterator.current.member, bfd_object)) - hasobjects = TRUE; + hasobjects = true; } ahdrp = arch_xhdr (iterator.current.member); @@ -2328,7 +2328,7 @@ xcoff_write_archive_contents_old (bfd *abfd) *p = ' '; if (!do_pad (abfd, iterator.current.leading_padding)) - return FALSE; + return false; BFD_ASSERT (iterator.current.offset == bfd_tell (abfd)); namlen = iterator.current.padded_namlen; @@ -2338,7 +2338,7 @@ xcoff_write_archive_contents_old (bfd *abfd) || bfd_seek (iterator.current.member, 0, SEEK_SET) != 0 || !do_copy (abfd, iterator.current.member) || !do_pad (abfd, iterator.current.trailing_padding)) - return FALSE; + return false; offsets[i] = iterator.current.offset; prevoff = iterator.current.offset; @@ -2386,18 +2386,18 @@ xcoff_write_archive_contents_old (bfd *abfd) != SIZEOF_AR_HDR) || (bfd_bwrite (XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd) != SXCOFFARFMAG)) - return FALSE; + return false; sprintf (decbuf, "%-12ld", (long) count); if (bfd_bwrite (decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE, abfd) != XCOFFARMAG_ELEMENT_SIZE) - return FALSE; + return false; for (i = 0; i < (size_t) count; i++) { sprintf (decbuf, "%-12ld", (long) offsets[i]); if (bfd_bwrite (decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE, abfd) != XCOFFARMAG_ELEMENT_SIZE) - return FALSE; + return false; } for (sub = abfd->archive_head; sub != NULL; sub = sub->archive_next) { @@ -2407,11 +2407,11 @@ xcoff_write_archive_contents_old (bfd *abfd) name = normalize_filename (sub); namlen = strlen (name); if (bfd_bwrite (name, namlen + 1, abfd) != namlen + 1) - return FALSE; + return false; } if (! do_pad (abfd, size & 1)) - return FALSE; + return false; /* Write out the armap, if appropriate. */ if (! makemap || ! hasobjects) @@ -2422,7 +2422,7 @@ xcoff_write_archive_contents_old (bfd *abfd) sprintf (fhdr.symoff, "%ld", (long) nextoff); bfd_ardata (abfd)->tdata = &fhdr; if (! _bfd_compute_and_write_armap (abfd, 0)) - return FALSE; + return false; } /* Write out the archive file header. */ @@ -2435,20 +2435,20 @@ xcoff_write_archive_contents_old (bfd *abfd) if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 || (bfd_bwrite (&fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR, abfd) != SIZEOF_AR_FILE_HDR)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool xcoff_write_archive_contents_big (bfd *abfd) { struct xcoff_ar_file_hdr_big fhdr; bfd_size_type count; bfd_size_type total_namlen; file_ptr *offsets; - bfd_boolean makemap; - bfd_boolean hasobjects; + bool makemap; + bool hasobjects; file_ptr prevoff, nextoff; bfd *current_bfd; size_t i; @@ -2462,11 +2462,11 @@ xcoff_write_archive_contents_big (bfd *abfd) memcpy (fhdr.magic, XCOFFARMAGBIG, SXCOFFARMAG); if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0) - return FALSE; + return false; /* Calculate count and total_namlen. */ makemap = bfd_has_map (abfd); - hasobjects = FALSE; + hasobjects = false; for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0; current_bfd != NULL; current_bfd = current_bfd->archive_next, count++) @@ -2476,14 +2476,14 @@ xcoff_write_archive_contents_big (bfd *abfd) if (makemap && ! hasobjects && bfd_check_format (current_bfd, bfd_object)) - hasobjects = TRUE; + hasobjects = true; if (current_bfd->arelt_data == NULL) { size = sizeof (struct areltdata); current_bfd->arelt_data = bfd_zmalloc (size); if (current_bfd->arelt_data == NULL) - return FALSE; + return false; } if (arch_xhdr_big (current_bfd) == NULL) @@ -2505,7 +2505,7 @@ xcoff_write_archive_contents_big (bfd *abfd) else if (stat (bfd_get_filename (current_bfd), &s) != 0) { bfd_set_input_error (current_bfd, bfd_error_system_call); - return FALSE; + return false; } if ((abfd->flags & BFD_DETERMINISTIC_OUTPUT) != 0) @@ -2518,7 +2518,7 @@ xcoff_write_archive_contents_big (bfd *abfd) ahdrp = bfd_zalloc (current_bfd, sizeof (*ahdrp)); if (ahdrp == NULL) - return FALSE; + return false; PRINT20 (ahdrp->size, s.st_size); PRINT12 (ahdrp->date, s.st_mtime); @@ -2536,7 +2536,7 @@ xcoff_write_archive_contents_big (bfd *abfd) { offsets = (file_ptr *) bfd_malloc (count * sizeof (file_ptr)); if (offsets == NULL) - return FALSE; + return false; } prevoff = 0; @@ -2555,7 +2555,7 @@ xcoff_write_archive_contents_big (bfd *abfd) if (!do_pad (abfd, iterator.current.leading_padding)) { free (offsets); - return FALSE; + return false; } BFD_ASSERT (iterator.current.offset == bfd_tell (abfd)); @@ -2568,7 +2568,7 @@ xcoff_write_archive_contents_big (bfd *abfd) || !do_pad (abfd, iterator.current.trailing_padding)) { free (offsets); - return FALSE; + return false; } offsets[i] = iterator.current.offset; @@ -2616,7 +2616,7 @@ xcoff_write_archive_contents_big (bfd *abfd) if (member_table == NULL) { free (offsets); - return FALSE; + return false; } hdr = (struct xcoff_ar_hdr_big *) member_table; @@ -2666,7 +2666,7 @@ xcoff_write_archive_contents_big (bfd *abfd) } if (bfd_bwrite (member_table, member_table_size, abfd) != member_table_size) - return FALSE; + return false; free (member_table); @@ -2688,7 +2688,7 @@ xcoff_write_archive_contents_big (bfd *abfd) bfd_ardata (abfd)->tdata = &fhdr; if (! _bfd_compute_and_write_armap (abfd, 0)) - return FALSE; + return false; } /* Write out the archive file header. */ @@ -2696,12 +2696,12 @@ xcoff_write_archive_contents_big (bfd *abfd) if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 || (bfd_bwrite (&fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG, abfd) != SIZEOF_AR_FILE_HDR_BIG)) - return FALSE; + return false; - return TRUE; + return true; } -bfd_boolean +bool _bfd_xcoff_write_archive_contents (bfd *abfd) { if (! xcoff_big_format_p (abfd)) @@ -2922,7 +2922,7 @@ xcoff_swap_ldrel_out (bfd *abfd, const struct internal_ldrel *src, void * d) } -bfd_boolean +bool xcoff_reloc_type_noop (bfd *input_bfd ATTRIBUTE_UNUSED, asection *input_section ATTRIBUTE_UNUSED, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -2934,10 +2934,10 @@ xcoff_reloc_type_noop (bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma *relocation ATTRIBUTE_UNUSED, bfd_byte *contents ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool xcoff_reloc_type_fail (bfd *input_bfd, asection *input_section ATTRIBUTE_UNUSED, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -2954,10 +2954,10 @@ xcoff_reloc_type_fail (bfd *input_bfd, (_("%pB: unsupported relocation type %#x"), input_bfd, (unsigned int) rel->r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } -bfd_boolean +bool xcoff_reloc_type_pos (bfd *input_bfd ATTRIBUTE_UNUSED, asection *input_section ATTRIBUTE_UNUSED, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -2970,10 +2970,10 @@ xcoff_reloc_type_pos (bfd *input_bfd ATTRIBUTE_UNUSED, bfd_byte *contents ATTRIBUTE_UNUSED) { *relocation = val + addend; - return TRUE; + return true; } -bfd_boolean +bool xcoff_reloc_type_neg (bfd *input_bfd ATTRIBUTE_UNUSED, asection *input_section ATTRIBUTE_UNUSED, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -2986,10 +2986,10 @@ xcoff_reloc_type_neg (bfd *input_bfd ATTRIBUTE_UNUSED, bfd_byte *contents ATTRIBUTE_UNUSED) { *relocation = addend - val; - return TRUE; + return true; } -bfd_boolean +bool xcoff_reloc_type_rel (bfd *input_bfd ATTRIBUTE_UNUSED, asection *input_section, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -3001,7 +3001,7 @@ xcoff_reloc_type_rel (bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma *relocation, bfd_byte *contents ATTRIBUTE_UNUSED) { - howto->pc_relative = TRUE; + howto->pc_relative = true; /* A PC relative reloc includes the section address. */ addend += input_section->vma; @@ -3009,10 +3009,10 @@ xcoff_reloc_type_rel (bfd *input_bfd ATTRIBUTE_UNUSED, *relocation = val + addend; *relocation -= (input_section->output_section->vma + input_section->output_offset); - return TRUE; + return true; } -bfd_boolean +bool xcoff_reloc_type_toc (bfd *input_bfd, asection *input_section ATTRIBUTE_UNUSED, bfd *output_bfd, @@ -3027,7 +3027,7 @@ xcoff_reloc_type_toc (bfd *input_bfd, struct xcoff_link_hash_entry *h; if (0 > rel->r_symndx) - return FALSE; + return false; h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; @@ -3040,7 +3040,7 @@ xcoff_reloc_type_toc (bfd *input_bfd, (_("%pB: TOC reloc at %#" PRIx64 " to symbol `%s' with no TOC entry"), input_bfd, (uint64_t) rel->r_vaddr, h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } BFD_ASSERT ((h->flags & XCOFF_SET_TOC) == 0); @@ -3058,10 +3058,10 @@ xcoff_reloc_type_toc (bfd *input_bfd, if (rel->r_type == R_TOCL) *relocation = *relocation & 0x0000ffff; - return TRUE; + return true; } -bfd_boolean +bool xcoff_reloc_type_ba (bfd *input_bfd ATTRIBUTE_UNUSED, asection *input_section ATTRIBUTE_UNUSED, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -3078,10 +3078,10 @@ xcoff_reloc_type_ba (bfd *input_bfd ATTRIBUTE_UNUSED, *relocation = val + addend; - return TRUE; + return true; } -static bfd_boolean +static bool xcoff_reloc_type_br (bfd *input_bfd, asection *input_section, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -3097,7 +3097,7 @@ xcoff_reloc_type_br (bfd *input_bfd, bfd_vma section_offset; if (0 > rel->r_symndx) - return FALSE; + return false; h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; section_offset = rel->r_vaddr - input_section->vma; @@ -3172,22 +3172,22 @@ xcoff_reloc_type_br (bfd *input_bfd, bfd_put_32 (input_bfd, insn, ptr); /* Make the howto absolute too. */ - howto->pc_relative = FALSE; + howto->pc_relative = false; howto->complain_on_overflow = complain_overflow_bitfield; } else { /* Use a PC-relative howto and subtract the instruction's address from the target address we calculated above. */ - howto->pc_relative = TRUE; + howto->pc_relative = true; *relocation -= (input_section->output_section->vma + input_section->output_offset + section_offset); } - return TRUE; + return true; } -bfd_boolean +bool xcoff_reloc_type_crel (bfd *input_bfd ATTRIBUTE_UNUSED, asection *input_section, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -3199,7 +3199,7 @@ xcoff_reloc_type_crel (bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma *relocation, bfd_byte *contents ATTRIBUTE_UNUSED) { - howto->pc_relative = TRUE; + howto->pc_relative = true; howto->src_mask &= ~3; howto->dst_mask = howto->src_mask; @@ -3209,10 +3209,10 @@ xcoff_reloc_type_crel (bfd *input_bfd ATTRIBUTE_UNUSED, *relocation = val + addend; *relocation -= (input_section->output_section->vma + input_section->output_offset); - return TRUE; + return true; } -bfd_boolean +bool xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, asection *input_section ATTRIBUTE_UNUSED, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -3227,7 +3227,7 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, struct xcoff_link_hash_entry *h; if (0 > rel->r_symndx) - return FALSE; + return false; h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; @@ -3237,7 +3237,7 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, if (howto->type == R_TLSML) { *relocation = 0; - return TRUE; + return true; } /* FIXME: h is sometimes null, if the TLS symbol is not exported. */ @@ -3247,7 +3247,7 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, (_("%pB: TLS relocation at (0x%" BFD_VMA_FMT "x) over " "internal symbols (C_HIDEXT) not yet possible\n"), input_bfd, rel->r_vaddr); - return FALSE; + return false; } @@ -3258,7 +3258,7 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, (_("%pB: TLS relocation at (0x%" BFD_VMA_FMT "x) over " "non-TLS symbol %s (0x%x)\n"), input_bfd, rel->r_vaddr, h->root.root.string, h->smclas); - return FALSE; + return false; } /* Local TLS relocations must target a local symbol, ie @@ -3272,7 +3272,7 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, (_("%pB: TLS local relocation at (0x%" BFD_VMA_FMT "x) over " "imported symbol %s\n"), input_bfd, rel->r_vaddr, h->root.root.string); - return FALSE; + return false; } /* R_TLSM and R_TLSML are relocations used by the loader. @@ -3281,7 +3281,7 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, if (howto->type == R_TLSM) { *relocation = 0; - return TRUE; + return true; } /* Other TLS relocations aims to put offsets from TLS pointers @@ -3291,20 +3291,20 @@ xcoff_reloc_type_tls (bfd *input_bfd ATTRIBUTE_UNUSED, TODO: implement optimization when tls size is < 62K. */ *relocation = val + addend; - return TRUE; + return true; } -static bfd_boolean +static bool xcoff_complain_overflow_dont_func (bfd *input_bfd ATTRIBUTE_UNUSED, bfd_vma val ATTRIBUTE_UNUSED, bfd_vma relocation ATTRIBUTE_UNUSED, struct reloc_howto_struct * howto ATTRIBUTE_UNUSED) { - return FALSE; + return false; } -static bfd_boolean +static bool xcoff_complain_overflow_bitfield_func (bfd *input_bfd, bfd_vma val, bfd_vma relocation, @@ -3350,7 +3350,7 @@ xcoff_complain_overflow_bitfield_func (bfd *input_bfd, ones, we are OK, assuming a signed bitfield. */ ss = (signmask << howto->rightshift) - 1; if ((ss | relocation) != ~ (bfd_vma) 0) - return TRUE; + return true; a &= fieldmask; } @@ -3363,7 +3363,7 @@ xcoff_complain_overflow_bitfield_func (bfd *input_bfd, away from the location at which it is linked. */ if ((unsigned) howto->bitsize + howto->rightshift == bfd_arch_bits_per_address (input_bfd)) - return FALSE; + return false; sum = a + b; if (sum < a || (sum & ~ fieldmask) != 0) @@ -3372,13 +3372,13 @@ xcoff_complain_overflow_bitfield_func (bfd *input_bfd, for signed operands again. Here is the overflow test is as for complain_overflow_signed. */ if (((~ (a ^ b)) & (a ^ sum)) & signmask) - return TRUE; + return true; } - return FALSE; + return false; } -static bfd_boolean +static bool xcoff_complain_overflow_signed_func (bfd *input_bfd, bfd_vma val, bfd_vma relocation, @@ -3404,7 +3404,7 @@ xcoff_complain_overflow_signed_func (bfd *input_bfd, signmask = ~ (fieldmask >> 1); ss = a & signmask; if (ss != 0 && ss != ((addrmask >> howto->rightshift) & signmask)) - return TRUE; + return true; /* We only need this next bit of code if the sign bit of B is below the sign bit of A. This would only happen if @@ -3434,12 +3434,12 @@ xcoff_complain_overflow_signed_func (bfd *input_bfd, */ signmask = (fieldmask >> 1) + 1; if (((~ (a ^ b)) & (a ^ sum)) & signmask) - return TRUE; + return true; - return FALSE; + return false; } -static bfd_boolean +static bool xcoff_complain_overflow_unsigned_func (bfd *input_bfd, bfd_vma val, bfd_vma relocation, @@ -3472,9 +3472,9 @@ xcoff_complain_overflow_unsigned_func (bfd *input_bfd, b = (b & addrmask) >> howto->bitpos; sum = (a + b) & addrmask; if ((a | b | sum) & ~ fieldmask) - return TRUE; + return true; - return FALSE; + return false; } /* This is the relocation function for the RS/6000/POWER/PowerPC. @@ -3625,7 +3625,7 @@ xcoff_complain_overflow_unsigned_func (bfd *input_bfd, low-order 16 bit of a TOC relative relocation. */ -bfd_boolean +bool xcoff_ppc_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -3680,7 +3680,7 @@ xcoff_ppc_relocate_section (bfd *output_bfd, (_("%pB: relocatation (%d) at (0x%" BFD_VMA_FMT "x) has wrong" " r_rsize (0x%x)\n"), input_bfd, rel->r_type, rel->r_vaddr, rel->r_size); - return FALSE; + return false; } } @@ -3758,7 +3758,7 @@ xcoff_ppc_relocate_section (bfd *output_bfd, || !((*xcoff_calculate_relocation[rel->r_type]) (input_bfd, input_section, output_bfd, rel, sym, &howto, val, addend, &relocation, contents))) - return FALSE; + return false; /* address */ address = rel->r_vaddr - input_section->vma; @@ -3821,7 +3821,7 @@ xcoff_ppc_relocate_section (bfd *output_bfd, bfd_put_32 (input_bfd, value_to_relocate, location); } - return TRUE; + return true; } /* gcc-8 warns (*) on all the strncpy calls in this function about @@ -3841,7 +3841,7 @@ xcoff_ppc_relocate_section (bfd *output_bfd, # pragma GCC diagnostic push # pragma GCC diagnostic ignored "-Wstringop-truncation" #endif -static bfd_boolean +static bool _bfd_xcoff_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED, struct xcoff_loader_info *ldinfo, struct internal_ldsym *ldsym, @@ -3868,8 +3868,8 @@ _bfd_xcoff_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED, newstrings = bfd_realloc (ldinfo->strings, newalc); if (newstrings == NULL) { - ldinfo->failed = TRUE; - return FALSE; + ldinfo->failed = true; + return false; } ldinfo->string_alc = newalc; ldinfo->strings = newstrings; @@ -3883,10 +3883,10 @@ _bfd_xcoff_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED, ldinfo->string_size += len + 3; } - return TRUE; + return true; } -static bfd_boolean +static bool _bfd_xcoff_put_symbol_name (struct bfd_link_info *info, struct bfd_strtab_hash *strtab, struct internal_syment *sym, @@ -3898,17 +3898,17 @@ _bfd_xcoff_put_symbol_name (struct bfd_link_info *info, } else { - bfd_boolean hash; + bool hash; bfd_size_type indx; hash = !info->traditional_format; - indx = _bfd_stringtab_add (strtab, name, hash, FALSE); + indx = _bfd_stringtab_add (strtab, name, hash, false); if (indx == (bfd_size_type) -1) - return FALSE; + return false; sym->_n._n_n._n_zeroes = 0; sym->_n._n_n._n_offset = STRING_SIZE_SIZE + indx; } - return TRUE; + return true; } #if GCC_VERSION >= 8000 # pragma GCC diagnostic pop @@ -3948,22 +3948,22 @@ xcoff_create_csect_from_smclas (bfd *abfd, return return_value; } -static bfd_boolean +static bool xcoff_is_lineno_count_overflow (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma value) { if (0xffff <= value) - return TRUE; + return true; - return FALSE; + return false; } -static bfd_boolean +static bool xcoff_is_reloc_count_overflow (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma value) { if (0xffff <= value) - return TRUE; + return true; - return FALSE; + return false; } static bfd_vma @@ -3979,9 +3979,9 @@ xcoff_loader_reloc_offset (bfd *abfd, struct internal_ldhdr *ldhdr) return bfd_xcoff_ldhdrsz (abfd) + ldhdr->l_nsyms * bfd_xcoff_ldsymsz (abfd); } -static bfd_boolean +static bool xcoff_generate_rtinit (bfd *abfd, const char *init, const char *fini, - bfd_boolean rtld) + bool rtld) { bfd_byte filehdr_ext[FILHSZ]; bfd_byte scnhdr_ext[SCNHSZ]; @@ -4004,7 +4004,7 @@ xcoff_generate_rtinit (bfd *abfd, const char *init, const char *fini, char *rtld_name = "__rtld"; if (! bfd_xcoff_rtinit_size (abfd)) - return FALSE; + return false; initsz = (init == NULL ? 0 : 1 + strlen (init)); finisz = (fini == NULL ? 0 : 1 + strlen (fini)); @@ -4059,7 +4059,7 @@ xcoff_generate_rtinit (bfd *abfd, const char *init, const char *fini, data_buffer = NULL; data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size); if (data_buffer == NULL) - return FALSE; + return false; if (initsz) { @@ -4095,7 +4095,7 @@ xcoff_generate_rtinit (bfd *abfd, const char *init, const char *fini, string_table_size += 4; string_table = (bfd_byte *) bfd_zmalloc (string_table_size); if (string_table == NULL) - return FALSE; + return false; val = string_table_size; bfd_h_put_32 (abfd, val, &string_table[0]); @@ -4256,7 +4256,7 @@ xcoff_generate_rtinit (bfd *abfd, const char *init, const char *fini, free (data_buffer); data_buffer = NULL; - return TRUE; + return true; } @@ -4265,15 +4265,15 @@ HOWTO (0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_POS", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* glink @@ -4296,14 +4296,14 @@ static const unsigned long xcoff_glink_code[9] = /* Table to convert DWARF flags to section names. */ const struct xcoff_dwsect_name xcoff_dwsect_names[] = { - { SSUBTYP_DWINFO, ".dwinfo", TRUE }, - { SSUBTYP_DWLINE, ".dwline", TRUE }, - { SSUBTYP_DWPBNMS, ".dwpbnms", TRUE }, - { SSUBTYP_DWPBTYP, ".dwpbtyp", TRUE }, - { SSUBTYP_DWARNGE, ".dwarnge", TRUE }, - { SSUBTYP_DWABREV, ".dwabrev", FALSE }, - { SSUBTYP_DWSTR, ".dwstr", TRUE }, - { SSUBTYP_DWRNGES, ".dwrnges", TRUE } + { SSUBTYP_DWINFO, ".dwinfo", true }, + { SSUBTYP_DWLINE, ".dwline", true }, + { SSUBTYP_DWPBNMS, ".dwpbnms", true }, + { SSUBTYP_DWPBTYP, ".dwpbtyp", true }, + { SSUBTYP_DWARNGE, ".dwarnge", true }, + { SSUBTYP_DWABREV, ".dwabrev", false }, + { SSUBTYP_DWSTR, ".dwstr", true }, + { SSUBTYP_DWRNGES, ".dwrnges", true } }; /* For generic entry points. */ @@ -4412,10 +4412,10 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = RELSZ, LINESZ, FILNMLEN, - TRUE, /* _bfd_coff_long_filenames */ + true, /* _bfd_coff_long_filenames */ XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ - FALSE, /* _bfd_coff_force_symnames_in_strings */ + false, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, @@ -4594,10 +4594,10 @@ static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data = RELSZ, LINESZ, FILNMLEN, - TRUE, /* _bfd_coff_long_filenames */ + true, /* _bfd_coff_long_filenames */ XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ - FALSE, /* _bfd_coff_force_symnames_in_strings */ + false, /* _bfd_coff_force_symnames_in_strings */ 2, /* _bfd_coff_debug_string_prefix_length */ 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, diff --git a/bfd/coff-sh.c b/bfd/coff-sh.c index 04ef99b777..10d203f528 100644 --- a/bfd/coff-sh.c +++ b/bfd/coff-sh.c @@ -35,10 +35,10 @@ #include "coff/pe.h" #ifndef COFF_IMAGE_WITH_PE -static bfd_boolean sh_align_load_span +static bool sh_align_load_span (bfd *, asection *, bfd_byte *, - bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma), - void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *); + bool (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma), + void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bool *); #define _bfd_sh_align_load_span sh_align_load_span #endif @@ -75,7 +75,7 @@ static bfd_boolean sh_align_load_span /* Return TRUE if this relocation should appear in the output .reloc section. */ -static bfd_boolean +static bool in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, reloc_howto_type * howto) { @@ -85,13 +85,13 @@ in_reloc_p (bfd * abfd ATTRIBUTE_UNUSED, static bfd_reloc_status_type sh_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -static bfd_boolean +static bool sh_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); -static bfd_boolean +static bool sh_align_loads (bfd *, asection *, struct internal_reloc *, - bfd_byte *, bfd_boolean *); + bfd_byte *, bool *); /* The supported relocations. There are a lot of relocations defined in coff/internal.h which we do not expect to ever see. */ @@ -105,15 +105,15 @@ static reloc_howto_type sh_coff_howtos[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_imm32ce", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #else EMPTY_HOWTO (2), #endif @@ -129,15 +129,15 @@ static reloc_howto_type sh_coff_howtos[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_pcdisp8by2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (11), /* R_SH_PCDISP8 */ @@ -145,15 +145,15 @@ static reloc_howto_type sh_coff_howtos[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_pcdisp12by2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (13), @@ -161,15 +161,15 @@ static reloc_howto_type sh_coff_howtos[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_imm32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (15), #ifdef COFF_WITH_PE @@ -177,15 +177,15 @@ static reloc_howto_type sh_coff_howtos[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "rva32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #else EMPTY_HOWTO (16), /* R_SH_IMM8 */ #endif @@ -199,169 +199,169 @@ static reloc_howto_type sh_coff_howtos[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_pcrelimm8by2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_SH_PCRELIMM8BY4, /* type */ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_pcrelimm8by4", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_SH_IMM16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_imm16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_SWITCH16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_switch16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_SWITCH32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_switch32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_USES, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_uses", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_COUNT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_count", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_ALIGN, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_align", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_CODE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_code", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DATA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_data", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_LABEL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_label", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_SWITCH8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ sh_reloc, /* special_function */ "r_switch8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; #define SH_COFF_HOWTO_COUNT (sizeof sh_coff_howtos / sizeof sh_coff_howtos[0]) @@ -656,7 +656,7 @@ sh_reloc (bfd * abfd, #include "coffcode.h" -static bfd_boolean +static bool sh_relax_delete_bytes (bfd *, asection *, bfd_vma, int); /* This function handles relaxing on the SH. @@ -702,40 +702,40 @@ sh_relax_delete_bytes (bfd *, asection *, bfd_vma, int); align load and store instructions on four byte boundaries if we can, by swapping them with one of the adjacent instructions. */ -static bfd_boolean +static bool sh_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { struct internal_reloc *internal_relocs; - bfd_boolean have_code; + bool have_code; struct internal_reloc *irel, *irelend; bfd_byte *contents = NULL; - *again = FALSE; + *again = false; if (bfd_link_relocatable (link_info) || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) - return TRUE; + return true; if (coff_section_data (abfd, sec) == NULL) { size_t amt = sizeof (struct coff_section_tdata); sec->used_by_bfd = bfd_zalloc (abfd, amt); if (sec->used_by_bfd == NULL) - return FALSE; + return false; } internal_relocs = (_bfd_coff_read_internal_relocs (abfd, sec, link_info->keep_memory, - (bfd_byte *) NULL, FALSE, + (bfd_byte *) NULL, false, (struct internal_reloc *) NULL)); if (internal_relocs == NULL) goto error_return; - have_code = FALSE; + have_code = false; irelend = internal_relocs + sec->reloc_count; for (irel = internal_relocs; irel < irelend; irel++) @@ -747,7 +747,7 @@ sh_relax_section (bfd *abfd, bfd_signed_vma foff; if (irel->r_type == R_SH_CODE) - have_code = TRUE; + have_code = true; if (irel->r_type != R_SH_USES) continue; @@ -904,12 +904,12 @@ sh_relax_section (bfd *abfd, the linker is run. */ coff_section_data (abfd, sec)->relocs = internal_relocs; - coff_section_data (abfd, sec)->keep_relocs = TRUE; + coff_section_data (abfd, sec)->keep_relocs = true; coff_section_data (abfd, sec)->contents = contents; - coff_section_data (abfd, sec)->keep_contents = TRUE; + coff_section_data (abfd, sec)->keep_contents = true; - obj_coff_keep_syms (abfd) = TRUE; + obj_coff_keep_syms (abfd) = true; /* Replace the jsr with a bsr. */ @@ -965,7 +965,7 @@ sh_relax_section (bfd *abfd, /* That will change things, so, just in case it permits some other function call to come within range, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; /* Now check whether we got a COUNT reloc. */ if (irelcount >= irelend) @@ -1006,7 +1006,7 @@ sh_relax_section (bfd *abfd, byte boundaries. */ if (have_code) { - bfd_boolean swapped; + bool swapped; /* Get the section contents. */ if (contents == NULL) @@ -1026,12 +1026,12 @@ sh_relax_section (bfd *abfd, if (swapped) { coff_section_data (abfd, sec)->relocs = internal_relocs; - coff_section_data (abfd, sec)->keep_relocs = TRUE; + coff_section_data (abfd, sec)->keep_relocs = true; coff_section_data (abfd, sec)->contents = contents; - coff_section_data (abfd, sec)->keep_contents = TRUE; + coff_section_data (abfd, sec)->keep_contents = true; - obj_coff_keep_syms (abfd) = TRUE; + obj_coff_keep_syms (abfd) = true; } } @@ -1053,19 +1053,19 @@ sh_relax_section (bfd *abfd, coff_section_data (abfd, sec)->contents = contents; } - return TRUE; + return true; error_return: if (internal_relocs != coff_section_data (abfd, sec)->relocs) free (internal_relocs); if (contents != coff_section_data (abfd, sec)->contents) free (contents); - return FALSE; + return false; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool sh_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, @@ -1127,7 +1127,7 @@ sh_relax_delete_bytes (bfd *abfd, struct internal_syment sym; int off, adjust, oinsn; bfd_signed_vma voff = 0; - bfd_boolean overflow; + bool overflow; /* Get the new reloc address. */ nraddr = irel->r_vaddr - sec->vma; @@ -1289,7 +1289,7 @@ sh_relax_delete_bytes (bfd *abfd, if (adjust != 0) { oinsn = insn; - overflow = FALSE; + overflow = false; switch (irel->r_type) { default: @@ -1300,14 +1300,14 @@ sh_relax_delete_bytes (bfd *abfd, case R_SH_PCRELIMM8BY2: insn += adjust / 2; if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); break; case R_SH_PCDISP: insn += adjust / 2; if ((oinsn & 0xf000) != (insn & 0xf000)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); break; @@ -1321,21 +1321,21 @@ sh_relax_delete_bytes (bfd *abfd, ++insn; } if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); break; case R_SH_SWITCH8: voff += adjust; if (voff < 0 || voff >= 0xff) - overflow = TRUE; + overflow = true; bfd_put_8 (abfd, (bfd_vma) voff, contents + nraddr); break; case R_SH_SWITCH16: voff += adjust; if (voff < - 0x8000 || voff >= 0x8000) - overflow = TRUE; + overflow = true; bfd_put_signed_16 (abfd, (bfd_vma) voff, contents + nraddr); break; @@ -1356,7 +1356,7 @@ sh_relax_delete_bytes (bfd *abfd, (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"), abfd, (uint64_t) irel->r_vaddr); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -1381,10 +1381,10 @@ sh_relax_delete_bytes (bfd *abfd, FALSE, we should free them, if we are permitted to, when we leave sh_coff_relax_section. */ internal_relocs = (_bfd_coff_read_internal_relocs - (abfd, o, TRUE, (bfd_byte *) NULL, FALSE, + (abfd, o, true, (bfd_byte *) NULL, false, (struct internal_reloc *) NULL)); if (internal_relocs == NULL) - return FALSE; + return false; ocontents = NULL; irelscanend = internal_relocs + o->reloc_count; @@ -1420,7 +1420,7 @@ sh_relax_delete_bytes (bfd *abfd, else { if (!bfd_malloc_and_get_section (abfd, o, &ocontents)) - return FALSE; + return false; /* We always cache the section contents. Perhaps, if info->keep_memory is FALSE, we should free them, if we are permitted to, @@ -1435,7 +1435,7 @@ sh_relax_delete_bytes (bfd *abfd, bfd_put_32 (abfd, val - count, ocontents + irelscan->r_vaddr - o->vma); - coff_section_data (abfd, o)->keep_contents = TRUE; + coff_section_data (abfd, o)->keep_contents = true; } } } @@ -1450,7 +1450,7 @@ sh_relax_delete_bytes (bfd *abfd, _bfd_error_handler (_("%pB: fatal: generic symbols retrieved before relaxing"), abfd); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* Adjust all the symbols. */ @@ -1503,7 +1503,7 @@ sh_relax_delete_bytes (bfd *abfd, } } - return TRUE; + return true; } /* This is yet another version of the SH opcode table, used to rapidly @@ -2057,7 +2057,7 @@ sh_insn_info (unsigned int insn) /* See whether an instruction uses a general purpose register. */ -static bfd_boolean +static bool sh_insn_uses_reg (unsigned int insn, const struct sh_opcode *op, unsigned int reg) @@ -2068,24 +2068,24 @@ sh_insn_uses_reg (unsigned int insn, if ((f & USES1) != 0 && USES1_REG (insn) == reg) - return TRUE; + return true; if ((f & USES2) != 0 && USES2_REG (insn) == reg) - return TRUE; + return true; if ((f & USESR0) != 0 && reg == 0) - return TRUE; + return true; if ((f & USESAS) && reg == USESAS_REG (insn)) - return TRUE; + return true; if ((f & USESR8) && reg == 8) - return TRUE; + return true; - return FALSE; + return false; } /* See whether an instruction sets a general purpose register. */ -static bfd_boolean +static bool sh_insn_sets_reg (unsigned int insn, const struct sh_opcode *op, unsigned int reg) @@ -2096,35 +2096,35 @@ sh_insn_sets_reg (unsigned int insn, if ((f & SETS1) != 0 && SETS1_REG (insn) == reg) - return TRUE; + return true; if ((f & SETS2) != 0 && SETS2_REG (insn) == reg) - return TRUE; + return true; if ((f & SETSR0) != 0 && reg == 0) - return TRUE; + return true; if ((f & SETSAS) && reg == SETSAS_REG (insn)) - return TRUE; + return true; - return FALSE; + return false; } /* See whether an instruction uses or sets a general purpose register */ -static bfd_boolean +static bool sh_insn_uses_or_sets_reg (unsigned int insn, const struct sh_opcode *op, unsigned int reg) { if (sh_insn_uses_reg (insn, op, reg)) - return TRUE; + return true; return sh_insn_sets_reg (insn, op, reg); } /* See whether an instruction uses a floating point register. */ -static bfd_boolean +static bool sh_insn_uses_freg (unsigned int insn, const struct sh_opcode *op, unsigned int freg) @@ -2144,20 +2144,20 @@ sh_insn_uses_freg (unsigned int insn, if ((f & USESF1) != 0 && (USESF1_REG (insn) & 0xe) == (freg & 0xe)) - return TRUE; + return true; if ((f & USESF2) != 0 && (USESF2_REG (insn) & 0xe) == (freg & 0xe)) - return TRUE; + return true; if ((f & USESF0) != 0 && freg == 0) - return TRUE; + return true; - return FALSE; + return false; } /* See whether an instruction sets a floating point register. */ -static bfd_boolean +static bool sh_insn_sets_freg (unsigned int insn, const struct sh_opcode *op, unsigned int freg) @@ -2177,20 +2177,20 @@ sh_insn_sets_freg (unsigned int insn, if ((f & SETSF1) != 0 && (SETSF1_REG (insn) & 0xe) == (freg & 0xe)) - return TRUE; + return true; - return FALSE; + return false; } /* See whether an instruction uses or sets a floating point register */ -static bfd_boolean +static bool sh_insn_uses_or_sets_freg (unsigned int insn, const struct sh_opcode *op, unsigned int reg) { if (sh_insn_uses_freg (insn, op, reg)) - return TRUE; + return true; return sh_insn_sets_freg (insn, op, reg); } @@ -2200,7 +2200,7 @@ sh_insn_uses_or_sets_freg (unsigned int insn, This should return TRUE if there is a conflict, or FALSE if the instructions can be swapped safely. */ -static bfd_boolean +static bool sh_insns_conflict (unsigned int i1, const struct sh_opcode *op1, unsigned int i2, @@ -2215,57 +2215,57 @@ sh_insns_conflict (unsigned int i1, FIXME: shouldn't test raw opcodes here. */ if (((i1 & 0xf0ff) == 0x4066 && (i2 & 0xf000) == 0xf000) || ((i2 & 0xf0ff) == 0x4066 && (i1 & 0xf000) == 0xf000)) - return TRUE; + return true; if ((f1 & (BRANCH | DELAY)) != 0 || (f2 & (BRANCH | DELAY)) != 0) - return TRUE; + return true; if (((f1 | f2) & SETSSP) && (f1 & (SETSSP | USESSP)) && (f2 & (SETSSP | USESSP))) - return TRUE; + return true; if ((f1 & SETS1) != 0 && sh_insn_uses_or_sets_reg (i2, op2, SETS1_REG (i1))) - return TRUE; + return true; if ((f1 & SETS2) != 0 && sh_insn_uses_or_sets_reg (i2, op2, SETS2_REG (i1))) - return TRUE; + return true; if ((f1 & SETSR0) != 0 && sh_insn_uses_or_sets_reg (i2, op2, 0)) - return TRUE; + return true; if ((f1 & SETSAS) && sh_insn_uses_or_sets_reg (i2, op2, SETSAS_REG (i1))) - return TRUE; + return true; if ((f1 & SETSF1) != 0 && sh_insn_uses_or_sets_freg (i2, op2, SETSF1_REG (i1))) - return TRUE; + return true; if ((f2 & SETS1) != 0 && sh_insn_uses_or_sets_reg (i1, op1, SETS1_REG (i2))) - return TRUE; + return true; if ((f2 & SETS2) != 0 && sh_insn_uses_or_sets_reg (i1, op1, SETS2_REG (i2))) - return TRUE; + return true; if ((f2 & SETSR0) != 0 && sh_insn_uses_or_sets_reg (i1, op1, 0)) - return TRUE; + return true; if ((f2 & SETSAS) && sh_insn_uses_or_sets_reg (i1, op1, SETSAS_REG (i2))) - return TRUE; + return true; if ((f2 & SETSF1) != 0 && sh_insn_uses_or_sets_freg (i1, op1, SETSF1_REG (i2))) - return TRUE; + return true; /* The instructions do not conflict. */ - return FALSE; + return false; } /* I1 is a load instruction, and I2 is some other instruction. Return TRUE if I1 loads a register which I2 uses. */ -static bfd_boolean +static bool sh_load_use (unsigned int i1, const struct sh_opcode *op1, unsigned int i2, @@ -2276,7 +2276,7 @@ sh_load_use (unsigned int i1, f1 = op1->flags; if ((f1 & LOAD) == 0) - return FALSE; + return false; /* If both SETS1 and SETSSP are set, that means a load to a special register using postincrement addressing mode, which we don't care @@ -2284,17 +2284,17 @@ sh_load_use (unsigned int i1, if ((f1 & SETS1) != 0 && (f1 & SETSSP) == 0 && sh_insn_uses_reg (i2, op2, (i1 & 0x0f00) >> 8)) - return TRUE; + return true; if ((f1 & SETSR0) != 0 && sh_insn_uses_reg (i2, op2, 0)) - return TRUE; + return true; if ((f1 & SETSF1) != 0 && sh_insn_uses_freg (i2, op2, (i1 & 0x0f00) >> 8)) - return TRUE; + return true; - return FALSE; + return false; } /* Try to align loads and stores within a span of memory. This is @@ -2310,17 +2310,17 @@ sh_load_use (unsigned int i1, #ifdef COFF_WITH_PE static #endif -bfd_boolean +bool _bfd_sh_align_load_span (bfd *abfd, asection *sec, bfd_byte *contents, - bfd_boolean (*swap) (bfd *, asection *, void *, bfd_byte *, bfd_vma), + bool (*swap) (bfd *, asection *, void *, bfd_byte *, bfd_vma), void * relocs, bfd_vma **plabel, bfd_vma *label_end, bfd_vma start, bfd_vma stop, - bfd_boolean *pswapped) + bool *pswapped) { int dsp = (abfd->arch_info->mach == bfd_mach_sh_dsp || abfd->arch_info->mach == bfd_mach_sh3_dsp); @@ -2330,7 +2330,7 @@ _bfd_sh_align_load_span (bfd *abfd, desirable. In fact, it is counter-productive, since it interferes with the schedules generated by the compiler. */ if (abfd->arch_info->mach == bfd_mach_sh4) - return TRUE; + return true; /* If we are linking sh[3]-dsp code, swap the FPU instructions for DSP instructions. */ @@ -2404,14 +2404,14 @@ _bfd_sh_align_load_span (bfd *abfd, && (prev_op->flags & (LOAD | STORE)) == 0 && ! sh_insns_conflict (prev_insn, prev_op, insn, op)) { - bfd_boolean ok; + bool ok; /* The load/store instruction does not have a label, and there is a previous instruction; PREV_INSN is not itself a load/store instruction, and PREV_INSN and INSN do not conflict. */ - ok = TRUE; + ok = true; if (i >= start + 4) { @@ -2426,7 +2426,7 @@ _bfd_sh_align_load_span (bfd *abfd, can not swap. */ if (prev2_op == NULL || (prev2_op->flags & DELAY) != 0) - ok = FALSE; + ok = false; /* If the instruction before PREV_INSN is a load, and it sets a register which INSN uses, then @@ -2436,14 +2436,14 @@ _bfd_sh_align_load_span (bfd *abfd, if (ok && (prev2_op->flags & LOAD) != 0 && sh_load_use (prev2_insn, prev2_op, insn, op)) - ok = FALSE; + ok = false; } if (ok) { if (! (*swap) (abfd, sec, relocs, contents, i - 2)) - return FALSE; - *pswapped = TRUE; + return false; + *pswapped = true; continue; } } @@ -2465,12 +2465,12 @@ _bfd_sh_align_load_span (bfd *abfd, && (next_op->flags & (LOAD | STORE)) == 0 && ! sh_insns_conflict (insn, op, next_insn, next_op)) { - bfd_boolean ok; + bool ok; /* NEXT_INSN is not itself a load/store instruction, and it does not conflict with INSN. */ - ok = TRUE; + ok = true; /* If PREV_INSN is a load, and it sets a register which NEXT_INSN uses, then putting NEXT_INSN @@ -2479,7 +2479,7 @@ _bfd_sh_align_load_span (bfd *abfd, if (prev_op != NULL && (prev_op->flags & LOAD) != 0 && sh_load_use (prev_insn, prev_op, next_insn, next_op)) - ok = FALSE; + ok = false; /* If INSN is a load, and it sets a register which the insn after NEXT_INSN uses, then doing the @@ -2502,27 +2502,27 @@ _bfd_sh_align_load_span (bfd *abfd, if (next2_op == NULL || ((next2_op->flags & (LOAD | STORE)) == 0 && sh_load_use (insn, op, next2_insn, next2_op))) - ok = FALSE; + ok = false; } if (ok) { if (! (*swap) (abfd, sec, relocs, contents, i)) - return FALSE; - *pswapped = TRUE; + return false; + *pswapped = true; continue; } } } } - return TRUE; + return true; } #endif /* not COFF_IMAGE_WITH_PE */ /* Swap two SH instructions. */ -static bfd_boolean +static bool sh_swap_insns (bfd * abfd, asection * sec, void * relocs, @@ -2589,10 +2589,10 @@ sh_swap_insns (bfd * abfd, { bfd_byte *loc; unsigned short insn, oinsn; - bfd_boolean overflow; + bool overflow; loc = contents + irel->r_vaddr - sec->vma; - overflow = FALSE; + overflow = false; switch (type) { default: @@ -2604,7 +2604,7 @@ sh_swap_insns (bfd * abfd, oinsn = insn; insn += add / 2; if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, loc); break; @@ -2613,7 +2613,7 @@ sh_swap_insns (bfd * abfd, oinsn = insn; insn += add / 2; if ((oinsn & 0xf000) != (insn & 0xf000)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, loc); break; @@ -2630,7 +2630,7 @@ sh_swap_insns (bfd * abfd, oinsn = insn; insn += add / 2; if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, loc); } @@ -2644,12 +2644,12 @@ sh_swap_insns (bfd * abfd, (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"), abfd, (uint64_t) irel->r_vaddr); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Look for loads and stores which we can align to four byte @@ -2657,19 +2657,19 @@ sh_swap_insns (bfd * abfd, this is desirable. This sets *PSWAPPED if some instruction was swapped. */ -static bfd_boolean +static bool sh_align_loads (bfd *abfd, asection *sec, struct internal_reloc *internal_relocs, bfd_byte *contents, - bfd_boolean *pswapped) + bool *pswapped) { struct internal_reloc *irel, *irelend; bfd_vma *labels = NULL; bfd_vma *label, *label_end; bfd_size_type amt; - *pswapped = FALSE; + *pswapped = false; irelend = internal_relocs + sec->reloc_count; @@ -2719,17 +2719,17 @@ sh_align_loads (bfd *abfd, free (labels); - return TRUE; + return true; error_return: free (labels); - return FALSE; + return false; } /* This is a modification of _bfd_coff_generic_relocate_section, which will handle SH relaxing. */ -static bfd_boolean +static bool sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, bfd *input_bfd, @@ -2781,7 +2781,7 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%pB: illegal symbol index %ld in relocs"), input_bfd, symndx); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } h = obj_coff_sym_hashes (input_bfd)[symndx]; sym = syms + symndx; @@ -2803,7 +2803,7 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (howto == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } #ifdef COFF_WITH_PE @@ -2850,7 +2850,7 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, else if (! bfd_link_relocatable (info)) (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, TRUE); + rel->r_vaddr - input_section->vma, true); } rstat = _bfd_final_link_relocate (howto, input_bfd, input_section, @@ -2891,7 +2891,7 @@ sh_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -2902,7 +2902,7 @@ sh_coff_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { asection *input_section = link_order->u.indirect.section; @@ -2937,8 +2937,8 @@ sh_coff_get_relocated_section_contents (bfd *output_bfd, goto error_return; internal_relocs = (_bfd_coff_read_internal_relocs - (input_bfd, input_section, FALSE, (bfd_byte *) NULL, - FALSE, (struct internal_reloc *) NULL)); + (input_bfd, input_section, false, (bfd_byte *) NULL, + false, (struct internal_reloc *) NULL)); if (internal_relocs == NULL) goto error_return; @@ -3052,18 +3052,18 @@ coff_small_object_p (bfd *abfd) /* Set the section alignment for the small versions. */ -static bfd_boolean +static bool coff_small_new_section_hook (bfd *abfd, asection *section) { if (! coff_new_section_hook (abfd, section)) - return FALSE; + return false; /* We must align to at least a four byte boundary, because longword accesses must be on a four byte boundary. */ if (section->alignment_power == COFF_DEFAULT_SECTION_ALIGNMENT_POWER) section->alignment_power = 2; - return TRUE; + return true; } /* This is copied from bfd_coff_std_swap_table so that we can change @@ -3078,16 +3078,16 @@ static bfd_coff_backend_data bfd_coff_small_swap_table = coff_swap_scnhdr_out, FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN, #ifdef COFF_LONG_FILENAMES - TRUE, + true, #else - FALSE, + false, #endif COFF_DEFAULT_LONG_SECTION_NAMES, 2, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS - TRUE, + true, #else - FALSE, + false, #endif #ifdef COFF_DEBUG_STRING_WIDE_PREFIX 4, diff --git a/bfd/coff-stgo32.c b/bfd/coff-stgo32.c index 8f75eecf4e..e9fd343ee3 100644 --- a/bfd/coff-stgo32.c +++ b/bfd/coff-stgo32.c @@ -54,12 +54,12 @@ #include "coff/msdos.h" static bfd_cleanup go32exe_check_format (bfd *); -static bfd_boolean go32exe_write_object_contents (bfd *); -static bfd_boolean go32exe_mkobject (bfd *); -static bfd_boolean go32exe_copy_private_bfd_data (bfd *, bfd *); +static bool go32exe_write_object_contents (bfd *); +static bool go32exe_mkobject (bfd *); +static bool go32exe_copy_private_bfd_data (bfd *, bfd *); /* Defined in coff-go32.c. */ -bfd_boolean _bfd_go32_mkobject (bfd *); +bool _bfd_go32_mkobject (bfd *); void _bfd_go32_swap_scnhdr_in (bfd *, void *, void *); unsigned int _bfd_go32_swap_scnhdr_out (bfd *, void *, void *); @@ -217,12 +217,12 @@ go32exe_create_stub (bfd *abfd) /* If ibfd was a stubbed coff image, copy the stub from that bfd to the new obfd. */ -static bfd_boolean +static bool go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { /* Check if both are the same targets. */ if (ibfd->xvec != obfd->xvec) - return TRUE; + return true; /* Make sure we have a source stub. */ BFD_ASSERT (coff_data (ibfd)->stub != NULL); @@ -231,7 +231,7 @@ go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd) if (coff_data (ibfd)->stub_size > coff_data (obfd)->stub_size) coff_data (obfd)->stub = bfd_alloc (obfd, coff_data (ibfd)->stub_size); if (coff_data (obfd)->stub == NULL) - return FALSE; + return false; /* Now copy the stub. */ memcpy (coff_data (obfd)->stub, coff_data (ibfd)->stub, @@ -239,7 +239,7 @@ go32exe_copy_private_bfd_data (bfd *ibfd, bfd *obfd) coff_data (obfd)->stub_size = coff_data (ibfd)->stub_size; obfd->origin = coff_data (obfd)->stub_size; - return TRUE; + return true; } /* Cleanup function, returned from check_format hook. */ @@ -332,7 +332,7 @@ go32exe_check_format (bfd *abfd) /* Write the stub to the output file, then call coff_write_object_contents. */ -static bfd_boolean +static bool go32exe_write_object_contents (bfd *abfd) { const bfd_size_type pos = bfd_tell (abfd); @@ -345,14 +345,14 @@ go32exe_write_object_contents (bfd *abfd) /* Write the stub. */ abfd->origin = 0; if (bfd_seek (abfd, 0, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bwrite (coff_data (abfd)->stub, stubsize, abfd) != stubsize) - return FALSE; + return false; /* Seek back to where we were. */ abfd->origin = stubsize; if (bfd_seek (abfd, pos, SEEK_SET) != 0) - return FALSE; + return false; return coff_write_object_contents (abfd); } @@ -360,23 +360,23 @@ go32exe_write_object_contents (bfd *abfd) /* mkobject hook. Called directly through bfd_set_format or via coff_mkobject_hook etc from bfd_check_format. */ -static bfd_boolean +static bool go32exe_mkobject (bfd *abfd) { /* Don't output to an archive. */ if (abfd->my_archive != NULL) - return FALSE; + return false; if (!_bfd_go32_mkobject (abfd)) - return FALSE; + return false; go32exe_create_stub (abfd); if (coff_data (abfd)->stub == NULL) { bfd_release (abfd, coff_data (abfd)); - return FALSE; + return false; } abfd->origin = coff_data (abfd)->stub_size; - return TRUE; + return true; } diff --git a/bfd/coff-tic30.c b/bfd/coff-tic30.c index f4d3a13ef4..a3ea69e1a3 100644 --- a/bfd/coff-tic30.c +++ b/bfd/coff-tic30.c @@ -31,16 +31,16 @@ reloc_howto_type tic30_coff_howto_table[] = { - HOWTO (R_TIC30_ABS16, 2, 1, 16, FALSE, 0, 0, NULL, - "16", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE), - HOWTO (R_TIC30_ABS24, 2, 2, 24, FALSE, 8, complain_overflow_bitfield, NULL, - "24", FALSE, 0xFFFFFF00, 0xFFFFFF00, FALSE), - HOWTO (R_TIC30_LDP, 18, 0, 24, FALSE, 0, complain_overflow_bitfield, NULL, - "LDP", FALSE, 0x00FF0000, 0x000000FF, FALSE), - HOWTO (R_TIC30_ABS32, 2, 2, 32, FALSE, 0, complain_overflow_bitfield, NULL, - "32", FALSE, 0xFFFFFFFF, 0xFFFFFFFF, FALSE), - HOWTO (R_TIC30_PC16, 2, 1, 16, TRUE, 0, complain_overflow_signed, NULL, - "PCREL", FALSE, 0x0000FFFF, 0x0000FFFF, FALSE), + HOWTO (R_TIC30_ABS16, 2, 1, 16, false, 0, 0, NULL, + "16", false, 0x0000FFFF, 0x0000FFFF, false), + HOWTO (R_TIC30_ABS24, 2, 2, 24, false, 8, complain_overflow_bitfield, NULL, + "24", false, 0xFFFFFF00, 0xFFFFFF00, false), + HOWTO (R_TIC30_LDP, 18, 0, 24, false, 0, complain_overflow_bitfield, NULL, + "LDP", false, 0x00FF0000, 0x000000FF, false), + HOWTO (R_TIC30_ABS32, 2, 2, 32, false, 0, complain_overflow_bitfield, NULL, + "32", false, 0xFFFFFFFF, 0xFFFFFFFF, false), + HOWTO (R_TIC30_PC16, 2, 1, 16, true, 0, complain_overflow_signed, NULL, + "PCREL", false, 0x0000FFFF, 0x0000FFFF, false), EMPTY_HOWTO (-1) }; diff --git a/bfd/coff-tic4x.c b/bfd/coff-tic4x.c index e26dcd8955..8804171ce6 100644 --- a/bfd/coff-tic4x.c +++ b/bfd/coff-tic4x.c @@ -41,13 +41,13 @@ tic4x_reloc_processing (arelent *, struct internal_reloc *, /* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local labels. */ -static bfd_boolean +static bool ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { if (TICOFF_LOCAL_LABEL_P(name)) - return TRUE; - return FALSE; + return true; + return false; } #define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name @@ -92,20 +92,20 @@ tic4x_relocation (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type tic4x_howto_table[] = { - HOWTO(R_RELWORD, 0, 2, 16, FALSE, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO(R_REL24, 0, 2, 24, FALSE, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), - HOWTO(R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_PCRWORD, 0, 2, 16, TRUE, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO(R_PCR24, 0, 2, 24, TRUE, 0, complain_overflow_signed, tic4x_relocation, "PCR24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), - HOWTO(R_PARTLS16, 0, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO(R_PARTMS8, 16, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO(R_RELWORD, 0, 2, 16, FALSE, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO(R_REL24, 0, 2, 24, FALSE, 0, complain_overflow_signed, tic4x_relocation, "AREL24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), - HOWTO(R_RELLONG, 0, 2, 32, FALSE, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_PCRWORD, 0, 2, 16, TRUE, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO(R_PCR24, 0, 2, 24, TRUE, 0, complain_overflow_signed, tic4x_relocation, "APCR24", TRUE, 0x00ffffff, 0x00ffffff, FALSE), - HOWTO(R_PARTLS16, 0, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", TRUE, 0x0000ffff, 0x0000ffff, FALSE), - HOWTO(R_PARTMS8, 16, 2, 16, FALSE, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", TRUE, 0x0000ffff, 0x0000ffff, FALSE), + HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "RELWORD", true, 0x0000ffff, 0x0000ffff, false), + HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_bitfield, tic4x_relocation, "REL24", true, 0x00ffffff, 0x00ffffff, false), + HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_dont, tic4x_relocation, "RELLONG", true, 0xffffffff, 0xffffffff, false), + HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "PCRWORD", true, 0x0000ffff, 0x0000ffff, false), + HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "PCR24", true, 0x00ffffff, 0x00ffffff, false), + HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTLS16", true, 0x0000ffff, 0x0000ffff, false), + HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "PARTMS8", true, 0x0000ffff, 0x0000ffff, false), + HOWTO(R_RELWORD, 0, 2, 16, false, 0, complain_overflow_signed, tic4x_relocation, "ARELWORD", true, 0x0000ffff, 0x0000ffff, false), + HOWTO(R_REL24, 0, 2, 24, false, 0, complain_overflow_signed, tic4x_relocation, "AREL24", true, 0x00ffffff, 0x00ffffff, false), + HOWTO(R_RELLONG, 0, 2, 32, false, 0, complain_overflow_signed, tic4x_relocation, "ARELLONG", true, 0xffffffff, 0xffffffff, false), + HOWTO(R_PCRWORD, 0, 2, 16, true, 0, complain_overflow_signed, tic4x_relocation, "APCRWORD", true, 0x0000ffff, 0x0000ffff, false), + HOWTO(R_PCR24, 0, 2, 24, true, 0, complain_overflow_signed, tic4x_relocation, "APCR24", true, 0x00ffffff, 0x00ffffff, false), + HOWTO(R_PARTLS16, 0, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTLS16", true, 0x0000ffff, 0x0000ffff, false), + HOWTO(R_PARTMS8, 16, 2, 16, false, 0, complain_overflow_dont, tic4x_relocation, "APARTMS8", true, 0x0000ffff, 0x0000ffff, false), }; #define HOWTO_SIZE (sizeof(tic4x_howto_table) / sizeof(tic4x_howto_table[0])) diff --git a/bfd/coff-tic54x.c b/bfd/coff-tic54x.c index 3c18221d24..63d36ae437 100644 --- a/bfd/coff-tic54x.c +++ b/bfd/coff-tic54x.c @@ -112,7 +112,7 @@ bfd_ticoff_get_section_load_page (asection *sect) /* Set the architecture appropriately. Allow unkown architectures (e.g. binary). */ -static bfd_boolean +static bool tic54x_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long machine) @@ -121,7 +121,7 @@ tic54x_set_arch_mach (bfd *abfd, arch = bfd_arch_tic54x; else if (arch != bfd_arch_tic54x) - return FALSE; + return false; return bfd_default_set_arch_mach (abfd, arch, machine); } @@ -154,59 +154,59 @@ reloc_howto_type tic54x_howto_table[] = /* NORMAL BANK */ /* 16-bit direct reference to symbol's address. */ - HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont, - tic54x_relocation,"REL16",FALSE,0xFFFF,0xFFFF,FALSE), + HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont, + tic54x_relocation,"REL16",false,0xFFFF,0xFFFF,false), /* 7 LSBs of an address */ - HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont, - tic54x_relocation,"LS7",FALSE,0x007F,0x007F,FALSE), + HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont, + tic54x_relocation,"LS7",false,0x007F,0x007F,false), /* 9 MSBs of an address */ /* TI assembler doesn't shift its encoding, and is thus incompatible */ - HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont, - tic54x_relocation,"MS9",FALSE,0x01FF,0x01FF,FALSE), + HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont, + tic54x_relocation,"MS9",false,0x01FF,0x01FF,false), /* 23-bit relocation */ - HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont, - tic54x_relocation,"RELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE), + HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont, + tic54x_relocation,"RELEXT",false,0x7FFFFF,0x7FFFFF,false), /* 16 bits of 23-bit extended address */ - HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont, - tic54x_relocation,"RELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE), + HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont, + tic54x_relocation,"RELEXT16",false,0x7FFFFF,0x7FFFFF,false), /* upper 7 bits of 23-bit extended address */ - HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont, - tic54x_relocation,"RELEXTMS7",FALSE,0x7F,0x7F,FALSE), + HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont, + tic54x_relocation,"RELEXTMS7",false,0x7F,0x7F,false), /* ABSOLUTE BANK */ /* 16-bit direct reference to symbol's address, absolute */ - HOWTO (R_RELWORD,0,1,16,FALSE,0,complain_overflow_dont, - tic54x_relocation,"AREL16",FALSE,0xFFFF,0xFFFF,FALSE), + HOWTO (R_RELWORD,0,1,16,false,0,complain_overflow_dont, + tic54x_relocation,"AREL16",false,0xFFFF,0xFFFF,false), /* 7 LSBs of an address, absolute */ - HOWTO (R_PARTLS7,0,1,7,FALSE,0,complain_overflow_dont, - tic54x_relocation,"ALS7",FALSE,0x007F,0x007F,FALSE), + HOWTO (R_PARTLS7,0,1,7,false,0,complain_overflow_dont, + tic54x_relocation,"ALS7",false,0x007F,0x007F,false), /* 9 MSBs of an address, absolute */ /* TI assembler doesn't shift its encoding, and is thus incompatible */ - HOWTO (R_PARTMS9,7,1,9,FALSE,0,complain_overflow_dont, - tic54x_relocation,"AMS9",FALSE,0x01FF,0x01FF,FALSE), + HOWTO (R_PARTMS9,7,1,9,false,0,complain_overflow_dont, + tic54x_relocation,"AMS9",false,0x01FF,0x01FF,false), /* 23-bit direct reference, absolute */ - HOWTO (R_EXTWORD,0,2,23,FALSE,0,complain_overflow_dont, - tic54x_relocation,"ARELEXT",FALSE,0x7FFFFF,0x7FFFFF,FALSE), + HOWTO (R_EXTWORD,0,2,23,false,0,complain_overflow_dont, + tic54x_relocation,"ARELEXT",false,0x7FFFFF,0x7FFFFF,false), /* 16 bits of 23-bit extended address, absolute */ - HOWTO (R_EXTWORD16,0,1,16,FALSE,0,complain_overflow_dont, - tic54x_relocation,"ARELEXT16",FALSE,0x7FFFFF,0x7FFFFF,FALSE), + HOWTO (R_EXTWORD16,0,1,16,false,0,complain_overflow_dont, + tic54x_relocation,"ARELEXT16",false,0x7FFFFF,0x7FFFFF,false), /* upper 7 bits of 23-bit extended address, absolute */ - HOWTO (R_EXTWORDMS7,16,1,7,FALSE,0,complain_overflow_dont, - tic54x_relocation,"ARELEXTMS7",FALSE,0x7F,0x7F,FALSE), + HOWTO (R_EXTWORDMS7,16,1,7,false,0,complain_overflow_dont, + tic54x_relocation,"ARELEXTMS7",false,0x7F,0x7F,false), /* 32-bit relocation exclusively for stabs */ - HOWTO (R_RELLONG,0,2,32,FALSE,0,complain_overflow_dont, - tic54x_relocation,"STAB",FALSE,0xFFFFFFFF,0xFFFFFFFF,FALSE), + HOWTO (R_RELLONG,0,2,32,false,0,complain_overflow_dont, + tic54x_relocation,"STAB",false,0xFFFFFFFF,0xFFFFFFFF,false), }; #define coff_bfd_reloc_type_lookup tic54x_coff_reloc_type_lookup @@ -312,13 +312,13 @@ coff_tic54x_rtype_to_howto (bfd *abfd, /* Replace the stock _bfd_coff_is_local_label_name to recognize TI COFF local labels. */ -static bfd_boolean +static bool ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { if (TICOFF_LOCAL_LABEL_P(name)) - return TRUE; - return FALSE; + return true; + return false; } #define coff_bfd_is_local_label_name ticoff_bfd_is_local_label_name @@ -335,7 +335,7 @@ ticoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, #include "coffcode.h" -static bfd_boolean +static bool tic54x_set_section_contents (bfd *abfd, sec_ptr section, const void * location, @@ -474,9 +474,9 @@ const bfd_target tic54x_coff0_beh_vec = 15, /* ar_max_namelen */ 0, /* match priority. */ #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS - TRUE, /* keep unused section symbols. */ + true, /* keep unused section symbols. */ #else - FALSE, /* keep unused section symbols. */ + false, /* keep unused section symbols. */ #endif bfd_getl64, bfd_getl_signed_64, bfd_putl64, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, @@ -537,9 +537,9 @@ const bfd_target tic54x_coff1_vec = 15, /* ar_max_namelen */ 0, /* match priority. */ #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS - TRUE, /* keep unused section symbols. */ + true, /* keep unused section symbols. */ #else - FALSE, /* keep unused section symbols. */ + false, /* keep unused section symbols. */ #endif bfd_getl64, bfd_getl_signed_64, bfd_putl64, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, @@ -600,9 +600,9 @@ const bfd_target tic54x_coff1_beh_vec = 15, /* ar_max_namelen */ 0, /* match priority. */ #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS - TRUE, /* keep unused section symbols. */ + true, /* keep unused section symbols. */ #else - FALSE, /* keep unused section symbols. */ + false, /* keep unused section symbols. */ #endif bfd_getl64, bfd_getl_signed_64, bfd_putl64, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, @@ -663,9 +663,9 @@ const bfd_target tic54x_coff2_vec = 15, /* ar_max_namelen */ 0, /* match priority. */ #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS - TRUE, /* keep unused section symbols. */ + true, /* keep unused section symbols. */ #else - FALSE, /* keep unused section symbols. */ + false, /* keep unused section symbols. */ #endif bfd_getl64, bfd_getl_signed_64, bfd_putl64, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, @@ -726,9 +726,9 @@ const bfd_target tic54x_coff2_beh_vec = 15, /* ar_max_namelen */ 0, /* match priority. */ #ifdef TARGET_KEEP_UNUSED_SECTION_SYMBOLS - TRUE, /* keep unused section symbols. */ + true, /* keep unused section symbols. */ #else - FALSE, /* keep unused section symbols. */ + false, /* keep unused section symbols. */ #endif bfd_getl64, bfd_getl_signed_64, bfd_putl64, tic54x_getl32, tic54x_getl_signed_32, tic54x_putl32, diff --git a/bfd/coff-x86_64.c b/bfd/coff-x86_64.c index 870df2b2b7..67f2ee5e07 100644 --- a/bfd/coff-x86_64.c +++ b/bfd/coff-x86_64.c @@ -148,7 +148,7 @@ coff_amd64_reloc (bfd *abfd, if (link_info == NULL) return bfd_reloc_dangerous; h = bfd_link_hash_lookup (link_info->hash, "__ImageBase", - FALSE, FALSE, FALSE); + false, false, false); if (h == NULL) return bfd_reloc_dangerous; while (h->type == bfd_link_hash_indirect) @@ -226,7 +226,7 @@ coff_amd64_reloc (bfd *abfd, /* Return TRUE if this relocation should appear in the output .reloc section. */ -static bfd_boolean +static bool in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto) { return ! howto->pc_relative && howto->type != R_AMD64_IMAGEBASE @@ -235,7 +235,7 @@ in_reloc_p (bfd *abfd ATTRIBUTE_UNUSED, reloc_howto_type *howto) #endif /* COFF_WITH_PE */ #ifndef PCRELOFFSET -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #endif static reloc_howto_type howto_table[] = @@ -245,53 +245,53 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long, 4 = long long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_ADDR64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffffffffffffll, /* src_mask */ 0xffffffffffffffffll, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_AMD64_DIR32, /* type 2 */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_ADDR32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* PE IMAGE_REL_AMD64_ADDR32NB relocation (3). */ HOWTO (R_AMD64_IMAGEBASE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_ADDR32NB", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32-bit longword PC relative relocation (4). */ HOWTO (R_AMD64_PCRLONG, /* type 4 */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_REL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -300,12 +300,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_REL32_1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -313,12 +313,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_REL32_2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -326,12 +326,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_REL32_3", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -339,12 +339,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_REL32_4", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -352,12 +352,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_REL32_5", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -368,15 +368,15 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "IMAGE_REL_AMD64_SECREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ #else EMPTY_HOWTO (11), #endif @@ -387,12 +387,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "R_X86_64_PC64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffffffffffffll, /* src_mask */ 0xffffffffffffffffll, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -404,12 +404,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "R_X86_64_8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -418,12 +418,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "R_X86_64_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -432,12 +432,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "R_X86_64_32S", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -446,12 +446,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "R_X86_64_PC8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -460,12 +460,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "R_X86_64_PC16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ PCRELOFFSET), /* pcrel_offset */ @@ -474,12 +474,12 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ coff_amd64_reloc, /* special_function */ "R_X86_64_PC32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ PCRELOFFSET) /* pcrel_offset */ @@ -554,7 +554,7 @@ static reloc_howto_type howto_table[] = and the regular routine is that we don't want to do anything for a relocatable link. */ -static bfd_boolean +static bool coff_pe_amd64_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -565,7 +565,7 @@ coff_pe_amd64_relocate_section (bfd *output_bfd, asection **sections) { if (bfd_link_relocatable (info)) - return TRUE; + return true; return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,input_section, contents,relocs, syms, sections); } @@ -750,11 +750,11 @@ coff_amd64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, a leading dot for local labels, so if TARGET_UNDERSCORE is defined we treat all symbols starting with L as local. */ -static bfd_boolean +static bool coff_amd64_is_local_label_name (bfd *abfd, const char *name) { if (name[0] == 'L') - return TRUE; + return true; return _bfd_coff_is_local_label_name (abfd, name); } diff --git a/bfd/coff-z80.c b/bfd/coff-z80.c index a47a538577..c0f1739dfc 100644 --- a/bfd/coff-z80.c +++ b/bfd/coff-z80.c @@ -47,195 +47,195 @@ static bfd_howto_type howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "r_imm32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_24, R_IMM24, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "r_imm24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_16, R_IMM16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "r_imm16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_8, R_IMM8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "r_imm8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_8_PCREL, R_JR, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "r_jr", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xFF, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_DISP8, R_OFF8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "r_off8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_BYTE0, R_BYTE0, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "r_byte0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_BYTE1, R_BYTE1, /* type */ 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "r_byte1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_BYTE2, R_BYTE2, /* type */ 16, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "r_byte2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_BYTE3, R_BYTE3, /* type */ 24, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "r_byte3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_WORD0, R_WORD0, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "r_word0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_WORD1, R_WORD1, /* type */ 16, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "r_word1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_Z80_16_BE, R_IMM16BE, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "r_imm16be", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; #define NUM_HOWTOS ARRAY_SIZE (howto_table) @@ -452,7 +452,7 @@ extra_case (bfd *in_abfd, } } -static bfd_boolean +static bool z80_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name) { diff --git a/bfd/coff-z8k.c b/bfd/coff-z8k.c index b6063c4854..6cd5d652ad 100644 --- a/bfd/coff-z8k.c +++ b/bfd/coff-z8k.c @@ -31,40 +31,40 @@ #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (1) static reloc_howto_type r_imm32 = -HOWTO (R_IMM32, 0, 2, 32, FALSE, 0, - complain_overflow_bitfield, 0, "r_imm32", TRUE, 0xffffffff, - 0xffffffff, FALSE); +HOWTO (R_IMM32, 0, 2, 32, false, 0, + complain_overflow_bitfield, 0, "r_imm32", true, 0xffffffff, + 0xffffffff, false); static reloc_howto_type r_imm4l = -HOWTO (R_IMM4L, 0, 0, 4, FALSE, 0, - complain_overflow_bitfield, 0, "r_imm4l", TRUE, 0xf, 0xf, FALSE); +HOWTO (R_IMM4L, 0, 0, 4, false, 0, + complain_overflow_bitfield, 0, "r_imm4l", true, 0xf, 0xf, false); static reloc_howto_type r_da = -HOWTO (R_IMM16, 0, 1, 16, FALSE, 0, - complain_overflow_bitfield, 0, "r_da", TRUE, 0x0000ffff, 0x0000ffff, - FALSE); +HOWTO (R_IMM16, 0, 1, 16, false, 0, + complain_overflow_bitfield, 0, "r_da", true, 0x0000ffff, 0x0000ffff, + false); static reloc_howto_type r_imm8 = -HOWTO (R_IMM8, 0, 0, 8, FALSE, 0, - complain_overflow_bitfield, 0, "r_imm8", TRUE, 0x000000ff, 0x000000ff, - FALSE); +HOWTO (R_IMM8, 0, 0, 8, false, 0, + complain_overflow_bitfield, 0, "r_imm8", true, 0x000000ff, 0x000000ff, + false); static reloc_howto_type r_rel16 = -HOWTO (R_REL16, 0, 1, 16, FALSE, 0, - complain_overflow_bitfield, 0, "r_rel16", TRUE, 0x0000ffff, 0x0000ffff, - TRUE); +HOWTO (R_REL16, 0, 1, 16, false, 0, + complain_overflow_bitfield, 0, "r_rel16", true, 0x0000ffff, 0x0000ffff, + true); static reloc_howto_type r_jr = -HOWTO (R_JR, 1, 0, 8, TRUE, 0, complain_overflow_signed, 0, - "r_jr", TRUE, 0xff, 0xff, TRUE); +HOWTO (R_JR, 1, 0, 8, true, 0, complain_overflow_signed, 0, + "r_jr", true, 0xff, 0xff, true); static reloc_howto_type r_disp7 = -HOWTO (R_DISP7, 0, 0, 7, TRUE, 0, complain_overflow_bitfield, 0, - "r_disp7", TRUE, 0x7f, 0x7f, TRUE); +HOWTO (R_DISP7, 0, 0, 7, true, 0, complain_overflow_bitfield, 0, + "r_disp7", true, 0x7f, 0x7f, true); static reloc_howto_type r_callr = -HOWTO (R_CALLR, 1, 1, 12, TRUE, 0, complain_overflow_signed, 0, - "r_callr", TRUE, 0xfff, 0xfff, TRUE); +HOWTO (R_CALLR, 1, 1, 12, true, 0, complain_overflow_signed, 0, + "r_callr", true, 0xfff, 0xfff, true); #define BADMAG(x) Z8KBADMAG(x) #define Z8K 1 /* Customize coffcode.h. */ diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index f8e68498a3..cc671b26b6 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -86,10 +86,10 @@ static void _bfd_xcoff64_swap_lineno_in (bfd *, void *, void *); static unsigned int _bfd_xcoff64_swap_lineno_out (bfd *, void *, void *); -static bfd_boolean _bfd_xcoff64_put_symbol_name +static bool _bfd_xcoff64_put_symbol_name (struct bfd_link_info *, struct bfd_strtab_hash *, struct internal_syment *, const char *); -static bfd_boolean _bfd_xcoff64_put_ldsymbol_name +static bool _bfd_xcoff64_put_ldsymbol_name (bfd *, struct xcoff_loader_info *, struct internal_ldsym *, const char *); static void _bfd_xcoff64_swap_sym_in (bfd *, void *, void *); @@ -103,17 +103,17 @@ static void xcoff64_swap_reloc_in (bfd *, void *, void *); static unsigned int xcoff64_swap_reloc_out (bfd *, void *, void *); -extern bfd_boolean _bfd_xcoff_mkobject +extern bool _bfd_xcoff_mkobject (bfd *); -extern bfd_boolean _bfd_xcoff_copy_private_bfd_data +extern bool _bfd_xcoff_copy_private_bfd_data (bfd *, bfd *); -extern bfd_boolean _bfd_xcoff_is_local_label_name +extern bool _bfd_xcoff_is_local_label_name (bfd *, const char *); extern void xcoff64_rtype2howto (arelent *, struct internal_reloc *); extern reloc_howto_type * xcoff64_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -extern bfd_boolean _bfd_xcoff_slurp_armap +extern bool _bfd_xcoff_slurp_armap (bfd *); extern void *_bfd_xcoff_read_ar_hdr (bfd *); @@ -121,9 +121,9 @@ extern bfd *_bfd_xcoff_openr_next_archived_file (bfd *, bfd *); extern int _bfd_xcoff_stat_arch_elt (bfd *, struct stat *); -extern bfd_boolean _bfd_xcoff_write_armap +extern bool _bfd_xcoff_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int); -extern bfd_boolean _bfd_xcoff_write_archive_contents +extern bool _bfd_xcoff_write_archive_contents (bfd *); extern int _bfd_xcoff_sizeof_headers (bfd *, struct bfd_link_info *); @@ -147,11 +147,11 @@ static void xcoff64_swap_ldrel_in (bfd *, const void *, struct internal_ldrel *); static void xcoff64_swap_ldrel_out (bfd *, const struct internal_ldrel *, void *d); -static bfd_boolean xcoff64_ppc_relocate_section +static bool xcoff64_ppc_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); -static bfd_boolean xcoff64_slurp_armap +static bool xcoff64_slurp_armap (bfd *); static bfd_cleanup xcoff64_archive_p (bfd *); @@ -161,17 +161,17 @@ static int xcoff64_sizeof_headers (bfd *, struct bfd_link_info *); static asection *xcoff64_create_csect_from_smclas (bfd *, union internal_auxent *, const char *); -static bfd_boolean xcoff64_is_lineno_count_overflow +static bool xcoff64_is_lineno_count_overflow (bfd *, bfd_vma); -static bfd_boolean xcoff64_is_reloc_count_overflow +static bool xcoff64_is_reloc_count_overflow (bfd *, bfd_vma); static bfd_vma xcoff64_loader_symbol_offset (bfd *, struct internal_ldhdr *); static bfd_vma xcoff64_loader_reloc_offset (bfd *, struct internal_ldhdr *); -static bfd_boolean xcoff64_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); -static bfd_boolean xcoff64_bad_format_hook +static bool xcoff64_generate_rtinit + (bfd *, const char *, const char *, bool); +static bool xcoff64_bad_format_hook (bfd *, void *); /* Relocation functions */ @@ -259,7 +259,7 @@ xcoff64_calculate_relocation[XCOFF_MAX_CALCULATE_RELOCATION] = #ifdef AIX_CORE extern bfd_cleanup rs6000coff_core_p (bfd *abfd); -extern bfd_boolean rs6000coff_core_file_matches_executable_p +extern bool rs6000coff_core_file_matches_executable_p (bfd *cbfd, bfd *ebfd); extern char *rs6000coff_core_file_failing_command (bfd *abfd); @@ -536,28 +536,28 @@ _bfd_xcoff64_swap_aux_out (bfd *abfd, void *inp, int type, int in_class, return bfd_coff_auxesz (abfd); } -static bfd_boolean +static bool _bfd_xcoff64_put_symbol_name (struct bfd_link_info *info, struct bfd_strtab_hash *strtab, struct internal_syment *sym, const char *name) { - bfd_boolean hash; + bool hash; bfd_size_type indx; hash = !info->traditional_format; - indx = _bfd_stringtab_add (strtab, name, hash, FALSE); + indx = _bfd_stringtab_add (strtab, name, hash, false); if (indx == (bfd_size_type) -1) - return FALSE; + return false; sym->_n._n_n._n_zeroes = 0; sym->_n._n_n._n_offset = STRING_SIZE_SIZE + indx; - return TRUE; + return true; } -static bfd_boolean +static bool _bfd_xcoff64_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED, struct xcoff_loader_info *ldinfo, struct internal_ldsym *ldsym, @@ -580,8 +580,8 @@ _bfd_xcoff64_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED, newstrings = bfd_realloc (ldinfo->strings, newalc); if (newstrings == NULL) { - ldinfo->failed = TRUE; - return FALSE; + ldinfo->failed = true; + return false; } ldinfo->string_alc = newalc; ldinfo->strings = newstrings; @@ -594,7 +594,7 @@ _bfd_xcoff64_put_ldsymbol_name (bfd *abfd ATTRIBUTE_UNUSED, ldsym->_l._l_l._l_offset = ldinfo->string_size + 2; ldinfo->string_size += len + 3; - return TRUE; + return true; } /* Routines to swap information in the XCOFF .loader section. If we @@ -732,7 +732,7 @@ xcoff64_swap_ldrel_out (bfd *abfd, const struct internal_ldrel *src, void *d) } -static bfd_boolean +static bool xcoff64_reloc_type_br (bfd *input_bfd, asection *input_section, bfd *output_bfd ATTRIBUTE_UNUSED, @@ -748,7 +748,7 @@ xcoff64_reloc_type_br (bfd *input_bfd, bfd_vma section_offset; if (0 > rel->r_symndx) - return FALSE; + return false; h = obj_xcoff_sym_hashes (input_bfd)[rel->r_symndx]; section_offset = rel->r_vaddr - input_section->vma; @@ -821,19 +821,19 @@ xcoff64_reloc_type_br (bfd *input_bfd, bfd_put_32 (input_bfd, insn, ptr); /* Make the howto absolute too. */ - howto->pc_relative = FALSE; + howto->pc_relative = false; howto->complain_on_overflow = complain_overflow_bitfield; } else { /* Use a PC-relative howto and subtract the instruction's address from the target address we calculated above. */ - howto->pc_relative = TRUE; + howto->pc_relative = true; *relocation -= (input_section->output_section->vma + input_section->output_offset + section_offset); } - return TRUE; + return true; } @@ -848,105 +848,105 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_POS_64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x01: 64 bit relocation, but store negative value. */ HOWTO (R_NEG, /* type */ 0, /* rightshift */ -4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_NEG", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x02: 64 bit PC relative relocation. */ HOWTO (R_REL, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_REL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x03: 16 bit TOC relative relocation. */ HOWTO (R_TOC, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TOC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x04: Same as R_TOC. */ HOWTO (R_TRL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TRL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x05: External TOC relative symbol. */ HOWTO (R_GL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_GL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x06: Local TOC relative symbol. */ HOWTO (R_TCL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TCL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (7), @@ -955,15 +955,15 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_BA_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (9), @@ -972,15 +972,15 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_BR", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0xb), @@ -989,30 +989,30 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x0d: Same as R_POS. */ HOWTO (R_RLA, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RLA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0xe), @@ -1021,15 +1021,15 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 1, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "R_REF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0x10), EMPTY_HOWTO (0x11), @@ -1040,285 +1040,285 @@ reloc_howto_type xcoff64_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TRLA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x14: Modifiable relative branch. */ HOWTO (R_RRTBI, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RRTBI", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x15: Modifiable absolute branch. */ HOWTO (R_RRTBA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RRTBA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x16: Modifiable call absolute indirect. */ HOWTO (R_CAI, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_CAI", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x17: Modifiable call relative. */ HOWTO (R_CREL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_CREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x18: Modifiable branch absolute. */ HOWTO (R_RBA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RBA", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x19: Modifiable branch absolute. */ HOWTO (R_RBAC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RBAC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1a: Modifiable branch relative. */ HOWTO (R_RBR, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_RBR_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03fffffc, /* src_mask */ 0x03fffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1b: Modifiable branch absolute. */ HOWTO (R_RBRC, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RBRC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1c: Standard 32 bit relocation. */ HOWTO (R_POS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_POS_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1d: 16 bit Non modifiable absolute branch. */ HOWTO (R_BA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_BA_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfffc, /* src_mask */ 0xfffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1e: Modifiable branch relative. */ HOWTO (R_RBR, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ 0, /* special_function */ "R_RBR_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfffc, /* src_mask */ 0xfffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x1f: Modifiable branch absolute. */ HOWTO (R_RBA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_RBA_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x20: General-dynamic TLS relocation. */ HOWTO (R_TLS, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x21: Initial-exec TLS relocation. */ HOWTO (R_TLS_IE, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS_IE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x22: Local-dynamic TLS relocation. */ HOWTO (R_TLS_LD, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS_LD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x23: Local-exec TLS relocation. */ HOWTO (R_TLS_LE, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLS_LE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x24: TLS relocation. */ HOWTO (R_TLSM, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLSM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x25: TLS module relocation. */ HOWTO (R_TLSML, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TLSM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO(0x26), EMPTY_HOWTO(0x27), @@ -1335,30 +1335,30 @@ reloc_howto_type xcoff64_howto_table[] = 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_TOCU", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 0x31: Low-order 16 bit TOC relative relocation. */ HOWTO (R_TOCL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ 0, /* special_function */ "R_TOCL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -1462,7 +1462,7 @@ xcoff64_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* This is the relocation function for the PowerPC64. See xcoff_ppc_relocation_section for more information. */ -bfd_boolean +bool xcoff64_ppc_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -1517,7 +1517,7 @@ xcoff64_ppc_relocate_section (bfd *output_bfd, (_("%pB: relocatation (%d) at (0x%" BFD_VMA_FMT "x) has wrong" " r_rsize (0x%x)\n"), input_bfd, rel->r_type, rel->r_vaddr, rel->r_size); - return FALSE; + return false; } } @@ -1591,7 +1591,7 @@ xcoff64_ppc_relocate_section (bfd *output_bfd, || !((*xcoff64_calculate_relocation[rel->r_type]) (input_bfd, input_section, output_bfd, rel, sym, &howto, val, addend, &relocation, contents))) - return FALSE; + return false; /* address */ address = rel->r_vaddr - input_section->vma; @@ -1658,7 +1658,7 @@ xcoff64_ppc_relocate_section (bfd *output_bfd, bfd_put_64 (input_bfd, value_to_relocate, location); } - return TRUE; + return true; } @@ -1704,7 +1704,7 @@ _bfd_strntoll (const char * nptr, int base, unsigned int maxlen) /* Read in the armap of an XCOFF archive. */ -static bfd_boolean +static bool xcoff64_slurp_armap (bfd *abfd) { file_ptr off; @@ -1721,43 +1721,43 @@ xcoff64_slurp_armap (bfd *abfd) if (xcoff_ardata (abfd) == NULL) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } off = bfd_scan_vma (xcoff_ardata_big (abfd)->symoff64, (const char **) NULL, 10); if (off == 0) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } if (bfd_seek (abfd, off, SEEK_SET) != 0) - return FALSE; + return false; /* The symbol table starts with a normal archive header. */ if (bfd_bread (&hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG) - return FALSE; + return false; /* Skip the name (normally empty). */ GET_VALUE_IN_FIELD (namlen, hdr.namlen, 10); pos = ((namlen + 1) & ~(size_t) 1) + SXCOFFARFMAG; if (bfd_seek (abfd, pos, SEEK_CUR) != 0) - return FALSE; + return false; sz = bfd_scan_vma (hdr.size, (const char **) NULL, 10); if (sz + 1 < 9) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Read in the entire symbol table. */ contents = (bfd_byte *) _bfd_alloc_and_read (abfd, sz + 1, sz); if (contents == NULL) - return FALSE; + return false; /* Ensure strings are NULL terminated so we don't wander off the end of the buffer. */ @@ -1769,13 +1769,13 @@ xcoff64_slurp_armap (bfd *abfd) if (c >= sz / 8) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } amt = c; amt *= sizeof (carsym); bfd_ardata (abfd)->symdefs = (carsym *) bfd_alloc (abfd, amt); if (bfd_ardata (abfd)->symdefs == NULL) - return FALSE; + return false; /* After the count comes a list of eight byte file offsets. */ for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 8; @@ -1792,15 +1792,15 @@ xcoff64_slurp_armap (bfd *abfd) if (p >= cend) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } arsym->name = (char *) p; } bfd_ardata (abfd)->symdef_count = c; - abfd->has_armap = TRUE; + abfd->has_armap = true; - return TRUE; + return true; } @@ -1972,18 +1972,18 @@ xcoff64_create_csect_from_smclas (bfd *abfd, union internal_auxent *aux, return return_value; } -static bfd_boolean +static bool xcoff64_is_lineno_count_overflow (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma value ATTRIBUTE_UNUSED) { - return FALSE; + return false; } -static bfd_boolean +static bool xcoff64_is_reloc_count_overflow (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma value ATTRIBUTE_UNUSED) { - return FALSE; + return false; } static bfd_vma @@ -2000,24 +2000,24 @@ xcoff64_loader_reloc_offset (bfd *abfd ATTRIBUTE_UNUSED, return (ldhdr->l_rldoff); } -static bfd_boolean +static bool xcoff64_bad_format_hook (bfd * abfd, void *filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; /* Check flavor first. */ if (bfd_get_flavour (abfd) != bfd_target_xcoff_flavour) - return FALSE; + return false; if (bfd_xcoff_magic_number (abfd) != internal_f->f_magic) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini, - bfd_boolean rtld) + bool rtld) { bfd_byte filehdr_ext[FILHSZ]; bfd_byte scnhdr_ext[SCNHSZ * 3]; @@ -2044,7 +2044,7 @@ xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini, char *rtld_name = "__rtld"; if (! bfd_xcoff_rtinit_size (abfd)) - return FALSE; + return false; initsz = (init == NULL ? 0 : 1 + strlen (init)); finisz = (fini == NULL ? 0 : 1 + strlen (fini)); @@ -2133,7 +2133,7 @@ xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini, data_buffer = NULL; data_buffer = (bfd_byte *) bfd_zmalloc (data_buffer_size); if (data_buffer == NULL) - return FALSE; + return false; if (initsz) { @@ -2169,7 +2169,7 @@ xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini, string_table = (bfd_byte *) bfd_zmalloc (string_table_size); if (string_table == NULL) - return FALSE; + return false; val = string_table_size; bfd_put_32 (abfd, val, &string_table[0]); @@ -2333,7 +2333,7 @@ xcoff64_generate_rtinit (bfd *abfd, const char *init, const char *fini, free (data_buffer); data_buffer = NULL; - return TRUE; + return true; } /* The typical dynamic reloc. */ @@ -2343,15 +2343,15 @@ HOWTO (0, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ 0, /* special_function */ "R_POS", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ static const unsigned long xcoff64_glink_code[10] = { @@ -2388,10 +2388,10 @@ static const struct xcoff_backend_data_rec bfd_xcoff_backend_data = RELSZ, LINESZ, FILNMLEN, - TRUE, /* _bfd_coff_long_filenames */ + true, /* _bfd_coff_long_filenames */ XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ - TRUE, /* _bfd_coff_force_symnames_in_strings */ + true, /* _bfd_coff_force_symnames_in_strings */ 4, /* _bfd_coff_debug_string_prefix_length */ 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, @@ -2623,7 +2623,7 @@ const bfd_target rs6000_xcoff64_vec = extern bfd_cleanup xcoff64_core_p (bfd *); -extern bfd_boolean xcoff64_core_file_matches_executable_p +extern bool xcoff64_core_file_matches_executable_p (bfd *, bfd *); extern char *xcoff64_core_file_failing_command (bfd *); @@ -2653,10 +2653,10 @@ static const struct xcoff_backend_data_rec bfd_xcoff_aix5_backend_data = RELSZ, LINESZ, FILNMLEN, - TRUE, /* _bfd_coff_long_filenames */ + true, /* _bfd_coff_long_filenames */ XCOFF_NO_LONG_SECTION_NAMES, /* _bfd_coff_long_section_names */ 3, /* _bfd_coff_default_section_alignment_power */ - TRUE, /* _bfd_coff_force_symnames_in_strings */ + true, /* _bfd_coff_force_symnames_in_strings */ 4, /* _bfd_coff_debug_string_prefix_length */ 32768, /* _bfd_coff_max_nscns */ coff_swap_filehdr_in, diff --git a/bfd/coffcode.h b/bfd/coffcode.h index d1ad669a6d..8006baa259 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -325,7 +325,7 @@ CODE_FRAGMENT . } u; . . {* Selector for the union above. *} -. bfd_boolean is_sym; +. bool is_sym; .} combined_entry_type; . . @@ -343,7 +343,7 @@ CODE_FRAGMENT . struct lineno_cache_entry *lineno; . . {* Have the line numbers been relocated yet ? *} -. bfd_boolean done_lineno; +. bool done_lineno; .} coff_symbol_type; */ @@ -390,50 +390,50 @@ CODE_FRAGMENT /* Define a macro that can be used to initialise both the fields relating to long section names in the backend data struct simultaneously. */ #if COFF_ENABLE_LONG_SECTION_NAMES -#define COFF_DEFAULT_LONG_SECTION_NAMES (TRUE), COFF_LONG_SECTION_NAMES_SETTER +#define COFF_DEFAULT_LONG_SECTION_NAMES (true), COFF_LONG_SECTION_NAMES_SETTER #else /* !COFF_ENABLE_LONG_SECTION_NAMES */ -#define COFF_DEFAULT_LONG_SECTION_NAMES (FALSE), COFF_LONG_SECTION_NAMES_SETTER +#define COFF_DEFAULT_LONG_SECTION_NAMES (false), COFF_LONG_SECTION_NAMES_SETTER #endif /* COFF_ENABLE_LONG_SECTION_NAMES */ #if defined (COFF_LONG_SECTION_NAMES) -static bfd_boolean bfd_coff_set_long_section_names_allowed +static bool bfd_coff_set_long_section_names_allowed (bfd *, int); #else /* !defined (COFF_LONG_SECTION_NAMES) */ -static bfd_boolean bfd_coff_set_long_section_names_disallowed +static bool bfd_coff_set_long_section_names_disallowed (bfd *, int); #endif /* defined (COFF_LONG_SECTION_NAMES) */ static long sec_to_styp_flags (const char *, flagword); -static bfd_boolean styp_to_sec_flags +static bool styp_to_sec_flags (bfd *, void *, const char *, asection *, flagword *); -static bfd_boolean coff_bad_format_hook +static bool coff_bad_format_hook (bfd *, void *); static void coff_set_custom_section_alignment (bfd *, asection *, const struct coff_section_alignment_entry *, const unsigned int); -static bfd_boolean coff_new_section_hook +static bool coff_new_section_hook (bfd *, asection *); -static bfd_boolean coff_set_arch_mach_hook +static bool coff_set_arch_mach_hook (bfd *, void *); -static bfd_boolean coff_write_relocs +static bool coff_write_relocs (bfd *, int); -static bfd_boolean coff_set_flags +static bool coff_set_flags (bfd *, unsigned int *, unsigned short *); -static bfd_boolean coff_set_arch_mach +static bool coff_set_arch_mach (bfd *, enum bfd_architecture, unsigned long) ATTRIBUTE_UNUSED; -static bfd_boolean coff_compute_section_file_positions +static bool coff_compute_section_file_positions (bfd *); -static bfd_boolean coff_write_object_contents +static bool coff_write_object_contents (bfd *) ATTRIBUTE_UNUSED; -static bfd_boolean coff_set_section_contents +static bool coff_set_section_contents (bfd *, asection *, const void *, file_ptr, bfd_size_type); -static bfd_boolean coff_slurp_line_table +static bool coff_slurp_line_table (bfd *, asection *); -static bfd_boolean coff_slurp_symbol_table +static bool coff_slurp_symbol_table (bfd *); static enum coff_symbol_classification coff_classify_symbol (bfd *, struct internal_syment *); -static bfd_boolean coff_slurp_reloc_table +static bool coff_slurp_reloc_table (bfd *, asection *, asymbol **); static long coff_canonicalize_reloc (bfd *, asection *, arelent **, asymbol **); @@ -446,28 +446,28 @@ static flagword handle_COMDAT (bfd *, flagword, void *, const char *, asection *); #endif #ifdef TICOFF -static bfd_boolean ticoff0_bad_format_hook +static bool ticoff0_bad_format_hook (bfd *, void * ); -static bfd_boolean ticoff1_bad_format_hook +static bool ticoff1_bad_format_hook (bfd *, void * ); #endif /* void warning(); */ #if defined (COFF_LONG_SECTION_NAMES) -static bfd_boolean +static bool bfd_coff_set_long_section_names_allowed (bfd *abfd, int enable) { coff_backend_info (abfd)->_bfd_coff_long_section_names = enable; - return TRUE; + return true; } #else /* !defined (COFF_LONG_SECTION_NAMES) */ -static bfd_boolean +static bool bfd_coff_set_long_section_names_disallowed (bfd *abfd, int enable) { (void) abfd; (void) enable; - return FALSE; + return false; } #endif /* defined (COFF_LONG_SECTION_NAMES) */ @@ -640,7 +640,7 @@ static long sec_to_styp_flags (const char *sec_name, flagword sec_flags) { long styp_flags = 0; - bfd_boolean is_dbg = FALSE; + bool is_dbg = false; if (startswith (sec_name, DOT_DEBUG) || startswith (sec_name, DOT_ZDEBUG) @@ -649,7 +649,7 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags) || startswith (sec_name, GNU_LINKONCE_WT) #endif || startswith (sec_name, ".stab")) - is_dbg = TRUE; + is_dbg = true; /* caution: there are at least three groups of symbols that have very similar bits and meanings: IMAGE_SCN*, SEC_*, and STYP_*. @@ -729,7 +729,7 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags) #ifndef COFF_WITH_PE -static bfd_boolean +static bool styp_to_sec_flags (bfd *abfd, void * hdr, const char *name, @@ -896,10 +896,10 @@ styp_to_sec_flags (bfd *abfd, #endif if (flags_ptr == NULL) - return FALSE; + return false; * flags_ptr = sec_flags; - return TRUE; + return true; } #else /* COFF_WITH_PE */ @@ -1190,7 +1190,7 @@ handle_COMDAT (bfd * abfd, required information. FIXME: Is the COMDAT symbol index used for any purpose other than objdump? */ -static bfd_boolean +static bool styp_to_sec_flags (bfd *abfd, void * hdr, const char *name, @@ -1200,8 +1200,8 @@ styp_to_sec_flags (bfd *abfd, struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr; unsigned long styp_flags = internal_s->s_flags; flagword sec_flags; - bfd_boolean result = TRUE; - bfd_boolean is_dbg = FALSE; + bool result = true; + bool is_dbg = false; if (startswith (name, DOT_DEBUG) || startswith (name, DOT_ZDEBUG) @@ -1215,7 +1215,7 @@ styp_to_sec_flags (bfd *abfd, || startswith (name, GNU_DEBUGALTLINK) #endif || startswith (name, ".stab")) - is_dbg = TRUE; + is_dbg = true; /* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */ sec_flags = SEC_READONLY; @@ -1342,7 +1342,7 @@ styp_to_sec_flags (bfd *abfd, /* xgettext:c-format */ (_("%pB (%s): section flag %s (%#lx) ignored"), abfd, name, unhandled, flag); - result = FALSE; + result = false; } } @@ -1439,14 +1439,14 @@ Special entry points for gdb to swap in coff symbol table parts: . unsigned int _bfd_relsz; . unsigned int _bfd_linesz; . unsigned int _bfd_filnmlen; -. bfd_boolean _bfd_coff_long_filenames; +. bool _bfd_coff_long_filenames; . -. bfd_boolean _bfd_coff_long_section_names; -. bfd_boolean (*_bfd_coff_set_long_section_names) +. bool _bfd_coff_long_section_names; +. bool (*_bfd_coff_set_long_section_names) . (bfd *, int); . . unsigned int _bfd_coff_default_section_alignment_power; -. bfd_boolean _bfd_coff_force_symnames_in_strings; +. bool _bfd_coff_force_symnames_in_strings; . unsigned int _bfd_coff_debug_string_prefix_length; . unsigned int _bfd_coff_max_nscns; . @@ -1462,32 +1462,32 @@ Special entry points for gdb to swap in coff symbol table parts: . void (*_bfd_coff_swap_reloc_in) . (bfd *abfd, void *, void *); . -. bfd_boolean (*_bfd_coff_bad_format_hook) +. bool (*_bfd_coff_bad_format_hook) . (bfd *, void *); . -. bfd_boolean (*_bfd_coff_set_arch_mach_hook) +. bool (*_bfd_coff_set_arch_mach_hook) . (bfd *, void *); . . void * (*_bfd_coff_mkobject_hook) . (bfd *, void *, void *); . -. bfd_boolean (*_bfd_styp_to_sec_flags_hook) +. bool (*_bfd_styp_to_sec_flags_hook) . (bfd *, void *, const char *, asection *, flagword *); . . void (*_bfd_set_alignment_hook) . (bfd *, asection *, void *); . -. bfd_boolean (*_bfd_coff_slurp_symbol_table) +. bool (*_bfd_coff_slurp_symbol_table) . (bfd *); . -. bfd_boolean (*_bfd_coff_symname_in_debug) +. bool (*_bfd_coff_symname_in_debug) . (bfd *, struct internal_syment *); . -. bfd_boolean (*_bfd_coff_pointerize_aux_hook) +. bool (*_bfd_coff_pointerize_aux_hook) . (bfd *, combined_entry_type *, combined_entry_type *, . unsigned int, combined_entry_type *); . -. bfd_boolean (*_bfd_coff_print_aux) +. bool (*_bfd_coff_print_aux) . (bfd *, FILE *, combined_entry_type *, combined_entry_type *, . combined_entry_type *, unsigned int); . @@ -1502,13 +1502,13 @@ Special entry points for gdb to swap in coff symbol table parts: . enum coff_symbol_classification (*_bfd_coff_classify_symbol) . (bfd *, struct internal_syment *); . -. bfd_boolean (*_bfd_coff_compute_section_file_positions) +. bool (*_bfd_coff_compute_section_file_positions) . (bfd *); . -. bfd_boolean (*_bfd_coff_start_final_link) +. bool (*_bfd_coff_start_final_link) . (bfd *, struct bfd_link_info *); . -. bfd_boolean (*_bfd_coff_relocate_section) +. bool (*_bfd_coff_relocate_section) . (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, . struct internal_reloc *, struct internal_syment *, asection **); . @@ -1516,22 +1516,22 @@ Special entry points for gdb to swap in coff symbol table parts: . (bfd *, asection *, struct internal_reloc *, . struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *); . -. bfd_boolean (*_bfd_coff_adjust_symndx) +. bool (*_bfd_coff_adjust_symndx) . (bfd *, struct bfd_link_info *, bfd *, asection *, -. struct internal_reloc *, bfd_boolean *); +. struct internal_reloc *, bool *); . -. bfd_boolean (*_bfd_coff_link_add_one_symbol) +. bool (*_bfd_coff_link_add_one_symbol) . (struct bfd_link_info *, bfd *, const char *, flagword, -. asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean, +. asection *, bfd_vma, const char *, bool, bool, . struct bfd_link_hash_entry **); . -. bfd_boolean (*_bfd_coff_link_output_has_begun) +. bool (*_bfd_coff_link_output_has_begun) . (bfd *, struct coff_final_link_info *); . -. bfd_boolean (*_bfd_coff_final_link_postscript) +. bool (*_bfd_coff_final_link_postscript) . (bfd *, struct coff_final_link_info *); . -. bfd_boolean (*_bfd_coff_print_pdata) +. bool (*_bfd_coff_print_pdata) . (bfd *, void *); . .} bfd_coff_backend_data; @@ -1684,40 +1684,40 @@ Special entry points for gdb to swap in coff symbol table parts: /* See whether the magic number matches. */ -static bfd_boolean +static bool coff_bad_format_hook (bfd * abfd ATTRIBUTE_UNUSED, void * filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; if (BADMAG (*internal_f)) - return FALSE; + return false; - return TRUE; + return true; } #ifdef TICOFF -static bfd_boolean +static bool ticoff0_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED, void * filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; if (COFF0_BADMAG (*internal_f)) - return FALSE; + return false; - return TRUE; + return true; } #endif #ifdef TICOFF -static bfd_boolean +static bool ticoff1_bad_format_hook (bfd *abfd ATTRIBUTE_UNUSED, void * filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; if (COFF1_BADMAG (*internal_f)) - return FALSE; + return false; - return TRUE; + return true; } #endif @@ -1787,7 +1787,7 @@ static const unsigned int coff_section_alignment_table_size = /* Initialize a section structure with information peculiar to this particular implementation of COFF. */ -static bfd_boolean +static bool coff_new_section_hook (bfd * abfd, asection * section) { combined_entry_type *native; @@ -1820,7 +1820,7 @@ coff_new_section_hook (bfd * abfd, asection * section) /* Set up the section symbol. */ if (!_bfd_generic_new_section_hook (abfd, section)) - return FALSE; + return false; /* Allocate aux records for section symbols, to store size and related info. @@ -1830,7 +1830,7 @@ coff_new_section_hook (bfd * abfd, asection * section) amt = sizeof (combined_entry_type) * 10; native = (combined_entry_type *) bfd_zalloc (abfd, amt); if (native == NULL) - return FALSE; + return false; /* We don't need to set up n_name, n_value, or n_scnum in the native symbol information, since they'll be overridden by the BFD symbol @@ -1838,7 +1838,7 @@ coff_new_section_hook (bfd * abfd, asection * section) in case this symbol winds up getting written out. The value 0 for n_numaux is already correct. */ - native->is_sym = TRUE; + native->is_sym = true; native->u.syment.n_type = T_NULL; native->u.syment.n_sclass = sclass; @@ -1848,7 +1848,7 @@ coff_new_section_hook (bfd * abfd, asection * section) coff_section_alignment_table, coff_section_alignment_table_size); - return TRUE; + return true; } #ifdef COFF_ALIGN_IN_SECTION_HEADER @@ -2041,7 +2041,7 @@ coff_set_alignment_hook (bfd *abfd ATTRIBUTE_UNUSED, #ifndef coff_mkobject -static bfd_boolean +static bool coff_mkobject (bfd * abfd) { coff_data_type *coff; @@ -2049,7 +2049,7 @@ coff_mkobject (bfd * abfd) abfd->tdata.coff_obj_data = bfd_zalloc (abfd, amt); if (abfd->tdata.coff_obj_data == NULL) - return FALSE; + return false; coff = coff_data (abfd); coff->symbols = NULL; coff->conversion_table = NULL; @@ -2059,7 +2059,7 @@ coff_mkobject (bfd * abfd) /* make_abs_section(abfd);*/ - return TRUE; + return true; } #endif @@ -2113,7 +2113,7 @@ coff_mkobject_hook (bfd * abfd, # else xcoff->xcoff64 = 0; # endif - xcoff->full_aouthdr = TRUE; + xcoff->full_aouthdr = true; xcoff->toc = internal_a->o_toc; xcoff->sntoc = internal_a->o_sntoc; xcoff->snentry = internal_a->o_snentry; @@ -2150,7 +2150,7 @@ coff_mkobject_hook (bfd * abfd, would be target independent and would also be much more successful at linking together COFF files for different architectures. */ -static bfd_boolean +static bool coff_set_arch_mach_hook (bfd *abfd, void * filehdr) { unsigned long machine; @@ -2232,7 +2232,7 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr) machine = ((unsigned)internal_f->f_flags & F_MACHMASK) >> 12; break; default: - return FALSE; + return false; } break; #endif @@ -2248,7 +2248,7 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr) machine = bfd_mach_z8002; break; default: - return FALSE; + return false; } break; #endif @@ -2282,10 +2282,10 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr) bfd_size_type amt = bfd_coff_symesz (abfd); if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) - return FALSE; + return false; buf = _bfd_malloc_and_read (abfd, amt, amt); if (buf == NULL) - return FALSE; + return false; bfd_coff_swap_sym_in (abfd, buf, & sym); if (sym.n_sclass == C_FILE) cputype = sym.n_type & 0xff; @@ -2401,17 +2401,17 @@ coff_set_arch_mach_hook (bfd *abfd, void * filehdr) } bfd_default_set_arch_mach (abfd, arch, machine); - return TRUE; + return true; } -static bfd_boolean +static bool symname_in_debug_hook (bfd *abfd ATTRIBUTE_UNUSED, struct internal_syment *sym ATTRIBUTE_UNUSED) { #ifdef SYMNAME_IN_DEBUG return SYMNAME_IN_DEBUG (sym) != 0; #else - return FALSE; + return false; #endif } @@ -2423,7 +2423,7 @@ symname_in_debug_hook (bfd *abfd ATTRIBUTE_UNUSED, /* Handle the csect auxent of a C_EXT, C_AIX_WEAKEXT or C_HIDEXT symbol. */ -static bfd_boolean +static bool coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED, combined_entry_type *table_base, combined_entry_type *symbol, @@ -2446,12 +2446,12 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED, /* Return TRUE to indicate that the caller should not do any further work on this auxent. */ - return TRUE; + return true; } /* Return FALSE to indicate that this auxent should be handled by the caller. */ - return FALSE; + return false; } #else @@ -2460,7 +2460,7 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED, /* Print an aux entry. This returns TRUE if it has printed it. */ -static bfd_boolean +static bool coff_print_aux (bfd *abfd ATTRIBUTE_UNUSED, FILE *file ATTRIBUTE_UNUSED, combined_entry_type *table_base ATTRIBUTE_UNUSED, @@ -2501,12 +2501,12 @@ coff_print_aux (bfd *abfd ATTRIBUTE_UNUSED, (unsigned int) aux->u.auxent.x_csect.x_smclas, aux->u.auxent.x_csect.x_stab, (unsigned int) aux->u.auxent.x_csect.x_snstab); - return TRUE; + return true; } #endif /* Return FALSE to indicate that no special action was taken. */ - return FALSE; + return false; } /* @@ -2542,7 +2542,7 @@ compare_arelent_ptr (const void * x, const void * y) #endif /* TARG_AUX */ -static bfd_boolean +static bool coff_write_relocs (bfd * abfd, int first_undef) { asection *s; @@ -2566,7 +2566,7 @@ coff_write_relocs (bfd * abfd, int first_undef) if (p == NULL) { if (s->reloc_count > 0) - return FALSE; + return false; } else { @@ -2577,7 +2577,7 @@ coff_write_relocs (bfd * abfd, int first_undef) #endif if (bfd_seek (abfd, s->rel_filepos, SEEK_SET) != 0) - return FALSE; + return false; #ifdef COFF_WITH_EXTENDED_RELOC_COUNTER if ((obj_pe (abfd) || obj_go32 (abfd)) && s->reloc_count >= 0xffff) @@ -2591,7 +2591,7 @@ coff_write_relocs (bfd * abfd, int first_undef) coff_swap_reloc_out (abfd, &n, &dst); if (bfd_bwrite (& dst, (bfd_size_type) bfd_coff_relsz (abfd), abfd) != bfd_coff_relsz (abfd)) - return FALSE; + return false; } #endif @@ -2663,7 +2663,7 @@ coff_write_relocs (bfd * abfd, int first_undef) _bfd_error_handler (_("%pB: reloc against a non-existent" " symbol index: %ld"), abfd, n.r_symndx); - return FALSE; + return false; } } } @@ -2682,7 +2682,7 @@ coff_write_relocs (bfd * abfd, int first_undef) if (bfd_bwrite (& dst, (bfd_size_type) bfd_coff_relsz (abfd), abfd) != bfd_coff_relsz (abfd)) - return FALSE; + return false; } #ifdef TARG_AUX @@ -2690,13 +2690,13 @@ coff_write_relocs (bfd * abfd, int first_undef) #endif } - return TRUE; + return true; } /* Set flags and magic number of a coff file from architecture and machine type. Result is TRUE if we can represent the arch&type, FALSE if not. */ -static bfd_boolean +static bool coff_set_flags (bfd * abfd, unsigned int *magicp ATTRIBUTE_UNUSED, unsigned short *flagsp ATTRIBUTE_UNUSED) @@ -2720,9 +2720,9 @@ coff_set_flags (bfd * abfd, *flagsp = bfd_get_mach (abfd) << 12; break; default: - return FALSE; + return false; } - return TRUE; + return true; #endif #ifdef Z8KMAGIC @@ -2733,15 +2733,15 @@ coff_set_flags (bfd * abfd, { case bfd_mach_z8001: *flagsp = F_Z8001; break; case bfd_mach_z8002: *flagsp = F_Z8002; break; - default: return FALSE; + default: return false; } - return TRUE; + return true; #endif #ifdef TIC30MAGIC case bfd_arch_tic30: *magicp = TIC30MAGIC; - return TRUE; + return true; #endif #ifdef TICOFF_DEFAULT_MAGIC @@ -2764,11 +2764,11 @@ coff_set_flags (bfd * abfd, *magicp = TICOFF2MAGIC; break; default: - return FALSE; + return false; } } TICOFF_TARGET_MACHINE_SET (flagsp, bfd_get_mach (abfd)); - return TRUE; + return true; #endif #ifdef ARMMAGIC @@ -2807,7 +2807,7 @@ coff_set_flags (bfd * abfd, case bfd_mach_arm_5TE: * flagsp |= F_ARM_5; break; case bfd_mach_arm_XScale: * flagsp |= F_ARM_5; break; } - return TRUE; + return true; #endif #if defined(I386MAGIC) || defined(AMD64MAGIC) @@ -2822,13 +2822,13 @@ coff_set_flags (bfd * abfd, #if defined AMD64MAGIC *magicp = AMD64MAGIC; #endif - return TRUE; + return true; #endif #ifdef IA64MAGIC case bfd_arch_ia64: *magicp = IA64MAGIC; - return TRUE; + return true; #endif #ifdef SH_ARCH_MAGIC_BIG @@ -2841,13 +2841,13 @@ coff_set_flags (bfd * abfd, else *magicp = SH_ARCH_MAGIC_LITTLE; #endif - return TRUE; + return true; #endif #ifdef MIPS_ARCH_MAGIC_WINCE case bfd_arch_mips: *magicp = MIPS_ARCH_MAGIC_WINCE; - return TRUE; + return true; #endif #ifdef SPARCMAGIC @@ -2857,7 +2857,7 @@ coff_set_flags (bfd * abfd, /* Just overwrite the usual value if we're doing Lynx. */ *magicp = LYNXCOFFMAGIC; #endif - return TRUE; + return true; #endif #ifdef RS6000COFF_C @@ -2865,25 +2865,23 @@ coff_set_flags (bfd * abfd, case bfd_arch_powerpc: BFD_ASSERT (bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); *magicp = bfd_xcoff_magic_number (abfd); - return TRUE; + return true; #endif #ifdef MCOREMAGIC case bfd_arch_mcore: * magicp = MCOREMAGIC; - return TRUE; + return true; #endif default: /* Unknown architecture. */ - /* Fall through to "return FALSE" below, to avoid - "statement never reached" errors on the one below. */ break; } - return FALSE; + return false; } -static bfd_boolean +static bool coff_set_arch_mach (bfd * abfd, enum bfd_architecture arch, unsigned long machine) @@ -2892,13 +2890,13 @@ coff_set_arch_mach (bfd * abfd, unsigned short dummy2; if (! bfd_default_set_arch_mach (abfd, arch, machine)) - return FALSE; + return false; if (arch != bfd_arch_unknown && ! coff_set_flags (abfd, &dummy1, &dummy2)) - return FALSE; /* We can't represent this type. */ + return false; /* We can't represent this type. */ - return TRUE; /* We're easy... */ + return true; /* We're easy... */ } #ifdef COFF_IMAGE_WITH_PE @@ -2929,12 +2927,12 @@ sort_by_secaddr (const void * arg1, const void * arg2) #undef ALIGN_SECTIONS_IN_FILE #endif -static bfd_boolean +static bool coff_compute_section_file_positions (bfd * abfd) { asection *current; file_ptr sofar = bfd_coff_filhsz (abfd); - bfd_boolean align_adjust; + bool align_adjust; unsigned int target_index; #ifdef ALIGN_SECTIONS_IN_FILE asection *previous = NULL; @@ -2961,7 +2959,7 @@ coff_compute_section_file_positions (bfd * abfd) _bfd_error_handler /* xgettext:c-format */ (_("%pB: page size is too large (0x%x)"), abfd, page_size); - return FALSE; + return false; } } else @@ -3064,7 +3062,7 @@ coff_compute_section_file_positions (bfd * abfd) amt = sizeof (struct asection *) * (count + 1); section_list = (asection **) bfd_malloc (amt); if (section_list == NULL) - return FALSE; + return false; i = 0; for (current = abfd->sections; current != NULL; current = current->next) @@ -3121,10 +3119,10 @@ coff_compute_section_file_positions (bfd * abfd) _bfd_error_handler /* xgettext:c-format */ (_("%pB: too many sections (%d)"), abfd, target_index); - return FALSE; + return false; } - align_adjust = FALSE; + align_adjust = false; for (current = abfd->sections; current != NULL; current = current->next) @@ -3138,7 +3136,7 @@ coff_compute_section_file_positions (bfd * abfd) current->used_by_bfd = bfd_zalloc (abfd, amt); if (current->used_by_bfd == NULL) - return FALSE; + return false; } if (pei_section_data (abfd, current) == NULL) { @@ -3146,7 +3144,7 @@ coff_compute_section_file_positions (bfd * abfd) coff_section_data (abfd, current)->tdata = bfd_zalloc (abfd, amt); if (coff_section_data (abfd, current)->tdata == NULL) - return FALSE; + return false; } if (pei_section_data (abfd, current)->virt_size == 0) pei_section_data (abfd, current)->virt_size = current->size; @@ -3260,7 +3258,7 @@ coff_compute_section_file_positions (bfd * abfd) size, in case the caller only writes out data to the unaligned size. */ if (pei_section_data (abfd, current)->virt_size < current->size) - align_adjust = TRUE; + align_adjust = true; #endif #ifdef _LIB @@ -3288,7 +3286,7 @@ coff_compute_section_file_positions (bfd * abfd) b = 0; if (bfd_seek (abfd, sofar - 1, SEEK_SET) != 0 || bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1) - return FALSE; + return false; } /* Make sure the relocations are aligned. We don't need to make @@ -3297,14 +3295,14 @@ coff_compute_section_file_positions (bfd * abfd) sofar = BFD_ALIGN (sofar, 1 << COFF_DEFAULT_SECTION_ALIGNMENT_POWER); obj_relocbase (abfd) = sofar; - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; - return TRUE; + return true; } #ifdef COFF_IMAGE_WITH_PE -static bfd_boolean +static bool coff_read_word (bfd *abfd, unsigned int *value, unsigned int *pelength) { unsigned char b[2]; @@ -3314,7 +3312,7 @@ coff_read_word (bfd *abfd, unsigned int *value, unsigned int *pelength) if (status < 1) { *value = 0; - return FALSE; + return false; } if (status == 1) @@ -3324,13 +3322,13 @@ coff_read_word (bfd *abfd, unsigned int *value, unsigned int *pelength) *pelength += status; - return TRUE; + return true; } static unsigned int coff_compute_checksum (bfd *abfd, unsigned int *pelength) { - bfd_boolean more_data; + bool more_data; file_ptr filepos; unsigned int value; unsigned int total; @@ -3354,7 +3352,7 @@ coff_compute_checksum (bfd *abfd, unsigned int *pelength) return (0xffff & (total + (total >> 0x10))); } -static bfd_boolean +static bool coff_apply_checksum (bfd *abfd) { unsigned int computed; @@ -3363,42 +3361,42 @@ coff_apply_checksum (bfd *abfd) unsigned int pelength; if (bfd_seek (abfd, 0x3c, SEEK_SET) != 0) - return FALSE; + return false; if (!coff_read_word (abfd, &peheader, &pelength)) - return FALSE; + return false; if (bfd_seek (abfd, peheader + 0x58, SEEK_SET) != 0) - return FALSE; + return false; checksum = 0; bfd_bwrite (&checksum, (bfd_size_type) 4, abfd); if (bfd_seek (abfd, peheader, SEEK_SET) != 0) - return FALSE; + return false; computed = coff_compute_checksum (abfd, &pelength); checksum = computed + pelength; if (bfd_seek (abfd, peheader + 0x58, SEEK_SET) != 0) - return FALSE; + return false; bfd_bwrite (&checksum, (bfd_size_type) 4, abfd); - return TRUE; + return true; } #endif /* COFF_IMAGE_WITH_PE */ -static bfd_boolean +static bool coff_write_object_contents (bfd * abfd) { asection *current; - bfd_boolean hasrelocs = FALSE; - bfd_boolean haslinno = FALSE; + bool hasrelocs = false; + bool haslinno = false; #ifdef COFF_IMAGE_WITH_PE - bfd_boolean hasdebug = FALSE; + bool hasdebug = false; #endif file_ptr scn_base; file_ptr reloc_base; @@ -3406,7 +3404,7 @@ coff_write_object_contents (bfd * abfd) file_ptr sym_base; unsigned long reloc_size = 0, reloc_count = 0; unsigned long lnno_size = 0; - bfd_boolean long_section_names; + bool long_section_names; asection *text_sec = NULL; asection *data_sec = NULL; asection *bss_sec = NULL; @@ -3429,7 +3427,7 @@ coff_write_object_contents (bfd * abfd) if (! abfd->output_has_begun) { if (! coff_compute_section_file_positions (abfd)) - return FALSE; + return false; } reloc_base = obj_relocbase (abfd); @@ -3498,21 +3496,21 @@ coff_write_object_contents (bfd * abfd) } if (bfd_seek (abfd, scn_base, SEEK_SET) != 0) - return FALSE; + return false; - long_section_names = FALSE; + long_section_names = false; for (current = abfd->sections; current != NULL; current = current->next) { struct internal_scnhdr section; #ifdef COFF_IMAGE_WITH_PE - bfd_boolean is_reloc_section = FALSE; + bool is_reloc_section = false; if (strcmp (current->name, DOT_RELOC) == 0) { - is_reloc_section = TRUE; - hasrelocs = TRUE; + is_reloc_section = true; + hasrelocs = true; pe_data (abfd)->has_reloc_section = 1; } #endif @@ -3549,7 +3547,7 @@ coff_write_object_contents (bfd * abfd) /* xgettext:c-format */ (_("%pB: section %pA: string table overflow at offset %ld"), abfd, current, (unsigned long) string_size); - return FALSE; + return false; } /* We do not need to use snprintf here as we have already verfied @@ -3559,7 +3557,7 @@ coff_write_object_contents (bfd * abfd) /* Then strncpy takes care of any padding for us. */ strncpy (section.s_name, s_name_buf, SCNNMLEN); string_size += len + 1; - long_section_names = TRUE; + long_section_names = true; } } #endif @@ -3607,14 +3605,14 @@ coff_write_object_contents (bfd * abfd) #ifndef COFF_IMAGE_WITH_PE /* In PEI, relocs come in the .reloc section. */ if (current->reloc_count != 0) - hasrelocs = TRUE; + hasrelocs = true; #endif if (current->lineno_count != 0) - haslinno = TRUE; + haslinno = true; #ifdef COFF_IMAGE_WITH_PE if ((current->flags & SEC_DEBUGGING) != 0 && ! is_reloc_section) - hasdebug = TRUE; + hasdebug = true; #endif #ifdef RS6000COFF_C @@ -3649,7 +3647,7 @@ coff_write_object_contents (bfd * abfd) if ((unsigned int)COFF_DECODE_ALIGNMENT(section.s_flags) != current->alignment_power) { - bfd_boolean warn = coff_data (abfd)->link_info + bool warn = coff_data (abfd)->link_info && !bfd_link_relocatable (coff_data (abfd)->link_info); _bfd_error_handler @@ -3660,7 +3658,7 @@ coff_write_object_contents (bfd * abfd) if (!warn) { bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } } #endif @@ -3681,7 +3679,7 @@ coff_write_object_contents (bfd * abfd) if (bfd_coff_swap_scnhdr_out (abfd, §ion, &buff) == 0 || bfd_bwrite (& buff, amt, abfd) != amt) - return FALSE; + return false; } #ifdef COFF_WITH_PE @@ -3807,7 +3805,7 @@ coff_write_object_contents (bfd * abfd) amt = bfd_coff_scnhsz (abfd); if (bfd_coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0 || bfd_bwrite (& buff, amt, abfd) != amt) - return FALSE; + return false; } } #endif @@ -3980,14 +3978,14 @@ coff_write_object_contents (bfd * abfd) int firstundef; if (!coff_renumber_symbols (abfd, &firstundef)) - return FALSE; + return false; coff_mangle_symbols (abfd); if (! coff_write_symbols (abfd)) - return FALSE; + return false; if (! coff_write_linenumbers (abfd)) - return FALSE; + return false; if (! coff_write_relocs (abfd, firstundef)) - return FALSE; + return false; } #ifdef COFF_LONG_SECTION_NAMES else if (long_section_names && ! obj_coff_strings_written (abfd)) @@ -3995,7 +3993,7 @@ coff_write_object_contents (bfd * abfd) /* If we have long section names we have to write out the string table even if there are no symbols. */ if (! coff_write_symbols (abfd)) - return FALSE; + return false; } #endif /* If bfd_get_symcount (abfd) != 0, then we are not using the COFF @@ -4148,7 +4146,7 @@ coff_write_object_contents (bfd * abfd) /* Now write header. */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; + return false; { char * buff; @@ -4156,7 +4154,7 @@ coff_write_object_contents (bfd * abfd) buff = (char *) bfd_malloc (amount); if (buff == NULL) - return FALSE; + return false; bfd_coff_swap_filehdr_out (abfd, & internal_f, buff); amount = bfd_bwrite (buff, amount, abfd); @@ -4164,7 +4162,7 @@ coff_write_object_contents (bfd * abfd) free (buff); if (amount != bfd_coff_filhsz (abfd)) - return FALSE; + return false; } if (abfd->flags & EXEC_P) @@ -4176,7 +4174,7 @@ coff_write_object_contents (bfd * abfd) buff = (char *) bfd_malloc (amount); if (buff == NULL) - return FALSE; + return false; coff_swap_aouthdr_out (abfd, & internal_a, buff); amount = bfd_bwrite (buff, amount, abfd); @@ -4184,11 +4182,11 @@ coff_write_object_contents (bfd * abfd) free (buff); if (amount != bfd_coff_aoutsz (abfd)) - return FALSE; + return false; #ifdef COFF_IMAGE_WITH_PE if (! coff_apply_checksum (abfd)) - return FALSE; + return false; #endif } #ifdef RS6000COFF_C @@ -4205,15 +4203,15 @@ coff_write_object_contents (bfd * abfd) else size = SMALL_AOUTSZ; if (bfd_bwrite (& buff, (bfd_size_type) size, abfd) != size) - return FALSE; + return false; } #endif #endif - return TRUE; + return true; } -static bfd_boolean +static bool coff_set_section_contents (bfd * abfd, sec_ptr section, const void * location, @@ -4223,7 +4221,7 @@ coff_set_section_contents (bfd * abfd, if (! abfd->output_has_begun) /* Set by bfd.c handler. */ { if (! coff_compute_section_file_positions (abfd)) - return FALSE; + return false; } #if defined(_LIB) && !defined(TARG_AUX) @@ -4266,13 +4264,13 @@ coff_set_section_contents (bfd * abfd, /* Don't write out bss sections - one way to do this is to see if the filepos has not been set. */ if (section->filepos == 0) - return TRUE; + return true; if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0) - return FALSE; + return false; if (count == 0) - return TRUE; + return true; return bfd_bwrite (location, count, abfd) == count; } @@ -4334,7 +4332,7 @@ coff_sort_func_alent (const void * arg1, const void * arg2) return 0; } -static bfd_boolean +static bool coff_slurp_line_table (bfd *abfd, asection *asect) { LINENO *native_lineno; @@ -4342,15 +4340,15 @@ coff_slurp_line_table (bfd *abfd, asection *asect) unsigned int counter; alent *cache_ptr; bfd_vma prev_offset = 0; - bfd_boolean ordered = TRUE; + bool ordered = true; unsigned int nbr_func; LINENO *src; - bfd_boolean have_func; - bfd_boolean ret = TRUE; + bool have_func; + bool ret = true; size_t amt; if (asect->lineno_count == 0) - return TRUE; + return true; BFD_ASSERT (asect->lineno == NULL); @@ -4359,17 +4357,17 @@ coff_slurp_line_table (bfd *abfd, asection *asect) _bfd_error_handler (_("%pB: warning: line number count (%#lx) exceeds section size (%#lx)"), abfd, (unsigned long) asect->lineno_count, (unsigned long) asect->size); - return FALSE; + return false; } if (_bfd_mul_overflow (asect->lineno_count + 1, sizeof (alent), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } lineno_cache = (alent *) bfd_alloc (abfd, amt); if (lineno_cache == NULL) - return FALSE; + return false; native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, asect->lineno_count, @@ -4379,14 +4377,14 @@ coff_slurp_line_table (bfd *abfd, asection *asect) _bfd_error_handler (_("%pB: warning: line number table read failed"), abfd); bfd_release (abfd, lineno_cache); - return FALSE; + return false; } cache_ptr = lineno_cache; asect->lineno = lineno_cache; src = native_lineno; nbr_func = 0; - have_func = FALSE; + have_func = false; for (counter = 0; counter < asect->lineno_count; counter++, src++) { @@ -4405,7 +4403,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) unsigned long symndx; coff_symbol_type *sym; - have_func = FALSE; + have_func = false; symndx = dst.l_addr.l_symndx; if (symndx >= obj_raw_syment_count (abfd)) { @@ -4414,7 +4412,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) (_("%pB: warning: illegal symbol index 0x%lx in line number entry %d"), abfd, symndx, counter); cache_ptr->line_number = -1; - ret = FALSE; + ret = false; continue; } @@ -4428,7 +4426,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) (_("%pB: warning: illegal symbol index 0x%lx in line number entry %d"), abfd, symndx, counter); cache_ptr->line_number = -1; - ret = FALSE; + ret = false; continue; } sym = (coff_symbol_type *) (ent->u.syment._n._n_n._n_zeroes); @@ -4442,11 +4440,11 @@ coff_slurp_line_table (bfd *abfd, asection *asect) (_("%pB: warning: illegal symbol in line number entry %d"), abfd, counter); cache_ptr->line_number = -1; - ret = FALSE; + ret = false; continue; } - have_func = TRUE; + have_func = true; nbr_func++; cache_ptr->u.sym = (asymbol *) sym; if (sym->lineno != NULL) @@ -4457,7 +4455,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) sym->lineno = cache_ptr; if (sym->symbol.value < prev_offset) - ordered = FALSE; + ordered = false; prev_offset = sym->symbol.value; } else if (!have_func) @@ -4484,7 +4482,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) if (_bfd_mul_overflow (nbr_func, sizeof (alent *), &amt)) { bfd_set_error (bfd_error_file_too_big); - ret = FALSE; + ret = false; } else if ((func_table = (alent **) bfd_alloc (abfd, amt)) != NULL) { @@ -4504,7 +4502,7 @@ coff_slurp_line_table (bfd *abfd, asection *asect) if (_bfd_mul_overflow (asect->lineno_count, sizeof (alent), &amt)) { bfd_set_error (bfd_error_file_too_big); - ret = FALSE; + ret = false; } else if ((n_lineno_cache = (alent *) bfd_alloc (abfd, amt)) != NULL) { @@ -4530,11 +4528,11 @@ coff_slurp_line_table (bfd *abfd, asection *asect) asect->lineno_count * sizeof (alent)); } else - ret = FALSE; + ret = false; bfd_release (abfd, func_table); } else - ret = FALSE; + ret = false; } return ret; @@ -4544,43 +4542,43 @@ coff_slurp_line_table (bfd *abfd, asection *asect) that if coff_relocate_section is defined, the linker will read symbols via coff_link_add_symbols, rather than via this routine. */ -static bfd_boolean +static bool coff_slurp_symbol_table (bfd * abfd) { combined_entry_type *native_symbols; coff_symbol_type *cached_area; unsigned int *table_ptr; unsigned int number_of_symbols = 0; - bfd_boolean ret = TRUE; + bool ret = true; size_t amt; if (obj_symbols (abfd)) - return TRUE; + return true; /* Read in the symbol table. */ if ((native_symbols = coff_get_normalized_symtab (abfd)) == NULL) - return FALSE; + return false; /* Allocate enough room for all the symbols in cached form. */ if (_bfd_mul_overflow (obj_raw_syment_count (abfd), sizeof (*cached_area), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cached_area = (coff_symbol_type *) bfd_alloc (abfd, amt); if (cached_area == NULL) - return FALSE; + return false; if (_bfd_mul_overflow (obj_raw_syment_count (abfd), sizeof (*table_ptr), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } table_ptr = (unsigned int *) bfd_zalloc (abfd, amt); if (table_ptr == NULL) - return FALSE; + return false; else { coff_symbol_type *dst = cached_area; @@ -4602,7 +4600,7 @@ coff_slurp_symbol_table (bfd * abfd) dst->symbol.flags = 0; /* PR 17512: file: 079-7098-0.001:0.1. */ dst->symbol.value = 0; - dst->done_lineno = FALSE; + dst->done_lineno = false; switch (src->u.syment.n_sclass) { @@ -4876,7 +4874,7 @@ coff_slurp_symbol_table (bfd * abfd) (_("%pB: unrecognized storage class %d for %s symbol `%s'"), abfd, src->u.syment.n_sclass, dst->symbol.section->name, dst->symbol.name); - ret = FALSE; + ret = false; /* Fall through. */ case C_HIDDEN: /* Ext symbol in dmert public lib. */ /* PR 20722: These symbols can also be generated by @@ -4909,7 +4907,7 @@ coff_slurp_symbol_table (bfd * abfd) while (p) { if (! coff_slurp_line_table (abfd, p)) - return FALSE; + return false; p = p->next; } } @@ -5068,7 +5066,7 @@ SUBSUBSECTION } #endif -static bfd_boolean +static bool coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) { RELOC *native_relocs; @@ -5078,13 +5076,13 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) size_t amt; if (asect->relocation) - return TRUE; + return true; if (asect->reloc_count == 0) - return TRUE; + return true; if (asect->flags & SEC_CONSTRUCTOR) - return TRUE; + return true; if (!coff_slurp_symbol_table (abfd)) - return FALSE; + return false; native_relocs = (RELOC *) buy_and_read (abfd, asect->rel_filepos, asect->reloc_count, @@ -5092,11 +5090,11 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) if (_bfd_mul_overflow (asect->reloc_count, sizeof (arelent), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } reloc_cache = (arelent *) bfd_alloc (abfd, amt); if (reloc_cache == NULL || native_relocs == NULL) - return FALSE; + return false; for (idx = 0; idx < asect->reloc_count; idx++) { @@ -5166,12 +5164,12 @@ coff_slurp_reloc_table (bfd * abfd, sec_ptr asect, asymbol ** symbols) (_("%pB: illegal relocation type %d at address %#" PRIx64), abfd, dst.r_type, (uint64_t) dst.r_vaddr); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } asect->relocation = reloc_cache; - return TRUE; + return true; } #ifndef coff_rtype_to_howto @@ -5331,7 +5329,7 @@ dummy_reloc16_extra_cases (bfd *abfd ATTRIBUTE_UNUSED, #ifndef coff_link_output_has_begun -static bfd_boolean +static bool coff_link_output_has_begun (bfd * abfd, struct coff_final_link_info * info ATTRIBUTE_UNUSED) { @@ -5341,11 +5339,11 @@ coff_link_output_has_begun (bfd * abfd, #ifndef coff_final_link_postscript -static bfd_boolean +static bool coff_final_link_postscript (bfd * abfd ATTRIBUTE_UNUSED, struct coff_final_link_info * pfinfo ATTRIBUTE_UNUSED) { - return TRUE; + return true; } #endif @@ -5401,16 +5399,16 @@ static bfd_coff_backend_data bfd_coff_std_swap_table ATTRIBUTE_UNUSED = coff_SWAP_scnhdr_out, FILHSZ, AOUTSZ, SCNHSZ, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN, #ifdef COFF_LONG_FILENAMES - TRUE, + true, #else - FALSE, + false, #endif COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS - TRUE, + true, #else - FALSE, + false, #endif #ifdef COFF_DEBUG_STRING_WIDE_PREFIX 4, @@ -5442,16 +5440,16 @@ static bfd_coff_backend_data ticoff0_swap_table = coff_SWAP_scnhdr_out, FILHSZ_V0, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ_V0, LINESZ, FILNMLEN, #ifdef COFF_LONG_FILENAMES - TRUE, + true, #else - FALSE, + false, #endif COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS - TRUE, + true, #else - FALSE, + false, #endif #ifdef COFF_DEBUG_STRING_WIDE_PREFIX 4, @@ -5484,16 +5482,16 @@ static bfd_coff_backend_data ticoff1_swap_table = coff_SWAP_scnhdr_out, FILHSZ, AOUTSZ, SCNHSZ_V01, SYMESZ, AUXESZ, RELSZ, LINESZ, FILNMLEN, #ifdef COFF_LONG_FILENAMES - TRUE, + true, #else - FALSE, + false, #endif COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, #ifdef COFF_FORCE_SYMBOLS_IN_STRINGS - TRUE, + true, #else - FALSE, + false, #endif #ifdef COFF_DEBUG_STRING_WIDE_PREFIX 4, @@ -5745,10 +5743,10 @@ static bfd_coff_backend_data bigobj_swap_table = coff_SWAP_scnhdr_out, FILHSZ_BIGOBJ, AOUTSZ, SCNHSZ, SYMESZ_BIGOBJ, AUXESZ_BIGOBJ, RELSZ, LINESZ, FILNMLEN_BIGOBJ, - TRUE, + true, COFF_DEFAULT_LONG_SECTION_NAMES, COFF_DEFAULT_SECTION_ALIGNMENT_POWER, - FALSE, + false, 2, 1U << 31, coff_bigobj_swap_filehdr_in, coff_SWAP_aouthdr_in, coff_SWAP_scnhdr_in, diff --git a/bfd/coffgen.c b/bfd/coffgen.c index f493978815..4e14243020 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -46,14 +46,14 @@ /* Take a section header read from a coff file (in HOST byte order), and make a BFD "section" out of it. This is used by ECOFF. */ -static bfd_boolean +static bool make_a_section_from_file (bfd *abfd, struct internal_scnhdr *hdr, unsigned int target_index) { asection *return_section; char *name; - bfd_boolean result = TRUE; + bool result = true; flagword flags; name = NULL; @@ -76,7 +76,7 @@ make_a_section_from_file (bfd *abfd, expect them to be off by default. This won't directly affect the format of any output BFD created from this one, but the information can be used to decide what to do. */ - bfd_coff_set_long_section_names (abfd, TRUE); + bfd_coff_set_long_section_names (abfd, true); memcpy (buf, hdr->s_name + 1, SCNNMLEN - 1); buf[SCNNMLEN - 1] = '\0'; strindex = strtol (buf, &p, 10); @@ -84,14 +84,14 @@ make_a_section_from_file (bfd *abfd, { strings = _bfd_coff_read_string_table (abfd); if (strings == NULL) - return FALSE; + return false; if ((bfd_size_type)(strindex + 2) >= obj_coff_strings_len (abfd)) - return FALSE; + return false; strings += strindex; name = (char *) bfd_alloc (abfd, (bfd_size_type) strlen (strings) + 1 + 1); if (name == NULL) - return FALSE; + return false; strcpy (name, strings); } } @@ -102,14 +102,14 @@ make_a_section_from_file (bfd *abfd, name = (char *) bfd_alloc (abfd, (bfd_size_type) sizeof (hdr->s_name) + 1 + 1); if (name == NULL) - return FALSE; + return false; strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name)); name[sizeof (hdr->s_name)] = 0; } return_section = bfd_make_section_anyway (abfd, name); if (return_section == NULL) - return FALSE; + return false; return_section->vma = hdr->s_vaddr; return_section->lma = hdr->s_paddr; @@ -129,7 +129,7 @@ make_a_section_from_file (bfd *abfd, if (! bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name, return_section, & flags)) - result = FALSE; + result = false; return_section->flags = flags; @@ -178,7 +178,7 @@ make_a_section_from_file (bfd *abfd, /* xgettext: c-format */ (_("%pB: unable to initialize compress status for section %s"), abfd, name); - return FALSE; + return false; } if (return_section->compress_status == COMPRESS_SECTION_DONE) { @@ -188,7 +188,7 @@ make_a_section_from_file (bfd *abfd, new_name = bfd_alloc (abfd, len + 2); if (new_name == NULL) - return FALSE; + return false; new_name[0] = '.'; new_name[1] = 'z'; memcpy (new_name + 2, name + 1, len); @@ -202,7 +202,7 @@ make_a_section_from_file (bfd *abfd, /* xgettext: c-format */ (_("%pB: unable to initialize decompress status for section %s"), abfd, name); - return FALSE; + return false; } if (name[1] == 'z') { @@ -210,7 +210,7 @@ make_a_section_from_file (bfd *abfd, new_name = bfd_alloc (abfd, len); if (new_name == NULL) - return FALSE; + return false; new_name[0] = '.'; memcpy (new_name + 1, name + 2, len - 1); } @@ -486,9 +486,9 @@ _bfd_coff_internal_syment_name (bfd *abfd, struct internal_reloc * _bfd_coff_read_internal_relocs (bfd *abfd, asection *sec, - bfd_boolean cache, + bool cache, bfd_byte *external_relocs, - bfd_boolean require_internal, + bool require_internal, struct internal_reloc *internal_relocs) { bfd_size_type relsz; @@ -685,7 +685,7 @@ fixup_symbol_value (bfd *abfd, chain, and that the last one points to the first external symbol. We do that here too. */ -bfd_boolean +bool coff_renumber_symbols (bfd *bfd_ptr, int *first_undef) { unsigned int symbol_count = bfd_get_symcount (bfd_ptr); @@ -712,7 +712,7 @@ coff_renumber_symbols (bfd *bfd_ptr, int *first_undef) amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1); newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt); if (!newsyms) - return FALSE; + return false; bfd_ptr->outsymbols = newsyms; for (i = 0; i < symbol_count; i++) if ((symbol_ptr_ptr[i]->flags & BSF_NOT_AT_END) != 0 @@ -774,7 +774,7 @@ coff_renumber_symbols (bfd *bfd_ptr, int *first_undef) obj_conv_table_size (bfd_ptr) = native_index; - return TRUE; + return true; } /* Run thorough the symbol table again, and fix it so that all @@ -968,7 +968,7 @@ coff_fix_symbol_name (bfd *abfd, /* Write a symbol out to a COFF file. */ -static bfd_boolean +static bool coff_write_symbol (bfd *abfd, asymbol *symbol, combined_entry_type *native, @@ -1011,10 +1011,10 @@ coff_write_symbol (bfd *abfd, symesz = bfd_coff_symesz (abfd); buf = bfd_alloc (abfd, symesz); if (!buf) - return FALSE; + return false; bfd_coff_swap_sym_out (abfd, &native->u.syment, buf); if (bfd_bwrite (buf, symesz, abfd) != symesz) - return FALSE; + return false; bfd_release (abfd, buf); if (native->u.syment.n_numaux > 0) @@ -1025,7 +1025,7 @@ coff_write_symbol (bfd *abfd, auxesz = bfd_coff_auxesz (abfd); buf = bfd_alloc (abfd, auxesz); if (!buf) - return FALSE; + return false; for (j = 0; j < native->u.syment.n_numaux; j++) { BFD_ASSERT (! (native + j + 1)->is_sym); @@ -1035,7 +1035,7 @@ coff_write_symbol (bfd *abfd, native->u.syment.n_numaux, buf); if (bfd_bwrite (buf, auxesz, abfd) != auxesz) - return FALSE; + return false; } bfd_release (abfd, buf); } @@ -1044,14 +1044,14 @@ coff_write_symbol (bfd *abfd, set_index (symbol, *written); *written += numaux + 1; - return TRUE; + return true; } /* Write out a symbol to a COFF file that does not come from a COFF file originally. This symbol may have been created by the linker, or we may be linking a non COFF file to a COFF file. */ -bfd_boolean +bool coff_write_alien_symbol (bfd *abfd, asymbol *symbol, struct internal_syment *isym, @@ -1067,7 +1067,7 @@ coff_write_alien_symbol (bfd *abfd, ? symbol->section->output_section : symbol->section; struct bfd_link_info *link_info = coff_data (abfd)->link_info; - bfd_boolean ret; + bool ret; if ((!link_info || link_info->strip_discarded) && !bfd_is_abs_section (symbol->section) @@ -1076,11 +1076,11 @@ coff_write_alien_symbol (bfd *abfd, symbol->name = ""; if (isym != NULL) memset (isym, 0, sizeof (*isym)); - return TRUE; + return true; } native = dummy; - native->is_sym = TRUE; - native[1].is_sym = FALSE; + native->is_sym = true; + native[1].is_sym = false; native->u.syment.n_type = T_NULL; native->u.syment.n_flags = 0; native->u.syment.n_numaux = 0; @@ -1108,7 +1108,7 @@ coff_write_alien_symbol (bfd *abfd, symbol->name = ""; if (isym != NULL) memset (isym, 0, sizeof (*isym)); - return TRUE; + return true; } else { @@ -1148,7 +1148,7 @@ coff_write_alien_symbol (bfd *abfd, /* Write a native symbol to a COFF file. */ -static bfd_boolean +static bool coff_write_native_symbol (bfd *abfd, coff_symbol_type *symbol, bfd_vma *written, @@ -1165,7 +1165,7 @@ coff_write_native_symbol (bfd *abfd, && symbol->symbol.section->output_section == bfd_abs_section_ptr) { symbol->symbol.name = ""; - return TRUE; + return true; } BFD_ASSERT (native->is_sym); @@ -1194,7 +1194,7 @@ coff_write_native_symbol (bfd *abfd, + symbol->symbol.section->output_offset); count++; } - symbol->done_lineno = TRUE; + symbol->done_lineno = true; if (! bfd_is_const_section (symbol->symbol.section->output_section)) symbol->symbol.section->output_section->moving_line_filepos += @@ -1214,7 +1214,7 @@ null_error_handler (const char *fmt ATTRIBUTE_UNUSED, /* Write out the COFF symbols. */ -bfd_boolean +bool coff_write_symbols (bfd *abfd) { bfd_size_type string_size; @@ -1249,7 +1249,7 @@ coff_write_symbols (bfd *abfd) /* Seek to the right place. */ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) - return FALSE; + return false; /* Output all the symbols we have. */ written = 0; @@ -1264,7 +1264,7 @@ coff_write_symbols (bfd *abfd) if (!coff_write_alien_symbol (abfd, symbol, NULL, NULL, &written, &string_size, &debug_string_section, &debug_string_size)) - return FALSE; + return false; } else { @@ -1309,7 +1309,7 @@ coff_write_symbols (bfd *abfd) if (!coff_write_native_symbol (abfd, c_symbol, &written, &string_size, &debug_string_section, &debug_string_size)) - return FALSE; + return false; } } @@ -1328,7 +1328,7 @@ coff_write_symbols (bfd *abfd) #endif if (bfd_bwrite ((void *) buffer, (bfd_size_type) sizeof (buffer), abfd) != sizeof (buffer)) - return FALSE; + return false; /* Handle long section names. This code must handle section names just as they are handled in coff_write_object_contents. */ @@ -1345,7 +1345,7 @@ coff_write_symbols (bfd *abfd) { if (bfd_bwrite (o->name, (bfd_size_type) (len + 1), abfd) != len + 1) - return FALSE; + return false; } } } @@ -1387,7 +1387,7 @@ coff_write_symbols (bfd *abfd) if (bfd_coff_force_symnames_in_strings (abfd)) { if (bfd_bwrite (".file", (bfd_size_type) 6, abfd) != 6) - return FALSE; + return false; } maxlen = bfd_coff_filnmlen (abfd); } @@ -1398,7 +1398,7 @@ coff_write_symbols (bfd *abfd) { if (bfd_bwrite ((void *) (q->name), (bfd_size_type) name_length + 1, abfd) != name_length + 1) - return FALSE; + return false; } } } @@ -1417,7 +1417,7 @@ coff_write_symbols (bfd *abfd) #endif if (bfd_bwrite ((void *) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd) != STRING_SIZE_SIZE) - return FALSE; + return false; } /* Make sure the .debug section was created to be the correct size. @@ -1431,10 +1431,10 @@ coff_write_symbols (bfd *abfd) 1 << debug_string_section->alignment_power) == debug_string_section->size))); - return TRUE; + return true; } -bfd_boolean +bool coff_write_linenumbers (bfd *abfd) { asection *s; @@ -1444,14 +1444,14 @@ coff_write_linenumbers (bfd *abfd) linesz = bfd_coff_linesz (abfd); buff = bfd_alloc (abfd, linesz); if (!buff) - return FALSE; + return false; for (s = abfd->sections; s != (asection *) NULL; s = s->next) { if (s->lineno_count) { asymbol **q = abfd->outsymbols; if (bfd_seek (abfd, s->line_filepos, SEEK_SET) != 0) - return FALSE; + return false; /* Find all the linenumbers in this section. */ while (*q) { @@ -1472,7 +1472,7 @@ coff_write_linenumbers (bfd *abfd) bfd_coff_swap_lineno_out (abfd, &out, buff); if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd) != linesz) - return FALSE; + return false; l++; while (l->line_number) { @@ -1481,7 +1481,7 @@ coff_write_linenumbers (bfd *abfd) bfd_coff_swap_lineno_out (abfd, &out, buff); if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd) != linesz) - return FALSE; + return false; l++; } } @@ -1491,7 +1491,7 @@ coff_write_linenumbers (bfd *abfd) } } bfd_release (abfd, buff); - return TRUE; + return true; } alent * @@ -1621,7 +1621,7 @@ copy_name (bfd *abfd, char *name, size_t maxlen) /* Read in the external symbols. */ -bfd_boolean +bool _bfd_coff_get_external_symbols (bfd *abfd) { size_t symesz; @@ -1629,20 +1629,20 @@ _bfd_coff_get_external_symbols (bfd *abfd) void * syms; if (obj_coff_external_syms (abfd) != NULL) - return TRUE; + return true; symesz = bfd_coff_symesz (abfd); if (_bfd_mul_overflow (obj_raw_syment_count (abfd), symesz, &size)) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (size == 0) - return TRUE; + return true; if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) - return FALSE; + return false; syms = _bfd_malloc_and_read (abfd, size, size); obj_coff_external_syms (abfd) = syms; return syms != NULL; @@ -1732,11 +1732,11 @@ _bfd_coff_read_string_table (bfd *abfd) /* Free up the external symbols and strings read from a COFF file. */ -bfd_boolean +bool _bfd_coff_free_symbols (bfd *abfd) { if (! bfd_family_coff (abfd)) - return FALSE; + return false; if (obj_coff_external_syms (abfd) != NULL && ! obj_coff_keep_syms (abfd)) @@ -1753,7 +1753,7 @@ _bfd_coff_free_symbols (bfd *abfd) obj_coff_strings_len (abfd) = 0; } - return TRUE; + return true; } /* Read a symbol table into freshly bfd_allocated memory, swap it, and @@ -1811,7 +1811,7 @@ coff_get_normalized_symtab (bfd *abfd) bfd_coff_swap_sym_in (abfd, (void *) raw_src, (void *) & internal_ptr->u.syment); symbol_ptr = internal_ptr; - internal_ptr->is_sym = TRUE; + internal_ptr->is_sym = true; /* PR 17512: Prevent buffer overrun. */ if (symbol_ptr->u.syment.n_numaux > ((raw_end - 1) - raw_src) / symesz) @@ -1833,7 +1833,7 @@ coff_get_normalized_symtab (bfd *abfd) (int) i, symbol_ptr->u.syment.n_numaux, &(internal_ptr->u.auxent)); - internal_ptr->is_sym = FALSE; + internal_ptr->is_sym = false; coff_pointerize_aux (abfd, internal, symbol_ptr, i, internal_ptr, internal_end); } @@ -1999,7 +1999,7 @@ coff_make_empty_symbol (bfd *abfd) new_symbol->symbol.section = 0; new_symbol->native = NULL; new_symbol->lineno = NULL; - new_symbol->done_lineno = FALSE; + new_symbol->done_lineno = false; new_symbol->symbol.the_bfd = abfd; return & new_symbol->symbol; @@ -2023,11 +2023,11 @@ coff_bfd_make_debug_symbol (bfd *abfd, new_symbol->native = (combined_entry_type *) bfd_zalloc (abfd, amt); if (!new_symbol->native) return NULL; - new_symbol->native->is_sym = TRUE; + new_symbol->native->is_sym = true; new_symbol->symbol.section = bfd_abs_section_ptr; new_symbol->symbol.flags = BSF_DEBUGGING; new_symbol->lineno = NULL; - new_symbol->done_lineno = FALSE; + new_symbol->done_lineno = false; new_symbol->symbol.the_bfd = abfd; return & new_symbol->symbol; @@ -2207,7 +2207,7 @@ coff_print_symbol (bfd *abfd, function for the is_local_label_name entry point, but some may override it. */ -bfd_boolean +bool _bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { @@ -2218,7 +2218,7 @@ _bfd_coff_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, section, calculate and return the name of the source file and the line nearest to the wanted location. */ -bfd_boolean +bool coff_find_nearest_line_with_names (bfd *abfd, asymbol **symbols, asection *section, @@ -2228,7 +2228,7 @@ coff_find_nearest_line_with_names (bfd *abfd, unsigned int *line_ptr, const struct dwarf_debug_section *debug_sections) { - bfd_boolean found; + bool found; unsigned int i; unsigned int line_base; coff_data_type *cof = coff_data (abfd); @@ -2245,17 +2245,17 @@ coff_find_nearest_line_with_names (bfd *abfd, &found, filename_ptr, functionname_ptr, line_ptr, &coff_data(abfd)->line_info)) - return FALSE; + return false; if (found) - return TRUE; + return true; /* Also try examining DWARF2 debugging information. */ if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, filename_ptr, functionname_ptr, line_ptr, NULL, debug_sections, &coff_data(abfd)->dwarf2_find_line_info)) - return TRUE; + return true; sec_data = coff_section_data (abfd, section); @@ -2284,7 +2284,7 @@ coff_find_nearest_line_with_names (bfd *abfd, if (sec_data) { - sec_data->saved_bias = TRUE; + sec_data->saved_bias = true; sec_data->bias = bias; } } @@ -2295,7 +2295,7 @@ coff_find_nearest_line_with_names (bfd *abfd, filename_ptr, functionname_ptr, line_ptr, NULL, debug_sections, &coff_data(abfd)->dwarf2_find_line_info)) - return TRUE; + return true; } *filename_ptr = 0; @@ -2304,15 +2304,15 @@ coff_find_nearest_line_with_names (bfd *abfd, /* Don't try and find line numbers in a non coff file. */ if (!bfd_family_coff (abfd)) - return FALSE; + return false; if (cof == NULL) - return FALSE; + return false; /* Find the first C_FILE symbol. */ p = cof->raw_syments; if (!p) - return FALSE; + return false; pend = p + cof->raw_syment_count; while (p < pend) @@ -2389,7 +2389,7 @@ coff_find_nearest_line_with_names (bfd *abfd, { *functionname_ptr = NULL; *line_ptr = 0; - return TRUE; + return true; } /* Now wander though the raw linenumbers of the section. @@ -2493,10 +2493,10 @@ coff_find_nearest_line_with_names (bfd *abfd, sec_data->line_base = line_base; } - return TRUE; + return true; } -bfd_boolean +bool coff_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, @@ -2513,13 +2513,13 @@ coff_find_nearest_line (bfd *abfd, line_ptr, dwarf_debug_sections); } -bfd_boolean +bool coff_find_inliner_info (bfd *abfd, const char **filename_ptr, const char **functionname_ptr, unsigned int *line_ptr) { - bfd_boolean found; + bool found; found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr, functionname_ptr, line_ptr, @@ -2543,7 +2543,7 @@ coff_sizeof_headers (bfd *abfd, struct bfd_link_info *info) /* Change the class of a coff symbol held by BFD. */ -bfd_boolean +bool bfd_coff_set_symbol_class (bfd * abfd, asymbol * symbol, unsigned int symbol_class) @@ -2554,7 +2554,7 @@ bfd_coff_set_symbol_class (bfd * abfd, if (csym == NULL) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } else if (csym->native == NULL) { @@ -2568,9 +2568,9 @@ bfd_coff_set_symbol_class (bfd * abfd, native = (combined_entry_type *) bfd_zalloc (abfd, amt); if (native == NULL) - return FALSE; + return false; - native->is_sym = TRUE; + native->is_sym = true; native->u.syment.n_type = T_NULL; native->u.syment.n_sclass = symbol_class; @@ -2603,10 +2603,10 @@ bfd_coff_set_symbol_class (bfd * abfd, else csym->native->u.syment.n_sclass = symbol_class; - return TRUE; + return true; } -bfd_boolean +bool _bfd_coff_section_already_linked (bfd *abfd, asection *sec, struct bfd_link_info *info) @@ -2618,15 +2618,15 @@ _bfd_coff_section_already_linked (bfd *abfd, struct coff_comdat_info *s_comdat; if (sec->output_section == bfd_abs_section_ptr) - return FALSE; + return false; flags = sec->flags; if ((flags & SEC_LINK_ONCE) == 0) - return FALSE; + return false; /* The COFF backend linker doesn't support group sections. */ if ((flags & SEC_GROUP) != 0) - return FALSE; + return false; name = bfd_section_name (sec); s_comdat = bfd_coff_get_comdat_section (abfd, sec); @@ -2674,12 +2674,12 @@ _bfd_coff_section_already_linked (bfd *abfd, /* This is the first section with this name. Record it. */ if (!bfd_section_already_linked_table_insert (already_linked_list, sec)) info->callbacks->einfo (_("%F%P: already_linked_table: %E\n")); - return FALSE; + return false; } /* Initialize COOKIE for input bfd ABFD. */ -static bfd_boolean +static bool init_reloc_cookie (struct coff_reloc_cookie *cookie, struct bfd_link_info *info ATTRIBUTE_UNUSED, bfd *abfd) @@ -2692,7 +2692,7 @@ init_reloc_cookie (struct coff_reloc_cookie *cookie, cookie->symbols = obj_symbols (abfd); - return TRUE; + return true; } /* Free the memory allocated by init_reloc_cookie, if appropriate. */ @@ -2707,7 +2707,7 @@ fini_reloc_cookie (struct coff_reloc_cookie *cookie ATTRIBUTE_UNUSED, /* Initialize the relocation information in COOKIE for input section SEC of input bfd ABFD. */ -static bfd_boolean +static bool init_reloc_cookie_rels (struct coff_reloc_cookie *cookie, struct bfd_link_info *info ATTRIBUTE_UNUSED, bfd *abfd, @@ -2718,17 +2718,18 @@ init_reloc_cookie_rels (struct coff_reloc_cookie *cookie, cookie->rels = NULL; cookie->relend = NULL; cookie->rel = NULL; - return TRUE; + return true; } - cookie->rels = _bfd_coff_read_internal_relocs (abfd, sec, FALSE, NULL, 0, NULL); + cookie->rels = _bfd_coff_read_internal_relocs (abfd, sec, false, NULL, + 0, NULL); if (cookie->rels == NULL) - return FALSE; + return false; cookie->rel = cookie->rels; cookie->relend = (cookie->rels + sec->reloc_count); - return TRUE; + return true; } /* Free the memory allocated by init_reloc_cookie_rels, @@ -2750,20 +2751,20 @@ fini_reloc_cookie_rels (struct coff_reloc_cookie *cookie, /* Initialize the whole of COOKIE for input section SEC. */ -static bfd_boolean +static bool init_reloc_cookie_for_section (struct coff_reloc_cookie *cookie, struct bfd_link_info *info, asection *sec) { if (!init_reloc_cookie (cookie, info, sec->owner)) - return FALSE; + return false; if (!init_reloc_cookie_rels (cookie, info, sec->owner, sec)) { fini_reloc_cookie (cookie, sec->owner); - return FALSE; + return false; } - return TRUE; + return true; } /* Free the memory allocated by init_reloc_cookie_for_section, @@ -2846,14 +2847,14 @@ _bfd_coff_gc_mark_rsec (struct bfd_link_info *info, asection *sec, + obj_convert (sec->owner)[cookie->rel->r_symndx])->native->u.syment); } -static bfd_boolean _bfd_coff_gc_mark +static bool _bfd_coff_gc_mark (struct bfd_link_info *, asection *, coff_gc_mark_hook_fn); /* COOKIE->rel describes a relocation against section SEC, which is a section we've decided to keep. Mark the section that contains the relocation symbol. */ -static bfd_boolean +static bool _bfd_coff_gc_mark_reloc (struct bfd_link_info *info, asection *sec, coff_gc_mark_hook_fn gc_mark_hook, @@ -2867,21 +2868,21 @@ _bfd_coff_gc_mark_reloc (struct bfd_link_info *info, if (bfd_get_flavour (rsec->owner) != bfd_target_coff_flavour) rsec->gc_mark = 1; else if (!_bfd_coff_gc_mark (info, rsec, gc_mark_hook)) - return FALSE; + return false; } - return TRUE; + return true; } /* The mark phase of garbage collection. For a given section, mark it and any sections in this section's group, and all the sections which define symbols to which it refers. */ -static bfd_boolean +static bool _bfd_coff_gc_mark (struct bfd_link_info *info, asection *sec, coff_gc_mark_hook_fn gc_mark_hook) { - bfd_boolean ret = TRUE; + bool ret = true; sec->gc_mark = 1; @@ -2892,14 +2893,14 @@ _bfd_coff_gc_mark (struct bfd_link_info *info, struct coff_reloc_cookie cookie; if (!init_reloc_cookie_for_section (&cookie, info, sec)) - ret = FALSE; + ret = false; else { for (; cookie.rel < cookie.relend; cookie.rel++) { if (!_bfd_coff_gc_mark_reloc (info, sec, gc_mark_hook, &cookie)) { - ret = FALSE; + ret = false; break; } } @@ -2910,7 +2911,7 @@ _bfd_coff_gc_mark (struct bfd_link_info *info, return ret; } -static bfd_boolean +static bool _bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info, coff_gc_mark_hook_fn mark_hook ATTRIBUTE_UNUSED) { @@ -2919,20 +2920,20 @@ _bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info, for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) { asection *isec; - bfd_boolean some_kept; + bool some_kept; if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour) continue; /* Ensure all linker created sections are kept, and see whether any other section is already marked. */ - some_kept = FALSE; + some_kept = false; for (isec = ibfd->sections; isec != NULL; isec = isec->next) { if ((isec->flags & SEC_LINKER_CREATED) != 0) isec->gc_mark = 1; else if (isec->gc_mark) - some_kept = TRUE; + some_kept = true; } /* If no section in this file will be kept, then we can @@ -2947,12 +2948,12 @@ _bfd_coff_gc_mark_extra_sections (struct bfd_link_info *info, || (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0) isec->gc_mark = 1; } - return TRUE; + return true; } /* Sweep symbols in swept sections. Called via coff_link_hash_traverse. */ -static bfd_boolean +static bool coff_gc_sweep_symbol (struct coff_link_hash_entry *h, void *data ATTRIBUTE_UNUSED) { @@ -2969,15 +2970,15 @@ coff_gc_sweep_symbol (struct coff_link_hash_entry *h, h->symbol_class = C_HIDDEN; } - return TRUE; + return true; } /* The sweep phase of garbage collection. Remove all garbage sections. */ -typedef bfd_boolean (*gc_sweep_hook_fn) +typedef bool (*gc_sweep_hook_fn) (bfd *, struct bfd_link_info *, asection *, const struct internal_reloc *); -static bfd_boolean +static bool coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *sub; @@ -3026,13 +3027,13 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) && !bfd_is_abs_section (o->output_section)) { struct internal_reloc *internal_relocs; - bfd_boolean r; + bool r; internal_relocs = _bfd_coff_link_read_relocs (o->owner, o, NULL, NULL, info->keep_memory); if (internal_relocs == NULL) - return FALSE; + return false; r = (*gc_sweep_hook) (o->owner, info, o, internal_relocs); @@ -3040,7 +3041,7 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) free (internal_relocs); if (!r) - return FALSE; + return false; } #endif } @@ -3051,7 +3052,7 @@ coff_gc_sweep (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) coff_link_hash_traverse (coff_hash_table (info), coff_gc_sweep_symbol, NULL); - return TRUE; + return true; } /* Keep all sections containing symbols undefined on the command-line, @@ -3067,7 +3068,7 @@ _bfd_coff_gc_keep (struct bfd_link_info *info) struct coff_link_hash_entry *h; h = coff_link_hash_lookup (coff_hash_table (info), sym->name, - FALSE, FALSE, FALSE); + false, false, false); if (h != NULL && (h->root.type == bfd_link_hash_defined @@ -3079,7 +3080,7 @@ _bfd_coff_gc_keep (struct bfd_link_info *info) /* Do mark and sweep of unused sections. */ -bfd_boolean +bool bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *sub; @@ -3092,7 +3093,7 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) || !is_coff_hash_table (info->hash)) { _bfd_error_handler(_("warning: gc-sections option ignored")); - return TRUE; + return true; } #endif @@ -3115,7 +3116,7 @@ bfd_coff_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) && !o->gc_mark) { if (!_bfd_coff_gc_mark (info, o, _bfd_coff_gc_mark_hook)) - return FALSE; + return false; } } } @@ -3138,7 +3139,7 @@ bfd_coff_group_name (bfd *abfd, const asection *sec) return NULL; } -bfd_boolean +bool _bfd_coff_close_and_cleanup (bfd *abfd) { struct coff_tdata *tdata = coff_data (abfd); @@ -3152,7 +3153,7 @@ _bfd_coff_close_and_cleanup (bfd *abfd) if (bfd_get_format (abfd) == bfd_object && bfd_family_coff (abfd) && !_bfd_coff_free_symbols (abfd)) - return FALSE; + return false; if (bfd_get_format (abfd) == bfd_object || bfd_get_format (abfd) == bfd_core) diff --git a/bfd/cofflink.c b/bfd/cofflink.c index 05c6fff746..c6b65c761d 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -29,11 +29,11 @@ #include "libcoff.h" #include "safe-ctype.h" -static bfd_boolean coff_link_add_object_symbols (bfd *, struct bfd_link_info *); -static bfd_boolean coff_link_check_archive_element +static bool coff_link_add_object_symbols (bfd *, struct bfd_link_info *); +static bool coff_link_check_archive_element (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, - bfd_boolean *); -static bfd_boolean coff_link_add_symbols (bfd *, struct bfd_link_info *); + bool *); +static bool coff_link_add_symbols (bfd *, struct bfd_link_info *); /* Return TRUE if SYM is a weak, external symbol. */ #define IS_WEAK_EXTERNAL(abfd, sym) \ @@ -91,7 +91,7 @@ _bfd_coff_link_hash_newfunc (struct bfd_hash_entry *entry, /* Initialize a COFF linker hash table. */ -bfd_boolean +bool _bfd_coff_link_hash_table_init (struct coff_link_hash_table *table, bfd *abfd, struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *, @@ -159,7 +159,7 @@ _bfd_coff_debug_merge_hash_newfunc (struct bfd_hash_entry *entry, /* Given a COFF BFD, add symbols to the global hash table as appropriate. */ -bfd_boolean +bool _bfd_coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -171,25 +171,25 @@ _bfd_coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) (abfd, info, coff_link_check_archive_element); default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } /* Add symbols from a COFF object file. */ -static bfd_boolean +static bool coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { if (! _bfd_coff_get_external_symbols (abfd)) - return FALSE; + return false; if (! coff_link_add_symbols (abfd, info)) - return FALSE; + return false; if (! info->keep_memory && ! _bfd_coff_free_symbols (abfd)) - return FALSE; + return false; - return TRUE; + return true; } /* Check a single archive element to see if we need to include it in @@ -197,50 +197,50 @@ coff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) needed in the link or not. This is called via _bfd_generic_link_add_archive_symbols. */ -static bfd_boolean +static bool coff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h, const char *name, - bfd_boolean *pneeded) + bool *pneeded) { - *pneeded = FALSE; + *pneeded = false; /* PR 22369 - Skip non COFF objects in the archive. */ if (! bfd_family_coff (abfd)) - return TRUE; + return true; /* We are only interested in symbols that are currently undefined. If a symbol is currently known to be common, COFF linkers do not bring in an object file which defines it. */ if (h->type != bfd_link_hash_undefined) - return TRUE; + return true; /* If the archive element has already been loaded then one of the symbols defined by that element might have been made undefined due to being in a discarded section. */ if (((struct coff_link_hash_entry *) h)->indx == -3) - return TRUE; + return true; /* Include this element? */ if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd)) - return TRUE; - *pneeded = TRUE; + return true; + *pneeded = true; return bfd_link_add_symbols (abfd, info); } /* Add all the symbols from an object file to the hash table. */ -static bfd_boolean +static bool coff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { unsigned int n_tmask = coff_data (abfd)->local_n_tmask; unsigned int n_btshft = coff_data (abfd)->local_n_btshft; unsigned int n_btmask = coff_data (abfd)->local_n_btmask; - bfd_boolean keep_syms; - bfd_boolean default_copy; + bool keep_syms; + bool default_copy; bfd_size_type symcount; struct coff_link_hash_entry **sym_hash; bfd_size_type symesz; @@ -251,17 +251,17 @@ coff_link_add_symbols (bfd *abfd, symcount = obj_raw_syment_count (abfd); if (symcount == 0) - return TRUE; /* Nothing to do. */ + return true; /* Nothing to do. */ /* Keep the symbols during this function, in case the linker needs to read the generic symbols in order to report an error message. */ keep_syms = obj_coff_keep_syms (abfd); - obj_coff_keep_syms (abfd) = TRUE; + obj_coff_keep_syms (abfd) = true; if (info->keep_memory) - default_copy = FALSE; + default_copy = false; else - default_copy = TRUE; + default_copy = true; /* We keep a list of the linker hash table entries that correspond to particular symbols. */ @@ -279,7 +279,7 @@ coff_link_add_symbols (bfd *abfd, { struct internal_syment sym; enum coff_symbol_classification classification; - bfd_boolean copy; + bool copy; bfd_coff_swap_sym_in (abfd, esym, &sym); @@ -291,8 +291,8 @@ coff_link_add_symbols (bfd *abfd, flagword flags; asection *section; bfd_vma value; - bfd_boolean addit; - bfd_boolean discarded = FALSE; + bool addit; + bool discarded = false; /* This symbol is externally visible. */ @@ -305,7 +305,7 @@ coff_link_add_symbols (bfd *abfd, copy = default_copy; if (sym._n._n_n._n_zeroes != 0 || sym._n._n_n._n_offset == 0) - copy = TRUE; + copy = true; value = sym.n_value; @@ -319,7 +319,7 @@ coff_link_add_symbols (bfd *abfd, section = coff_section_from_bfd_index (abfd, sym.n_scnum); if (discarded_section (section)) { - discarded = TRUE; + discarded = true; section = bfd_und_section_ptr; } else if (! obj_pe (abfd)) @@ -347,7 +347,7 @@ coff_link_add_symbols (bfd *abfd, if (IS_WEAK_EXTERNAL (abfd, sym)) flags = BSF_WEAK; - addit = TRUE; + addit = true; /* In the PE format, section symbols actually refer to the start of the output section. We handle them specially @@ -355,7 +355,7 @@ coff_link_add_symbols (bfd *abfd, if (obj_pe (abfd) && (flags & BSF_SECTION_SYM) != 0) { *sym_hash = coff_link_hash_lookup (coff_hash_table (info), - name, FALSE, copy, FALSE); + name, false, copy, false); if (*sym_hash != NULL) { if (((*sym_hash)->coff_link_hash_flags @@ -366,7 +366,7 @@ coff_link_add_symbols (bfd *abfd, (_("warning: symbol `%s' is both section and non-section"), name); - addit = FALSE; + addit = false; } } @@ -402,20 +402,20 @@ coff_link_add_symbols (bfd *abfd, { if (*sym_hash == NULL) *sym_hash = coff_link_hash_lookup (coff_hash_table (info), - name, FALSE, copy, FALSE); + name, false, copy, false); if (*sym_hash != NULL && (*sym_hash)->root.type == bfd_link_hash_defined && coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat != NULL && strcmp (coff_section_data (abfd, (*sym_hash)->root.u.def.section)->comdat->name, coff_section_data (abfd, section)->comdat->name) == 0) - addit = FALSE; + addit = false; } if (addit) { if (! (bfd_coff_link_add_one_symbol (info, abfd, name, flags, section, value, - (const char *) NULL, copy, FALSE, + (const char *) NULL, copy, false, (struct bfd_link_hash_entry **) sym_hash))) goto error_return; @@ -576,23 +576,23 @@ coff_link_add_symbols (bfd *abfd, obj_coff_keep_syms (abfd) = keep_syms; - return TRUE; + return true; error_return: obj_coff_keep_syms (abfd) = keep_syms; - return FALSE; + return false; } /* Do the final link step. */ -bfd_boolean +bool _bfd_coff_final_link (bfd *abfd, struct bfd_link_info *info) { bfd_size_type symesz; struct coff_final_link_info flaginfo; - bfd_boolean debug_merge_allocated; - bfd_boolean long_section_names; + bool debug_merge_allocated; + bool long_section_names; asection *o; struct bfd_link_order *p; bfd_size_type max_sym_count; @@ -625,8 +625,8 @@ _bfd_coff_final_link (bfd *abfd, flaginfo.contents = NULL; flaginfo.external_relocs = NULL; flaginfo.internal_relocs = NULL; - flaginfo.global_to_static = FALSE; - debug_merge_allocated = FALSE; + flaginfo.global_to_static = false; + debug_merge_allocated = false; coff_data (abfd)->link_info = info; @@ -636,7 +636,7 @@ _bfd_coff_final_link (bfd *abfd, if (! coff_debug_merge_hash_table_init (&flaginfo.debug_merge)) goto error_return; - debug_merge_allocated = TRUE; + debug_merge_allocated = true; /* Compute the file positions for all the sections. */ if (! abfd->output_has_begun) @@ -653,7 +653,7 @@ _bfd_coff_final_link (bfd *abfd, max_lineno_count = 0; max_reloc_count = 0; - long_section_names = FALSE; + long_section_names = false; for (o = abfd->sections; o != NULL; o = o->next) { o->reloc_count = 0; @@ -670,7 +670,7 @@ _bfd_coff_final_link (bfd *abfd, link. This will normally be every section. We need to do this so that we can identify any sections which the linker has decided to not include. */ - sec->linker_mark = TRUE; + sec->linker_mark = true; if (info->strip == strip_none || info->strip == strip_some) @@ -714,10 +714,10 @@ _bfd_coff_final_link (bfd *abfd, coff_write_object_contents which puts the string index into the s_name field of the section header. That is why we pass hash as FALSE. */ - if (_bfd_stringtab_add (flaginfo.strtab, o->name, FALSE, FALSE) + if (_bfd_stringtab_add (flaginfo.strtab, o->name, false, false) == (bfd_size_type) -1) goto error_return; - long_section_names = TRUE; + long_section_names = true; } } @@ -804,7 +804,7 @@ _bfd_coff_final_link (bfd *abfd, { size_t sz; - sub->output_has_begun = FALSE; + sub->output_has_begun = false; sz = bfd_family_coff (sub) ? obj_raw_syment_count (sub) : 2; if (sz > max_sym_count) max_sym_count = sz; @@ -865,7 +865,7 @@ _bfd_coff_final_link (bfd *abfd, { if (! _bfd_coff_link_input_bfd (&flaginfo, sub)) goto error_return; - sub->output_has_begun = TRUE; + sub->output_has_begun = true; } } else if (p->type == bfd_section_reloc_link_order @@ -899,7 +899,7 @@ _bfd_coff_final_link (bfd *abfd, union internal_auxent iaux; bfd_size_type string_size = 0, indx; bfd_vma written = 0; - bfd_boolean rewrite = FALSE, hash; + bool rewrite = false, hash; if (! (sym->flags & BSF_LOCAL) || (sym->flags & (BSF_SECTION_SYM | BSF_DEBUGGING_RELOC @@ -912,7 +912,7 @@ _bfd_coff_final_link (bfd *abfd, /* See if we are discarding symbols with this name. */ if ((flaginfo.info->strip == strip_some && (bfd_hash_lookup (flaginfo.info->keep_hash, - bfd_asymbol_name(sym), FALSE, FALSE) + bfd_asymbol_name(sym), false, false) == NULL)) || (((flaginfo.info->discard == discard_sec_merge && (bfd_asymbol_section (sym)->flags & SEC_MERGE) @@ -935,7 +935,7 @@ _bfd_coff_final_link (bfd *abfd, && ! isym._n._n_n._n_zeroes && isym.n_numaux) { indx = _bfd_stringtab_add (flaginfo.strtab, ".file", hash, - FALSE); + false); if (indx == (bfd_size_type) -1) goto error_return; isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; @@ -951,14 +951,14 @@ _bfd_coff_final_link (bfd *abfd, { indx = _bfd_stringtab_add (flaginfo.strtab, bfd_asymbol_name (sym), hash, - FALSE); + false); if (indx == (bfd_size_type) -1) goto error_return; if (isym.n_sclass != C_FILE) { isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; bfd_coff_swap_sym_out (abfd, &isym, flaginfo.outsyms); - rewrite = TRUE; + rewrite = true; } else { @@ -982,7 +982,7 @@ _bfd_coff_final_link (bfd *abfd, flaginfo.outsyms); pos = obj_sym_filepos (abfd) + flaginfo.last_file_index * symesz; - rewrite = TRUE; + rewrite = true; } flaginfo.last_file_index = obj_raw_syment_count (abfd); flaginfo.last_file = isym; @@ -1004,7 +1004,7 @@ _bfd_coff_final_link (bfd *abfd, /* Free up the buffers used by _bfd_coff_link_input_bfd. */ coff_debug_merge_hash_table_free (&flaginfo.debug_merge); - debug_merge_allocated = FALSE; + debug_merge_allocated = false; free (flaginfo.internal_syms); flaginfo.internal_syms = NULL; @@ -1036,7 +1036,7 @@ _bfd_coff_final_link (bfd *abfd, pos = obj_sym_filepos (abfd) + flaginfo.last_file_index * symesz; if (bfd_seek (abfd, pos, SEEK_SET) != 0 || bfd_bwrite (flaginfo.outsyms, symesz, abfd) != symesz) - return FALSE; + return false; } /* If doing task linking (ld --task-link) then make a pass through the @@ -1044,7 +1044,7 @@ _bfd_coff_final_link (bfd *abfd, static. */ if (info->task_link) { - flaginfo.failed = FALSE; + flaginfo.failed = false; coff_link_hash_traverse (coff_hash_table (info), _bfd_coff_write_task_globals, &flaginfo); if (flaginfo.failed) @@ -1052,7 +1052,7 @@ _bfd_coff_final_link (bfd *abfd, } /* Write out the global symbols. */ - flaginfo.failed = FALSE; + flaginfo.failed = false; bfd_hash_traverse (&info->hash->table, _bfd_coff_write_global_sym, &flaginfo); if (flaginfo.failed) goto error_return; @@ -1141,7 +1141,7 @@ _bfd_coff_final_link (bfd *abfd, if (coff_hash_table (info)->stab_info.stabstr != NULL) { if (! _bfd_write_stab_strings (abfd, &coff_hash_table (info)->stab_info)) - return FALSE; + return false; } /* Write out the string table. */ @@ -1151,7 +1151,7 @@ _bfd_coff_final_link (bfd *abfd, pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd) * symesz; if (bfd_seek (abfd, pos, SEEK_SET) != 0) - return FALSE; + return false; #if STRING_SIZE_SIZE == 4 H_PUT_32 (abfd, @@ -1163,12 +1163,12 @@ _bfd_coff_final_link (bfd *abfd, if (bfd_bwrite (strbuf, (bfd_size_type) STRING_SIZE_SIZE, abfd) != STRING_SIZE_SIZE) - return FALSE; + return false; if (! _bfd_stringtab_emit (abfd, flaginfo.strtab)) - return FALSE; + return false; - obj_coff_strings_written (abfd) = TRUE; + obj_coff_strings_written (abfd) = true; } _bfd_stringtab_free (flaginfo.strtab); @@ -1177,7 +1177,7 @@ _bfd_coff_final_link (bfd *abfd, not try to write out the symbols. */ abfd->symcount = 0; - return TRUE; + return true; error_return: if (debug_merge_allocated) @@ -1204,7 +1204,7 @@ _bfd_coff_final_link (bfd *abfd, free (flaginfo.external_relocs); free (flaginfo.internal_relocs); free (external_relocs); - return FALSE; + return false; } /* Parse out a -heap , line. */ @@ -1364,7 +1364,7 @@ mark_relocs (struct coff_final_link_info *flaginfo, bfd *input_bfd) /* Read in the relocs. */ internal_relocs = _bfd_coff_read_internal_relocs - (input_bfd, a, FALSE, + (input_bfd, a, false, flaginfo->external_relocs, bfd_link_relocatable (flaginfo->info), (bfd_link_relocatable (flaginfo->info) @@ -1391,18 +1391,18 @@ mark_relocs (struct coff_final_link_info *flaginfo, bfd *input_bfd) /* Link an input file into the linker output file. This function handles all the sections and relocations of the input file at once. */ -bfd_boolean +bool _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) { unsigned int n_tmask = coff_data (input_bfd)->local_n_tmask; unsigned int n_btshft = coff_data (input_bfd)->local_n_btshft; - bfd_boolean (*adjust_symndx) + bool (*adjust_symndx) (bfd *, struct bfd_link_info *, bfd *, asection *, - struct internal_reloc *, bfd_boolean *); + struct internal_reloc *, bool *); bfd *output_bfd; const char *strings; bfd_size_type syment_base; - bfd_boolean copy, hash; + bool copy, hash; bfd_size_type isymesz; bfd_size_type osymesz; bfd_size_type linesz; @@ -1426,15 +1426,15 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) linesz = bfd_coff_linesz (input_bfd); BFD_ASSERT (linesz == bfd_coff_linesz (output_bfd)); - copy = FALSE; + copy = false; if (! flaginfo->info->keep_memory) - copy = TRUE; - hash = TRUE; + copy = true; + hash = true; if (flaginfo->info->traditional_format) - hash = FALSE; + hash = false; if (! _bfd_coff_get_external_symbols (input_bfd)) - return FALSE; + return false; esym = (bfd_byte *) obj_coff_external_syms (input_bfd); esym_end = esym + obj_raw_syment_count (input_bfd) * isymesz; @@ -1446,7 +1446,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) if (coff_data (output_bfd)->pe && ! process_embedded_commands (output_bfd, flaginfo->info, input_bfd)) - return FALSE; + return false; /* If we are going to perform relocations and also strip/discard some symbols then we must make sure that we do not strip/discard those @@ -1465,9 +1465,9 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) { struct internal_syment isym; enum coff_symbol_classification classification; - bfd_boolean skip; - bfd_boolean global; - bfd_boolean dont_skip_symbol; + bool skip; + bool global; + bool dont_skip_symbol; int add; bfd_coff_swap_sym_in (input_bfd, esym, isymp); @@ -1503,17 +1503,17 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) && bfd_link_relocatable (flaginfo->info)) dont_skip_symbol = *indexp; else - dont_skip_symbol = FALSE; + dont_skip_symbol = false; *indexp = -1; - skip = FALSE; - global = FALSE; + skip = false; + global = false; add = 1 + isym.n_numaux; /* If we are stripping all symbols, we want to skip this one. */ if (flaginfo->info->strip == strip_all && ! dont_skip_symbol) - skip = TRUE; + skip = true; if (! skip) { @@ -1528,22 +1528,22 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) end of the symbol table, so skip them for now. Locally defined function symbols, however, are an exception, and are not moved to the end. */ - global = TRUE; + global = true; if (! ISFCN (isym.n_type)) - skip = TRUE; + skip = true; break; case COFF_SYMBOL_UNDEFINED: /* Undefined symbols are left for the end. */ - global = TRUE; - skip = TRUE; + global = true; + skip = true; break; case COFF_SYMBOL_LOCAL: /* This is a local symbol. Skip it if we are discarding local symbols. */ if (flaginfo->info->discard == discard_all && ! dont_skip_symbol) - skip = TRUE; + skip = true; break; } } @@ -1559,7 +1559,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) && ((*secpp)->output_section == bfd_abs_section_ptr || bfd_section_removed_from_list (output_bfd, (*secpp)->output_section))) - skip = TRUE; + skip = true; #endif /* If we stripping debugging symbols, and this is a debugging @@ -1580,7 +1580,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) || isym.n_sclass == C_REGPARM || isym.n_sclass == C_FIELD || isym.n_sclass == C_EOS)))) - skip = TRUE; + skip = true; /* If some symbols are stripped based on the name, work out the name and decide whether to skip this symbol. */ @@ -1593,16 +1593,16 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf); if (name == NULL) - return FALSE; + return false; if (! dont_skip_symbol && ((flaginfo->info->strip == strip_some - && (bfd_hash_lookup (flaginfo->info->keep_hash, name, FALSE, - FALSE) == NULL)) + && (bfd_hash_lookup (flaginfo->info->keep_hash, name, false, + false) == NULL)) || (! global && flaginfo->info->discard == discard_l && bfd_is_local_label_name (input_bfd, name)))) - skip = TRUE; + skip = true; } /* If this is an enum, struct, or union tag, see if we have @@ -1626,7 +1626,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf); if (name == NULL) - return FALSE; + return false; /* Ignore fake names invented by compiler; treat them all as the same name. */ @@ -1636,9 +1636,9 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) name = ""; mh = coff_debug_merge_hash_lookup (&flaginfo->debug_merge, name, - TRUE, TRUE); + true, true); if (mh == NULL) - return FALSE; + return false; /* Allocate memory to hold type information. If this turns out to be a duplicate, we pass this address to @@ -1646,7 +1646,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) amt = sizeof (struct coff_debug_merge_type); mt = (struct coff_debug_merge_type *) bfd_alloc (input_bfd, amt); if (mt == NULL) - return FALSE; + return false; mt->type_class = isym.n_sclass; /* Pick up the aux entry, which points to the end of the tag @@ -1674,17 +1674,17 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) *epp = (struct coff_debug_merge_element *) bfd_alloc (input_bfd, amt); if (*epp == NULL) - return FALSE; + return false; elename = _bfd_coff_internal_syment_name (input_bfd, islp, elebuf); if (elename == NULL) - return FALSE; + return false; amt = strlen (elename) + 1; name_copy = (char *) bfd_alloc (input_bfd, amt); if (name_copy == NULL) - return FALSE; + return false; strcpy (name_copy, elename); (*epp)->name = name_copy; @@ -1767,7 +1767,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) bfd_release (input_bfd, mt); *indexp = mtl->indx; add = (eslend - esym) / isymesz; - skip = TRUE; + skip = true; } } } @@ -1790,10 +1790,10 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) anyhow. */ name = _bfd_coff_internal_syment_name (input_bfd, &isym, NULL); if (name == NULL) - return FALSE; + return false; indx = _bfd_stringtab_add (flaginfo->strtab, name, hash, copy); if (indx == (bfd_size_type) -1) - return FALSE; + return false; isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; } @@ -1890,7 +1890,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) pos += flaginfo->last_file_index * osymesz; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (outsym, osymesz, output_bfd) != osymesz) - return FALSE; + return false; } } @@ -1922,7 +1922,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) /* This can happen if there were errors earlier in the link. */ bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } h->indx = output_index; } @@ -2018,7 +2018,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) { strings = _bfd_coff_read_string_table (input_bfd); if (strings == NULL) - return FALSE; + return false; } if ((bfd_size_type) auxp->x_file.x_n.x_offset >= obj_coff_strings_len (input_bfd)) filename = _(""); @@ -2027,7 +2027,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) indx = _bfd_stringtab_add (flaginfo->strtab, filename, hash, copy); if (indx == (bfd_size_type) -1) - return FALSE; + return false; auxp->x_file.x_n.x_offset = STRING_SIZE_SIZE + indx; } } @@ -2133,7 +2133,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || (bfd_bwrite (outsym, osymesz, output_bfd) != osymesz)) - return FALSE; + return false; } } @@ -2179,7 +2179,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) bfd_byte *eline; bfd_byte *elineend; bfd_byte *oeline; - bfd_boolean skipping; + bool skipping; file_ptr pos; bfd_size_type amt; @@ -2199,13 +2199,13 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) if (bfd_seek (input_bfd, o->line_filepos, SEEK_SET) != 0 || bfd_bread (flaginfo->linenos, linesz * o->lineno_count, input_bfd) != linesz * o->lineno_count) - return FALSE; + return false; offset = o->output_section->vma + o->output_offset - o->vma; eline = flaginfo->linenos; oeline = flaginfo->linenos; elineend = eline + linesz * o->lineno_count; - skipping = FALSE; + skipping = false; for (; eline < elineend; eline += linesz) { struct internal_lineno iline; @@ -2231,7 +2231,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) with symbol #0) will fail. We can't regain the space in the output file, but at least they're dense. */ - skipping = TRUE; + skipping = true; } else { @@ -2270,7 +2270,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) is.n_numaux, auxptr); } - skipping = FALSE; + skipping = false; } iline.l_addr.l_symndx = indx; @@ -2288,7 +2288,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) amt = oeline - flaginfo->linenos; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flaginfo->linenos, amt, output_bfd) != amt) - return FALSE; + return false; o->output_section->lineno_count += amt / linesz; } @@ -2318,7 +2318,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) amt = outsym - flaginfo->outsyms; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flaginfo->outsyms, amt, output_bfd) != amt) - return FALSE; + return false; BFD_ASSERT ((obj_raw_syment_count (output_bfd) + (outsym - flaginfo->outsyms) / osymesz) @@ -2352,7 +2352,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) (_("%pB: relocs in section `%pA', but it has no contents"), input_bfd, o); bfd_set_error (bfd_error_no_contents); - return FALSE; + return false; } continue; @@ -2365,7 +2365,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) { contents = flaginfo->contents; if (! bfd_get_full_section_contents (input_bfd, o, &contents)) - return FALSE; + return false; } if ((o->flags & SEC_RELOC) != 0) @@ -2377,7 +2377,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) /* Read in the relocs. */ target_index = o->output_section->target_index; internal_relocs = (_bfd_coff_read_internal_relocs - (input_bfd, o, FALSE, flaginfo->external_relocs, + (input_bfd, o, false, flaginfo->external_relocs, bfd_link_relocatable (flaginfo->info), (bfd_link_relocatable (flaginfo->info) ? (flaginfo->section_info[target_index].relocs @@ -2385,7 +2385,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) : flaginfo->internal_relocs))); if (internal_relocs == NULL && o->reloc_count > 0) - return FALSE; + return false; /* Run through the relocs looking for relocs against symbols coming from discarded sections and complain about them. */ @@ -2425,7 +2425,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) internal_relocs, flaginfo->internal_syms, flaginfo->sec_ptrs)) - return FALSE; + return false; if (bfd_link_relocatable (flaginfo->info)) { @@ -2441,7 +2441,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) for (; irel < irelend; irel++, rel_hash++) { struct coff_link_hash_entry *h; - bfd_boolean adjusted; + bool adjusted; *rel_hash = NULL; @@ -2456,7 +2456,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) if (! (*adjust_symndx) (output_bfd, flaginfo->info, input_bfd, o, irel, &adjusted)) - return FALSE; + return false; if (adjusted) continue; } @@ -2501,7 +2501,7 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) name = (_bfd_coff_internal_syment_name (input_bfd, is, buf)); if (name == NULL) - return FALSE; + return false; (*flaginfo->info->callbacks->unattached_reloc) (flaginfo->info, name, input_bfd, o, irel->r_vaddr); @@ -2520,27 +2520,27 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *flaginfo, bfd *input_bfd) * bfd_octets_per_byte (output_bfd, o)); if (! bfd_set_section_contents (output_bfd, o->output_section, contents, loc, o->size)) - return FALSE; + return false; } else { if (! (_bfd_write_section_stabs (output_bfd, &coff_hash_table (flaginfo->info)->stab_info, o, &secdata->stab_info, contents))) - return FALSE; + return false; } } if (! flaginfo->info->keep_memory && ! _bfd_coff_free_symbols (input_bfd)) - return FALSE; + return false; - return TRUE; + return true; } /* Write out a global symbol. Called via bfd_hash_traverse. */ -bfd_boolean +bool _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) { struct coff_link_hash_entry *h = (struct coff_link_hash_entry *) bh; @@ -2557,19 +2557,19 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) { h = (struct coff_link_hash_entry *) h->root.u.i.link; if (h->root.type == bfd_link_hash_new) - return TRUE; + return true; } if (h->indx >= 0) - return TRUE; + return true; if (h->indx != -2 && (flaginfo->info->strip == strip_all || (flaginfo->info->strip == strip_some && (bfd_hash_lookup (flaginfo->info->keep_hash, - h->root.root.string, FALSE, FALSE) + h->root.root.string, false, false) == NULL)))) - return TRUE; + return true; switch (h->root.type) { @@ -2577,11 +2577,11 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) case bfd_link_hash_new: case bfd_link_hash_warning: abort (); - return FALSE; + return false; case bfd_link_hash_undefined: if (h->indx == -3) - return TRUE; + return true; /* Fall through. */ case bfd_link_hash_undefweak: isym.n_scnum = N_UNDEF; @@ -2610,7 +2610,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) (_("%pB: stripping non-representable symbol '%s' (value " "%" BFD_VMA_FMT "x)"), output_bfd, h->root.root.string, isym.n_value); - return TRUE; + return true; } #endif } @@ -2623,25 +2623,25 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) case bfd_link_hash_indirect: /* Just ignore these. They can't be handled anyhow. */ - return TRUE; + return true; } if (strlen (h->root.root.string) <= SYMNMLEN) strncpy (isym._n._n_name, h->root.root.string, SYMNMLEN); else { - bfd_boolean hash; + bool hash; bfd_size_type indx; - hash = TRUE; + hash = true; if (flaginfo->info->traditional_format) - hash = FALSE; + hash = false; indx = _bfd_stringtab_add (flaginfo->strtab, h->root.root.string, hash, - FALSE); + false); if (indx == (bfd_size_type) -1) { - flaginfo->failed = TRUE; - return FALSE; + flaginfo->failed = true; + return false; } isym._n._n_n._n_zeroes = 0; isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; @@ -2660,7 +2660,7 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) if (flaginfo->global_to_static) { if (! IS_EXTERNAL (output_bfd, isym)) - return TRUE; + return true; isym.n_sclass = C_STAT; } @@ -2684,8 +2684,8 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz) { - flaginfo->failed = TRUE; - return FALSE; + flaginfo->failed = true; + return false; } h->indx = obj_raw_syment_count (output_bfd); @@ -2749,25 +2749,25 @@ _bfd_coff_write_global_sym (struct bfd_hash_entry *bh, void *data) flaginfo->outsyms); if (bfd_bwrite (flaginfo->outsyms, symesz, output_bfd) != symesz) { - flaginfo->failed = TRUE; - return FALSE; + flaginfo->failed = true; + return false; } ++obj_raw_syment_count (output_bfd); } - return TRUE; + return true; } /* Write out task global symbols, converting them to statics. Called via coff_link_hash_traverse. Calls bfd_coff_write_global_sym to do the dirty work, if the symbol we are processing needs conversion. */ -bfd_boolean +bool _bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data) { struct coff_final_link_info *flaginfo = (struct coff_final_link_info *) data; - bfd_boolean rtnval = TRUE; - bfd_boolean save_global_to_static; + bool rtnval = true; + bool save_global_to_static; if (h->root.type == bfd_link_hash_warning) h = (struct coff_link_hash_entry *) h->root.u.i.link; @@ -2779,7 +2779,7 @@ _bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data) case bfd_link_hash_defined: case bfd_link_hash_defweak: save_global_to_static = flaginfo->global_to_static; - flaginfo->global_to_static = TRUE; + flaginfo->global_to_static = true; rtnval = _bfd_coff_write_global_sym (&h->root.root, data); flaginfo->global_to_static = save_global_to_static; break; @@ -2792,7 +2792,7 @@ _bfd_coff_write_task_globals (struct coff_link_hash_entry *h, void *data) /* Handle a link order which is supposed to generate a reloc. */ -bfd_boolean +bool _bfd_coff_reloc_link_order (bfd *output_bfd, struct coff_final_link_info *flaginfo, asection *output_section, @@ -2806,7 +2806,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, if (howto == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (link_order->u.reloc.p->addend != 0) @@ -2814,13 +2814,13 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, bfd_size_type size; bfd_byte *buf; bfd_reloc_status_type rstat; - bfd_boolean ok; + bool ok; file_ptr loc; size = bfd_get_reloc_size (howto); buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL && size != 0) - return FALSE; + return false; rstat = _bfd_relocate_contents (howto, output_bfd, (bfd_vma) link_order->u.reloc.p->addend, @@ -2848,7 +2848,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, loc, size); free (buf); if (! ok) - return FALSE; + return false; } /* Store the reloc information in the right place. It will get @@ -2880,7 +2880,7 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, h = ((struct coff_link_hash_entry *) bfd_wrapped_link_hash_lookup (output_bfd, flaginfo->info, link_order->u.reloc.p->u.name, - FALSE, FALSE, TRUE)); + false, false, true)); if (h != NULL) { if (h->indx >= 0) @@ -2912,13 +2912,13 @@ _bfd_coff_reloc_link_order (bfd *output_bfd, /* FIXME: What is the right value for r_offset? Is zero OK? */ ++output_section->reloc_count; - return TRUE; + return true; } /* A basic reloc handling routine which may be used by processors with simple relocs. */ -bfd_boolean +bool _bfd_coff_generic_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *input_bfd, @@ -2957,7 +2957,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, _bfd_error_handler /* xgettext: c-format */ (_("%pB: illegal symbol index %ld in relocs"), input_bfd, symndx); - return FALSE; + return false; } else { @@ -2977,7 +2977,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h, sym, &addend); if (howto == NULL) - return FALSE; + return false; /* If we are doing a relocatable link, then we can just ignore a PC relative reloc that is pcrel_offset. It will already @@ -3067,7 +3067,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, { (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - rel->r_vaddr - input_section->vma, TRUE); + rel->r_vaddr - input_section->vma, true); /* Stop the linker from issueing errors about truncated relocs referencing this undefined symbol by giving it an address that should be in range. */ @@ -3105,7 +3105,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, != sizeof (bfd_vma)) { bfd_set_error (bfd_error_system_call); - return FALSE; + return false; } } } @@ -3126,7 +3126,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, /* xgettext: c-format */ (_("%pB: bad reloc address %#" PRIx64 " in section `%pA'"), input_bfd, (uint64_t) rel->r_vaddr, input_section); - return FALSE; + return false; case bfd_reloc_overflow: { const char *name; @@ -3140,7 +3140,7 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, { name = _bfd_coff_internal_syment_name (input_bfd, sym, buf); if (name == NULL) - return FALSE; + return false; } (*info->callbacks->reloc_overflow) @@ -3150,5 +3150,5 @@ _bfd_coff_generic_relocate_section (bfd *output_bfd, } } } - return TRUE; + return true; } diff --git a/bfd/compress.c b/bfd/compress.c index 054ea08bb1..6d98aec2d4 100644 --- a/bfd/compress.c +++ b/bfd/compress.c @@ -26,7 +26,7 @@ #define MAX_COMPRESSION_HEADER_SIZE 24 -static bfd_boolean +static bool decompress_contents (bfd_byte *compressed_buffer, bfd_size_type compressed_size, bfd_byte *uncompressed_buffer, @@ -79,13 +79,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec, uLong compressed_size; bfd_byte *buffer; bfd_size_type buffer_size; - bfd_boolean decompress; + bool decompress; int zlib_size = 0; int orig_compression_header_size; bfd_size_type orig_uncompressed_size; unsigned int orig_uncompressed_alignment_pow; int header_size = bfd_get_compression_header_size (abfd, NULL); - bfd_boolean compressed + bool compressed = bfd_is_section_compressed_with_header (abfd, sec, &orig_compression_header_size, &orig_uncompressed_size, @@ -128,12 +128,12 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec, /* Uncompress if it leads to smaller size. */ if (compressed && compressed_size > orig_uncompressed_size) { - decompress = TRUE; + decompress = true; buffer_size = orig_uncompressed_size; } else { - decompress = FALSE; + decompress = false; buffer_size = compressed_size; } buffer = (bfd_byte *) bfd_alloc (abfd, buffer_size); @@ -209,7 +209,7 @@ FUNCTION bfd_get_full_section_contents SYNOPSIS - bfd_boolean bfd_get_full_section_contents + bool bfd_get_full_section_contents (bfd *abfd, asection *section, bfd_byte **ptr); DESCRIPTION @@ -222,12 +222,12 @@ DESCRIPTION returns @code{TRUE} but @var{*ptr} is set to NULL. */ -bfd_boolean +bool bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) { bfd_size_type sz; bfd_byte *p = *ptr; - bfd_boolean ret; + bool ret; bfd_size_type save_size; bfd_size_type save_rawsize; bfd_byte *compressed_buffer; @@ -240,7 +240,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) if (sz == 0) { *ptr = NULL; - return TRUE; + return true; } switch (sec->compress_status) @@ -269,7 +269,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) /* xgettext:c-format */ (_("error: %pB(%pA) section size (%#" PRIx64 " bytes) is larger than file size (%#" PRIx64 " bytes)"), abfd, sec, (uint64_t) sz, (uint64_t) filesize); - return FALSE; + return false; } p = (bfd_byte *) bfd_malloc (sz); if (p == NULL) @@ -280,7 +280,7 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) /* xgettext:c-format */ (_("error: %pB(%pA) is too large (%#" PRIx64 " bytes)"), abfd, sec, (uint64_t) sz); - return FALSE; + return false; } } @@ -288,16 +288,16 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) { if (*ptr != p) free (p); - return FALSE; + return false; } *ptr = p; - return TRUE; + return true; case DECOMPRESS_SECTION_SIZED: /* Read in the full compressed section contents. */ compressed_buffer = (bfd_byte *) bfd_malloc (sec->compressed_size); if (compressed_buffer == NULL) - return FALSE; + return false; save_rawsize = sec->rawsize; save_size = sec->size; /* Clear rawsize, set size to compressed size and set compress_status @@ -333,27 +333,27 @@ bfd_get_full_section_contents (bfd *abfd, sec_ptr sec, bfd_byte **ptr) free (p); fail_compressed: free (compressed_buffer); - return FALSE; + return false; } free (compressed_buffer); *ptr = p; - return TRUE; + return true; case COMPRESS_SECTION_DONE: if (sec->contents == NULL) - return FALSE; + return false; if (p == NULL) { p = (bfd_byte *) bfd_malloc (sz); if (p == NULL) - return FALSE; + return false; *ptr = p; } /* PR 17512; file: 5bc29788. */ if (p != sec->contents) memcpy (p, sec->contents, sz); - return TRUE; + return true; default: abort (); @@ -387,7 +387,7 @@ FUNCTION bfd_is_section_compressed_with_header SYNOPSIS - bfd_boolean bfd_is_section_compressed_with_header + bool bfd_is_section_compressed_with_header (bfd *abfd, asection *section, int *compression_header_size_p, bfd_size_type *uncompressed_size_p, @@ -403,7 +403,7 @@ DESCRIPTION and uncompressed size is returned with 0. */ -bfd_boolean +bool bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec, int *compression_header_size_p, bfd_size_type *uncompressed_size_p, @@ -413,7 +413,7 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec, int compression_header_size; int header_size; unsigned int saved = sec->compress_status; - bfd_boolean compressed; + bool compressed; *uncompressed_align_pow_p = 0; @@ -433,10 +433,10 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec, section size, 8 bytes in big-endian order. */ compressed = startswith ((char*) header , "ZLIB"); else - compressed = TRUE; + compressed = true; } else - compressed = FALSE; + compressed = false; *uncompressed_size_p = sec->size; if (compressed) @@ -454,7 +454,7 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec, have the first byte of its (big-endian) size be non-zero. */ else if (strcmp (sec->name, ".debug_str") == 0 && ISPRINT (header[4])) - compressed = FALSE; + compressed = false; else *uncompressed_size_p = bfd_getb64 (header + 4); } @@ -470,14 +470,14 @@ FUNCTION bfd_is_section_compressed SYNOPSIS - bfd_boolean bfd_is_section_compressed + bool bfd_is_section_compressed (bfd *abfd, asection *section); DESCRIPTION Return @code{TRUE} if @var{section} is compressed. */ -bfd_boolean +bool bfd_is_section_compressed (bfd *abfd, sec_ptr sec) { int compression_header_size; @@ -496,7 +496,7 @@ FUNCTION bfd_init_section_decompress_status SYNOPSIS - bfd_boolean bfd_init_section_decompress_status + bool bfd_init_section_decompress_status (bfd *abfd, asection *section); DESCRIPTION @@ -508,7 +508,7 @@ DESCRIPTION section. Otherwise, return @code{TRUE}. */ -bfd_boolean +bool bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) { bfd_byte header[MAX_COMPRESSION_HEADER_SIZE]; @@ -529,7 +529,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) || !bfd_get_section_contents (abfd, sec, header, 0, header_size)) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (compression_header_size == 0) @@ -539,7 +539,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) if (! startswith ((char*) header, "ZLIB")) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } uncompressed_size = bfd_getb64 (header + 4); } @@ -548,7 +548,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) &uncompressed_alignment_power)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } sec->compressed_size = sec->size; @@ -556,7 +556,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec) bfd_set_section_alignment (sec, uncompressed_alignment_power); sec->compress_status = DECOMPRESS_SECTION_SIZED; - return TRUE; + return true; } /* @@ -564,7 +564,7 @@ FUNCTION bfd_init_section_compress_status SYNOPSIS - bfd_boolean bfd_init_section_compress_status + bool bfd_init_section_compress_status (bfd *abfd, asection *section); DESCRIPTION @@ -575,7 +575,7 @@ DESCRIPTION section. Otherwise, return @code{TRUE}. */ -bfd_boolean +bool bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) { bfd_size_type uncompressed_size; @@ -589,7 +589,7 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) || sec->compress_status != COMPRESS_SECTION_NONE) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* Read in the full section contents and compress it. */ @@ -597,11 +597,11 @@ bfd_init_section_compress_status (bfd *abfd, sec_ptr sec) uncompressed_buffer = (bfd_byte *) bfd_malloc (uncompressed_size); /* PR 21431 */ if (uncompressed_buffer == NULL) - return FALSE; + return false; if (!bfd_get_section_contents (abfd, sec, uncompressed_buffer, 0, uncompressed_size)) - return FALSE; + return false; uncompressed_size = bfd_compress_section_contents (abfd, sec, uncompressed_buffer, @@ -614,7 +614,7 @@ FUNCTION bfd_compress_section SYNOPSIS - bfd_boolean bfd_compress_section + bool bfd_compress_section (bfd *abfd, asection *section, bfd_byte *uncompressed_buffer); DESCRIPTION @@ -625,7 +625,7 @@ DESCRIPTION @code{TRUE}. */ -bfd_boolean +bool bfd_compress_section (bfd *abfd, sec_ptr sec, bfd_byte *uncompressed_buffer) { bfd_size_type uncompressed_size = sec->size; @@ -639,7 +639,7 @@ bfd_compress_section (bfd *abfd, sec_ptr sec, bfd_byte *uncompressed_buffer) || sec->compress_status != COMPRESS_SECTION_NONE) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* Compress it. */ diff --git a/bfd/corefile.c b/bfd/corefile.c index 86dd2da01d..6935940ea8 100644 --- a/bfd/corefile.c +++ b/bfd/corefile.c @@ -111,7 +111,7 @@ FUNCTION core_file_matches_executable_p SYNOPSIS - bfd_boolean core_file_matches_executable_p + bool core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); DESCRIPTION @@ -120,13 +120,13 @@ DESCRIPTION @var{exec_bfd}, <> otherwise. */ -bfd_boolean +bool core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) { if (core_bfd->format != bfd_core || exec_bfd->format != bfd_object) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } return BFD_SEND (core_bfd, _core_file_matches_executable_p, @@ -138,7 +138,7 @@ FUNCTION generic_core_file_matches_executable_p SYNOPSIS - bfd_boolean generic_core_file_matches_executable_p + bool generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); DESCRIPTION @@ -154,7 +154,7 @@ DESCRIPTION where we really don't know whether they match or not. */ -bfd_boolean +bool generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) { const char *exec; @@ -162,7 +162,7 @@ generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) const char *last_slash; if (exec_bfd == NULL || core_bfd == NULL) - return TRUE; + return true; /* The cast below is to avoid a compiler warning due to the assignment of the const char * returned by bfd_core_file_failing_command to a @@ -171,11 +171,11 @@ generic_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) core = bfd_core_file_failing_command (core_bfd); if (core == NULL) - return TRUE; + return true; exec = bfd_get_filename (exec_bfd); if (exec == NULL) - return TRUE; + return true; last_slash = strrchr (core, '/'); if (last_slash != NULL) diff --git a/bfd/cpu-aarch64.c b/bfd/cpu-aarch64.c index 869fac2173..d9d6c1b2f8 100644 --- a/bfd/cpu-aarch64.c +++ b/bfd/cpu-aarch64.c @@ -76,14 +76,14 @@ processors[] = { bfd_mach_aarch64, "cortex-a77" } }; -static bfd_boolean +static bool scan (const struct bfd_arch_info *info, const char *string) { int i; /* First test for an exact match. */ if (strcasecmp (string, info->printable_name) == 0) - return TRUE; + return true; /* Next check for a processor name instead of an Architecture name. */ for (i = sizeof (processors) / sizeof (processors[0]); i--;) @@ -93,13 +93,13 @@ scan (const struct bfd_arch_info *info, const char *string) } if (i != -1 && info->mach == processors[i].mach) - return TRUE; + return true; /* Finally check for the default architecture. */ if (strcasecmp (string, "aarch64") == 0) return info->the_default; - return FALSE; + return false; } #define N(NUMBER, PRINT, WORDSIZE, DEFAULT, NEXT) \ @@ -108,26 +108,26 @@ scan (const struct bfd_arch_info *info, const char *string) bfd_arch_default_fill, NEXT, 0 } static const bfd_arch_info_type bfd_aarch64_arch_v8_r = - N (bfd_mach_aarch64_8R, "aarch64:armv8-r", 64, FALSE, NULL); + N (bfd_mach_aarch64_8R, "aarch64:armv8-r", 64, false, NULL); static const bfd_arch_info_type bfd_aarch64_arch_ilp32 = - N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, FALSE, + N (bfd_mach_aarch64_ilp32, "aarch64:ilp32", 32, false, &bfd_aarch64_arch_v8_r); const bfd_arch_info_type bfd_aarch64_arch = - N (0, "aarch64", 64, TRUE, &bfd_aarch64_arch_ilp32); + N (0, "aarch64", 64, true, &bfd_aarch64_arch_ilp32); -bfd_boolean +bool bfd_is_aarch64_special_symbol_name (const char *name, int type) { if (!name || name[0] != '$') - return FALSE; + return false; if (name[1] == 'x' || name[1] == 'd') type &= BFD_AARCH64_SPECIAL_SYM_TYPE_MAP; else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p') type &= BFD_AARCH64_SPECIAL_SYM_TYPE_TAG; else - return FALSE; + return false; return (type != 0 && (name[2] == 0 || name[2] == '.')); } diff --git a/bfd/cpu-aarch64.h b/bfd/cpu-aarch64.h index 17d9eca345..136228c673 100644 --- a/bfd/cpu-aarch64.h +++ b/bfd/cpu-aarch64.h @@ -21,5 +21,5 @@ #define BFD_AARCH64_SPECIAL_SYM_TYPE_TAG (1 << 1) #define BFD_AARCH64_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_AARCH64_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_aarch64_special_symbol_name +extern bool bfd_is_aarch64_special_symbol_name (const char * name, int type); diff --git a/bfd/cpu-alpha.c b/bfd/cpu-alpha.c index a883784e74..6a87a8ea47 100644 --- a/bfd/cpu-alpha.c +++ b/bfd/cpu-alpha.c @@ -45,10 +45,10 @@ /* These exist only so that we can reasonably disassemble PALcode. */ static const bfd_arch_info_type arch_info_struct[] = { - N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", FALSE, NN(1)), - N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", FALSE, NN(2)), - N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", FALSE, 0), + N (64, 64, bfd_mach_alpha_ev4, "alpha:ev4", false, NN(1)), + N (64, 64, bfd_mach_alpha_ev5, "alpha:ev5", false, NN(2)), + N (64, 64, bfd_mach_alpha_ev6, "alpha:ev6", false, 0), }; const bfd_arch_info_type bfd_alpha_arch = - N (64, 64, 0, "alpha", TRUE, NN(0)); + N (64, 64, 0, "alpha", true, NN(0)); diff --git a/bfd/cpu-arc.c b/bfd/cpu-arc.c index 8d4eb9604a..051e6c3e79 100644 --- a/bfd/cpu-arc.c +++ b/bfd/cpu-arc.c @@ -46,17 +46,17 @@ arc_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b); static const bfd_arch_info_type arch_info_struct[] = { - ARC (bfd_mach_arc_arc600, "A6" , FALSE, &arch_info_struct[1]), - ARC (bfd_mach_arc_arc601, "ARC601", FALSE, &arch_info_struct[2]), - ARC (bfd_mach_arc_arc700, "ARC700", FALSE, &arch_info_struct[3]), - ARC (bfd_mach_arc_arc700, "A7", FALSE, &arch_info_struct[4]), - ARC (bfd_mach_arc_arcv2, "ARCv2", FALSE, &arch_info_struct[5]), - ARC (bfd_mach_arc_arcv2, "EM", FALSE, &arch_info_struct[6]), - ARC (bfd_mach_arc_arcv2, "HS", FALSE, NULL), + ARC (bfd_mach_arc_arc600, "A6" , false, &arch_info_struct[1]), + ARC (bfd_mach_arc_arc601, "ARC601", false, &arch_info_struct[2]), + ARC (bfd_mach_arc_arc700, "ARC700", false, &arch_info_struct[3]), + ARC (bfd_mach_arc_arc700, "A7", false, &arch_info_struct[4]), + ARC (bfd_mach_arc_arcv2, "ARCv2", false, &arch_info_struct[5]), + ARC (bfd_mach_arc_arcv2, "EM", false, &arch_info_struct[6]), + ARC (bfd_mach_arc_arcv2, "HS", false, NULL), }; const bfd_arch_info_type bfd_arc_arch = - ARC (bfd_mach_arc_arc600, "ARC600", TRUE, &arch_info_struct[0]); + ARC (bfd_mach_arc_arc600, "ARC600", true, &arch_info_struct[0]); /* ARC-specific "compatible" function. The general rule is that if A and B are compatible, then this function should return architecture that is more diff --git a/bfd/cpu-arm.c b/bfd/cpu-arm.c index cc9683ecf9..77b5c7dc9b 100644 --- a/bfd/cpu-arm.c +++ b/bfd/cpu-arm.c @@ -198,14 +198,14 @@ processors[] = { bfd_mach_arm_unknown, "arm_any" } }; -static bfd_boolean +static bool scan (const struct bfd_arch_info *info, const char *string) { int i; /* First test for an exact match. */ if (strcasecmp (string, info->printable_name) == 0) - return TRUE; + return true; /* Next check for a processor name instead of an Architecture name. */ for (i = sizeof (processors) / sizeof (processors[0]); i--;) @@ -215,13 +215,13 @@ scan (const struct bfd_arch_info *info, const char *string) } if (i != -1 && info->mach == processors [i].mach) - return TRUE; + return true; /* Finally check for the default architecture. */ if (strcasecmp (string, "arm") == 0) return info->the_default; - return FALSE; + return false; } #define N(number, print, default, next) \ @@ -230,38 +230,38 @@ scan (const struct bfd_arch_info *info, const char *string) static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_arm_2, "armv2", FALSE, & arch_info_struct[1]), - N (bfd_mach_arm_2a, "armv2a", FALSE, & arch_info_struct[2]), - N (bfd_mach_arm_3, "armv3", FALSE, & arch_info_struct[3]), - N (bfd_mach_arm_3M, "armv3m", FALSE, & arch_info_struct[4]), - N (bfd_mach_arm_4, "armv4", FALSE, & arch_info_struct[5]), - N (bfd_mach_arm_4T, "armv4t", FALSE, & arch_info_struct[6]), - N (bfd_mach_arm_5, "armv5", FALSE, & arch_info_struct[7]), - N (bfd_mach_arm_5T, "armv5t", FALSE, & arch_info_struct[8]), - N (bfd_mach_arm_5TE, "armv5te", FALSE, & arch_info_struct[9]), - N (bfd_mach_arm_XScale, "xscale", FALSE, & arch_info_struct[10]), - N (bfd_mach_arm_ep9312, "ep9312", FALSE, & arch_info_struct[11]), - N (bfd_mach_arm_iWMMXt, "iwmmxt", FALSE, & arch_info_struct[12]), - N (bfd_mach_arm_iWMMXt2, "iwmmxt2", FALSE, & arch_info_struct[13]), - N (bfd_mach_arm_5TEJ, "armv5tej", FALSE, & arch_info_struct[14]), - N (bfd_mach_arm_6, "armv6", FALSE, & arch_info_struct[15]), - N (bfd_mach_arm_6KZ, "armv6kz", FALSE, & arch_info_struct[16]), - N (bfd_mach_arm_6T2, "armv6t2", FALSE, & arch_info_struct[17]), - N (bfd_mach_arm_6K, "armv6k", FALSE, & arch_info_struct[18]), - N (bfd_mach_arm_7, "armv7", FALSE, & arch_info_struct[19]), - N (bfd_mach_arm_6M, "armv6-m", FALSE, & arch_info_struct[20]), - N (bfd_mach_arm_6SM, "armv6s-m", FALSE, & arch_info_struct[21]), - N (bfd_mach_arm_7EM, "armv7e-m", FALSE, & arch_info_struct[22]), - N (bfd_mach_arm_8, "armv8-a", FALSE, & arch_info_struct[23]), - N (bfd_mach_arm_8R, "armv8-r", FALSE, & arch_info_struct[24]), - N (bfd_mach_arm_8M_BASE, "armv8-m.base", FALSE, & arch_info_struct[25]), - N (bfd_mach_arm_8M_MAIN, "armv8-m.main", FALSE, & arch_info_struct[26]), - N (bfd_mach_arm_8_1M_MAIN, "armv8.1-m.main", FALSE, & arch_info_struct[27]), - N (bfd_mach_arm_unknown, "arm_any", FALSE, NULL) + N (bfd_mach_arm_2, "armv2", false, & arch_info_struct[1]), + N (bfd_mach_arm_2a, "armv2a", false, & arch_info_struct[2]), + N (bfd_mach_arm_3, "armv3", false, & arch_info_struct[3]), + N (bfd_mach_arm_3M, "armv3m", false, & arch_info_struct[4]), + N (bfd_mach_arm_4, "armv4", false, & arch_info_struct[5]), + N (bfd_mach_arm_4T, "armv4t", false, & arch_info_struct[6]), + N (bfd_mach_arm_5, "armv5", false, & arch_info_struct[7]), + N (bfd_mach_arm_5T, "armv5t", false, & arch_info_struct[8]), + N (bfd_mach_arm_5TE, "armv5te", false, & arch_info_struct[9]), + N (bfd_mach_arm_XScale, "xscale", false, & arch_info_struct[10]), + N (bfd_mach_arm_ep9312, "ep9312", false, & arch_info_struct[11]), + N (bfd_mach_arm_iWMMXt, "iwmmxt", false, & arch_info_struct[12]), + N (bfd_mach_arm_iWMMXt2, "iwmmxt2", false, & arch_info_struct[13]), + N (bfd_mach_arm_5TEJ, "armv5tej", false, & arch_info_struct[14]), + N (bfd_mach_arm_6, "armv6", false, & arch_info_struct[15]), + N (bfd_mach_arm_6KZ, "armv6kz", false, & arch_info_struct[16]), + N (bfd_mach_arm_6T2, "armv6t2", false, & arch_info_struct[17]), + N (bfd_mach_arm_6K, "armv6k", false, & arch_info_struct[18]), + N (bfd_mach_arm_7, "armv7", false, & arch_info_struct[19]), + N (bfd_mach_arm_6M, "armv6-m", false, & arch_info_struct[20]), + N (bfd_mach_arm_6SM, "armv6s-m", false, & arch_info_struct[21]), + N (bfd_mach_arm_7EM, "armv7e-m", false, & arch_info_struct[22]), + N (bfd_mach_arm_8, "armv8-a", false, & arch_info_struct[23]), + N (bfd_mach_arm_8R, "armv8-r", false, & arch_info_struct[24]), + N (bfd_mach_arm_8M_BASE, "armv8-m.base", false, & arch_info_struct[25]), + N (bfd_mach_arm_8M_MAIN, "armv8-m.main", false, & arch_info_struct[26]), + N (bfd_mach_arm_8_1M_MAIN, "armv8.1-m.main", false, & arch_info_struct[27]), + N (bfd_mach_arm_unknown, "arm_any", false, NULL) }; const bfd_arch_info_type bfd_arm_arch = - N (0, "arm", TRUE, & arch_info_struct[0]); + N (0, "arm", true, & arch_info_struct[0]); /* Support functions used by both the COFF and ELF versions of the ARM port. */ @@ -270,7 +270,7 @@ const bfd_arch_info_type bfd_arm_arch = different possible ARM architecture variants. Returns TRUE if they were merged successfully or FALSE otherwise. */ -bfd_boolean +bool bfd_arm_merge_machines (bfd *ibfd, bfd *obfd) { unsigned int in = bfd_get_mach (ibfd); @@ -308,7 +308,7 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd) "whereas %pB is compiled for XScale"), ibfd, obfd); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } else if (out == bfd_mach_arm_ep9312 && (in == bfd_mach_arm_XScale @@ -320,14 +320,14 @@ bfd_arm_merge_machines (bfd *ibfd, bfd *obfd) "whereas %pB is compiled for XScale"), obfd, ibfd); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } else if (in > out) bfd_set_arch_mach (obfd, bfd_arch_arm, in); /* else Nothing to do. */ - return TRUE; + return true; } typedef struct @@ -338,7 +338,7 @@ typedef struct char name[1]; /* Start of the name+desc data. */ } arm_Note; -static bfd_boolean +static bool arm_check_note (bfd *abfd, bfd_byte *buffer, bfd_size_type buffer_size, @@ -351,7 +351,7 @@ arm_check_note (bfd *abfd, char * descr; if (buffer_size < offsetof (arm_Note, name)) - return FALSE; + return false; /* We have to extract the values this way to allow for a host whose endian-ness is different from the target. */ @@ -362,20 +362,20 @@ arm_check_note (bfd *abfd, /* Check for buffer overflow. */ if (namesz + descsz + offsetof (arm_Note, name) > buffer_size) - return FALSE; + return false; if (expected_name == NULL) { if (namesz != 0) - return FALSE; + return false; } else { if (namesz != ((strlen (expected_name) + 1 + 3) & ~3)) - return FALSE; + return false; if (strcmp (descr, expected_name) != 0) - return FALSE; + return false; descr += (namesz + 3) & ~3; } @@ -386,12 +386,12 @@ arm_check_note (bfd *abfd, if (description_return != NULL) * description_return = descr; - return TRUE; + return true; } #define NOTE_ARCH_STRING "arch: " -bfd_boolean +bool bfd_arm_update_notes (bfd *abfd, const char *note_section) { asection * arm_arch_section; @@ -406,11 +406,11 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section) arm_arch_section = bfd_get_section_by_name (abfd, note_section); if (arm_arch_section == NULL) - return TRUE; + return true; buffer_size = arm_arch_section->size; if (buffer_size == 0) - return FALSE; + return false; if (!bfd_malloc_and_get_section (abfd, arm_arch_section, &buffer)) goto FAIL; @@ -459,11 +459,11 @@ bfd_arm_update_notes (bfd *abfd, const char *note_section) } free (buffer); - return TRUE; + return true; FAIL: free (buffer); - return FALSE; + return false; } @@ -535,14 +535,14 @@ bfd_arm_get_mach_from_notes (bfd *abfd, const char *note_section) return bfd_mach_arm_unknown; } -bfd_boolean +bool bfd_is_arm_special_symbol_name (const char * name, int type) { /* The ARM compiler outputs several obsolete forms. Recognize them in addition to the standard $a, $t and $d. We are somewhat loose in what we accept here, since the full set is not documented. */ if (!name || name[0] != '$') - return FALSE; + return false; if (name[1] == 'a' || name[1] == 't' || name[1] == 'd') type &= BFD_ARM_SPECIAL_SYM_TYPE_MAP; else if (name[1] == 'm' || name[1] == 'f' || name[1] == 'p') @@ -550,7 +550,7 @@ bfd_is_arm_special_symbol_name (const char * name, int type) else if (name[1] >= 'a' && name[1] <= 'z') type &= BFD_ARM_SPECIAL_SYM_TYPE_OTHER; else - return FALSE; + return false; return (type != 0 && (name[2] == 0 || name[2] == '.')); } diff --git a/bfd/cpu-arm.h b/bfd/cpu-arm.h index e1b6ccaf94..e8c47141c3 100644 --- a/bfd/cpu-arm.h +++ b/bfd/cpu-arm.h @@ -19,10 +19,10 @@ MA 02110-1301, USA. */ /* ARM Note section processing. */ -extern bfd_boolean bfd_arm_merge_machines +extern bool bfd_arm_merge_machines (bfd *, bfd *); -extern bfd_boolean bfd_arm_update_notes +extern bool bfd_arm_update_notes (bfd *, const char *); extern unsigned int bfd_arm_get_mach_from_notes @@ -34,6 +34,6 @@ extern unsigned int bfd_arm_get_mach_from_notes #define BFD_ARM_SPECIAL_SYM_TYPE_OTHER (1 << 2) #define BFD_ARM_SPECIAL_SYM_TYPE_ANY (~0) -extern bfd_boolean bfd_is_arm_special_symbol_name +extern bool bfd_is_arm_special_symbol_name (const char *, int); diff --git a/bfd/cpu-avr.c b/bfd/cpu-avr.c index b894f9b75e..9ca3d0997d 100644 --- a/bfd/cpu-avr.c +++ b/bfd/cpu-avr.c @@ -101,64 +101,64 @@ compatible (const bfd_arch_info_type * a, static const bfd_arch_info_type arch_info_struct[] = { /* Assembler only. */ - N (16, bfd_mach_avr1, "avr:1", FALSE, & arch_info_struct[1]), + N (16, bfd_mach_avr1, "avr:1", false, & arch_info_struct[1]), /* Classic, <= 8K. */ - N (16, bfd_mach_avr2, "avr:2", FALSE, & arch_info_struct[2]), + N (16, bfd_mach_avr2, "avr:2", false, & arch_info_struct[2]), /* Classic + MOVW, <= 8K. */ - N (16, bfd_mach_avr25, "avr:25", FALSE, & arch_info_struct[3]), + N (16, bfd_mach_avr25, "avr:25", false, & arch_info_struct[3]), /* Classic, > 8K, <= 64K. */ /* TODO: addr_bits should be 16, but set to 22 for some following version of GCC (from 4.3) for backward compatibility. */ - N (22, bfd_mach_avr3, "avr:3", FALSE, & arch_info_struct[4]), + N (22, bfd_mach_avr3, "avr:3", false, & arch_info_struct[4]), /* Classic, == 128K. */ - N (22, bfd_mach_avr31, "avr:31", FALSE, & arch_info_struct[5]), + N (22, bfd_mach_avr31, "avr:31", false, & arch_info_struct[5]), /* Classic + MOVW + JMP/CALL, > 8K, <= 64K. */ - N (16, bfd_mach_avr35, "avr:35", FALSE, & arch_info_struct[6]), + N (16, bfd_mach_avr35, "avr:35", false, & arch_info_struct[6]), /* Enhanced, <= 8K. */ - N (16, bfd_mach_avr4, "avr:4", FALSE, & arch_info_struct[7]), + N (16, bfd_mach_avr4, "avr:4", false, & arch_info_struct[7]), /* Enhanced, > 8K, <= 64K. */ /* TODO: addr_bits should be 16, but set to 22 for some following version of GCC (from 4.3) for backward compatibility. */ - N (22, bfd_mach_avr5, "avr:5", FALSE, & arch_info_struct[8]), + N (22, bfd_mach_avr5, "avr:5", false, & arch_info_struct[8]), /* Enhanced, == 128K. */ - N (22, bfd_mach_avr51, "avr:51", FALSE, & arch_info_struct[9]), + N (22, bfd_mach_avr51, "avr:51", false, & arch_info_struct[9]), /* 3-Byte PC. */ - N (22, bfd_mach_avr6, "avr:6", FALSE, & arch_info_struct[10]), + N (22, bfd_mach_avr6, "avr:6", false, & arch_info_struct[10]), /* Tiny core (AVR Tiny). */ - N (16, bfd_mach_avrtiny, "avr:100", FALSE, & arch_info_struct[11]), + N (16, bfd_mach_avrtiny, "avr:100", false, & arch_info_struct[11]), /* Xmega 1. */ - N (24, bfd_mach_avrxmega1, "avr:101", FALSE, & arch_info_struct[12]), + N (24, bfd_mach_avrxmega1, "avr:101", false, & arch_info_struct[12]), /* Xmega 2. */ - N (24, bfd_mach_avrxmega2, "avr:102", FALSE, & arch_info_struct[13]), + N (24, bfd_mach_avrxmega2, "avr:102", false, & arch_info_struct[13]), /* Xmega 3. */ - N (24, bfd_mach_avrxmega3, "avr:103", FALSE, & arch_info_struct[14]), + N (24, bfd_mach_avrxmega3, "avr:103", false, & arch_info_struct[14]), /* Xmega 4. */ - N (24, bfd_mach_avrxmega4, "avr:104", FALSE, & arch_info_struct[15]), + N (24, bfd_mach_avrxmega4, "avr:104", false, & arch_info_struct[15]), /* Xmega 5. */ - N (24, bfd_mach_avrxmega5, "avr:105", FALSE, & arch_info_struct[16]), + N (24, bfd_mach_avrxmega5, "avr:105", false, & arch_info_struct[16]), /* Xmega 6. */ - N (24, bfd_mach_avrxmega6, "avr:106", FALSE, & arch_info_struct[17]), + N (24, bfd_mach_avrxmega6, "avr:106", false, & arch_info_struct[17]), /* Xmega 7. */ - N (24, bfd_mach_avrxmega7, "avr:107", FALSE, NULL) + N (24, bfd_mach_avrxmega7, "avr:107", false, NULL) }; const bfd_arch_info_type bfd_avr_arch = - N (16, bfd_mach_avr2, "avr", TRUE, & arch_info_struct[0]); + N (16, bfd_mach_avr2, "avr", true, & arch_info_struct[0]); diff --git a/bfd/cpu-bfin.c b/bfd/cpu-bfin.c index 5eb6f08172..bf62d50f4d 100644 --- a/bfd/cpu-bfin.c +++ b/bfd/cpu-bfin.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_bfin_arch = "bfin", /* Arch name. */ "bfin", /* Arch printable name. */ 4, /* Section align power. */ - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-bpf.c b/bfd/cpu-bpf.c index 36c5965304..0b8dd99196 100644 --- a/bfd/cpu-bpf.c +++ b/bfd/cpu-bpf.c @@ -34,7 +34,7 @@ static const bfd_arch_info_type bfd_xbpf_arch = "bpf", /* Architecture name. */ "xbpf", /* Machine name. */ 3, /* Section align power. */ - FALSE, /* The default ? */ + false, /* The default ? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ @@ -53,7 +53,7 @@ const bfd_arch_info_type bfd_bpf_arch = "bpf", /* Architecture name. */ "bpf", /* Machine name. */ 3, /* Section align power. */ - TRUE, /* The default ? */ + true, /* The default ? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-cr16.c b/bfd/cpu-cr16.c index b1c8a6bd65..41d44093d6 100644 --- a/bfd/cpu-cr16.c +++ b/bfd/cpu-cr16.c @@ -25,18 +25,18 @@ const bfd_arch_info_type bfd_cr16_arch = { - 16, /* Bits in a word. */ - 32, /* Bits in an address. */ - 8, /* Bits in a byte. */ - bfd_arch_cr16, /* Architecture number. */ - bfd_mach_cr16, - "cr16", /* Arch name. */ - "cr16", /* Printable name. */ - 1, /* Section alignment power. */ - TRUE, /* The one and only. */ - bfd_default_compatible, - bfd_default_scan, - bfd_arch_default_fill, - NULL, - 0 /* Maximum offset of a reloc from the start of an insn. */ + 16, /* Bits in a word. */ + 32, /* Bits in an address. */ + 8, /* Bits in a byte. */ + bfd_arch_cr16, /* Architecture number. */ + bfd_mach_cr16, + "cr16", /* Arch name. */ + "cr16", /* Printable name. */ + 1, /* Section alignment power. */ + true, /* The one and only. */ + bfd_default_compatible, + bfd_default_scan, + bfd_arch_default_fill, + NULL, + 0 /* Maximum offset of a reloc from the start of an insn. */ }; diff --git a/bfd/cpu-cris.c b/bfd/cpu-cris.c index 06b1636c9b..9e8d863684 100644 --- a/bfd/cpu-cris.c +++ b/bfd/cpu-cris.c @@ -66,7 +66,7 @@ get_compatible (const bfd_arch_info_type *a, } #define N(NUMBER, PRINT, NEXT) \ - { 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, FALSE, \ + { 32, 32, 8, bfd_arch_cris, NUMBER, "cris", PRINT, 1, false, \ get_compatible, bfd_default_scan, bfd_arch_default_fill, NEXT, 0 } static const bfd_arch_info_type bfd_cris_arch_compat_v10_v32 = @@ -90,7 +90,7 @@ const bfd_arch_info_type bfd_cris_arch = "cris", /* The printable name is the same. */ 1, /* Section alignment power; each section is aligned to (only) 2^1 bytes. */ - TRUE, /* This is the default "machine". */ + true, /* This is the default "machine". */ get_compatible, /* A function for testing "machine" compatibility of two bfd_arch_info_type. */ diff --git a/bfd/cpu-crx.c b/bfd/cpu-crx.c index 748658c24a..c110e4ac40 100644 --- a/bfd/cpu-crx.c +++ b/bfd/cpu-crx.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_crx_arch = "crx", /* Arch name. */ "crx", /* Printable name. */ 1, /* Section alignment power. */ - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-csky.c b/bfd/cpu-csky.c index fb7a19d279..745edfe085 100644 --- a/bfd/cpu-csky.c +++ b/bfd/cpu-csky.c @@ -44,18 +44,18 @@ static const bfd_arch_info_type arch_info_struct[] = { /* ABI v1 processors. */ - N (bfd_mach_ck510, "csky:ck510", FALSE, & arch_info_struct[1]), - N (bfd_mach_ck610, "csky:ck610", FALSE, & arch_info_struct[2]), + N (bfd_mach_ck510, "csky:ck510", false, & arch_info_struct[1]), + N (bfd_mach_ck610, "csky:ck610", false, & arch_info_struct[2]), /* ABI v2 processors. */ - N (bfd_mach_ck801, "csky:ck801", FALSE, & arch_info_struct[3]), - N (bfd_mach_ck802, "csky:ck802", FALSE, & arch_info_struct[4]), - N (bfd_mach_ck803, "csky:ck803", FALSE, & arch_info_struct[5]), - N (bfd_mach_ck807, "csky:ck807", FALSE, & arch_info_struct[6]), - N (bfd_mach_ck810, "csky:ck810", FALSE, & arch_info_struct[7]), - N (bfd_mach_ck860, "csky:ck860", FALSE, & arch_info_struct[8]), - N (bfd_mach_ck_unknown, "csky:any", FALSE, NULL) + N (bfd_mach_ck801, "csky:ck801", false, & arch_info_struct[3]), + N (bfd_mach_ck802, "csky:ck802", false, & arch_info_struct[4]), + N (bfd_mach_ck803, "csky:ck803", false, & arch_info_struct[5]), + N (bfd_mach_ck807, "csky:ck807", false, & arch_info_struct[6]), + N (bfd_mach_ck810, "csky:ck810", false, & arch_info_struct[7]), + N (bfd_mach_ck860, "csky:ck860", false, & arch_info_struct[8]), + N (bfd_mach_ck_unknown, "csky:any", false, NULL) }; const bfd_arch_info_type bfd_csky_arch = - N (0, "csky", TRUE, & arch_info_struct[0]); + N (0, "csky", true, & arch_info_struct[0]); diff --git a/bfd/cpu-d10v.c b/bfd/cpu-d10v.c index f2b35571eb..112bab9f94 100644 --- a/bfd/cpu-d10v.c +++ b/bfd/cpu-d10v.c @@ -42,10 +42,10 @@ } static const bfd_arch_info_type d10v_ts3_info = - N (bfd_mach_d10v_ts3, "d10v:ts3", FALSE, NULL); + N (bfd_mach_d10v_ts3, "d10v:ts3", false, NULL); static const bfd_arch_info_type d10v_ts2_info = - N (bfd_mach_d10v_ts2, "d10v:ts2", FALSE, & d10v_ts3_info); + N (bfd_mach_d10v_ts2, "d10v:ts2", false, & d10v_ts3_info); const bfd_arch_info_type bfd_d10v_arch = - N (bfd_mach_d10v, "d10v", TRUE, & d10v_ts2_info); + N (bfd_mach_d10v, "d10v", true, & d10v_ts2_info); diff --git a/bfd/cpu-d30v.c b/bfd/cpu-d30v.c index 240062aa3a..0c801f649d 100644 --- a/bfd/cpu-d30v.c +++ b/bfd/cpu-d30v.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_d30v_arch = "d30v", "d30v", 4, /* Section alignment power. */ - TRUE, + true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-dlx.c b/bfd/cpu-dlx.c index 471387818f..4cc1562e25 100644 --- a/bfd/cpu-dlx.c +++ b/bfd/cpu-dlx.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_dlx_arch = "dlx", "dlx", 4, - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-epiphany.c b/bfd/cpu-epiphany.c index a35b7b8c52..39f878b085 100644 --- a/bfd/cpu-epiphany.c +++ b/bfd/cpu-epiphany.c @@ -42,8 +42,7 @@ } const bfd_arch_info_type bfd_epiphany16_arch = - N (bfd_mach_epiphany16, "epiphany16", 1, FALSE, NULL); + N (bfd_mach_epiphany16, "epiphany16", 1, false, NULL); const bfd_arch_info_type bfd_epiphany_arch = - N (bfd_mach_epiphany32, "epiphany32", 2, TRUE, & bfd_epiphany16_arch); - + N (bfd_mach_epiphany32, "epiphany32", 2, true, &bfd_epiphany16_arch); diff --git a/bfd/cpu-fr30.c b/bfd/cpu-fr30.c index 8444715a98..f0c57a86db 100644 --- a/bfd/cpu-fr30.c +++ b/bfd/cpu-fr30.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_fr30_arch = "fr30", /* Architecture name. */ "fr30", /* Printable name. */ 4, /* Section align power. */ - TRUE, /* The default ? */ + true, /* The default ? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-frv.c b/bfd/cpu-frv.c index 4fe53dfe45..7d98fcc6ec 100644 --- a/bfd/cpu-frv.c +++ b/bfd/cpu-frv.c @@ -41,26 +41,26 @@ } static const bfd_arch_info_type arch_info_300 - = FRV_ARCH (bfd_mach_fr300, "fr300", FALSE, (bfd_arch_info_type *)0); + = FRV_ARCH (bfd_mach_fr300, "fr300", false, (bfd_arch_info_type *)0); static const bfd_arch_info_type arch_info_400 - = FRV_ARCH (bfd_mach_fr400, "fr400", FALSE, &arch_info_300); + = FRV_ARCH (bfd_mach_fr400, "fr400", false, &arch_info_300); static const bfd_arch_info_type arch_info_450 - = FRV_ARCH (bfd_mach_fr450, "fr450", FALSE, &arch_info_400); + = FRV_ARCH (bfd_mach_fr450, "fr450", false, &arch_info_400); static const bfd_arch_info_type arch_info_500 - = FRV_ARCH (bfd_mach_fr500, "fr500", FALSE, &arch_info_450); + = FRV_ARCH (bfd_mach_fr500, "fr500", false, &arch_info_450); static const bfd_arch_info_type arch_info_550 - = FRV_ARCH (bfd_mach_fr550, "fr550", FALSE, &arch_info_500); + = FRV_ARCH (bfd_mach_fr550, "fr550", false, &arch_info_500); static const bfd_arch_info_type arch_info_simple - = FRV_ARCH (bfd_mach_frvsimple, "simple", FALSE, &arch_info_550); + = FRV_ARCH (bfd_mach_frvsimple, "simple", false, &arch_info_550); static const bfd_arch_info_type arch_info_tomcat - = FRV_ARCH (bfd_mach_frvtomcat, "tomcat", FALSE, &arch_info_simple); + = FRV_ARCH (bfd_mach_frvtomcat, "tomcat", false, &arch_info_simple); const bfd_arch_info_type bfd_frv_arch - = FRV_ARCH (bfd_mach_frv, "frv", TRUE, &arch_info_tomcat); + = FRV_ARCH (bfd_mach_frv, "frv", true, &arch_info_tomcat); diff --git a/bfd/cpu-ft32.c b/bfd/cpu-ft32.c index 8300d5f26f..f7112685e0 100644 --- a/bfd/cpu-ft32.c +++ b/bfd/cpu-ft32.c @@ -43,10 +43,10 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_ft32, "ft32", FALSE, &arch_info_struct[1]), - N (bfd_mach_ft32b, "ft32b", FALSE, NULL) + N (bfd_mach_ft32, "ft32", false, &arch_info_struct[1]), + N (bfd_mach_ft32b, "ft32b", false, NULL) }; const bfd_arch_info_type bfd_ft32_arch = - N (bfd_mach_ft32, "ft32", TRUE, arch_info_struct); + N (bfd_mach_ft32, "ft32", true, arch_info_struct); diff --git a/bfd/cpu-h8300.c b/bfd/cpu-h8300.c index 382f82ea26..61cc9882ab 100644 --- a/bfd/cpu-h8300.c +++ b/bfd/cpu-h8300.c @@ -24,28 +24,28 @@ #include "libbfd.h" #include "cpu-h8300.h" -static bfd_boolean +static bool h8300_scan (const struct bfd_arch_info *info, const char *string) { if (*string != 'h' && *string != 'H') - return FALSE; + return false; string++; if (*string != '8') - return FALSE; + return false; string++; if (*string == '/') string++; if (*string != '3') - return FALSE; + return false; string++; if (*string != '0') - return FALSE; + return false; string++; if (*string != '0') - return FALSE; + return false; string++; if (*string == '-') string++; @@ -119,25 +119,25 @@ compatible (const bfd_arch_info_type *in, const bfd_arch_info_type *out) compatible, h8300_scan, bfd_arch_default_fill, next, 0 } static const bfd_arch_info_type h8300sxn_info_struct = - N (32, 16, bfd_mach_h8300sxn, "h8300sxn", "h8300sxn", FALSE, NULL); + N (32, 16, bfd_mach_h8300sxn, "h8300sxn", "h8300sxn", false, NULL); static const bfd_arch_info_type h8300sx_info_struct = - N (32, 32, bfd_mach_h8300sx, "h8300sx", "h8300sx", FALSE, &h8300sxn_info_struct); + N (32, 32, bfd_mach_h8300sx, "h8300sx", "h8300sx", false, &h8300sxn_info_struct); static const bfd_arch_info_type h8300sn_info_struct = - N (32, 16, bfd_mach_h8300sn, "h8300sn", "h8300sn", FALSE, &h8300sx_info_struct); + N (32, 16, bfd_mach_h8300sn, "h8300sn", "h8300sn", false, &h8300sx_info_struct); static const bfd_arch_info_type h8300hn_info_struct = - N (32, 16, bfd_mach_h8300hn, "h8300hn", "h8300hn", FALSE, &h8300sn_info_struct); + N (32, 16, bfd_mach_h8300hn, "h8300hn", "h8300hn", false, &h8300sn_info_struct); static const bfd_arch_info_type h8300s_info_struct = - N (32, 32, bfd_mach_h8300s, "h8300s", "h8300s", FALSE, & h8300hn_info_struct); + N (32, 32, bfd_mach_h8300s, "h8300s", "h8300s", false, & h8300hn_info_struct); static const bfd_arch_info_type h8300h_info_struct = - N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", FALSE, &h8300s_info_struct); + N (32, 32, bfd_mach_h8300h, "h8300h", "h8300h", false, &h8300s_info_struct); const bfd_arch_info_type bfd_h8300_arch = - N (16, 16, bfd_mach_h8300, "h8300", "h8300", TRUE, &h8300h_info_struct); + N (16, 16, bfd_mach_h8300, "h8300", "h8300", true, &h8300h_info_struct); /* Pad the given address to 32 bits, converting 16-bit and 24-bit addresses into the values they would have had on a h8s target. */ diff --git a/bfd/cpu-hppa.c b/bfd/cpu-hppa.c index 98c25ed787..8e29c11004 100644 --- a/bfd/cpu-hppa.c +++ b/bfd/cpu-hppa.c @@ -42,15 +42,15 @@ static const bfd_arch_info_type bfd_hppa10_arch = - N (32, bfd_mach_hppa10, "hppa1.0", TRUE, NULL); + N (32, bfd_mach_hppa10, "hppa1.0", true, NULL); /* PA2.0 in narrow mode. */ static const bfd_arch_info_type bfd_hppa20_arch = - N (32, bfd_mach_hppa20, "hppa2.0", FALSE, &bfd_hppa10_arch); + N (32, bfd_mach_hppa20, "hppa2.0", false, &bfd_hppa10_arch); /* PA2.0 in wide mode. */ static const bfd_arch_info_type bfd_hppa20w_arch = - N (64, bfd_mach_hppa20w, "hppa2.0w", FALSE, &bfd_hppa20_arch); + N (64, bfd_mach_hppa20w, "hppa2.0w", false, &bfd_hppa20_arch); const bfd_arch_info_type bfd_hppa_arch = - N (32, bfd_mach_hppa11, "hppa1.1", FALSE, &bfd_hppa20w_arch); + N (32, bfd_mach_hppa11, "hppa1.1", false, &bfd_hppa20w_arch); diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c index 2fff499f93..dc53f9af45 100644 --- a/bfd/cpu-i386.c +++ b/bfd/cpu-i386.c @@ -23,8 +23,8 @@ #include "libbfd.h" #include "libiberty.h" -extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, - bfd_boolean); +extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bool, + bool); static const bfd_arch_info_type * bfd_i386_compatible (const bfd_arch_info_type *a, @@ -44,8 +44,8 @@ bfd_i386_compatible (const bfd_arch_info_type *a, multi byte nop instructions if LONG_NOP is TRUE. */ static void * -bfd_arch_i386_fill (bfd_size_type count, bfd_boolean code, - bfd_boolean long_nop) +bfd_arch_i386_fill (bfd_size_type count, bool code, + bool long_nop) { /* nop */ static const char nop_1[] = { 0x90 }; @@ -97,24 +97,24 @@ bfd_arch_i386_fill (bfd_size_type count, bfd_boolean code, return fill; } -/* Fill the buffer with zero or short nop instruction if CODE is TRUE. */ +/* Fill the buffer with zero or short nop instruction if CODE is true. */ void * bfd_arch_i386_short_nop_fill (bfd_size_type count, - bfd_boolean is_bigendian ATTRIBUTE_UNUSED, - bfd_boolean code) + bool is_bigendian ATTRIBUTE_UNUSED, + bool code) { - return bfd_arch_i386_fill (count, code, FALSE); + return bfd_arch_i386_fill (count, code, false); } /* Fill the buffer with zero or long nop instruction if CODE is TRUE. */ static void * bfd_arch_i386_long_nop_fill (bfd_size_type count, - bfd_boolean is_bigendian ATTRIBUTE_UNUSED, - bfd_boolean code) + bool is_bigendian ATTRIBUTE_UNUSED, + bool code) { - return bfd_arch_i386_fill (count, code, TRUE); + return bfd_arch_i386_fill (count, code, true); } #define N(BITS, MACH, NAME, PRINT, DEF, FILL, NEXT) \ @@ -137,29 +137,29 @@ bfd_arch_i386_long_nop_fill (bfd_size_type count, static const bfd_arch_info_type bfd_x64_32_arch_intel_syntax = N (64, bfd_mach_x64_32_intel_syntax, "i386:intel", "i386:x64-32:intel", - FALSE, bfd_arch_i386_long_nop_fill, NULL); + false, bfd_arch_i386_long_nop_fill, NULL); static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = N (64, bfd_mach_x86_64_intel_syntax, "i386:intel", "i386:x86-64:intel", - FALSE, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch_intel_syntax); + false, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch_intel_syntax); static const bfd_arch_info_type bfd_i386_arch_intel_syntax = N (32, bfd_mach_i386_i386_intel_syntax, "i386:intel", "i386:intel", - TRUE, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch_intel_syntax); + true, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch_intel_syntax); static const bfd_arch_info_type i8086_arch = N (32, bfd_mach_i386_i8086, "i8086", "i8086", - FALSE, bfd_arch_i386_short_nop_fill, &bfd_i386_arch_intel_syntax); + false, bfd_arch_i386_short_nop_fill, &bfd_i386_arch_intel_syntax); static const bfd_arch_info_type bfd_x64_32_arch = N (64, bfd_mach_x64_32, "i386", "i386:x64-32", - FALSE, bfd_arch_i386_long_nop_fill, &i8086_arch); + false, bfd_arch_i386_long_nop_fill, &i8086_arch); static const bfd_arch_info_type bfd_x86_64_arch = N (64, bfd_mach_x86_64, "i386", "i386:x86-64", - FALSE, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch); + false, bfd_arch_i386_long_nop_fill, &bfd_x64_32_arch); const bfd_arch_info_type bfd_i386_arch = N (32, bfd_mach_i386_i386, "i386", "i386", - TRUE, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch); + true, bfd_arch_i386_short_nop_fill, &bfd_x86_64_arch); diff --git a/bfd/cpu-ia64.c b/bfd/cpu-ia64.c index 0ce93faaab..e4e68183a6 100644 --- a/bfd/cpu-ia64.c +++ b/bfd/cpu-ia64.c @@ -42,9 +42,9 @@ } const bfd_arch_info_type bfd_ia64_elf32_arch = - N (32, bfd_mach_ia64_elf32, "ia64-elf32", FALSE, NULL); + N (32, bfd_mach_ia64_elf32, "ia64-elf32", false, NULL); const bfd_arch_info_type bfd_ia64_arch = - N (64, bfd_mach_ia64_elf64, "ia64-elf64", TRUE, &bfd_ia64_elf32_arch); + N (64, bfd_mach_ia64_elf64, "ia64-elf64", true, &bfd_ia64_elf32_arch); #include "cpu-ia64-opc.c" diff --git a/bfd/cpu-iamcu.c b/bfd/cpu-iamcu.c index 01037b1277..633bd3a571 100644 --- a/bfd/cpu-iamcu.c +++ b/bfd/cpu-iamcu.c @@ -22,11 +22,10 @@ #include "bfd.h" #include "libbfd.h" -extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, - bfd_boolean); +extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool); #define N(number, name, print, next) \ - { 32, 32, 8, bfd_arch_iamcu, number, name, print, 3, TRUE, \ + { 32, 32, 8, bfd_arch_iamcu, number, name, print, 3, true, \ bfd_default_compatible, bfd_default_scan, \ bfd_arch_i386_short_nop_fill, next, 0 } diff --git a/bfd/cpu-ip2k.c b/bfd/cpu-ip2k.c index 9ca6d8ced4..3d951d7515 100644 --- a/bfd/cpu-ip2k.c +++ b/bfd/cpu-ip2k.c @@ -41,8 +41,8 @@ } const bfd_arch_info_type bfd_ip2k_nonext_arch = - N (bfd_mach_ip2022, "ip2022", FALSE, NULL); + N (bfd_mach_ip2022, "ip2022", false, NULL); const bfd_arch_info_type bfd_ip2k_arch = - N (bfd_mach_ip2022ext, "ip2022ext", TRUE, & bfd_ip2k_nonext_arch); + N (bfd_mach_ip2022ext, "ip2022ext", true, & bfd_ip2k_nonext_arch); diff --git a/bfd/cpu-iq2000.c b/bfd/cpu-iq2000.c index 14ec2c8041..d8ea353900 100644 --- a/bfd/cpu-iq2000.c +++ b/bfd/cpu-iq2000.c @@ -41,8 +41,8 @@ } static const bfd_arch_info_type arch_info_struct = - N (bfd_mach_iq10, "iq10", FALSE, NULL); + N (bfd_mach_iq10, "iq10", false, NULL); const bfd_arch_info_type bfd_iq2000_arch = - N (bfd_mach_iq2000, "iq2000", TRUE, &arch_info_struct); + N (bfd_mach_iq2000, "iq2000", true, &arch_info_struct); diff --git a/bfd/cpu-k1om.c b/bfd/cpu-k1om.c index c593c5ecaa..acde0836f1 100644 --- a/bfd/cpu-k1om.c +++ b/bfd/cpu-k1om.c @@ -22,12 +22,11 @@ #include "bfd.h" #include "libbfd.h" -extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, - bfd_boolean); +extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool); -#define N(number, name, print, next) \ - { 64, 64, 8, bfd_arch_k1om, number, name, print, 3, TRUE, \ - bfd_default_compatible, bfd_default_scan, \ +#define N(number, name, print, next) \ + { 64, 64, 8, bfd_arch_k1om, number, name, print, 3, true, \ + bfd_default_compatible, bfd_default_scan, \ bfd_arch_i386_short_nop_fill, next, 9 } static const bfd_arch_info_type bfd_k1om_arch_intel_syntax = diff --git a/bfd/cpu-l1om.c b/bfd/cpu-l1om.c index 8ff0c04fc2..086e727a64 100644 --- a/bfd/cpu-l1om.c +++ b/bfd/cpu-l1om.c @@ -22,12 +22,11 @@ #include "bfd.h" #include "libbfd.h" -extern void * bfd_arch_i386_short_nop_fill (bfd_size_type, bfd_boolean, - bfd_boolean); +extern void *bfd_arch_i386_short_nop_fill (bfd_size_type, bool, bool); -#define N(number, name, print, next) \ - { 64, 64, 8, bfd_arch_l1om, number, name, print, 3, TRUE, \ - bfd_default_compatible, bfd_default_scan, \ +#define N(number, name, print, next) \ + { 64, 64, 8, bfd_arch_l1om, number, name, print, 3, true, \ + bfd_default_compatible, bfd_default_scan, \ bfd_arch_i386_short_nop_fill, next, 0 } static const bfd_arch_info_type bfd_l1om_arch_intel_syntax = diff --git a/bfd/cpu-lm32.c b/bfd/cpu-lm32.c index 8975346a89..2045ef9a33 100644 --- a/bfd/cpu-lm32.c +++ b/bfd/cpu-lm32.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_lm32_arch = "lm32", /* Architecture name. */ "lm32", /* Printable name. */ 4, /* Alignment. */ - TRUE, /* Is this the default machine for the target. */ + true, /* Is this the default machine for the target. */ bfd_default_compatible, /* Function callback to test if two files have compatible machines. */ bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-m10200.c b/bfd/cpu-m10200.c index 479e25af86..7b6c8e610b 100644 --- a/bfd/cpu-m10200.c +++ b/bfd/cpu-m10200.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_mn10200_arch = "mn10200", "mn10200", 2, - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-m10300.c b/bfd/cpu-m10300.c index cd4d5d5a7f..e8f0fc9d88 100644 --- a/bfd/cpu-m10300.c +++ b/bfd/cpu-m10300.c @@ -41,10 +41,10 @@ } const bfd_arch_info_type bfd_am33_2_arch = - N (bfd_mach_am33_2, "am33_2", "am33-2", FALSE, NULL); + N (bfd_mach_am33_2, "am33_2", "am33-2", false, NULL); const bfd_arch_info_type bfd_am33_arch = - N (bfd_mach_am33, "am33", "am33", FALSE, &bfd_am33_2_arch); + N (bfd_mach_am33, "am33", "am33", false, &bfd_am33_2_arch); const bfd_arch_info_type bfd_mn10300_arch = - N (bfd_mach_mn10300, "mn10300", "mn10300", TRUE, &bfd_am33_arch); + N (bfd_mach_mn10300, "mn10300", "mn10300", true, &bfd_am33_arch); diff --git a/bfd/cpu-m32c.c b/bfd/cpu-m32c.c index 0fd4067a2a..85436b822f 100644 --- a/bfd/cpu-m32c.c +++ b/bfd/cpu-m32c.c @@ -25,12 +25,12 @@ /* Like bfd_default_scan but if the string is just "m32c" then skip the m16c architecture. */ -static bfd_boolean +static bool m32c_scan (const bfd_arch_info_type * info, const char * string) { if (strcmp (string, "m32c") == 0 && info->mach == bfd_mach_m16c) - return FALSE; + return false; return bfd_default_scan (info, string); } @@ -40,8 +40,8 @@ m32c_scan (const bfd_arch_info_type * info, const char * string) bfd_default_compatible, m32c_scan, bfd_arch_default_fill, next, 0 } static const bfd_arch_info_type arch_info_struct = - N (bfd_mach_m32c, "m32c", 3, FALSE, NULL); + N (bfd_mach_m32c, "m32c", 3, false, NULL); const bfd_arch_info_type bfd_m32c_arch = - N (bfd_mach_m16c, "m16c", 4, TRUE, &arch_info_struct); + N (bfd_mach_m16c, "m16c", 4, true, &arch_info_struct); diff --git a/bfd/cpu-m32r.c b/bfd/cpu-m32r.c index 761045a2b6..6647aead71 100644 --- a/bfd/cpu-m32r.c +++ b/bfd/cpu-m32r.c @@ -31,9 +31,9 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_m32rx, "m32rx", FALSE, M32R2_NEXT) , - N (bfd_mach_m32r2, "m32r2", FALSE, NULL) + N (bfd_mach_m32rx, "m32rx", false, M32R2_NEXT) , + N (bfd_mach_m32r2, "m32r2", false, NULL) }; const bfd_arch_info_type bfd_m32r_arch = - N (bfd_mach_m32r, "m32r", TRUE, NEXT); + N (bfd_mach_m32r, "m32r", true, NEXT); diff --git a/bfd/cpu-m68hc11.c b/bfd/cpu-m68hc11.c index 04e7061837..863294d727 100644 --- a/bfd/cpu-m68hc11.c +++ b/bfd/cpu-m68hc11.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m68hc11_arch = "m68hc11", "m68hc11", 4, /* Section alignment power. */ - TRUE, + true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-m68hc12.c b/bfd/cpu-m68hc12.c index 9e27eb161d..e0d1384930 100644 --- a/bfd/cpu-m68hc12.c +++ b/bfd/cpu-m68hc12.c @@ -41,8 +41,8 @@ } const bfd_arch_info_type bfd_m68hc12s_arch = - N (bfd_mach_m6812s, "m68hc12:HCS12", FALSE, NULL); + N (bfd_mach_m6812s, "m68hc12:HCS12", false, NULL); const bfd_arch_info_type bfd_m68hc12_arch = - N (bfd_mach_m6812_default, "m68hc12", TRUE, &bfd_m68hc12s_arch); + N (bfd_mach_m6812_default, "m68hc12", true, &bfd_m68hc12s_arch); diff --git a/bfd/cpu-m68k.c b/bfd/cpu-m68k.c index a25f438fab..9c00b5b69f 100644 --- a/bfd/cpu-m68k.c +++ b/bfd/cpu-m68k.c @@ -35,79 +35,79 @@ bfd_m68k_compatible (const bfd_arch_info_type *a, static const bfd_arch_info_type arch_info_struct[] = { - N(bfd_mach_m68000, "m68k:68000", FALSE, &arch_info_struct[1]), - N(bfd_mach_m68008, "m68k:68008", FALSE, &arch_info_struct[2]), - N(bfd_mach_m68010, "m68k:68010", FALSE, &arch_info_struct[3]), - N(bfd_mach_m68020, "m68k:68020", FALSE, &arch_info_struct[4]), - N(bfd_mach_m68030, "m68k:68030", FALSE, &arch_info_struct[5]), - N(bfd_mach_m68040, "m68k:68040", FALSE, &arch_info_struct[6]), - N(bfd_mach_m68060, "m68k:68060", FALSE, &arch_info_struct[7]), - N(bfd_mach_cpu32, "m68k:cpu32", FALSE, &arch_info_struct[8]), - N(bfd_mach_fido, "m68k:fido", FALSE, &arch_info_struct[9]), + N(bfd_mach_m68000, "m68k:68000", false, &arch_info_struct[1]), + N(bfd_mach_m68008, "m68k:68008", false, &arch_info_struct[2]), + N(bfd_mach_m68010, "m68k:68010", false, &arch_info_struct[3]), + N(bfd_mach_m68020, "m68k:68020", false, &arch_info_struct[4]), + N(bfd_mach_m68030, "m68k:68030", false, &arch_info_struct[5]), + N(bfd_mach_m68040, "m68k:68040", false, &arch_info_struct[6]), + N(bfd_mach_m68060, "m68k:68060", false, &arch_info_struct[7]), + N(bfd_mach_cpu32, "m68k:cpu32", false, &arch_info_struct[8]), + N(bfd_mach_fido, "m68k:fido", false, &arch_info_struct[9]), /* Various combinations of CF architecture features */ N(bfd_mach_mcf_isa_a_nodiv, "m68k:isa-a:nodiv", - FALSE, &arch_info_struct[10]), + false, &arch_info_struct[10]), N(bfd_mach_mcf_isa_a, "m68k:isa-a", - FALSE, &arch_info_struct[11]), + false, &arch_info_struct[11]), N(bfd_mach_mcf_isa_a_mac, "m68k:isa-a:mac", - FALSE, &arch_info_struct[12]), + false, &arch_info_struct[12]), N(bfd_mach_mcf_isa_a_emac, "m68k:isa-a:emac", - FALSE, &arch_info_struct[13]), + false, &arch_info_struct[13]), N(bfd_mach_mcf_isa_aplus, "m68k:isa-aplus", - FALSE, &arch_info_struct[14]), + false, &arch_info_struct[14]), N(bfd_mach_mcf_isa_aplus_mac, "m68k:isa-aplus:mac", - FALSE, &arch_info_struct[15]), + false, &arch_info_struct[15]), N(bfd_mach_mcf_isa_aplus_emac, "m68k:isa-aplus:emac", - FALSE, &arch_info_struct[16]), + false, &arch_info_struct[16]), N(bfd_mach_mcf_isa_b_nousp, "m68k:isa-b:nousp", - FALSE, &arch_info_struct[17]), + false, &arch_info_struct[17]), N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:isa-b:nousp:mac", - FALSE, &arch_info_struct[18]), + false, &arch_info_struct[18]), N(bfd_mach_mcf_isa_b_nousp_emac, "m68k:isa-b:nousp:emac", - FALSE, &arch_info_struct[19]), + false, &arch_info_struct[19]), N(bfd_mach_mcf_isa_b, "m68k:isa-b", - FALSE, &arch_info_struct[20]), + false, &arch_info_struct[20]), N(bfd_mach_mcf_isa_b_mac, "m68k:isa-b:mac", - FALSE, &arch_info_struct[21]), + false, &arch_info_struct[21]), N(bfd_mach_mcf_isa_b_emac, "m68k:isa-b:emac", - FALSE, &arch_info_struct[22]), + false, &arch_info_struct[22]), N(bfd_mach_mcf_isa_b_float, "m68k:isa-b:float", - FALSE, &arch_info_struct[23]), + false, &arch_info_struct[23]), N(bfd_mach_mcf_isa_b_float_mac, "m68k:isa-b:float:mac", - FALSE, &arch_info_struct[24]), + false, &arch_info_struct[24]), N(bfd_mach_mcf_isa_b_float_emac, "m68k:isa-b:float:emac", - FALSE, &arch_info_struct[25]), + false, &arch_info_struct[25]), N(bfd_mach_mcf_isa_c, "m68k:isa-c", - FALSE, &arch_info_struct[26]), + false, &arch_info_struct[26]), N(bfd_mach_mcf_isa_c_mac, "m68k:isa-c:mac", - FALSE, &arch_info_struct[27]), + false, &arch_info_struct[27]), N(bfd_mach_mcf_isa_c_emac, "m68k:isa-c:emac", - FALSE, &arch_info_struct[28]), + false, &arch_info_struct[28]), N(bfd_mach_mcf_isa_c_nodiv, "m68k:isa-c:nodiv", - FALSE, &arch_info_struct[29]), + false, &arch_info_struct[29]), N(bfd_mach_mcf_isa_c_nodiv_mac, "m68k:isa-c:nodiv:mac", - FALSE, &arch_info_struct[30]), + false, &arch_info_struct[30]), N(bfd_mach_mcf_isa_c_nodiv_emac, "m68k:isa-c:nodiv:emac", - FALSE, &arch_info_struct[31]), + false, &arch_info_struct[31]), /* Legacy names for CF architectures */ - N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", FALSE, &arch_info_struct[32]), - N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", FALSE, &arch_info_struct[33]), - N(bfd_mach_mcf_isa_a_mac, "m68k:5307", FALSE, &arch_info_struct[34]), - N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", FALSE, &arch_info_struct[35]), - N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", FALSE, &arch_info_struct[36]), - N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", FALSE, &arch_info_struct[37]), - N(bfd_mach_mcf_isa_a_emac, "m68k:5249", FALSE, &arch_info_struct[38]), + N(bfd_mach_mcf_isa_a_nodiv, "m68k:5200", false, &arch_info_struct[32]), + N(bfd_mach_mcf_isa_a_mac,"m68k:5206e", false, &arch_info_struct[33]), + N(bfd_mach_mcf_isa_a_mac, "m68k:5307", false, &arch_info_struct[34]), + N(bfd_mach_mcf_isa_b_nousp_mac, "m68k:5407", false, &arch_info_struct[35]), + N(bfd_mach_mcf_isa_aplus_emac, "m68k:528x", false, &arch_info_struct[36]), + N(bfd_mach_mcf_isa_aplus_emac, "m68k:521x", false, &arch_info_struct[37]), + N(bfd_mach_mcf_isa_a_emac, "m68k:5249", false, &arch_info_struct[38]), N(bfd_mach_mcf_isa_b_float_emac, "m68k:547x", - FALSE, &arch_info_struct[39]), + false, &arch_info_struct[39]), N(bfd_mach_mcf_isa_b_float_emac, "m68k:548x", - FALSE, &arch_info_struct[40]), - N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", FALSE, 0), + false, &arch_info_struct[40]), + N(bfd_mach_mcf_isa_b_float_emac, "m68k:cfv4e", false, 0), }; const bfd_arch_info_type bfd_m68k_arch = - N(0, "m68k", TRUE, &arch_info_struct[0]); + N(0, "m68k", true, &arch_info_struct[0]); /* Table indexed by bfd_mach_arch number indicating which architectural features are supported. */ diff --git a/bfd/cpu-m9s12x.c b/bfd/cpu-m9s12x.c index 6500752013..00d396aa35 100644 --- a/bfd/cpu-m9s12x.c +++ b/bfd/cpu-m9s12x.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m9s12x_arch = "m9s12x", "m9s12x", 4, /* Section alignment power. */ - TRUE, + true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-m9s12xg.c b/bfd/cpu-m9s12xg.c index 7eecf0d32c..89182a6570 100644 --- a/bfd/cpu-m9s12xg.c +++ b/bfd/cpu-m9s12xg.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_m9s12xg_arch = "m9s12xg", "m9s12xg", 4, /* Section alignment power. */ - TRUE, + true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-mcore.c b/bfd/cpu-mcore.c index 8547d32247..b1b4a70304 100644 --- a/bfd/cpu-mcore.c +++ b/bfd/cpu-mcore.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_mcore_arch = "MCore", /* Architecture name. */ "MCore", /* Machine name. */ 3, /* Section align power. */ - TRUE, /* Is this the default architecture ? */ + true, /* Is this the default architecture ? */ bfd_default_compatible, /* Architecture comparison function. */ bfd_default_scan, /* String to architecture conversion. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-mep.c b/bfd/cpu-mep.c index b4276ebbe0..cec77e7ab3 100644 --- a/bfd/cpu-mep.c +++ b/bfd/cpu-mep.c @@ -25,6 +25,6 @@ 2, def, bfd_default_compatible, bfd_default_scan, \ bfd_arch_default_fill, y, 0 } -static const bfd_arch_info_type bfd_c5_arch = MA (bfd_mach_mep_c5, "c5", FALSE, NULL); -static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", FALSE, & bfd_c5_arch); -const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", TRUE, & bfd_h1_arch); +static const bfd_arch_info_type bfd_c5_arch = MA (bfd_mach_mep_c5, "c5", false, NULL); +static const bfd_arch_info_type bfd_h1_arch = MA (bfd_mach_mep_h1, "h1", false, & bfd_c5_arch); +const bfd_arch_info_type bfd_mep_arch = MA (bfd_mach_mep, "mep", true, & bfd_h1_arch); diff --git a/bfd/cpu-metag.c b/bfd/cpu-metag.c index c22c81da6c..e939384af8 100644 --- a/bfd/cpu-metag.c +++ b/bfd/cpu-metag.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_metag_arch = "metag", /* Architecture name. */ "metag", /* Printable name. */ 4, /* Section align power. */ - TRUE, /* The default ? */ + true, /* The default ? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-microblaze.c b/bfd/cpu-microblaze.c index ad80b88cc0..d461d01e08 100644 --- a/bfd/cpu-microblaze.c +++ b/bfd/cpu-microblaze.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_microblaze_arch = "microblaze", /* Architecture name. */ "MicroBlaze", /* Printable name. */ 3, /* Section align power. */ - TRUE, /* Is this the default architecture ? */ + true, /* Is this the default architecture ? */ bfd_default_compatible, /* Architecture comparison function. */ bfd_default_scan, /* String to architecture conversion. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-mips.c b/bfd/cpu-mips.c index 5a944ceee8..76b507e3c7 100644 --- a/bfd/cpu-mips.c +++ b/bfd/cpu-mips.c @@ -115,55 +115,55 @@ enum static const bfd_arch_info_type arch_info_struct[] = { - N (32, 32, bfd_mach_mips3000, "mips:3000", FALSE, NN(I_mips3000)), - N (32, 32, bfd_mach_mips3900, "mips:3900", FALSE, NN(I_mips3900)), - N (64, 64, bfd_mach_mips4000, "mips:4000", FALSE, NN(I_mips4000)), - N (32, 32, bfd_mach_mips4010, "mips:4010", FALSE, NN(I_mips4010)), - N (64, 64, bfd_mach_mips4100, "mips:4100", FALSE, NN(I_mips4100)), - N (64, 64, bfd_mach_mips4111, "mips:4111", FALSE, NN(I_mips4111)), - N (64, 64, bfd_mach_mips4120, "mips:4120", FALSE, NN(I_mips4120)), - N (64, 64, bfd_mach_mips4300, "mips:4300", FALSE, NN(I_mips4300)), - N (64, 64, bfd_mach_mips4400, "mips:4400", FALSE, NN(I_mips4400)), - N (64, 64, bfd_mach_mips4600, "mips:4600", FALSE, NN(I_mips4600)), - N (64, 64, bfd_mach_mips4650, "mips:4650", FALSE, NN(I_mips4650)), - N (64, 64, bfd_mach_mips5000, "mips:5000", FALSE, NN(I_mips5000)), - N (64, 64, bfd_mach_mips5400, "mips:5400", FALSE, NN(I_mips5400)), - N (64, 64, bfd_mach_mips5500, "mips:5500", FALSE, NN(I_mips5500)), - N (64, 32, bfd_mach_mips5900, "mips:5900", FALSE, NN(I_mips5900)), - N (32, 32, bfd_mach_mips6000, "mips:6000", FALSE, NN(I_mips6000)), - N (64, 64, bfd_mach_mips7000, "mips:7000", FALSE, NN(I_mips7000)), - N (64, 64, bfd_mach_mips8000, "mips:8000", FALSE, NN(I_mips8000)), - N (64, 64, bfd_mach_mips9000, "mips:9000", FALSE, NN(I_mips9000)), - N (64, 64, bfd_mach_mips10000,"mips:10000", FALSE, NN(I_mips10000)), - N (64, 64, bfd_mach_mips12000,"mips:12000", FALSE, NN(I_mips12000)), - N (64, 64, bfd_mach_mips14000,"mips:14000", FALSE, NN(I_mips14000)), - N (64, 64, bfd_mach_mips16000,"mips:16000", FALSE, NN(I_mips16000)), - N (64, 64, bfd_mach_mips16, "mips:16", FALSE, NN(I_mips16)), - N (64, 64, bfd_mach_mips5, "mips:mips5", FALSE, NN(I_mips5)), - N (32, 32, bfd_mach_mipsisa32, "mips:isa32", FALSE, NN(I_mipsisa32)), - N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", FALSE, NN(I_mipsisa32r2)), - N (32, 32, bfd_mach_mipsisa32r3,"mips:isa32r3", FALSE, NN(I_mipsisa32r3)), - N (32, 32, bfd_mach_mipsisa32r5,"mips:isa32r5", FALSE, NN(I_mipsisa32r5)), - N (32, 32, bfd_mach_mipsisa32r6,"mips:isa32r6", FALSE, NN(I_mipsisa32r6)), - N (64, 64, bfd_mach_mipsisa64, "mips:isa64", FALSE, NN(I_mipsisa64)), - N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", FALSE, NN(I_mipsisa64r2)), - N (64, 64, bfd_mach_mipsisa64r3,"mips:isa64r3", FALSE, NN(I_mipsisa64r3)), - N (64, 64, bfd_mach_mipsisa64r5,"mips:isa64r5", FALSE, NN(I_mipsisa64r5)), - N (64, 64, bfd_mach_mipsisa64r6,"mips:isa64r6", FALSE, NN(I_mipsisa64r6)), - N (64, 64, bfd_mach_mips_sb1, "mips:sb1", FALSE, NN(I_sb1)), - N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e", FALSE, NN(I_loongson_2e)), - N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f", FALSE, NN(I_loongson_2f)), - N (64, 64, bfd_mach_mips_gs464, "mips:gs464", FALSE, NN(I_gs464)), - N (64, 64, bfd_mach_mips_gs464e, "mips:gs464e", FALSE, NN(I_gs464e)), - N (64, 64, bfd_mach_mips_gs264e, "mips:gs264e", FALSE, NN(I_gs264e)), - N (64, 64, bfd_mach_mips_octeon,"mips:octeon", FALSE, NN(I_mipsocteon)), - N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+", FALSE, NN(I_mipsocteonp)), - N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", FALSE, NN(I_mipsocteon2)), - N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", FALSE, NN(I_mipsocteon3)), - N (64, 64, bfd_mach_mips_xlr, "mips:xlr", FALSE, NN(I_xlr)), - N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", FALSE, + N (32, 32, bfd_mach_mips3000, "mips:3000", false, NN(I_mips3000)), + N (32, 32, bfd_mach_mips3900, "mips:3900", false, NN(I_mips3900)), + N (64, 64, bfd_mach_mips4000, "mips:4000", false, NN(I_mips4000)), + N (32, 32, bfd_mach_mips4010, "mips:4010", false, NN(I_mips4010)), + N (64, 64, bfd_mach_mips4100, "mips:4100", false, NN(I_mips4100)), + N (64, 64, bfd_mach_mips4111, "mips:4111", false, NN(I_mips4111)), + N (64, 64, bfd_mach_mips4120, "mips:4120", false, NN(I_mips4120)), + N (64, 64, bfd_mach_mips4300, "mips:4300", false, NN(I_mips4300)), + N (64, 64, bfd_mach_mips4400, "mips:4400", false, NN(I_mips4400)), + N (64, 64, bfd_mach_mips4600, "mips:4600", false, NN(I_mips4600)), + N (64, 64, bfd_mach_mips4650, "mips:4650", false, NN(I_mips4650)), + N (64, 64, bfd_mach_mips5000, "mips:5000", false, NN(I_mips5000)), + N (64, 64, bfd_mach_mips5400, "mips:5400", false, NN(I_mips5400)), + N (64, 64, bfd_mach_mips5500, "mips:5500", false, NN(I_mips5500)), + N (64, 32, bfd_mach_mips5900, "mips:5900", false, NN(I_mips5900)), + N (32, 32, bfd_mach_mips6000, "mips:6000", false, NN(I_mips6000)), + N (64, 64, bfd_mach_mips7000, "mips:7000", false, NN(I_mips7000)), + N (64, 64, bfd_mach_mips8000, "mips:8000", false, NN(I_mips8000)), + N (64, 64, bfd_mach_mips9000, "mips:9000", false, NN(I_mips9000)), + N (64, 64, bfd_mach_mips10000,"mips:10000", false, NN(I_mips10000)), + N (64, 64, bfd_mach_mips12000,"mips:12000", false, NN(I_mips12000)), + N (64, 64, bfd_mach_mips14000,"mips:14000", false, NN(I_mips14000)), + N (64, 64, bfd_mach_mips16000,"mips:16000", false, NN(I_mips16000)), + N (64, 64, bfd_mach_mips16, "mips:16", false, NN(I_mips16)), + N (64, 64, bfd_mach_mips5, "mips:mips5", false, NN(I_mips5)), + N (32, 32, bfd_mach_mipsisa32, "mips:isa32", false, NN(I_mipsisa32)), + N (32, 32, bfd_mach_mipsisa32r2,"mips:isa32r2", false, NN(I_mipsisa32r2)), + N (32, 32, bfd_mach_mipsisa32r3,"mips:isa32r3", false, NN(I_mipsisa32r3)), + N (32, 32, bfd_mach_mipsisa32r5,"mips:isa32r5", false, NN(I_mipsisa32r5)), + N (32, 32, bfd_mach_mipsisa32r6,"mips:isa32r6", false, NN(I_mipsisa32r6)), + N (64, 64, bfd_mach_mipsisa64, "mips:isa64", false, NN(I_mipsisa64)), + N (64, 64, bfd_mach_mipsisa64r2,"mips:isa64r2", false, NN(I_mipsisa64r2)), + N (64, 64, bfd_mach_mipsisa64r3,"mips:isa64r3", false, NN(I_mipsisa64r3)), + N (64, 64, bfd_mach_mipsisa64r5,"mips:isa64r5", false, NN(I_mipsisa64r5)), + N (64, 64, bfd_mach_mipsisa64r6,"mips:isa64r6", false, NN(I_mipsisa64r6)), + N (64, 64, bfd_mach_mips_sb1, "mips:sb1", false, NN(I_sb1)), + N (64, 64, bfd_mach_mips_loongson_2e, "mips:loongson_2e", false, NN(I_loongson_2e)), + N (64, 64, bfd_mach_mips_loongson_2f, "mips:loongson_2f", false, NN(I_loongson_2f)), + N (64, 64, bfd_mach_mips_gs464, "mips:gs464", false, NN(I_gs464)), + N (64, 64, bfd_mach_mips_gs464e, "mips:gs464e", false, NN(I_gs464e)), + N (64, 64, bfd_mach_mips_gs264e, "mips:gs264e", false, NN(I_gs264e)), + N (64, 64, bfd_mach_mips_octeon,"mips:octeon", false, NN(I_mipsocteon)), + N (64, 64, bfd_mach_mips_octeonp,"mips:octeon+", false, NN(I_mipsocteonp)), + N (64, 64, bfd_mach_mips_octeon2,"mips:octeon2", false, NN(I_mipsocteon2)), + N (64, 64, bfd_mach_mips_octeon3, "mips:octeon3", false, NN(I_mipsocteon3)), + N (64, 64, bfd_mach_mips_xlr, "mips:xlr", false, NN(I_xlr)), + N (32, 32, bfd_mach_mips_interaptiv_mr2, "mips:interaptiv-mr2", false, NN(I_interaptiv_mr2)), - N (64, 64, bfd_mach_mips_micromips, "mips:micromips", FALSE, NULL) + N (64, 64, bfd_mach_mips_micromips, "mips:micromips", false, NULL) }; /* The default architecture is mips:3000, but with a machine number of @@ -171,4 +171,4 @@ static const bfd_arch_info_type arch_info_struct[] = of mips, and an explicit setting of mips:3000. */ const bfd_arch_info_type bfd_mips_arch = -N (32, 32, 0, "mips", TRUE, &arch_info_struct[0]); +N (32, 32, 0, "mips", true, &arch_info_struct[0]); diff --git a/bfd/cpu-mmix.c b/bfd/cpu-mmix.c index 80ee6d3362..a8e7c0674f 100644 --- a/bfd/cpu-mmix.c +++ b/bfd/cpu-mmix.c @@ -35,7 +35,7 @@ bfd_mmix_arch = "mmix", /* Architecture name. */ "mmix", /* Printable name. */ 3, /* Section align power. */ - TRUE, /* This is the default architecture. */ + true, /* This is the default architecture. */ bfd_default_compatible, /* Architecture comparison function. */ bfd_default_scan, /* String to architecture conversion. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-moxie.c b/bfd/cpu-moxie.c index 65218802ef..f596bbdc8d 100644 --- a/bfd/cpu-moxie.c +++ b/bfd/cpu-moxie.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_moxie_arch = "moxie", /* Arch name. */ "moxie", /* Printable name. */ 2, /* Section alignment power. */ - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-msp430.c b/bfd/cpu-msp430.c index d63393019f..19b6d6b608 100644 --- a/bfd/cpu-msp430.c +++ b/bfd/cpu-msp430.c @@ -62,78 +62,78 @@ compatible (const bfd_arch_info_type * a, static const bfd_arch_info_type arch_info_struct[] = { /* msp430x11x. */ - N (16, bfd_mach_msp11, "MSP430", FALSE, & arch_info_struct[1]), + N (16, bfd_mach_msp11, "MSP430", false, & arch_info_struct[1]), /* msp430x11x1. */ - N (16, bfd_mach_msp110, "MSP430x11x1", FALSE, & arch_info_struct[2]), + N (16, bfd_mach_msp110, "MSP430x11x1", false, & arch_info_struct[2]), /* msp430x12x. */ - N (16, bfd_mach_msp12, "MSP430x12", FALSE, & arch_info_struct[3]), + N (16, bfd_mach_msp12, "MSP430x12", false, & arch_info_struct[3]), /* msp430x13x. */ - N (16, bfd_mach_msp13, "MSP430x13", FALSE, & arch_info_struct[4]), + N (16, bfd_mach_msp13, "MSP430x13", false, & arch_info_struct[4]), /* msp430x14x. */ - N (16, bfd_mach_msp14, "MSP430x14", FALSE, & arch_info_struct[5]), + N (16, bfd_mach_msp14, "MSP430x14", false, & arch_info_struct[5]), /* msp430x15x. */ - N (16, bfd_mach_msp15, "MSP430x15", FALSE, & arch_info_struct[6]), + N (16, bfd_mach_msp15, "MSP430x15", false, & arch_info_struct[6]), /* msp430x16x. */ - N (16, bfd_mach_msp16, "MSP430x16", FALSE, & arch_info_struct[7]), + N (16, bfd_mach_msp16, "MSP430x16", false, & arch_info_struct[7]), /* msp430x20x. */ - N (16, bfd_mach_msp20, "MSP430x20", FALSE, & arch_info_struct[8]), + N (16, bfd_mach_msp20, "MSP430x20", false, & arch_info_struct[8]), /* msp430x21x. */ - N (16, bfd_mach_msp21, "MSP430x21", FALSE, & arch_info_struct[9]), + N (16, bfd_mach_msp21, "MSP430x21", false, & arch_info_struct[9]), /* msp430x22x. */ - N (16, bfd_mach_msp22, "MSP430x22", FALSE, & arch_info_struct[10]), + N (16, bfd_mach_msp22, "MSP430x22", false, & arch_info_struct[10]), /* msp430x23x. */ - N (16, bfd_mach_msp23, "MSP430x23", FALSE, & arch_info_struct[11]), + N (16, bfd_mach_msp23, "MSP430x23", false, & arch_info_struct[11]), /* msp430x24x. */ - N (16, bfd_mach_msp24, "MSP430x24", FALSE, & arch_info_struct[12]), + N (16, bfd_mach_msp24, "MSP430x24", false, & arch_info_struct[12]), /* msp430x26x. */ - N (16, bfd_mach_msp26, "MSP430x26", FALSE, & arch_info_struct[13]), + N (16, bfd_mach_msp26, "MSP430x26", false, & arch_info_struct[13]), /* msp430x31x. */ - N (16, bfd_mach_msp31, "MSP430x31", FALSE, & arch_info_struct[14]), + N (16, bfd_mach_msp31, "MSP430x31", false, & arch_info_struct[14]), /* msp430x32x. */ - N (16, bfd_mach_msp32, "MSP430x32", FALSE, & arch_info_struct[15]), + N (16, bfd_mach_msp32, "MSP430x32", false, & arch_info_struct[15]), /* msp430x33x. */ - N (16, bfd_mach_msp33, "MSP430x33", FALSE, & arch_info_struct[16]), + N (16, bfd_mach_msp33, "MSP430x33", false, & arch_info_struct[16]), /* msp430x41x. */ - N (16, bfd_mach_msp41, "MSP430x41", FALSE, & arch_info_struct[17]), + N (16, bfd_mach_msp41, "MSP430x41", false, & arch_info_struct[17]), /* msp430x42x. */ - N (16, bfd_mach_msp42, "MSP430x42", FALSE, & arch_info_struct[18]), + N (16, bfd_mach_msp42, "MSP430x42", false, & arch_info_struct[18]), /* msp430x43x. */ - N (16, bfd_mach_msp43, "MSP430x43", FALSE, & arch_info_struct[19]), + N (16, bfd_mach_msp43, "MSP430x43", false, & arch_info_struct[19]), /* msp430x44x. */ - N (16, bfd_mach_msp43, "MSP430x44", FALSE, & arch_info_struct[20]), + N (16, bfd_mach_msp43, "MSP430x44", false, & arch_info_struct[20]), /* msp430x46x. */ - N (16, bfd_mach_msp46, "MSP430x46", FALSE, & arch_info_struct[21]), + N (16, bfd_mach_msp46, "MSP430x46", false, & arch_info_struct[21]), /* msp430x47x. */ - N (16, bfd_mach_msp47, "MSP430x47", FALSE, & arch_info_struct[22]), + N (16, bfd_mach_msp47, "MSP430x47", false, & arch_info_struct[22]), /* msp430x54x. */ - N (16, bfd_mach_msp54, "MSP430x54", FALSE, & arch_info_struct[23]), + N (16, bfd_mach_msp54, "MSP430x54", false, & arch_info_struct[23]), - N (32, bfd_mach_msp430x, "MSP430X", FALSE, NULL) + N (32, bfd_mach_msp430x, "MSP430X", false, NULL) }; const bfd_arch_info_type bfd_msp430_arch = - N (16, bfd_mach_msp14, "msp:14", TRUE, & arch_info_struct[0]); + N (16, bfd_mach_msp14, "msp:14", true, & arch_info_struct[0]); diff --git a/bfd/cpu-mt.c b/bfd/cpu-mt.c index 7ea7bb76ae..508742c4c2 100644 --- a/bfd/cpu-mt.c +++ b/bfd/cpu-mt.c @@ -42,11 +42,11 @@ const bfd_arch_info_type arch_info_struct[2] = { - N (bfd_mach_mrisc2, "ms1-003", FALSE, arch_info_struct + 1), - N (bfd_mach_ms2, "ms2", FALSE, NULL) + N (bfd_mach_mrisc2, "ms1-003", false, arch_info_struct + 1), + N (bfd_mach_ms2, "ms2", false, NULL) }; const bfd_arch_info_type bfd_mt_arch = - N (bfd_mach_ms1, "ms1", TRUE, arch_info_struct); + N (bfd_mach_ms1, "ms1", true, arch_info_struct); diff --git a/bfd/cpu-nds32.c b/bfd/cpu-nds32.c index 8702683670..3473a56908 100644 --- a/bfd/cpu-nds32.c +++ b/bfd/cpu-nds32.c @@ -35,11 +35,11 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_n1h, "n1h", FALSE, NDS32V2_NEXT), - N (bfd_mach_n1h_v2, "n1h_v2", FALSE, NDS32V3_NEXT), - N (bfd_mach_n1h_v3, "n1h_v3", FALSE, NDS32V3M_NEXT), - N (bfd_mach_n1h_v3m, "n1h_v3m", FALSE, NULL), + N (bfd_mach_n1h, "n1h", false, NDS32V2_NEXT), + N (bfd_mach_n1h_v2, "n1h_v2", false, NDS32V3_NEXT), + N (bfd_mach_n1h_v3, "n1h_v3", false, NDS32V3M_NEXT), + N (bfd_mach_n1h_v3m, "n1h_v3m", false, NULL), }; const bfd_arch_info_type bfd_nds32_arch = - N (bfd_mach_n1, "n1h", TRUE, NEXT); + N (bfd_mach_n1, "n1h", true, NEXT); diff --git a/bfd/cpu-nfp.c b/bfd/cpu-nfp.c index 4cd6359a1d..88c9593296 100644 --- a/bfd/cpu-nfp.c +++ b/bfd/cpu-nfp.c @@ -55,7 +55,7 @@ bfd_nfp_compatible (const bfd_arch_info_type * a, } static const bfd_arch_info_type arch_info_struct = - N (bfd_mach_nfp3200, "NFP-32xx", FALSE, NULL); + N (bfd_mach_nfp3200, "NFP-32xx", false, NULL); const bfd_arch_info_type bfd_nfp_arch = - N (bfd_mach_nfp6000, "NFP-6xxx", TRUE, &arch_info_struct); + N (bfd_mach_nfp6000, "NFP-6xxx", true, &arch_info_struct); diff --git a/bfd/cpu-nios2.c b/bfd/cpu-nios2.c index 6537899db0..da7bb82fe6 100644 --- a/bfd/cpu-nios2.c +++ b/bfd/cpu-nios2.c @@ -67,9 +67,9 @@ nios2_compatible (const bfd_arch_info_type *a, static const bfd_arch_info_type arch_info_struct[2] = { - N (bfd_mach_nios2r1, "nios2:r1", FALSE, NIOS2R2_NEXT), - N (bfd_mach_nios2r2, "nios2:r2", FALSE, NULL), + N (bfd_mach_nios2r1, "nios2:r1", false, NIOS2R2_NEXT), + N (bfd_mach_nios2r2, "nios2:r2", false, NULL), }; const bfd_arch_info_type bfd_nios2_arch = - N (bfd_mach_nios2, "nios2", TRUE, NIOS2R1_NEXT); + N (bfd_mach_nios2, "nios2", true, NIOS2R1_NEXT); diff --git a/bfd/cpu-ns32k.c b/bfd/cpu-ns32k.c index d2c5ca767b..12f989e704 100644 --- a/bfd/cpu-ns32k.c +++ b/bfd/cpu-ns32k.c @@ -31,11 +31,11 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (32532, "ns32k:32532", TRUE, 0), /* The word ns32k will match this too. */ + N (32532, "ns32k:32532", true, 0), /* The word ns32k will match this too. */ }; const bfd_arch_info_type bfd_ns32k_arch = - N (32032, "ns32k:32032", FALSE, &arch_info_struct[0]); + N (32032, "ns32k:32032", false, &arch_info_struct[0]); bfd_vma _bfd_ns32k_get_displacement (bfd_byte *buffer, int size) @@ -572,7 +572,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto, { int size; bfd_vma x; - bfd_boolean overflow; + bool overflow; if (howto->negate) relocation = -relocation; @@ -599,7 +599,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto, which we don't check for. We must either check at every single operation, which would be tedious, or we must do the computations in a type larger than bfd_vma, which would be inefficient. */ - overflow = FALSE; + overflow = false; if (howto->complain_on_overflow != complain_overflow_dont) { bfd_vma check; @@ -674,7 +674,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto, if (signed_check > reloc_signed_max || signed_check < reloc_signed_min) - overflow = TRUE; + overflow = true; } break; case complain_overflow_unsigned: @@ -686,7 +686,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto, (((1 << (howto->bitsize - 1)) - 1) << 1) | 1; if (check > reloc_unsigned_max) - overflow = TRUE; + overflow = true; } break; case complain_overflow_bitfield: @@ -699,7 +699,7 @@ _bfd_do_ns32k_reloc_contents (reloc_howto_type *howto, if ((check & ~reloc_bits) != 0 && (((bfd_vma) signed_check & ~reloc_bits) != (-(bfd_vma) 1 & ~reloc_bits))) - overflow = TRUE; + overflow = true; } break; default: diff --git a/bfd/cpu-or1k.c b/bfd/cpu-or1k.c index d76ae198cd..395fb2ee57 100644 --- a/bfd/cpu-or1k.c +++ b/bfd/cpu-or1k.c @@ -41,7 +41,7 @@ const bfd_arch_info_type bfd_or1knd_arch = - N (bfd_mach_or1knd, "or1knd", FALSE, NULL); + N (bfd_mach_or1knd, "or1knd", false, NULL); const bfd_arch_info_type bfd_or1k_arch = - N (bfd_mach_or1k, "or1k", TRUE, &bfd_or1knd_arch); + N (bfd_mach_or1k, "or1k", true, &bfd_or1knd_arch); diff --git a/bfd/cpu-pdp11.c b/bfd/cpu-pdp11.c index 51cc4a4eaa..a903555251 100644 --- a/bfd/cpu-pdp11.c +++ b/bfd/cpu-pdp11.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_pdp11_arch = "pdp11", "pdp11", 1, /* Alignment = 16 bit. */ - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-pj.c b/bfd/cpu-pj.c index 4104d66a9a..1cef7b9297 100644 --- a/bfd/cpu-pj.c +++ b/bfd/cpu-pj.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_pj_arch = "pj", /* Arch_name. */ "pj", /* Printable name. */ 1, - TRUE, /* The default machine. */ + true, /* The default machine. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-powerpc.c b/bfd/cpu-powerpc.c index da9f81c297..c16f1dc58d 100644 --- a/bfd/cpu-powerpc.c +++ b/bfd/cpu-powerpc.c @@ -54,8 +54,8 @@ powerpc_compatible (const bfd_arch_info_type *a, static void * bfd_arch_ppc_nop_fill (bfd_size_type count, - bfd_boolean is_bigendian, - bfd_boolean code) + bool is_bigendian, + bool code) { bfd_byte *fill; @@ -107,34 +107,34 @@ const bfd_arch_info_type bfd_powerpc_archs[] = { #if BFD_DEFAULT_TARGET_SIZE == 64 /* Default for 64 bit target. */ - N (64, bfd_mach_ppc64, "powerpc:common64", TRUE, bfd_powerpc_archs + 1), + N (64, bfd_mach_ppc64, "powerpc:common64", true, bfd_powerpc_archs + 1), /* elf32-ppc:ppc_elf_object_p relies on the default 32 bit arch being immediately after the 64 bit default. */ - N (32, bfd_mach_ppc, "powerpc:common", FALSE, bfd_powerpc_archs + 2), + N (32, bfd_mach_ppc, "powerpc:common", false, bfd_powerpc_archs + 2), #else /* Default arch must come first. */ - N (32, bfd_mach_ppc, "powerpc:common", TRUE, bfd_powerpc_archs + 1), + N (32, bfd_mach_ppc, "powerpc:common", true, bfd_powerpc_archs + 1), /* elf64-ppc:ppc64_elf_object_p relies on the default 64 bit arch being immediately after the 32 bit default. */ - N (64, bfd_mach_ppc64, "powerpc:common64", FALSE, bfd_powerpc_archs + 2), + N (64, bfd_mach_ppc64, "powerpc:common64", false, bfd_powerpc_archs + 2), #endif - N (32, bfd_mach_ppc_603, "powerpc:603", FALSE, bfd_powerpc_archs + 3), - N (32, bfd_mach_ppc_ec603e, "powerpc:EC603e", FALSE, bfd_powerpc_archs + 4), - N (32, bfd_mach_ppc_604, "powerpc:604", FALSE, bfd_powerpc_archs + 5), - N (32, bfd_mach_ppc_403, "powerpc:403", FALSE, bfd_powerpc_archs + 6), - N (32, bfd_mach_ppc_601, "powerpc:601", FALSE, bfd_powerpc_archs + 7), - N (64, bfd_mach_ppc_620, "powerpc:620", FALSE, bfd_powerpc_archs + 8), - N (64, bfd_mach_ppc_630, "powerpc:630", FALSE, bfd_powerpc_archs + 9), - N (64, bfd_mach_ppc_a35, "powerpc:a35", FALSE, bfd_powerpc_archs + 10), - N (64, bfd_mach_ppc_rs64ii, "powerpc:rs64ii", FALSE, bfd_powerpc_archs + 11), - N (64, bfd_mach_ppc_rs64iii, "powerpc:rs64iii", FALSE, bfd_powerpc_archs + 12), - N (32, bfd_mach_ppc_7400, "powerpc:7400", FALSE, bfd_powerpc_archs + 13), - N (32, bfd_mach_ppc_e500, "powerpc:e500", FALSE, bfd_powerpc_archs + 14), - N (32, bfd_mach_ppc_e500mc, "powerpc:e500mc", FALSE, bfd_powerpc_archs + 15), - N (64, bfd_mach_ppc_e500mc64, "powerpc:e500mc64",FALSE, bfd_powerpc_archs + 16), - N (32, bfd_mach_ppc_860, "powerpc:MPC8XX", FALSE, bfd_powerpc_archs + 17), - N (32, bfd_mach_ppc_750, "powerpc:750", FALSE, bfd_powerpc_archs + 18), - N (32, bfd_mach_ppc_titan, "powerpc:titan", FALSE, bfd_powerpc_archs + 19), + N (32, bfd_mach_ppc_603, "powerpc:603", false, bfd_powerpc_archs + 3), + N (32, bfd_mach_ppc_ec603e, "powerpc:EC603e", false, bfd_powerpc_archs + 4), + N (32, bfd_mach_ppc_604, "powerpc:604", false, bfd_powerpc_archs + 5), + N (32, bfd_mach_ppc_403, "powerpc:403", false, bfd_powerpc_archs + 6), + N (32, bfd_mach_ppc_601, "powerpc:601", false, bfd_powerpc_archs + 7), + N (64, bfd_mach_ppc_620, "powerpc:620", false, bfd_powerpc_archs + 8), + N (64, bfd_mach_ppc_630, "powerpc:630", false, bfd_powerpc_archs + 9), + N (64, bfd_mach_ppc_a35, "powerpc:a35", false, bfd_powerpc_archs + 10), + N (64, bfd_mach_ppc_rs64ii, "powerpc:rs64ii", false, bfd_powerpc_archs + 11), + N (64, bfd_mach_ppc_rs64iii, "powerpc:rs64iii", false, bfd_powerpc_archs + 12), + N (32, bfd_mach_ppc_7400, "powerpc:7400", false, bfd_powerpc_archs + 13), + N (32, bfd_mach_ppc_e500, "powerpc:e500", false, bfd_powerpc_archs + 14), + N (32, bfd_mach_ppc_e500mc, "powerpc:e500mc", false, bfd_powerpc_archs + 15), + N (64, bfd_mach_ppc_e500mc64, "powerpc:e500mc64",false, bfd_powerpc_archs + 16), + N (32, bfd_mach_ppc_860, "powerpc:MPC8XX", false, bfd_powerpc_archs + 17), + N (32, bfd_mach_ppc_750, "powerpc:750", false, bfd_powerpc_archs + 18), + N (32, bfd_mach_ppc_titan, "powerpc:titan", false, bfd_powerpc_archs + 19), { 16, /* Bits in a word. */ @@ -145,7 +145,7 @@ const bfd_arch_info_type bfd_powerpc_archs[] = "powerpc", "powerpc:vle", 3, - FALSE, /* Not the default. */ + false, /* Not the default. */ powerpc_compatible, bfd_default_scan, bfd_arch_default_fill, @@ -153,6 +153,6 @@ const bfd_arch_info_type bfd_powerpc_archs[] = 0 /* Maximum offset of a reloc from the start of an insn. */ }, - N (64, bfd_mach_ppc_e5500, "powerpc:e5500", FALSE, bfd_powerpc_archs + 21), - N (64, bfd_mach_ppc_e6500, "powerpc:e6500", FALSE, NULL) + N (64, bfd_mach_ppc_e5500, "powerpc:e5500", false, bfd_powerpc_archs + 21), + N (64, bfd_mach_ppc_e6500, "powerpc:e6500", false, NULL) }; diff --git a/bfd/cpu-pru.c b/bfd/cpu-pru.c index 1f36bb4dce..bb6eb6acea 100644 --- a/bfd/cpu-pru.c +++ b/bfd/cpu-pru.c @@ -41,4 +41,4 @@ 0 /* Maximum offset of a reloc from the start of an insn. */ \ } -const bfd_arch_info_type bfd_pru_arch = N (32, 32, 0, "pru", TRUE, NULL); +const bfd_arch_info_type bfd_pru_arch = N (32, 32, 0, "pru", true, NULL); diff --git a/bfd/cpu-riscv.c b/bfd/cpu-riscv.c index ce87ccf238..025e94afd3 100644 --- a/bfd/cpu-riscv.c +++ b/bfd/cpu-riscv.c @@ -39,11 +39,11 @@ riscv_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b) /* Return TRUE if STRING matches the architecture described by INFO. */ -static bfd_boolean +static bool riscv_scan (const struct bfd_arch_info *info, const char *string) { if (bfd_default_scan (info, string)) - return TRUE; + return true; /* The incoming STRING might take the form of riscv:rvXXzzz, where XX is 32 or 64, and zzz are one or more extension characters. As we @@ -59,9 +59,9 @@ riscv_scan (const struct bfd_arch_info *info, const char *string) if (!info->the_default && strncasecmp (string, info->printable_name, strlen (info->printable_name)) == 0) - return TRUE; + return true; - return FALSE; + return false; } #define N(BITS, NUMBER, PRINT, DEFAULT, NEXT) \ @@ -95,13 +95,13 @@ enum and each entry except the last should end with NN (my enum value). */ static const bfd_arch_info_type arch_info_struct[] = { - N (64, bfd_mach_riscv64, "riscv:rv64", FALSE, NN (I_riscv64)), - N (32, bfd_mach_riscv32, "riscv:rv32", FALSE, NULL) + N (64, bfd_mach_riscv64, "riscv:rv64", false, NN (I_riscv64)), + N (32, bfd_mach_riscv32, "riscv:rv32", false, NULL) }; /* The default architecture is riscv:rv64. */ const bfd_arch_info_type bfd_riscv_arch = - N (64, 0, "riscv", TRUE, &arch_info_struct[0]); + N (64, 0, "riscv", true, &arch_info_struct[0]); /* List for all supported ISA spec versions. */ const struct riscv_spec riscv_isa_specs[] = diff --git a/bfd/cpu-rl78.c b/bfd/cpu-rl78.c index 94dea2ac44..70a2a5c0bb 100644 --- a/bfd/cpu-rl78.c +++ b/bfd/cpu-rl78.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_rl78_arch = "rl78", /* Architecture name. */ "rl78", /* Printable name. */ 4, /* Section align power. */ - TRUE, /* The default ? */ + true, /* The default ? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-rs6000.c b/bfd/cpu-rs6000.c index 1a936d135b..821608a1b3 100644 --- a/bfd/cpu-rs6000.c +++ b/bfd/cpu-rs6000.c @@ -66,10 +66,10 @@ rs6000_compatible (const bfd_arch_info_type *a, static const bfd_arch_info_type arch_info_struct[3] = { - N (bfd_mach_rs6k_rs1, "rs6000:rs1", FALSE, arch_info_struct + 1), - N (bfd_mach_rs6k_rsc, "rs6000:rsc", FALSE, arch_info_struct + 2), - N (bfd_mach_rs6k_rs2, "rs6000:rs2", FALSE, NULL) + N (bfd_mach_rs6k_rs1, "rs6000:rs1", false, arch_info_struct + 1), + N (bfd_mach_rs6k_rsc, "rs6000:rsc", false, arch_info_struct + 2), + N (bfd_mach_rs6k_rs2, "rs6000:rs2", false, NULL) }; const bfd_arch_info_type bfd_rs6000_arch = - N (bfd_mach_rs6k, "rs6000:6000", TRUE, arch_info_struct + 0); + N (bfd_mach_rs6k, "rs6000:6000", true, arch_info_struct + 0); diff --git a/bfd/cpu-rx.c b/bfd/cpu-rx.c index dd3793a7a8..601523691b 100644 --- a/bfd/cpu-rx.c +++ b/bfd/cpu-rx.c @@ -29,11 +29,11 @@ static const bfd_arch_info_type arch_info_struct[3] = { - N (bfd_mach_rx, "rx", 3, FALSE, arch_info_struct + 1), - N (bfd_mach_rx_v2, "rx:v2", 3, FALSE, arch_info_struct + 2), - N (bfd_mach_rx_v3, "rx:v3", 3, FALSE, NULL) + N (bfd_mach_rx, "rx", 3, false, arch_info_struct + 1), + N (bfd_mach_rx_v2, "rx:v2", 3, false, arch_info_struct + 2), + N (bfd_mach_rx_v3, "rx:v3", 3, false, NULL) }; const bfd_arch_info_type bfd_rx_arch = - N (bfd_mach_rx, "rx", 4, TRUE, arch_info_struct + 0); + N (bfd_mach_rx, "rx", 4, true, arch_info_struct + 0); diff --git a/bfd/cpu-s12z.c b/bfd/cpu-s12z.c index d47ed9cb7d..1b72e58824 100644 --- a/bfd/cpu-s12z.c +++ b/bfd/cpu-s12z.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_s12z_arch = "s12z", "s12z", 4, /* Section alignment power. */ - TRUE, + true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-s390.c b/bfd/cpu-s390.c index 9e3be8c51f..e71779c055 100644 --- a/bfd/cpu-s390.c +++ b/bfd/cpu-s390.c @@ -43,12 +43,12 @@ #if BFD_DEFAULT_TARGET_SIZE == 64 static const bfd_arch_info_type bfd_s390_31_arch = - N (32, bfd_mach_s390_31, "s390:31-bit", FALSE, NULL); + N (32, bfd_mach_s390_31, "s390:31-bit", false, NULL); const bfd_arch_info_type bfd_s390_arch = - N (64, bfd_mach_s390_64, "s390:64-bit", TRUE, &bfd_s390_31_arch); + N (64, bfd_mach_s390_64, "s390:64-bit", true, &bfd_s390_31_arch); #else static const bfd_arch_info_type bfd_s390_64_arch = - N (64, bfd_mach_s390_64, "s390:64-bit", FALSE, NULL); + N (64, bfd_mach_s390_64, "s390:64-bit", false, NULL); const bfd_arch_info_type bfd_s390_arch = - N (32, bfd_mach_s390_31, "s390:31-bit", TRUE, &bfd_s390_64_arch); + N (32, bfd_mach_s390_31, "s390:31-bit", true, &bfd_s390_64_arch); #endif diff --git a/bfd/cpu-score.c b/bfd/cpu-score.c index 02c24b25c6..52545c1e07 100644 --- a/bfd/cpu-score.c +++ b/bfd/cpu-score.c @@ -63,8 +63,8 @@ compatible (const bfd_arch_info_type * a, const bfd_arch_info_type * b) static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_score3, "score3", FALSE, NULL), + N (bfd_mach_score3, "score3", false, NULL), }; const bfd_arch_info_type bfd_score_arch = - N (bfd_mach_score7, "score7", TRUE, & arch_info_struct[0]); + N (bfd_mach_score7, "score7", true, & arch_info_struct[0]); diff --git a/bfd/cpu-sh.c b/bfd/cpu-sh.c index b46c73702f..2ee7d12296 100644 --- a/bfd/cpu-sh.c +++ b/bfd/cpu-sh.c @@ -45,29 +45,29 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_sh2, "sh2", FALSE, arch_info_struct + 1), - N (bfd_mach_sh2e, "sh2e", FALSE, arch_info_struct + 2), - N (bfd_mach_sh_dsp, "sh-dsp", FALSE, arch_info_struct + 3), - N (bfd_mach_sh3, "sh3", FALSE, arch_info_struct + 4), - N (bfd_mach_sh3_nommu, "sh3-nommu", FALSE, arch_info_struct + 5), - N (bfd_mach_sh3_dsp, "sh3-dsp", FALSE, arch_info_struct + 6), - N (bfd_mach_sh3e, "sh3e", FALSE, arch_info_struct + 7), - N (bfd_mach_sh4, "sh4", FALSE, arch_info_struct + 8), - N (bfd_mach_sh4a, "sh4a", FALSE, arch_info_struct + 9), - N (bfd_mach_sh4al_dsp, "sh4al-dsp", FALSE, arch_info_struct + 10), - N (bfd_mach_sh4_nofpu, "sh4-nofpu", FALSE, arch_info_struct + 11), - N (bfd_mach_sh4_nommu_nofpu, "sh4-nommu-nofpu", FALSE, arch_info_struct + 12), - N (bfd_mach_sh4a_nofpu, "sh4a-nofpu", FALSE, arch_info_struct + 13), - N (bfd_mach_sh2a, "sh2a", FALSE, arch_info_struct + 14), - N (bfd_mach_sh2a_nofpu, "sh2a-nofpu", FALSE, arch_info_struct + 15), - N (bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu, "sh2a-nofpu-or-sh4-nommu-nofpu", FALSE, arch_info_struct + 16), - N (bfd_mach_sh2a_nofpu_or_sh3_nommu, "sh2a-nofpu-or-sh3-nommu", FALSE, arch_info_struct + 17), - N (bfd_mach_sh2a_or_sh4, "sh2a-or-sh4", FALSE, arch_info_struct + 18), - N (bfd_mach_sh2a_or_sh3e, "sh2a-or-sh3e", FALSE, NULL) + N (bfd_mach_sh2, "sh2", false, arch_info_struct + 1), + N (bfd_mach_sh2e, "sh2e", false, arch_info_struct + 2), + N (bfd_mach_sh_dsp, "sh-dsp", false, arch_info_struct + 3), + N (bfd_mach_sh3, "sh3", false, arch_info_struct + 4), + N (bfd_mach_sh3_nommu, "sh3-nommu", false, arch_info_struct + 5), + N (bfd_mach_sh3_dsp, "sh3-dsp", false, arch_info_struct + 6), + N (bfd_mach_sh3e, "sh3e", false, arch_info_struct + 7), + N (bfd_mach_sh4, "sh4", false, arch_info_struct + 8), + N (bfd_mach_sh4a, "sh4a", false, arch_info_struct + 9), + N (bfd_mach_sh4al_dsp, "sh4al-dsp", false, arch_info_struct + 10), + N (bfd_mach_sh4_nofpu, "sh4-nofpu", false, arch_info_struct + 11), + N (bfd_mach_sh4_nommu_nofpu, "sh4-nommu-nofpu", false, arch_info_struct + 12), + N (bfd_mach_sh4a_nofpu, "sh4a-nofpu", false, arch_info_struct + 13), + N (bfd_mach_sh2a, "sh2a", false, arch_info_struct + 14), + N (bfd_mach_sh2a_nofpu, "sh2a-nofpu", false, arch_info_struct + 15), + N (bfd_mach_sh2a_nofpu_or_sh4_nommu_nofpu, "sh2a-nofpu-or-sh4-nommu-nofpu", false, arch_info_struct + 16), + N (bfd_mach_sh2a_nofpu_or_sh3_nommu, "sh2a-nofpu-or-sh3-nommu", false, arch_info_struct + 17), + N (bfd_mach_sh2a_or_sh4, "sh2a-or-sh4", false, arch_info_struct + 18), + N (bfd_mach_sh2a_or_sh3e, "sh2a-or-sh3e", false, NULL) }; const bfd_arch_info_type bfd_sh_arch = - N (bfd_mach_sh, "sh", TRUE, arch_info_struct + 0); + N (bfd_mach_sh, "sh", true, arch_info_struct + 0); /* This table defines the mappings from the BFD internal numbering system to the opcodes internal flags system. diff --git a/bfd/cpu-sparc.c b/bfd/cpu-sparc.c index 7b0598bf96..836c6a9ab3 100644 --- a/bfd/cpu-sparc.c +++ b/bfd/cpu-sparc.c @@ -42,28 +42,28 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (32, bfd_mach_sparc_sparclet, "sparc:sparclet", FALSE, arch_info_struct + 1), - N (32, bfd_mach_sparc_sparclite, "sparc:sparclite", FALSE, arch_info_struct + 2), - N (32, bfd_mach_sparc_v8plus, "sparc:v8plus", FALSE, arch_info_struct + 3), - N (32, bfd_mach_sparc_v8plusa, "sparc:v8plusa", FALSE, arch_info_struct + 4), - N (32, bfd_mach_sparc_sparclite_le, "sparc:sparclite_le", FALSE, arch_info_struct + 5), - N (64, bfd_mach_sparc_v9, "sparc:v9", FALSE, arch_info_struct + 6), - N (64, bfd_mach_sparc_v9a, "sparc:v9a", FALSE, arch_info_struct + 7), - N (32, bfd_mach_sparc_v8plusb, "sparc:v8plusb", FALSE, arch_info_struct + 8), - N (64, bfd_mach_sparc_v9b, "sparc:v9b", FALSE, arch_info_struct + 9), - N (32, bfd_mach_sparc_v8plusc, "sparc:v8plusc", FALSE, arch_info_struct + 10), - N (64, bfd_mach_sparc_v9c, "sparc:v9c", FALSE, arch_info_struct + 11), - N (32, bfd_mach_sparc_v8plusd, "sparc:v8plusd", FALSE, arch_info_struct + 12), - N (64, bfd_mach_sparc_v9d, "sparc:v9d", FALSE, arch_info_struct + 13), - N (32, bfd_mach_sparc_v8pluse, "sparc:v8pluse", FALSE, arch_info_struct + 14), - N (64, bfd_mach_sparc_v9e, "sparc:v9e", FALSE, arch_info_struct + 15), - N (32, bfd_mach_sparc_v8plusv, "sparc:v8plusv", FALSE, arch_info_struct + 16), - N (64, bfd_mach_sparc_v9v, "sparc:v9v", FALSE, arch_info_struct + 17), - N (32, bfd_mach_sparc_v8plusm, "sparc:v8plusm", FALSE, arch_info_struct + 18), - N (64, bfd_mach_sparc_v9m, "sparc:v9m", FALSE, arch_info_struct + 19), - N (32, bfd_mach_sparc_v8plusm8, "sparc:v8plusm8", FALSE, arch_info_struct + 20), - N (64, bfd_mach_sparc_v9m8, "sparc:v9m8", FALSE, NULL) + N (32, bfd_mach_sparc_sparclet, "sparc:sparclet", false, arch_info_struct + 1), + N (32, bfd_mach_sparc_sparclite, "sparc:sparclite", false, arch_info_struct + 2), + N (32, bfd_mach_sparc_v8plus, "sparc:v8plus", false, arch_info_struct + 3), + N (32, bfd_mach_sparc_v8plusa, "sparc:v8plusa", false, arch_info_struct + 4), + N (32, bfd_mach_sparc_sparclite_le, "sparc:sparclite_le", false, arch_info_struct + 5), + N (64, bfd_mach_sparc_v9, "sparc:v9", false, arch_info_struct + 6), + N (64, bfd_mach_sparc_v9a, "sparc:v9a", false, arch_info_struct + 7), + N (32, bfd_mach_sparc_v8plusb, "sparc:v8plusb", false, arch_info_struct + 8), + N (64, bfd_mach_sparc_v9b, "sparc:v9b", false, arch_info_struct + 9), + N (32, bfd_mach_sparc_v8plusc, "sparc:v8plusc", false, arch_info_struct + 10), + N (64, bfd_mach_sparc_v9c, "sparc:v9c", false, arch_info_struct + 11), + N (32, bfd_mach_sparc_v8plusd, "sparc:v8plusd", false, arch_info_struct + 12), + N (64, bfd_mach_sparc_v9d, "sparc:v9d", false, arch_info_struct + 13), + N (32, bfd_mach_sparc_v8pluse, "sparc:v8pluse", false, arch_info_struct + 14), + N (64, bfd_mach_sparc_v9e, "sparc:v9e", false, arch_info_struct + 15), + N (32, bfd_mach_sparc_v8plusv, "sparc:v8plusv", false, arch_info_struct + 16), + N (64, bfd_mach_sparc_v9v, "sparc:v9v", false, arch_info_struct + 17), + N (32, bfd_mach_sparc_v8plusm, "sparc:v8plusm", false, arch_info_struct + 18), + N (64, bfd_mach_sparc_v9m, "sparc:v9m", false, arch_info_struct + 19), + N (32, bfd_mach_sparc_v8plusm8, "sparc:v8plusm8", false, arch_info_struct + 20), + N (64, bfd_mach_sparc_v9m8, "sparc:v9m8", false, NULL) }; const bfd_arch_info_type bfd_sparc_arch = - N (32, bfd_mach_sparc, "sparc", TRUE, arch_info_struct); + N (32, bfd_mach_sparc, "sparc", true, arch_info_struct); diff --git a/bfd/cpu-spu.c b/bfd/cpu-spu.c index 612b89ef1e..f8aba7c7a6 100644 --- a/bfd/cpu-spu.c +++ b/bfd/cpu-spu.c @@ -44,7 +44,7 @@ const bfd_arch_info_type bfd_spu_arch = "spu", /* Architecture name. */ "spu:256K", /* Printable name. */ 3, /* Section alignment power. */ - TRUE, /* Default machine. */ + true, /* Default machine. */ spu_compatible, /* The spu is only compatible with itself, see above. */ bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-tic30.c b/bfd/cpu-tic30.c index 819fa38f46..f954dd1efe 100644 --- a/bfd/cpu-tic30.c +++ b/bfd/cpu-tic30.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_tic30_arch = "tic30", "tms320c30", 2, - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-tic4x.c b/bfd/cpu-tic4x.c index 9849d6ae55..9143754dce 100644 --- a/bfd/cpu-tic4x.c +++ b/bfd/cpu-tic4x.c @@ -24,7 +24,7 @@ #include "bfd.h" #include "libbfd.h" -static bfd_boolean +static bool tic4x_scan (const struct bfd_arch_info *info, const char *string) { @@ -35,14 +35,14 @@ tic4x_scan (const struct bfd_arch_info *info, if (*string == 'C' || *string == 'c') string++; if (string[1] < '0' && string[1] > '9') - return FALSE; + return false; if (*string == '3') return (info->mach == bfd_mach_tic3x); else if (*string == '4') return info->mach == bfd_mach_tic4x; - return FALSE; + return false; } #define N(NUMBER, NAME, PRINT, DEFAULT, NEXT) \ @@ -64,7 +64,7 @@ tic4x_scan (const struct bfd_arch_info *info, } const bfd_arch_info_type bfd_tic3x_arch = - N (bfd_mach_tic3x, "tic3x", "tms320c3x", FALSE, NULL); + N (bfd_mach_tic3x, "tic3x", "tms320c3x", false, NULL); const bfd_arch_info_type bfd_tic4x_arch = - N (bfd_mach_tic4x, "tic4x", "tms320c4x", TRUE, &bfd_tic3x_arch); + N (bfd_mach_tic4x, "tic4x", "tms320c4x", true, &bfd_tic3x_arch); diff --git a/bfd/cpu-tic54x.c b/bfd/cpu-tic54x.c index 20d4919e16..f2decc2499 100644 --- a/bfd/cpu-tic54x.c +++ b/bfd/cpu-tic54x.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_tic54x_arch = "tic54x", "tms320c54x", 1, - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-tic6x.c b/bfd/cpu-tic6x.c index 8bce3bf39f..4440a3f951 100644 --- a/bfd/cpu-tic6x.c +++ b/bfd/cpu-tic6x.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_tic6x_arch = "tic6x", /* Architecture name. */ "tic6x", /* Printable name. */ 2, /* Section alignment power. */ - TRUE, /* Default machine for this architecture. */ + true, /* Default machine for this architecture. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-tilegx.c b/bfd/cpu-tilegx.c index 91c4fe9993..c71591557c 100644 --- a/bfd/cpu-tilegx.c +++ b/bfd/cpu-tilegx.c @@ -41,8 +41,8 @@ } const bfd_arch_info_type bfd_tilegx32_arch = - N (32, bfd_mach_tilegx32, "tilegx32", FALSE, NULL); + N (32, bfd_mach_tilegx32, "tilegx32", false, NULL); const bfd_arch_info_type bfd_tilegx_arch = - N (64, bfd_mach_tilegx, "tilegx", TRUE, &bfd_tilegx32_arch); + N (64, bfd_mach_tilegx, "tilegx", true, &bfd_tilegx32_arch); diff --git a/bfd/cpu-tilepro.c b/bfd/cpu-tilepro.c index f6d28bf288..37a1271a05 100644 --- a/bfd/cpu-tilepro.c +++ b/bfd/cpu-tilepro.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_tilepro_arch = "tilepro", "tilepro", 3, - TRUE, + true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-v850.c b/bfd/cpu-v850.c index 22e3525b54..c80a44eb29 100644 --- a/bfd/cpu-v850.c +++ b/bfd/cpu-v850.c @@ -29,13 +29,13 @@ static const bfd_arch_info_type arch_info_struct[6] = { - N (bfd_mach_v850e3v5, "v850e3v5", FALSE, arch_info_struct + 1), - N (bfd_mach_v850e3v5, "v850e2v4", FALSE, arch_info_struct + 2), - N (bfd_mach_v850e2v3, "v850e2v3", FALSE, arch_info_struct + 3), - N (bfd_mach_v850e2, "v850e2", FALSE, arch_info_struct + 4), - N (bfd_mach_v850e1, "v850e1", FALSE, arch_info_struct + 5), - N (bfd_mach_v850e, "v850e", FALSE, NULL) + N (bfd_mach_v850e3v5, "v850e3v5", false, arch_info_struct + 1), + N (bfd_mach_v850e3v5, "v850e2v4", false, arch_info_struct + 2), + N (bfd_mach_v850e2v3, "v850e2v3", false, arch_info_struct + 3), + N (bfd_mach_v850e2, "v850e2", false, arch_info_struct + 4), + N (bfd_mach_v850e1, "v850e1", false, arch_info_struct + 5), + N (bfd_mach_v850e, "v850e", false, NULL) }; const bfd_arch_info_type bfd_v850_arch = - N (bfd_mach_v850, "v850", TRUE, arch_info_struct + 0); + N (bfd_mach_v850, "v850", true, arch_info_struct + 0); diff --git a/bfd/cpu-v850_rh850.c b/bfd/cpu-v850_rh850.c index cd38a836ba..c31e9208c3 100644 --- a/bfd/cpu-v850_rh850.c +++ b/bfd/cpu-v850_rh850.c @@ -29,14 +29,14 @@ static const bfd_arch_info_type arch_info_struct[] = { - R (bfd_mach_v850e3v5, "v850e3v5", FALSE, & arch_info_struct[1]), - R (bfd_mach_v850e3v5, "v850e2v4", FALSE, & arch_info_struct[2]), - R (bfd_mach_v850e2v3, "v850e2v3", FALSE, & arch_info_struct[3]), - R (bfd_mach_v850e2, "v850e2", FALSE, & arch_info_struct[4]), - R (bfd_mach_v850e1, "v850e1", FALSE, & arch_info_struct[5]), - R (bfd_mach_v850e, "v850e", FALSE, & arch_info_struct[6]), - R (bfd_mach_v850, "v850-rh850", FALSE, NULL) /* For backwards compatibility. */ + R (bfd_mach_v850e3v5, "v850e3v5", false, & arch_info_struct[1]), + R (bfd_mach_v850e3v5, "v850e2v4", false, & arch_info_struct[2]), + R (bfd_mach_v850e2v3, "v850e2v3", false, & arch_info_struct[3]), + R (bfd_mach_v850e2, "v850e2", false, & arch_info_struct[4]), + R (bfd_mach_v850e1, "v850e1", false, & arch_info_struct[5]), + R (bfd_mach_v850e, "v850e", false, & arch_info_struct[6]), + R (bfd_mach_v850, "v850-rh850", false, NULL) /* For backwards compatibility. */ }; const bfd_arch_info_type bfd_v850_rh850_arch = - R (bfd_mach_v850, "v850:rh850", TRUE, & arch_info_struct[0]); + R (bfd_mach_v850, "v850:rh850", true, & arch_info_struct[0]); diff --git a/bfd/cpu-vax.c b/bfd/cpu-vax.c index db79f92fb6..71c5b67657 100644 --- a/bfd/cpu-vax.c +++ b/bfd/cpu-vax.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_vax_arch = "vax", "vax", 3, - TRUE, /* The one and only. */ + true, /* The one and only. */ bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-visium.c b/bfd/cpu-visium.c index 915de46082..11135305de 100644 --- a/bfd/cpu-visium.c +++ b/bfd/cpu-visium.c @@ -33,7 +33,7 @@ const bfd_arch_info_type bfd_visium_arch = "visium", /* Architecture name. */ "visium", /* Machine name. */ 2, /* Section align power. */ - TRUE, /* The default ? */ + true, /* The default ? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-wasm32.c b/bfd/cpu-wasm32.c index d8f88f70ca..d698654248 100644 --- a/bfd/cpu-wasm32.c +++ b/bfd/cpu-wasm32.c @@ -29,8 +29,8 @@ static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_wasm32, "wasm32", TRUE, NULL) + N (bfd_mach_wasm32, "wasm32", true, NULL) }; const bfd_arch_info_type bfd_wasm32_arch = - N (bfd_mach_wasm32, "wasm32", TRUE, & arch_info_struct[0]); + N (bfd_mach_wasm32, "wasm32", true, & arch_info_struct[0]); diff --git a/bfd/cpu-xc16x.c b/bfd/cpu-xc16x.c index 721e869409..6e02433736 100644 --- a/bfd/cpu-xc16x.c +++ b/bfd/cpu-xc16x.c @@ -43,11 +43,11 @@ } const bfd_arch_info_type xc16xs_info_struct = - N (16, bfd_mach_xc16xs, "xc16xs", FALSE, NULL); + N (16, bfd_mach_xc16xs, "xc16xs", false, NULL); const bfd_arch_info_type xc16xl_info_struct = - N (32, bfd_mach_xc16xl, "xc16xl", FALSE, & xc16xs_info_struct); + N (32, bfd_mach_xc16xl, "xc16xl", false, & xc16xs_info_struct); const bfd_arch_info_type bfd_xc16x_arch = - N (16, bfd_mach_xc16x, "xc16x", TRUE, & xc16xl_info_struct); + N (16, bfd_mach_xc16x, "xc16x", true, & xc16xl_info_struct); diff --git a/bfd/cpu-xgate.c b/bfd/cpu-xgate.c index a4d5d9966b..379bb30b80 100644 --- a/bfd/cpu-xgate.c +++ b/bfd/cpu-xgate.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_xgate_arch = "xgate", "xgate", 4, /* Section alignment power. */ - TRUE, + true, bfd_default_compatible, bfd_default_scan, bfd_arch_default_fill, diff --git a/bfd/cpu-xstormy16.c b/bfd/cpu-xstormy16.c index 15b3bfb30a..eed7d4bba5 100644 --- a/bfd/cpu-xstormy16.c +++ b/bfd/cpu-xstormy16.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_xstormy16_arch = "xstormy16", /* Architecture name. */ "xstormy16", /* Printable name. */ 2, /* Section align power. */ - TRUE, /* The default ? */ + true, /* The default ? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-xtensa.c b/bfd/cpu-xtensa.c index 6da23286c3..4307c6b7cc 100644 --- a/bfd/cpu-xtensa.c +++ b/bfd/cpu-xtensa.c @@ -32,7 +32,7 @@ const bfd_arch_info_type bfd_xtensa_arch = "xtensa", /* Architecture name. */ "xtensa", /* Printable name. */ 4, /* Section align power. */ - TRUE, /* The default? */ + true, /* The default? */ bfd_default_compatible, /* Architecture comparison fn. */ bfd_default_scan, /* String to architecture convert fn. */ bfd_arch_default_fill, /* Default fill. */ diff --git a/bfd/cpu-z80.c b/bfd/cpu-z80.c index 3c15be2327..a9a44352f8 100644 --- a/bfd/cpu-z80.c +++ b/bfd/cpu-z80.c @@ -106,16 +106,16 @@ compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b) static const bfd_arch_info_type arch_info_struct[] = { - N (bfd_mach_z80, "z80", 16, TRUE, M(1)), - N (bfd_mach_z80strict, "z80-strict", 16, FALSE, M(2)), - N (bfd_mach_z80full, "z80-full", 16, FALSE, M(3)), - N (bfd_mach_r800, "r800", 16, FALSE, M(4)), - N (bfd_mach_gbz80, "gbz80", 16, FALSE, M(5)), - N (bfd_mach_z180, "z180", 16, FALSE, M(6)), - N (bfd_mach_z80n, "z80n", 16, FALSE, M(7)), - N (bfd_mach_ez80_z80, "ez80-z80", 16, FALSE, M(8)), - N (bfd_mach_ez80_adl, "ez80-adl", 24, FALSE, NULL) + N (bfd_mach_z80, "z80", 16, true, M(1)), + N (bfd_mach_z80strict, "z80-strict", 16, false, M(2)), + N (bfd_mach_z80full, "z80-full", 16, false, M(3)), + N (bfd_mach_r800, "r800", 16, false, M(4)), + N (bfd_mach_gbz80, "gbz80", 16, false, M(5)), + N (bfd_mach_z180, "z180", 16, false, M(6)), + N (bfd_mach_z80n, "z80n", 16, false, M(7)), + N (bfd_mach_ez80_z80, "ez80-z80", 16, false, M(8)), + N (bfd_mach_ez80_adl, "ez80-adl", 24, false, NULL) }; const bfd_arch_info_type bfd_z80_arch = - N (bfd_mach_z80, "z80", 16, TRUE, M(1)); + N (bfd_mach_z80, "z80", 16, true, M(1)); diff --git a/bfd/cpu-z8k.c b/bfd/cpu-z8k.c index 4b1a97ef5e..8090a3023e 100644 --- a/bfd/cpu-z8k.c +++ b/bfd/cpu-z8k.c @@ -36,13 +36,13 @@ compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b) static const bfd_arch_info_type arch_info_struct[] = { - { 32, 16, 8, bfd_arch_z8k, bfd_mach_z8002, "z8k", "z8002", 1, FALSE, + { 32, 16, 8, bfd_arch_z8k, bfd_mach_z8002, "z8k", "z8002", 1, false, compatible, bfd_default_scan, bfd_arch_default_fill, NULL, 0 } }; const bfd_arch_info_type bfd_z8k_arch = { - 32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, TRUE, + 32, 32, 8, bfd_arch_z8k, bfd_mach_z8001, "z8k", "z8001", 1, true, compatible, bfd_default_scan, bfd_arch_default_fill, &arch_info_struct[0], 0 }; diff --git a/bfd/dwarf1.c b/bfd/dwarf1.c index 0b2bf3b04c..f1c4e7ec48 100644 --- a/bfd/dwarf1.c +++ b/bfd/dwarf1.c @@ -177,7 +177,7 @@ alloc_dwarf1_func (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) Return FALSE if the die is invalidly formatted; TRUE otherwise. */ -static bfd_boolean +static bool parse_die (bfd * abfd, struct die_info * aDieInfo, bfd_byte * aDiePtr, @@ -190,23 +190,23 @@ parse_die (bfd * abfd, /* First comes the length. */ if (xptr + 4 > aDiePtrEnd) - return FALSE; + return false; aDieInfo->length = bfd_get_32 (abfd, xptr); xptr += 4; if (aDieInfo->length == 0 || this_die + aDieInfo->length > aDiePtrEnd) - return FALSE; + return false; aDiePtrEnd = this_die + aDieInfo->length; if (aDieInfo->length < 6) { /* Just padding bytes. */ aDieInfo->tag = TAG_padding; - return TRUE; + return true; } /* Then the tag. */ if (xptr + 2 > aDiePtrEnd) - return FALSE; + return false; aDieInfo->tag = bfd_get_16 (abfd, xptr); xptr += 2; @@ -260,7 +260,7 @@ parse_die (bfd * abfd, block_len = bfd_get_16 (abfd, xptr); if (xptr + block_len > aDiePtrEnd || xptr + block_len < xptr) - return FALSE; + return false; xptr += block_len; } xptr += 2; @@ -271,7 +271,7 @@ parse_die (bfd * abfd, block_len = bfd_get_32 (abfd, xptr); if (xptr + block_len > aDiePtrEnd || xptr + block_len < xptr) - return FALSE; + return false; xptr += block_len; } xptr += 4; @@ -284,14 +284,14 @@ parse_die (bfd * abfd, } } - return TRUE; + return true; } /* Parse a dwarf1 line number table for 'aUnit->stmt_list_offset' into 'aUnit->linenumber_table'. Return FALSE if an error occurs; TRUE otherwise. */ -static bfd_boolean +static bool parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) { bfd_byte *xptr; @@ -304,7 +304,7 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) msec = bfd_get_section_by_name (stash->abfd, ".line"); if (! msec) - return FALSE; + return false; size = msec->rawsize ? msec->rawsize : msec->size; stash->line_section @@ -312,7 +312,7 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) (stash->abfd, msec, NULL, stash->syms); if (! stash->line_section) - return FALSE; + return false; stash->line_section_end = stash->line_section + size; } @@ -342,7 +342,7 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) aUnit->linenumber_table = (struct linenumber *) bfd_alloc (stash->abfd, amt); if (!aUnit->linenumber_table) - return FALSE; + return false; for (eachLine = 0; eachLine < aUnit->line_count; eachLine++) { @@ -366,7 +366,7 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) } } - return TRUE; + return true; } /* Parse each function die in a compilation unit 'aUnit'. @@ -374,7 +374,7 @@ parse_line_table (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) the result is placed in 'aUnit->func_list'. Return FALSE if error; TRUE otherwise. */ -static bfd_boolean +static bool parse_functions_in_unit (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) { bfd_byte *eachDie; @@ -388,7 +388,7 @@ parse_functions_in_unit (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) if (! parse_die (stash->abfd, &eachDieInfo, eachDie, stash->debug_section_end)) - return FALSE; + return false; if (eachDieInfo.tag == TAG_global_subroutine || eachDieInfo.tag == TAG_subroutine @@ -397,7 +397,7 @@ parse_functions_in_unit (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) { struct dwarf1_func* aFunc = alloc_dwarf1_func (stash,aUnit); if (!aFunc) - return FALSE; + return false; aFunc->name = eachDieInfo.name; aFunc->low_pc = eachDieInfo.low_pc; @@ -411,13 +411,13 @@ parse_functions_in_unit (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit) break; } - return TRUE; + return true; } /* Find the nearest line to 'addr' in 'aUnit'. Return whether we found the line (or a function) without error. */ -static bfd_boolean +static bool dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, struct dwarf1_unit* aUnit, unsigned long addr, @@ -425,8 +425,8 @@ dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, const char **functionname_ptr, unsigned int *linenumber_ptr) { - int line_p = FALSE; - int func_p = FALSE; + int line_p = false; + int func_p = false; if (aUnit->low_pc <= addr && addr < aUnit->high_pc) { @@ -438,13 +438,13 @@ dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, if (! aUnit->linenumber_table) { if (! parse_line_table (stash, aUnit)) - return FALSE; + return false; } if (! aUnit->func_list) { if (! parse_functions_in_unit (stash, aUnit)) - return FALSE; + return false; } for (i = 0; i < aUnit->line_count; i++) @@ -454,7 +454,7 @@ dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, { *filename_ptr = aUnit->name; *linenumber_ptr = aUnit->linenumber_table[i].linenumber; - line_p = TRUE; + line_p = true; break; } } @@ -467,7 +467,7 @@ dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, && addr < eachFunc->high_pc) { *functionname_ptr = eachFunc->name; - func_p = TRUE; + func_p = true; break; } } @@ -480,7 +480,7 @@ dwarf1_unit_find_nearest_line (struct dwarf1_debug* stash, /* The DWARF 1 version of find_nearest line. Return TRUE if the line is found without error. */ -bfd_boolean +bool _bfd_dwarf1_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, @@ -509,14 +509,14 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, = (struct dwarf1_debug *) bfd_zalloc (abfd, size); if (! stash) - return FALSE; + return false; msec = bfd_get_section_by_name (abfd, ".debug"); if (! msec) /* No dwarf1 info. Note that at this point the stash has been allocated, but contains zeros, this lets future calls to this function fail quicker. */ - return FALSE; + return false; size = msec->rawsize ? msec->rawsize : msec->size; stash->debug_section @@ -524,7 +524,7 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, symbols); if (! stash->debug_section) - return FALSE; + return false; stash->debug_section_end = stash->debug_section + size; stash->currentDie = stash->debug_section; @@ -536,7 +536,7 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, or that an error occured while setting up the stash. */ if (! stash->debug_section) - return FALSE; + return false; /* Look at the previously parsed units to see if any contain the addr. */ @@ -553,14 +553,14 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, if (! parse_die (stash->abfd, &aDieInfo, stash->currentDie, stash->debug_section_end)) - return FALSE; + return false; if (aDieInfo.tag == TAG_compile_unit) { struct dwarf1_unit* aUnit = alloc_dwarf1_unit (stash); if (!aUnit) - return FALSE; + return false; aUnit->name = aDieInfo.name; aUnit->low_pc = aDieInfo.low_pc; @@ -592,5 +592,5 @@ _bfd_dwarf1_find_nearest_line (bfd *abfd, stash->currentDie += aDieInfo.length; } - return FALSE; + return false; } diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c index dbaec4016c..0a8a5578da 100644 --- a/bfd/dwarf2.c +++ b/bfd/dwarf2.c @@ -202,7 +202,7 @@ struct dwarf2_debug #define STASH_INFO_HASH_DISABLED 2 /* True if we opened bfd_ptr. */ - bfd_boolean close_on_cleanup; + bool close_on_cleanup; }; struct arange @@ -295,7 +295,7 @@ struct comp_unit bfd_vma base_address; /* TRUE if symbols are cached in hash table for faster lookup by name. */ - bfd_boolean cached; + bool cached; }; /* This data structure holds the information of an abbrev. */ @@ -303,7 +303,7 @@ struct abbrev_info { unsigned int number; /* Number identifying abbrev. */ enum dwarf_tag tag; /* DWARF tag. */ - bfd_boolean has_children; /* TRUE if the abbrev has children. */ + bool has_children; /* TRUE if the abbrev has children. */ unsigned int num_attrs; /* Number of attributes. */ struct attr_abbrev * attrs; /* An array of attribute descriptions. */ struct abbrev_info * next; /* Next in chain. */ @@ -478,30 +478,30 @@ create_info_hash_table (bfd *abfd) right type of info in inserted as info is passed as a void* pointer. This function returns true if there is no error. */ -static bfd_boolean +static bool insert_info_hash_table (struct info_hash_table *hash_table, const char *key, void *info, - bfd_boolean copy_p) + bool copy_p) { struct info_hash_entry *entry; struct info_list_node *node; entry = (struct info_hash_entry*) bfd_hash_lookup (&hash_table->base, - key, TRUE, copy_p); + key, true, copy_p); if (!entry) - return FALSE; + return false; node = (struct info_list_node *) bfd_hash_allocate (&hash_table->base, sizeof (*node)); if (!node) - return FALSE; + return false; node->info = info; node->next = entry->head; entry->head = node; - return TRUE; + return true; } /* Look up an info entry list from an info hash table. Return NULL @@ -513,7 +513,7 @@ lookup_info_hash_table (struct info_hash_table *hash_table, const char *key) struct info_hash_entry *entry; entry = (struct info_hash_entry*) bfd_hash_lookup (&hash_table->base, key, - FALSE, FALSE); + false, false); return entry ? entry->head : NULL; } @@ -523,7 +523,7 @@ lookup_info_hash_table (struct info_hash_table *hash_table, const char *key) section contents, otherwise use bfd_get_section_contents. Fail if the located section does not contain at least OFFSET bytes. */ -static bfd_boolean +static bool read_section (bfd * abfd, const struct dwarf_debug_section *sec, asymbol ** syms, @@ -553,7 +553,7 @@ read_section (bfd * abfd, _bfd_error_handler (_("DWARF error: can't find %s section."), sec->uncompressed_name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } amt = bfd_get_section_limit_octets (abfd, msec); @@ -564,7 +564,7 @@ read_section (bfd * abfd, _bfd_error_handler (_("DWARF error: section %s is larger than its filesize! (0x%lx vs 0x%lx)"), section_name, (long) amt, (long) filesize); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } *section_size = amt; /* Paranoia - alloc one extra so that we can make sure a string @@ -574,18 +574,18 @@ read_section (bfd * abfd, { /* Paranoia - this should never happen. */ bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } contents = (bfd_byte *) bfd_malloc (amt); if (contents == NULL) - return FALSE; + return false; if (syms ? !bfd_simple_get_relocated_section_contents (abfd, msec, contents, syms) : !bfd_get_section_contents (abfd, msec, contents, 0, *section_size)) { free (contents); - return FALSE; + return false; } contents[*section_size] = 0; *section_buffer = contents; @@ -601,10 +601,10 @@ read_section (bfd * abfd, (uint64_t) offset, section_name, (uint64_t) *section_size); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Read dwarf information from a buffer. */ @@ -1043,7 +1043,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash, abbrev_ptr = file->dwarf_abbrev_buffer + offset; abbrev_end = file->dwarf_abbrev_buffer + file->dwarf_abbrev_size; abbrev_number = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, - FALSE, abbrev_end); + false, abbrev_end); abbrev_ptr += bytes_read; /* Loop until we reach an abbrev number of 0. */ @@ -1058,7 +1058,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash, cur_abbrev->number = abbrev_number; cur_abbrev->tag = (enum dwarf_tag) _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, - FALSE, abbrev_end); + false, abbrev_end); abbrev_ptr += bytes_read; cur_abbrev->has_children = read_1_byte (abfd, abbrev_ptr, abbrev_end); abbrev_ptr += 1; @@ -1070,15 +1070,15 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash, bfd_vma implicit_const = -1; abbrev_name = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, - FALSE, abbrev_end); + false, abbrev_end); abbrev_ptr += bytes_read; abbrev_form = _bfd_safe_read_leb128 (abfd, abbrev_ptr, &bytes_read, - FALSE, abbrev_end); + false, abbrev_end); abbrev_ptr += bytes_read; if (abbrev_form == DW_FORM_implicit_const) { implicit_const = _bfd_safe_read_leb128 (abfd, abbrev_ptr, - &bytes_read, TRUE, + &bytes_read, true, abbrev_end); abbrev_ptr += bytes_read; } @@ -1122,7 +1122,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash, >= file->dwarf_abbrev_size) break; abbrev_number = _bfd_safe_read_leb128 (abfd, abbrev_ptr, - &bytes_read, FALSE, abbrev_end); + &bytes_read, false, abbrev_end); abbrev_ptr += bytes_read; if (lookup_abbrev (abbrev_number, abbrevs) != NULL) break; @@ -1157,7 +1157,7 @@ read_abbrevs (bfd *abfd, bfd_uint64_t offset, struct dwarf2_debug *stash, /* Returns true if the form is one which has a string value. */ -static inline bfd_boolean +static inline bool is_str_attr (enum dwarf_form form) { return (form == DW_FORM_string @@ -1323,7 +1323,7 @@ read_attribute_value (struct attribute * attr, break; case DW_FORM_strx: attr->u.val = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, info_ptr_end); + false, info_ptr_end); info_ptr += bytes_read; attr->u.str = (char *) read_indexed_string (attr->u.val, unit); break; @@ -1334,7 +1334,7 @@ read_attribute_value (struct attribute * attr, if (blk == NULL) return NULL; blk->size = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, info_ptr_end); + false, info_ptr_end); info_ptr += bytes_read; info_ptr = read_n_bytes (info_ptr, info_ptr_end, blk); attr->u.blk = blk; @@ -1351,24 +1351,24 @@ read_attribute_value (struct attribute * attr, break; case DW_FORM_sdata: attr->u.sval = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - TRUE, info_ptr_end); + true, info_ptr_end); info_ptr += bytes_read; break; case DW_FORM_ref_udata: case DW_FORM_udata: case DW_FORM_addrx: attr->u.val = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, info_ptr_end); + false, info_ptr_end); info_ptr += bytes_read; break; case DW_FORM_indirect: form = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, info_ptr_end); + false, info_ptr_end); info_ptr += bytes_read; if (form == DW_FORM_implicit_const) { implicit_const = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - TRUE, info_ptr_end); + true, info_ptr_end); info_ptr += bytes_read; } info_ptr = read_attribute_value (attr, form, implicit_const, unit, @@ -1417,13 +1417,13 @@ read_attribute (struct attribute * attr, /* Return whether DW_AT_name will return the same as DW_AT_linkage_name for a function. */ -static bfd_boolean +static bool non_mangled (int lang) { switch (lang) { default: - return FALSE; + return false; case DW_LANG_C89: case DW_LANG_C: @@ -1437,7 +1437,7 @@ non_mangled (int lang) case DW_LANG_PLI: case DW_LANG_UPC: case DW_LANG_C11: - return TRUE; + return true; } } @@ -1508,7 +1508,7 @@ struct funcinfo /* Source location line number. */ int line; int tag; - bfd_boolean is_linkage; + bool is_linkage; const char * name; struct arange arange; /* Where the symbol is defined. */ @@ -1552,12 +1552,12 @@ struct varinfo /* Where the symbol is defined. */ asection *sec; /* Is this a stack variable? */ - bfd_boolean stack; + bool stack; }; /* Return TRUE if NEW_LINE should sort after LINE. */ -static inline bfd_boolean +static inline bool new_line_sorts_after (struct line_info *new_line, struct line_info *line) { return (new_line->address > line->address @@ -1571,7 +1571,7 @@ new_line_sorts_after (struct line_info *new_line, struct line_info *line) highest to lowest VMA (with possible duplicates); that is, line_info->prev_line always accesses an equal or smaller VMA. */ -static bfd_boolean +static bool add_line_info (struct line_info_table *table, bfd_vma address, unsigned char op_index, @@ -1586,7 +1586,7 @@ add_line_info (struct line_info_table *table, struct line_info* info = (struct line_info *) bfd_alloc (table->abfd, amt); if (info == NULL) - return FALSE; + return false; /* Set member data of 'info'. */ info->prev_line = NULL; @@ -1601,7 +1601,7 @@ add_line_info (struct line_info_table *table, { info->filename = (char *) bfd_alloc (table->abfd, strlen (filename) + 1); if (info->filename == NULL) - return FALSE; + return false; strcpy (info->filename, filename); } else @@ -1640,7 +1640,7 @@ add_line_info (struct line_info_table *table, amt = sizeof (struct line_sequence); seq = (struct line_sequence *) bfd_malloc (amt); if (seq == NULL) - return FALSE; + return false; seq->low_pc = address; seq->prev_sequence = table->sequences; seq->last_line = info; @@ -1689,7 +1689,7 @@ add_line_info (struct line_info_table *table, if (address < seq->low_pc) seq->low_pc = address; } - return TRUE; + return true; } /* Extract a fully qualified filename from a line info table. @@ -1762,7 +1762,7 @@ concat_filename (struct line_info_table *table, unsigned int file) return strdup (filename); } -static bfd_boolean +static bool arange_add (const struct comp_unit *unit, struct arange *first_arange, bfd_vma low_pc, bfd_vma high_pc) { @@ -1770,14 +1770,14 @@ arange_add (const struct comp_unit *unit, struct arange *first_arange, /* Ignore empty ranges. */ if (low_pc == high_pc) - return TRUE; + return true; /* If the first arange is empty, use it. */ if (first_arange->high == 0) { first_arange->low = low_pc; first_arange->high = high_pc; - return TRUE; + return true; } /* Next see if we can cheaply extend an existing range. */ @@ -1787,12 +1787,12 @@ arange_add (const struct comp_unit *unit, struct arange *first_arange, if (low_pc == arange->high) { arange->high = high_pc; - return TRUE; + return true; } if (high_pc == arange->low) { arange->low = low_pc; - return TRUE; + return true; } arange = arange->next; } @@ -1802,12 +1802,12 @@ arange_add (const struct comp_unit *unit, struct arange *first_arange, Order isn't significant, so just insert after the first arange. */ arange = (struct arange *) bfd_alloc (unit->abfd, sizeof (*arange)); if (arange == NULL) - return FALSE; + return false; arange->low = low_pc; arange->high = high_pc; arange->next = first_arange->next; first_arange->next = arange; - return TRUE; + return true; } /* Compare function for line sequences. */ @@ -1846,7 +1846,7 @@ compare_sequences (const void* a, const void* b) /* Construct the line information table for quick lookup. */ -static bfd_boolean +static bool build_line_info_table (struct line_info_table * table, struct line_sequence * seq) { @@ -1857,7 +1857,7 @@ build_line_info_table (struct line_info_table * table, unsigned int line_index; if (seq->line_info_lookup != NULL) - return TRUE; + return true; /* Count the number of line information entries. We could do this while scanning the debug information, but some entries may be added via @@ -1869,14 +1869,14 @@ build_line_info_table (struct line_info_table * table, seq->num_lines = num_lines; if (num_lines == 0) - return TRUE; + return true; /* Allocate space for the line information lookup table. */ amt = sizeof (struct line_info*) * num_lines; line_info_lookup = (struct line_info**) bfd_alloc (table->abfd, amt); seq->line_info_lookup = line_info_lookup; if (line_info_lookup == NULL) - return FALSE; + return false; /* Create the line information lookup table. */ line_index = num_lines; @@ -1884,12 +1884,12 @@ build_line_info_table (struct line_info_table * table, line_info_lookup[--line_index] = each_line; BFD_ASSERT (line_index == 0); - return TRUE; + return true; } /* Sort the line sequences for quick lookup. */ -static bfd_boolean +static bool sort_line_sequences (struct line_info_table* table) { size_t amt; @@ -1900,13 +1900,13 @@ sort_line_sequences (struct line_info_table* table) bfd_vma last_high_pc; if (num_sequences == 0) - return TRUE; + return true; /* Allocate space for an array of sequences. */ amt = sizeof (struct line_sequence) * num_sequences; sequences = (struct line_sequence *) bfd_alloc (table->abfd, amt); if (sequences == NULL) - return FALSE; + return false; /* Copy the linked list into the array, freeing the original nodes. */ seq = table->sequences; @@ -1954,12 +1954,12 @@ sort_line_sequences (struct line_info_table* table) table->sequences = sequences; table->num_sequences = num_sequences; - return TRUE; + return true; } /* Add directory to TABLE. CUR_DIR memory ownership is taken by TABLE. */ -static bfd_boolean +static bool line_info_add_include_dir (struct line_info_table *table, char *cur_dir) { if ((table->num_dirs % DIR_ALLOC_CHUNK) == 0) @@ -1972,15 +1972,15 @@ line_info_add_include_dir (struct line_info_table *table, char *cur_dir) tmp = (char **) bfd_realloc (table->dirs, amt); if (tmp == NULL) - return FALSE; + return false; table->dirs = tmp; } table->dirs[table->num_dirs++] = cur_dir; - return TRUE; + return true; } -static bfd_boolean +static bool line_info_add_include_dir_stub (struct line_info_table *table, char *cur_dir, unsigned int dir ATTRIBUTE_UNUSED, unsigned int xtime ATTRIBUTE_UNUSED, @@ -1991,7 +1991,7 @@ line_info_add_include_dir_stub (struct line_info_table *table, char *cur_dir, /* Add file to TABLE. CUR_FILE memory ownership is taken by TABLE. */ -static bfd_boolean +static bool line_info_add_file_name (struct line_info_table *table, char *cur_file, unsigned int dir, unsigned int xtime, unsigned int size) @@ -2006,7 +2006,7 @@ line_info_add_file_name (struct line_info_table *table, char *cur_file, tmp = (struct fileinfo *) bfd_realloc (table->files, amt); if (tmp == NULL) - return FALSE; + return false; table->files = tmp; } @@ -2015,7 +2015,7 @@ line_info_add_file_name (struct line_info_table *table, char *cur_file, table->files[table->num_files].time = xtime; table->files[table->num_files].size = size; table->num_files++; - return TRUE; + return true; } /* Read directory or file name entry format, starting with byte of @@ -2023,14 +2023,14 @@ line_info_add_file_name (struct line_info_table *table, char *cur_file, entries count and the entries themselves in the described entry format. */ -static bfd_boolean +static bool read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp, bfd_byte *buf_end, struct line_info_table *table, - bfd_boolean (*callback) (struct line_info_table *table, - char *cur_file, - unsigned int dir, - unsigned int time, - unsigned int size)) + bool (*callback) (struct line_info_table *table, + char *cur_file, + unsigned int dir, + unsigned int time, + unsigned int size)) { bfd *abfd = unit->abfd; bfd_byte format_count, formati; @@ -2044,19 +2044,19 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp, format_header_data = buf; for (formati = 0; formati < format_count; formati++) { - _bfd_safe_read_leb128 (abfd, buf, &bytes_read, FALSE, buf_end); + _bfd_safe_read_leb128 (abfd, buf, &bytes_read, false, buf_end); buf += bytes_read; - _bfd_safe_read_leb128 (abfd, buf, &bytes_read, FALSE, buf_end); + _bfd_safe_read_leb128 (abfd, buf, &bytes_read, false, buf_end); buf += bytes_read; } - data_count = _bfd_safe_read_leb128 (abfd, buf, &bytes_read, FALSE, buf_end); + data_count = _bfd_safe_read_leb128 (abfd, buf, &bytes_read, false, buf_end); buf += bytes_read; if (format_count == 0 && data_count != 0) { _bfd_error_handler (_("DWARF error: zero format count")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* PR 22210. Paranoia check. Don't bother running the loop @@ -2067,7 +2067,7 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp, (_("DWARF error: data count (%" PRIx64 ") larger than buffer size"), (uint64_t) data_count); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } for (datai = 0; datai < data_count; datai++) @@ -2085,7 +2085,7 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp, struct attribute attr; content_type = _bfd_safe_read_leb128 (abfd, format, &bytes_read, - FALSE, buf_end); + false, buf_end); format += bytes_read; switch (content_type) { @@ -2108,16 +2108,16 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp, (_("DWARF error: unknown format content type %" PRIu64), (uint64_t) content_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - form = _bfd_safe_read_leb128 (abfd, format, &bytes_read, FALSE, + form = _bfd_safe_read_leb128 (abfd, format, &bytes_read, false, buf_end); format += bytes_read; buf = read_attribute_value (&attr, form, 0, unit, buf, buf_end); if (buf == NULL) - return FALSE; + return false; switch (form) { case DW_FORM_string: @@ -2142,11 +2142,11 @@ read_formatted_entries (struct comp_unit *unit, bfd_byte **bufp, /* Skip the first "zero entry", which is the compilation dir/file. */ if (datai != 0) if (!callback (table, fe.name, fe.dir, fe.time, fe.size)) - return FALSE; + return false; } *bufp = buf; - return TRUE; + return true; } /* Decode the line number information for UNIT. */ @@ -2361,11 +2361,11 @@ decode_line_info (struct comp_unit *unit) line_ptr += bytes_read; - dir = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); + dir = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, false, line_end); line_ptr += bytes_read; - xtime = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); + xtime = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, false, line_end); line_ptr += bytes_read; - size = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, FALSE, line_end); + size = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, false, line_end); line_ptr += bytes_read; if (!line_info_add_file_name (table, cur_file, dir, xtime, size)) @@ -2434,7 +2434,7 @@ decode_line_info (struct comp_unit *unit) { case DW_LNS_extended_op: exop_len = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; extended_op = read_1_byte (abfd, line_ptr, line_end); line_ptr += 1; @@ -2463,13 +2463,13 @@ decode_line_info (struct comp_unit *unit) cur_file = read_string (abfd, line_ptr, line_end, &bytes_read); line_ptr += bytes_read; dir = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; xtime = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; size = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; if (!line_info_add_file_name (table, cur_file, dir, xtime, size)) @@ -2478,7 +2478,7 @@ decode_line_info (struct comp_unit *unit) case DW_LNE_set_discriminator: discriminator = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; break; case DW_LNE_HP_source_file_correlation: @@ -2508,12 +2508,12 @@ decode_line_info (struct comp_unit *unit) address += (lh.minimum_instruction_length * _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end)); + false, line_end)); else { bfd_vma adjust = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); address = ((op_index + adjust) / lh.maximum_ops_per_insn * lh.minimum_instruction_length); op_index = (op_index + adjust) % lh.maximum_ops_per_insn; @@ -2522,7 +2522,7 @@ decode_line_info (struct comp_unit *unit) break; case DW_LNS_advance_line: line += _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - TRUE, line_end); + true, line_end); line_ptr += bytes_read; break; case DW_LNS_set_file: @@ -2532,7 +2532,7 @@ decode_line_info (struct comp_unit *unit) /* The file and directory tables are 0 based, the references are 1 based. */ filenum = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; free (filename); filename = concat_filename (table, filenum); @@ -2540,7 +2540,7 @@ decode_line_info (struct comp_unit *unit) } case DW_LNS_set_column: column = _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; break; case DW_LNS_negate_stmt: @@ -2573,7 +2573,7 @@ decode_line_info (struct comp_unit *unit) for (i = 0; i < lh.standard_opcode_lengths[op_code]; i++) { (void) _bfd_safe_read_leb128 (abfd, line_ptr, &bytes_read, - FALSE, line_end); + false, line_end); line_ptr += bytes_read; } break; @@ -2675,7 +2675,7 @@ lookup_address_in_line_info_table (struct line_info_table *table, /* Read in the .debug_ranges section for future reference. */ -static bfd_boolean +static bool read_debug_ranges (struct comp_unit * unit) { struct dwarf2_debug *stash = unit->stash; @@ -2688,7 +2688,7 @@ read_debug_ranges (struct comp_unit * unit) /* Read in the .debug_rnglists section for future reference. */ -static bfd_boolean +static bool read_debug_rnglists (struct comp_unit * unit) { struct dwarf2_debug *stash = unit->stash; @@ -2723,7 +2723,7 @@ compare_lookup_funcinfos (const void * a, const void * b) return 0; } -static bfd_boolean +static bool build_lookup_funcinfo_table (struct comp_unit * unit) { struct lookup_funcinfo *lookup_funcinfo_table = unit->lookup_funcinfo_table; @@ -2735,13 +2735,13 @@ build_lookup_funcinfo_table (struct comp_unit * unit) bfd_vma low_addr, high_addr; if (lookup_funcinfo_table || number_of_functions == 0) - return TRUE; + return true; /* Create the function info lookup table. */ lookup_funcinfo_table = (struct lookup_funcinfo *) bfd_malloc (number_of_functions * sizeof (struct lookup_funcinfo)); if (lookup_funcinfo_table == NULL) - return FALSE; + return false; /* Populate the function info lookup table. */ func_index = number_of_functions; @@ -2787,7 +2787,7 @@ build_lookup_funcinfo_table (struct comp_unit * unit) } unit->lookup_funcinfo_table = lookup_funcinfo_table; - return TRUE; + return true; } /* If ADDR is within UNIT's function tables, set FUNCTION_PTR, and return @@ -2795,7 +2795,7 @@ build_lookup_funcinfo_table (struct comp_unit * unit) that contains ADDR, to handle inlined functions without depending upon them being ordered in TABLE by increasing range. */ -static bfd_boolean +static bool lookup_address_in_function_table (struct comp_unit *unit, bfd_vma addr, struct funcinfo **function_ptr) @@ -2809,13 +2809,13 @@ lookup_address_in_function_table (struct comp_unit *unit, struct arange *arange; if (number_of_functions == 0) - return FALSE; + return false; if (!build_lookup_funcinfo_table (unit)) - return FALSE; + return false; if (unit->lookup_funcinfo_table[number_of_functions - 1].high_addr < addr) - return FALSE; + return false; /* Find the first function in the lookup table which may contain the specified address. */ @@ -2867,16 +2867,16 @@ lookup_address_in_function_table (struct comp_unit *unit, } if (!best_fit) - return FALSE; + return false; *function_ptr = best_fit; - return TRUE; + return true; } /* If SYM at ADDR is within function table of UNIT, set FILENAME_PTR and LINENUMBER_PTR, and return TRUE. */ -static bfd_boolean +static bool lookup_symbol_in_function_table (struct comp_unit *unit, asymbol *sym, bfd_vma addr, @@ -2917,10 +2917,10 @@ lookup_symbol_in_function_table (struct comp_unit *unit, best_fit->sec = sec; *filename_ptr = best_fit->file; *linenumber_ptr = best_fit->line; - return TRUE; + return true; } else - return FALSE; + return false; } /* Variable table functions. */ @@ -2928,7 +2928,7 @@ lookup_symbol_in_function_table (struct comp_unit *unit, /* If SYM is within variable table of UNIT, set FILENAME_PTR and LINENUMBER_PTR, and return TRUE. */ -static bfd_boolean +static bool lookup_symbol_in_variable_table (struct comp_unit *unit, asymbol *sym, bfd_vma addr, @@ -2953,22 +2953,22 @@ lookup_symbol_in_variable_table (struct comp_unit *unit, each->sec = sec; *filename_ptr = each->file; *linenumber_ptr = each->line; - return TRUE; + return true; } - return FALSE; + return false; } static struct comp_unit *stash_comp_unit (struct dwarf2_debug *, struct dwarf2_debug_file *); -static bfd_boolean comp_unit_maybe_decode_line_info (struct comp_unit *); +static bool comp_unit_maybe_decode_line_info (struct comp_unit *); -static bfd_boolean +static bool find_abstract_instance (struct comp_unit *unit, struct attribute *attr_ptr, unsigned int recur_count, const char **pname, - bfd_boolean *is_linkage, + bool *is_linkage, char **filename_ptr, int *linenumber_ptr) { @@ -2986,7 +2986,7 @@ find_abstract_instance (struct comp_unit *unit, _bfd_error_handler (_("DWARF error: abstract instance recursion detected")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* DW_FORM_ref_addr can reference an entry in a different CU. It @@ -3014,19 +3014,19 @@ find_abstract_instance (struct comp_unit *unit, info_ptr_end = info_ptr + unit->file->dwarf_info_size; total = info_ptr_end - info_ptr; if (!die_ref) - return TRUE; + return true; else if (die_ref >= total) { _bfd_error_handler (_("DWARF error: invalid abstract instance DIE ref")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } info_ptr += die_ref; } else if (attr_ptr->form == DW_FORM_GNU_ref_alt) { - bfd_boolean first_time = unit->stash->alt.dwarf_info_buffer == NULL; + bool first_time = unit->stash->alt.dwarf_info_buffer == NULL; info_ptr = read_alt_indirect_ref (unit, die_ref); if (first_time) @@ -3037,7 +3037,7 @@ find_abstract_instance (struct comp_unit *unit, (_("DWARF error: unable to read alt ref %" PRIu64), (uint64_t) die_ref); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } info_ptr_end = (unit->stash->alt.dwarf_info_buffer + unit->stash->alt.dwarf_info_size); @@ -3093,7 +3093,7 @@ find_abstract_instance (struct comp_unit *unit, (_("DWARF error: unable to locate abstract instance DIE ref %" PRIu64), (uint64_t) die_ref); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } unit = u; info_ptr_end = unit->end_ptr; @@ -3114,13 +3114,13 @@ find_abstract_instance (struct comp_unit *unit, _bfd_error_handler (_("DWARF error: invalid abstract instance DIE ref")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } info_ptr += die_ref; } abbrev_number = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, info_ptr_end); + false, info_ptr_end); info_ptr += bytes_read; if (abbrev_number) @@ -3131,7 +3131,7 @@ find_abstract_instance (struct comp_unit *unit, _bfd_error_handler (_("DWARF error: could not find abbrev number %u"), abbrev_number); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -3150,14 +3150,14 @@ find_abstract_instance (struct comp_unit *unit, { name = attr.u.str; if (non_mangled (unit->lang)) - *is_linkage = TRUE; + *is_linkage = true; } break; case DW_AT_specification: if (!find_abstract_instance (unit, &attr, recur_count + 1, &name, is_linkage, filename_ptr, linenumber_ptr)) - return FALSE; + return false; break; case DW_AT_linkage_name: case DW_AT_MIPS_linkage_name: @@ -3166,12 +3166,12 @@ find_abstract_instance (struct comp_unit *unit, if (is_str_attr (attr.form)) { name = attr.u.str; - *is_linkage = TRUE; + *is_linkage = true; } break; case DW_AT_decl_file: if (!comp_unit_maybe_decode_line_info (unit)) - return FALSE; + return false; *filename_ptr = concat_filename (unit->line_table, attr.u.val); break; @@ -3185,10 +3185,10 @@ find_abstract_instance (struct comp_unit *unit, } } *pname = name; - return TRUE; + return true; } -static bfd_boolean +static bool read_ranges (struct comp_unit *unit, struct arange *arange, bfd_uint64_t offset) { @@ -3199,12 +3199,12 @@ read_ranges (struct comp_unit *unit, struct arange *arange, if (! unit->file->dwarf_ranges_buffer) { if (! read_debug_ranges (unit)) - return FALSE; + return false; } ranges_ptr = unit->file->dwarf_ranges_buffer + offset; if (ranges_ptr < unit->file->dwarf_ranges_buffer) - return FALSE; + return false; ranges_end = unit->file->dwarf_ranges_buffer + unit->file->dwarf_ranges_size; for (;;) @@ -3214,7 +3214,7 @@ read_ranges (struct comp_unit *unit, struct arange *arange, /* PR 17512: file: 62cada7d. */ if (ranges_ptr + 2 * unit->addr_size > ranges_end) - return FALSE; + return false; low_pc = read_address (unit, ranges_ptr, ranges_end); ranges_ptr += unit->addr_size; @@ -3229,13 +3229,13 @@ read_ranges (struct comp_unit *unit, struct arange *arange, { if (!arange_add (unit, arange, base_address + low_pc, base_address + high_pc)) - return FALSE; + return false; } } - return TRUE; + return true; } -static bfd_boolean +static bool read_rnglists (struct comp_unit *unit, struct arange *arange, bfd_uint64_t offset) { @@ -3249,12 +3249,12 @@ read_rnglists (struct comp_unit *unit, struct arange *arange, if (! unit->file->dwarf_rnglists_buffer) { if (! read_debug_rnglists (unit)) - return FALSE; + return false; } rngs_ptr = unit->file->dwarf_rnglists_buffer + offset; if (rngs_ptr < unit->file->dwarf_rnglists_buffer) - return FALSE; + return false; rngs_end = unit->file->dwarf_rnglists_buffer; rngs_end += unit->file->dwarf_rnglists_size; @@ -3264,7 +3264,7 @@ read_rnglists (struct comp_unit *unit, struct arange *arange, unsigned int bytes_read; if (rngs_ptr + 1 > rngs_end) - return FALSE; + return false; rlet = read_1_byte (abfd, rngs_ptr, rngs_end); rngs_ptr++; @@ -3272,40 +3272,40 @@ read_rnglists (struct comp_unit *unit, struct arange *arange, switch (rlet) { case DW_RLE_end_of_list: - return TRUE; + return true; case DW_RLE_base_address: if (rngs_ptr + unit->addr_size > rngs_end) - return FALSE; + return false; base_address = read_address (unit, rngs_ptr, rngs_end); rngs_ptr += unit->addr_size; continue; case DW_RLE_start_length: if (rngs_ptr + unit->addr_size > rngs_end) - return FALSE; + return false; low_pc = read_address (unit, rngs_ptr, rngs_end); rngs_ptr += unit->addr_size; high_pc = low_pc; high_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read, - FALSE, rngs_end); + false, rngs_end); rngs_ptr += bytes_read; break; case DW_RLE_offset_pair: low_pc = base_address; low_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read, - FALSE, rngs_end); + false, rngs_end); rngs_ptr += bytes_read; high_pc = base_address; high_pc += _bfd_safe_read_leb128 (abfd, rngs_ptr, &bytes_read, - FALSE, rngs_end); + false, rngs_end); rngs_ptr += bytes_read; break; case DW_RLE_start_end: if (rngs_ptr + 2 * unit->addr_size > rngs_end) - return FALSE; + return false; low_pc = read_address (unit, rngs_ptr, rngs_end); rngs_ptr += unit->addr_size; high_pc = read_address (unit, rngs_ptr, rngs_end); @@ -3317,15 +3317,15 @@ read_rnglists (struct comp_unit *unit, struct arange *arange, case DW_RLE_startx_endx: case DW_RLE_startx_length: default: - return FALSE; + return false; } if (!arange_add (unit, arange, low_pc, high_pc)) - return FALSE; + return false; } } -static bfd_boolean +static bool read_rangelist (struct comp_unit *unit, struct arange *arange, bfd_uint64_t offset) { @@ -3363,7 +3363,7 @@ lookup_var_by_offset (bfd_uint64_t offset, struct varinfo * table) /* Scan over each die in a comp. unit looking for functions to add to the function table and variables to the variable table. */ -static bfd_boolean +static bool scan_unit_for_symbols (struct comp_unit *unit) { bfd *abfd = unit->abfd; @@ -3382,7 +3382,7 @@ scan_unit_for_symbols (struct comp_unit *unit) nested_funcs = (struct nest_funcinfo *) bfd_malloc (nested_funcs_size * sizeof (*nested_funcs)); if (nested_funcs == NULL) - return FALSE; + return false; nested_funcs[nesting_level].func = 0; /* PR 27484: We must scan the DIEs twice. The first time we look for @@ -3403,7 +3403,7 @@ scan_unit_for_symbols (struct comp_unit *unit) current_offset = info_ptr - unit->info_ptr_unit; abbrev_number = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, info_ptr_end); + false, info_ptr_end); info_ptr += bytes_read; if (abbrev_number == 0) @@ -3467,7 +3467,7 @@ scan_unit_for_symbols (struct comp_unit *unit) if (var == NULL) goto fail; var->tag = abbrev->tag; - var->stack = TRUE; + var->stack = true; var->prev_var = unit->variable_table; unit->variable_table = var; var->unit_offset = current_offset; @@ -3524,7 +3524,7 @@ scan_unit_for_symbols (struct comp_unit *unit) struct varinfo *var; bfd_vma low_pc = 0; bfd_vma high_pc = 0; - bfd_boolean high_pc_relative = FALSE; + bool high_pc_relative = false; bfd_uint64_t current_offset; /* PR 17512: file: 9f405d9d. */ @@ -3533,7 +3533,7 @@ scan_unit_for_symbols (struct comp_unit *unit) current_offset = info_ptr - unit->info_ptr_unit; abbrev_number = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, info_ptr_end); + false, info_ptr_end); info_ptr += bytes_read; if (! abbrev_number) @@ -3601,7 +3601,7 @@ scan_unit_for_symbols (struct comp_unit *unit) { func->name = attr.u.str; if (non_mangled (unit->lang)) - func->is_linkage = TRUE; + func->is_linkage = true; } break; @@ -3612,7 +3612,7 @@ scan_unit_for_symbols (struct comp_unit *unit) if (is_str_attr (attr.form)) { func->name = attr.u.str; - func->is_linkage = TRUE; + func->is_linkage = true; } break; @@ -3690,7 +3690,7 @@ scan_unit_for_symbols (struct comp_unit *unit) case DW_AT_external: if (attr.u.val != 0) - var->stack = FALSE; + var->stack = false; break; case DW_AT_location: @@ -3704,7 +3704,7 @@ scan_unit_for_symbols (struct comp_unit *unit) if (attr.u.blk->data != NULL && *attr.u.blk->data == DW_OP_addr) { - var->stack = FALSE; + var->stack = false; /* Verify that DW_OP_addr is the only opcode in the location, in which case the block size will be 1 @@ -3744,11 +3744,11 @@ scan_unit_for_symbols (struct comp_unit *unit) } free (nested_funcs); - return TRUE; + return true; fail: free (nested_funcs); - return FALSE; + return false; } /* Parse a DWARF2 compilation unit starting at INFO_PTR. UNIT_LENGTH @@ -3782,7 +3782,7 @@ parse_comp_unit (struct dwarf2_debug *stash, bfd_vma low_pc = 0; bfd_vma high_pc = 0; bfd *abfd = file->bfd_ptr; - bfd_boolean high_pc_relative = FALSE; + bool high_pc_relative = false; enum dwarf_unit_type unit_type; version = read_2_bytes (abfd, info_ptr, end_ptr); @@ -3863,7 +3863,7 @@ parse_comp_unit (struct dwarf2_debug *stash, return NULL; abbrev_number = _bfd_safe_read_leb128 (abfd, info_ptr, &bytes_read, - FALSE, end_ptr); + false, end_ptr); info_ptr += bytes_read; if (! abbrev_number) { @@ -3987,24 +3987,24 @@ parse_comp_unit (struct dwarf2_debug *stash, need to consult the line info table to see if a compilation unit really contains the given address. */ -static bfd_boolean +static bool comp_unit_contains_address (struct comp_unit *unit, bfd_vma addr) { struct arange *arange; if (unit->error) - return FALSE; + return false; arange = &unit->arange; do { if (addr >= arange->low && addr < arange->high) - return TRUE; + return true; arange = arange->next; } while (arange); - return FALSE; + return false; } /* If UNIT contains ADDR, set the output parameters to the values for @@ -4023,10 +4023,10 @@ comp_unit_find_nearest_line (struct comp_unit *unit, unsigned int *linenumber_ptr, unsigned int *discriminator_ptr) { - bfd_boolean func_p; + bool func_p; if (!comp_unit_maybe_decode_line_info (unit)) - return FALSE; + return false; *function_ptr = NULL; func_p = lookup_address_in_function_table (unit, addr, function_ptr); @@ -4043,18 +4043,18 @@ comp_unit_find_nearest_line (struct comp_unit *unit, If not, decode it. Returns TRUE if no errors were encountered; FALSE otherwise. */ -static bfd_boolean +static bool comp_unit_maybe_decode_line_info (struct comp_unit *unit) { if (unit->error) - return FALSE; + return false; if (! unit->line_table) { if (! unit->stmtlist) { unit->error = 1; - return FALSE; + return false; } unit->line_table = decode_line_info (unit); @@ -4062,18 +4062,18 @@ comp_unit_maybe_decode_line_info (struct comp_unit *unit) if (! unit->line_table) { unit->error = 1; - return FALSE; + return false; } if (unit->first_child_die_ptr < unit->end_ptr && ! scan_unit_for_symbols (unit)) { unit->error = 1; - return FALSE; + return false; } } - return TRUE; + return true; } /* If UNIT contains SYM at ADDR, set the output parameters to the @@ -4084,7 +4084,7 @@ comp_unit_maybe_decode_line_info (struct comp_unit *unit) Return TRUE if UNIT contains SYM, and no errors were encountered; FALSE otherwise. */ -static bfd_boolean +static bool comp_unit_find_line (struct comp_unit *unit, asymbol *sym, bfd_vma addr, @@ -4092,7 +4092,7 @@ comp_unit_find_line (struct comp_unit *unit, unsigned int *linenumber_ptr) { if (!comp_unit_maybe_decode_line_info (unit)) - return FALSE; + return false; if (sym->flags & BSF_FUNCTION) return lookup_symbol_in_function_table (unit, sym, addr, @@ -4138,7 +4138,7 @@ reverse_varinfo_list (struct varinfo *head) unit into hash tables for faster lookup. Returns TRUE if no errors were enountered; FALSE otherwise. */ -static bfd_boolean +static bool comp_unit_hash_info (struct dwarf2_debug *stash, struct comp_unit *unit, struct info_hash_table *funcinfo_hash_table, @@ -4146,12 +4146,12 @@ comp_unit_hash_info (struct dwarf2_debug *stash, { struct funcinfo* each_func; struct varinfo* each_var; - bfd_boolean okay = TRUE; + bool okay = true; BFD_ASSERT (stash->info_hash_status != STASH_INFO_HASH_DISABLED); if (!comp_unit_maybe_decode_line_info (unit)) - return FALSE; + return false; BFD_ASSERT (!unit->cached); @@ -4171,11 +4171,11 @@ comp_unit_hash_info (struct dwarf2_debug *stash, name string is either in the dwarf string buffer or info in the stash. */ okay = insert_info_hash_table (funcinfo_hash_table, each_func->name, - (void*) each_func, FALSE); + (void*) each_func, false); } unit->function_table = reverse_funcinfo_list (unit->function_table); if (!okay) - return FALSE; + return false; /* We do the same for variable infos. */ unit->variable_table = reverse_varinfo_list (unit->variable_table); @@ -4191,11 +4191,11 @@ comp_unit_hash_info (struct dwarf2_debug *stash, name string is either in the dwarf string buffer or info in the stash. */ okay = insert_info_hash_table (varinfo_hash_table, each_var->name, - (void*) each_var, FALSE); + (void*) each_var, false); } unit->variable_table = reverse_varinfo_list (unit->variable_table); - unit->cached = TRUE; + unit->cached = true; return okay; } @@ -4340,7 +4340,7 @@ unset_sections (struct dwarf2_debug *stash) logical section. ??? We should probably do the same for other debug sections. */ -static bfd_boolean +static bool place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) { bfd *abfd; @@ -4354,7 +4354,7 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) p = stash->adjusted_sections; for (; i > 0; i--, p++) p->section->vma = p->adj_vma; - return TRUE; + return true; } debug_info_name = stash->debug_sections[debug_info].uncompressed_name; @@ -4397,7 +4397,7 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) p = (struct adjusted_section *) bfd_malloc (amt); if (p == NULL) - return FALSE; + return false; stash->adjusted_sections = p; stash->adjusted_section_count = i; @@ -4457,7 +4457,7 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) if (orig_bfd != stash->f.bfd_ptr) set_debug_vma (orig_bfd, stash->f.bfd_ptr); - return TRUE; + return true; } /* Look up a funcinfo by name using the given info hash table. If found, @@ -4466,7 +4466,7 @@ place_sections (bfd *orig_bfd, struct dwarf2_debug *stash) This function returns TRUE if a funcinfo that matches the given symbol and address is found with any error; otherwise it returns FALSE. */ -static bfd_boolean +static bool info_hash_lookup_funcinfo (struct info_hash_table *hash_table, asymbol *sym, bfd_vma addr, @@ -4507,10 +4507,10 @@ info_hash_lookup_funcinfo (struct info_hash_table *hash_table, best_fit->sec = sec; *filename_ptr = best_fit->file; *linenumber_ptr = best_fit->line; - return TRUE; + return true; } - return FALSE; + return false; } /* Look up a varinfo by name using the given info hash table. If found, @@ -4519,7 +4519,7 @@ info_hash_lookup_funcinfo (struct info_hash_table *hash_table, This function returns TRUE if a varinfo that matches the given symbol and address is found with any error; otherwise it returns FALSE. */ -static bfd_boolean +static bool info_hash_lookup_varinfo (struct info_hash_table *hash_table, asymbol *sym, bfd_vma addr, @@ -4542,25 +4542,25 @@ info_hash_lookup_varinfo (struct info_hash_table *hash_table, each->sec = sec; *filename_ptr = each->file; *linenumber_ptr = each->line; - return TRUE; + return true; } } - return FALSE; + return false; } /* Update the funcinfo and varinfo info hash tables if they are not up to date. Returns TRUE if there is no error; otherwise returns FALSE and disable the info hash tables. */ -static bfd_boolean +static bool stash_maybe_update_info_hash_tables (struct dwarf2_debug *stash) { struct comp_unit *each; /* Exit if hash tables are up-to-date. */ if (stash->f.all_comp_units == stash->hash_units_head) - return TRUE; + return true; if (stash->hash_units_head) each = stash->hash_units_head->prev_unit; @@ -4573,13 +4573,13 @@ stash_maybe_update_info_hash_tables (struct dwarf2_debug *stash) stash->varinfo_hash_table)) { stash->info_hash_status = STASH_INFO_HASH_DISABLED; - return FALSE; + return false; } each = each->prev_unit; } stash->hash_units_head = stash->f.all_comp_units; - return TRUE; + return true; } /* Check consistency of info hash tables. This is for debugging only. */ @@ -4591,7 +4591,7 @@ stash_verify_info_hash_table (struct dwarf2_debug *stash) struct funcinfo *each_func; struct varinfo *each_var; struct info_list_node *node; - bfd_boolean found; + bool found; for (each_unit = stash->f.all_comp_units; each_unit; @@ -4606,7 +4606,7 @@ stash_verify_info_hash_table (struct dwarf2_debug *stash) node = lookup_info_hash_table (stash->funcinfo_hash_table, each_func->name); BFD_ASSERT (node); - found = FALSE; + found = false; while (node && !found) { found = node->info == each_func; @@ -4624,7 +4624,7 @@ stash_verify_info_hash_table (struct dwarf2_debug *stash) node = lookup_info_hash_table (stash->varinfo_hash_table, each_var->name); BFD_ASSERT (node); - found = FALSE; + found = false; while (node && !found) { found = node->info == each_var; @@ -4672,7 +4672,7 @@ stash_maybe_enable_info_hash_tables (bfd *abfd, struct dwarf2_debug *stash) TRUE and update the locations pointed to by filename_ptr and linenumber_ptr; otherwise it returns FALSE. */ -static bfd_boolean +static bool stash_find_line_fast (struct dwarf2_debug *stash, asymbol *sym, bfd_vma addr, @@ -4690,17 +4690,17 @@ stash_find_line_fast (struct dwarf2_debug *stash, /* Save current section VMAs. */ -static bfd_boolean +static bool save_section_vma (const bfd *abfd, struct dwarf2_debug *stash) { asection *s; unsigned int i; if (abfd->section_count == 0) - return TRUE; + return true; stash->sec_vma = bfd_malloc (sizeof (*stash->sec_vma) * abfd->section_count); if (stash->sec_vma == NULL) - return FALSE; + return false; stash->sec_vma_count = abfd->section_count; for (i = 0, s = abfd->sections; s != NULL && i < abfd->section_count; @@ -4711,7 +4711,7 @@ save_section_vma (const bfd *abfd, struct dwarf2_debug *stash) else stash->sec_vma[i] = s->vma; } - return TRUE; + return true; } /* Compare current section VMAs against those at the time the stash @@ -4721,7 +4721,7 @@ save_section_vma (const bfd *abfd, struct dwarf2_debug *stash) sections, so the stashed section contents depend on symbol values, which in turn depend on section VMAs. */ -static bfd_boolean +static bool section_vma_same (const bfd *abfd, const struct dwarf2_debug *stash) { asection *s; @@ -4731,7 +4731,7 @@ section_vma_same (const bfd *abfd, const struct dwarf2_debug *stash) when the stash was created and now, then we cannot trust the stashed vma information. */ if (abfd->section_count != stash->sec_vma_count) - return FALSE; + return false; for (i = 0, s = abfd->sections; s != NULL && i < abfd->section_count; @@ -4744,9 +4744,9 @@ section_vma_same (const bfd *abfd, const struct dwarf2_debug *stash) else vma = s->vma; if (vma != stash->sec_vma[i]) - return FALSE; + return false; } - return TRUE; + return true; } /* Read debug information from DEBUG_BFD when DEBUG_BFD is specified. @@ -4754,12 +4754,12 @@ section_vma_same (const bfd *abfd, const struct dwarf2_debug *stash) or its gnu_debuglink. The results will be stored in PINFO. The function returns TRUE iff debug information is ready. */ -bfd_boolean +bool _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, const struct dwarf_debug_section *debug_sections, asymbol **symbols, void **pinfo, - bfd_boolean do_place) + bool do_place) { size_t amt = sizeof (struct dwarf2_debug); bfd_size_type total_size; @@ -4776,11 +4776,11 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, if (stash->f.bfd_ptr != NULL) { if (do_place && !place_sections (abfd, stash)) - return FALSE; - return TRUE; + return false; + return true; } - return FALSE; + return false; } _bfd_dwarf2_cleanup_debug_info (abfd, pinfo); memset (stash, 0, amt); @@ -4789,23 +4789,23 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, { stash = (struct dwarf2_debug *) bfd_zalloc (abfd, amt); if (! stash) - return FALSE; + return false; } stash->orig_bfd = abfd; stash->debug_sections = debug_sections; stash->f.syms = symbols; if (!save_section_vma (abfd, stash)) - return FALSE; + return false; stash->f.abbrev_offsets = htab_create_alloc (10, hash_abbrev, eq_abbrev, del_abbrev, calloc, free); if (!stash->f.abbrev_offsets) - return FALSE; + return false; stash->alt.abbrev_offsets = htab_create_alloc (10, hash_abbrev, eq_abbrev, del_abbrev, calloc, free); if (!stash->alt.abbrev_offsets) - return FALSE; + return false; *pinfo = stash; @@ -4826,13 +4826,13 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, Note that at this point the stash has been allocated, but contains zeros. This lets future calls to this function fail more quickly. */ - return FALSE; + return false; debug_bfd = bfd_openr (debug_filename, NULL); free (debug_filename); if (debug_bfd == NULL) /* FIXME: Should we report our failure to follow the debuglink ? */ - return FALSE; + return false; /* Set BFD_DECOMPRESS to decompress debug sections. */ debug_bfd->flags |= BFD_DECOMPRESS; @@ -4842,18 +4842,18 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, || !bfd_generic_link_read_symbols (debug_bfd)) { bfd_close (debug_bfd); - return FALSE; + return false; } symbols = bfd_get_outsymbols (debug_bfd); stash->f.syms = symbols; - stash->close_on_cleanup = TRUE; + stash->close_on_cleanup = true; } stash->f.bfd_ptr = debug_bfd; if (do_place && !place_sections (abfd, stash)) - return FALSE; + return false; /* There can be more than one DWARF2 info section in a BFD these days. First handle the easy case when there's only one. If @@ -4873,7 +4873,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, if (! read_section (debug_bfd, &stash->debug_sections[debug_info], symbols, 0, &stash->f.dwarf_info_buffer, &total_size)) - return FALSE; + return false; } else { @@ -4887,14 +4887,14 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, || total_size + msec->size < msec->size) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } total_size += msec->size; } stash->f.dwarf_info_buffer = (bfd_byte *) bfd_malloc (total_size); if (stash->f.dwarf_info_buffer == NULL) - return FALSE; + return false; total_size = 0; for (msec = find_debug_info (debug_bfd, debug_sections, NULL); @@ -4910,7 +4910,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, if (!(bfd_simple_get_relocated_section_contents (debug_bfd, msec, stash->f.dwarf_info_buffer + total_size, symbols))) - return FALSE; + return false; total_size += size; } @@ -4918,7 +4918,7 @@ _bfd_dwarf2_slurp_debug_info (bfd *abfd, bfd *debug_bfd, stash->f.info_ptr = stash->f.dwarf_info_buffer; stash->f.dwarf_info_size = total_size; - return TRUE; + return true; } /* Parse the next DWARF2 compilation unit at FILE->INFO_PTR. */ @@ -5116,8 +5116,8 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, bfd_vma addr; struct comp_unit* each; struct funcinfo *function = NULL; - int found = FALSE; - bfd_boolean do_line; + int found = false; + bool do_line; *filename_ptr = NULL; if (functionname_ptr != NULL) @@ -5129,7 +5129,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, if (! _bfd_dwarf2_slurp_debug_info (abfd, NULL, debug_sections, symbols, pinfo, (abfd->flags & (EXEC_P | DYNAMIC)) == 0)) - return FALSE; + return false; stash = (struct dwarf2_debug *) *pinfo; @@ -5169,7 +5169,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, && ((*tmp)->flags & BSF_SECTION_SYM) == 0) { symbol = *tmp; - do_line = TRUE; + do_line = true; /* For local symbols, keep going in the hope we find a global. */ if ((symbol->flags & BSF_GLOBAL) != 0) @@ -5186,7 +5186,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, /* A null info_ptr indicates that there is no dwarf2 info (or that an error occured while setting up the stash). */ if (! stash->f.info_ptr) - return FALSE; + return false; stash->inliner_chain = NULL; @@ -5274,7 +5274,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, if (* linenumber_ptr) { - found = TRUE; + found = true; goto done; } } @@ -5337,7 +5337,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, function->name = *functionname_ptr; /* Even if we didn't find a linkage name, say that we have to stop a repeated search of symbols. */ - function->is_linkage = TRUE; + function->is_linkage = true; } } @@ -5347,7 +5347,7 @@ _bfd_dwarf2_find_nearest_line (bfd *abfd, return found; } -bfd_boolean +bool _bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED, const char **filename_ptr, const char **functionname_ptr, @@ -5367,11 +5367,11 @@ _bfd_dwarf2_find_inliner_info (bfd *abfd ATTRIBUTE_UNUSED, *functionname_ptr = func->caller_func->name; *linenumber_ptr = func->caller_line; stash->inliner_chain = func->caller_func; - return TRUE; + return true; } } - return FALSE; + return false; } void diff --git a/bfd/ecoff-bfd.h b/bfd/ecoff-bfd.h index 5a855d1170..e7ee521747 100644 --- a/bfd/ecoff-bfd.h +++ b/bfd/ecoff-bfd.h @@ -18,9 +18,9 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -extern bfd_boolean bfd_ecoff_set_gp_value +extern bool bfd_ecoff_set_gp_value (bfd *abfd, bfd_vma gp_value); -extern bfd_boolean bfd_ecoff_set_regmasks +extern bool bfd_ecoff_set_regmasks (bfd *abfd, unsigned long gprmask, unsigned long fprmask, unsigned long *cprmask); extern void *bfd_ecoff_debug_init @@ -29,31 +29,31 @@ extern void *bfd_ecoff_debug_init extern void bfd_ecoff_debug_free (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, const struct ecoff_debug_swap *output_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate +extern bool bfd_ecoff_debug_accumulate (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, const struct ecoff_debug_swap *output_swap, bfd *input_bfd, struct ecoff_debug_info *input_debug, const struct ecoff_debug_swap *input_swap, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_accumulate_other +extern bool bfd_ecoff_debug_accumulate_other (void *handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, const struct ecoff_debug_swap *output_swap, bfd *input_bfd, struct bfd_link_info *); -extern bfd_boolean bfd_ecoff_debug_externals +extern bool bfd_ecoff_debug_externals (bfd *abfd, struct ecoff_debug_info *debug, - const struct ecoff_debug_swap *swap, bfd_boolean relocatable, - bfd_boolean (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), + const struct ecoff_debug_swap *swap, bool relocatable, + bool (*get_extr) (struct bfd_symbol *, struct ecoff_extr *), void (*set_index) (struct bfd_symbol *, bfd_size_type)); -extern bfd_boolean bfd_ecoff_debug_one_external +extern bool bfd_ecoff_debug_one_external (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, const char *name, struct ecoff_extr *esym); extern bfd_size_type bfd_ecoff_debug_size (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap); -extern bfd_boolean bfd_ecoff_write_debug +extern bool bfd_ecoff_write_debug (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, file_ptr where); -extern bfd_boolean bfd_ecoff_write_accumulated_debug +extern bool bfd_ecoff_write_accumulated_debug (void *handle, bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, struct bfd_link_info *info, file_ptr where); diff --git a/bfd/ecoff.c b/bfd/ecoff.c index dc12b180ad..f09fc1dd0a 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -55,16 +55,16 @@ static asection bfd_debug_section = /* Create an ECOFF object. */ -bfd_boolean +bool _bfd_ecoff_mkobject (bfd *abfd) { size_t amt = sizeof (ecoff_data_type); abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt); if (abfd->tdata.ecoff_obj_data == NULL) - return FALSE; + return false; - return TRUE; + return true; } /* This is a hook called by coff_real_object_p to create any backend @@ -112,7 +112,7 @@ _bfd_ecoff_mkobject_hook (bfd *abfd, void * filehdr, void * aouthdr) /* Initialize a new section. */ -bfd_boolean +bool _bfd_ecoff_new_section_hook (bfd *abfd, asection *section) { unsigned int i; @@ -168,7 +168,7 @@ _bfd_ecoff_set_alignment_hook (bfd *abfd ATTRIBUTE_UNUSED, below. This could be an ECOFF backend routine, with one version for each target, but there aren't all that many ECOFF targets. */ -bfd_boolean +bool _bfd_ecoff_set_arch_mach_hook (bfd *abfd, void * filehdr) { struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr; @@ -212,12 +212,12 @@ _bfd_ecoff_set_arch_mach_hook (bfd *abfd, void * filehdr) return bfd_default_set_arch_mach (abfd, arch, mach); } -bfd_boolean +bool _bfd_ecoff_no_long_sections (bfd *abfd, int enable) { (void) abfd; (void) enable; - return FALSE; + return false; } /* Get the magic number to use based on the architecture and machine. @@ -335,7 +335,7 @@ ecoff_sec_to_styp_flags (const char *name, flagword flags) /* Get the BFD flags to use for a section. */ -bfd_boolean +bool _bfd_ecoff_styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED, void * hdr, const char *name ATTRIBUTE_UNUSED, @@ -402,12 +402,12 @@ _bfd_ecoff_styp_to_sec_flags (bfd *abfd ATTRIBUTE_UNUSED, sec_flags |= SEC_ALLOC | SEC_LOAD; * flags_ptr = sec_flags; - return TRUE; + return true; } /* Read in the symbolic header for an ECOFF object file. */ -static bfd_boolean +static bool ecoff_slurp_symbolic_header (bfd *abfd) { const struct ecoff_backend_data * const backend = ecoff_backend (abfd); @@ -418,13 +418,13 @@ ecoff_slurp_symbolic_header (bfd *abfd) /* See if we've already read it in. */ if (ecoff_data (abfd)->debug_info.symbolic_header.magic == backend->debug_swap.sym_magic) - return TRUE; + return true; /* See whether there is a symbolic header. */ if (ecoff_data (abfd)->sym_filepos == 0) { abfd->symcount = 0; - return TRUE; + return true; } /* At this point bfd_get_symcount (abfd) holds the number of symbols @@ -435,7 +435,7 @@ ecoff_slurp_symbolic_header (bfd *abfd) if (bfd_get_symcount (abfd) != external_hdr_size) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Read the symbolic information header. */ @@ -458,17 +458,17 @@ ecoff_slurp_symbolic_header (bfd *abfd) abfd->symcount = internal_symhdr->isymMax + internal_symhdr->iextMax; free (raw); - return TRUE; + return true; error_return: free (raw); - return FALSE; + return false; } /* Read in and swap the important symbolic information for an ECOFF object file. This is called by gdb via the read_debug_info entry point in the backend structure. */ -bfd_boolean +bool _bfd_ecoff_slurp_symbolic_info (bfd *abfd, asection *ignore ATTRIBUTE_UNUSED, struct ecoff_debug_info *debug) @@ -492,15 +492,15 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd, /* Check whether we've already gotten it, and whether there's any to get. */ if (ecoff_data (abfd)->raw_syments != NULL) - return TRUE; + return true; if (ecoff_data (abfd)->sym_filepos == 0) { abfd->symcount = 0; - return TRUE; + return true; } if (! ecoff_slurp_symbolic_header (abfd)) - return FALSE; + return false; internal_symhdr = &debug->symbolic_header; @@ -540,15 +540,15 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd, if (raw_size == 0) { ecoff_data (abfd)->sym_filepos = 0; - return TRUE; + return true; } pos = ecoff_data (abfd)->sym_filepos; pos += backend->debug_swap.external_hdr_size; if (bfd_seek (abfd, pos, SEEK_SET) != 0) - return FALSE; + return false; raw = _bfd_alloc_and_read (abfd, raw_size, raw_size); if (raw == NULL) - return FALSE; + return false; ecoff_data (abfd)->raw_syments = raw; @@ -586,22 +586,22 @@ _bfd_ecoff_slurp_symbolic_info (bfd *abfd, sizeof (struct fdr), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } debug->fdr = (FDR *) bfd_alloc (abfd, amt); if (debug->fdr == NULL) - return FALSE; + return false; external_fdr_size = backend->debug_swap.external_fdr_size; fdr_ptr = debug->fdr; fraw_src = (char *) debug->external_fdr; /* PR 17512: file: 3372-1243-0.004. */ if (fraw_src == NULL && internal_symhdr->ifdMax > 0) - return FALSE; + return false; fraw_end = fraw_src + internal_symhdr->ifdMax * external_fdr_size; for (; fraw_src < fraw_end; fraw_src += external_fdr_size, fdr_ptr++) (*backend->debug_swap.swap_fdr_in) (abfd, (void *) fraw_src, fdr_ptr); - return TRUE; + return true; } /* ECOFF symbol table routines. The ECOFF symbol table is described @@ -632,7 +632,7 @@ _bfd_ecoff_make_empty_symbol (bfd *abfd) return NULL; new_symbol->symbol.section = NULL; new_symbol->fdr = NULL; - new_symbol->local = FALSE; + new_symbol->local = false; new_symbol->native = NULL; new_symbol->symbol.the_bfd = abfd; return &new_symbol->symbol; @@ -640,7 +640,7 @@ _bfd_ecoff_make_empty_symbol (bfd *abfd) /* Set the BFD flags and section for an ECOFF symbol. */ -static bfd_boolean +static bool ecoff_set_symbol_info (bfd *abfd, SYMR *ecoff_sym, asymbol *asym, @@ -665,12 +665,12 @@ ecoff_set_symbol_info (bfd *abfd, if (ECOFF_IS_STAB (ecoff_sym)) { asym->flags = BSF_DEBUGGING; - return TRUE; + return true; } break; default: asym->flags = BSF_DEBUGGING; - return TRUE; + return true; } if (weak) @@ -811,12 +811,12 @@ ecoff_set_symbol_info (bfd *abfd, break; } } - return TRUE; + return true; } /* Read an ECOFF symbol table. */ -bfd_boolean +bool _bfd_ecoff_slurp_symbol_table (bfd *abfd) { const struct ecoff_backend_data * const backend = ecoff_backend (abfd); @@ -838,24 +838,24 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) /* If we've already read in the symbol table, do nothing. */ if (ecoff_data (abfd)->canonical_symbols != NULL) - return TRUE; + return true; /* Get the symbolic information. */ if (! _bfd_ecoff_slurp_symbolic_info (abfd, NULL, &ecoff_data (abfd)->debug_info)) - return FALSE; + return false; if (bfd_get_symcount (abfd) == 0) - return TRUE; + return true; if (_bfd_mul_overflow (bfd_get_symcount (abfd), sizeof (ecoff_symbol_type), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } internal = (ecoff_symbol_type *) bfd_alloc (abfd, amt); if (internal == NULL) - return FALSE; + return false; internal_ptr = internal; eraw_src = (char *) ecoff_data (abfd)->debug_info.external_ext; @@ -871,7 +871,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) /* PR 17512: file: 3372-1000-0.004. */ if (internal_esym.asym.iss >= ecoff_data (abfd)->debug_info.symbolic_header.issExtMax || internal_esym.asym.iss < 0) - return FALSE; + return false; internal_ptr->symbol.name = (ecoff_data (abfd)->debug_info.ssext + internal_esym.asym.iss); @@ -879,7 +879,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) if (!ecoff_set_symbol_info (abfd, &internal_esym.asym, &internal_ptr->symbol, 1, internal_esym.weakext)) - return FALSE; + return false; /* The alpha uses a negative ifd field for section symbols. */ if (internal_esym.ifd >= 0) @@ -893,7 +893,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) } else internal_ptr->fdr = NULL; - internal_ptr->local = FALSE; + internal_ptr->local = false; internal_ptr->native = (void *) eraw_src; } @@ -921,9 +921,9 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) + internal_sym.iss); if (!ecoff_set_symbol_info (abfd, &internal_sym, &internal_ptr->symbol, 0, 0)) - return FALSE; + return false; internal_ptr->fdr = fdr_ptr; - internal_ptr->local = TRUE; + internal_ptr->local = true; internal_ptr->native = (void *) lraw_src; } } @@ -945,7 +945,7 @@ _bfd_ecoff_slurp_symbol_table (bfd *abfd) ecoff_data (abfd)->canonical_symbols = internal; - return TRUE; + return true; } /* Return the amount of space needed for the canonical symbols. */ @@ -1358,7 +1358,7 @@ _bfd_ecoff_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, /* Return whether this is a local label. */ -bfd_boolean +bool _bfd_ecoff_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { @@ -1562,7 +1562,7 @@ _bfd_ecoff_print_symbol (bfd *abfd, /* Read in the relocs for a section. */ -static bfd_boolean +static bool ecoff_slurp_reloc_table (bfd *abfd, asection *section, asymbol **symbols) @@ -1578,18 +1578,18 @@ ecoff_slurp_reloc_table (bfd *abfd, if (section->relocation != NULL || section->reloc_count == 0 || (section->flags & SEC_CONSTRUCTOR) != 0) - return TRUE; + return true; if (! _bfd_ecoff_slurp_symbol_table (abfd)) - return FALSE; + return false; external_reloc_size = backend->external_reloc_size; amt = external_reloc_size * section->reloc_count; if (bfd_seek (abfd, section->rel_filepos, SEEK_SET) != 0) - return FALSE; + return false; external_relocs = _bfd_malloc_and_read (abfd, amt, amt); if (external_relocs == NULL) - return FALSE; + return false; amt = section->reloc_count; amt *= sizeof (arelent); @@ -1597,7 +1597,7 @@ ecoff_slurp_reloc_table (bfd *abfd, if (internal_relocs == NULL) { free (external_relocs); - return FALSE; + return false; } for (i = 0, rptr = internal_relocs; i < section->reloc_count; i++, rptr++) @@ -1668,7 +1668,7 @@ ecoff_slurp_reloc_table (bfd *abfd, section->relocation = internal_relocs; - return TRUE; + return true; } /* Get a canonical list of relocs. */ @@ -1715,7 +1715,7 @@ _bfd_ecoff_canonicalize_reloc (bfd *abfd, and return the name of the source file and the line nearest to the wanted location. */ -bfd_boolean +bool _bfd_ecoff_find_nearest_line (bfd *abfd, asymbol **symbols ATTRIBUTE_UNUSED, asection *section, @@ -1733,7 +1733,7 @@ _bfd_ecoff_find_nearest_line (bfd *abfd, /* Make sure we have the FDR's. */ if (! _bfd_ecoff_slurp_symbolic_info (abfd, NULL, debug_info) || bfd_get_symcount (abfd) == 0) - return FALSE; + return false; if (ecoff_data (abfd)->find_line_info == NULL) { @@ -1742,7 +1742,7 @@ _bfd_ecoff_find_nearest_line (bfd *abfd, ecoff_data (abfd)->find_line_info = (struct ecoff_find_line *) bfd_zalloc (abfd, amt); if (ecoff_data (abfd)->find_line_info == NULL) - return FALSE; + return false; } if (discriminator_ptr) @@ -1766,7 +1766,7 @@ _bfd_ecoff_find_nearest_line (bfd *abfd, the symbol table, so this function only handles the other debugging information. */ -bfd_boolean +bool _bfd_ecoff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { struct ecoff_debug_info *iinfo = &ecoff_data (ibfd)->debug_info; @@ -1774,13 +1774,13 @@ _bfd_ecoff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) int i; asymbol **sym_ptr_ptr; size_t c; - bfd_boolean local; + bool local; /* We only want to copy information over if both BFD's use ECOFF format. */ if (bfd_get_flavour (ibfd) != bfd_target_ecoff_flavour || bfd_get_flavour (obfd) != bfd_target_ecoff_flavour) - return TRUE; + return true; /* Copy the GP value and the register masks. */ ecoff_data (obfd)->gp = ecoff_data (ibfd)->gp; @@ -1796,15 +1796,15 @@ _bfd_ecoff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) c = bfd_get_symcount (obfd); sym_ptr_ptr = bfd_get_outsymbols (obfd); if (c == 0 || sym_ptr_ptr == NULL) - return TRUE; + return true; /* See if there are any local symbols. */ - local = FALSE; + local = false; for (; c > 0; c--, sym_ptr_ptr++) { if (ecoffsymbol (*sym_ptr_ptr)->local) { - local = TRUE; + local = true; break; } } @@ -1867,14 +1867,14 @@ _bfd_ecoff_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) } } - return TRUE; + return true; } /* Set the architecture. The supported architecture is stored in the backend pointer. We always set the architecture anyhow, since many callers ignore the return value. */ -bfd_boolean +bool _bfd_ecoff_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long machine) @@ -1907,7 +1907,7 @@ _bfd_ecoff_sizeof_headers (bfd *abfd, /* Get the contents of a section. */ -bfd_boolean +bool _bfd_ecoff_get_section_contents (bfd *abfd, asection *section, void * location, @@ -1948,7 +1948,7 @@ ecoff_sort_hdrs (const void * arg1, const void * arg2) /* Calculate the file position for each section, and set reloc_filepos. */ -static bfd_boolean +static bool ecoff_compute_section_file_positions (bfd *abfd) { file_ptr sofar, file_sofar; @@ -1956,8 +1956,8 @@ ecoff_compute_section_file_positions (bfd *abfd) asection *current; unsigned int i; file_ptr old_sofar; - bfd_boolean rdata_in_text; - bfd_boolean first_data, first_nonalloc; + bool rdata_in_text; + bool first_data, first_nonalloc; const bfd_vma round = ecoff_backend (abfd)->round; bfd_size_type amt; @@ -1969,7 +1969,7 @@ ecoff_compute_section_file_positions (bfd *abfd) amt *= sizeof (asection *); sorted_hdrs = (asection **) bfd_malloc (amt); if (sorted_hdrs == NULL) - return FALSE; + return false; for (current = abfd->sections, i = 0; current != NULL; current = current->next, i++) @@ -1993,15 +1993,15 @@ ecoff_compute_section_file_positions (bfd *abfd) && ! streq (current->name, _PDATA) && ! streq (current->name, _RCONST)) { - rdata_in_text = FALSE; + rdata_in_text = false; break; } } } ecoff_data (abfd)->rdata_in_text = rdata_in_text; - first_data = TRUE; - first_nonalloc = TRUE; + first_data = true; + first_nonalloc = true; for (i = 0; i < abfd->section_count; i++) { unsigned int alignment_power; @@ -2034,7 +2034,7 @@ ecoff_compute_section_file_positions (bfd *abfd) { sofar = (sofar + round - 1) &~ (round - 1); file_sofar = (file_sofar + round - 1) &~ (round - 1); - first_data = FALSE; + first_data = false; } else if (streq (current->name, _LIB)) { @@ -2052,7 +2052,7 @@ ecoff_compute_section_file_positions (bfd *abfd) /* Skip up to the next page for an unallocated section, such as the .comment section on the Alpha. This leaves room for the .bss section. */ - first_nonalloc = FALSE; + first_nonalloc = false; sofar = (sofar + round - 1) &~ (round - 1); file_sofar = (file_sofar + round - 1) &~ (round - 1); } @@ -2091,7 +2091,7 @@ ecoff_compute_section_file_positions (bfd *abfd) ecoff_data (abfd)->reloc_filepos = file_sofar; - return TRUE; + return true; } /* Determine the location of the relocs for all the sections in the @@ -2112,7 +2112,7 @@ ecoff_compute_reloc_file_positions (bfd *abfd) { if (! ecoff_compute_section_file_positions (abfd)) abort (); - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; } reloc_base = ecoff_data (abfd)->reloc_filepos; @@ -2152,7 +2152,7 @@ ecoff_compute_reloc_file_positions (bfd *abfd) /* Set the contents of a section. */ -bfd_boolean +bool _bfd_ecoff_set_section_contents (bfd *abfd, asection *section, const void * location, @@ -2165,7 +2165,7 @@ _bfd_ecoff_set_section_contents (bfd *abfd, going to set output_has_begun to TRUE. */ if (! abfd->output_has_begun && ! ecoff_compute_section_file_positions (abfd)) - return FALSE; + return false; /* Handle the .lib section specially so that Irix 4 shared libraries work out. See coff_set_section_contents in coffcode.h. */ @@ -2185,38 +2185,38 @@ _bfd_ecoff_set_section_contents (bfd *abfd, } if (count == 0) - return TRUE; + return true; pos = section->filepos + offset; if (bfd_seek (abfd, pos, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; - return TRUE; + return true; } /* Set the GP value for an ECOFF file. This is a hook used by the assembler. */ -bfd_boolean +bool bfd_ecoff_set_gp_value (bfd *abfd, bfd_vma gp_value) { if (bfd_get_flavour (abfd) != bfd_target_ecoff_flavour || bfd_get_format (abfd) != bfd_object) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } ecoff_data (abfd)->gp = gp_value; - return TRUE; + return true; } /* Set the register masks for an ECOFF file. This is a hook used by the assembler. */ -bfd_boolean +bool bfd_ecoff_set_regmasks (bfd *abfd, unsigned long gprmask, unsigned long fprmask, @@ -2228,7 +2228,7 @@ bfd_ecoff_set_regmasks (bfd *abfd, || bfd_get_format (abfd) != bfd_object) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } tdata = ecoff_data (abfd); @@ -2242,13 +2242,13 @@ bfd_ecoff_set_regmasks (bfd *abfd, tdata->cprmask[i] = cprmask[i]; } - return TRUE; + return true; } /* Get ECOFF EXTR information for an external symbol. This function is passed to bfd_ecoff_debug_externals. */ -static bfd_boolean +static bool ecoff_get_extr (asymbol *sym, EXTR *esym) { ecoff_symbol_type *ecoff_sym_ptr; @@ -2261,7 +2261,7 @@ ecoff_get_extr (asymbol *sym, EXTR *esym) if ((sym->flags & BSF_DEBUGGING) != 0 || (sym->flags & BSF_LOCAL) != 0 || (sym->flags & BSF_SECTION_SYM) != 0) - return FALSE; + return false; esym->jmptbl = 0; esym->cobol_main = 0; @@ -2273,13 +2273,13 @@ ecoff_get_extr (asymbol *sym, EXTR *esym) esym->asym.sc = scAbs; esym->asym.reserved = 0; esym->asym.index = indexNil; - return TRUE; + return true; } ecoff_sym_ptr = ecoffsymbol (sym); if (ecoff_sym_ptr->local) - return FALSE; + return false; input_bfd = bfd_asymbol_bfd (sym); (*(ecoff_backend (input_bfd)->debug_swap.swap_ext_in)) @@ -2305,7 +2305,7 @@ ecoff_get_extr (asymbol *sym, EXTR *esym) esym->ifd = input_debug->ifdmap[esym->ifd]; } - return TRUE; + return true; } /* Set the external symbol index. This routine is passed to @@ -2319,7 +2319,7 @@ ecoff_set_index (asymbol *sym, bfd_size_type indx) /* Write out an ECOFF file. */ -bfd_boolean +bool _bfd_ecoff_write_object_contents (bfd *abfd) { const struct ecoff_backend_data * const backend = ecoff_backend (abfd); @@ -2341,10 +2341,10 @@ _bfd_ecoff_write_object_contents (bfd *abfd) bfd_size_type reloc_size; bfd_size_type text_size; bfd_vma text_start; - bfd_boolean set_text_start; + bool set_text_start; bfd_size_type data_size; bfd_vma data_start; - bfd_boolean set_data_start; + bool set_data_start; bfd_size_type bss_size; void * buff = NULL; void * reloc_buff = NULL; @@ -2370,10 +2370,10 @@ _bfd_ecoff_write_object_contents (bfd *abfd) else text_size = 0; text_start = 0; - set_text_start = FALSE; + set_text_start = false; data_size = 0; data_start = 0; - set_data_start = FALSE; + set_data_start = false; bss_size = 0; /* Write section headers to the file. */ @@ -2471,7 +2471,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd) if (! set_text_start || text_start > vma) { text_start = vma; - set_text_start = TRUE; + set_text_start = true; } } else if ((section.s_flags & STYP_RDATA) != 0 @@ -2487,7 +2487,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd) if (! set_data_start || data_start > vma) { data_start = vma; - set_data_start = TRUE; + set_data_start = true; } } else if ((section.s_flags & STYP_BSS) != 0 @@ -2759,12 +2759,12 @@ _bfd_ecoff_write_object_contents (bfd *abfd) if (reloc_buff != NULL) bfd_release (abfd, reloc_buff); free (buff); - return TRUE; + return true; error_return: if (reloc_buff != NULL) bfd_release (abfd, reloc_buff); free (buff); - return FALSE; + return false; } /* Archive handling. ECOFF uses what appears to be a unique type of @@ -2836,7 +2836,7 @@ ecoff_armap_hash (const char *s, /* Read in the armap. */ -bfd_boolean +bool _bfd_ecoff_slurp_armap (bfd *abfd) { char nextname[17]; @@ -2854,12 +2854,12 @@ _bfd_ecoff_slurp_armap (bfd *abfd) /* Get the name of the first element. */ i = bfd_bread ((void *) nextname, (bfd_size_type) 16, abfd); if (i == 0) - return TRUE; + return true; if (i != 16) - return FALSE; + return false; if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) - return FALSE; + return false; /* Irix 4.0.5F apparently can use either an ECOFF armap or a standard COFF armap. We could move the ECOFF armap stuff into @@ -2879,8 +2879,8 @@ _bfd_ecoff_slurp_armap (bfd *abfd) && nextname[ARMAP_OBJECT_ENDIAN_INDEX] != ARMAP_LITTLE_ENDIAN) || ! strneq (nextname + ARMAP_END_INDEX, ARMAP_END, sizeof ARMAP_END - 1)) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } /* Make sure we have the right byte ordering. */ @@ -2890,26 +2890,26 @@ _bfd_ecoff_slurp_armap (bfd *abfd) ^ (bfd_big_endian (abfd)))) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } /* Read in the armap. */ ardata = bfd_ardata (abfd); mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd); if (mapdata == NULL) - return FALSE; + return false; parsed_size = mapdata->parsed_size; free (mapdata); if (parsed_size + 1 < 9) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } raw_armap = (char *) _bfd_alloc_and_read (abfd, parsed_size + 1, parsed_size); if (raw_armap == NULL) - return FALSE; + return false; raw_armap[parsed_size] = 0; ardata->tdata = (void *) raw_armap; @@ -2995,8 +2995,8 @@ _bfd_ecoff_slurp_armap (bfd *abfd) ardata->first_file_filepos = bfd_tell (abfd); /* Pad to an even boundary. */ ardata->first_file_filepos += ardata->first_file_filepos % 2; - abfd->has_armap = TRUE; - return TRUE; + abfd->has_armap = true; + return true; error_malformed: bfd_set_error (bfd_error_malformed_archive); @@ -3005,12 +3005,12 @@ _bfd_ecoff_slurp_armap (bfd *abfd) ardata->symdefs = NULL; ardata->tdata = NULL; bfd_release (abfd, raw_armap); - return FALSE; + return false; } /* Write out an armap. */ -bfd_boolean +bool _bfd_ecoff_write_armap (bfd *abfd, unsigned int elength, struct orl *map, @@ -3090,15 +3090,15 @@ _bfd_ecoff_write_armap (bfd *abfd, if (bfd_bwrite ((void *) &hdr, (bfd_size_type) sizeof (struct ar_hdr), abfd) != sizeof (struct ar_hdr)) - return FALSE; + return false; H_PUT_32 (abfd, hashsize, temp); if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4) - return FALSE; + return false; hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize); if (!hashtable) - return FALSE; + return false; current = abfd->archive_head; last_elt = current; @@ -3143,21 +3143,21 @@ _bfd_ecoff_write_armap (bfd *abfd, } if (bfd_bwrite ((void *) hashtable, symdefsize, abfd) != symdefsize) - return FALSE; + return false; bfd_release (abfd, hashtable); /* Now write the strings. */ H_PUT_32 (abfd, stringsize, temp); if (bfd_bwrite ((void *) temp, (bfd_size_type) 4, abfd) != 4) - return FALSE; + return false; for (i = 0; i < orl_count; i++) { bfd_size_type len; len = strlen (*map[i].name) + 1; if (bfd_bwrite ((void *) (*map[i].name), len, abfd) != len) - return FALSE; + return false; } /* The spec sez this should be a newline. But in order to be @@ -3165,10 +3165,10 @@ _bfd_ecoff_write_armap (bfd *abfd, if (padit) { if (bfd_bwrite ("", (bfd_size_type) 1, abfd) != 1) - return FALSE; + return false; } - return TRUE; + return true; } /* ECOFF linker code. */ @@ -3246,7 +3246,7 @@ _bfd_ecoff_bfd_link_hash_table_create (bfd *abfd) explicitly save any information we may need later on in the link. We do not want to read the external symbol information again. */ -static bfd_boolean +static bool ecoff_link_add_externals (bfd *abfd, struct bfd_link_info *info, void * external_ext, @@ -3268,7 +3268,7 @@ ecoff_link_add_externals (bfd *abfd, amt *= sizeof (struct bfd_link_hash_entry *); sym_hash = (struct bfd_link_hash_entry **) bfd_alloc (abfd, amt); if (!sym_hash) - return FALSE; + return false; ecoff_data (abfd)->sym_hashes = (struct ecoff_link_hash_entry **) sym_hash; ext_ptr = (char *) external_ext; @@ -3276,7 +3276,7 @@ ecoff_link_add_externals (bfd *abfd, for (; ext_ptr < ext_end; ext_ptr += external_ext_size, sym_hash++) { EXTR esym; - bfd_boolean skip; + bool skip; bfd_vma value; asection *section; const char *name; @@ -3287,7 +3287,7 @@ ecoff_link_add_externals (bfd *abfd, (*swap_ext_in) (abfd, (void *) ext_ptr, &esym); /* Skip debugging symbols. */ - skip = FALSE; + skip = false; switch (esym.asym.st) { case stGlobal: @@ -3297,7 +3297,7 @@ ecoff_link_add_externals (bfd *abfd, case stStaticProc: break; default: - skip = TRUE; + skip = true; break; } @@ -3390,8 +3390,8 @@ ecoff_link_add_externals (bfd *abfd, if (! (_bfd_generic_link_add_one_symbol (info, abfd, name, (flagword) (esym.weakext ? BSF_WEAK : BSF_GLOBAL), - section, value, NULL, TRUE, TRUE, sym_hash))) - return FALSE; + section, value, NULL, true, true, sym_hash))) + return false; h = (struct ecoff_link_hash_entry *) *sym_hash; @@ -3431,13 +3431,13 @@ ecoff_link_add_externals (bfd *abfd, } } - return TRUE; + return true; } /* Add symbols from an ECOFF object file to the global linker hash table. */ -static bfd_boolean +static bool ecoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { HDRR *symhdr; @@ -3445,20 +3445,20 @@ ecoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) void * external_ext = NULL; bfd_size_type esize; char *ssext = NULL; - bfd_boolean result; + bool result; if (! ecoff_slurp_symbolic_header (abfd)) - return FALSE; + return false; /* If there are no symbols, we don't want it. */ if (bfd_get_symcount (abfd) == 0) - return TRUE; + return true; symhdr = &ecoff_data (abfd)->debug_info.symbolic_header; /* Read in the external symbols and external strings. */ if (bfd_seek (abfd, symhdr->cbExtOffset, SEEK_SET) != 0) - return FALSE; + return false; external_ext_size = ecoff_backend (abfd)->debug_swap.external_ext_size; esize = symhdr->iextMax * external_ext_size; external_ext = _bfd_malloc_and_read (abfd, esize, esize); @@ -3481,30 +3481,30 @@ ecoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) error_return: free (ssext); free (external_ext); - return FALSE; + return false; } /* This is called if we used _bfd_generic_link_add_archive_symbols because we were not dealing with an ECOFF archive. */ -static bfd_boolean +static bool ecoff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h, const char *name, - bfd_boolean *pneeded) + bool *pneeded) { - *pneeded = FALSE; + *pneeded = false; /* Unlike the generic linker, we do not pull in elements because of common symbols. */ if (h->type != bfd_link_hash_undefined) - return TRUE; + return true; /* Include this element? */ if (!(*info->callbacks->add_archive_element) (info, abfd, name, &abfd)) - return TRUE; - *pneeded = TRUE; + return true; + *pneeded = true; return ecoff_link_add_object_symbols (abfd, info); } @@ -3516,7 +3516,7 @@ ecoff_link_check_archive_element (bfd *abfd, already have a hash table, so there is no reason to construct another one. */ -static bfd_boolean +static bool ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { const struct ecoff_backend_data * const backend = ecoff_backend (abfd); @@ -3532,9 +3532,9 @@ ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { /* An empty archive is a special case. */ if (bfd_openr_next_archived_file (abfd, NULL) == NULL) - return TRUE; + return true; bfd_set_error (bfd_error_no_armap); - return FALSE; + return false; } /* If we don't have any raw data for this archive, as can happen on @@ -3612,10 +3612,10 @@ ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) || ! streq (name, h->root.string)) { unsigned int srch; - bfd_boolean found; + bool found; /* That was the wrong symbol. Try rehashing. */ - found = FALSE; + found = false; for (srch = (hash + rehash) & (armap_count - 1); srch != hash; srch = (srch + rehash) & (armap_count - 1)) @@ -3627,7 +3627,7 @@ ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) if (name[0] == h->root.string[0] && streq (name, h->root.string)) { - found = TRUE; + found = true; break; } } @@ -3643,30 +3643,30 @@ ecoff_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) element = (*backend->get_elt_at_filepos) (abfd, (file_ptr) file_offset); if (element == NULL) - return FALSE; + return false; if (! bfd_check_format (element, bfd_object)) - return FALSE; + return false; /* Unlike the generic linker, we know that this element provides a definition for an undefined symbol and we know that we want to include it. We don't need to check anything. */ if (!(*info->callbacks ->add_archive_element) (info, element, name, &element)) - return FALSE; + return false; if (! ecoff_link_add_object_symbols (element, info)) - return FALSE; + return false; pundef = &(*pundef)->u.undef.next; } - return TRUE; + return true; } /* Given an ECOFF BFD, add symbols to the global hash table as appropriate. */ -bfd_boolean +bool _bfd_ecoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -3677,7 +3677,7 @@ _bfd_ecoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) return ecoff_link_add_archive_symbols (abfd, info); default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } @@ -3696,7 +3696,7 @@ struct extsym_info output BFD. This must read in the symbolic information of the input BFD. */ -static bfd_boolean +static bool ecoff_final_link_debug_accumulate (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info, @@ -3706,7 +3706,7 @@ ecoff_final_link_debug_accumulate (bfd *output_bfd, const struct ecoff_debug_swap * const swap = &ecoff_backend (input_bfd)->debug_swap; HDRR *symhdr = &debug->symbolic_header; - bfd_boolean ret; + bool ret; #define READ(ptr, offset, count, size, type) \ do \ @@ -3718,18 +3718,18 @@ ecoff_final_link_debug_accumulate (bfd *output_bfd, if (_bfd_mul_overflow (size, symhdr->count, &amt)) \ { \ bfd_set_error (bfd_error_file_too_big); \ - ret = FALSE; \ + ret = false; \ goto return_something; \ } \ if (bfd_seek (input_bfd, symhdr->offset, SEEK_SET) != 0) \ { \ - ret = FALSE; \ + ret = false; \ goto return_something; \ } \ debug->ptr = (type) _bfd_malloc_and_read (input_bfd, amt, amt); \ if (debug->ptr == NULL) \ { \ - ret = FALSE; \ + ret = false; \ goto return_something; \ } \ } while (0) @@ -3790,7 +3790,7 @@ ecoff_final_link_debug_accumulate (bfd *output_bfd, /* Relocate and write an ECOFF section into an ECOFF output file. */ -static bfd_boolean +static bool ecoff_indirect_link_order (bfd *output_bfd, struct bfd_link_info *info, asection *output_section, @@ -3808,7 +3808,7 @@ ecoff_indirect_link_order (bfd *output_bfd, input_section = link_order->u.indirect.section; input_bfd = input_section->owner; if (input_section->size == 0) - return TRUE; + return true; BFD_ASSERT (input_section->output_section == output_section); BFD_ASSERT (input_section->output_offset == link_order->offset); @@ -3861,12 +3861,12 @@ ecoff_indirect_link_order (bfd *output_bfd, free (contents); free (external_relocs); - return TRUE; + return true; error_return: free (contents); free (external_relocs); - return FALSE; + return false; } /* Generate a reloc when linking an ECOFF file. This is a reloc @@ -3874,7 +3874,7 @@ ecoff_indirect_link_order (bfd *output_bfd, is used to build constructor and destructor tables when linking with -Ur. */ -static bfd_boolean +static bool ecoff_reloc_link_order (bfd *output_bfd, struct bfd_link_info *info, asection *output_section, @@ -3887,7 +3887,7 @@ ecoff_reloc_link_order (bfd *output_bfd, struct internal_reloc in; bfd_size_type external_reloc_size; bfd_byte *rbuf; - bfd_boolean ok; + bool ok; file_ptr pos; type = link_order->type; @@ -3902,7 +3902,7 @@ ecoff_reloc_link_order (bfd *output_bfd, if (rel.howto == 0) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (type == bfd_section_reloc_link_order) @@ -3918,7 +3918,7 @@ ecoff_reloc_link_order (bfd *output_bfd, actually against the section. */ h = bfd_wrapped_link_hash_lookup (output_bfd, info, link_order->u.reloc.p->u.name, - FALSE, FALSE, FALSE); + false, false, false); if (h != NULL && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak)) @@ -3952,7 +3952,7 @@ ecoff_reloc_link_order (bfd *output_bfd, size = bfd_get_reloc_size (rel.howto); buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL && size != 0) - return FALSE; + return false; rstat = _bfd_relocate_contents (rel.howto, output_bfd, (bfd_vma) addend, buf); switch (rstat) @@ -3975,7 +3975,7 @@ ecoff_reloc_link_order (bfd *output_bfd, (file_ptr) link_order->offset, size); free (buf); if (! ok) - return FALSE; + return false; } rel.addend = 0; @@ -3991,7 +3991,7 @@ ecoff_reloc_link_order (bfd *output_bfd, h = ((struct ecoff_link_hash_entry *) bfd_wrapped_link_hash_lookup (output_bfd, info, link_order->u.reloc.p->u.name, - FALSE, FALSE, TRUE)); + false, false, true)); if (h != NULL && h->indx != -1) in.r_symndx = h->indx; @@ -4053,7 +4053,7 @@ ecoff_reloc_link_order (bfd *output_bfd, external_reloc_size = ecoff_backend (output_bfd)->external_reloc_size; rbuf = (bfd_byte *) bfd_malloc (external_reloc_size); if (rbuf == NULL) - return FALSE; + return false; (*ecoff_backend (output_bfd)->swap_reloc_out) (output_bfd, &in, (void *) rbuf); @@ -4074,36 +4074,36 @@ ecoff_reloc_link_order (bfd *output_bfd, /* Put out information for an external symbol. These come only from the hash table. */ -static bfd_boolean +static bool ecoff_link_write_external (struct bfd_hash_entry *bh, void * data) { struct ecoff_link_hash_entry *h = (struct ecoff_link_hash_entry *) bh; struct extsym_info *einfo = (struct extsym_info *) data; bfd *output_bfd = einfo->abfd; - bfd_boolean strip; + bool strip; if (h->root.type == bfd_link_hash_warning) { h = (struct ecoff_link_hash_entry *) h->root.u.i.link; if (h->root.type == bfd_link_hash_new) - return TRUE; + return true; } /* We need to check if this symbol is being stripped. */ if (h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak) - strip = FALSE; + strip = false; else if (einfo->info->strip == strip_all || (einfo->info->strip == strip_some && bfd_hash_lookup (einfo->info->keep_hash, h->root.root.string, - FALSE, FALSE) == NULL)) - strip = TRUE; + false, false) == NULL)) + strip = true; else - strip = FALSE; + strip = false; if (strip || h->written) - return TRUE; + return true; if (h->abfd == NULL) { @@ -4206,7 +4206,7 @@ ecoff_link_write_external (struct bfd_hash_entry *bh, void * data) case bfd_link_hash_indirect: /* We ignore these symbols, since the indirected symbol is already in the hash table. */ - return TRUE; + return true; } /* bfd_ecoff_debug_one_external uses iextMax to keep track of the @@ -4225,7 +4225,7 @@ ecoff_link_write_external (struct bfd_hash_entry *bh, void * data) processes all the link order information. This may cause it to close and reopen some input BFDs; I'll see how bad this is. */ -bfd_boolean +bool _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { const struct ecoff_backend_data * const backend = ecoff_backend (abfd); @@ -4270,14 +4270,14 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) handle = bfd_ecoff_debug_init (abfd, debug, &backend->debug_swap, info); if (handle == NULL) - return FALSE; + return false; /* Accumulate the debugging symbols from each input BFD. */ for (input_bfd = info->input_bfds; input_bfd != NULL; input_bfd = input_bfd->link.next) { - bfd_boolean ret; + bool ret; if (bfd_get_flavour (input_bfd) == bfd_target_ecoff_flavour) { @@ -4294,7 +4294,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) debug, &backend->debug_swap, input_bfd, info); if (! ret) - return FALSE; + return false; /* Combine the register masks. */ ecoff_data (abfd)->gprmask |= ecoff_data (input_bfd)->gprmask; @@ -4336,7 +4336,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_ecoff_write_accumulated_debug (handle, abfd, debug, &backend->debug_swap, info, ecoff_data (abfd)->sym_filepos)) - return FALSE; + return false; bfd_ecoff_debug_free (handle, abfd, debug, &backend->debug_swap, info); @@ -4354,7 +4354,7 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_gp", false, false, true); if (h != NULL && h->type == bfd_link_hash_defined) ecoff_data (abfd)->gp = (h->u.def.value @@ -4397,25 +4397,25 @@ _bfd_ecoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) == bfd_target_ecoff_flavour)) { if (! ecoff_indirect_link_order (abfd, info, o, p)) - return FALSE; + return false; } else if (p->type == bfd_section_reloc_link_order || p->type == bfd_symbol_reloc_link_order) { if (! ecoff_reloc_link_order (abfd, info, o, p)) - return FALSE; + return false; } else { if (! _bfd_default_link_order (abfd, info, o, p)) - return FALSE; + return false; } } } abfd->symcount = symhdr->iextMax + symhdr->isymMax; - ecoff_data (abfd)->linker = TRUE; + ecoff_data (abfd)->linker = true; - return TRUE; + return true; } diff --git a/bfd/ecofflink.c b/bfd/ecofflink.c index ef3bce7219..9f72409d6b 100644 --- a/bfd/ecofflink.c +++ b/bfd/ecofflink.c @@ -240,7 +240,7 @@ _bfd_ecoff_swap_rndx_out (int bigend, /* Add bytes to a buffer. Return success. */ -static bfd_boolean +static bool ecoff_add_bytes (char **buf, char **bufend, size_t need) { size_t have; @@ -258,10 +258,10 @@ ecoff_add_bytes (char **buf, char **bufend, size_t need) } newbuf = (char *) bfd_realloc (*buf, (bfd_size_type) have + want); if (newbuf == NULL) - return FALSE; + return false; *buf = newbuf; *bufend = *buf + have + want; - return TRUE; + return true; } /* We keep a hash table which maps strings to numbers. We use it to @@ -330,7 +330,7 @@ struct shuffle /* The length of the information. */ unsigned long size; /* Whether this information comes from a file or not. */ - bfd_boolean filep; + bool filep; union { struct @@ -383,7 +383,7 @@ struct accumulate /* Add a file entry to a shuffle list. */ -static bfd_boolean +static bool add_file_shuffle (struct accumulate *ainfo, struct shuffle **head, struct shuffle **tail, @@ -402,7 +402,7 @@ add_file_shuffle (struct accumulate *ainfo, (*tail)->size += size; if ((*tail)->size > ainfo->largest_file_shuffle) ainfo->largest_file_shuffle = (*tail)->size; - return TRUE; + return true; } n = (struct shuffle *) objalloc_alloc (ainfo->memory, @@ -410,11 +410,11 @@ add_file_shuffle (struct accumulate *ainfo, if (!n) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } n->next = NULL; n->size = size; - n->filep = TRUE; + n->filep = true; n->u.file.input_bfd = input_bfd; n->u.file.offset = offset; if (*head == (struct shuffle *) NULL) @@ -424,12 +424,12 @@ add_file_shuffle (struct accumulate *ainfo, *tail = n; if (size > ainfo->largest_file_shuffle) ainfo->largest_file_shuffle = size; - return TRUE; + return true; } /* Add a memory entry to a shuffle list. */ -static bfd_boolean +static bool add_memory_shuffle (struct accumulate *ainfo, struct shuffle **head, struct shuffle **tail, @@ -443,18 +443,18 @@ add_memory_shuffle (struct accumulate *ainfo, if (!n) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } n->next = NULL; n->size = size; - n->filep = FALSE; + n->filep = false; n->u.memory = data; if (*head == (struct shuffle *) NULL) *head = n; if (*tail != (struct shuffle *) NULL) (*tail)->next = n; *tail = n; - return TRUE; + return true; } /* Initialize the FDR hash table. This returns a handle which is then @@ -546,7 +546,7 @@ bfd_ecoff_debug_free (void * handle, linker information structure. HANDLE is returned by bfd_ecoff_debug_init. */ -bfd_boolean +bool bfd_ecoff_debug_accumulate (void * handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, @@ -639,10 +639,10 @@ bfd_ecoff_debug_accumulate (void * handle, if (!input_debug->ifdmap || !rfd_out) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } if (!add_memory_shuffle (ainfo, &ainfo->rfd, &ainfo->rfd_end, rfd_out, sz)) - return FALSE; + return false; copied = 0; @@ -683,14 +683,14 @@ bfd_ecoff_debug_accumulate (void * handle, lookup = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 20); if (lookup == NULL) - return FALSE; + return false; sprintf (lookup, "%s %lx %lx", name, (unsigned long) fdr.csym, (unsigned long) fdr.caux); - fh = string_hash_lookup (&ainfo->fdr_hash, lookup, TRUE, TRUE); + fh = string_hash_lookup (&ainfo->fdr_hash, lookup, true, true); free (lookup); if (fh == (struct string_hash_entry *) NULL) - return FALSE; + return false; if (fh->val != -1) { @@ -740,10 +740,10 @@ bfd_ecoff_debug_accumulate (void * handle, if (!fdr_out) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } if (!add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end, fdr_out, sz)) - return FALSE; + return false; for (fdr_ptr = fdr_start, i = 0; fdr_ptr < fdr_end; fdr_ptr += fdr_add, i++) @@ -752,7 +752,7 @@ bfd_ecoff_debug_accumulate (void * handle, bfd_byte *sym_out; bfd_byte *lraw_src; bfd_byte *lraw_end; - bfd_boolean fgotfilename; + bool fgotfilename; if (input_debug->ifdmap[i] < output_symhdr->ifdMax) { @@ -772,17 +772,17 @@ bfd_ecoff_debug_accumulate (void * handle, /* Swap in the local symbols, adjust their values, and swap them out again. */ - fgotfilename = FALSE; + fgotfilename = false; sz = fdr.csym * external_sym_size; sym_out = (bfd_byte *) objalloc_alloc (ainfo->memory, sz); if (!sym_out) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } if (!add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end, sym_out, sz)) - return FALSE; + return false; lraw_src = ((bfd_byte *) input_debug->external_sym + fdr.isymBase * input_swap->external_sym_size); lraw_end = lraw_src + fdr.csym * input_swap->external_sym_size; @@ -821,13 +821,13 @@ bfd_ecoff_debug_accumulate (void * handle, prevent us from easily merging different FDR's. */ if (! bfd_link_relocatable (info)) { - bfd_boolean ffilename; + bool ffilename; const char *name; if (! fgotfilename && internal_sym.iss == fdr.rss) - ffilename = TRUE; + ffilename = true; else - ffilename = FALSE; + ffilename = false; /* Hash the name into the string table. */ name = input_debug->ss + fdr.issBase + internal_sym.iss; @@ -837,9 +837,9 @@ bfd_ecoff_debug_accumulate (void * handle, { struct string_hash_entry *sh; - sh = string_hash_lookup (&ainfo->str_hash, name, TRUE, TRUE); + sh = string_hash_lookup (&ainfo->str_hash, name, true, true); if (sh == (struct string_hash_entry *) NULL) - return FALSE; + return false; if (sh->val == -1) { sh->val = output_symhdr->issMax; @@ -857,7 +857,7 @@ bfd_ecoff_debug_accumulate (void * handle, if (ffilename) { fdr.rss = internal_sym.iss; - fgotfilename = TRUE; + fgotfilename = true; } } @@ -879,7 +879,7 @@ bfd_ecoff_debug_accumulate (void * handle, file_ptr pos = input_symhdr->cbLineOffset + fdr.cbLineOffset; if (!add_file_shuffle (ainfo, &ainfo->line, &ainfo->line_end, input_bfd, pos, (unsigned long) fdr.cbLine)) - return FALSE; + return false; fdr.ilineBase = output_symhdr->ilineMax; fdr.cbLineOffset = output_symhdr->cbLine; output_symhdr->ilineMax += fdr.cline; @@ -892,7 +892,7 @@ bfd_ecoff_debug_accumulate (void * handle, if (!add_file_shuffle (ainfo, &ainfo->aux, &ainfo->aux_end, input_bfd, pos, fdr.caux * sizeof (union aux_ext))) - return FALSE; + return false; fdr.iauxBase = output_symhdr->iauxMax; output_symhdr->iauxMax += fdr.caux; } @@ -911,7 +911,7 @@ bfd_ecoff_debug_accumulate (void * handle, file_ptr pos = input_symhdr->cbSsOffset + fdr.issBase; if (!add_file_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end, input_bfd, pos, (unsigned long) fdr.cbSs)) - return FALSE; + return false; fdr.issBase = output_symhdr->issMax; output_symhdr->issMax += fdr.cbSs; } @@ -930,7 +930,7 @@ bfd_ecoff_debug_accumulate (void * handle, unsigned long size = fdr.cpd * external_pdr_size; if (!add_file_shuffle (ainfo, &ainfo->pdr, &ainfo->pdr_end, input_bfd, pos, size)) - return FALSE; + return false; } BFD_ASSERT (external_opt_size == input_swap->external_opt_size); if (fdr.copt > 0) @@ -940,7 +940,7 @@ bfd_ecoff_debug_accumulate (void * handle, unsigned long size = fdr.copt * external_opt_size; if (!add_file_shuffle (ainfo, &ainfo->opt, &ainfo->opt_end, input_bfd, pos, size)) - return FALSE; + return false; } } else @@ -963,11 +963,11 @@ bfd_ecoff_debug_accumulate (void * handle, if (!out) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } if (!add_memory_shuffle (ainfo, &ainfo->pdr, &ainfo->pdr_end, out, sz)) - return FALSE; + return false; for (; in < end; in += insz, out += outsz) { PDR pdr; @@ -987,11 +987,11 @@ bfd_ecoff_debug_accumulate (void * handle, if (!out) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } if (!add_memory_shuffle (ainfo, &ainfo->opt, &ainfo->opt_end, out, sz)) - return FALSE; + return false; for (; in < end; in += insz, out += outsz) { OPTR opt; @@ -1023,7 +1023,7 @@ bfd_ecoff_debug_accumulate (void * handle, ++output_symhdr->ifdMax; } - return TRUE; + return true; } /* Add a string to the debugging information we are accumulating. @@ -1055,7 +1055,7 @@ ecoff_add_string (struct accumulate *ainfo, { struct string_hash_entry *sh; - sh = string_hash_lookup (&ainfo->str_hash, string, TRUE, TRUE); + sh = string_hash_lookup (&ainfo->str_hash, string, true, true); if (sh == (struct string_hash_entry *) NULL) return -1; if (sh->val == -1) @@ -1077,7 +1077,7 @@ ecoff_add_string (struct accumulate *ainfo, /* Add debugging information from a non-ECOFF file. */ -bfd_boolean +bool bfd_ecoff_debug_accumulate_other (void * handle, bfd *output_bfd, struct ecoff_debug_info *output_debug, @@ -1114,19 +1114,19 @@ bfd_ecoff_debug_accumulate_other (void * handle, fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr, bfd_get_filename (input_bfd)); if (fdr.rss == -1) - return FALSE; + return false; fdr.isymBase = output_symhdr->isymMax; /* Get the local symbols from the input BFD. */ symsize = bfd_get_symtab_upper_bound (input_bfd); if (symsize < 0) - return FALSE; + return false; symbols = (asymbol **) bfd_alloc (output_bfd, (bfd_size_type) symsize); if (symbols == (asymbol **) NULL) - return FALSE; + return false; symcount = bfd_canonicalize_symtab (input_bfd, symbols); if (symcount < 0) - return FALSE; + return false; sym_end = symbols + symcount; /* Handle the local symbols. Any external symbols are handled @@ -1144,7 +1144,7 @@ bfd_ecoff_debug_accumulate_other (void * handle, (*sym_ptr)->name); if (internal_sym.iss == -1) - return FALSE; + return false; if (bfd_is_com_section ((*sym_ptr)->section) || bfd_is_und_section ((*sym_ptr)->section)) internal_sym.value = (*sym_ptr)->value; @@ -1161,7 +1161,7 @@ bfd_ecoff_debug_accumulate_other (void * handle, if (!external_sym) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } (*swap_sym_out) (output_bfd, &internal_sym, external_sym); add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end, @@ -1182,7 +1182,7 @@ bfd_ecoff_debug_accumulate_other (void * handle, if (!external_fdr) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } (*output_swap->swap_fdr_out) (output_bfd, &fdr, external_fdr); add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end, @@ -1191,7 +1191,7 @@ bfd_ecoff_debug_accumulate_other (void * handle, ++output_symhdr->ifdMax; - return TRUE; + return true; } /* Set up ECOFF debugging information for the external symbols. @@ -1199,12 +1199,12 @@ bfd_ecoff_debug_accumulate_other (void * handle, probably be changed to use a shuffle structure. The assembler uses this interface, so that must be changed to do something else. */ -bfd_boolean +bool bfd_ecoff_debug_externals (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, - bfd_boolean relocatable, - bfd_boolean (*get_extr) (asymbol *, EXTR *), + bool relocatable, + bool (*get_extr) (asymbol *, EXTR *), void (*set_index) (asymbol *, bfd_size_type)) { HDRR * const symhdr = &debug->symbolic_header; @@ -1213,7 +1213,7 @@ bfd_ecoff_debug_externals (bfd *abfd, sym_ptr_ptr = bfd_get_outsymbols (abfd); if (sym_ptr_ptr == NULL) - return TRUE; + return true; for (c = bfd_get_symcount (abfd); c > 0; c--, sym_ptr_ptr++) { @@ -1258,15 +1258,15 @@ bfd_ecoff_debug_externals (bfd *abfd, if (! bfd_ecoff_debug_one_external (abfd, debug, swap, sym_ptr->name, &esym)) - return FALSE; + return false; } - return TRUE; + return true; } /* Add a single external symbol to the debugging information. */ -bfd_boolean +bool bfd_ecoff_debug_one_external (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, @@ -1287,7 +1287,7 @@ bfd_ecoff_debug_one_external (bfd *abfd, if (! ecoff_add_bytes ((char **) &debug->ssext, (char **) &debug->ssext_end, symhdr->issExtMax + namelen + 1)) - return FALSE; + return false; } if ((size_t) ((char *) debug->external_ext_end - (char *) debug->external_ext) @@ -1298,7 +1298,7 @@ bfd_ecoff_debug_one_external (bfd *abfd, if (! ecoff_add_bytes ((char **) &external_ext, (char **) &external_ext_end, (symhdr->iextMax + 1) * (size_t) external_ext_size)) - return FALSE; + return false; debug->external_ext = external_ext; debug->external_ext_end = external_ext_end; } @@ -1314,7 +1314,7 @@ bfd_ecoff_debug_one_external (bfd *abfd, strcpy (debug->ssext + symhdr->issExtMax, name); symhdr->issExtMax += namelen + 1; - return TRUE; + return true; } /* Align the ECOFF debugging information. */ @@ -1413,7 +1413,7 @@ bfd_ecoff_debug_size (bfd *abfd, going to be placed at. This assumes that the counts are set correctly. */ -static bfd_boolean +static bool ecoff_write_symhdr (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, @@ -1426,7 +1426,7 @@ ecoff_write_symhdr (bfd *abfd, /* Go to the right location in the file. */ if (bfd_seek (abfd, where, SEEK_SET) != 0) - return FALSE; + return false; where += swap->external_hdr_size; @@ -1465,10 +1465,10 @@ ecoff_write_symhdr (bfd *abfd, goto error_return; free (buff); - return TRUE; + return true; error_return: free (buff); - return FALSE; + return false; } /* Write out the ECOFF debugging information. This function assumes @@ -1477,7 +1477,7 @@ ecoff_write_symhdr (bfd *abfd, information to. This function fills in the file offsets in the symbolic header. */ -bfd_boolean +bool bfd_ecoff_write_debug (bfd *abfd, struct ecoff_debug_info *debug, const struct ecoff_debug_swap *swap, @@ -1486,7 +1486,7 @@ bfd_ecoff_write_debug (bfd *abfd, HDRR * const symhdr = &debug->symbolic_header; if (! ecoff_write_symhdr (abfd, debug, swap, where)) - return FALSE; + return false; #define WRITE(ptr, count, size, offset) \ BFD_ASSERT (symhdr->offset == 0 \ @@ -1495,7 +1495,7 @@ bfd_ecoff_write_debug (bfd *abfd, && bfd_bwrite (debug->ptr, \ (bfd_size_type) size * symhdr->count, \ abfd) != size * symhdr->count) \ - return FALSE; + return false; WRITE (line, cbLine, sizeof (unsigned char), cbLineOffset); WRITE (external_dnr, idnMax, swap->external_dnr_size, cbDnOffset); @@ -1511,13 +1511,13 @@ bfd_ecoff_write_debug (bfd *abfd, WRITE (external_ext, iextMax, swap->external_ext_size, cbExtOffset); #undef WRITE - return TRUE; + return true; } /* Write out a shuffle list. */ -static bfd_boolean +static bool ecoff_write_shuffle (bfd *abfd, const struct ecoff_debug_swap *swap, struct shuffle *shuffle, @@ -1533,7 +1533,7 @@ ecoff_write_shuffle (bfd *abfd, { if (bfd_bwrite (l->u.memory, (bfd_size_type) l->size, abfd) != l->size) - return FALSE; + return false; } else { @@ -1541,7 +1541,7 @@ ecoff_write_shuffle (bfd *abfd, || bfd_bread (space, (bfd_size_type) l->size, l->u.file.input_bfd) != l->size || bfd_bwrite (space, (bfd_size_type) l->size, abfd) != l->size) - return FALSE; + return false; } total += l->size; } @@ -1554,23 +1554,23 @@ ecoff_write_shuffle (bfd *abfd, i = swap->debug_align - (total & (swap->debug_align - 1)); s = (bfd_byte *) bfd_zmalloc ((bfd_size_type) i); if (s == NULL && i != 0) - return FALSE; + return false; if (bfd_bwrite (s, (bfd_size_type) i, abfd) != i) { free (s); - return FALSE; + return false; } free (s); } - return TRUE; + return true; } /* Write out debugging information using accumulated linker information. */ -bfd_boolean +bool bfd_ecoff_write_accumulated_debug (void * handle, bfd *abfd, struct ecoff_debug_info *debug, @@ -1686,11 +1686,11 @@ bfd_ecoff_write_accumulated_debug (void * handle, goto error_return; free (space); - return TRUE; + return true; error_return: free (space); - return FALSE; + return false; } /* Handle the find_nearest_line function for both ECOFF and MIPS ELF @@ -1719,7 +1719,7 @@ cmp_fdrtab_entry (const void * leftp, const void * rightp) table will be sorted by address so we can look it up via binary search. */ -static bfd_boolean +static bool mk_fdrtab (bfd *abfd, struct ecoff_debug_info * const debug_info, const struct ecoff_debug_swap * const debug_swap, @@ -1729,7 +1729,7 @@ mk_fdrtab (bfd *abfd, FDR *fdr_ptr; FDR *fdr_start; FDR *fdr_end; - bfd_boolean stabs; + bool stabs; long len; bfd_size_type amt; @@ -1748,7 +1748,7 @@ mk_fdrtab (bfd *abfd, amt = (bfd_size_type) len * sizeof (struct ecoff_fdrtab_entry); line_info->fdrtab = (struct ecoff_fdrtab_entry*) bfd_zalloc (abfd, amt); if (line_info->fdrtab == NULL) - return FALSE; + return false; line_info->fdrtab_len = len; tab = line_info->fdrtab; @@ -1760,7 +1760,7 @@ mk_fdrtab (bfd *abfd, /* Check whether this file has stabs debugging information. In a file with stabs debugging information, the second local symbol is named @stabs. */ - stabs = FALSE; + stabs = false; if (fdr_ptr->csym >= 2) { char *sym_ptr; @@ -1771,7 +1771,7 @@ mk_fdrtab (bfd *abfd, (*debug_swap->swap_sym_in) (abfd, sym_ptr, &sym); if (strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss, STABS_SYMBOL) == 0) - stabs = TRUE; + stabs = true; } if (!stabs) @@ -1805,7 +1805,7 @@ mk_fdrtab (bfd *abfd, qsort (line_info->fdrtab, (size_t) len, sizeof (struct ecoff_fdrtab_entry), cmp_fdrtab_entry); - return TRUE; + return true; } /* Return index of first FDR that covers to OFFSET. */ @@ -1858,7 +1858,7 @@ fdrtab_lookup (struct ecoff_find_line *line_info, bfd_vma offset) /* Look up a line given an address, storing the information in LINE_INFO->cache. */ -static bfd_boolean +static bool lookup_line (bfd *abfd, struct ecoff_debug_info * const debug_info, const struct ecoff_debug_swap * const debug_swap, @@ -1866,7 +1866,7 @@ lookup_line (bfd *abfd, { struct ecoff_fdrtab_entry *tab; bfd_vma offset; - bfd_boolean stabs; + bool stabs; FDR *fdr_ptr; int i; @@ -1877,14 +1877,14 @@ lookup_line (bfd *abfd, don't have it already. */ if (line_info->fdrtab == NULL && !mk_fdrtab (abfd, debug_info, debug_swap, line_info)) - return FALSE; + return false; tab = line_info->fdrtab; /* Find first FDR for address OFFSET. */ i = fdrtab_lookup (line_info, offset); if (i < 0) - return FALSE; /* no FDR, no fun... */ + return false; /* no FDR, no fun... */ /* eraxxon: 'fdrtab_lookup' doesn't give what we want, at least for Compaq's C++ compiler 6.2. Consider three FDRs with starting addresses of x, y, @@ -1960,7 +1960,7 @@ lookup_line (bfd *abfd, /* Check whether this file has stabs debugging information. In a file with stabs debugging information, the second local symbol is named @stabs. */ - stabs = FALSE; + stabs = false; if (fdr_ptr->csym >= 2) { char *sym_ptr; @@ -1971,7 +1971,7 @@ lookup_line (bfd *abfd, (*debug_swap->swap_sym_in) (abfd, sym_ptr, &sym); if (strcmp (debug_info->ss + fdr_ptr->issBase + sym.iss, STABS_SYMBOL) == 0) - stabs = TRUE; + stabs = true; } if (!stabs) @@ -2106,7 +2106,7 @@ lookup_line (bfd *abfd, while (++i < line_info->fdrtab_len); if (!best_fdr || !best_pdr) - return FALSE; /* Shouldn't happen... */ + return false; /* Shouldn't happen... */ /* Phew, finally we got something that we can hold onto. */ fdr_ptr = best_fdr; @@ -2199,8 +2199,8 @@ lookup_line (bfd *abfd, const char *line_file_name; bfd_vma low_func_vma; bfd_vma low_line_vma; - bfd_boolean past_line; - bfd_boolean past_fn; + bool past_line; + bool past_fn; char *sym_ptr, *sym_ptr_end; size_t len, funclen; char *buffer = NULL; @@ -2226,8 +2226,8 @@ lookup_line (bfd *abfd, line_file_name = NULL; low_func_vma = 0; low_line_vma = 0; - past_line = FALSE; - past_fn = FALSE; + past_line = false; + past_fn = false; external_sym_size = debug_swap->external_sym_size; @@ -2277,7 +2277,7 @@ lookup_line (bfd *abfd, case N_FUN: if (sym.value > offset) - past_fn = TRUE; + past_fn = true; else if (sym.value >= low_func_vma) { low_func_vma = sym.value; @@ -2290,7 +2290,7 @@ lookup_line (bfd *abfd, else if (sym.st == stLabel && sym.index != indexNil) { if (sym.value > offset) - past_line = TRUE; + past_line = true; else if (sym.value >= low_line_vma) { low_line_vma = sym.value; @@ -2322,7 +2322,7 @@ lookup_line (bfd *abfd, buffer = (char *) bfd_malloc ((bfd_size_type) len); line_info->find_buffer = buffer; if (buffer == NULL) - return FALSE; + return false; } if (function_name != NULL) @@ -2349,12 +2349,12 @@ lookup_line (bfd *abfd, } } - return TRUE; + return true; } /* Do the work of find_nearest_line. */ -bfd_boolean +bool _bfd_ecoff_locate_line (bfd *abfd, asection *section, bfd_vma offset, @@ -2378,7 +2378,7 @@ _bfd_ecoff_locate_line (bfd *abfd, if (! lookup_line (abfd, debug_info, debug_swap, line_info)) { line_info->cache.sect = NULL; - return FALSE; + return false; } } @@ -2386,7 +2386,7 @@ _bfd_ecoff_locate_line (bfd *abfd, *functionname_ptr = line_info->cache.functionname; *retline_ptr = line_info->cache.line_num; - return TRUE; + return true; } /* These routines copy symbolic information into a memory buffer. @@ -2399,7 +2399,7 @@ _bfd_ecoff_locate_line (bfd *abfd, /* Collect a shuffle into a memory buffer. */ -static bfd_boolean +static bool ecoff_collect_shuffle (struct shuffle *l, bfd_byte *buff) { unsigned long total; @@ -2414,18 +2414,18 @@ ecoff_collect_shuffle (struct shuffle *l, bfd_byte *buff) if (bfd_seek (l->u.file.input_bfd, l->u.file.offset, SEEK_SET) != 0 || (bfd_bread (buff, (bfd_size_type) l->size, l->u.file.input_bfd) != l->size)) - return FALSE; + return false; } total += l->size; buff += l->size; } - return TRUE; + return true; } /* Copy PDR information into a memory buffer. */ -bfd_boolean +bool _bfd_ecoff_get_accumulated_pdr (void * handle, bfd_byte *buff) { @@ -2436,7 +2436,7 @@ _bfd_ecoff_get_accumulated_pdr (void * handle, /* Copy symbol information into a memory buffer. */ -bfd_boolean +bool _bfd_ecoff_get_accumulated_sym (void * handle, bfd_byte *buff) { struct accumulate *ainfo = (struct accumulate *) handle; @@ -2446,7 +2446,7 @@ _bfd_ecoff_get_accumulated_sym (void * handle, bfd_byte *buff) /* Copy the string table into a memory buffer. */ -bfd_boolean +bool _bfd_ecoff_get_accumulated_ss (void * handle, bfd_byte *buff) { struct accumulate *ainfo = (struct accumulate *) handle; @@ -2471,5 +2471,5 @@ _bfd_ecoff_get_accumulated_ss (void * handle, bfd_byte *buff) buff += len + 1; } - return TRUE; + return true; } diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c index c52c8ed6c8..a7a76a2fd0 100644 --- a/bfd/elf-attrs.c +++ b/bfd/elf-attrs.c @@ -39,19 +39,19 @@ uleb128_size (unsigned int i) } /* Return TRUE if the attribute has the default value (0/""). */ -static bfd_boolean +static bool is_default_attr (obj_attribute *attr) { if (ATTR_TYPE_HAS_ERROR (attr->type)) - return TRUE; + return true; if (ATTR_TYPE_HAS_INT_VAL (attr->type) && attr->i != 0) - return FALSE; + return false; if (ATTR_TYPE_HAS_STR_VAL (attr->type) && attr->s && *attr->s) - return FALSE; + return false; if (ATTR_TYPE_HAS_NO_DEFAULT (attr->type)) - return FALSE; + return false; - return TRUE; + return true; } /* Return the size of a single attribute. */ @@ -516,7 +516,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) bfd_vma subsection_len; bfd_byte *end; - tag = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, p_end); + tag = _bfd_safe_read_leb128 (abfd, p, &n, false, p_end); p += n; if (p < p_end - 4) subsection_len = bfd_get_32 (abfd, p); @@ -540,13 +540,13 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) { int type; - tag = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end); + tag = _bfd_safe_read_leb128 (abfd, p, &n, false, end); p += n; type = _bfd_elf_obj_attrs_arg_type (abfd, vendor, tag); switch (type & (ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL)) { case ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_STR_VAL: - val = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end); + val = _bfd_safe_read_leb128 (abfd, p, &n, false, end); p += n; bfd_elf_add_obj_attr_int_string (abfd, vendor, tag, val, (char *) p); @@ -558,7 +558,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) p += strlen ((char *)p) + 1; break; case ATTR_TYPE_FLAG_INT_VAL: - val = _bfd_safe_read_leb128 (abfd, p, &n, FALSE, end); + val = _bfd_safe_read_leb128 (abfd, p, &n, false, end); p += n; bfd_elf_add_obj_attr_int (abfd, vendor, tag, val); break; @@ -593,7 +593,7 @@ _bfd_elf_parse_attributes (bfd *abfd, Elf_Internal_Shdr * hdr) is not presently called for targets without their own attributes. */ -bfd_boolean +bool _bfd_elf_merge_object_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -618,7 +618,7 @@ _bfd_elf_merge_object_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB: object has vendor-specific contents that " "must be processed by the '%s' toolchain"), ibfd, in_attr->s); - return FALSE; + return false; } if (in_attr->i != out_attr->i @@ -630,24 +630,24 @@ _bfd_elf_merge_object_attributes (bfd *ibfd, struct bfd_link_info *info) ibfd, in_attr->i, in_attr->s ? in_attr->s : "", out_attr->i, out_attr->s ? out_attr->s : ""); - return FALSE; + return false; } } - return TRUE; + return true; } /* Merge an unknown processor-specific attribute TAG, within the range of known attributes, from IBFD into OBFD; return TRUE if the link is OK, FALSE if it must fail. */ -bfd_boolean +bool _bfd_elf_merge_unknown_attribute_low (bfd *ibfd, bfd *obfd, int tag) { obj_attribute *in_attr; obj_attribute *out_attr; bfd *err_bfd = NULL; - bfd_boolean result = TRUE; + bool result = true; in_attr = elf_known_obj_attributes_proc (ibfd); out_attr = elf_known_obj_attributes_proc (obfd); @@ -678,13 +678,13 @@ _bfd_elf_merge_unknown_attribute_low (bfd *ibfd, bfd *obfd, int tag) the known range, from IBFD into OBFD; return TRUE if the link is OK, FALSE if it must fail. */ -bfd_boolean +bool _bfd_elf_merge_unknown_attribute_list (bfd *ibfd, bfd *obfd) { obj_attribute_list *in_list; obj_attribute_list *out_list; obj_attribute_list **out_listp; - bfd_boolean result = TRUE; + bool result = true; in_list = elf_other_obj_attributes_proc (ibfd); out_listp = &elf_other_obj_attributes_proc (obfd); diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index dec6925fd4..101c2fdf50 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -102,7 +102,7 @@ struct elf_link_virtual_table_entry and track a size while the symbol is still undefined. It is indexed via offset/sizeof(target_void_pointer). */ size_t size; - bfd_boolean *used; + bool *used; /* Virtual table derivation info. */ struct elf_link_hash_entry *parent; @@ -457,7 +457,7 @@ struct dwarf_eh_frame_hdr_info /* TRUE if .eh_frame_hdr should contain the sorted search table. We build it if we successfully read all .eh_frame input sections and recognize them. */ - bfd_boolean table; + bool table; struct eh_frame_array_ent *array; }; @@ -472,7 +472,7 @@ struct eh_frame_hdr_info { asection *hdr_sec; unsigned int array_count; - bfd_boolean frame_hdr_is_compact; + bool frame_hdr_is_compact; union { struct dwarf_eh_frame_hdr_info dwarf; @@ -572,23 +572,23 @@ struct elf_link_hash_table /* Whether we have created the special dynamic sections required when linking against or generating a shared object. */ - bfd_boolean dynamic_sections_created; + bool dynamic_sections_created; /* Whether dynamic relocations are present. */ - bfd_boolean dynamic_relocs; + bool dynamic_relocs; /* True if this target has relocatable executables, so needs dynamic section symbols. */ - bfd_boolean is_relocatable_executable; + bool is_relocatable_executable; /* TRUE if there are IFUNC resolvers. */ - bfd_boolean ifunc_resolvers; + bool ifunc_resolvers; /* TRUE if DT_PLTGOT is a required dynamic tag. */ - bfd_boolean dt_pltgot_required; + bool dt_pltgot_required; /* TRUE if DT_JMPREL is a required dynamic tag. */ - bfd_boolean dt_jmprel_required; + bool dt_jmprel_required; /* The BFD used to hold special sections created by the linker. This will be the first BFD found which requires these sections to @@ -719,7 +719,7 @@ struct elf_link_hash_table #define elf_link_hash_traverse(table, func, info) \ (bfd_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \ + (bool (*) (struct bfd_link_hash_entry *, void *)) (func), \ (info))) /* Get the ELF linker hash table from a link_info structure. */ @@ -752,20 +752,19 @@ struct elf_size_info { unsigned char elfclass, ev_current; int (*write_out_phdrs) (bfd *, const Elf_Internal_Phdr *, unsigned int); - bfd_boolean - (*write_shdrs_and_ehdr) (bfd *); - bfd_boolean (*checksum_contents) + bool (*write_shdrs_and_ehdr) (bfd *); + bool (*checksum_contents) (bfd * , void (*) (const void *, size_t, void *), void *); void (*write_relocs) (bfd *, asection *, void *); - bfd_boolean (*swap_symbol_in) + bool (*swap_symbol_in) (bfd *, const void *, const void *, Elf_Internal_Sym *); void (*swap_symbol_out) (bfd *, const Elf_Internal_Sym *, void *, void *); - bfd_boolean (*slurp_reloc_table) - (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_reloc_table) + (bfd *, asection *, asymbol **, bool); long (*slurp_symbol_table) - (bfd *, asymbol **, bfd_boolean); + (bfd *, asymbol **, bool); void (*swap_dyn_in) (bfd *, const void *, Elf_Internal_Dyn *); void (*swap_dyn_out) @@ -817,7 +816,7 @@ struct elf_reloc_cookie size_t extsymoff; struct elf_link_hash_entry **sym_hashes; int r_sym_shift; - bfd_boolean bad_symtab; + bool bad_symtab; }; /* The level of IRIX compatibility we're striving for. */ @@ -930,12 +929,12 @@ struct elf_backend_data /* A function to translate an ELF RELA relocation to a BFD arelent structure. Returns TRUE upon success, FALSE otherwise. */ - bfd_boolean (*elf_info_to_howto) + bool (*elf_info_to_howto) (bfd *, arelent *, Elf_Internal_Rela *); /* A function to translate an ELF REL relocation to a BFD arelent structure. Returns TRUE upon success, FALSE otherwise. */ - bfd_boolean (*elf_info_to_howto_rel) + bool (*elf_info_to_howto_rel) (bfd *, arelent *, Elf_Internal_Rela *); /* A function to determine whether a symbol is global when @@ -943,7 +942,7 @@ struct elf_backend_data This should be NULL for most targets, in which case the correct thing will be done. MIPS ELF, at least on the Irix 5, has special requirements. */ - bfd_boolean (*elf_backend_sym_is_global) + bool (*elf_backend_sym_is_global) (bfd *, asymbol *); /* The remaining functions are hooks which are called only if they @@ -955,7 +954,7 @@ struct elf_backend_data this is called elf_elfheader is set, but anything else should be used with caution. If this returns FALSE, the check_format routine will return a bfd_error_wrong_format error. */ - bfd_boolean (*elf_backend_object_p) + bool (*elf_backend_object_p) (bfd *); /* A function to do additional symbol processing when reading the @@ -966,7 +965,7 @@ struct elf_backend_data /* A function to do additional symbol processing after reading the entire ELF symbol table. */ - bfd_boolean (*elf_backend_symbol_table_processing) + bool (*elf_backend_symbol_table_processing) (bfd *, elf_symbol_type *, unsigned int); /* A function to set the type of the info field. Processor-specific @@ -981,24 +980,24 @@ struct elf_backend_data /* Return true if local section symbols should have a non-null st_name. NULL implies false. */ - bfd_boolean (*elf_backend_name_local_section_symbols) + bool (*elf_backend_name_local_section_symbols) (bfd *); /* A function to do additional processing on the ELF section header just before writing it out. This is used to set the flags and type fields for some sections, or to actually write out data for unusual sections. */ - bfd_boolean (*elf_backend_section_processing) + bool (*elf_backend_section_processing) (bfd *, Elf_Internal_Shdr *); /* A function to handle unusual section types when creating BFD sections from ELF sections. */ - bfd_boolean (*elf_backend_section_from_shdr) + bool (*elf_backend_section_from_shdr) (bfd *, Elf_Internal_Shdr *, const char *, int); /* A function to convert machine dependent ELF section header flags to BFD internal section header flags. */ - bfd_boolean (*elf_backend_section_flags) + bool (*elf_backend_section_flags) (const Elf_Internal_Shdr *); /* A function that returns a struct containing ELF section flags and @@ -1008,20 +1007,20 @@ struct elf_backend_data /* A function to handle unusual program segment types when creating BFD sections from ELF program segments. */ - bfd_boolean (*elf_backend_section_from_phdr) + bool (*elf_backend_section_from_phdr) (bfd *, Elf_Internal_Phdr *, int, const char *); /* A function to set up the ELF section header for a BFD section in preparation for writing it out. This is where the flags and type fields are set for unusual sections. */ - bfd_boolean (*elf_backend_fake_sections) + bool (*elf_backend_fake_sections) (bfd *, Elf_Internal_Shdr *, asection *); /* A function to get the ELF section index for a BFD section. If this returns TRUE, the section was found. If it is a normal ELF section, *RETVAL should be left unchanged. If it is not a normal ELF section *RETVAL should be set to the SHN_xxxx index. */ - bfd_boolean (*elf_backend_section_from_bfd_section) + bool (*elf_backend_section_from_bfd_section) (bfd *, asection *, int *retval); /* If this field is not NULL, it is called by the add_symbols phase @@ -1032,7 +1031,7 @@ struct elf_backend_data handling all processor dependent symbol bindings and section indices, and must set at least *FLAGS and *SEC for each processor dependent case; failure to do so will cause a link error. */ - bfd_boolean (*elf_add_symbol_hook) + bool (*elf_add_symbol_hook) (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *, const char **name, flagword *flags, asection **sec, bfd_vma *value); @@ -1052,17 +1051,17 @@ struct elf_backend_data created, and this function may modify the section flags if desired. This function will normally create the .got and .plt sections, but different backends have different requirements. */ - bfd_boolean (*elf_backend_create_dynamic_sections) + bool (*elf_backend_create_dynamic_sections) (bfd *abfd, struct bfd_link_info *info); /* When creating a shared library, determine whether to omit the dynamic symbol for the section. */ - bfd_boolean (*elf_backend_omit_section_dynsym) + bool (*elf_backend_omit_section_dynsym) (bfd *output_bfd, struct bfd_link_info *info, asection *osec); /* Return TRUE if relocations of targets are compatible to the extent that CHECK_RELOCS will properly process them. PR 4424. */ - bfd_boolean (*relocs_compatible) (const bfd_target *, const bfd_target *); + bool (*relocs_compatible) (const bfd_target *, const bfd_target *); /* The CHECK_RELOCS function is called by the add_symbols phase of the ELF backend linker. It is called once for each section with @@ -1074,7 +1073,7 @@ struct elf_backend_data relocs are always passed as Rela structures; if the section actually uses Rel structures, the r_addend field will always be zero. */ - bfd_boolean (*check_relocs) + bool (*check_relocs) (bfd *abfd, struct bfd_link_info *info, asection *o, const Elf_Internal_Rela *relocs); @@ -1082,14 +1081,14 @@ struct elf_backend_data the add_symbols phase of the ELF backend linker. The function must inspect the bfd and create any additional symbols according to any custom directives in the bfd. */ - bfd_boolean (*check_directives) + bool (*check_directives) (bfd *abfd, struct bfd_link_info *info); /* The NOTICE_AS_NEEDED function is called as the linker is about to handle an as-needed lib (ACT = notice_as_needed), and after the linker has decided to keep the lib (ACT = notice_needed) or when the lib is not needed (ACT = notice_not_needed). */ - bfd_boolean (*notice_as_needed) + bool (*notice_as_needed) (bfd *abfd, struct bfd_link_info *info, enum notice_asneeded_action act); /* The ADJUST_DYNAMIC_SYMBOL function is called by the ELF backend @@ -1104,14 +1103,14 @@ struct elf_backend_data the link can deal with. This will normally involve adding an entry to the .plt or .got or some such section, and setting the symbol to point to that. */ - bfd_boolean (*elf_backend_adjust_dynamic_symbol) + bool (*elf_backend_adjust_dynamic_symbol) (struct bfd_link_info *info, struct elf_link_hash_entry *h); /* The ALWAYS_SIZE_SECTIONS function is called by the backend linker after all the linker input files have been seen but before the section sizes have been set. This is called after ADJUST_DYNAMIC_SYMBOL, but before SIZE_DYNAMIC_SECTIONS. */ - bfd_boolean (*elf_backend_always_size_sections) + bool (*elf_backend_always_size_sections) (bfd *output_bfd, struct bfd_link_info *info); /* The SIZE_DYNAMIC_SECTIONS function is called by the ELF backend @@ -1124,13 +1123,13 @@ struct elf_backend_data .dynstr and .hash sections. This function must handle the .interp section and any sections created by the CREATE_DYNAMIC_SECTIONS entry point. */ - bfd_boolean (*elf_backend_size_dynamic_sections) + bool (*elf_backend_size_dynamic_sections) (bfd *output_bfd, struct bfd_link_info *info); /* The STRIP_ZERO_SIZED_DYNAMIC_SECTIONS function is called by the ELF backend linker to strip zero-sized dynamic sections after the section sizes have been set. */ - bfd_boolean (*elf_backend_strip_zero_sized_dynamic_sections) + bool (*elf_backend_strip_zero_sized_dynamic_sections) (struct bfd_link_info *info); /* Set TEXT_INDEX_SECTION and DATA_INDEX_SECTION, the output sections @@ -1181,7 +1180,7 @@ struct elf_backend_data dynamic sections. Note that FINISH_DYNAMIC_SYMBOL is called on all .dynsym symbols, while ADJUST_DYNAMIC_SYMBOL is only called on those symbols which are defined by a dynamic object. */ - bfd_boolean (*elf_backend_finish_dynamic_symbol) + bool (*elf_backend_finish_dynamic_symbol) (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym); @@ -1189,7 +1188,7 @@ struct elf_backend_data linker just before it writes all the dynamic sections out to the output file. The FINISH_DYNAMIC_SYMBOL will have been called on all dynamic symbols. */ - bfd_boolean (*elf_backend_finish_dynamic_sections) + bool (*elf_backend_finish_dynamic_sections) (bfd *output_bfd, struct bfd_link_info *info); /* A function to do any beginning processing needed for the ELF file @@ -1199,7 +1198,7 @@ struct elf_backend_data /* A function to do any final processing needed for the ELF file before writing it out. */ - bfd_boolean (*elf_backend_final_write_processing) + bool (*elf_backend_final_write_processing) (bfd *); /* This function is called by get_program_header_size. It should @@ -1210,17 +1209,17 @@ struct elf_backend_data /* This function is called to modify an existing segment map in a backend specific fashion. */ - bfd_boolean (*elf_backend_modify_segment_map) + bool (*elf_backend_modify_segment_map) (bfd *, struct bfd_link_info *); /* This function is called to modify program headers just before they are written. */ - bfd_boolean (*elf_backend_modify_headers) + bool (*elf_backend_modify_headers) (bfd *, struct bfd_link_info *); /* This function is called to see if the PHDR header should be checked for validity. */ - bfd_boolean (*elf_backend_allow_non_load_phdr) + bool (*elf_backend_allow_non_load_phdr) (bfd *, const Elf_Internal_Phdr *, unsigned); /* This function is called before section garbage collection to @@ -1230,7 +1229,7 @@ struct elf_backend_data /* This function is called during section garbage collection to mark sections that define global symbols. */ - bfd_boolean (*gc_mark_dynamic_ref) + bool (*gc_mark_dynamic_ref) (struct elf_link_hash_entry *, void *); /* This function is called during section gc to discover the section a @@ -1239,12 +1238,12 @@ struct elf_backend_data /* This function, if defined, is called after the first gc marking pass to allow the backend to mark additional sections. */ - bfd_boolean (*gc_mark_extra_sections) + bool (*gc_mark_extra_sections) (struct bfd_link_info *, elf_gc_mark_hook_fn); /* This function is called to initialise ELF file header info. Customised versions can modify things like the OS and ABI version. */ - bfd_boolean (*elf_backend_init_file_header) + bool (*elf_backend_init_file_header) (bfd *, struct bfd_link_info *); /* This function, if defined, prints a symbol to file and returns the @@ -1257,7 +1256,7 @@ struct elf_backend_data global symbols converted to locals are emitted into the symtab section. It allows the backend to emit special local symbols not handled in the hash table. */ - bfd_boolean (*elf_backend_output_arch_local_syms) + bool (*elf_backend_output_arch_local_syms) (bfd *, struct bfd_link_info *, void *, int (*) (void *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *)); @@ -1265,7 +1264,7 @@ struct elf_backend_data /* This function, if defined, is called after all symbols are emitted into the symtab section. It allows the backend to emit special global symbols not handled in the hash table. */ - bfd_boolean (*elf_backend_output_arch_syms) + bool (*elf_backend_output_arch_syms) (bfd *, struct bfd_link_info *, void *, int (*) (void *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *)); @@ -1287,16 +1286,16 @@ struct elf_backend_data /* Modify any information related to dynamic linking such that the symbol is not exported. */ void (*elf_backend_hide_symbol) - (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean); + (struct bfd_link_info *, struct elf_link_hash_entry *, bool); /* A function to do additional symbol fixup, called by _bfd_elf_fix_symbol_flags. */ - bfd_boolean (*elf_backend_fixup_symbol) + bool (*elf_backend_fixup_symbol) (struct bfd_link_info *, struct elf_link_hash_entry *); /* Merge the backend specific symbol attribute. */ void (*elf_backend_merge_symbol_attribute) - (struct elf_link_hash_entry *, unsigned int, bfd_boolean, bfd_boolean); + (struct elf_link_hash_entry *, unsigned int, bool, bool); /* This function, if defined, will return a string containing the name of a target-specific dynamic tag. */ @@ -1305,12 +1304,12 @@ struct elf_backend_data /* Decide whether an undefined symbol is special and can be ignored. This is the case for OPTIONAL symbols on IRIX. */ - bfd_boolean (*elf_backend_ignore_undef_symbol) + bool (*elf_backend_ignore_undef_symbol) (struct elf_link_hash_entry *); /* Emit relocations. Overrides default routine for emitting relocs, except during a relocatable link, or if all relocs are being emitted. */ - bfd_boolean (*elf_backend_emit_relocs) + bool (*elf_backend_emit_relocs) (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *, struct elf_link_hash_entry **); @@ -1331,22 +1330,22 @@ struct elf_backend_data /* Say whether to sort relocs output by ld -r and ld --emit-relocs, by r_offset. If NULL, default to true. */ - bfd_boolean (*sort_relocs_p) + bool (*sort_relocs_p) (asection *); /* This function, if defined, is called when an NT_PRSTATUS note is found in a core file. */ - bfd_boolean (*elf_backend_grok_prstatus) + bool (*elf_backend_grok_prstatus) (bfd *, Elf_Internal_Note *); /* This function, if defined, is called when an NT_PSINFO or NT_PRPSINFO note is found in a core file. */ - bfd_boolean (*elf_backend_grok_psinfo) + bool (*elf_backend_grok_psinfo) (bfd *, Elf_Internal_Note *); /* This function, if defined, is called when a "FreeBSD" NT_PRSTATUS note is found in a core file. */ - bfd_boolean (*elf_backend_grok_freebsd_prstatus) + bool (*elf_backend_grok_freebsd_prstatus) (bfd *, Elf_Internal_Note *); /* This function, if defined, is called to write a note to a corefile. */ @@ -1364,12 +1363,12 @@ struct elf_backend_data /* This function, if defined, removes information about discarded functions from other sections which mention them. */ - bfd_boolean (*elf_backend_discard_info) + bool (*elf_backend_discard_info) (bfd *, struct elf_reloc_cookie *, struct bfd_link_info *); /* This function, if defined, signals that the function above has removed the discarded relocations for this section. */ - bfd_boolean (*elf_backend_ignore_discarded_relocs) + bool (*elf_backend_ignore_discarded_relocs) (asection *); /* What to do when ld finds relocations against symbols defined in @@ -1386,9 +1385,9 @@ struct elf_backend_data /* These functions tell elf-eh-frame whether to attempt to turn absolute or lsda encodings into pc-relative ones. The default definition enables these transformations. */ - bfd_boolean (*elf_backend_can_make_relative_eh_frame) + bool (*elf_backend_can_make_relative_eh_frame) (bfd *, struct bfd_link_info *, asection *); - bfd_boolean (*elf_backend_can_make_lsda_relative_eh_frame) + bool (*elf_backend_can_make_lsda_relative_eh_frame) (bfd *, struct bfd_link_info *, asection *); /* This function returns an encoding after computing the encoded @@ -1403,7 +1402,7 @@ struct elf_backend_data /* This function, if defined, may write out the given section. Returns TRUE if it did so and FALSE if the caller should. */ - bfd_boolean (*elf_backend_write_section) + bool (*elf_backend_write_section) (bfd *, struct bfd_link_info *, asection *, bfd_byte *); /* This function, if defined, returns TRUE if it is section symbols @@ -1411,7 +1410,7 @@ struct elf_backend_data symbol table into local and global symbols. This should be NULL for most targets, in which case the correct thing will be done. MIPS ELF, at least on the Irix 5, has special requirements. */ - bfd_boolean (*elf_backend_elfsym_local_is_section) + bool (*elf_backend_elfsym_local_is_section) (bfd *); /* The level of IRIX compatibility we're striving for. @@ -1420,7 +1419,7 @@ struct elf_backend_data (bfd *); reloc_howto_type *(*elf_backend_mips_rtype_to_howto) - (bfd *, unsigned int, bfd_boolean); + (bfd *, unsigned int, bool); /* The swapping table to use when dealing with ECOFF information. Used for the MIPS ELF .mdebug section. */ @@ -1433,14 +1432,14 @@ struct elf_backend_data int (*target_read_memory) (bfd_vma vma, bfd_byte *myaddr, bfd_size_type len)); - bfd_boolean (*elf_backend_core_find_build_id) (bfd *, bfd_vma); + bool (*elf_backend_core_find_build_id) (bfd *, bfd_vma); /* This function is used by `_bfd_elf_get_synthetic_symtab'; see elf.c. */ bfd_vma (*plt_sym_val) (bfd_vma, const asection *, const arelent *); /* Is symbol defined in common section? */ - bfd_boolean (*common_definition) (Elf_Internal_Sym *); + bool (*common_definition) (Elf_Internal_Sym *); /* Return a common section index for section. */ unsigned int (*common_section_index) (asection *); @@ -1449,13 +1448,13 @@ struct elf_backend_data asection *(*common_section) (asection *); /* Return TRUE if we can merge 2 definitions. */ - bfd_boolean (*merge_symbol) (struct elf_link_hash_entry *, + bool (*merge_symbol) (struct elf_link_hash_entry *, const Elf_Internal_Sym *, asection **, - bfd_boolean, bfd_boolean, + bool, bool, bfd *, const asection *); /* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */ - bfd_boolean (*elf_hash_symbol) (struct elf_link_hash_entry *); + bool (*elf_hash_symbol) (struct elf_link_hash_entry *); /* If non-NULL, called to register the location of XLAT_LOC within .MIPS.xhash at which real final dynindx for H will be written. @@ -1465,7 +1464,7 @@ struct elf_backend_data (struct elf_link_hash_entry *h, bfd_vma xlat_loc); /* Return TRUE if type is a function symbol type. */ - bfd_boolean (*is_function_type) (unsigned int type); + bool (*is_function_type) (unsigned int type); /* If the ELF symbol SYM might be a function in SEC, return the function size and set *CODE_OFF to the function's entry point, @@ -1484,7 +1483,7 @@ struct elf_backend_data until it returns TRUE. Most of the times it is called ISECTION will be set to an input section that might be associated with the output section. The last time that it is called, ISECTION will be set to NULL. */ - bfd_boolean (*elf_backend_copy_special_section_fields) + bool (*elf_backend_copy_special_section_fields) (const bfd *ibfd, bfd *obfd, const Elf_Internal_Shdr *isection, Elf_Internal_Shdr *osection); @@ -1535,7 +1534,7 @@ struct elf_backend_data /* Handle merging unknown attributes; either warn and return TRUE, or give an error and return FALSE. */ - bfd_boolean (*obj_attrs_handle_unknown) (bfd *, int); + bool (*obj_attrs_handle_unknown) (bfd *, int); /* Parse GNU properties. Return the property kind. If the property is corrupt, issue an error message and return property_corrupt. */ @@ -1544,7 +1543,7 @@ struct elf_backend_data unsigned int); /* Merge GNU properties. Return TRUE if property is updated. */ - bfd_boolean (*merge_gnu_properties) (struct bfd_link_info *, bfd *, bfd *, + bool (*merge_gnu_properties) (struct bfd_link_info *, bfd *, bfd *, elf_property *, elf_property *); /* Set up GNU properties. */ @@ -1567,14 +1566,14 @@ struct elf_backend_data unsigned int (*symbol_section_index) (bfd *, elf_symbol_type *); /* Called when a section has extra reloc sections. */ - bfd_boolean (*init_secondary_reloc_section) (bfd *, Elf_Internal_Shdr *, - const char *, unsigned int); + bool (*init_secondary_reloc_section) (bfd *, Elf_Internal_Shdr *, + const char *, unsigned int); /* Called when after loading the normal relocs for a section. */ - bfd_boolean (*slurp_secondary_relocs) (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_secondary_relocs) (bfd *, asection *, asymbol **, bool); /* Called after writing the normal relocs for a section. */ - bfd_boolean (*write_secondary_relocs) (bfd *, asection *); + bool (*write_secondary_relocs) (bfd *, asection *); /* This is non-zero if static TLS segments require a special alignment. */ unsigned static_tls_alignment; @@ -1760,7 +1759,7 @@ struct bfd_elf_section_data /* TRUE if the section has secondary reloc sections associated with it. FIXME: In the future it might be better to change this into a list of secondary reloc sections, making lookup easier and faster. */ - bfd_boolean has_secondary_relocs; + bool has_secondary_relocs; /* A pointer used for various section optimizations. */ void *sec_info; @@ -1876,7 +1875,7 @@ struct output_elf_obj_tdata /* NT_GNU_BUILD_ID note type info. */ struct { - bfd_boolean (*after_write_object_contents) (bfd *); + bool (*after_write_object_contents) (bfd *); const char *style; asection *sec; } build_id; @@ -1897,7 +1896,7 @@ struct output_elf_obj_tdata unsigned int stack_flags; /* Used to determine if the e_flags field has been initialized */ - bfd_boolean flags_init; + bool flags_init; }; /* Indicate if the bfd contains SHF_GNU_MBIND/SHF_GNU_RETAIN sections or @@ -2140,12 +2139,12 @@ extern char * bfd_elf_get_str_section (bfd *, unsigned int); extern const char *bfd_elf_sym_name (bfd *, Elf_Internal_Shdr *, Elf_Internal_Sym *, asection *); -extern bfd_boolean _bfd_elf_copy_private_bfd_data +extern bool _bfd_elf_copy_private_bfd_data (bfd *, bfd *); -extern bfd_boolean _bfd_elf_print_private_bfd_data +extern bool _bfd_elf_print_private_bfd_data (bfd *, void *); const char * _bfd_elf_get_symbol_version_string - (bfd *, asymbol *, bfd_boolean, bfd_boolean *); + (bfd *, asymbol *, bool, bool *); extern void bfd_elf_print_symbol (bfd *, void *, asymbol *, bfd_print_symbol_type); @@ -2154,7 +2153,7 @@ extern unsigned int _bfd_elf_eh_frame_address_size extern bfd_byte _bfd_elf_encode_eh_address (bfd *abfd, struct bfd_link_info *info, asection *osec, bfd_vma offset, asection *loc_sec, bfd_vma loc_offset, bfd_vma *encoded); -extern bfd_boolean _bfd_elf_can_make_relative +extern bool _bfd_elf_can_make_relative (bfd *input_bfd, struct bfd_link_info *info, asection *eh_frame_section); extern enum elf_reloc_type_class _bfd_elf_reloc_type_class @@ -2174,15 +2173,15 @@ extern unsigned long bfd_elf_gnu_hash extern bfd_reloc_status_type bfd_elf_generic_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -extern bfd_boolean bfd_elf_allocate_object +extern bool bfd_elf_allocate_object (bfd *, size_t, enum elf_target_id); -extern bfd_boolean bfd_elf_make_object +extern bool bfd_elf_make_object (bfd *); -extern bfd_boolean bfd_elf_mkcorefile +extern bool bfd_elf_mkcorefile (bfd *); -extern bfd_boolean _bfd_elf_make_section_from_shdr +extern bool _bfd_elf_make_section_from_shdr (bfd *, Elf_Internal_Shdr *, const char *, int); -extern bfd_boolean _bfd_elf_make_section_from_phdr +extern bool _bfd_elf_make_section_from_phdr (bfd *, Elf_Internal_Phdr *, int, const char *); extern struct bfd_hash_entry *_bfd_elf_link_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); @@ -2194,27 +2193,27 @@ extern void _bfd_elf_link_hash_copy_indirect (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); extern void _bfd_elf_link_hash_hide_symbol - (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean); + (struct bfd_link_info *, struct elf_link_hash_entry *, bool); extern void _bfd_elf_link_hide_symbol (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean _bfd_elf_link_hash_fixup_symbol +extern bool _bfd_elf_link_hash_fixup_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_elf_link_hash_table_init +extern bool _bfd_elf_link_hash_table_init (struct elf_link_hash_table *, bfd *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, const char *), unsigned int, enum elf_target_id); -extern bfd_boolean _bfd_elf_slurp_version_tables - (bfd *, bfd_boolean); -extern bfd_boolean _bfd_elf_merge_sections +extern bool _bfd_elf_slurp_version_tables + (bfd *, bool); +extern bool _bfd_elf_merge_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_match_sections_by_type +extern bool _bfd_elf_match_sections_by_type (bfd *, const asection *, bfd *, const asection *); -extern bfd_boolean bfd_elf_is_group_section +extern bool bfd_elf_is_group_section (bfd *, const struct bfd_section *); extern const char *bfd_elf_group_name (bfd *, const struct bfd_section *); -extern bfd_boolean _bfd_elf_section_already_linked +extern bool _bfd_elf_section_already_linked (bfd *, asection *, struct bfd_link_info *); extern void bfd_elf_set_group_contents (bfd *, asection *, void *); @@ -2225,25 +2224,25 @@ extern asection *_bfd_elf_check_kept_section #define _bfd_elf_link_just_syms _bfd_generic_link_just_syms extern void _bfd_elf_copy_link_hash_symbol_type (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *); -extern bfd_boolean _bfd_elf_size_group_sections +extern bool _bfd_elf_size_group_sections (struct bfd_link_info *); -extern bfd_boolean _bfd_elf_fixup_group_sections +extern bool _bfd_elf_fixup_group_sections (bfd *, asection *); -extern bfd_boolean _bfd_elf_copy_private_header_data +extern bool _bfd_elf_copy_private_header_data (bfd *, bfd *); -extern bfd_boolean _bfd_elf_copy_private_symbol_data +extern bool _bfd_elf_copy_private_symbol_data (bfd *, asymbol *, bfd *, asymbol *); #define _bfd_generic_init_private_section_data \ _bfd_elf_init_private_section_data -extern bfd_boolean _bfd_elf_init_private_section_data +extern bool _bfd_elf_init_private_section_data (bfd *, asection *, bfd *, asection *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_copy_private_section_data +extern bool _bfd_elf_copy_private_section_data (bfd *, asection *, bfd *, asection *); -extern bfd_boolean _bfd_elf_write_object_contents +extern bool _bfd_elf_write_object_contents (bfd *); -extern bfd_boolean _bfd_elf_write_corefile_contents +extern bool _bfd_elf_write_corefile_contents (bfd *); -extern bfd_boolean _bfd_elf_set_section_contents +extern bool _bfd_elf_set_section_contents (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); extern long _bfd_elf_get_symtab_upper_bound (bfd *); @@ -2260,9 +2259,9 @@ extern long _bfd_elf_get_reloc_upper_bound extern long _bfd_elf_canonicalize_reloc (bfd *, sec_ptr, arelent **, asymbol **); extern asection * _bfd_elf_get_dynamic_reloc_section - (bfd *, asection *, bfd_boolean); + (bfd *, asection *, bool); extern asection * _bfd_elf_make_dynamic_reloc_section - (asection *, bfd *, unsigned int, bfd *, bfd_boolean); + (asection *, bfd *, unsigned int, bfd *, bool); extern long _bfd_elf_get_dynamic_reloc_upper_bound (bfd *); extern long _bfd_elf_canonicalize_dynamic_reloc @@ -2271,18 +2270,18 @@ extern asymbol *_bfd_elf_make_empty_symbol (bfd *); extern void _bfd_elf_get_symbol_info (bfd *, asymbol *, symbol_info *); -extern bfd_boolean _bfd_elf_is_local_label_name +extern bool _bfd_elf_is_local_label_name (bfd *, const char *); extern alent *_bfd_elf_get_lineno (bfd *, asymbol *); -extern bfd_boolean _bfd_elf_set_arch_mach +extern bool _bfd_elf_set_arch_mach (bfd *, enum bfd_architecture, unsigned long); -extern bfd_boolean _bfd_elf_find_nearest_line +extern bool _bfd_elf_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); -extern bfd_boolean _bfd_elf_find_line +extern bool _bfd_elf_find_line (bfd *, asymbol **, asymbol *, const char **, unsigned int *); -extern bfd_boolean _bfd_elf_find_inliner_info +extern bool _bfd_elf_find_inliner_info (bfd *, const char **, const char **, unsigned int *); extern asymbol *_bfd_elf_find_function (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **); @@ -2290,23 +2289,23 @@ extern asymbol *_bfd_elf_find_function #define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol extern int _bfd_elf_sizeof_headers (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_new_section_hook +extern bool _bfd_elf_new_section_hook (bfd *, asection *); extern const struct bfd_elf_special_section *_bfd_elf_get_special_section (const char *, const struct bfd_elf_special_section *, unsigned int); extern const struct bfd_elf_special_section *_bfd_elf_get_sec_type_attr (bfd *, asection *); -extern bfd_boolean _bfd_elf_link_hide_sym_by_version +extern bool _bfd_elf_link_hide_sym_by_version (struct bfd_link_info *, struct elf_link_hash_entry *); /* If the target doesn't have reloc handling written yet: */ -extern bfd_boolean _bfd_elf_no_info_to_howto +extern bool _bfd_elf_no_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *); -extern bfd_boolean bfd_section_from_shdr +extern bool bfd_section_from_shdr (bfd *, unsigned int shindex); -extern bfd_boolean bfd_section_from_phdr +extern bool bfd_section_from_phdr (bfd *, Elf_Internal_Phdr *, int); extern int _bfd_elf_symbol_from_bfd_symbol @@ -2322,7 +2321,7 @@ extern struct elf_strtab_hash * _bfd_elf_strtab_init extern void _bfd_elf_strtab_free (struct elf_strtab_hash *); extern size_t _bfd_elf_strtab_add - (struct elf_strtab_hash *, const char *, bfd_boolean); + (struct elf_strtab_hash *, const char *, bool); extern void _bfd_elf_strtab_addref (struct elf_strtab_hash *, size_t); extern void _bfd_elf_strtab_delref @@ -2343,68 +2342,68 @@ extern bfd_size_type _bfd_elf_strtab_offset (struct elf_strtab_hash *, size_t); extern const char * _bfd_elf_strtab_str (struct elf_strtab_hash *, size_t idx, bfd_size_type *offset); -extern bfd_boolean _bfd_elf_strtab_emit +extern bool _bfd_elf_strtab_emit (bfd *, struct elf_strtab_hash *); extern void _bfd_elf_strtab_finalize (struct elf_strtab_hash *); -extern bfd_boolean bfd_elf_parse_eh_frame_entries +extern bool bfd_elf_parse_eh_frame_entries (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_parse_eh_frame_entry +extern bool _bfd_elf_parse_eh_frame_entry (struct bfd_link_info *, asection *, struct elf_reloc_cookie *); extern void _bfd_elf_parse_eh_frame (bfd *, struct bfd_link_info *, asection *, struct elf_reloc_cookie *); -extern bfd_boolean _bfd_elf_end_eh_frame_parsing +extern bool _bfd_elf_end_eh_frame_parsing (struct bfd_link_info *info); -extern bfd_boolean _bfd_elf_discard_section_eh_frame +extern bool _bfd_elf_discard_section_eh_frame (bfd *, struct bfd_link_info *, asection *, - bfd_boolean (*) (bfd_vma, void *), struct elf_reloc_cookie *); -extern bfd_boolean _bfd_elf_adjust_eh_frame_global_symbol + bool (*) (bfd_vma, void *), struct elf_reloc_cookie *); +extern bool _bfd_elf_adjust_eh_frame_global_symbol (struct elf_link_hash_entry *, void *); -extern bfd_boolean _bfd_elf_discard_section_eh_frame_hdr +extern bool _bfd_elf_discard_section_eh_frame_hdr (bfd *, struct bfd_link_info *); extern bfd_vma _bfd_elf_eh_frame_section_offset (bfd *, struct bfd_link_info *, asection *, bfd_vma); -extern bfd_boolean _bfd_elf_write_section_eh_frame +extern bool _bfd_elf_write_section_eh_frame (bfd *, struct bfd_link_info *, asection *, bfd_byte *); -bfd_boolean _bfd_elf_write_section_eh_frame_entry +bool _bfd_elf_write_section_eh_frame_entry (bfd *, struct bfd_link_info *, asection *, bfd_byte *); -extern bfd_boolean _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *); -extern bfd_boolean _bfd_elf_write_section_eh_frame_hdr +extern bool _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *); +extern bool _bfd_elf_write_section_eh_frame_hdr (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_eh_frame_present +extern bool _bfd_elf_eh_frame_present (struct bfd_link_info *); -extern bfd_boolean _bfd_elf_eh_frame_entry_present +extern bool _bfd_elf_eh_frame_entry_present (struct bfd_link_info *); -extern bfd_boolean _bfd_elf_maybe_strip_eh_frame_hdr +extern bool _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *); -extern bfd_boolean _bfd_elf_hash_symbol (struct elf_link_hash_entry *); +extern bool _bfd_elf_hash_symbol (struct elf_link_hash_entry *); extern long _bfd_elf_link_lookup_local_dynindx (struct bfd_link_info *, bfd *, long); -extern bfd_boolean _bfd_elf_compute_section_file_positions +extern bool _bfd_elf_compute_section_file_positions (bfd *, struct bfd_link_info *); extern file_ptr _bfd_elf_assign_file_position_for_section - (Elf_Internal_Shdr *, file_ptr, bfd_boolean); -extern bfd_boolean _bfd_elf_modify_headers + (Elf_Internal_Shdr *, file_ptr, bool); +extern bool _bfd_elf_modify_headers (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_validate_reloc +extern bool _bfd_elf_validate_reloc (bfd *, arelent *); -extern bfd_boolean bfd_elf_record_link_assignment - (bfd *, struct bfd_link_info *, const char *, bfd_boolean, - bfd_boolean); -extern bfd_boolean bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *, - const char *, bfd_vma); -extern bfd_boolean bfd_elf_size_dynamic_sections +extern bool bfd_elf_record_link_assignment + (bfd *, struct bfd_link_info *, const char *, bool, + bool); +extern bool bfd_elf_stack_segment_size (bfd *, struct bfd_link_info *, + const char *, bfd_vma); +extern bool bfd_elf_size_dynamic_sections (bfd *, const char *, const char *, const char *, const char *, const char *, const char * const *, struct bfd_link_info *, struct bfd_section **); -extern bfd_boolean bfd_elf_size_dynsym_hash_dynstr +extern bool bfd_elf_size_dynsym_hash_dynstr (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_get_bfd_needed_list +extern bool bfd_elf_get_bfd_needed_list (bfd *, struct bfd_link_needed_list **); extern struct bfd_link_needed_list *bfd_elf_get_needed_list (bfd *, struct bfd_link_info *); @@ -2425,18 +2424,18 @@ extern unsigned int _bfd_elf_default_action_discarded extern struct bfd_section *_bfd_elf_tls_setup (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_link_create_dynamic_sections +extern bool _bfd_elf_link_create_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_omit_section_dynsym_default +extern bool _bfd_elf_omit_section_dynsym_default (bfd *, struct bfd_link_info *, asection *); -extern bfd_boolean _bfd_elf_omit_section_dynsym_all +extern bool _bfd_elf_omit_section_dynsym_all (bfd *, struct bfd_link_info *, asection *); -extern bfd_boolean _bfd_elf_create_dynamic_sections +extern bool _bfd_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_create_got_section +extern bool _bfd_elf_create_got_section (bfd *, struct bfd_link_info *); extern asection *_bfd_elf_section_for_symbol - (struct elf_reloc_cookie *, unsigned long, bfd_boolean); + (struct elf_reloc_cookie *, unsigned long, bool); extern struct elf_link_hash_entry *_bfd_elf_define_linkage_sym (bfd *, struct bfd_link_info *, asection *, const char *); extern void _bfd_elf_init_1_index_section @@ -2444,39 +2443,39 @@ extern void _bfd_elf_init_1_index_section extern void _bfd_elf_init_2_index_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elfcore_make_pseudosection +extern bool _bfd_elfcore_make_pseudosection (bfd *, char *, size_t, ufile_ptr); extern char *_bfd_elfcore_strndup (bfd *, char *, size_t); extern Elf_Internal_Rela *_bfd_elf_link_read_relocs - (bfd *, asection *, void *, Elf_Internal_Rela *, bfd_boolean); + (bfd *, asection *, void *, Elf_Internal_Rela *, bool); -extern bfd_boolean _bfd_elf_link_output_relocs +extern bool _bfd_elf_link_output_relocs (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *, struct elf_link_hash_entry **); -extern bfd_boolean _bfd_elf_adjust_dynamic_copy +extern bool _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *, struct elf_link_hash_entry *, asection *); -extern bfd_boolean _bfd_elf_dynamic_symbol_p - (struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean); +extern bool _bfd_elf_dynamic_symbol_p + (struct elf_link_hash_entry *, struct bfd_link_info *, bool); -extern bfd_boolean _bfd_elf_symbol_refs_local_p - (struct elf_link_hash_entry *, struct bfd_link_info *, bfd_boolean); +extern bool _bfd_elf_symbol_refs_local_p + (struct elf_link_hash_entry *, struct bfd_link_info *, bool); extern bfd_reloc_status_type bfd_elf_perform_complex_relocation (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma); -extern bfd_boolean _bfd_elf_setup_sections +extern bool _bfd_elf_setup_sections (bfd *); extern struct bfd_link_hash_entry *bfd_elf_define_start_stop (struct bfd_link_info *, const char *, asection *); -extern bfd_boolean _bfd_elf_init_file_header (bfd *, struct bfd_link_info *); +extern bool _bfd_elf_init_file_header (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_final_write_processing (bfd *); +extern bool _bfd_elf_final_write_processing (bfd *); extern bfd_cleanup bfd_elf32_object_p (bfd *); @@ -2486,14 +2485,14 @@ extern char *bfd_elf32_core_file_failing_command (bfd *); extern int bfd_elf32_core_file_failing_signal (bfd *); -extern bfd_boolean bfd_elf32_core_file_matches_executable_p +extern bool bfd_elf32_core_file_matches_executable_p (bfd *, bfd *); extern int bfd_elf32_core_file_pid (bfd *); -extern bfd_boolean _bfd_elf32_core_find_build_id +extern bool _bfd_elf32_core_find_build_id (bfd *, bfd_vma); -extern bfd_boolean bfd_elf32_swap_symbol_in +extern bool bfd_elf32_swap_symbol_in (bfd *, const void *, const void *, Elf_Internal_Sym *); extern void bfd_elf32_swap_symbol_out (bfd *, const Elf_Internal_Sym *, void *, void *); @@ -2514,17 +2513,17 @@ extern void bfd_elf32_swap_dyn_in extern void bfd_elf32_swap_dyn_out (bfd *, const Elf_Internal_Dyn *, void *); extern long bfd_elf32_slurp_symbol_table - (bfd *, asymbol **, bfd_boolean); -extern bfd_boolean bfd_elf32_write_shdrs_and_ehdr + (bfd *, asymbol **, bool); +extern bool bfd_elf32_write_shdrs_and_ehdr (bfd *); extern int bfd_elf32_write_out_phdrs (bfd *, const Elf_Internal_Phdr *, unsigned int); -extern bfd_boolean bfd_elf32_checksum_contents +extern bool bfd_elf32_checksum_contents (bfd * , void (*) (const void *, size_t, void *), void *); extern void bfd_elf32_write_relocs (bfd *, asection *, void *); -extern bfd_boolean bfd_elf32_slurp_reloc_table - (bfd *, asection *, asymbol **, bfd_boolean); +extern bool bfd_elf32_slurp_reloc_table + (bfd *, asection *, asymbol **, bool); extern bfd_cleanup bfd_elf64_object_p (bfd *); @@ -2534,14 +2533,14 @@ extern char *bfd_elf64_core_file_failing_command (bfd *); extern int bfd_elf64_core_file_failing_signal (bfd *); -extern bfd_boolean bfd_elf64_core_file_matches_executable_p +extern bool bfd_elf64_core_file_matches_executable_p (bfd *, bfd *); extern int bfd_elf64_core_file_pid (bfd *); -extern bfd_boolean _bfd_elf64_core_find_build_id +extern bool _bfd_elf64_core_find_build_id (bfd *, bfd_vma); -extern bfd_boolean bfd_elf64_swap_symbol_in +extern bool bfd_elf64_swap_symbol_in (bfd *, const void *, const void *, Elf_Internal_Sym *); extern void bfd_elf64_swap_symbol_out (bfd *, const Elf_Internal_Sym *, void *, void *); @@ -2562,49 +2561,49 @@ extern void bfd_elf64_swap_dyn_in extern void bfd_elf64_swap_dyn_out (bfd *, const Elf_Internal_Dyn *, void *); extern long bfd_elf64_slurp_symbol_table - (bfd *, asymbol **, bfd_boolean); -extern bfd_boolean bfd_elf64_write_shdrs_and_ehdr + (bfd *, asymbol **, bool); +extern bool bfd_elf64_write_shdrs_and_ehdr (bfd *); extern int bfd_elf64_write_out_phdrs (bfd *, const Elf_Internal_Phdr *, unsigned int); -extern bfd_boolean bfd_elf64_checksum_contents +extern bool bfd_elf64_checksum_contents (bfd * , void (*) (const void *, size_t, void *), void *); extern void bfd_elf64_write_relocs (bfd *, asection *, void *); -extern bfd_boolean bfd_elf64_slurp_reloc_table - (bfd *, asection *, asymbol **, bfd_boolean); +extern bool bfd_elf64_slurp_reloc_table + (bfd *, asection *, asymbol **, bool); -extern bfd_boolean _bfd_elf_default_relocs_compatible +extern bool _bfd_elf_default_relocs_compatible (const bfd_target *, const bfd_target *); -extern bfd_boolean _bfd_elf_relocs_compatible +extern bool _bfd_elf_relocs_compatible (const bfd_target *, const bfd_target *); -extern bfd_boolean _bfd_elf_notice_as_needed +extern bool _bfd_elf_notice_as_needed (bfd *, struct bfd_link_info *, enum notice_asneeded_action); extern struct elf_link_hash_entry *_bfd_elf_archive_symbol_lookup (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_elf_link_add_symbols +extern bool bfd_elf_link_add_symbols (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_add_dynamic_entry +extern bool _bfd_elf_add_dynamic_entry (struct bfd_link_info *, bfd_vma, bfd_vma); -extern bfd_boolean _bfd_elf_strip_zero_sized_dynamic_sections +extern bool _bfd_elf_strip_zero_sized_dynamic_sections (struct bfd_link_info *); extern int bfd_elf_add_dt_needed_tag (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_link_check_relocs +extern bool _bfd_elf_link_check_relocs (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_link_record_dynamic_symbol +extern bool bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); extern int bfd_elf_link_record_local_dynamic_symbol (struct bfd_link_info *, bfd *, long); -extern bfd_boolean _bfd_elf_close_and_cleanup +extern bool _bfd_elf_close_and_cleanup (bfd *); -extern bfd_boolean _bfd_elf_common_definition +extern bool _bfd_elf_common_definition (Elf_Internal_Sym *); extern unsigned int _bfd_elf_common_section_index @@ -2621,22 +2620,22 @@ extern bfd_reloc_status_type _bfd_elf_rel_vtable_reloc_fn (bfd *, arelent *, struct bfd_symbol *, void *, asection *, bfd *, char **); -extern bfd_boolean bfd_elf_final_link +extern bool bfd_elf_final_link (bfd *, struct bfd_link_info *); extern void _bfd_elf_gc_keep (struct bfd_link_info *info); -extern bfd_boolean bfd_elf_gc_mark_dynamic_ref_symbol +extern bool bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf); -extern bfd_boolean bfd_elf_gc_sections +extern bool bfd_elf_gc_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_gc_record_vtinherit +extern bool bfd_elf_gc_record_vtinherit (bfd *, asection *, struct elf_link_hash_entry *, bfd_vma); -extern bfd_boolean bfd_elf_gc_record_vtentry +extern bool bfd_elf_gc_record_vtentry (bfd *, asection *, struct elf_link_hash_entry *, bfd_vma); extern asection *_bfd_elf_gc_mark_hook @@ -2645,38 +2644,38 @@ extern asection *_bfd_elf_gc_mark_hook extern asection *_bfd_elf_gc_mark_rsec (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn, - struct elf_reloc_cookie *, bfd_boolean *); + struct elf_reloc_cookie *, bool *); -extern bfd_boolean _bfd_elf_gc_mark_reloc +extern bool _bfd_elf_gc_mark_reloc (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn, struct elf_reloc_cookie *); -extern bfd_boolean _bfd_elf_gc_mark_fdes +extern bool _bfd_elf_gc_mark_fdes (struct bfd_link_info *, asection *, asection *, elf_gc_mark_hook_fn, struct elf_reloc_cookie *); -extern bfd_boolean _bfd_elf_gc_mark +extern bool _bfd_elf_gc_mark (struct bfd_link_info *, asection *, elf_gc_mark_hook_fn); -extern bfd_boolean _bfd_elf_gc_mark_extra_sections +extern bool _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *, elf_gc_mark_hook_fn); -extern bfd_boolean bfd_elf_gc_common_finalize_got_offsets +extern bool bfd_elf_gc_common_finalize_got_offsets (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_gc_common_final_link +extern bool bfd_elf_gc_common_final_link (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf_reloc_symbol_deleted_p +extern bool bfd_elf_reloc_symbol_deleted_p (bfd_vma, void *); extern struct elf_segment_map * _bfd_elf_make_dynamic_segment (bfd *, asection *); -extern bfd_boolean _bfd_elf_map_sections_to_segments +extern bool _bfd_elf_map_sections_to_segments (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_is_function_type (unsigned int); +extern bool _bfd_elf_is_function_type (unsigned int); extern bfd_size_type _bfd_elf_maybe_function_sym (const asymbol *, asection *, bfd_vma *); @@ -2685,7 +2684,7 @@ extern asection *_bfd_elf_plt_get_reloc_section (bfd *, const char *); extern int bfd_elf_get_default_section_type (flagword); -extern bfd_boolean bfd_elf_lookup_section_flags +extern bool bfd_elf_lookup_section_flags (struct bfd_link_info *, struct flag_info *, asection *); extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section @@ -2698,9 +2697,9 @@ extern unsigned int _bfd_elf_ppc_at_tls_transform extern unsigned int _bfd_elf_ppc_at_tprel_transform (unsigned int, unsigned int); /* PowerPC elf_object_p tweak. */ -extern bfd_boolean _bfd_elf_ppc_set_arch (bfd *); +extern bool _bfd_elf_ppc_set_arch (bfd *); /* PowerPC .gnu.attributes handling common to both 32-bit and 64-bit. */ -extern bfd_boolean _bfd_elf_ppc_merge_fp_attributes +extern bool _bfd_elf_ppc_merge_fp_attributes (bfd *, struct bfd_link_info *); /* Return an upper bound on the number of bytes required to store a @@ -2871,14 +2870,14 @@ extern char *_bfd_elf_attr_strdup (bfd *, const char *); extern void _bfd_elf_copy_obj_attributes (bfd *, bfd *); extern int _bfd_elf_obj_attrs_arg_type (bfd *, int, unsigned int); extern void _bfd_elf_parse_attributes (bfd *, Elf_Internal_Shdr *); -extern bfd_boolean _bfd_elf_merge_object_attributes +extern bool _bfd_elf_merge_object_attributes (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_merge_unknown_attribute_low (bfd *, bfd *, int); -extern bfd_boolean _bfd_elf_merge_unknown_attribute_list (bfd *, bfd *); +extern bool _bfd_elf_merge_unknown_attribute_low (bfd *, bfd *, int); +extern bool _bfd_elf_merge_unknown_attribute_list (bfd *, bfd *); extern Elf_Internal_Shdr *_bfd_elf_single_rel_hdr (asection *sec); -extern bfd_boolean elf_read_notes (bfd *, file_ptr, bfd_size_type, size_t); +extern bool elf_read_notes (bfd *, file_ptr, bfd_size_type, size_t); -extern bfd_boolean _bfd_elf_parse_gnu_properties +extern bool _bfd_elf_parse_gnu_properties (bfd *, Elf_Internal_Note *); extern elf_property * _bfd_elf_get_property (bfd *, unsigned int, unsigned int); @@ -2886,7 +2885,7 @@ extern bfd *_bfd_elf_link_setup_gnu_properties (struct bfd_link_info *); extern bfd_size_type _bfd_elf_convert_gnu_property_size (bfd *, bfd *); -extern bfd_boolean _bfd_elf_convert_gnu_properties +extern bool _bfd_elf_convert_gnu_properties (bfd *, asection *, bfd *, bfd_byte **, bfd_size_type *); /* The linker may need to keep track of the number of relocs that it @@ -2909,12 +2908,12 @@ struct elf_dyn_relocs bfd_size_type pc_count; }; -extern bfd_boolean _bfd_elf_create_ifunc_sections +extern bool _bfd_elf_create_ifunc_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_allocate_ifunc_dyn_relocs +extern bool _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_dyn_relocs **, unsigned int, unsigned int, - unsigned int, bfd_boolean); + unsigned int, bool); extern void elf_append_rela (bfd *, asection *, Elf_Internal_Rela *); extern void elf_append_rel (bfd *, asection *, Elf_Internal_Rela *); @@ -2924,27 +2923,27 @@ extern bfd_vma elf64_r_sym (bfd_vma); extern bfd_vma elf32_r_info (bfd_vma, bfd_vma); extern bfd_vma elf32_r_sym (bfd_vma); -extern bfd_boolean is_debuginfo_file (bfd *); +extern bool is_debuginfo_file (bfd *); -extern bfd_boolean _bfd_elf_init_secondary_reloc_section +extern bool _bfd_elf_init_secondary_reloc_section (bfd *, Elf_Internal_Shdr *, const char *, unsigned int); -extern bfd_boolean _bfd_elf_slurp_secondary_reloc_section - (bfd *, asection *, asymbol **, bfd_boolean); -extern bfd_boolean _bfd_elf_copy_special_section_fields +extern bool _bfd_elf_slurp_secondary_reloc_section + (bfd *, asection *, asymbol **, bool); +extern bool _bfd_elf_copy_special_section_fields (const bfd *, bfd *, const Elf_Internal_Shdr *, Elf_Internal_Shdr *); -extern bfd_boolean _bfd_elf_write_secondary_reloc_section +extern bool _bfd_elf_write_secondary_reloc_section (bfd *, asection *); extern unsigned int _bfd_elf_symbol_section_index (bfd *, elf_symbol_type *); extern asection *_bfd_elf_readonly_dynrelocs (struct elf_link_hash_entry *); -extern bfd_boolean _bfd_elf_maybe_set_textrel +extern bool _bfd_elf_maybe_set_textrel (struct elf_link_hash_entry *, void *); -extern bfd_boolean _bfd_elf_add_dynamic_tags - (bfd *, struct bfd_link_info *, bfd_boolean); +extern bool _bfd_elf_add_dynamic_tags + (bfd *, struct bfd_link_info *, bool); /* Large common section. */ extern asection _bfd_elf_large_com_section; @@ -2974,7 +2973,7 @@ extern asection _bfd_elf_large_com_section; /* It seems this can happen with erroneous or unsupported \ input (mixing a.out and elf in an archive, for example.) */ \ if (sym_hashes == NULL) \ - return FALSE; \ + return false; \ \ h = sym_hashes[r_symndx - symtab_hdr->sh_info]; \ \ @@ -2987,9 +2986,9 @@ extern asection _bfd_elf_large_com_section; || h->root.type == bfd_link_hash_warning) \ h = (struct elf_link_hash_entry *) h->root.u.i.link; \ \ - warned = FALSE; \ - ignored = FALSE; \ - unresolved_reloc = FALSE; \ + warned = false; \ + ignored = false; \ + unresolved_reloc = false; \ relocation = 0; \ if (h->root.type == bfd_link_hash_defined \ || h->root.type == bfd_link_hash_defweak) \ @@ -3001,7 +3000,7 @@ extern asection _bfd_elf_large_com_section; relocation value for this symbol. output_section \ is typically NULL for symbols satisfied by a shared \ library. */ \ - unresolved_reloc = TRUE; \ + unresolved_reloc = true; \ else \ relocation = (h->root.u.def.value \ + sec->output_section->vma \ @@ -3011,19 +3010,18 @@ extern asection _bfd_elf_large_com_section; ; \ else if (info->unresolved_syms_in_objects == RM_IGNORE \ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) \ - ignored = TRUE; \ + ignored = true; \ else if (!bfd_link_relocatable (info)) \ { \ - bfd_boolean err; \ - err = (info->unresolved_syms_in_objects == RM_DIAGNOSE && \ - !info->warn_unresolved_syms) \ - || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT; \ + bool err = ((info->unresolved_syms_in_objects == RM_DIAGNOSE \ + && !info->warn_unresolved_syms) \ + || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT); \ (*info->callbacks->undefined_symbol) (info, \ h->root.root.string, \ input_bfd, \ input_section, \ rel->r_offset, err); \ - warned = TRUE; \ + warned = true; \ } \ (void) unresolved_reloc; \ (void) warned; \ @@ -3091,7 +3089,7 @@ extern asection _bfd_elf_large_com_section; || ((INFO)->dynamic && !(H)->dynamic))) /* Determine if a section contains CTF data, using its name. */ -static inline bfd_boolean +static inline bool bfd_section_is_ctf (const asection *sec) { const char *name = bfd_section_name (sec); diff --git a/bfd/elf-eh-frame.c b/bfd/elf-eh-frame.c index 65147a3ed1..6ce6d225cf 100644 --- a/bfd/elf-eh-frame.c +++ b/bfd/elf-eh-frame.c @@ -60,81 +60,81 @@ struct cie /* If *ITER hasn't reached END yet, read the next byte into *RESULT and move onto the next byte. Return true on success. */ -static inline bfd_boolean +static inline bool read_byte (bfd_byte **iter, bfd_byte *end, unsigned char *result) { if (*iter >= end) - return FALSE; + return false; *result = *((*iter)++); - return TRUE; + return true; } /* Move *ITER over LENGTH bytes, or up to END, whichever is closer. Return true it was possible to move LENGTH bytes. */ -static inline bfd_boolean +static inline bool skip_bytes (bfd_byte **iter, bfd_byte *end, bfd_size_type length) { if ((bfd_size_type) (end - *iter) < length) { *iter = end; - return FALSE; + return false; } *iter += length; - return TRUE; + return true; } /* Move *ITER over an leb128, stopping at END. Return true if the end of the leb128 was found. */ -static bfd_boolean +static bool skip_leb128 (bfd_byte **iter, bfd_byte *end) { unsigned char byte; do if (!read_byte (iter, end, &byte)) - return FALSE; + return false; while (byte & 0x80); - return TRUE; + return true; } /* Like skip_leb128, but treat the leb128 as an unsigned value and store it in *VALUE. */ -static bfd_boolean +static bool read_uleb128 (bfd_byte **iter, bfd_byte *end, bfd_vma *value) { bfd_byte *start, *p; start = *iter; if (!skip_leb128 (iter, end)) - return FALSE; + return false; p = *iter; *value = *--p; while (p > start) *value = (*value << 7) | (*--p & 0x7f); - return TRUE; + return true; } /* Like read_uleb128, but for signed values. */ -static bfd_boolean +static bool read_sleb128 (bfd_byte **iter, bfd_byte *end, bfd_signed_vma *value) { bfd_byte *start, *p; start = *iter; if (!skip_leb128 (iter, end)) - return FALSE; + return false; p = *iter; *value = ((*--p & 0x7f) ^ 0x40) - 0x40; while (p > start) *value = (*value << 7) | (*--p & 0x7f); - return TRUE; + return true; } /* Return 0 if either encoding is variable width, or not yet known to bfd. */ @@ -342,14 +342,14 @@ next_cie_fde_offset (const struct eh_cie_fde *ent, Try to move *ITER past the first instruction and return true on success. ENCODED_PTR_WIDTH gives the width of pointer entries. */ -static bfd_boolean +static bool skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width) { bfd_byte op; bfd_vma length; if (!read_byte (iter, end, &op)) - return FALSE; + return false; switch (op & 0xc0 ? op & 0xc0 : op) { @@ -360,7 +360,7 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width) case DW_CFA_restore_state: case DW_CFA_GNU_window_save: /* No arguments. */ - return TRUE; + return true; case DW_CFA_offset: case DW_CFA_restore_extended: @@ -413,7 +413,7 @@ skip_cfa_op (bfd_byte **iter, bfd_byte *end, unsigned int encoded_ptr_width) return skip_bytes (iter, end, 8); default: - return FALSE; + return false; } } @@ -497,7 +497,7 @@ bfd_elf_record_eh_frame_entry (struct eh_frame_hdr_info *hdr_info, { if (hdr_info->u.compact.allocated_entries == 0) { - hdr_info->frame_hdr_is_compact = TRUE; + hdr_info->frame_hdr_is_compact = true; hdr_info->u.compact.allocated_entries = 2; hdr_info->u.compact.entries = bfd_malloc (hdr_info->u.compact.allocated_entries @@ -521,7 +521,7 @@ bfd_elf_record_eh_frame_entry (struct eh_frame_hdr_info *hdr_info, /* Parse a .eh_frame_entry section. Figure out which text section it references. */ -bfd_boolean +bool _bfd_elf_parse_eh_frame_entry (struct bfd_link_info *info, asection *sec, struct elf_reloc_cookie *cookie) { @@ -536,28 +536,28 @@ _bfd_elf_parse_eh_frame_entry (struct bfd_link_info *info, if (sec->size == 0 || sec->sec_info_type != SEC_INFO_TYPE_NONE) { - return TRUE; + return true; } if (sec->output_section && bfd_is_abs_section (sec->output_section)) { /* At least one of the sections is being discarded from the link, so we should just ignore them. */ - return TRUE; + return true; } if (cookie->rel == cookie->relend) - return FALSE; + return false; /* The first relocation is the function start. */ r_symndx = cookie->rel->r_info >> cookie->r_sym_shift; if (r_symndx == STN_UNDEF) - return FALSE; + return false; - text_sec = _bfd_elf_section_for_symbol (cookie, r_symndx, FALSE); + text_sec = _bfd_elf_section_for_symbol (cookie, r_symndx, false); if (text_sec == NULL) - return FALSE; + return false; elf_section_eh_frame_entry (text_sec) = sec; if (text_sec->output_section @@ -567,7 +567,7 @@ _bfd_elf_parse_eh_frame_entry (struct bfd_link_info *info, sec->sec_info_type = SEC_INFO_TYPE_EH_FRAME_ENTRY; elf_section_data (sec)->sec_info = text_sec; bfd_elf_record_eh_frame_entry (hdr_info, sec); - return TRUE; + return true; } /* Try to parse .eh_frame section SEC, which belongs to ABFD. Store the @@ -937,7 +937,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, SKIP_RELOCS (buf - length); if (!GET_RELOC (buf - length) - && read_value (abfd, buf - length, length, FALSE) == 0) + && read_value (abfd, buf - length, length, false) == 0) { (*info->callbacks->minfo) /* xgettext:c-format */ @@ -1048,7 +1048,7 @@ _bfd_elf_parse_eh_frame (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("error in %pB(%pA); no .eh_frame_hdr table will be created"), abfd, sec); - hdr_info->u.dwarf.table = FALSE; + hdr_info->u.dwarf.table = false; free (sec_info); success: free (ehbuf); @@ -1111,7 +1111,7 @@ add_eh_frame_hdr_terminator (asection *sec, /* Finish a pass over all .eh_frame_entry sections. */ -bfd_boolean +bool _bfd_elf_end_eh_frame_parsing (struct bfd_link_info *info) { struct eh_frame_hdr_info *hdr_info; @@ -1121,7 +1121,7 @@ _bfd_elf_end_eh_frame_parsing (struct bfd_link_info *info) if (info->eh_frame_hdr_type != COMPACT_EH_HDR || hdr_info->array_count == 0) - return FALSE; + return false; bfd_elf_discard_eh_frame_entry (hdr_info); @@ -1136,14 +1136,14 @@ _bfd_elf_end_eh_frame_parsing (struct bfd_link_info *info) /* Add a CANTUNWIND terminator after the last entry. */ add_eh_frame_hdr_terminator (hdr_info->u.compact.entries[i], NULL); - return TRUE; + return true; } /* Mark all relocations against CIE or FDE ENT, which occurs in .eh_frame section SEC. COOKIE describes the relocations in SEC; its "rel" field can be changed freely. */ -static bfd_boolean +static bool mark_entry (struct bfd_link_info *info, asection *sec, struct eh_cie_fde *ent, elf_gc_mark_hook_fn gc_mark_hook, struct elf_reloc_cookie *cookie) @@ -1154,16 +1154,16 @@ mark_entry (struct bfd_link_info *info, asection *sec, && cookie->rel->r_offset < ent->offset + ent->size; cookie->rel++) if (!_bfd_elf_gc_mark_reloc (info, sec, gc_mark_hook, cookie)) - return FALSE; + return false; - return TRUE; + return true; } /* Mark all the relocations against FDEs that relate to code in input section SEC. The FDEs belong to .eh_frame section EH_FRAME, whose relocations are described by COOKIE. */ -bfd_boolean +bool _bfd_elf_gc_mark_fdes (struct bfd_link_info *info, asection *sec, asection *eh_frame, elf_gc_mark_hook_fn gc_mark_hook, struct elf_reloc_cookie *cookie) @@ -1173,7 +1173,7 @@ _bfd_elf_gc_mark_fdes (struct bfd_link_info *info, asection *sec, for (fde = elf_fde_list (sec); fde; fde = fde->u.fde.next_for_section) { if (!mark_entry (info, eh_frame, fde, gc_mark_hook, cookie)) - return FALSE; + return false; /* At this stage, all cie_inf fields point to local CIEs, so we can use the same cookie to refer to them. */ @@ -1182,10 +1182,10 @@ _bfd_elf_gc_mark_fdes (struct bfd_link_info *info, asection *sec, { cie->u.cie.gc_mark = 1; if (!mark_entry (info, eh_frame, cie, gc_mark_hook, cookie)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Input section SEC of ABFD is an .eh_frame section that contains the @@ -1226,7 +1226,7 @@ find_merged_cie (bfd *abfd, struct bfd_link_info *info, asection *sec, if (cie->per_encoding != DW_EH_PE_omit) { - bfd_boolean per_binds_local; + bool per_binds_local; /* Work out the address of personality routine, or at least enough info that we could calculate the address had we made a @@ -1275,7 +1275,7 @@ find_merged_cie (bfd *abfd, struct bfd_link_info *info, asection *sec, cie->local_personality = 1; cie->personality.sym.bfd_id = abfd->id; cie->personality.sym.index = r_symndx; - per_binds_local = TRUE; + per_binds_local = true; } if (per_binds_local @@ -1411,7 +1411,7 @@ offset_adjust (bfd_vma offset, const asection *sec) when a CIE is merged with a previous CIE, since the symbol is moved to the merged CIE. */ -bfd_boolean +bool _bfd_elf_adjust_eh_frame_global_symbol (struct elf_link_hash_entry *h, void *arg ATTRIBUTE_UNUSED) { @@ -1420,17 +1420,17 @@ _bfd_elf_adjust_eh_frame_global_symbol (struct elf_link_hash_entry *h, if (h->root.type != bfd_link_hash_defined && h->root.type != bfd_link_hash_defweak) - return TRUE; + return true; sym_sec = h->root.u.def.section; if (sym_sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME || elf_section_data (sym_sec)->sec_info == NULL) - return TRUE; + return true; delta = offset_adjust (h->root.u.def.value, sym_sec); h->root.u.def.value += delta; - return TRUE; + return true; } /* The same for all local symbols defined in .eh_frame. Returns true @@ -1467,10 +1467,10 @@ adjust_eh_frame_local_symbols (const asection *sec, functions. The function returns TRUE iff any entries have been deleted. */ -bfd_boolean +bool _bfd_elf_discard_section_eh_frame (bfd *abfd, struct bfd_link_info *info, asection *sec, - bfd_boolean (*reloc_symbol_deleted_p) (bfd_vma, void *), + bool (*reloc_symbol_deleted_p) (bfd_vma, void *), struct elf_reloc_cookie *cookie) { struct eh_cie_fde *ent; @@ -1480,11 +1480,11 @@ _bfd_elf_discard_section_eh_frame int changed; if (sec->sec_info_type != SEC_INFO_TYPE_EH_FRAME) - return FALSE; + return false; sec_info = (struct eh_frame_sec_info *) elf_section_data (sec)->sec_info; if (sec_info == NULL) - return FALSE; + return false; ptr_size = (get_elf_backend_data (sec->owner) ->elf_backend_eh_frame_address_size (sec->owner, sec)); @@ -1497,7 +1497,7 @@ _bfd_elf_discard_section_eh_frame ent->removed = sec->map_head.s != NULL; else if (!ent->cie && ent->u.fde.cie_inf != NULL) { - bfd_boolean keep; + bool keep; if ((sec->flags & SEC_LINKER_CREATED) != 0 && cookie->rels == NULL) { unsigned int width @@ -1528,7 +1528,7 @@ _bfd_elf_discard_section_eh_frame which we cannot turn into PC relative, don't create the binary search table, since it is affected by runtime relocations. */ - hdr_info->u.dwarf.table = FALSE; + hdr_info->u.dwarf.table = false; /* Only warn if --eh-frame-hdr was specified. */ if (info->eh_frame_hdr_type != 0) { @@ -1609,7 +1609,7 @@ _bfd_elf_discard_section_eh_frame _bfd_elf_discard_section_eh_frame has been called on all .eh_frame input sections. It finalizes the size of .eh_frame_hdr section. */ -bfd_boolean +bool _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_table *htab; @@ -1627,7 +1627,7 @@ _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) sec = hdr_info->hdr_sec; if (sec == NULL) - return FALSE; + return false; if (info->eh_frame_hdr_type == COMPACT_EH_HDR) { @@ -1643,34 +1643,34 @@ _bfd_elf_discard_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) } elf_eh_frame_hdr (abfd) = sec; - return TRUE; + return true; } /* Return true if there is at least one non-empty .eh_frame section in input files. Can only be called after ld has mapped input to output sections, and before sections are stripped. */ -bfd_boolean +bool _bfd_elf_eh_frame_present (struct bfd_link_info *info) { asection *eh = bfd_get_section_by_name (info->output_bfd, ".eh_frame"); if (eh == NULL) - return FALSE; + return false; /* Count only sections which have at least a single CIE or FDE. There cannot be any CIE or FDE <= 8 bytes. */ for (eh = eh->map_head.s; eh != NULL; eh = eh->map_head.s) if (eh->size > 8) - return TRUE; + return true; - return FALSE; + return false; } /* Return true if there is at least one .eh_frame_entry section in input files. */ -bfd_boolean +bool _bfd_elf_eh_frame_entry_present (struct bfd_link_info *info) { asection *o; @@ -1684,10 +1684,10 @@ _bfd_elf_eh_frame_entry_present (struct bfd_link_info *info) if (strcmp (name, ".eh_frame_entry") && !bfd_is_abs_section (o->output_section)) - return TRUE; + return true; } } - return FALSE; + return false; } /* This function is called from size_dynamic_sections. @@ -1695,7 +1695,7 @@ _bfd_elf_eh_frame_entry_present (struct bfd_link_info *info) because when the dynamic symbol table has been sized it is too late to strip sections. */ -bfd_boolean +bool _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info) { struct elf_link_hash_table *htab; @@ -1706,7 +1706,7 @@ _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info) htab = elf_hash_table (info); hdr_info = &htab->eh_info; if (hdr_info->hdr_sec == NULL) - return TRUE; + return true; if (bfd_is_abs_section (hdr_info->hdr_sec->output_section) || info->eh_frame_hdr_type == 0 @@ -1717,25 +1717,25 @@ _bfd_elf_maybe_strip_eh_frame_hdr (struct bfd_link_info *info) { hdr_info->hdr_sec->flags |= SEC_EXCLUDE; hdr_info->hdr_sec = NULL; - return TRUE; + return true; } /* Add a hidden symbol so that systems without access to PHDRs can find the table. */ if (! (_bfd_generic_link_add_one_symbol (info, info->output_bfd, "__GNU_EH_FRAME_HDR", BSF_LOCAL, - hdr_info->hdr_sec, 0, NULL, FALSE, FALSE, &bh))) - return FALSE; + hdr_info->hdr_sec, 0, NULL, false, false, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->other = STV_HIDDEN; get_elf_backend_data - (info->output_bfd)->elf_backend_hide_symbol (info, h, TRUE); + (info->output_bfd)->elf_backend_hide_symbol (info, h, true); if (!hdr_info->frame_hdr_is_compact) - hdr_info->u.dwarf.table = TRUE; - return TRUE; + hdr_info->u.dwarf.table = true; + return true; } /* Adjust an address in the .eh_frame section. Given OFFSET within @@ -1828,7 +1828,7 @@ _bfd_elf_eh_frame_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, /* Write out .eh_frame_entry section. Add CANTUNWIND terminator if needed. Also check that the contents look sane. */ -bfd_boolean +bool _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info, asection *sec, bfd_byte *contents) { @@ -1849,11 +1849,11 @@ _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info, excluded outside of the normal process. */ if (sec->flags & SEC_EXCLUDE || text_sec->flags & SEC_EXCLUDE) - return TRUE; + return true; if (!bfd_set_section_contents (abfd, sec->output_section, contents, sec->output_offset, sec->rawsize)) - return FALSE; + return false; last_addr = bfd_get_signed_32 (abfd, contents); /* Check that all the entries are in order. */ @@ -1864,7 +1864,7 @@ _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info, { /* xgettext:c-format */ _bfd_error_handler (_("%pB: %pA not in order"), sec->owner, sec); - return FALSE; + return false; } last_addr = addr; @@ -1880,7 +1880,7 @@ _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info, _bfd_error_handler (_("%pB: %pA invalid input section size"), sec->owner, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (last_addr >= addr + sec->rawsize) { @@ -1888,11 +1888,11 @@ _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info, _bfd_error_handler (_("%pB: %pA points past end of text section"), sec->owner, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (sec->size == sec->rawsize) - return TRUE; + return true; bed = get_elf_backend_data (abfd); BFD_ASSERT (sec->size == sec->rawsize + 8); @@ -1908,7 +1908,7 @@ _bfd_elf_write_section_eh_frame_entry (bfd *abfd, struct bfd_link_info *info, /* Write out .eh_frame section. This is called with the relocated contents. */ -bfd_boolean +bool _bfd_elf_write_section_eh_frame (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1935,7 +1935,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, if (hdr_info->u.dwarf.table && hdr_info->u.dwarf.array == NULL) { - hdr_info->frame_hdr_is_compact = FALSE; + hdr_info->frame_hdr_is_compact = false; hdr_info->u.dwarf.array = (struct eh_frame_array_ent *) bfd_malloc (hdr_info->u.dwarf.fde_count * sizeof (*hdr_info->u.dwarf.array)); @@ -2184,7 +2184,7 @@ _bfd_elf_write_section_eh_frame (bfd *abfd, hdr_info->u.dwarf.array[hdr_info->array_count].initial_loc = address; hdr_info->u.dwarf.array[hdr_info->array_count].range - = read_value (abfd, buf + width, width, FALSE); + = read_value (abfd, buf + width, width, false); hdr_info->u.dwarf.array[hdr_info->array_count++].fde = (sec->output_section->vma + sec->output_offset @@ -2283,7 +2283,7 @@ vma_compare (const void *a, const void *b) invalid for a linker script to try to force a particular order of .eh_frame_entry sections. */ -bfd_boolean +bool _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *info) { asection *sec = NULL; @@ -2298,7 +2298,7 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *info) if (hdr_info->hdr_sec == NULL || info->eh_frame_hdr_type != COMPACT_EH_HDR || hdr_info->array_count == 0) - return TRUE; + return true; /* Change section output offsets to be in text section order. */ offset = 8; @@ -2311,7 +2311,7 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *info) _bfd_error_handler (_("invalid output section for .eh_frame_entry: %pA"), sec->output_section); - return FALSE; + return false; } sec->output_offset = offset; offset += sec->size; @@ -2333,10 +2333,10 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *info) { _bfd_error_handler (_("invalid contents in %pA section"), osec); - return FALSE; + return false; } - return TRUE; + return true; } /* The .eh_frame_hdr format for Compact EH frames: @@ -2345,7 +2345,7 @@ _bfd_elf_fixup_eh_frame_hdr (struct bfd_link_info *info) uint32_t count (Number of entries in table) [array from .eh_frame_entry sections] */ -static bfd_boolean +static bool write_compact_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_table *htab; @@ -2398,13 +2398,13 @@ write_compact_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) FDE initial_location field and FDE address, sorted by increasing initial_loc). */ -static bfd_boolean +static bool write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_table *htab; struct eh_frame_hdr_info *hdr_info; asection *sec; - bfd_boolean retval = TRUE; + bool retval = true; htab = elf_hash_table (info); hdr_info = &htab->eh_info; @@ -2420,13 +2420,13 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) size += 4 + hdr_info->u.dwarf.fde_count * 8; contents = (bfd_byte *) bfd_malloc (size); if (contents == NULL) - return FALSE; + return false; eh_frame_sec = bfd_get_section_by_name (abfd, ".eh_frame"); if (eh_frame_sec == NULL) { free (contents); - return FALSE; + return false; } memset (contents, 0, EH_FRAME_HDR_SIZE); @@ -2454,14 +2454,14 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) if (contents[2] != DW_EH_PE_omit) { unsigned int i; - bfd_boolean overlap, overflow; + bool overlap, overflow; bfd_put_32 (abfd, hdr_info->u.dwarf.fde_count, contents + EH_FRAME_HDR_SIZE); qsort (hdr_info->u.dwarf.array, hdr_info->u.dwarf.fde_count, sizeof (*hdr_info->u.dwarf.array), vma_compare); - overlap = FALSE; - overflow = FALSE; + overlap = false; + overflow = false; for (i = 0; i < hdr_info->u.dwarf.fde_count; i++) { bfd_vma val; @@ -2472,20 +2472,20 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) if (elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64 && (hdr_info->u.dwarf.array[i].initial_loc != sec->output_section->vma + val)) - overflow = TRUE; + overflow = true; bfd_put_32 (abfd, val, contents + EH_FRAME_HDR_SIZE + i * 8 + 4); val = hdr_info->u.dwarf.array[i].fde - sec->output_section->vma; val = ((val & 0xffffffff) ^ 0x80000000) - 0x80000000; if (elf_elfheader (abfd)->e_ident[EI_CLASS] == ELFCLASS64 && (hdr_info->u.dwarf.array[i].fde != sec->output_section->vma + val)) - overflow = TRUE; + overflow = true; bfd_put_32 (abfd, val, contents + EH_FRAME_HDR_SIZE + i * 8 + 8); if (i != 0 && (hdr_info->u.dwarf.array[i].initial_loc < (hdr_info->u.dwarf.array[i - 1].initial_loc + hdr_info->u.dwarf.array[i - 1].range))) - overlap = TRUE; + overlap = true; } if (overflow) _bfd_error_handler (_(".eh_frame_hdr entry overflow")); @@ -2494,7 +2494,7 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) if (overflow || overlap) { bfd_set_error (bfd_error_bad_value); - retval = FALSE; + retval = false; } } @@ -2502,7 +2502,7 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) if (!bfd_set_section_contents (abfd, sec->output_section, contents, (file_ptr) sec->output_offset, sec->size)) - retval = FALSE; + retval = false; free (contents); free (hdr_info->u.dwarf.array); @@ -2513,7 +2513,7 @@ write_dwarf_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) _bfd_elf_write_section_eh_frame has been called on all input .eh_frame sections. */ -bfd_boolean +bool _bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_table *htab; @@ -2525,7 +2525,7 @@ _bfd_elf_write_section_eh_frame_hdr (bfd *abfd, struct bfd_link_info *info) sec = hdr_info->hdr_sec; if (info->eh_frame_hdr_type == 0 || sec == NULL) - return TRUE; + return true; if (info->eh_frame_hdr_type == COMPACT_EH_HDR) return write_compact_eh_frame_hdr (abfd, info); @@ -2544,12 +2544,12 @@ _bfd_elf_eh_frame_address_size (bfd *abfd, const asection *sec ATTRIBUTE_UNUSED) /* Decide whether we can use a PC-relative encoding within the given EH frame section. This is the default implementation. */ -bfd_boolean +bool _bfd_elf_can_make_relative (bfd *input_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, asection *eh_frame_section ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Select an encoding for the given address. Preference is given to diff --git a/bfd/elf-hppa.h b/bfd/elf-hppa.h index 97d74ec7d7..1e15b174da 100644 --- a/bfd/elf-hppa.h +++ b/bfd/elf-hppa.h @@ -49,286 +49,286 @@ static reloc_howto_type elf_hppa_howto_table[ELF_HOWTO_TABLE_SIZE] = { #define HOW(type, size, bitsize, pc_rel, complain, mask) \ HOWTO (type, 0, size, bitsize, pc_rel, 0, complain_overflow_ ## complain, \ - bfd_elf_generic_reloc, #type, FALSE, 0, mask, FALSE) + bfd_elf_generic_reloc, #type, false, 0, mask, false) /* The values in DIR32 are to placate the check in _bfd_stab_section_find_nearest_line. */ - HOW (R_PARISC_NONE, 3, 0, FALSE, dont, 0), - HOW (R_PARISC_DIR32, 2, 32, FALSE, bitfield, 0xffffffff), - HOW (R_PARISC_DIR21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_DIR17R, 2, 17, FALSE, bitfield, 0), - HOW (R_PARISC_DIR17F, 2, 17, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DIR14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DIR14F, 2, 14, FALSE, bitfield, 0), + HOW (R_PARISC_NONE, 3, 0, false, dont, 0), + HOW (R_PARISC_DIR32, 2, 32, false, bitfield, 0xffffffff), + HOW (R_PARISC_DIR21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_DIR17R, 2, 17, false, bitfield, 0), + HOW (R_PARISC_DIR17F, 2, 17, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DIR14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DIR14F, 2, 14, false, bitfield, 0), /* 8 */ - HOW (R_PARISC_PCREL12F, 2, 12, TRUE, bitfield, 0), - HOW (R_PARISC_PCREL32, 2, 32, TRUE, bitfield, 0), - HOW (R_PARISC_PCREL21L, 2, 21, TRUE, bitfield, 0), - HOW (R_PARISC_PCREL17R, 2, 17, TRUE, bitfield, 0), - HOW (R_PARISC_PCREL17F, 2, 17, TRUE, bitfield, 0), - HOW (R_PARISC_PCREL17C, 2, 17, TRUE, bitfield, 0), - HOW (R_PARISC_PCREL14R, 2, 14, TRUE, bitfield, 0), - HOW (R_PARISC_PCREL14F, 2, 14, TRUE, bitfield, 0), + HOW (R_PARISC_PCREL12F, 2, 12, true, bitfield, 0), + HOW (R_PARISC_PCREL32, 2, 32, true, bitfield, 0), + HOW (R_PARISC_PCREL21L, 2, 21, true, bitfield, 0), + HOW (R_PARISC_PCREL17R, 2, 17, true, bitfield, 0), + HOW (R_PARISC_PCREL17F, 2, 17, true, bitfield, 0), + HOW (R_PARISC_PCREL17C, 2, 17, true, bitfield, 0), + HOW (R_PARISC_PCREL14R, 2, 14, true, bitfield, 0), + HOW (R_PARISC_PCREL14F, 2, 14, true, bitfield, 0), /* 16 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DPREL21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_DPREL14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DPREL14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DPREL14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DPREL14F, 2, 14, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DPREL21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_DPREL14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DPREL14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DPREL14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DPREL14F, 2, 14, false, bitfield, 0), /* 24 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DLTREL21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DLTREL14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DLTREL14F, 2, 14, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DLTREL21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DLTREL14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DLTREL14F, 2, 14, false, bitfield, 0), /* 32 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DLTIND21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DLTIND14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DLTIND14F, 2, 14, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DLTIND21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DLTIND14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DLTIND14F, 2, 14, false, bitfield, 0), /* 40 */ - HOW (R_PARISC_SETBASE, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_SECREL32, 2, 32, FALSE, bitfield, 0xffffffff), - HOW (R_PARISC_BASEREL21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_BASEREL17R, 2, 17, FALSE, bitfield, 0), - HOW (R_PARISC_BASEREL17F, 2, 17, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_BASEREL14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_BASEREL14F, 2, 14, FALSE, bitfield, 0), + HOW (R_PARISC_SETBASE, 0, 0, false, bitfield, 0), + HOW (R_PARISC_SECREL32, 2, 32, false, bitfield, 0xffffffff), + HOW (R_PARISC_BASEREL21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_BASEREL17R, 2, 17, false, bitfield, 0), + HOW (R_PARISC_BASEREL17F, 2, 17, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_BASEREL14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_BASEREL14F, 2, 14, false, bitfield, 0), /* 48 */ - HOW (R_PARISC_SEGBASE, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_SEGREL32, 2, 32, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF14F, 2, 14, FALSE, bitfield, 0), + HOW (R_PARISC_SEGBASE, 0, 0, false, bitfield, 0), + HOW (R_PARISC_SEGREL32, 2, 32, false, bitfield, 0), + HOW (R_PARISC_PLTOFF21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_PLTOFF14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_PLTOFF14F, 2, 14, false, bitfield, 0), /* 56 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR32, 2, 32, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR32, 2, 32, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 64 */ - HOW (R_PARISC_FPTR64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_PLABEL32, 2, 32, FALSE, bitfield, 0), - HOW (R_PARISC_PLABEL21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_PLABEL14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_FPTR64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_PLABEL32, 2, 32, false, bitfield, 0), + HOW (R_PARISC_PLABEL21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_PLABEL14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 72 */ - HOW (R_PARISC_PCREL64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_PCREL22C, 2, 22, FALSE, bitfield, 0), - HOW (R_PARISC_PCREL22F, 2, 22, FALSE, bitfield, 0), - HOW (R_PARISC_PCREL14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_PCREL14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_PCREL16F, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_PCREL16WF, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_PCREL16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_PCREL64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_PCREL22C, 2, 22, false, bitfield, 0), + HOW (R_PARISC_PCREL22F, 2, 22, false, bitfield, 0), + HOW (R_PARISC_PCREL14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_PCREL14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_PCREL16F, 2, 16, false, bitfield, 0), + HOW (R_PARISC_PCREL16WF, 2, 16, false, bitfield, 0), + HOW (R_PARISC_PCREL16DF, 2, 16, false, bitfield, 0), /* 80 */ - HOW (R_PARISC_DIR64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DIR14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DIR14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DIR16F, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_DIR16WF, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_DIR16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_DIR64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DIR14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DIR14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DIR16F, 2, 16, false, bitfield, 0), + HOW (R_PARISC_DIR16WF, 2, 16, false, bitfield, 0), + HOW (R_PARISC_DIR16DF, 2, 16, false, bitfield, 0), /* 88 */ - HOW (R_PARISC_GPREL64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DLTREL14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DLTREL14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_GPREL16F, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_GPREL16WF, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_GPREL16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_GPREL64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DLTREL14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DLTREL14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_GPREL16F, 2, 16, false, bitfield, 0), + HOW (R_PARISC_GPREL16WF, 2, 16, false, bitfield, 0), + HOW (R_PARISC_GPREL16DF, 2, 16, false, bitfield, 0), /* 96 */ - HOW (R_PARISC_LTOFF64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_DLTIND14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_DLTIND14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF16F, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF16WF, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_LTOFF64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_DLTIND14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_DLTIND14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_LTOFF16F, 2, 16, false, bitfield, 0), + HOW (R_PARISC_LTOFF16WF, 2, 16, false, bitfield, 0), + HOW (R_PARISC_LTOFF16DF, 2, 16, false, bitfield, 0), /* 104 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_BASEREL14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_BASEREL14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_BASEREL14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_BASEREL14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 112 */ - HOW (R_PARISC_SEGREL64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF16F, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF16WF, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_PLTOFF16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_SEGREL64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_PLTOFF14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_PLTOFF14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_PLTOFF16F, 2, 16, false, bitfield, 0), + HOW (R_PARISC_PLTOFF16WF, 2, 16, false, bitfield, 0), + HOW (R_PARISC_PLTOFF16DF, 2, 16, false, bitfield, 0), /* 120 */ - HOW (R_PARISC_LTOFF_FPTR64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR16F, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR16WF, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_FPTR16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR16F, 2, 16, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR16WF, 2, 16, false, bitfield, 0), + HOW (R_PARISC_LTOFF_FPTR16DF, 2, 16, false, bitfield, 0), /* 128 */ - HOW (R_PARISC_COPY, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_IPLT, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_EPLT, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_COPY, 0, 0, false, bitfield, 0), + HOW (R_PARISC_IPLT, 0, 0, false, bitfield, 0), + HOW (R_PARISC_EPLT, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 136 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 144 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), /* 152 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_TPREL32, 2, 32, FALSE, dont, 0), - HOW (R_PARISC_TPREL21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_TPREL14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_TPREL32, 2, 32, false, dont, 0), + HOW (R_PARISC_TPREL21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_TPREL14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), /* 160 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_LTOFF_TP21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_TP14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_TP14F, 2, 14, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_LTOFF_TP21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_LTOFF_TP14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_LTOFF_TP14F, 2, 14, false, bitfield, 0), /* 168 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 176 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 184 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), /* 192 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 200 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 208 */ - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, dont, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), /* 216 */ - HOW (R_PARISC_TPREL64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_TPREL14WR, 2, 14, FALSE, dont, 0), - HOW (R_PARISC_TPREL14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_TPREL16F, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_TPREL16WF, 2, 16, FALSE, dont, 0), - HOW (R_PARISC_TPREL16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_TPREL64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_TPREL14WR, 2, 14, false, dont, 0), + HOW (R_PARISC_TPREL14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_TPREL16F, 2, 16, false, bitfield, 0), + HOW (R_PARISC_TPREL16WF, 2, 16, false, dont, 0), + HOW (R_PARISC_TPREL16DF, 2, 16, false, bitfield, 0), /* 224 */ - HOW (R_PARISC_LTOFF_TP64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_UNIMPLEMENTED, 0, 0, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_TP14WR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_TP14DR, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_TP16F, 2, 16, FALSE, dont, 0), - HOW (R_PARISC_LTOFF_TP16WF, 2, 16, FALSE, bitfield, 0), - HOW (R_PARISC_LTOFF_TP16DF, 2, 16, FALSE, bitfield, 0), + HOW (R_PARISC_LTOFF_TP64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_UNIMPLEMENTED, 0, 0, false, bitfield, 0), + HOW (R_PARISC_LTOFF_TP14WR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_LTOFF_TP14DR, 2, 14, false, bitfield, 0), + HOW (R_PARISC_LTOFF_TP16F, 2, 16, false, dont, 0), + HOW (R_PARISC_LTOFF_TP16WF, 2, 16, false, bitfield, 0), + HOW (R_PARISC_LTOFF_TP16DF, 2, 16, false, bitfield, 0), /* 232 */ - HOW (R_PARISC_GNU_VTENTRY, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_GNU_VTINHERIT, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_TLS_GD21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_GD14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_GDCALL, 0, 0, FALSE, dont, 0), - HOW (R_PARISC_TLS_LDM21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_LDM14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_LDMCALL, 0, 0, FALSE, dont, 0), + HOW (R_PARISC_GNU_VTENTRY, 0, 0, false, dont, 0), + HOW (R_PARISC_GNU_VTINHERIT, 0, 0, false, dont, 0), + HOW (R_PARISC_TLS_GD21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_TLS_GD14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_TLS_GDCALL, 0, 0, false, dont, 0), + HOW (R_PARISC_TLS_LDM21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_TLS_LDM14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_TLS_LDMCALL, 0, 0, false, dont, 0), /* 240 */ - HOW (R_PARISC_TLS_LDO21L, 2, 21, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_LDO14R, 2, 14, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_DTPMOD32, 2, 32, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_DTPMOD64, 4, 64, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_DTPOFF32, 2, 32, FALSE, bitfield, 0), - HOW (R_PARISC_TLS_DTPOFF64, 4, 64, FALSE, bitfield, 0) + HOW (R_PARISC_TLS_LDO21L, 2, 21, false, bitfield, 0), + HOW (R_PARISC_TLS_LDO14R, 2, 14, false, bitfield, 0), + HOW (R_PARISC_TLS_DTPMOD32, 2, 32, false, bitfield, 0), + HOW (R_PARISC_TLS_DTPMOD64, 4, 64, false, bitfield, 0), + HOW (R_PARISC_TLS_DTPOFF32, 2, 32, false, bitfield, 0), + HOW (R_PARISC_TLS_DTPOFF64, 4, 64, false, bitfield, 0) #undef HOW }; @@ -778,7 +778,7 @@ _bfd_elf_hppa_gen_reloc_type (bfd *abfd, /* Translate from an elf into field into a howto relocation pointer. */ -static bfd_boolean +static bool elf_hppa_info_to_howto (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) @@ -798,15 +798,15 @@ elf_hppa_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_reloc->howto = howto; - return TRUE; + return true; } /* Translate from an elf into field into a howto relocation pointer. */ -static bfd_boolean +static bool elf_hppa_info_to_howto_rel (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) @@ -826,10 +826,10 @@ elf_hppa_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_reloc->howto = howto; - return TRUE; + return true; } /* Return the address of the howto table entry to perform the CODE @@ -865,18 +865,18 @@ elf_hppa_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Return TRUE if SYM represents a local label symbol. */ -static bfd_boolean +static bool elf_hppa_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { if (name[0] == 'L' && name[1] == '$') - return TRUE; + return true; return _bfd_elf_is_local_label_name (abfd, name); } /* Set the correct type for an ELF section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) { const char *name; @@ -920,10 +920,10 @@ elf_hppa_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) so it is allowed to change the rules). Leave as it is for now. */ hdr->sh_entsize = 4; } - return TRUE; + return true; } -static bfd_boolean +static bool elf_hppa_final_write_processing (bfd *abfd) { int mach = bfd_get_mach (abfd); @@ -974,7 +974,7 @@ hppa_unwind_entry_compare (const void *a, const void *b) return av < bv ? -1 : av > bv ? 1 : 0; } -static bfd_boolean +static bool elf_hppa_sort_unwind (bfd *abfd) { asection *s; @@ -990,16 +990,16 @@ elf_hppa_sort_unwind (bfd *abfd) bfd_byte *contents; if (!bfd_malloc_and_get_section (abfd, s, &contents)) - return FALSE; + return false; size = s->size; qsort (contents, (size_t) (size / 16), 16, hppa_unwind_entry_compare); if (! bfd_set_section_contents (abfd, s, contents, (file_ptr) 0, size)) - return FALSE; + return false; } - return TRUE; + return true; } /* What to do when ld finds relocations against symbols defined in diff --git a/bfd/elf-ifunc.c b/bfd/elf-ifunc.c index 45a8d070b7..7f7d31d3ff 100644 --- a/bfd/elf-ifunc.c +++ b/bfd/elf-ifunc.c @@ -30,7 +30,7 @@ /* Create sections needed by STT_GNU_IFUNC symbol. */ -bfd_boolean +bool _bfd_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) { flagword flags, pltflags; @@ -39,7 +39,7 @@ _bfd_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) struct elf_link_hash_table *htab = elf_hash_table (info); if (htab->irelifunc != NULL || htab->iplt != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; pltflags = flags; @@ -63,7 +63,7 @@ _bfd_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->irelifunc = s; } else @@ -73,7 +73,7 @@ _bfd_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_with_flags (abfd, ".iplt", pltflags); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; htab->iplt = s; s = bfd_make_section_with_flags (abfd, @@ -82,7 +82,7 @@ _bfd_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->irelplt = s; /* We don't need the .igot section if we have the .igot.plt @@ -93,24 +93,24 @@ _bfd_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_with_flags (abfd, ".igot", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->igotplt = s; } - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs against a STT_GNU_IFUNC symbol definition. */ -bfd_boolean +bool _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, struct elf_link_hash_entry *h, struct elf_dyn_relocs **head, unsigned int plt_entry_size, unsigned int plt_header_size, unsigned int got_entry_size, - bfd_boolean avoid_plt) + bool avoid_plt) { asection *plt, *gotplt, *relplt; struct elf_dyn_relocs *p; @@ -118,8 +118,8 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, const struct elf_backend_data *bed; struct elf_link_hash_table *htab; /* If AVOID_PLT is TRUE, don't use PLT if possible. */ - bfd_boolean use_plt = !avoid_plt || h->plt.refcount > 0; - bfd_boolean need_dynreloc = !use_plt || bfd_link_pic (info); + bool use_plt = !avoid_plt || h->plt.refcount > 0; + bool need_dynreloc = !use_plt || bfd_link_pic (info); /* When a PIC object references a STT_GNU_IFUNC symbol defined in executable or it isn't referenced via PLT, the address of @@ -147,7 +147,7 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, h->root.root.string, h->root.u.def.section->owner); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } htab = elf_hash_table (info); @@ -158,17 +158,17 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, reference. */ if (need_dynreloc && h->ref_regular) { - bfd_boolean keep = FALSE; + bool keep = false; for (p = *head; p != NULL; p = p->next) if (p->count) { h->non_got_ref = 1; /* Need dynamic relocations for non-GOT reference. */ - keep = TRUE; + keep = true; if (p->pc_count) { /* Must use PLT for PC-relative reference. */ - use_plt = TRUE; + use_plt = true; need_dynreloc = bfd_link_pic (info); break; } @@ -183,7 +183,7 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, h->got = htab->init_got_offset; h->plt = htab->init_plt_offset; *head = NULL; - return TRUE; + return true; } /* Return and discard space for dynamic relocations against it if @@ -196,7 +196,7 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, h->got = htab->init_got_offset; h->plt = htab->init_plt_offset; *head = NULL; - return TRUE; + return true; } keep: @@ -346,5 +346,5 @@ _bfd_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, } } - return TRUE; + return true; } diff --git a/bfd/elf-m10200.c b/bfd/elf-m10200.c index 0d056a795f..9c1e4eb70f 100644 --- a/bfd/elf-m10200.c +++ b/bfd/elf-m10200.c @@ -23,9 +23,9 @@ #include "libbfd.h" #include "elf-bfd.h" -static bfd_boolean +static bool mn10200_elf_relax_delete_bytes (bfd *, asection *, bfd_vma, int); -static bfd_boolean +static bool mn10200_elf_symbol_address_p (bfd *, asection *, Elf_Internal_Sym *, bfd_vma); enum reloc_type @@ -48,114 +48,114 @@ static reloc_howto_type elf_mn10200_howto_table[] = 0, 3, 0, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_MN10200_NONE", - FALSE, + false, 0, 0, - FALSE), + false), /* Standard 32 bit reloc. */ HOWTO (R_MN10200_32, 0, 2, 32, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_32", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), /* Standard 16 bit reloc. */ HOWTO (R_MN10200_16, 0, 1, 16, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_16", - FALSE, + false, 0xffff, 0xffff, - FALSE), + false), /* Standard 8 bit reloc. */ HOWTO (R_MN10200_8, 0, 0, 8, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_8", - FALSE, + false, 0xff, 0xff, - FALSE), + false), /* Standard 24 bit reloc. */ HOWTO (R_MN10200_24, 0, 2, 24, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_24", - FALSE, + false, 0xffffff, 0xffffff, - FALSE), + false), /* Simple 8 pc-relative reloc. */ HOWTO (R_MN10200_PCREL8, 0, 0, 8, - TRUE, + true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_PCREL8", - FALSE, + false, 0xff, 0xff, - TRUE), + true), /* Simple 16 pc-relative reloc. */ HOWTO (R_MN10200_PCREL16, 0, 1, 16, - TRUE, + true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_PCREL16", - FALSE, + false, 0xffff, 0xffff, - TRUE), + true), /* Simple 32bit pc-relative reloc with a 1 byte adjustment to get the pc-relative offset correct. */ HOWTO (R_MN10200_PCREL24, 0, 2, 24, - TRUE, + true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10200_PCREL24", - FALSE, + false, 0xffffff, 0xffffff, - TRUE), + true), }; struct mn10200_reloc_map @@ -212,7 +212,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an MN10200 ELF reloc. */ -static bfd_boolean +static bool mn10200_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -226,7 +226,7 @@ mn10200_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_mn10200_howto_table[r_type]; @@ -380,7 +380,7 @@ mn10200_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -427,7 +427,7 @@ mn10200_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) (info, name, input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -454,12 +454,12 @@ mn10200_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool mn10200_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) { @@ -526,7 +526,7 @@ mn10200_elf_relax_delete_bytes (bfd *abfd, asection *sec, } } - return TRUE; + return true; } /* This function handles relaxing for the mn10200. @@ -558,11 +558,11 @@ mn10200_elf_relax_delete_bytes (bfd *abfd, asection *sec, We don't handle imm16->imm8 or d16->d8 as they're very rare and somewhat more difficult to support. */ -static bfd_boolean +static bool mn10200_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -571,7 +571,7 @@ mn10200_elf_relax_section (bfd *abfd, Elf_Internal_Sym *isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -580,7 +580,7 @@ mn10200_elf_relax_section (bfd *abfd, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -730,7 +730,7 @@ mn10200_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -777,7 +777,7 @@ mn10200_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -930,7 +930,7 @@ mn10200_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } /* Try to turn a 24bit immediate, displacement or absolute address @@ -993,7 +993,7 @@ mn10200_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; /* mov imm24,an -> mov imm16,an @@ -1044,7 +1044,7 @@ mn10200_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; /* cmp imm24,dn -> cmp imm16,dn @@ -1145,7 +1145,7 @@ mn10200_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; /* movb (abs24),dn ->movbu (abs16),dn extxb bn */ @@ -1176,7 +1176,7 @@ mn10200_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } } @@ -1210,7 +1210,7 @@ mn10200_elf_relax_section (bfd *abfd, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -1220,12 +1220,12 @@ mn10200_elf_relax_section (bfd *abfd, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Return TRUE if a symbol exists at the given address, else return FALSE. */ -static bfd_boolean +static bool mn10200_elf_symbol_address_p (bfd *abfd, asection *sec, Elf_Internal_Sym *isym, @@ -1246,7 +1246,7 @@ mn10200_elf_symbol_address_p (bfd *abfd, { if (isym->st_shndx == sec_shndx && isym->st_value == addr) - return TRUE; + return true; } symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym) @@ -1260,10 +1260,10 @@ mn10200_elf_symbol_address_p (bfd *abfd, || sym_hash->root.type == bfd_link_hash_defweak) && sym_hash->root.u.def.section == sec && sym_hash->root.u.def.value == addr) - return TRUE; + return true; } - return FALSE; + return false; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -1274,7 +1274,7 @@ mn10200_elf_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { Elf_Internal_Shdr *symtab_hdr; @@ -1308,7 +1308,7 @@ mn10200_elf_get_relocated_section_contents (bfd *output_bfd, internal_relocs = (_bfd_elf_link_read_relocs (input_bfd, input_section, NULL, - (Elf_Internal_Rela *) NULL, FALSE)); + (Elf_Internal_Rela *) NULL, false)); if (internal_relocs == NULL) goto error_return; diff --git a/bfd/elf-m10300.c b/bfd/elf-m10300.c index c9a728ae2e..fadd9ab0e8 100644 --- a/bfd/elf-m10300.c +++ b/bfd/elf-m10300.c @@ -135,7 +135,7 @@ struct elf_mn10300_obj_tdata #define elf32_mn10300_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) static reloc_howto_type elf_mn10300_howto_table[] = @@ -145,493 +145,493 @@ static reloc_howto_type elf_mn10300_howto_table[] = 0, 3, 0, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_MN10300_NONE", - FALSE, + false, 0, 0, - FALSE), + false), /* Standard 32 bit reloc. */ HOWTO (R_MN10300_32, 0, 2, 32, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10300_32", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), /* Standard 16 bit reloc. */ HOWTO (R_MN10300_16, 0, 1, 16, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10300_16", - FALSE, + false, 0xffff, 0xffff, - FALSE), + false), /* Standard 8 bit reloc. */ HOWTO (R_MN10300_8, 0, 0, 8, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10300_8", - FALSE, + false, 0xff, 0xff, - FALSE), + false), /* Standard 32bit pc-relative reloc. */ HOWTO (R_MN10300_PCREL32, 0, 2, 32, - TRUE, + true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10300_PCREL32", - FALSE, + false, 0xffffffff, 0xffffffff, - TRUE), + true), /* Standard 16bit pc-relative reloc. */ HOWTO (R_MN10300_PCREL16, 0, 1, 16, - TRUE, + true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10300_PCREL16", - FALSE, + false, 0xffff, 0xffff, - TRUE), + true), /* Standard 8 pc-relative reloc. */ HOWTO (R_MN10300_PCREL8, 0, 0, 8, - TRUE, + true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10300_PCREL8", - FALSE, + false, 0xff, 0xff, - TRUE), + true), /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_MN10300_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MN10300_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_MN10300_GNU_VTENTRY, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MN10300_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Standard 24 bit reloc. */ HOWTO (R_MN10300_24, 0, 2, 24, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_MN10300_24", - FALSE, + false, 0xffffff, 0xffffff, - FALSE), + false), HOWTO (R_MN10300_GOTPC32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOTPC32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MN10300_GOTPC16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOTPC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MN10300_GOTOFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOTOFF32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_GOTOFF24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOTOFF24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_GOTOFF16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOTOFF16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_PLT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_PLT32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MN10300_PLT16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_PLT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MN10300_GOT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOT32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_GOT24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOT24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_GOT16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_COPY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_LD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_LD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_LDO, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_LDO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_GOTIE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_GOTIE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_IE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_IE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_LE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_LE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_DTPMOD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_DTPMOD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_DTPOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_DTPOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_TLS_TPOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_MN10300_TLS_TPOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_SYM_DIFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ NULL, /* special handler. */ "R_MN10300_SYM_DIFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MN10300_ALIGN, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ NULL, /* special handler. */ "R_MN10300_ALIGN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; struct mn10300_reloc_map @@ -681,7 +681,7 @@ static const struct mn10300_reloc_map mn10300_reloc_map[] = /* Create the GOT section. */ -static bfd_boolean +static bool _bfd_mn10300_elf_create_got_section (bfd * abfd, struct bfd_link_info * info) { @@ -696,7 +696,7 @@ _bfd_mn10300_elf_create_got_section (bfd * abfd, /* This function may be called more than once. */ htab = elf_hash_table (info); if (htab->sgot != NULL) - return TRUE; + return true; switch (bed->s->arch_size) { @@ -710,7 +710,7 @@ _bfd_mn10300_elf_create_got_section (bfd * abfd, default: bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY @@ -727,7 +727,7 @@ _bfd_mn10300_elf_create_got_section (bfd * abfd, htab->splt = s; if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the .plt section. */ @@ -737,14 +737,14 @@ _bfd_mn10300_elf_create_got_section (bfd * abfd, "_PROCEDURE_LINKAGE_TABLE_"); htab->hplt = h; if (h == NULL) - return FALSE; + return false; } s = bfd_make_section_anyway_with_flags (abfd, ".got", flags); htab->sgot = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (bed->want_got_plt) { @@ -752,7 +752,7 @@ _bfd_mn10300_elf_create_got_section (bfd * abfd, htab->sgotplt = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got @@ -762,12 +762,12 @@ _bfd_mn10300_elf_create_got_section (bfd * abfd, h = _bfd_elf_define_linkage_sym (abfd, info, s, "_GLOBAL_OFFSET_TABLE_"); htab->hgot = h; if (h == NULL) - return FALSE; + return false; /* The first bit of the global offset table is the header. */ s->size += bed->got_header_size; - return TRUE; + return true; } static reloc_howto_type * @@ -799,7 +799,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an MN10300 ELF reloc. */ -static bfd_boolean +static bool mn10300_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -813,10 +813,10 @@ mn10300_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = elf_mn10300_howto_table + r_type; - return TRUE; + return true; } static int @@ -824,9 +824,9 @@ elf_mn10300_tls_transition (struct bfd_link_info * info, int r_type, struct elf_link_hash_entry * h, asection * sec, - bfd_boolean counting) + bool counting) { - bfd_boolean is_local; + bool is_local; if (r_type == R_MN10300_TLS_GD && h != NULL @@ -840,7 +840,7 @@ elf_mn10300_tls_transition (struct bfd_link_info * info, return r_type; if (! counting && h != NULL && ! elf_hash_table (info)->dynamic_sections_created) - is_local = TRUE; + is_local = true; else is_local = SYMBOL_CALLS_LOCAL (info, h); @@ -1041,14 +1041,14 @@ mn10300_do_tls_transition (bfd * input_bfd, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool mn10300_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { struct elf32_mn10300_link_hash_table * htab = elf32_mn10300_hash_table (info); - bfd_boolean sym_diff_reloc_seen; + bool sym_diff_reloc_seen; Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Sym * isymbuf = NULL; struct elf_link_hash_entry **sym_hashes; @@ -1059,14 +1059,14 @@ mn10300_elf_check_relocs (bfd *abfd, asection * sgot; asection * srelgot; asection * sreloc; - bfd_boolean result = FALSE; + bool result = false; sgot = NULL; srelgot = NULL; sreloc = NULL; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; isymbuf = (Elf_Internal_Sym *) symtab_hdr->contents; @@ -1075,7 +1075,7 @@ mn10300_elf_check_relocs (bfd *abfd, dynobj = elf_hash_table (info)->dynobj; local_got_offsets = elf_local_got_offsets (abfd); rel_end = relocs + sec->reloc_count; - sym_diff_reloc_seen = FALSE; + sym_diff_reloc_seen = false; for (rel = relocs; rel < rel_end; rel++) { @@ -1096,7 +1096,7 @@ mn10300_elf_check_relocs (bfd *abfd, } r_type = ELF32_R_TYPE (rel->r_info); - r_type = elf_mn10300_tls_transition (info, r_type, h, sec, TRUE); + r_type = elf_mn10300_tls_transition (info, r_type, h, sec, true); /* Some relocs require a global offset table. */ if (dynobj == NULL) @@ -1301,7 +1301,7 @@ mn10300_elf_check_relocs (bfd *abfd, break; case R_MN10300_SYM_DIFF: - sym_diff_reloc_seen = TRUE; + sym_diff_reloc_seen = true; break; case R_MN10300_32: @@ -1355,7 +1355,7 @@ mn10300_elf_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) goto fail; } @@ -1368,10 +1368,10 @@ mn10300_elf_check_relocs (bfd *abfd, } if (ELF32_R_TYPE (rel->r_info) != R_MN10300_SYM_DIFF) - sym_diff_reloc_seen = FALSE; + sym_diff_reloc_seen = false; } - result = TRUE; + result = true; fail: if (symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); @@ -1420,7 +1420,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, struct elf32_mn10300_link_hash_table * htab = elf32_mn10300_hash_table (info); static asection * sym_diff_section; static bfd_vma sym_diff_value; - bfd_boolean is_sym_diff_reloc; + bool is_sym_diff_reloc; unsigned long r_type = howto->type; bfd_byte * hit_data = contents + offset; bfd * dynobj; @@ -1463,7 +1463,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, return bfd_reloc_dangerous; } - is_sym_diff_reloc = FALSE; + is_sym_diff_reloc = false; if (sym_diff_section != NULL) { BFD_ASSERT (sym_diff_section == input_section); @@ -1487,7 +1487,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, && strcmp (input_section->name, ".debug_loc") == 0) value = 1; sym_diff_section = NULL; - is_sym_diff_reloc = TRUE; + is_sym_diff_reloc = true; break; default: @@ -1526,7 +1526,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, && (input_section->flags & SEC_ALLOC) != 0) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -1534,17 +1534,17 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, if (sreloc == NULL) { sreloc = _bfd_elf_get_dynamic_reloc_section - (input_bfd, input_section, /*rela?*/ TRUE); + (input_bfd, input_section, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (input_bfd, info, input_section, offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -1552,7 +1552,7 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, if (skip) { memset (&outrel, 0, sizeof outrel); - relocate = FALSE; + relocate = false; } else { @@ -1561,14 +1561,14 @@ mn10300_elf_final_link_relocate (reloc_howto_type *howto, if (h == NULL || SYMBOL_REFERENCES_LOCAL (info, h)) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_MN10300_RELATIVE); outrel.r_addend = value + addend; } else { BFD_ASSERT (h->dynindx != -1); - relocate = FALSE; + relocate = false; outrel.r_info = ELF32_R_INFO (h->dynindx, R_MN10300_32); outrel.r_addend = value + addend; } @@ -1994,8 +1994,8 @@ mn10300_elf_relocate_section (bfd *output_bfd, bfd_vma relocation; bfd_reloc_status_type r; int tls_r_type; - bfd_boolean unresolved_reloc = FALSE; - bfd_boolean warned, ignored; + bool unresolved_reloc = false; + bool warned, ignored; struct elf_link_hash_entry * hh; relocation = 0; @@ -2025,7 +2025,7 @@ mn10300_elf_relocate_section (bfd *output_bfd, tls_r_type = elf_mn10300_tls_transition (info, r_type, hh, input_section, 0); if (tls_r_type != r_type) { - bfd_boolean had_plt; + bool had_plt; had_plt = mn10300_do_tls_transition (input_bfd, r_type, tls_r_type, contents, rel->r_offset); @@ -2139,7 +2139,7 @@ mn10300_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -2170,17 +2170,17 @@ mn10300_elf_relocate_section (bfd *output_bfd, common_error: _bfd_error_handler (msg, input_bfd, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Finish initializing one hash table entry. */ -static bfd_boolean +static bool elf32_mn10300_finish_hash_table_entry (struct bfd_hash_entry *gen_entry, void * in_args) { @@ -2193,7 +2193,7 @@ elf32_mn10300_finish_hash_table_entry (struct bfd_hash_entry *gen_entry, /* If we already know we want to convert "call" to "calls" for calls to this symbol, then return now. */ if (entry->flags == MN10300_CONVERT_CALL_TO_CALLS) - return TRUE; + return true; /* If there are no named calls to this symbol, or there's nothing we can move from the function itself into the "call" instruction, @@ -2210,7 +2210,7 @@ elf32_mn10300_finish_hash_table_entry (struct bfd_hash_entry *gen_entry, /* Make a note that we should convert "call" instructions to "calls" instructions for calls to this symbol. */ entry->flags |= MN10300_CONVERT_CALL_TO_CALLS; - return TRUE; + return true; } /* We may be able to move some instructions from the function itself into @@ -2236,24 +2236,24 @@ elf32_mn10300_finish_hash_table_entry (struct bfd_hash_entry *gen_entry, entry->flags |= MN10300_CONVERT_CALL_TO_CALLS; /* This routine never fails. */ - return TRUE; + return true; } /* Used to count hash table entries. */ -static bfd_boolean +static bool elf32_mn10300_count_hash_table_entries (struct bfd_hash_entry *gen_entry ATTRIBUTE_UNUSED, void * in_args) { int *count = (int *) in_args; (*count) ++; - return TRUE; + return true; } /* Used to enumerate hash table entries into a linear array. */ -static bfd_boolean +static bool elf32_mn10300_list_hash_table_entries (struct bfd_hash_entry *gen_entry, void * in_args) { @@ -2261,7 +2261,7 @@ elf32_mn10300_list_hash_table_entries (struct bfd_hash_entry *gen_entry, **ptr = gen_entry; (*ptr) ++; - return TRUE; + return true; } /* Used to sort the array created by the above. */ @@ -2378,7 +2378,7 @@ compute_function_info (bfd *abfd, /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool mn10300_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, @@ -2545,13 +2545,13 @@ mn10300_elf_relax_delete_bytes (bfd *abfd, } } - return TRUE; + return true; } /* Return TRUE if a symbol exists at the given address, else return FALSE. */ -static bfd_boolean +static bool mn10300_elf_symbol_address_p (bfd *abfd, asection *sec, Elf_Internal_Sym *isym, @@ -2571,7 +2571,7 @@ mn10300_elf_symbol_address_p (bfd *abfd, for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++) if (isym->st_shndx == sec_shndx && isym->st_value == addr) - return TRUE; + return true; symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym) - symtab_hdr->sh_info); @@ -2585,10 +2585,10 @@ mn10300_elf_symbol_address_p (bfd *abfd, || sym_hash->root.type == bfd_link_hash_defweak) && sym_hash->root.u.def.section == sec && sym_hash->root.u.def.value == addr) - return TRUE; + return true; } - return FALSE; + return false; } /* This function handles relaxing for the mn10300. @@ -2630,11 +2630,11 @@ mn10300_elf_symbol_address_p (bfd *abfd, We don't handle imm16->imm8 or d16->d8 as they're very rare and somewhat more difficult to support. */ -static bfd_boolean +static bool mn10300_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs = NULL; @@ -2650,12 +2650,12 @@ mn10300_elf_relax_section (bfd *abfd, (_("%P%F: --relax and -r may not be used together\n")); /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We need a pointer to the mn10300 specific hash table. */ hash_table = elf32_mn10300_hash_table (link_info); if (hash_table == NULL) - return FALSE; + return false; /* Initialize fields in each hash table entry the first time through. */ if ((hash_table->flags & MN10300_HASH_ENTRIES_INITIALIZED) == 0) @@ -2784,7 +2784,7 @@ mn10300_elf_relax_section (bfd *abfd, elftab = &hash_table->static_hash_table->root; hash = ((struct elf32_mn10300_link_hash_entry *) elf_link_hash_lookup (elftab, sym_name, - TRUE, TRUE, FALSE)); + true, true, false)); free (new_name); } else @@ -2893,7 +2893,7 @@ mn10300_elf_relax_section (bfd *abfd, elftab = &hash_table->static_hash_table->root; hash = ((struct elf32_mn10300_link_hash_entry *) elf_link_hash_lookup (elftab, sym_name, - TRUE, TRUE, FALSE)); + true, true, false)); free (new_name); compute_function_info (input_bfd, hash, isym->st_value, contents); @@ -3103,7 +3103,7 @@ mn10300_elf_relax_section (bfd *abfd, elftab = & hash_table->static_hash_table->root; sym_hash = (struct elf32_mn10300_link_hash_entry *) elf_link_hash_lookup (elftab, sym_name, - FALSE, FALSE, FALSE); + false, false, false); free (new_name); if (sym_hash == NULL) @@ -3144,7 +3144,7 @@ mn10300_elf_relax_section (bfd *abfd, /* Something changed. Not strictly necessary, but may lead to more relaxing opportunities. */ - *again = TRUE; + *again = true; } } @@ -3219,7 +3219,7 @@ mn10300_elf_relax_section (bfd *abfd, /* Something changed. Not strictly necessary, but may lead to more relaxing opportunities. */ - *again = TRUE; + *again = true; } } @@ -3269,7 +3269,7 @@ mn10300_elf_relax_section (bfd *abfd, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -3413,7 +3413,7 @@ mn10300_elf_relax_section (bfd *abfd, h = (struct elf32_mn10300_link_hash_entry *) elf_link_hash_lookup (&hash_table->static_hash_table->root, - sym_name, FALSE, FALSE, FALSE); + sym_name, false, false, false); free (new_name); } else @@ -3509,7 +3509,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } else if (h) @@ -3584,7 +3584,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -3627,7 +3627,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } else if (h) @@ -3684,7 +3684,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -3824,7 +3824,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } /* Try to turn a 24 immediate, displacement or absolute address @@ -3887,7 +3887,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } } @@ -3995,7 +3995,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } } @@ -4081,7 +4081,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } else if ((code & 0xf0) == 0x80 @@ -4135,7 +4135,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; /* mov am,(abs32) -> mov am,(abs16) @@ -4182,7 +4182,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } else if ((code & 0xf0) < 0xf0) @@ -4255,7 +4255,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; /* mov (abs32),an -> mov (abs16),an @@ -4325,7 +4325,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } else if (code == 0xfe) @@ -4361,7 +4361,7 @@ mn10300_elf_relax_section (bfd *abfd, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } } @@ -4395,7 +4395,7 @@ mn10300_elf_relax_section (bfd *abfd, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -4405,7 +4405,7 @@ mn10300_elf_relax_section (bfd *abfd, if (elf_section_data (section)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -4416,7 +4416,7 @@ mn10300_elf_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { Elf_Internal_Shdr *symtab_hdr; @@ -4448,7 +4448,7 @@ mn10300_elf_get_relocated_section_contents (bfd *output_bfd, bfd_size_type amt; internal_relocs = _bfd_elf_link_read_relocs (input_bfd, input_section, - NULL, NULL, FALSE); + NULL, NULL, false); if (internal_relocs == NULL) goto error_return; @@ -4585,7 +4585,7 @@ elf32_mn10300_link_hash_table_free (bfd *obfd) obfd->link.hash = &ret->static_hash_table->root.root; _bfd_elf_link_hash_table_free (obfd); - obfd->is_linker_output = TRUE; + obfd->is_linker_output = true; obfd->link.hash = &ret->root.root; _bfd_elf_link_hash_table_free (obfd); } @@ -4620,14 +4620,14 @@ elf32_mn10300_link_hash_table_create (bfd *abfd) return NULL; } - abfd->is_linker_output = FALSE; + abfd->is_linker_output = false; abfd->link.hash = NULL; if (!_bfd_elf_link_hash_table_init (&ret->root, abfd, elf32_mn10300_link_hash_newfunc, sizeof (struct elf32_mn10300_link_hash_entry), MN10300_ELF_DATA)) { - abfd->is_linker_output = TRUE; + abfd->is_linker_output = true; abfd->link.hash = &ret->static_hash_table->root.root; _bfd_elf_link_hash_table_free (abfd); free (ret); @@ -4661,7 +4661,7 @@ elf_mn10300_mach (flagword flags) file. This gets the MN10300 architecture right based on the machine number. */ -static bfd_boolean +static bool _bfd_mn10300_elf_final_write_processing (bfd *abfd) { unsigned long val; @@ -4687,35 +4687,35 @@ _bfd_mn10300_elf_final_write_processing (bfd *abfd) return _bfd_elf_final_write_processing (abfd); } -static bfd_boolean +static bool _bfd_mn10300_elf_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_mn10300, elf_mn10300_mach (elf_elfheader (abfd)->e_flags)); - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool _bfd_mn10300_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) && bfd_get_mach (obfd) < bfd_get_mach (ibfd)) { if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd))) - return FALSE; + return false; } - return TRUE; + return true; } #define PLT0_ENTRY_SIZE 15 @@ -4780,7 +4780,7 @@ static const bfd_byte elf_mn10300_pic_plt_entry[PIC_PLT_ENTRY_SIZE] = /* Create dynamic sections when linking against a dynamic object. */ -static bfd_boolean +static bool _bfd_mn10300_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -4801,7 +4801,7 @@ _bfd_mn10300_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) default: bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and @@ -4816,10 +4816,10 @@ _bfd_mn10300_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->root.srelplt = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (! _bfd_mn10300_elf_create_got_section (abfd, info)) - return FALSE; + return false; if (bed->want_dynbss) { @@ -4832,7 +4832,7 @@ _bfd_mn10300_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".dynbss", SEC_ALLOC | SEC_LINKER_CREATED); if (s == NULL) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the @@ -4853,11 +4853,11 @@ _bfd_mn10300_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -4866,7 +4866,7 @@ _bfd_mn10300_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool _bfd_mn10300_elf_adjust_dynamic_symbol (struct bfd_link_info * info, struct elf_link_hash_entry * h) { @@ -4900,14 +4900,14 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (struct bfd_link_info * info, a procedure linkage table, and we can just do a REL32 reloc instead. */ BFD_ASSERT (h->needs_plt); - return TRUE; + return true; } /* Make sure this symbol is output as a dynamic symbol. */ if (h->dynindx == -1) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->root.splt; @@ -4946,7 +4946,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (struct bfd_link_info * info, BFD_ASSERT (s != NULL); s->size += sizeof (Elf32_External_Rela); - return TRUE; + return true; } /* If this is a weak symbol, and there is a real definition, the @@ -4958,7 +4958,7 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (struct bfd_link_info * info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -4969,12 +4969,12 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (struct bfd_link_info * info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -5008,14 +5008,14 @@ _bfd_mn10300_elf_adjust_dynamic_symbol (struct bfd_link_info * info, /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool _bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info) { struct elf32_mn10300_link_hash_table *htab = elf32_mn10300_hash_table (info); bfd * dynobj; asection * s; - bfd_boolean relocs; + bool relocs; dynobj = htab->root.dynobj; BFD_ASSERT (dynobj != NULL); @@ -5053,7 +5053,7 @@ _bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char * name; @@ -5077,7 +5077,7 @@ _bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd, /* Remember whether there are any reloc sections other than .rela.plt. */ if (! streq (name, ".rela.plt")) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -5114,7 +5114,7 @@ _bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd, instead of garbage. */ s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -5123,7 +5123,7 @@ _bfd_mn10300_elf_size_dynamic_sections (bfd * output_bfd, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool _bfd_mn10300_elf_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info, struct elf_link_hash_entry * h, @@ -5324,12 +5324,12 @@ _bfd_mn10300_elf_finish_dynamic_symbol (bfd * output_bfd, || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool _bfd_mn10300_elf_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info) { @@ -5434,7 +5434,7 @@ _bfd_mn10300_elf_finish_dynamic_sections (bfd * output_bfd, elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; - return TRUE; + return true; } /* Classify relocation types, such that combreloc can sort them @@ -5456,7 +5456,7 @@ _bfd_mn10300_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UN /* Allocate space for an MN10300 extension to the bfd elf data structure. */ -static bfd_boolean +static bool mn10300_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_mn10300_obj_tdata), diff --git a/bfd/elf-nacl.c b/bfd/elf-nacl.c index a0db2b7847..481f9a94b3 100644 --- a/bfd/elf-nacl.c +++ b/bfd/elf-nacl.c @@ -24,7 +24,7 @@ #include "elf/common.h" #include "elf/internal.h" -static bfd_boolean +static bool segment_executable (struct elf_segment_map *seg) { if (seg->p_flags_valid) @@ -36,35 +36,35 @@ segment_executable (struct elf_segment_map *seg) unsigned int i; for (i = 0; i < seg->count; ++i) if (seg->sections[i]->flags & SEC_CODE) - return TRUE; + return true; } - return FALSE; + return false; } /* Determine if this segment is eligible to receive the file and program headers. It must be read-only and non-executable. Its first section must start far enough past the page boundary to allow space for the headers. */ -static bfd_boolean +static bool segment_eligible_for_headers (struct elf_segment_map *seg, bfd_vma minpagesize, bfd_vma sizeof_headers) { unsigned int i; if (seg->count == 0 || seg->sections[0]->lma % minpagesize < sizeof_headers) - return FALSE; + return false; for (i = 0; i < seg->count; ++i) { if ((seg->sections[i]->flags & (SEC_CODE|SEC_READONLY)) != SEC_READONLY) - return FALSE; + return false; } - return TRUE; + return true; } /* We permute the segment_map to get BFD to do the file layout we want: The first non-executable PT_LOAD segment appears first in the file and contains the ELF file header and phdrs. */ -bfd_boolean +bool nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) { const struct elf_backend_data *const bed = get_elf_backend_data (abfd); @@ -76,7 +76,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) if (info != NULL && info->user_phdrs) /* The linker script used PHDRS explicitly, so don't change what the user asked for. */ - return TRUE; + return true; if (info != NULL) /* We're doing linking, so evalute SIZEOF_HEADERS as in a linker script. */ @@ -97,7 +97,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) if (seg->p_type == PT_LOAD) { - bfd_boolean executable = segment_executable (seg); + bool executable = segment_executable (seg); if (executable && seg->count > 0 @@ -136,11 +136,11 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) secdata = bfd_zalloc (abfd, sizeof *secdata); if (secdata == NULL) - return FALSE; + return false; sec = bfd_zalloc (abfd, sizeof *sec); if (sec == NULL) - return FALSE; + return false; /* Fill in only the fields that actually affect the logic in assign_file_positions_for_load_sections. */ @@ -160,7 +160,7 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) = bfd_alloc (abfd, (sizeof (*newseg) + seg->count * sizeof (asection *))); if (newseg == NULL) - return FALSE; + return false; memcpy (newseg, seg, (sizeof (*newseg) - sizeof (asection *) + seg->count * sizeof (asection *))); newseg->sections[newseg->count++] = sec; @@ -227,14 +227,14 @@ nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) } } - return TRUE; + return true; } /* After nacl_modify_segment_map has done its work, the file layout has been done as we wanted. But the PT_LOAD phdrs are no longer in the proper order for the ELF rule that they must appear in ascending address order. So find the two segments we swapped before, and swap them back. */ -bfd_boolean +bool nacl_modify_headers (bfd *abfd, struct bfd_link_info *info) { if (info != NULL && info->user_phdrs) @@ -324,7 +324,7 @@ nacl_modify_headers (bfd *abfd, struct bfd_link_info *info) return _bfd_elf_modify_headers (abfd, info); } -bfd_boolean +bool nacl_final_write_processing (bfd *abfd) { struct elf_segment_map *seg; @@ -344,7 +344,7 @@ nacl_final_write_processing (bfd *abfd) BFD_ASSERT (sec->flags & SEC_CODE); BFD_ASSERT (sec->size > 0); - fill = abfd->arch_info->fill (sec->size, bfd_big_endian (abfd), TRUE); + fill = abfd->arch_info->fill (sec->size, bfd_big_endian (abfd), true); if (fill == NULL || bfd_seek (abfd, sec->filepos, SEEK_SET) != 0 diff --git a/bfd/elf-nacl.h b/bfd/elf-nacl.h index 3162f3ef97..774f51c58a 100644 --- a/bfd/elf-nacl.h +++ b/bfd/elf-nacl.h @@ -16,6 +16,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -bfd_boolean nacl_modify_segment_map (bfd *, struct bfd_link_info *); -bfd_boolean nacl_modify_headers (bfd *, struct bfd_link_info *); -bfd_boolean nacl_final_write_processing (bfd *); +bool nacl_modify_segment_map (bfd *, struct bfd_link_info *); +bool nacl_modify_headers (bfd *, struct bfd_link_info *); +bool nacl_final_write_processing (bfd *); diff --git a/bfd/elf-properties.c b/bfd/elf-properties.c index 491fa1aa8c..25b9a40f63 100644 --- a/bfd/elf-properties.c +++ b/bfd/elf-properties.c @@ -76,7 +76,7 @@ _bfd_elf_get_property (bfd *abfd, unsigned int type, unsigned int datasz) /* Parse GNU properties. */ -bfd_boolean +bool _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -90,7 +90,7 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) _bfd_error_handler (_("warning: %pB: corrupt GNU_PROPERTY_TYPE (%ld) size: %#lx"), abfd, note->type, note->descsz); - return FALSE; + return false; } while (ptr != ptr_end) @@ -113,7 +113,7 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) abfd, note->type, type, datasz); /* Clear all properties. */ elf_properties (abfd) = NULL; - return FALSE; + return false; } if (type >= GNU_PROPERTY_LOPROC) @@ -134,7 +134,7 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) { /* Clear all properties. */ elf_properties (abfd) = NULL; - return FALSE; + return false; } else if (kind != property_ignored) goto next; @@ -152,7 +152,7 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) abfd, datasz); /* Clear all properties. */ elf_properties (abfd) = NULL; - return FALSE; + return false; } prop = _bfd_elf_get_property (abfd, type, datasz); if (datasz == 8) @@ -170,10 +170,10 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) abfd, datasz); /* Clear all properties. */ elf_properties (abfd) = NULL; - return FALSE; + return false; } prop = _bfd_elf_get_property (abfd, type, datasz); - elf_has_no_copy_on_protected (abfd) = TRUE; + elf_has_no_copy_on_protected (abfd) = true; prop->pr_kind = property_number; goto next; @@ -190,14 +190,14 @@ _bfd_elf_parse_gnu_properties (bfd *abfd, Elf_Internal_Note *note) ptr += (datasz + (align_size - 1)) & ~ (align_size - 1); } - return TRUE; + return true; } /* Merge GNU property BPROP with APROP. If APROP isn't NULL, return TRUE if APROP is updated. Otherwise, return TRUE if BPROP should be merged with ABFD. */ -static bfd_boolean +static bool elf_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd, bfd *bbfd, elf_property *aprop, elf_property *bprop) { @@ -217,7 +217,7 @@ elf_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd, bfd *bbfd, if (bprop->u.number > aprop->u.number) { aprop->u.number = bprop->u.number; - return TRUE; + return true; } break; } @@ -233,7 +233,7 @@ elf_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd, bfd *bbfd, abort (); } - return FALSE; + return false; } /* Return the property of TYPE on *LISTP and remove it from *LISTP if RM is @@ -241,7 +241,7 @@ elf_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd, bfd *bbfd, static elf_property * elf_find_and_remove_property (elf_property_list **listp, - unsigned int type, bfd_boolean rm) + unsigned int type, bool rm) { elf_property_list *list; @@ -270,7 +270,7 @@ elf_merge_gnu_property_list (struct bfd_link_info *info, bfd *first_pbfd, { elf_property_list *p, **lastp; elf_property *pr; - bfd_boolean number_p; + bool number_p; bfd_vma number = 0; /* Merge each GNU property in FIRST_PBFD with the one on *LISTP. */ @@ -280,13 +280,13 @@ elf_merge_gnu_property_list (struct bfd_link_info *info, bfd *first_pbfd, { if (p->property.pr_kind == property_number) { - number_p = TRUE; + number_p = true; number = p->property.u.number; } else - number_p = FALSE; + number_p = false; pr = elf_find_and_remove_property (listp, p->property.pr_type, - TRUE); + true); /* Pass NULL to elf_merge_gnu_properties for the property which isn't on *LISTP. */ elf_merge_gnu_properties (info, first_pbfd, abfd, &p->property, pr); @@ -357,16 +357,16 @@ elf_merge_gnu_property_list (struct bfd_link_info *info, bfd *first_pbfd, { if (p->property.pr_kind == property_number) { - number_p = TRUE; + number_p = true; number = p->property.u.number; } else - number_p = FALSE; + number_p = false; if (elf_merge_gnu_properties (info, first_pbfd, abfd, NULL, &p->property)) { if (p->property.pr_type == GNU_PROPERTY_NO_COPY_ON_PROTECTED) - elf_has_no_copy_on_protected (first_pbfd) = TRUE; + elf_has_no_copy_on_protected (first_pbfd) = true; pr = _bfd_elf_get_property (first_pbfd, p->property.pr_type, p->property.pr_datasz); @@ -380,7 +380,7 @@ elf_merge_gnu_property_list (struct bfd_link_info *info, bfd *first_pbfd, { pr = elf_find_and_remove_property (&elf_properties (first_pbfd), p->property.pr_type, - FALSE); + false); if (pr == NULL) { if (number_p) @@ -511,7 +511,7 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info) bfd *abfd, *first_pbfd = NULL; elf_property_list *list; asection *sec; - bfd_boolean has_properties = FALSE; + bool has_properties = false; const struct elf_backend_data *bed = get_elf_backend_data (info->output_bfd); unsigned int elfclass = bed->s->elfclass; @@ -523,7 +523,7 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info) && (abfd->flags & DYNAMIC) == 0 && elf_properties (abfd) != NULL) { - has_properties = TRUE; + has_properties = true; /* Ignore GNU properties from ELF objects with different machine code or class. Also skip objects without a GNU_PROPERTY note @@ -656,7 +656,7 @@ _bfd_elf_link_setup_gnu_properties (struct bfd_link_info *info) /* If GNU_PROPERTY_NO_COPY_ON_PROTECTED is set, protected data symbol is defined in the shared object. */ if (elf_has_no_copy_on_protected (first_pbfd)) - info->extern_protected_data = FALSE; + info->extern_protected_data = false; } return first_pbfd; @@ -680,7 +680,7 @@ _bfd_elf_convert_gnu_property_size (bfd *ibfd, bfd *obfd) /* Convert GNU properties. */ -bfd_boolean +bool _bfd_elf_convert_gnu_properties (bfd *ibfd, asection *isec, bfd *obfd, bfd_byte **ptr, bfd_size_type *ptr_size) @@ -704,7 +704,7 @@ _bfd_elf_convert_gnu_properties (bfd *ibfd, asection *isec, { contents = (bfd_byte *) bfd_malloc (size); if (contents == NULL) - return FALSE; + return false; free (*ptr); *ptr = contents; } @@ -716,5 +716,5 @@ _bfd_elf_convert_gnu_properties (bfd *ibfd, asection *isec, /* Generate the output .note.gnu.property section. */ elf_write_gnu_properties (ibfd, contents, list, size, 1 << align_shift); - return TRUE; + return true; } diff --git a/bfd/elf-s390-common.c b/bfd/elf-s390-common.c index 73abf48da1..78a886cb8d 100644 --- a/bfd/elf-s390-common.c +++ b/bfd/elf-s390-common.c @@ -23,7 +23,7 @@ /* Return TRUE if H is an IFUNC symbol. Simply checking for the symbol type might not be enough since it might get changed to STT_FUNC for pointer equality reasons. */ -static inline bfd_boolean +static inline bool s390_is_ifunc_symbol_p (struct elf_link_hash_entry *h) { struct elf_s390_link_hash_entry *eh = (struct elf_s390_link_hash_entry*)h; @@ -32,26 +32,26 @@ s390_is_ifunc_symbol_p (struct elf_link_hash_entry *h) /* Return true if .got.plt is supposed to be emitted after .got. */ -static inline bfd_boolean +static inline bool s390_gotplt_after_got_p (struct bfd_link_info *info) { struct elf_s390_link_hash_table *htab = elf_s390_hash_table (info); if (!htab->elf.sgot || !htab->elf.sgotplt) - return TRUE; + return true; if (htab->elf.sgot->output_section == htab->elf.sgotplt->output_section) { if (htab->elf.sgot->output_offset < htab->elf.sgotplt->output_offset) - return TRUE; + return true; } else { if (htab->elf.sgot->output_section->vma <= htab->elf.sgotplt->output_section->vma) - return TRUE; + return true; } - return FALSE; + return false; } /* Return the value of the _GLOBAL_OFFSET_TABLE_ symbol. */ @@ -113,7 +113,7 @@ s390_gotplt_offset (struct bfd_link_info *info) /* Create sections needed by STT_GNU_IFUNC symbol. */ -static bfd_boolean +static bool s390_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -122,7 +122,7 @@ s390_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) struct elf_link_hash_table *htab = elf_hash_table (info); if (htab->iplt != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; @@ -132,7 +132,7 @@ s390_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->irelifunc = s; } @@ -141,29 +141,29 @@ s390_elf_create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_CODE | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; htab->iplt = s; s = bfd_make_section_with_flags (abfd, ".rela.iplt", flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->irelplt = s; s = bfd_make_section_with_flags (abfd, ".igot.plt", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->igotplt = s; - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs against a STT_GNU_IFUNC symbol definition. */ -static bfd_boolean +static bool s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -196,7 +196,7 @@ s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, h->got = htab->init_got_offset; h->plt = htab->init_plt_offset; *head = NULL; - return TRUE; + return true; } /* Return and discard space for dynamic relocations against it if @@ -209,7 +209,7 @@ s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, h->got = htab->init_got_offset; h->plt = htab->init_plt_offset; *head = NULL; - return TRUE; + return true; } keep: @@ -276,10 +276,10 @@ s390_elf_allocate_ifunc_dyn_relocs (struct bfd_link_info *info, htab->srelgot->size += RELA_ENTRY_SIZE; } - return TRUE; + return true; } -static bfd_boolean +static bool elf_s390_allocate_local_syminfo (bfd *abfd, Elf_Internal_Shdr *symtab_hdr) { bfd_size_type size; @@ -291,14 +291,14 @@ elf_s390_allocate_local_syminfo (bfd *abfd, Elf_Internal_Shdr *symtab_hdr) elf_local_got_refcounts (abfd) = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (elf_local_got_refcounts (abfd) == NULL) - return FALSE; + return false; elf_s390_local_plt (abfd) = (struct plt_entry*)(elf_local_got_refcounts (abfd) + symtab_hdr->sh_info); elf_s390_local_got_tls_type (abfd) = (char *) (elf_s390_local_plt (abfd) + symtab_hdr->sh_info); - return TRUE; + return true; } /* Whether to sort relocs output by ld -r or ld --emit-relocs, by @@ -307,7 +307,7 @@ elf_s390_allocate_local_syminfo (bfd *abfd, Elf_Internal_Shdr *symtab_hdr) hand, elf-eh-frame.c processing requires .eh_frame relocs to be sorted. */ -static bfd_boolean +static bool elf_s390_elf_sort_relocs_p (asection *sec) { return (sec->flags & SEC_CODE) == 0; @@ -315,7 +315,7 @@ elf_s390_elf_sort_relocs_p (asection *sec) /* Merge object attributes from IBFD into OBFD. Raise an error if there are conflicting attributes. */ -static bfd_boolean +static bool elf_s390_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -331,7 +331,7 @@ elf_s390_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) initialized. */ elf_known_obj_attributes_proc (obfd)[0].i = 1; - return TRUE; + return true; } in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU]; @@ -372,5 +372,5 @@ elf_s390_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge Tag_compatibility attributes and any common GNU ones. */ _bfd_elf_merge_object_attributes (ibfd, info); - return TRUE; + return true; } diff --git a/bfd/elf-s390.h b/bfd/elf-s390.h index 5567945b50..4cc6c108e7 100644 --- a/bfd/elf-s390.h +++ b/bfd/elf-s390.h @@ -25,5 +25,5 @@ struct s390_elf_params int pgste; }; -bfd_boolean bfd_elf_s390_set_options (struct bfd_link_info *info, - struct s390_elf_params *params); +bool bfd_elf_s390_set_options (struct bfd_link_info *info, + struct s390_elf_params *params); diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c index a3cb4ef7b4..39eab6be42 100644 --- a/bfd/elf-strtab.c +++ b/bfd/elf-strtab.c @@ -141,7 +141,7 @@ _bfd_elf_strtab_free (struct elf_strtab_hash *tab) size_t _bfd_elf_strtab_add (struct elf_strtab_hash *tab, const char *str, - bfd_boolean copy) + bool copy) { register struct elf_strtab_hash_entry *entry; @@ -152,7 +152,7 @@ _bfd_elf_strtab_add (struct elf_strtab_hash *tab, BFD_ASSERT (tab->sec_size == 0); entry = (struct elf_strtab_hash_entry *) - bfd_hash_lookup (&tab->table, str, TRUE, copy); + bfd_hash_lookup (&tab->table, str, true, copy); if (entry == NULL) return (size_t) -1; @@ -309,14 +309,14 @@ _bfd_elf_strtab_str (struct elf_strtab_hash *tab, size_t idx, return tab->array[idx]->root.string; } -bfd_boolean +bool _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab) { bfd_size_type off = 1; size_t i; if (bfd_bwrite ("", 1, abfd) != 1) - return FALSE; + return false; for (i = 1; i < tab->size; ++i) { @@ -330,13 +330,13 @@ _bfd_elf_strtab_emit (register bfd *abfd, struct elf_strtab_hash *tab) str = tab->array[i]->root.string; if (bfd_bwrite (str, len, abfd) != len) - return FALSE; + return false; off += len; } BFD_ASSERT (off == tab->sec_size); - return TRUE; + return true; } /* Compare two elf_strtab_hash_entry structures. Called via qsort. diff --git a/bfd/elf-vxworks.c b/bfd/elf-vxworks.c index 8442e23c8b..6ecce6d927 100644 --- a/bfd/elf-vxworks.c +++ b/bfd/elf-vxworks.c @@ -28,7 +28,7 @@ /* Return true if symbol NAME, as defined by ABFD, is one of the special __GOTT_BASE__ or __GOTT_INDEX__ symbols. */ -static bfd_boolean +static bool elf_vxworks_gott_symbol_p (bfd *abfd, const char *name) { char leading; @@ -37,7 +37,7 @@ elf_vxworks_gott_symbol_p (bfd *abfd, const char *name) if (leading) { if (*name != leading) - return FALSE; + return false; name++; } return (strcmp (name, "__GOTT_BASE__") == 0 @@ -45,7 +45,7 @@ elf_vxworks_gott_symbol_p (bfd *abfd, const char *name) } /* Tweak magic VxWorks symbols as they are loaded. */ -bfd_boolean +bool elf_vxworks_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -69,14 +69,14 @@ elf_vxworks_add_symbol_hook (bfd *abfd, *flagsp |= BSF_WEAK; } - return TRUE; + return true; } /* Perform VxWorks-specific handling of the create_dynamic_sections hook. When creating an executable, set *SRELPLT2_OUT to the .rel(a).plt.unloaded section. */ -bfd_boolean +bool elf_vxworks_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info, asection **srelplt2_out) { @@ -98,7 +98,7 @@ elf_vxworks_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info, | SEC_LINKER_CREATED); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; *srelplt2_out = s; } @@ -114,7 +114,7 @@ elf_vxworks_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info, htab->hgot->other &= ~ELF_ST_VISIBILITY (-1); htab->hgot->forced_local = 0; if (!bfd_elf_link_record_dynamic_symbol (info, htab->hgot)) - return FALSE; + return false; } if (htab->hplt) { @@ -122,7 +122,7 @@ elf_vxworks_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info, htab->hplt->type = STT_FUNC; } - return TRUE; + return true; } /* Tweak magic VxWorks symbols as they are written to the output file. */ @@ -146,7 +146,7 @@ elf_vxworks_link_output_symbol_hook (struct bfd_link_info *info /* Copy relocations into the output file. Fixes up relocations against PLT entries, then calls the generic routine. */ -bfd_boolean +bool elf_vxworks_emit_relocs (bfd *output_bfd, asection *input_section, Elf_Internal_Shdr *input_rel_hdr, @@ -212,7 +212,7 @@ elf_vxworks_emit_relocs (bfd *output_bfd, /* Set the sh_link and sh_info fields on the static plt relocation secton. */ -bfd_boolean +bool elf_vxworks_final_write_processing (bfd *abfd) { asection * sec; @@ -235,7 +235,7 @@ elf_vxworks_final_write_processing (bfd *abfd) /* Add the dynamic entries required by VxWorks. These point to the tls sections. */ -bfd_boolean +bool elf_vxworks_add_dynamic_entries (bfd *output_bfd, struct bfd_link_info *info) { if (bfd_get_section_by_name (output_bfd, ".tls_data")) @@ -243,21 +243,21 @@ elf_vxworks_add_dynamic_entries (bfd *output_bfd, struct bfd_link_info *info) if (!_bfd_elf_add_dynamic_entry (info, DT_VX_WRS_TLS_DATA_START, 0) || !_bfd_elf_add_dynamic_entry (info, DT_VX_WRS_TLS_DATA_SIZE, 0) || !_bfd_elf_add_dynamic_entry (info, DT_VX_WRS_TLS_DATA_ALIGN, 0)) - return FALSE; + return false; } if (bfd_get_section_by_name (output_bfd, ".tls_vars")) { if (!_bfd_elf_add_dynamic_entry (info, DT_VX_WRS_TLS_VARS_START, 0) || !_bfd_elf_add_dynamic_entry (info, DT_VX_WRS_TLS_VARS_SIZE, 0)) - return FALSE; + return false; } - return TRUE; + return true; } /* If *DYN is one of the VxWorks-specific dynamic entries, then fill in the value now and return TRUE. Otherwise return FALSE. */ -bfd_boolean +bool elf_vxworks_finish_dynamic_entry (bfd *output_bfd, Elf_Internal_Dyn *dyn) { asection *sec; @@ -265,7 +265,7 @@ elf_vxworks_finish_dynamic_entry (bfd *output_bfd, Elf_Internal_Dyn *dyn) switch (dyn->d_tag) { default: - return FALSE; + return false; case DT_VX_WRS_TLS_DATA_START: sec = bfd_get_section_by_name (output_bfd, ".tls_data"); @@ -292,15 +292,15 @@ elf_vxworks_finish_dynamic_entry (bfd *output_bfd, Elf_Internal_Dyn *dyn) dyn->d_un.d_val = sec->size; break; } - return TRUE; + return true; } /* Add dynamic tags. */ -bfd_boolean +bool _bfd_elf_maybe_vxworks_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, - bfd_boolean need_dynamic_reloc) + bool need_dynamic_reloc) { struct elf_link_hash_table *htab = elf_hash_table (info); return (_bfd_elf_add_dynamic_tags (output_bfd, info, diff --git a/bfd/elf-vxworks.h b/bfd/elf-vxworks.h index d0207a7849..e9fbe5e0d1 100644 --- a/bfd/elf-vxworks.h +++ b/bfd/elf-vxworks.h @@ -19,19 +19,19 @@ #include "elf/common.h" #include "elf/internal.h" -bfd_boolean elf_vxworks_add_symbol_hook +bool elf_vxworks_add_symbol_hook (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **, flagword *, asection **, bfd_vma *); int elf_vxworks_link_output_symbol_hook (struct bfd_link_info *, const char *name, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); -bfd_boolean elf_vxworks_emit_relocs +bool elf_vxworks_emit_relocs (bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *, struct elf_link_hash_entry **); -bfd_boolean elf_vxworks_final_write_processing (bfd *); -bfd_boolean elf_vxworks_create_dynamic_sections +bool elf_vxworks_final_write_processing (bfd *); +bool elf_vxworks_create_dynamic_sections (bfd *, struct bfd_link_info *, asection **); -bfd_boolean elf_vxworks_add_dynamic_entries (bfd *, struct bfd_link_info *); -bfd_boolean elf_vxworks_finish_dynamic_entry (bfd *, Elf_Internal_Dyn *); -bfd_boolean _bfd_elf_maybe_vxworks_add_dynamic_tags - (bfd *, struct bfd_link_info *, bfd_boolean); +bool elf_vxworks_add_dynamic_entries (bfd *, struct bfd_link_info *); +bool elf_vxworks_finish_dynamic_entry (bfd *, Elf_Internal_Dyn *); +bool _bfd_elf_maybe_vxworks_add_dynamic_tags + (bfd *, struct bfd_link_info *, bool); diff --git a/bfd/elf.c b/bfd/elf.c index 3f9927072e..697d1ee728 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -50,11 +50,11 @@ SECTION #endif static int elf_sort_sections (const void *, const void *); -static bfd_boolean assign_file_positions_except_relocs (bfd *, struct bfd_link_info *); -static bfd_boolean swap_out_syms (bfd *, struct elf_strtab_hash **, int, - struct bfd_link_info *); -static bfd_boolean elf_parse_notes (bfd *abfd, char *buf, size_t size, - file_ptr offset, size_t align); +static bool assign_file_positions_except_relocs (bfd *, struct bfd_link_info *); +static bool swap_out_syms (bfd *, struct elf_strtab_hash **, int, + struct bfd_link_info *); +static bool elf_parse_notes (bfd *abfd, char *buf, size_t size, + file_ptr offset, size_t align); /* Swap version information in and out. The version information is currently size independent. If that ever changes, this code will @@ -232,7 +232,7 @@ bfd_elf_gnu_hash (const char *namearg) /* Create a tdata field OBJECT_SIZE bytes in length, zeroed out and with the object_id field of an elf_obj_tdata field set to OBJECT_ID. */ -bfd_boolean +bool bfd_elf_allocate_object (bfd *abfd, size_t object_size, enum elf_target_id object_id) @@ -240,22 +240,22 @@ bfd_elf_allocate_object (bfd *abfd, BFD_ASSERT (object_size >= sizeof (struct elf_obj_tdata)); abfd->tdata.any = bfd_zalloc (abfd, object_size); if (abfd->tdata.any == NULL) - return FALSE; + return false; elf_object_id (abfd) = object_id; if (abfd->direction != read_direction) { struct output_elf_obj_tdata *o = bfd_zalloc (abfd, sizeof *o); if (o == NULL) - return FALSE; + return false; elf_tdata (abfd)->o = o; elf_program_header_size (abfd) = (bfd_size_type) -1; } - return TRUE; + return true; } -bfd_boolean +bool bfd_elf_make_object (bfd *abfd) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -263,12 +263,12 @@ bfd_elf_make_object (bfd *abfd) bed->target_id); } -bfd_boolean +bool bfd_elf_mkcorefile (bfd *abfd) { /* I think this can be done just like an object file. */ if (!abfd->xvec->_bfd_set_format[(int) bfd_object] (abfd)) - return FALSE; + return false; elf_tdata (abfd)->core = bfd_zalloc (abfd, sizeof (*elf_tdata (abfd)->core)); return elf_tdata (abfd)->core != NULL; } @@ -594,7 +594,7 @@ group_signature (bfd *abfd, Elf_Internal_Shdr *ghdr) /* Set next_in_group list pointer, and group name for NEWSECT. */ -static bfd_boolean +static bool setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) { unsigned int num_group = elf_tdata (abfd)->num_group; @@ -641,7 +641,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) elf_tdata (abfd)->group_sect_ptr = (Elf_Internal_Shdr **) bfd_zalloc (abfd, amt); if (elf_tdata (abfd)->group_sect_ptr == NULL) - return FALSE; + return false; num_group = 0; for (i = 0; i < shnum; i++) @@ -656,7 +656,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) /* Make sure the group section has a BFD section attached to it. */ if (!bfd_section_from_shdr (abfd, i)) - return FALSE; + return false; /* Add to list of sections. */ elf_tdata (abfd)->group_sect_ptr[num_group] = shdr; @@ -770,7 +770,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) abfd, shdr->bfd_section); elf_tdata (abfd)->group_sect_ptr[i] = NULL; bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } n_elt = shdr->sh_size / 4; @@ -805,7 +805,7 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) gname = group_signature (abfd, shdr); if (gname == NULL) - return FALSE; + return false; elf_group_name (newsect) = gname; /* Start a circular list with one element. */ @@ -829,17 +829,17 @@ setup_group (bfd *abfd, Elf_Internal_Shdr *hdr, asection *newsect) /* xgettext:c-format */ _bfd_error_handler (_("%pB: no group info for section '%pA'"), abfd, newsect); - return FALSE; + return false; } - return TRUE; + return true; } -bfd_boolean +bool _bfd_elf_setup_sections (bfd *abfd) { unsigned int i; unsigned int num_group = elf_tdata (abfd)->num_group; - bfd_boolean result = TRUE; + bool result = true; asection *s; /* Process SHF_LINK_ORDER. */ @@ -877,7 +877,7 @@ _bfd_elf_setup_sections (bfd *abfd) /* xgettext:c-format */ (_("%pB: sh_link [%d] in section `%pA' is incorrect"), s->owner, elfsec, s); - result = FALSE; + result = false; } elf_linked_to_section (s) = linksec; @@ -890,7 +890,7 @@ _bfd_elf_setup_sections (bfd *abfd) /* xgettext:c-format */ (_("%pB: SHT_GROUP section [index %d] has no SHF_GROUP sections"), abfd, elf_section_data (s)->this_idx); - result = FALSE; + result = false; } } @@ -911,7 +911,7 @@ _bfd_elf_setup_sections (bfd *abfd) /* xgettext:c-format */ (_("%pB: section group entry number %u is corrupt"), abfd, i); - result = FALSE; + result = false; continue; } @@ -940,7 +940,7 @@ _bfd_elf_setup_sections (bfd *abfd) ->e_shstrndx), idx->shdr->sh_name), shdr->bfd_section); - result = FALSE; + result = false; } } } @@ -948,7 +948,7 @@ _bfd_elf_setup_sections (bfd *abfd) return result; } -bfd_boolean +bool bfd_elf_is_group_section (bfd *abfd ATTRIBUTE_UNUSED, const asection *sec) { return elf_next_in_group (sec) != NULL; @@ -1002,7 +1002,7 @@ struct lto_section /* Make a BFD section from an ELF section. We store a pointer to the BFD section in the bfd_section field of the header. */ -bfd_boolean +bool _bfd_elf_make_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -1014,11 +1014,11 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, unsigned int opb = bfd_octets_per_byte (abfd, NULL); if (hdr->bfd_section != NULL) - return TRUE; + return true; newsect = bfd_make_section_anyway (abfd, name); if (newsect == NULL) - return FALSE; + return false; hdr->bfd_section = newsect; elf_section_data (newsect)->this_hdr = *hdr; @@ -1056,7 +1056,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, flags |= SEC_STRINGS; if (hdr->sh_flags & SHF_GROUP) if (!setup_group (abfd, hdr, newsect)) - return FALSE; + return false; if ((hdr->sh_flags & SHF_TLS) != 0) flags |= SEC_THREAD_LOCAL; if ((hdr->sh_flags & SHF_EXCLUDE) != 0) @@ -1105,7 +1105,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, if (!bfd_set_section_vma (newsect, hdr->sh_addr / opb) || !bfd_set_section_size (newsect, hdr->sh_size) || !bfd_set_section_alignment (newsect, bfd_log2 (hdr->sh_addralign))) - return FALSE; + return false; /* As a GNU extension, if the name begins with .gnu.linkonce, we only link a single copy of the section. This is used to support @@ -1118,12 +1118,12 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD; if (!bfd_set_section_flags (newsect, flags)) - return FALSE; + return false; bed = get_elf_backend_data (abfd); if (bed->elf_backend_section_flags) if (!bed->elf_backend_section_flags (hdr)) - return FALSE; + return false; /* We do not parse the PT_NOTE segments as we are interested even in the separate debug info files which may have the segments offsets corrupted. @@ -1133,7 +1133,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, bfd_byte *contents; if (!bfd_malloc_and_get_section (abfd, newsect, &contents)) - return FALSE; + return false; elf_parse_notes (abfd, (char *) contents, hdr->sh_size, hdr->sh_offset, hdr->sh_addralign); @@ -1156,7 +1156,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, else if (phdr->p_type == PT_LOAD && phdr->p_memsz != 0) ++nload; if (i >= elf_elfheader (abfd)->e_phnum && nload > 1) - return TRUE; + return true; phdr = elf_tdata (abfd)->phdr; for (i = 0; i < elf_elfheader (abfd)->e_phnum; i++, phdr++) @@ -1202,7 +1202,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, int compression_header_size; bfd_size_type uncompressed_size; unsigned int uncompressed_align_power; - bfd_boolean compressed + bool compressed = bfd_is_section_compressed_with_header (abfd, newsect, &compression_header_size, &uncompressed_size, @@ -1227,7 +1227,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, != ((abfd->flags & BFD_COMPRESS_GABI) != 0)))) action = compress; else - return TRUE; + return true; } if (action == compress) @@ -1238,7 +1238,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, /* xgettext:c-format */ (_("%pB: unable to initialize compress status for section %s"), abfd, name); - return FALSE; + return false; } } else @@ -1249,7 +1249,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, /* xgettext:c-format */ (_("%pB: unable to initialize decompress status for section %s"), abfd, name); - return FALSE; + return false; } } @@ -1265,7 +1265,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, section. */ char *new_name = convert_zdebug_to_debug (abfd, name); if (new_name == NULL) - return FALSE; + return false; bfd_rename_section (newsect, new_name); } } @@ -1286,7 +1286,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, abfd->lto_slim_object = lsection.slim_object; } - return TRUE; + return true; } const char *const bfd_elf_section_type_names[] = @@ -1344,7 +1344,7 @@ bfd_elf_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED, Names, addresses and links may be different, but everything else should be the same. */ -static bfd_boolean +static bool section_match (const Elf_Internal_Shdr * a, const Elf_Internal_Shdr * b) { @@ -1352,10 +1352,10 @@ section_match (const Elf_Internal_Shdr * a, || ((a->sh_flags ^ b->sh_flags) & ~SHF_INFO_LINK) != 0 || a->sh_addralign != b->sh_addralign || a->sh_entsize != b->sh_entsize) - return FALSE; + return false; if (a->sh_type == SHT_SYMTAB || a->sh_type == SHT_STRTAB) - return TRUE; + return true; return a->sh_size == b->sh_size; } @@ -1398,7 +1398,7 @@ find_link (const bfd *obfd, const Elf_Internal_Shdr *iheader, Processor specific section, based upon a matching input section. Returns TRUE upon success, FALSE otherwise. */ -static bfd_boolean +static bool copy_special_section_fields (const bfd *ibfd, bfd *obfd, const Elf_Internal_Shdr *iheader, @@ -1407,7 +1407,7 @@ copy_special_section_fields (const bfd *ibfd, { const struct elf_backend_data *bed = get_elf_backend_data (obfd); const Elf_Internal_Shdr **iheaders = (const Elf_Internal_Shdr **) elf_elfsections (ibfd); - bfd_boolean changed = FALSE; + bool changed = false; unsigned int sh_link; if (oheader->sh_type == SHT_NOBITS) @@ -1432,13 +1432,13 @@ copy_special_section_fields (const bfd *ibfd, oheader->sh_link = iheader->sh_link; if (oheader->sh_info == 0) oheader->sh_info = iheader->sh_info; - return TRUE; + return true; } /* Allow the target a chance to decide how these fields should be set. */ if (bed->elf_backend_copy_special_section_fields (ibfd, obfd, iheader, oheader)) - return TRUE; + return true; /* We have an iheader which might match oheader, and which has non-zero sh_info and/or sh_link fields. Attempt to follow those links and find @@ -1453,14 +1453,14 @@ copy_special_section_fields (const bfd *ibfd, /* xgettext:c-format */ (_("%pB: invalid sh_link field (%d) in section number %d"), ibfd, iheader->sh_link, secnum); - return FALSE; + return false; } sh_link = find_link (obfd, iheaders[iheader->sh_link], iheader->sh_link); if (sh_link != SHN_UNDEF) { oheader->sh_link = sh_link; - changed = TRUE; + changed = true; } else /* FIXME: Should we install iheader->sh_link @@ -1489,7 +1489,7 @@ copy_special_section_fields (const bfd *ibfd, if (sh_link != SHN_UNDEF) { oheader->sh_info = sh_link; - changed = TRUE; + changed = true; } else _bfd_error_handler @@ -1503,7 +1503,7 @@ copy_special_section_fields (const bfd *ibfd, /* Copy the program header and other data from one object module to another. */ -bfd_boolean +bool _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { const Elf_Internal_Shdr **iheaders = (const Elf_Internal_Shdr **) elf_elfsections (ibfd); @@ -1513,12 +1513,12 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (!elf_flags_init (obfd)) { elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; } elf_gp (obfd) = elf_gp (ibfd); @@ -1536,7 +1536,7 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) _bfd_elf_copy_obj_attributes (ibfd, obfd); if (iheaders == NULL || oheaders == NULL) - return TRUE; + return true; bed = get_elf_backend_data (obfd); @@ -1626,7 +1626,7 @@ _bfd_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) } } - return TRUE; + return true; } static const char * @@ -1653,7 +1653,7 @@ get_segment_type (unsigned int p_type) /* Print out the program headers. */ -bfd_boolean +bool _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) { FILE *f = (FILE *) farg; @@ -1733,7 +1733,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) Elf_Internal_Dyn dyn; const char *name = ""; char ab[20]; - bfd_boolean stringp; + bool stringp; const struct elf_backend_data *bed = get_elf_backend_data (abfd); (*swap_dyn_in) (abfd, extdyn, &dyn); @@ -1741,7 +1741,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) if (dyn.d_tag == DT_NULL) break; - stringp = FALSE; + stringp = false; switch (dyn.d_tag) { default: @@ -1755,7 +1755,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) } break; - case DT_NEEDED: name = "NEEDED"; stringp = TRUE; break; + case DT_NEEDED: name = "NEEDED"; stringp = true; break; case DT_PLTRELSZ: name = "PLTRELSZ"; break; case DT_PLTGOT: name = "PLTGOT"; break; case DT_HASH: name = "HASH"; break; @@ -1768,8 +1768,8 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) case DT_SYMENT: name = "SYMENT"; break; case DT_INIT: name = "INIT"; break; case DT_FINI: name = "FINI"; break; - case DT_SONAME: name = "SONAME"; stringp = TRUE; break; - case DT_RPATH: name = "RPATH"; stringp = TRUE; break; + case DT_SONAME: name = "SONAME"; stringp = true; break; + case DT_RPATH: name = "RPATH"; stringp = true; break; case DT_SYMBOLIC: name = "SYMBOLIC"; break; case DT_REL: name = "REL"; break; case DT_RELSZ: name = "RELSZ"; break; @@ -1783,7 +1783,7 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) case DT_FINI_ARRAY: name = "FINI_ARRAY"; break; case DT_INIT_ARRAYSZ: name = "INIT_ARRAYSZ"; break; case DT_FINI_ARRAYSZ: name = "FINI_ARRAYSZ"; break; - case DT_RUNPATH: name = "RUNPATH"; stringp = TRUE; break; + case DT_RUNPATH: name = "RUNPATH"; stringp = true; break; case DT_FLAGS: name = "FLAGS"; break; case DT_PREINIT_ARRAY: name = "PREINIT_ARRAY"; break; case DT_PREINIT_ARRAYSZ: name = "PREINIT_ARRAYSZ"; break; @@ -1795,9 +1795,9 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) case DT_POSFLAG_1: name = "POSFLAG_1"; break; case DT_SYMINSZ: name = "SYMINSZ"; break; case DT_SYMINENT: name = "SYMINENT"; break; - case DT_CONFIG: name = "CONFIG"; stringp = TRUE; break; - case DT_DEPAUDIT: name = "DEPAUDIT"; stringp = TRUE; break; - case DT_AUDIT: name = "AUDIT"; stringp = TRUE; break; + case DT_CONFIG: name = "CONFIG"; stringp = true; break; + case DT_DEPAUDIT: name = "DEPAUDIT"; stringp = true; break; + case DT_AUDIT: name = "AUDIT"; stringp = true; break; case DT_PLTPAD: name = "PLTPAD"; break; case DT_MOVETAB: name = "MOVETAB"; break; case DT_SYMINFO: name = "SYMINFO"; break; @@ -1809,9 +1809,9 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) case DT_VERDEFNUM: name = "VERDEFNUM"; break; case DT_VERNEED: name = "VERNEED"; break; case DT_VERNEEDNUM: name = "VERNEEDNUM"; break; - case DT_AUXILIARY: name = "AUXILIARY"; stringp = TRUE; break; + case DT_AUXILIARY: name = "AUXILIARY"; stringp = true; break; case DT_USED: name = "USED"; break; - case DT_FILTER: name = "FILTER"; stringp = TRUE; break; + case DT_FILTER: name = "FILTER"; stringp = true; break; case DT_GNU_HASH: name = "GNU_HASH"; break; } @@ -1841,8 +1841,8 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) if ((elf_dynverdef (abfd) != 0 && elf_tdata (abfd)->verdef == NULL) || (elf_dynverref (abfd) != 0 && elf_tdata (abfd)->verref == NULL)) { - if (! _bfd_elf_slurp_version_tables (abfd, FALSE)) - return FALSE; + if (! _bfd_elf_slurp_version_tables (abfd, false)) + return false; } if (elf_dynverdef (abfd) != 0) @@ -1888,11 +1888,11 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) } } - return TRUE; + return true; error_return: free (dynbuf); - return FALSE; + return false; } /* Get version name. If BASE_P is TRUE, return "Base" for VER_FLG_BASE @@ -1900,8 +1900,8 @@ _bfd_elf_print_private_bfd_data (bfd *abfd, void *farg) const char * _bfd_elf_get_symbol_version_string (bfd *abfd, asymbol *symbol, - bfd_boolean base_p, - bfd_boolean *hidden) + bool base_p, + bool *hidden) { const char *version_string = NULL; if (elf_dynversym (abfd) != 0 @@ -1982,7 +1982,7 @@ bfd_elf_print_symbol (bfd *abfd, unsigned char st_other; bfd_vma val; const char *version_string; - bfd_boolean hidden; + bool hidden; section_name = symbol->section ? symbol->section->name : "(*none*)"; @@ -2010,7 +2010,7 @@ bfd_elf_print_symbol (bfd *abfd, /* If we have version information, print it. */ version_string = _bfd_elf_get_symbol_version_string (abfd, symbol, - TRUE, + true, &hidden); if (version_string) { @@ -2051,17 +2051,17 @@ bfd_elf_print_symbol (bfd *abfd, /* Create a new bfd section from an ELF section header. */ -bfd_boolean +bool bfd_section_from_shdr (bfd *abfd, unsigned int shindex) { Elf_Internal_Shdr *hdr; Elf_Internal_Ehdr *ehdr; const struct elf_backend_data *bed; const char *name; - bfd_boolean ret = TRUE; + bool ret = true; if (shindex >= elf_numsections (abfd)) - return FALSE; + return false; /* PR17512: A corrupt ELF binary might contain a loop of sections via sh_link or sh_info. Detect this here, by refusing to load a @@ -2070,9 +2070,9 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) { _bfd_error_handler (_("%pB: warning: loop in section dependencies detected"), abfd); - return FALSE; + return false; } - elf_tdata (abfd)->being_created[shindex] = TRUE; + elf_tdata (abfd)->being_created[shindex] = true; hdr = elf_elfsections (abfd)[shindex]; ehdr = elf_elfheader (abfd); @@ -2594,9 +2594,9 @@ bfd_section_from_shdr (bfd *abfd, unsigned int shindex) } fail: - ret = FALSE; + ret = false; success: - elf_tdata (abfd)->being_created[shindex] = FALSE; + elf_tdata (abfd)->being_created[shindex] = false; return ret; } @@ -2883,7 +2883,7 @@ _bfd_elf_get_sec_type_attr (bfd *abfd, asection *sec) return _bfd_elf_get_special_section (sec->name, spec, sec->use_rela_p); } -bfd_boolean +bool _bfd_elf_new_section_hook (bfd *abfd, asection *sec) { struct bfd_elf_section_data *sdata; @@ -2896,7 +2896,7 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec) sdata = (struct bfd_elf_section_data *) bfd_zalloc (abfd, sizeof (*sdata)); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -2938,7 +2938,7 @@ _bfd_elf_new_section_hook (bfd *abfd, asection *sec) */ -bfd_boolean +bool _bfd_elf_make_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index, @@ -2961,11 +2961,11 @@ _bfd_elf_make_section_from_phdr (bfd *abfd, len = strlen (namebuf) + 1; name = (char *) bfd_alloc (abfd, len); if (!name) - return FALSE; + return false; memcpy (name, namebuf, len); newsect = bfd_make_section (abfd, name); if (newsect == NULL) - return FALSE; + return false; newsect->vma = hdr->p_vaddr / opb; newsect->lma = hdr->p_paddr / opb; newsect->size = hdr->p_filesz; @@ -2997,11 +2997,11 @@ _bfd_elf_make_section_from_phdr (bfd *abfd, len = strlen (namebuf) + 1; name = (char *) bfd_alloc (abfd, len); if (!name) - return FALSE; + return false; memcpy (name, namebuf, len); newsect = bfd_make_section (abfd, name); if (newsect == NULL) - return FALSE; + return false; newsect->vma = (hdr->p_vaddr + hdr->p_filesz) / opb; newsect->lma = (hdr->p_paddr + hdr->p_filesz) / opb; newsect->size = hdr->p_memsz - hdr->p_filesz; @@ -3020,20 +3020,20 @@ _bfd_elf_make_section_from_phdr (bfd *abfd, newsect->flags |= SEC_READONLY; } - return TRUE; + return true; } -static bfd_boolean +static bool _bfd_elf_core_find_build_id (bfd *templ, bfd_vma offset) { /* The return value is ignored. Build-ids are considered optional. */ if (templ->xvec->flavour == bfd_target_elf_flavour) return (*get_elf_backend_data (templ)->elf_backend_core_find_build_id) (templ, offset); - return FALSE; + return false; } -bfd_boolean +bool bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index) { const struct elf_backend_data *bed; @@ -3045,10 +3045,10 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index) case PT_LOAD: if (! _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "load")) - return FALSE; + return false; if (bfd_get_format (abfd) == bfd_core && abfd->build_id == NULL) _bfd_elf_core_find_build_id (abfd, hdr->p_offset); - return TRUE; + return true; case PT_DYNAMIC: return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "dynamic"); @@ -3058,11 +3058,11 @@ bfd_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int hdr_index) case PT_NOTE: if (! _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "note")) - return FALSE; + return false; if (! elf_read_notes (abfd, hdr->p_offset, hdr->p_filesz, hdr->p_align)) - return FALSE; - return TRUE; + return false; + return true; case PT_SHLIB: return _bfd_elf_make_section_from_phdr (abfd, hdr, hdr_index, "shlib"); @@ -3102,25 +3102,25 @@ _bfd_elf_single_rel_hdr (asection *sec) return elf_section_data (sec)->rela.hdr; } -static bfd_boolean +static bool _bfd_elf_set_reloc_sh_name (bfd *abfd, Elf_Internal_Shdr *rel_hdr, const char *sec_name, - bfd_boolean use_rela_p) + bool use_rela_p) { char *name = (char *) bfd_alloc (abfd, sizeof ".rela" + strlen (sec_name)); if (name == NULL) - return FALSE; + return false; sprintf (name, "%s%s", use_rela_p ? ".rela" : ".rel", sec_name); rel_hdr->sh_name = (unsigned int) _bfd_elf_strtab_add (elf_shstrtab (abfd), name, - FALSE); + false); if (rel_hdr->sh_name == (unsigned int) -1) - return FALSE; + return false; - return TRUE; + return true; } /* Allocate and initialize a section-header for a new reloc section, @@ -3128,12 +3128,12 @@ _bfd_elf_set_reloc_sh_name (bfd *abfd, USE_RELA_P is TRUE, we use RELA relocations; otherwise, we use REL relocations. */ -static bfd_boolean +static bool _bfd_elf_init_reloc_shdr (bfd *abfd, struct bfd_elf_section_reloc_data *reldata, const char *sec_name, - bfd_boolean use_rela_p, - bfd_boolean delay_st_name_p) + bool use_rela_p, + bool delay_st_name_p) { Elf_Internal_Shdr *rel_hdr; const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -3146,7 +3146,7 @@ _bfd_elf_init_reloc_shdr (bfd *abfd, rel_hdr->sh_name = (unsigned int) -1; else if (!_bfd_elf_set_reloc_sh_name (abfd, rel_hdr, sec_name, use_rela_p)) - return FALSE; + return false; rel_hdr->sh_type = use_rela_p ? SHT_RELA : SHT_REL; rel_hdr->sh_entsize = (use_rela_p ? bed->s->sizeof_rela @@ -3157,7 +3157,7 @@ _bfd_elf_init_reloc_shdr (bfd *abfd, rel_hdr->sh_size = 0; rel_hdr->sh_offset = 0; - return TRUE; + return true; } /* Return the default section type based on the passed in section flags. */ @@ -3174,7 +3174,7 @@ bfd_elf_get_default_section_type (flagword flags) struct fake_section_arg { struct bfd_link_info *link_info; - bfd_boolean failed; + bool failed; }; /* Set up an ELF internal section header for a section. */ @@ -3188,7 +3188,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) Elf_Internal_Shdr *this_hdr; unsigned int sh_type; const char *name = asect->name; - bfd_boolean delay_st_name_p = FALSE; + bool delay_st_name_p = false; bfd_vma mask; if (arg->failed) @@ -3214,7 +3214,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) /* If this section will be compressed, delay adding section name to section name section after it is compressed in _bfd_elf_assign_file_positions_for_non_load. */ - delay_st_name_p = TRUE; + delay_st_name_p = true; } } else if ((asect->flags & SEC_ELF_RENAME)) @@ -3230,7 +3230,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) char *new_name = convert_zdebug_to_debug (abfd, name); if (new_name == NULL) { - arg->failed = TRUE; + arg->failed = true; return; } name = new_name; @@ -3245,7 +3245,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) char *new_name = convert_debug_to_zdebug (abfd, name); if (new_name == NULL) { - arg->failed = TRUE; + arg->failed = true; return; } BFD_ASSERT (name[1] != 'z'); @@ -3259,10 +3259,10 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) { this_hdr->sh_name = (unsigned int) _bfd_elf_strtab_add (elf_shstrtab (abfd), - name, FALSE); + name, false); if (this_hdr->sh_name == (unsigned int) -1) { - arg->failed = TRUE; + arg->failed = true; return; } } @@ -3285,7 +3285,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) /* xgettext:c-format */ (_("%pB: error: alignment power %d of section `%pA' is too big"), abfd, asect->alignment_power, asect); - arg->failed = TRUE; + arg->failed = true; return; } /* Set sh_addralign to the highest power of two given by alignment @@ -3447,16 +3447,16 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) { if (esd->rel.count && esd->rel.hdr == NULL && !_bfd_elf_init_reloc_shdr (abfd, &esd->rel, name, - FALSE, delay_st_name_p)) + false, delay_st_name_p)) { - arg->failed = TRUE; + arg->failed = true; return; } if (esd->rela.count && esd->rela.hdr == NULL && !_bfd_elf_init_reloc_shdr (abfd, &esd->rela, name, - TRUE, delay_st_name_p)) + true, delay_st_name_p)) { - arg->failed = TRUE; + arg->failed = true; return; } } @@ -3467,7 +3467,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) asect->use_rela_p, delay_st_name_p)) { - arg->failed = TRUE; + arg->failed = true; return; } } @@ -3477,7 +3477,7 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) if (bed->elf_backend_fake_sections && !(*bed->elf_backend_fake_sections) (abfd, this_hdr, asect)) { - arg->failed = TRUE; + arg->failed = true; return; } @@ -3497,10 +3497,10 @@ elf_fake_sections (bfd *abfd, asection *asect, void *fsarg) void bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg) { - bfd_boolean *failedptr = (bfd_boolean *) failedptrarg; + bool *failedptr = (bool *) failedptrarg; asection *elt, *first; unsigned char *loc; - bfd_boolean gas; + bool gas; /* Ignore linker created group section. See elfNN_ia64_object_p in elfxx-ia64.c. */ @@ -3525,7 +3525,7 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg) PR 25699: A corrupt input file could contain bogus group info. */ if (elf_section_syms (abfd) == NULL) { - *failedptr = TRUE; + *failedptr = true; return; } symindx = elf_section_syms (abfd)[sec->index]->udata.i; @@ -3566,17 +3566,17 @@ bfd_elf_set_group_contents (bfd *abfd, asection *sec, void *failedptrarg) } /* The contents won't be allocated for "ld -r" or objcopy. */ - gas = TRUE; + gas = true; if (sec->contents == NULL) { - gas = FALSE; + gas = false; sec->contents = (unsigned char *) bfd_alloc (abfd, sec->size); /* Arrange for the section to be written out. */ elf_section_data (sec)->this_hdr.contents = sec->contents; if (sec->contents == NULL) { - *failedptr = TRUE; + *failedptr = true; return; } } @@ -3693,7 +3693,7 @@ elf_get_reloc_section (asection *reloc_sec) in here too, while we're at it. LINK_INFO will be 0 when arriving here for objcopy, and when using the generic ELF linker. */ -static bfd_boolean +static bool assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) { struct elf_obj_tdata *t = elf_tdata (abfd); @@ -3701,7 +3701,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) unsigned int section_number; Elf_Internal_Shdr **i_shdrp; struct bfd_elf_section_data *d; - bfd_boolean need_symtab; + bool need_symtab; size_t amt; section_number = 1; @@ -3785,9 +3785,9 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) elf_symtab_shndx_list (abfd) = entry; entry->hdr.sh_name = (unsigned int) _bfd_elf_strtab_add (elf_shstrtab (abfd), - ".symtab_shndx", FALSE); + ".symtab_shndx", false); if (entry->hdr.sh_name == (unsigned int) -1) - return FALSE; + return false; } elf_strtab_sec (abfd) = section_number++; _bfd_elf_strtab_addref (elf_shstrtab (abfd), t->strtab_hdr.sh_name); @@ -3802,7 +3802,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) /* xgettext:c-format */ _bfd_error_handler (_("%pB: too many sections: %u"), abfd, section_number); - return FALSE; + return false; } elf_numsections (abfd) = section_number; @@ -3813,14 +3813,14 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) amt = section_number * sizeof (Elf_Internal_Shdr *); i_shdrp = (Elf_Internal_Shdr **) bfd_zalloc (abfd, amt); if (i_shdrp == NULL) - return FALSE; + return false; i_shdrp[0] = (Elf_Internal_Shdr *) bfd_zalloc (abfd, sizeof (Elf_Internal_Shdr)); if (i_shdrp[0] == NULL) { bfd_release (abfd, i_shdrp); - return FALSE; + return false; } elf_elfsections (abfd) = i_shdrp; @@ -3895,7 +3895,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) if (kept == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } s = kept; } @@ -3908,7 +3908,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) " removed section `%pA' of `%pB'"), abfd, d->this_hdr.bfd_section, s, s->owner); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } s = s->output_section; d->this_hdr.sh_link = elf_section_data (s)->this_idx; @@ -3951,7 +3951,7 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) len = strlen (sec->name); alc = (char *) bfd_malloc (len - 2); if (alc == NULL) - return FALSE; + return false; memcpy (alc, sec->name, len - 3); alc[len - 3] = '\0'; s = bfd_get_section_by_name (abfd, alc); @@ -4007,10 +4007,10 @@ assign_section_numbers (bfd *abfd, struct bfd_link_info *link_info) _bfd_elf_assign_file_positions_for_non_load can convert DWARF debug section name from .debug_* to .zdebug_* if needed. */ - return TRUE; + return true; } -static bfd_boolean +static bool sym_is_global (bfd *abfd, asymbol *sym) { /* If the backend has a special mapping, use it. */ @@ -4045,7 +4045,7 @@ _bfd_elf_filter_global_symbols (bfd *abfd, struct bfd_link_info *info, if (!sym_is_global (abfd, sym)) continue; - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, FALSE); + h = bfd_link_hash_lookup (info->hash, name, false, false, false); if (h == NULL) continue; if (h->type != bfd_link_hash_defined && h->type != bfd_link_hash_defweak) @@ -4064,23 +4064,23 @@ _bfd_elf_filter_global_symbols (bfd *abfd, struct bfd_link_info *info, /* Don't output section symbols for sections that are not going to be output, that are duplicates or there is no BFD section. */ -static bfd_boolean +static bool ignore_section_sym (bfd *abfd, asymbol *sym) { elf_symbol_type *type_ptr; if (sym == NULL) - return FALSE; + return false; if ((sym->flags & BSF_SECTION_SYM) == 0) - return FALSE; + return false; /* Ignore the section symbol if it isn't used. */ if ((sym->flags & BSF_SECTION_SYM_USED) == 0) - return TRUE; + return true; if (sym->section == NULL) - return TRUE; + return true; type_ptr = elf_symbol_from (sym); return ((type_ptr != NULL @@ -4096,7 +4096,7 @@ ignore_section_sym (bfd *abfd, asymbol *sym) /* Map symbol from it's internal number to the external number, moving all local symbols to be at the head of the list. */ -static bfd_boolean +static bool elf_map_symbols (bfd *abfd, unsigned int *pnum_locals) { unsigned int symcount = bfd_get_symcount (abfd); @@ -4127,7 +4127,7 @@ elf_map_symbols (bfd *abfd, unsigned int *pnum_locals) amt = max_index * sizeof (asymbol *); sect_syms = (asymbol **) bfd_zalloc (abfd, amt); if (sect_syms == NULL) - return FALSE; + return false; elf_section_syms (abfd) = sect_syms; elf_num_section_syms (abfd) = max_index; @@ -4182,7 +4182,7 @@ elf_map_symbols (bfd *abfd, unsigned int *pnum_locals) amt = (num_locals + num_globals) * sizeof (asymbol *); new_syms = (asymbol **) bfd_alloc (abfd, amt); if (new_syms == NULL) - return FALSE; + return false; for (idx = 0; idx < symcount; idx++) { @@ -4220,7 +4220,7 @@ elf_map_symbols (bfd *abfd, unsigned int *pnum_locals) bfd_set_symtab (abfd, new_syms, num_locals + num_globals); *pnum_locals = num_locals; - return TRUE; + return true; } /* Align to the maximum file alignment that could be required for any @@ -4238,7 +4238,7 @@ align_file_position (file_ptr off, int align) file_ptr _bfd_elf_assign_file_position_for_section (Elf_Internal_Shdr *i_shdrp, file_ptr offset, - bfd_boolean align) + bool align) { if (align && i_shdrp->sh_addralign > 1) offset = BFD_ALIGN (offset, i_shdrp->sh_addralign); @@ -4254,35 +4254,35 @@ _bfd_elf_assign_file_position_for_section (Elf_Internal_Shdr *i_shdrp, otherwise prepare to begin writing out the ELF file. If LINK_INFO is not NULL, this is being called by the ELF backend linker. */ -bfd_boolean +bool _bfd_elf_compute_section_file_positions (bfd *abfd, struct bfd_link_info *link_info) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); struct fake_section_arg fsargs; - bfd_boolean failed; + bool failed; struct elf_strtab_hash *strtab = NULL; Elf_Internal_Shdr *shstrtab_hdr; - bfd_boolean need_symtab; + bool need_symtab; if (abfd->output_has_begun) - return TRUE; + return true; /* Do any elf backend specific processing first. */ if (bed->elf_backend_begin_write_processing) (*bed->elf_backend_begin_write_processing) (abfd, link_info); if (!(*bed->elf_backend_init_file_header) (abfd, link_info)) - return FALSE; + return false; - fsargs.failed = FALSE; + fsargs.failed = false; fsargs.link_info = link_info; bfd_map_over_sections (abfd, elf_fake_sections, &fsargs); if (fsargs.failed) - return FALSE; + return false; if (!assign_section_numbers (abfd, link_info)) - return FALSE; + return false; /* The backend linker builds symbol table information itself. */ need_symtab = (link_info == NULL @@ -4295,15 +4295,15 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, int relocatable_p = ! (abfd->flags & (EXEC_P | DYNAMIC)); if (! swap_out_syms (abfd, &strtab, relocatable_p, link_info)) - return FALSE; + return false; } - failed = FALSE; + failed = false; if (link_info == NULL) { bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed); if (failed) - return FALSE; + return false; } shstrtab_hdr = &elf_tdata (abfd)->shstrtab_hdr; @@ -4319,7 +4319,7 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, shstrtab_hdr->sh_addralign = 1; if (!assign_file_positions_except_relocs (abfd, link_info)) - return FALSE; + return false; if (need_symtab) { @@ -4329,18 +4329,18 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, off = elf_next_file_pos (abfd); hdr = & elf_symtab_hdr (abfd); - off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE); + off = _bfd_elf_assign_file_position_for_section (hdr, off, true); if (elf_symtab_shndx_list (abfd) != NULL) { hdr = & elf_symtab_shndx_list (abfd)->hdr; if (hdr->sh_size != 0) - off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE); + off = _bfd_elf_assign_file_position_for_section (hdr, off, true); /* FIXME: What about other symtab_shndx sections in the list ? */ } hdr = &elf_tdata (abfd)->strtab_hdr; - off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE); + off = _bfd_elf_assign_file_position_for_section (hdr, off, true); elf_next_file_pos (abfd) = off; @@ -4348,13 +4348,13 @@ _bfd_elf_compute_section_file_positions (bfd *abfd, out. */ if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0 || ! _bfd_elf_strtab_emit (abfd, strtab)) - return FALSE; + return false; _bfd_elf_strtab_free (strtab); } - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; - return TRUE; + return true; } /* Make an initial estimate of the size of the program header. If we @@ -4521,7 +4521,7 @@ make_mapping (bfd *abfd, asection **sections, unsigned int from, unsigned int to, - bfd_boolean phdr) + bool phdr) { struct elf_segment_map *m; unsigned int i; @@ -4571,10 +4571,10 @@ _bfd_elf_make_dynamic_segment (bfd *abfd, asection *dynsec) /* Possibly add or remove segments from the segment map. */ -static bfd_boolean +static bool elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info, - bfd_boolean remove_empty_load) + bool remove_empty_load) { struct elf_segment_map **m; const struct elf_backend_data *bed; @@ -4614,10 +4614,10 @@ elf_modify_segment_map (bfd *abfd, if (bed->elf_backend_modify_segment_map != NULL) { if (!(*bed->elf_backend_modify_segment_map) (abfd, info)) - return FALSE; + return false; } - return TRUE; + return true; } #define IS_TBSS(s) \ @@ -4625,14 +4625,14 @@ elf_modify_segment_map (bfd *abfd, /* Set up a mapping from BFD sections to program segments. */ -bfd_boolean +bool _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) { unsigned int count; struct elf_segment_map *m; asection **sections = NULL; const struct elf_backend_data *bed = get_elf_backend_data (abfd); - bfd_boolean no_user_phdrs; + bool no_user_phdrs; no_user_phdrs = elf_seg_map (abfd) == NULL; @@ -4650,9 +4650,9 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) unsigned int hdr_index; bfd_vma maxpagesize; asection **hdrpp; - bfd_boolean phdr_in_segment; - bfd_boolean writable; - bfd_boolean executable; + bool phdr_in_segment; + bool writable; + bool executable; unsigned int tls_count = 0; asection *first_tls = NULL; asection *first_mbind = NULL; @@ -4715,7 +4715,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) /* For compatibility with old scripts that may not be using SIZEOF_HEADERS, add headers when it looks like space has been left for them. */ - phdr_in_segment = TRUE; + phdr_in_segment = true; /* Build the mapping. */ mfirst = NULL; @@ -4736,7 +4736,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) m->p_flags = PF_R; m->p_flags_valid = 1; m->includes_phdrs = 1; - phdr_in_segment = TRUE; + phdr_in_segment = true; *pm = m; pm = &m->next; @@ -4759,15 +4759,15 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) last_hdr = NULL; last_size = 0; hdr_index = 0; - writable = FALSE; - executable = FALSE; + writable = false; + executable = false; dynsec = bfd_get_section_by_name (abfd, ".dynamic"); if (dynsec != NULL && (dynsec->flags & SEC_LOAD) == 0) dynsec = NULL; if ((abfd->flags & D_PAGED) == 0) - phdr_in_segment = FALSE; + phdr_in_segment = false; /* Deal with -Ttext or something similar such that the first section is not adjacent to the program headers. This is an @@ -4776,7 +4776,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) if (phdr_in_segment && count > 0) { bfd_vma phdr_lma; /* Bytes. */ - bfd_boolean separate_phdr = FALSE; + bool separate_phdr = false; phdr_lma = (sections[0]->lma - phdr_size) & addr_mask & -maxpagesize; if (info != NULL @@ -4787,7 +4787,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) thus not executable, and the first section is executable then put the file and program headers in their own PT_LOAD. */ - separate_phdr = TRUE; + separate_phdr = true; if ((((phdr_lma + phdr_size - 1) & addr_mask & -maxpagesize) == (sections[0]->lma & addr_mask & -maxpagesize))) { @@ -4797,19 +4797,19 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) if (phdr_lma >= maxpagesize) phdr_lma -= maxpagesize; else - separate_phdr = FALSE; + separate_phdr = false; } } if ((sections[0]->lma & addr_mask) < phdr_lma || (sections[0]->lma & addr_mask) < phdr_size) /* If file and program headers would be placed at the end of memory then it's probably better to omit them. */ - phdr_in_segment = FALSE; + phdr_in_segment = false; else if (phdr_lma < wrap_to) /* If a section wraps around to where we'll be placing file and program headers, then the headers will be overwritten. */ - phdr_in_segment = FALSE; + phdr_in_segment = false; else if (separate_phdr) { m = make_mapping (abfd, sections, 0, 0, phdr_in_segment); @@ -4821,14 +4821,14 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) m->p_paddr_valid = 1; *pm = m; pm = &m->next; - phdr_in_segment = FALSE; + phdr_in_segment = false; } } for (i = 0, hdrpp = sections; i < count; i++, hdrpp++) { asection *hdr; - bfd_boolean new_segment; + bool new_segment; hdr = *hdrpp; @@ -4839,21 +4839,21 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) { /* If we don't have a segment yet, then we don't need a new one (we build the last one after this loop). */ - new_segment = FALSE; + new_segment = false; } else if (last_hdr->lma - last_hdr->vma != hdr->lma - hdr->vma) { /* If this section has a different relation between the virtual address and the load address, then we need a new segment. */ - new_segment = TRUE; + new_segment = true; } else if (hdr->lma < last_hdr->lma + last_size || last_hdr->lma + last_size < last_hdr->lma) { /* If this section has a load address that makes it overlap the previous section, then we need a new segment. */ - new_segment = TRUE; + new_segment = true; } else if ((abfd->flags & D_PAGED) != 0 && (((last_hdr->lma + last_size - 1) & -maxpagesize) @@ -4861,7 +4861,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) { /* If we are demand paged then we can't map two disk pages onto the same memory page. */ - new_segment = FALSE; + new_segment = false; } /* In the next test we have to be careful when last_hdr->lma is close to the end of the address space. If the aligned address wraps @@ -4875,7 +4875,7 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) { /* If putting this section in this segment would force us to skip a page in the segment, then we need a new segment. */ - new_segment = TRUE; + new_segment = true; } else if ((last_hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) == 0 && (hdr->flags & (SEC_LOAD | SEC_THREAD_LOCAL)) != 0) @@ -4884,32 +4884,32 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) nonloaded (ie. bss style) section in the same segment as that will force the non-loaded section to be loaded. Consider .tbss sections as loaded for this purpose. */ - new_segment = TRUE; + new_segment = true; } else if ((abfd->flags & D_PAGED) == 0) { /* If the file is not demand paged, which means that we don't require the sections to be correctly aligned in the file, then there is no other reason for a new segment. */ - new_segment = FALSE; + new_segment = false; } else if (info != NULL && info->separate_code && executable != ((hdr->flags & SEC_CODE) != 0)) { - new_segment = TRUE; + new_segment = true; } else if (! writable && (hdr->flags & SEC_READONLY) == 0) { /* We don't want to put a writable section in a read only segment. */ - new_segment = TRUE; + new_segment = true; } else { /* Otherwise, we can use the same segment. */ - new_segment = FALSE; + new_segment = false; } /* Allow interested parties a chance to override our decision. */ @@ -4924,9 +4924,9 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) if (! new_segment) { if ((hdr->flags & SEC_READONLY) == 0) - writable = TRUE; + writable = true; if ((hdr->flags & SEC_CODE) != 0) - executable = TRUE; + executable = true; last_hdr = hdr; /* .tbss sections effectively have zero size. */ last_size = (!IS_TBSS (hdr) ? hdr->size : 0) / opb; @@ -4944,20 +4944,20 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) pm = &m->next; if ((hdr->flags & SEC_READONLY) == 0) - writable = TRUE; + writable = true; else - writable = FALSE; + writable = false; if ((hdr->flags & SEC_CODE) == 0) - executable = FALSE; + executable = false; else - executable = TRUE; + executable = true; last_hdr = hdr; /* .tbss sections effectively have zero size. */ last_size = (!IS_TBSS (hdr) ? hdr->size : 0) / opb; hdr_index = i; - phdr_in_segment = FALSE; + phdr_in_segment = false; } /* Create a final PT_LOAD program segment, but not if it's just @@ -5216,17 +5216,17 @@ _bfd_elf_map_sections_to_segments (bfd *abfd, struct bfd_link_info *info) } if (!elf_modify_segment_map (abfd, info, no_user_phdrs)) - return FALSE; + return false; for (count = 0, m = elf_seg_map (abfd); m != NULL; m = m->next) ++count; elf_program_header_size (abfd) = count * bed->s->sizeof_phdr; - return TRUE; + return true; error_return: free (sections); - return FALSE; + return false; } /* Sort sections by address. */ @@ -5391,17 +5391,17 @@ print_segment_map (const struct elf_segment_map *m) fflush (stderr); } -static bfd_boolean +static bool write_zeros (bfd *abfd, file_ptr pos, bfd_size_type len) { void *buf; - bfd_boolean ret; + bool ret; if (bfd_seek (abfd, pos, SEEK_SET) != 0) - return FALSE; + return false; buf = bfd_zmalloc (len); if (buf == NULL) - return FALSE; + return false; ret = bfd_bwrite (buf, len, abfd) == len; free (buf); return ret; @@ -5411,7 +5411,7 @@ write_zeros (bfd *abfd, file_ptr pos, bfd_size_type len) sections to segments. This function also sets up some fields in the file header. */ -static bfd_boolean +static bool assign_file_positions_for_load_sections (bfd *abfd, struct bfd_link_info *link_info) { @@ -5429,7 +5429,7 @@ assign_file_positions_for_load_sections (bfd *abfd, if (link_info == NULL && !_bfd_elf_map_sections_to_segments (abfd, link_info)) - return FALSE; + return false; alloc = 0; for (m = elf_seg_map (abfd); m != NULL; m = m->next) @@ -5465,7 +5465,7 @@ assign_file_positions_for_load_sections (bfd *abfd, if (alloc == 0) { elf_next_file_pos (abfd) = bed->s->sizeof_ehdr; - return TRUE; + return true; } /* We're writing the size in elf_program_header_size (abfd), @@ -5482,7 +5482,7 @@ assign_file_positions_for_load_sections (bfd *abfd, sorted_seg_map = (struct elf_segment_map **) (phdrs + actual); elf_tdata (abfd)->phdr = phdrs; if (phdrs == NULL) - return FALSE; + return false; for (m = elf_seg_map (abfd), j = 0; m != NULL; m = m->next, j++) { @@ -5539,7 +5539,7 @@ assign_file_positions_for_load_sections (bfd *abfd, { asection **secpp; bfd_vma off_adjust; /* Octets. */ - bfd_boolean no_contents; + bool no_contents; /* An ELF segment (described by Elf_Internal_Phdr) may contain a number of sections with contents contributing to both p_filesz @@ -5591,7 +5591,7 @@ assign_file_positions_for_load_sections (bfd *abfd, off += actual * bed->s->sizeof_phdr; } - no_contents = FALSE; + no_contents = false; off_adjust = 0; if (p->p_type == PT_LOAD && m->count > 0) @@ -5625,11 +5625,11 @@ assign_file_positions_for_load_sections (bfd *abfd, /* Find out whether this segment contains any loadable sections. */ - no_contents = TRUE; + no_contents = true; for (i = 0; i < m->count; i++) if (elf_section_type (m->sections[i]) != SHT_NOBITS) { - no_contents = FALSE; + no_contents = false; break; } @@ -5671,7 +5671,7 @@ assign_file_positions_for_load_sections (bfd *abfd, " is not the .dynamic section"), abfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Set the note section type to SHT_NOTE. */ else if (p->p_type == PT_NOTE) @@ -5697,7 +5697,7 @@ assign_file_positions_for_load_sections (bfd *abfd, " try linking with -N"), abfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } p->p_vaddr -= off; if (!m->p_paddr_valid) @@ -5830,7 +5830,7 @@ assign_file_positions_for_load_sections (bfd *abfd, zero it. */ adjust = p->p_memsz - p->p_filesz; if (!write_zeros (abfd, off, adjust)) - return FALSE; + return false; } } /* We only adjust sh_offset in SHT_NOBITS sections @@ -5951,7 +5951,7 @@ assign_file_positions_for_load_sections (bfd *abfd, " by LOAD segment"), abfd); if (link_info == NULL) - return FALSE; + return false; /* Arrange for the linker to exit with an error, deleting the output file unless --noinhibit-exec is given. */ link_info->callbacks->info ("%X"); @@ -5961,7 +5961,7 @@ assign_file_positions_for_load_sections (bfd *abfd, Don't check funky gdb generated core files. */ if (p->p_type == PT_LOAD && bfd_get_format (abfd) != bfd_core) { - bfd_boolean check_vma = TRUE; + bool check_vma = true; for (i = 1; i < m->count; i++) if (m->sections[i]->vma == m->sections[i - 1]->vma @@ -5971,7 +5971,7 @@ assign_file_positions_for_load_sections (bfd *abfd, ->this_hdr), p) != 0) { /* Looks like we have overlays packed into the segment. */ - check_vma = FALSE; + check_vma = false; break; } @@ -6007,7 +6007,7 @@ assign_file_positions_for_load_sections (bfd *abfd, struct elf_link_hash_entry *hash = elf_link_hash_lookup (elf_hash_table (link_info), "__ehdr_start", - FALSE, FALSE, TRUE); + false, false, true); /* If the symbol was referenced and not defined, define it. */ if (hash != NULL && (hash->root.type == bfd_link_hash_new @@ -6047,18 +6047,18 @@ assign_file_positions_for_load_sections (bfd *abfd, } } - return TRUE; + return true; } /* Determine if a bfd is a debuginfo file. Unfortunately there is no defined method for detecting such files, so we have to use heuristics instead. */ -bfd_boolean +bool is_debuginfo_file (bfd *abfd) { if (abfd == NULL || bfd_get_flavour (abfd) != bfd_target_elf_flavour) - return FALSE; + return false; Elf_Internal_Shdr **start_headers = elf_elfsections (abfd); Elf_Internal_Shdr **end_headers = start_headers + elf_numsections (abfd); @@ -6073,16 +6073,16 @@ is_debuginfo_file (bfd *abfd) if ((header->sh_flags & SHF_ALLOC) == SHF_ALLOC && header->sh_type != SHT_NOBITS && header->sh_type != SHT_NOTE) - return FALSE; + return false; } - return TRUE; + return true; } /* Assign file positions for the other sections, except for compressed debugging and other sections assigned in _bfd_elf_assign_file_positions_for_non_load(). */ -static bfd_boolean +static bool assign_file_positions_for_non_load_sections (bfd *abfd, struct bfd_link_info *link_info) { @@ -6137,7 +6137,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, off += vma_page_aligned_bias (hdr->sh_addr, off, hdr->sh_addralign); off = _bfd_elf_assign_file_position_for_section (hdr, off, - FALSE); + false); } else if (((hdr->sh_type == SHT_REL || hdr->sh_type == SHT_RELA) && hdr->bfd_section == NULL) @@ -6154,7 +6154,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, || hdr == i_shdrpp[elf_shstrtab_sec (abfd)]) hdr->sh_offset = -1; else - off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE); + off = _bfd_elf_assign_file_position_for_section (hdr, off, true); } elf_next_file_pos (abfd) = off; @@ -6166,7 +6166,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, if (p->p_type == PT_GNU_RELRO) { bfd_vma start, end; /* Bytes. */ - bfd_boolean ok; + bool ok; if (link_info != NULL) { @@ -6189,7 +6189,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, end = 0; } - ok = FALSE; + ok = false; if (start < end) { struct elf_segment_map *lm; @@ -6251,7 +6251,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, p->p_align = 1; if (!m->p_flags_valid) p->p_flags = PF_R; - ok = TRUE; + ok = true; } } } @@ -6288,7 +6288,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, (_("%pB: error: non-load segment %d includes file header " "and/or program header"), abfd, (int) (p - phdrs)); - return FALSE; + return false; } p->p_filesz = 0; @@ -6308,7 +6308,7 @@ assign_file_positions_for_non_load_sections (bfd *abfd, } } - return TRUE; + return true; } static elf_section_list * @@ -6335,7 +6335,7 @@ find_section_in_list (unsigned int i, elf_section_list * list) We also don't set the positions of the .symtab and .strtab here. */ -static bfd_boolean +static bool assign_file_positions_except_relocs (bfd *abfd, struct bfd_link_info *link_info) { @@ -6381,7 +6381,7 @@ assign_file_positions_except_relocs (bfd *abfd, hdr->sh_offset = -1; } else - off = _bfd_elf_assign_file_position_for_section (hdr, off, TRUE); + off = _bfd_elf_assign_file_position_for_section (hdr, off, true); } elf_next_file_pos (abfd) = off; @@ -6392,15 +6392,15 @@ assign_file_positions_except_relocs (bfd *abfd, /* Assign file positions for the loaded sections based on the assignment of sections to segments. */ if (!assign_file_positions_for_load_sections (abfd, link_info)) - return FALSE; + return false; /* And for non-load sections. */ if (!assign_file_positions_for_non_load_sections (abfd, link_info)) - return FALSE; + return false; } if (!(*bed->elf_backend_modify_headers) (abfd, link_info)) - return FALSE; + return false; /* Write out the program headers. */ alloc = i_ehdrp->e_phnum; @@ -6408,13 +6408,13 @@ assign_file_positions_except_relocs (bfd *abfd, { if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0 || bed->s->write_out_phdrs (abfd, tdata->phdr, alloc) != 0) - return FALSE; + return false; } - return TRUE; + return true; } -bfd_boolean +bool _bfd_elf_init_file_header (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -6426,7 +6426,7 @@ _bfd_elf_init_file_header (bfd *abfd, shstrtab = _bfd_elf_strtab_init (); if (shstrtab == NULL) - return FALSE; + return false; elf_shstrtab (abfd) = shstrtab; @@ -6480,17 +6480,17 @@ _bfd_elf_init_file_header (bfd *abfd, i_ehdrp->e_shentsize = bed->s->sizeof_shdr; elf_tdata (abfd)->symtab_hdr.sh_name = - (unsigned int) _bfd_elf_strtab_add (shstrtab, ".symtab", FALSE); + (unsigned int) _bfd_elf_strtab_add (shstrtab, ".symtab", false); elf_tdata (abfd)->strtab_hdr.sh_name = - (unsigned int) _bfd_elf_strtab_add (shstrtab, ".strtab", FALSE); + (unsigned int) _bfd_elf_strtab_add (shstrtab, ".strtab", false); elf_tdata (abfd)->shstrtab_hdr.sh_name = - (unsigned int) _bfd_elf_strtab_add (shstrtab, ".shstrtab", FALSE); + (unsigned int) _bfd_elf_strtab_add (shstrtab, ".shstrtab", false); if (elf_tdata (abfd)->symtab_hdr.sh_name == (unsigned int) -1 || elf_tdata (abfd)->strtab_hdr.sh_name == (unsigned int) -1 || elf_tdata (abfd)->shstrtab_hdr.sh_name == (unsigned int) -1) - return FALSE; + return false; - return TRUE; + return true; } /* Set e_type in ELF header to ET_EXEC for -pie -Ttext-segment=. @@ -6500,7 +6500,7 @@ _bfd_elf_init_file_header (bfd *abfd, including the Linux kernel. But really either the spec should be changed or the programs updated. */ -bfd_boolean +bool _bfd_elf_modify_headers (bfd *obfd, struct bfd_link_info *link_info) { if (link_info != NULL && bfd_link_pie (link_info)) @@ -6522,13 +6522,13 @@ _bfd_elf_modify_headers (bfd *obfd, struct bfd_link_info *link_info) if (p_vaddr) i_ehdrp->e_type = ET_EXEC; } - return TRUE; + return true; } /* Assign file positions for all the reloc sections which are not part of the loadable file image, and the file position of section headers. */ -static bfd_boolean +static bool _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) { file_ptr off; @@ -6547,9 +6547,9 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) if (shdrp->sh_offset == -1) { asection *sec = shdrp->bfd_section; - bfd_boolean is_rel = (shdrp->sh_type == SHT_REL - || shdrp->sh_type == SHT_RELA); - bfd_boolean is_ctf = sec && bfd_section_is_ctf (sec); + bool is_rel = (shdrp->sh_type == SHT_REL + || shdrp->sh_type == SHT_RELA); + bool is_ctf = sec && bfd_section_is_ctf (sec); if (is_rel || is_ctf || (sec != NULL && (sec->flags & SEC_ELF_COMPRESS))) @@ -6562,7 +6562,7 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) /* Compress DWARF debug sections. */ if (!bfd_compress_section (abfd, sec, shdrp->contents)) - return FALSE; + return false; if (sec->compress_status == COMPRESS_SECTION_DONE && (abfd->flags & BFD_COMPRESS_GABI) == 0) @@ -6572,7 +6572,7 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) char *new_name = convert_debug_to_zdebug (abfd, name); if (new_name == NULL) - return FALSE; + return false; name = new_name; } /* Add section name to section name section. */ @@ -6580,20 +6580,20 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) abort (); shdrp->sh_name = (unsigned int) _bfd_elf_strtab_add (elf_shstrtab (abfd), - name, FALSE); + name, false); d = elf_section_data (sec); /* Add reloc section name to section name section. */ if (d->rel.hdr && !_bfd_elf_set_reloc_sh_name (abfd, d->rel.hdr, - name, FALSE)) - return FALSE; + name, false)) + return false; if (d->rela.hdr && !_bfd_elf_set_reloc_sh_name (abfd, d->rela.hdr, - name, TRUE)) - return FALSE; + name, true)) + return false; /* Update section size and contents. */ shdrp->sh_size = sec->size; @@ -6609,7 +6609,7 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) off = _bfd_elf_assign_file_position_for_section (shdrp, off, - TRUE); + true); } } } @@ -6619,7 +6619,7 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) _bfd_elf_strtab_finalize (elf_shstrtab (abfd)); shdrp = &elf_tdata (abfd)->shstrtab_hdr; shdrp->sh_size = _bfd_elf_strtab_size (elf_shstrtab (abfd)); - off = _bfd_elf_assign_file_position_for_section (shdrp, off, TRUE); + off = _bfd_elf_assign_file_position_for_section (shdrp, off, true); /* Place the section headers. */ i_ehdrp = elf_elfheader (abfd); @@ -6629,21 +6629,21 @@ _bfd_elf_assign_file_positions_for_non_load (bfd *abfd) off += i_ehdrp->e_shnum * i_ehdrp->e_shentsize; elf_next_file_pos (abfd) = off; - return TRUE; + return true; } -bfd_boolean +bool _bfd_elf_write_object_contents (bfd *abfd) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); Elf_Internal_Shdr **i_shdrp; - bfd_boolean failed; + bool failed; unsigned int count, num_sec; struct elf_obj_tdata *t; if (! abfd->output_has_begun && ! _bfd_elf_compute_section_file_positions (abfd, NULL)) - return FALSE; + return false; /* Do not rewrite ELF data when the BFD has been opened for update. abfd->output_has_begun was set to TRUE on opening, so creation of new sections, and modification of existing section sizes was restricted. @@ -6654,18 +6654,18 @@ _bfd_elf_write_object_contents (bfd *abfd) else if (abfd->direction == both_direction) { BFD_ASSERT (abfd->output_has_begun); - return TRUE; + return true; } i_shdrp = elf_elfsections (abfd); - failed = FALSE; + failed = false; bfd_map_over_sections (abfd, bed->s->write_relocs, &failed); if (failed) - return FALSE; + return false; if (!_bfd_elf_assign_file_positions_for_non_load (abfd)) - return FALSE; + return false; /* After writing the headers, we need to write the sections too... */ num_sec = elf_numsections (abfd); @@ -6676,14 +6676,14 @@ _bfd_elf_write_object_contents (bfd *abfd) i_shdrp[count]->sh_name); if (bed->elf_backend_section_processing) if (!(*bed->elf_backend_section_processing) (abfd, i_shdrp[count])) - return FALSE; + return false; if (i_shdrp[count]->contents) { bfd_size_type amt = i_shdrp[count]->sh_size; if (bfd_seek (abfd, i_shdrp[count]->sh_offset, SEEK_SET) != 0 || bfd_bwrite (i_shdrp[count]->contents, amt, abfd) != amt) - return FALSE; + return false; } } @@ -6692,22 +6692,22 @@ _bfd_elf_write_object_contents (bfd *abfd) if (elf_shstrtab (abfd) != NULL && (bfd_seek (abfd, t->shstrtab_hdr.sh_offset, SEEK_SET) != 0 || !_bfd_elf_strtab_emit (abfd, elf_shstrtab (abfd)))) - return FALSE; + return false; if (!(*bed->elf_backend_final_write_processing) (abfd)) - return FALSE; + return false; if (!bed->s->write_shdrs_and_ehdr (abfd)) - return FALSE; + return false; /* This is last since write_shdrs_and_ehdr can touch i_shdrp[0]. */ if (t->o->build_id.after_write_object_contents != NULL) return (*t->o->build_id.after_write_object_contents) (abfd); - return TRUE; + return true; } -bfd_boolean +bool _bfd_elf_write_corefile_contents (bfd *abfd) { /* Hopefully this can be done just like an object file. */ @@ -6809,7 +6809,7 @@ _bfd_elf_symbol_from_bfd_symbol (bfd *abfd, asymbol **asym_ptr_ptr) /* Rewrite program header information. */ -static bfd_boolean +static bool rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) { Elf_Internal_Ehdr *iehdr; @@ -6820,8 +6820,8 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) asection *section; unsigned int i; unsigned int num_segments; - bfd_boolean phdr_included = FALSE; - bfd_boolean p_paddr_valid; + bool phdr_included = false; + bool p_paddr_valid; struct elf_segment_map *phdr_adjust_seg = NULL; unsigned int phdr_adjust_num = 0; const struct elf_backend_data *bed; @@ -6947,19 +6947,19 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) /* Initialise the segment mark field. */ for (section = ibfd->sections; section != NULL; section = section->next) - section->segment_mark = FALSE; + section->segment_mark = false; /* The Solaris linker creates program headers in which all the p_paddr fields are zero. When we try to objcopy or strip such a file, we get confused. Check for this case, and if we find it don't set the p_paddr_valid fields. */ - p_paddr_valid = FALSE; + p_paddr_valid = false; for (i = 0, segment = elf_tdata (ibfd)->phdr; i < num_segments; i++, segment++) if (segment->p_paddr != 0) { - p_paddr_valid = TRUE; + p_paddr_valid = true; break; } @@ -7081,7 +7081,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) amt += section_count * sizeof (asection *); map = (struct elf_segment_map *) bfd_zalloc (obfd, amt); if (map == NULL) - return FALSE; + return false; /* Initialise the fields of the segment map. Default to using the physical address of the segment in the input BFD. */ @@ -7125,7 +7125,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) + iehdr->e_phnum * iehdr->e_phentsize))); if (segment->p_type == PT_LOAD && map->includes_phdrs) - phdr_included = TRUE; + phdr_included = true; } if (section_count == 0) @@ -7184,7 +7184,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) amt = section_count * sizeof (asection *); sections = (asection **) bfd_malloc (amt); if (sections == NULL) - return FALSE; + return false; /* Step One: Scan for segment vs section LMA conflicts. Also add the sections to the section array allocated above. @@ -7392,7 +7392,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) ++isec; sections[j] = NULL; if (segment->p_type == PT_LOAD) - section->segment_mark = TRUE; + section->segment_mark = true; } else if (suggested_lma == NULL) suggested_lma = output_section; @@ -7419,7 +7419,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) if (map == NULL) { free (sections); - return FALSE; + return false; } /* Initialise the fields of the segment map. Set the physical @@ -7439,7 +7439,7 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) sorry: bfd_set_error (bfd_error_sorry); free (sections); - return FALSE; + return false; } while (isec < section_count); @@ -7483,12 +7483,12 @@ rewrite_elf_program_header (bfd *ibfd, bfd *obfd, bfd_vma maxpagesize) #undef INCLUDE_SECTION_IN_SEGMENT #undef SEGMENT_AFTER_SEGMENT #undef SEGMENT_OVERLAPS - return TRUE; + return true; } /* Copy ELF program header information. */ -static bfd_boolean +static bool copy_elf_program_header (bfd *ibfd, bfd *obfd) { Elf_Internal_Ehdr *iehdr; @@ -7498,8 +7498,8 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) Elf_Internal_Phdr *segment; unsigned int i; unsigned int num_segments; - bfd_boolean phdr_included = FALSE; - bfd_boolean p_paddr_valid; + bool phdr_included = false; + bool p_paddr_valid; unsigned int opb = bfd_octets_per_byte (ibfd, NULL); iehdr = elf_elfheader (ibfd); @@ -7509,14 +7509,14 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) /* If all the segment p_paddr fields are zero, don't set map->p_paddr_valid. */ - p_paddr_valid = FALSE; + p_paddr_valid = false; num_segments = elf_elfheader (ibfd)->e_phnum; for (i = 0, segment = elf_tdata (ibfd)->phdr; i < num_segments; i++, segment++) if (segment->p_paddr != 0) { - p_paddr_valid = TRUE; + p_paddr_valid = true; break; } @@ -7551,7 +7551,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) amt += section_count * sizeof (asection *); map = (struct elf_segment_map *) bfd_zalloc (obfd, amt); if (map == NULL) - return FALSE; + return false; /* Initialize the fields of the output segment map with the input segment. */ @@ -7593,7 +7593,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) + iehdr->e_phnum * iehdr->e_phentsize))); if (segment->p_type == PT_LOAD && map->includes_phdrs) - phdr_included = TRUE; + phdr_included = true; } lowest_section = NULL; @@ -7627,7 +7627,7 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) else seg_off = this_hdr->sh_addr - segment->p_vaddr; if (section->lma * opb - segment->p_paddr != seg_off) - map->p_paddr_valid = FALSE; + map->p_paddr_valid = false; } if (isec == section_count) break; @@ -7656,23 +7656,23 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) } elf_seg_map (obfd) = map_first; - return TRUE; + return true; } /* Copy private BFD data. This copies or rewrites ELF program header information. */ -static bfd_boolean +static bool copy_private_bfd_data (bfd *ibfd, bfd *obfd) { bfd_vma maxpagesize; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (elf_tdata (ibfd)->phdr == NULL) - return TRUE; + return true; if (ibfd->xvec == obfd->xvec) { @@ -7693,7 +7693,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd) /* Initialize the segment mark field. */ for (section = obfd->sections; section != NULL; section = section->next) - section->segment_mark = FALSE; + section->segment_mark = false; num_segments = elf_elfheader (ibfd)->e_phnum; for (i = 0, segment = elf_tdata (ibfd)->phdr; @@ -7716,7 +7716,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd) from the input BFD. */ osec = section->output_section; if (osec) - osec->segment_mark = TRUE; + osec->segment_mark = true; /* Check if this section is covered by the segment. */ this_hdr = &(elf_section_data(section)->this_hdr); @@ -7744,7 +7744,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd) if (!section->segment_mark) goto rewrite; else - section->segment_mark = FALSE; + section->segment_mark = false; } return copy_elf_program_header (ibfd, obfd); @@ -7784,7 +7784,7 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd) /* Initialize private output section information from input section. */ -bfd_boolean +bool _bfd_elf_init_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, @@ -7793,12 +7793,12 @@ _bfd_elf_init_private_section_data (bfd *ibfd, { Elf_Internal_Shdr *ihdr, *ohdr; - bfd_boolean final_link = (link_info != NULL - && !bfd_link_relocatable (link_info)); + bool final_link = (link_info != NULL + && !bfd_link_relocatable (link_info)); if (ibfd->xvec->flavour != bfd_target_elf_flavour || obfd->xvec->flavour != bfd_target_elf_flavour) - return TRUE; + return true; BFD_ASSERT (elf_section_data (osec) != NULL); @@ -7866,13 +7866,13 @@ _bfd_elf_init_private_section_data (bfd *ibfd, osec->use_rela_p = isec->use_rela_p; - return TRUE; + return true; } /* Copy private section information. This copies over the entsize field, and sometimes the info field. */ -bfd_boolean +bool _bfd_elf_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, @@ -7882,7 +7882,7 @@ _bfd_elf_copy_private_section_data (bfd *ibfd, if (ibfd->xvec->flavour != bfd_target_elf_flavour || obfd->xvec->flavour != bfd_target_elf_flavour) - return TRUE; + return true; ihdr = &elf_section_data (isec)->this_hdr; ohdr = &elf_section_data (osec)->this_hdr; @@ -7906,7 +7906,7 @@ _bfd_elf_copy_private_section_data (bfd *ibfd, function is called from objcopy, bfd_abs_section_ptr when called from the linker. */ -bfd_boolean +bool _bfd_elf_fixup_group_sections (bfd *ibfd, asection *discarded) { asection *isec; @@ -7991,17 +7991,17 @@ _bfd_elf_fixup_group_sections (bfd *ibfd, asection *discarded) } } - return TRUE; + return true; } /* Copy private header information. */ -bfd_boolean +bool _bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd) { if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; /* Copy over private BFD data if it has not already been copied. This must be done here, rather than in the copy_private_bfd_data @@ -8011,7 +8011,7 @@ _bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd) if (elf_seg_map (obfd) == NULL && elf_tdata (ibfd)->phdr != NULL) { if (! copy_private_bfd_data (ibfd, obfd)) - return FALSE; + return false; } return _bfd_elf_fixup_group_sections (ibfd, NULL); @@ -8029,7 +8029,7 @@ _bfd_elf_copy_private_header_data (bfd *ibfd, bfd *obfd) #define MAP_SHSTRTAB (SHN_HIOS + 4) #define MAP_SYM_SHNDX (SHN_HIOS + 5) -bfd_boolean +bool _bfd_elf_copy_private_symbol_data (bfd *ibfd, asymbol *isymarg, bfd *obfd, @@ -8039,7 +8039,7 @@ _bfd_elf_copy_private_symbol_data (bfd *ibfd, if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; isym = elf_symbol_from (isymarg); osym = elf_symbol_from (osymarg); @@ -8065,12 +8065,12 @@ _bfd_elf_copy_private_symbol_data (bfd *ibfd, osym->internal_elf_sym.st_shndx = shndx; } - return TRUE; + return true; } /* Swap out the symbols. */ -static bfd_boolean +static bool swap_out_syms (bfd *abfd, struct elf_strtab_hash **sttp, int relocatable_p, @@ -8091,15 +8091,15 @@ swap_out_syms (bfd *abfd, unsigned int idx; unsigned int num_locals; size_t amt; - bfd_boolean name_local_sections; + bool name_local_sections; if (!elf_map_symbols (abfd, &num_locals)) - return FALSE; + return false; /* Dump out the symtabs. */ stt = _bfd_elf_strtab_init (); if (stt == NULL) - return FALSE; + return false; bed = get_elf_backend_data (abfd); symcount = bfd_get_symcount (abfd); @@ -8119,7 +8119,7 @@ swap_out_syms (bfd *abfd, { bfd_set_error (bfd_error_no_memory); _bfd_elf_strtab_free (stt); - return FALSE; + return false; } if (_bfd_mul_overflow (symcount + 1, bed->s->sizeof_sym, &amt) @@ -8130,7 +8130,7 @@ swap_out_syms (bfd *abfd, error_return: free (symstrtab); _bfd_elf_strtab_free (stt); - return FALSE; + return false; } symtab_hdr->contents = outbound_syms; outbound_syms_index = 0; @@ -8203,7 +8203,7 @@ swap_out_syms (bfd *abfd, to get the final offset for st_name. */ sym.st_name = (unsigned long) _bfd_elf_strtab_add (stt, syms[idx]->name, - FALSE); + false); if (sym.st_name == (unsigned long) -1) goto error_return; } @@ -8452,7 +8452,7 @@ Unable to handle section index %x in ELF symbol. Using ABS instead."), symstrtab_hdr->sh_info = 0; symstrtab_hdr->sh_addralign = 1; - return TRUE; + return true; } /* Return the number of bytes required to hold the symtab vector. @@ -8567,7 +8567,7 @@ _bfd_elf_canonicalize_reloc (bfd *abfd, unsigned int i; const struct elf_backend_data *bed = get_elf_backend_data (abfd); - if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE)) + if (! bed->s->slurp_reloc_table (abfd, section, symbols, false)) return -1; tblptr = section->relocation; @@ -8583,7 +8583,7 @@ long _bfd_elf_canonicalize_symtab (bfd *abfd, asymbol **allocation) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); - long symcount = bed->s->slurp_symbol_table (abfd, allocation, FALSE); + long symcount = bed->s->slurp_symbol_table (abfd, allocation, false); if (symcount >= 0) abfd->symcount = symcount; @@ -8595,7 +8595,7 @@ _bfd_elf_canonicalize_dynamic_symtab (bfd *abfd, asymbol **allocation) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); - long symcount = bed->s->slurp_symbol_table (abfd, allocation, TRUE); + long symcount = bed->s->slurp_symbol_table (abfd, allocation, true); if (symcount >= 0) abfd->dynsymcount = symcount; @@ -8665,7 +8665,7 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd, arelent **storage, asymbol **syms) { - bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_relocs) (bfd *, asection *, asymbol **, bool); asection *s; long ret; @@ -8686,7 +8686,7 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd, arelent *p; long count, i; - if (! (*slurp_relocs) (abfd, s, syms, TRUE)) + if (! (*slurp_relocs) (abfd, s, syms, true)) return -1; count = s->size / elf_section_data (s)->this_hdr.sh_entsize; p = s->relocation; @@ -8703,8 +8703,8 @@ _bfd_elf_canonicalize_dynamic_reloc (bfd *abfd, /* Read in the version information. */ -bfd_boolean -_bfd_elf_slurp_version_tables (bfd *abfd, bfd_boolean default_imported_symver) +bool +_bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) { bfd_byte *contents = NULL; unsigned int freeidx = 0; @@ -9054,11 +9054,11 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bfd_boolean default_imported_symver) iverdaux->vda_nodename = iverdef->vd_nodename; } - return TRUE; + return true; error_return: free (contents); - return FALSE; + return false; } asymbol * @@ -9085,18 +9085,18 @@ _bfd_elf_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, use this function for the is_local_label_name entry point, but some override it. */ -bfd_boolean +bool _bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { /* Normal local symbols start with ``.L''. */ if (name[0] == '.' && name[1] == 'L') - return TRUE; + return true; /* At least some SVR4 compilers (e.g., UnixWare 2.1 cc) generate DWARF debugging symbols starting with ``..''. */ if (name[0] == '.' && name[1] == '.') - return TRUE; + return true; /* gcc will sometimes generate symbols beginning with ``_.L_'' when emitting DWARF debugging output. I suspect this is actually a @@ -9105,7 +9105,7 @@ _bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, underscore to be emitted on some ELF targets). For ease of use, we treat such symbols as local. */ if (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_') - return TRUE; + return true; /* Treat assembler generated fake symbols, dollar local labels and forward-backward labels (aka local labels) as locals. @@ -9119,7 +9119,7 @@ _bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, so we only need to match the rest. */ if (name[0] == 'L' && ISDIGIT (name[1])) { - bfd_boolean ret = FALSE; + bool ret = false; const char * p; char c; @@ -9129,26 +9129,26 @@ _bfd_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, { if (c == 1 && p == name + 2) /* A fake symbol. */ - return TRUE; + return true; /* FIXME: We are being paranoid here and treating symbols like L0^Bfoo as if there were non-local, on the grounds that the assembler will never generate them. But can any symbol containing an ASCII value in the range 1-31 ever be anything other than some kind of local ? */ - ret = TRUE; + ret = true; } if (! ISDIGIT (c)) { - ret = FALSE; + ret = false; break; } } return ret; } - return FALSE; + return false; } alent * @@ -9159,7 +9159,7 @@ _bfd_elf_get_lineno (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -bfd_boolean +bool _bfd_elf_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long machine) @@ -9169,7 +9169,7 @@ _bfd_elf_set_arch_mach (bfd *abfd, if (arch != get_elf_backend_data (abfd)->arch && arch != bfd_arch_unknown && get_elf_backend_data (abfd)->arch != bfd_arch_unknown) - return FALSE; + return false; return bfd_default_set_arch_mach (abfd, arch, machine); } @@ -9177,7 +9177,7 @@ _bfd_elf_set_arch_mach (bfd *abfd, /* Find the nearest line to a particular section and offset, for error reporting. */ -bfd_boolean +bool _bfd_elf_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, @@ -9187,14 +9187,14 @@ _bfd_elf_find_nearest_line (bfd *abfd, unsigned int *line_ptr, unsigned int *discriminator_ptr) { - bfd_boolean found; + bool found; if (_bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, filename_ptr, functionname_ptr, line_ptr, discriminator_ptr, dwarf_debug_sections, &elf_tdata (abfd)->dwarf2_find_line_info)) - return TRUE; + return true; if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset, filename_ptr, functionname_ptr, line_ptr)) @@ -9203,31 +9203,31 @@ _bfd_elf_find_nearest_line (bfd *abfd, _bfd_elf_find_function (abfd, symbols, section, offset, *filename_ptr ? NULL : filename_ptr, functionname_ptr); - return TRUE; + return true; } if (! _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, &found, filename_ptr, functionname_ptr, line_ptr, &elf_tdata (abfd)->line_info)) - return FALSE; + return false; if (found && (*functionname_ptr || *line_ptr)) - return TRUE; + return true; if (symbols == NULL) - return FALSE; + return false; if (! _bfd_elf_find_function (abfd, symbols, section, offset, filename_ptr, functionname_ptr)) - return FALSE; + return false; *line_ptr = 0; - return TRUE; + return true; } /* Find the line for a symbol. */ -bfd_boolean +bool _bfd_elf_find_line (bfd *abfd, asymbol **symbols, asymbol *symbol, const char **filename_ptr, unsigned int *line_ptr) { @@ -9243,13 +9243,13 @@ _bfd_elf_find_line (bfd *abfd, asymbol **symbols, asymbol *symbol, passed to bfd_find_nearest_line. Currently this is only supported for DWARF2 with appropriate DWARF3 extensions. */ -bfd_boolean +bool _bfd_elf_find_inliner_info (bfd *abfd, const char **filename_ptr, const char **functionname_ptr, unsigned int *line_ptr) { - bfd_boolean found; + bool found; found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr, functionname_ptr, line_ptr, & elf_tdata (abfd)->dwarf2_find_line_info); @@ -9285,7 +9285,7 @@ _bfd_elf_sizeof_headers (bfd *abfd, struct bfd_link_info *info) return ret; } -bfd_boolean +bool _bfd_elf_set_section_contents (bfd *abfd, sec_ptr section, const void *location, @@ -9297,10 +9297,10 @@ _bfd_elf_set_section_contents (bfd *abfd, if (! abfd->output_has_begun && ! _bfd_elf_compute_section_file_positions (abfd, NULL)) - return FALSE; + return false; if (!count) - return TRUE; + return true; hdr = &elf_section_data (section)->this_hdr; if (hdr->sh_offset == (file_ptr) -1) @@ -9310,7 +9310,7 @@ _bfd_elf_set_section_contents (bfd *abfd, if (bfd_section_is_ctf (section)) /* Nothing to do with this section: the contents are generated later. */ - return TRUE; + return true; if ((section->flags & SEC_ELF_COMPRESS) == 0) { @@ -9318,7 +9318,7 @@ _bfd_elf_set_section_contents (bfd *abfd, (_("%pB:%pA: error: attempting to write into an unallocated compressed section"), abfd, section); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if ((offset + count) > hdr->sh_size) @@ -9328,7 +9328,7 @@ _bfd_elf_set_section_contents (bfd *abfd, abfd, section); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } contents = hdr->contents; @@ -9339,33 +9339,33 @@ _bfd_elf_set_section_contents (bfd *abfd, abfd, section); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } memcpy (contents + offset, location, count); - return TRUE; + return true; } pos = hdr->sh_offset + offset; if (bfd_seek (abfd, pos, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; - return TRUE; + return true; } -bfd_boolean +bool _bfd_elf_no_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr ATTRIBUTE_UNUSED, Elf_Internal_Rela *dst ATTRIBUTE_UNUSED) { abort (); - return FALSE; + return false; } /* Try to convert a non-ELF reloc into an ELF one. */ -bfd_boolean +bool _bfd_elf_validate_reloc (bfd *abfd, arelent *areloc) { /* Check whether we really have an ELF howto. */ @@ -9449,17 +9449,17 @@ _bfd_elf_validate_reloc (bfd *abfd, arelent *areloc) goto fail; } - return TRUE; + return true; fail: /* xgettext:c-format */ _bfd_error_handler (_("%pB: %s unsupported"), abfd, areloc->howto->name); bfd_set_error (bfd_error_sorry); - return FALSE; + return false; } -bfd_boolean +bool _bfd_elf_close_and_cleanup (bfd *abfd) { struct elf_obj_tdata *tdata = elf_tdata (abfd); @@ -9519,22 +9519,22 @@ elfcore_make_pid (bfd *abfd) reference to NAME, so you shouldn't deallocate or overwrite it. */ -static bfd_boolean +static bool elfcore_maybe_make_sect (bfd *abfd, char *name, asection *sect) { asection *sect2; if (bfd_get_section_by_name (abfd, name) != NULL) - return TRUE; + return true; sect2 = bfd_make_section_with_flags (abfd, name, sect->flags); if (sect2 == NULL) - return FALSE; + return false; sect2->size = sect->size; sect2->filepos = sect->filepos; sect2->alignment_power = sect->alignment_power; - return TRUE; + return true; } /* Create a pseudosection containing SIZE bytes at FILEPOS. This @@ -9544,7 +9544,7 @@ elfcore_maybe_make_sect (bfd *abfd, char *name, asection *sect) - For the multi-threaded case, a section named "NAME/PID", where PID is elfcore_make_pid (abfd). Both pseudosections have identical contents. */ -bfd_boolean +bool _bfd_elfcore_make_pseudosection (bfd *abfd, char *name, size_t size, @@ -9561,13 +9561,13 @@ _bfd_elfcore_make_pseudosection (bfd *abfd, len = strlen (buf) + 1; threaded_name = (char *) bfd_alloc (abfd, len); if (threaded_name == NULL) - return FALSE; + return false; memcpy (threaded_name, buf, len); sect = bfd_make_section_anyway_with_flags (abfd, threaded_name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; sect->size = size; sect->filepos = filepos; sect->alignment_power = 2; @@ -9575,7 +9575,7 @@ _bfd_elfcore_make_pseudosection (bfd *abfd, return elfcore_maybe_make_sect (abfd, name, sect); } -static bfd_boolean +static bool elfcore_make_auxv_note_section (bfd *abfd, Elf_Internal_Note *note, size_t offs) { @@ -9583,13 +9583,13 @@ elfcore_make_auxv_note_section (bfd *abfd, Elf_Internal_Note *note, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; sect->size = note->descsz - offs; sect->filepos = note->descpos + offs; sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32; - return TRUE; + return true; } /* prstatus_t exists on: @@ -9600,7 +9600,7 @@ elfcore_make_auxv_note_section (bfd *abfd, Elf_Internal_Note *note, #if defined (HAVE_PRSTATUS_T) -static bfd_boolean +static bool elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { size_t size; @@ -9667,7 +9667,7 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { /* Fail - we don't know how to handle any other note size (ie. data object type). */ - return TRUE; + return true; } /* Make a ".reg/999" section and a ".reg" section. */ @@ -9677,7 +9677,7 @@ elfcore_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) #endif /* defined (HAVE_PRSTATUS_T) */ /* Create a pseudosection containing the exact contents of NOTE. */ -static bfd_boolean +static bool elfcore_make_note_pseudosection (bfd *abfd, char *name, Elf_Internal_Note *note) @@ -9690,7 +9690,7 @@ elfcore_make_note_pseudosection (bfd *abfd, but it doesn't matter, because we don't have to pick this data structure apart. */ -static bfd_boolean +static bool elfcore_grok_prfpreg (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg2", note); @@ -9700,7 +9700,7 @@ elfcore_grok_prfpreg (bfd *abfd, Elf_Internal_Note *note) type of NT_PRXFPREG. Just include the whole note's contents literally. */ -static bfd_boolean +static bool elfcore_grok_prxfpreg (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-xfp", note); @@ -9710,217 +9710,217 @@ elfcore_grok_prxfpreg (bfd *abfd, Elf_Internal_Note *note) with a note type of NT_X86_XSTATE. Just include the whole note's contents literally. */ -static bfd_boolean +static bool elfcore_grok_xstatereg (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-xstate", note); } -static bfd_boolean +static bool elfcore_grok_ppc_vmx (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vmx", note); } -static bfd_boolean +static bool elfcore_grok_ppc_vsx (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-vsx", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tar (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tar", note); } -static bfd_boolean +static bool elfcore_grok_ppc_ppr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-ppr", note); } -static bfd_boolean +static bool elfcore_grok_ppc_dscr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-dscr", note); } -static bfd_boolean +static bool elfcore_grok_ppc_ebb (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-ebb", note); } -static bfd_boolean +static bool elfcore_grok_ppc_pmu (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-pmu", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_cgpr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cgpr", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_cfpr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cfpr", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_cvmx (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cvmx", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_cvsx (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cvsx", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_spr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-spr", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_ctar (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-ctar", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_cppr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cppr", note); } -static bfd_boolean +static bool elfcore_grok_ppc_tm_cdscr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-ppc-tm-cdscr", note); } -static bfd_boolean +static bool elfcore_grok_s390_high_gprs (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-high-gprs", note); } -static bfd_boolean +static bool elfcore_grok_s390_timer (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-timer", note); } -static bfd_boolean +static bool elfcore_grok_s390_todcmp (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-todcmp", note); } -static bfd_boolean +static bool elfcore_grok_s390_todpreg (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-todpreg", note); } -static bfd_boolean +static bool elfcore_grok_s390_ctrs (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-ctrs", note); } -static bfd_boolean +static bool elfcore_grok_s390_prefix (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-prefix", note); } -static bfd_boolean +static bool elfcore_grok_s390_last_break (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-last-break", note); } -static bfd_boolean +static bool elfcore_grok_s390_system_call (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-system-call", note); } -static bfd_boolean +static bool elfcore_grok_s390_tdb (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-tdb", note); } -static bfd_boolean +static bool elfcore_grok_s390_vxrs_low (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-vxrs-low", note); } -static bfd_boolean +static bool elfcore_grok_s390_vxrs_high (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-vxrs-high", note); } -static bfd_boolean +static bool elfcore_grok_s390_gs_cb (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-gs-cb", note); } -static bfd_boolean +static bool elfcore_grok_s390_gs_bc (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-s390-gs-bc", note); } -static bfd_boolean +static bool elfcore_grok_arm_vfp (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-arm-vfp", note); } -static bfd_boolean +static bool elfcore_grok_aarch_tls (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-aarch-tls", note); } -static bfd_boolean +static bool elfcore_grok_aarch_hw_break (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-break", note); } -static bfd_boolean +static bool elfcore_grok_aarch_hw_watch (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-aarch-hw-watch", note); } -static bfd_boolean +static bool elfcore_grok_aarch_sve (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-aarch-sve", note); } -static bfd_boolean +static bool elfcore_grok_aarch_pauth (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-aarch-pauth", note); } -static bfd_boolean +static bool elfcore_grok_arc_v2 (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-arc-v2", note); @@ -9929,7 +9929,7 @@ elfcore_grok_arc_v2 (bfd *abfd, Elf_Internal_Note *note) /* Convert NOTE into a bfd_section called ".reg-riscv-csr". Return TRUE if successful otherwise, return FALSE. */ -static bfd_boolean +static bool elfcore_grok_riscv_csr (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".reg-riscv-csr", note); @@ -9938,7 +9938,7 @@ elfcore_grok_riscv_csr (bfd *abfd, Elf_Internal_Note *note) /* Convert NOTE into a bfd_section called ".gdb-tdesc". Return TRUE if successful otherwise, return FALSE. */ -static bfd_boolean +static bool elfcore_grok_gdb_tdesc (bfd *abfd, Elf_Internal_Note *note) { return elfcore_make_note_pseudosection (abfd, ".gdb-tdesc", note); @@ -9985,7 +9985,7 @@ _bfd_elfcore_strndup (bfd *abfd, char *start, size_t max) } #if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) -static bfd_boolean +static bool elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz == sizeof (elfcore_psinfo_t)) @@ -10030,7 +10030,7 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { /* Fail - we don't know how to handle any other note size (ie. data object type). */ - return TRUE; + return true; } /* Note that for some reason, a spurious space is tacked @@ -10045,12 +10045,12 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } #endif /* defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) */ #if defined (HAVE_PSTATUS_T) -static bfd_boolean +static bool elfcore_grok_pstatus (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz == sizeof (pstatus_t) @@ -10080,12 +10080,12 @@ elfcore_grok_pstatus (bfd *abfd, Elf_Internal_Note *note) lwpstatus_t in pstat.pr_lwp, but we'll catch it all in an NT_LWPSTATUS note, presumably. */ - return TRUE; + return true; } #endif /* defined (HAVE_PSTATUS_T) */ #if defined (HAVE_LWPSTATUS_T) -static bfd_boolean +static bool elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) { lwpstatus_t lwpstat; @@ -10099,7 +10099,7 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) && note->descsz != sizeof (lwpxstatus_t) #endif ) - return TRUE; + return true; memcpy (&lwpstat, note->descdata, sizeof (lwpstat)); @@ -10115,12 +10115,12 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) len = strlen (buf) + 1; name = bfd_alloc (abfd, len); if (name == NULL) - return FALSE; + return false; memcpy (name, buf, len); sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; #if defined (HAVE_LWPSTATUS_T_PR_CONTEXT) sect->size = sizeof (lwpstat.pr_context.uc_mcontext.gregs); @@ -10136,7 +10136,7 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) sect->alignment_power = 2; if (!elfcore_maybe_make_sect (abfd, ".reg", sect)) - return FALSE; + return false; /* Make a ".reg2/999" section */ @@ -10144,12 +10144,12 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) len = strlen (buf) + 1; name = bfd_alloc (abfd, len); if (name == NULL) - return FALSE; + return false; memcpy (name, buf, len); sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; #if defined (HAVE_LWPSTATUS_T_PR_CONTEXT) sect->size = sizeof (lwpstat.pr_context.uc_mcontext.fpregs); @@ -10175,7 +10175,7 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) #define NOTE_INFO_MODULE 3 #define NOTE_INFO_MODULE64 4 -static bfd_boolean +static bool elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) { char buf[30]; @@ -10188,10 +10188,10 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) bfd_vma base_addr; if (note->descsz < 4) - return TRUE; + return true; if (! startswith (note->namedata, "win32")) - return TRUE; + return true; type = bfd_get_32 (abfd, note->descdata); @@ -10208,13 +10208,13 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) }; if (type == 0 || type > (sizeof(size_check)/sizeof(size_check[0]))) - return TRUE; + return true; if (note->descsz < size_check[type - 1].min_size) { _bfd_error_handler (_("%pB: warning: win32pstatus %s of size %lu bytes is too small"), abfd, size_check[type - 1].type_name, note->descsz); - return TRUE; + return true; } switch (type) @@ -10234,13 +10234,13 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) len = strlen (buf) + 1; name = (char *) bfd_alloc (abfd, len); if (name == NULL) - return FALSE; + return false; memcpy (name, buf, len); sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; /* sizeof (thread_info.thread_context) */ sect->size = note->descsz - 12; @@ -10253,7 +10253,7 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) if (is_active_thread) if (! elfcore_maybe_make_sect (abfd, ".reg", sect)) - return FALSE; + return false; break; case NOTE_INFO_MODULE: @@ -10279,20 +10279,20 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) len = strlen (buf) + 1; name = (char *) bfd_alloc (abfd, len); if (name == NULL) - return FALSE; + return false; memcpy (name, buf, len); sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; if (note->descsz < 12 + name_size) { _bfd_error_handler (_("%pB: win32pstatus NOTE_INFO_MODULE of size %lu is too small to contain a name of size %u"), abfd, note->descsz, name_size); - return TRUE; + return true; } sect->size = note->descsz; @@ -10301,13 +10301,13 @@ elfcore_grok_win32pstatus (bfd *abfd, Elf_Internal_Note *note) break; default: - return TRUE; + return true; } - return TRUE; + return true; } -static bfd_boolean +static bool elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -10315,16 +10315,16 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) switch (note->type) { default: - return TRUE; + return true; case NT_PRSTATUS: if (bed->elf_backend_grok_prstatus) if ((*bed->elf_backend_grok_prstatus) (abfd, note)) - return TRUE; + return true; #if defined (HAVE_PRSTATUS_T) return elfcore_grok_prstatus (abfd, note); #else - return TRUE; + return true; #endif #if defined (HAVE_PSTATUS_T) @@ -10348,283 +10348,283 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_prxfpreg (abfd, note); else - return TRUE; + return true; case NT_X86_XSTATE: /* Linux XSAVE extension */ if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_xstatereg (abfd, note); else - return TRUE; + return true; case NT_PPC_VMX: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_vmx (abfd, note); else - return TRUE; + return true; case NT_PPC_VSX: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_vsx (abfd, note); else - return TRUE; + return true; case NT_PPC_TAR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tar (abfd, note); else - return TRUE; + return true; case NT_PPC_PPR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_ppr (abfd, note); else - return TRUE; + return true; case NT_PPC_DSCR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_dscr (abfd, note); else - return TRUE; + return true; case NT_PPC_EBB: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_ebb (abfd, note); else - return TRUE; + return true; case NT_PPC_PMU: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_pmu (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_CGPR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_cgpr (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_CFPR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_cfpr (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_CVMX: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_cvmx (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_CVSX: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_cvsx (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_SPR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_spr (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_CTAR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_ctar (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_CPPR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_cppr (abfd, note); else - return TRUE; + return true; case NT_PPC_TM_CDSCR: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_ppc_tm_cdscr (abfd, note); else - return TRUE; + return true; case NT_S390_HIGH_GPRS: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_high_gprs (abfd, note); else - return TRUE; + return true; case NT_S390_TIMER: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_timer (abfd, note); else - return TRUE; + return true; case NT_S390_TODCMP: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_todcmp (abfd, note); else - return TRUE; + return true; case NT_S390_TODPREG: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_todpreg (abfd, note); else - return TRUE; + return true; case NT_S390_CTRS: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_ctrs (abfd, note); else - return TRUE; + return true; case NT_S390_PREFIX: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_prefix (abfd, note); else - return TRUE; + return true; case NT_S390_LAST_BREAK: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_last_break (abfd, note); else - return TRUE; + return true; case NT_S390_SYSTEM_CALL: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_system_call (abfd, note); else - return TRUE; + return true; case NT_S390_TDB: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_tdb (abfd, note); else - return TRUE; + return true; case NT_S390_VXRS_LOW: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_vxrs_low (abfd, note); else - return TRUE; + return true; case NT_S390_VXRS_HIGH: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_vxrs_high (abfd, note); else - return TRUE; + return true; case NT_S390_GS_CB: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_gs_cb (abfd, note); else - return TRUE; + return true; case NT_S390_GS_BC: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_s390_gs_bc (abfd, note); else - return TRUE; + return true; case NT_ARC_V2: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_arc_v2 (abfd, note); else - return TRUE; + return true; case NT_ARM_VFP: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_arm_vfp (abfd, note); else - return TRUE; + return true; case NT_ARM_TLS: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_aarch_tls (abfd, note); else - return TRUE; + return true; case NT_ARM_HW_BREAK: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_aarch_hw_break (abfd, note); else - return TRUE; + return true; case NT_ARM_HW_WATCH: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_aarch_hw_watch (abfd, note); else - return TRUE; + return true; case NT_ARM_SVE: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_aarch_sve (abfd, note); else - return TRUE; + return true; case NT_ARM_PAC_MASK: if (note->namesz == 6 && strcmp (note->namedata, "LINUX") == 0) return elfcore_grok_aarch_pauth (abfd, note); else - return TRUE; + return true; case NT_GDB_TDESC: if (note->namesz == 4 && strcmp (note->namedata, "GDB") == 0) return elfcore_grok_gdb_tdesc (abfd, note); else - return TRUE; + return true; case NT_RISCV_CSR: if (note->namesz == 4 && strcmp (note->namedata, "GDB") == 0) return elfcore_grok_riscv_csr (abfd, note); else - return TRUE; + return true; case NT_PRPSINFO: case NT_PSINFO: if (bed->elf_backend_grok_psinfo) if ((*bed->elf_backend_grok_psinfo) (abfd, note)) - return TRUE; + return true; #if defined (HAVE_PRPSINFO_T) || defined (HAVE_PSINFO_T) return elfcore_grok_psinfo (abfd, note); #else - return TRUE; + return true; #endif case NT_AUXV: @@ -10641,32 +10641,32 @@ elfcore_grok_note (bfd *abfd, Elf_Internal_Note *note) } } -static bfd_boolean +static bool elfobj_grok_gnu_build_id (bfd *abfd, Elf_Internal_Note *note) { struct bfd_build_id* build_id; if (note->descsz == 0) - return FALSE; + return false; build_id = bfd_alloc (abfd, sizeof (struct bfd_build_id) - 1 + note->descsz); if (build_id == NULL) - return FALSE; + return false; build_id->size = note->descsz; memcpy (build_id->data, note->descdata, note->descsz); abfd->build_id = build_id; - return TRUE; + return true; } -static bfd_boolean +static bool elfobj_grok_gnu_note (bfd *abfd, Elf_Internal_Note *note) { switch (note->type) { default: - return TRUE; + return true; case NT_GNU_PROPERTY_TYPE_0: return _bfd_elf_parse_gnu_properties (abfd, note); @@ -10676,7 +10676,7 @@ elfobj_grok_gnu_note (bfd *abfd, Elf_Internal_Note *note) } } -static bfd_boolean +static bool elfobj_grok_stapsdt_note_1 (bfd *abfd, Elf_Internal_Note *note) { struct sdt_note *cur = @@ -10689,10 +10689,10 @@ elfobj_grok_stapsdt_note_1 (bfd *abfd, Elf_Internal_Note *note) elf_tdata (abfd)->sdt_note_head = cur; - return TRUE; + return true; } -static bfd_boolean +static bool elfobj_grok_stapsdt_note (bfd *abfd, Elf_Internal_Note *note) { switch (note->type) @@ -10701,11 +10701,11 @@ elfobj_grok_stapsdt_note (bfd *abfd, Elf_Internal_Note *note) return elfobj_grok_stapsdt_note_1 (abfd, note); default: - return TRUE; + return true; } } -static bfd_boolean +static bool elfcore_grok_freebsd_psinfo (bfd *abfd, Elf_Internal_Note *note) { size_t offset; @@ -10714,21 +10714,21 @@ elfcore_grok_freebsd_psinfo (bfd *abfd, Elf_Internal_Note *note) { case ELFCLASS32: if (note->descsz < 108) - return FALSE; + return false; break; case ELFCLASS64: if (note->descsz < 120) - return FALSE; + return false; break; default: - return FALSE; + return false; } /* Check for version 1 in pr_version. */ if (bfd_h_get_32 (abfd, (bfd_byte *) note->descdata) != 1) - return FALSE; + return false; offset = 4; @@ -10756,15 +10756,15 @@ elfcore_grok_freebsd_psinfo (bfd *abfd, Elf_Internal_Note *note) /* The pr_pid field was added in version "1a". */ if (note->descsz < offset + 4) - return TRUE; + return true; elf_tdata (abfd)->core->pid = bfd_h_get_32 (abfd, (bfd_byte *) note->descdata + offset); - return TRUE; + return true; } -static bfd_boolean +static bool elfcore_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note) { size_t offset; @@ -10786,15 +10786,15 @@ elfcore_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note) break; default: - return FALSE; + return false; } if (note->descsz < min_size) - return FALSE; + return false; /* Check for version 1 in pr_version. */ if (bfd_h_get_32 (abfd, (bfd_byte *) note->descdata) != 1) - return FALSE; + return false; /* Extract size of pr_reg from pr_gregsetsz. */ /* Skip over pr_gregsetsz and pr_fpregsetsz. */ @@ -10829,14 +10829,14 @@ elfcore_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note) /* Make sure that there is enough data remaining in the note. */ if ((note->descsz - offset) < size) - return FALSE; + return false; /* Make a ".reg/999" section and a ".reg" section. */ return _bfd_elfcore_make_pseudosection (abfd, ".reg", size, note->descpos + offset); } -static bfd_boolean +static bool elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -10846,7 +10846,7 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) case NT_PRSTATUS: if (bed->elf_backend_grok_freebsd_prstatus) if ((*bed->elf_backend_grok_freebsd_prstatus) (abfd, note)) - return TRUE; + return true; return elfcore_grok_freebsd_prstatus (abfd, note); case NT_FPREGSET: @@ -10859,7 +10859,7 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) if (note->namesz == 8) return elfcore_make_note_pseudosection (abfd, ".thrmisc", note); else - return TRUE; + return true; case NT_FREEBSD_PROCSTAT_PROC: return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.proc", @@ -10880,7 +10880,7 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) if (note->namesz == 8) return elfcore_grok_xstatereg (abfd, note); else - return TRUE; + return true; case NT_FREEBSD_PTLWPINFO: return elfcore_make_note_pseudosection (abfd, ".note.freebsdcore.lwpinfo", @@ -10890,11 +10890,11 @@ elfcore_grok_freebsd_note (bfd *abfd, Elf_Internal_Note *note) return elfcore_grok_arm_vfp (abfd, note); default: - return TRUE; + return true; } } -static bfd_boolean +static bool elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp) { char *cp; @@ -10903,16 +10903,16 @@ elfcore_netbsd_get_lwpid (Elf_Internal_Note *note, int *lwpidp) if (cp != NULL) { *lwpidp = atoi(cp + 1); - return TRUE; + return true; } - return FALSE; + return false; } -static bfd_boolean +static bool elfcore_grok_netbsd_procinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz <= 0x7c + 31) - return FALSE; + return false; /* Signal number at offset 0x08. */ elf_tdata (abfd)->core->signal @@ -10930,7 +10930,7 @@ elfcore_grok_netbsd_procinfo (bfd *abfd, Elf_Internal_Note *note) note); } -static bfd_boolean +static bool elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) { int lwp; @@ -10967,7 +10967,7 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) understand it. */ if (note->type < NT_NETBSDCORE_FIRSTMACH) - return TRUE; + return true; switch (bfd_get_arch (abfd)) @@ -10987,7 +10987,7 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) return elfcore_make_note_pseudosection (abfd, ".reg2", note); default: - return TRUE; + return true; } /* On SuperH, PT_GETREGS == mach+3 and PT_GETFPREGS == mach+5. @@ -11004,7 +11004,7 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) return elfcore_make_note_pseudosection (abfd, ".reg2", note); default: - return TRUE; + return true; } /* On all other arch's, PT_GETREGS == mach+1 and @@ -11020,17 +11020,17 @@ elfcore_grok_netbsd_note (bfd *abfd, Elf_Internal_Note *note) return elfcore_make_note_pseudosection (abfd, ".reg2", note); default: - return TRUE; + return true; } } /* NOTREACHED */ } -static bfd_boolean +static bool elfcore_grok_openbsd_procinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz <= 0x48 + 31) - return FALSE; + return false; /* Signal number at offset 0x08. */ elf_tdata (abfd)->core->signal @@ -11044,10 +11044,10 @@ elfcore_grok_openbsd_procinfo (bfd *abfd, Elf_Internal_Note *note) elf_tdata (abfd)->core->command = _bfd_elfcore_strndup (abfd, note->descdata + 0x48, 31); - return TRUE; + return true; } -static bfd_boolean +static bool elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note) { if (note->type == NT_OPENBSD_PROCINFO) @@ -11071,18 +11071,18 @@ elfcore_grok_openbsd_note (bfd *abfd, Elf_Internal_Note *note) SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; sect->size = note->descsz; sect->filepos = note->descpos; sect->alignment_power = 1 + bfd_get_arch_size (abfd) / 32; - return TRUE; + return true; } - return TRUE; + return true; } -static bfd_boolean +static bool elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid) { void *ddata = note->descdata; @@ -11093,7 +11093,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid) unsigned flags; if (note->descsz < 16) - return FALSE; + return false; /* nto_procfs_status 'pid' field is at offset 0. */ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, (bfd_byte *) ddata); @@ -11122,12 +11122,12 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid) name = (char *) bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) - return FALSE; + return false; strcpy (name, buf); sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; sect->size = note->descsz; sect->filepos = note->descpos; @@ -11136,7 +11136,7 @@ elfcore_grok_nto_status (bfd *abfd, Elf_Internal_Note *note, long *tid) return (elfcore_maybe_make_sect (abfd, ".qnx_core_status", sect)); } -static bfd_boolean +static bool elfcore_grok_nto_regs (bfd *abfd, Elf_Internal_Note *note, long tid, @@ -11151,12 +11151,12 @@ elfcore_grok_nto_regs (bfd *abfd, name = (char *) bfd_alloc (abfd, strlen (buf) + 1); if (name == NULL) - return FALSE; + return false; strcpy (name, buf); sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; sect->size = note->descsz; sect->filepos = note->descpos; @@ -11166,7 +11166,7 @@ elfcore_grok_nto_regs (bfd *abfd, if (elf_tdata (abfd)->core->lwpid == tid) return elfcore_maybe_make_sect (abfd, base, sect); - return TRUE; + return true; } #define BFD_QNT_CORE_INFO 7 @@ -11174,7 +11174,7 @@ elfcore_grok_nto_regs (bfd *abfd, #define BFD_QNT_CORE_GREG 9 #define BFD_QNT_CORE_FPREG 10 -static bfd_boolean +static bool elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note) { /* Every GREG section has a STATUS section before it. Store the @@ -11193,11 +11193,11 @@ elfcore_grok_nto_note (bfd *abfd, Elf_Internal_Note *note) case BFD_QNT_CORE_FPREG: return elfcore_grok_nto_regs (abfd, note, tid, ".reg2"); default: - return TRUE; + return true; } } -static bfd_boolean +static bool elfcore_grok_spu_note (bfd *abfd, Elf_Internal_Note *note) { char *name; @@ -11208,19 +11208,19 @@ elfcore_grok_spu_note (bfd *abfd, Elf_Internal_Note *note) len = note->namesz; name = (char *) bfd_alloc (abfd, len); if (name == NULL) - return FALSE; + return false; memcpy (name, note->namedata, len); name[len - 1] = '\0'; sect = bfd_make_section_anyway_with_flags (abfd, name, SEC_HAS_CONTENTS); if (sect == NULL) - return FALSE; + return false; sect->size = note->descsz; sect->filepos = note->descpos; sect->alignment_power = 1; - return TRUE; + return true; } /* Function: elfcore_write_note @@ -12130,7 +12130,7 @@ elfcore_write_file_note (bfd *obfd, char *note_data, int *note_size, "CORE", NT_FILE, buf, bufsiz); } -static bfd_boolean +static bool elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, size_t align) { @@ -12143,7 +12143,7 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, if (align < 4) align = 4; if (align != 4 && align != 8) - return FALSE; + return false; p = buf; while (p < buf + size) @@ -12152,14 +12152,14 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, Elf_Internal_Note in; if (offsetof (Elf_External_Note, name) > buf - p + size) - return FALSE; + return false; in.type = H_GET_32 (abfd, xnp->type); in.namesz = H_GET_32 (abfd, xnp->namesz); in.namedata = xnp->name; if (in.namesz > buf - in.namedata + size) - return FALSE; + return false; in.descsz = H_GET_32 (abfd, xnp->descsz); in.descdata = p + ELF_NOTE_DESC_OFFSET (in.namesz, align); @@ -12167,12 +12167,12 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, if (in.descsz != 0 && (in.descdata >= buf + size || in.descsz > buf - in.descdata + size)) - return FALSE; + return false; switch (bfd_get_format (abfd)) { default: - return TRUE; + return true; case bfd_core: { @@ -12181,7 +12181,7 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, { const char * string; size_t len; - bfd_boolean (* func)(bfd *, Elf_Internal_Note *); + bool (*func) (bfd *, Elf_Internal_Note *); } grokers[] = { @@ -12203,7 +12203,7 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, grokers[i].len) == 0) { if (! grokers[i].func (abfd, & in)) - return FALSE; + return false; break; } } @@ -12214,13 +12214,13 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, if (in.namesz == sizeof "GNU" && strcmp (in.namedata, "GNU") == 0) { if (! elfobj_grok_gnu_note (abfd, &in)) - return FALSE; + return false; } else if (in.namesz == sizeof "stapsdt" && strcmp (in.namedata, "stapsdt") == 0) { if (! elfobj_grok_stapsdt_note (abfd, &in)) - return FALSE; + return false; } break; } @@ -12228,24 +12228,24 @@ elf_parse_notes (bfd *abfd, char *buf, size_t size, file_ptr offset, p += ELF_NOTE_NEXT_OFFSET (in.namesz, in.descsz, align); } - return TRUE; + return true; } -bfd_boolean +bool elf_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size, size_t align) { char *buf; if (size == 0 || (size + 1) == 0) - return TRUE; + return true; if (bfd_seek (abfd, offset, SEEK_SET) != 0) - return FALSE; + return false; buf = (char *) _bfd_malloc_and_read (abfd, size + 1, size); if (buf == NULL) - return FALSE; + return false; /* PR 17512: file: ec08f814 0-termintate the buffer so that string searches will not overflow. */ @@ -12254,11 +12254,11 @@ elf_read_notes (bfd *abfd, file_ptr offset, bfd_size_type size, if (!elf_parse_notes (abfd, buf, size, offset, align)) { free (buf); - return FALSE; + return false; } free (buf); - return TRUE; + return true; } /* Providing external access to the ELF program header table. */ @@ -12443,7 +12443,7 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, asection *relplt; asymbol *s; const char *relplt_name; - bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_relocs) (bfd *, asection *, asymbol **, bool); arelent *p; long count, i, n; size_t size; @@ -12479,7 +12479,7 @@ _bfd_elf_get_synthetic_symtab (bfd *abfd, return 0; slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table; - if (! (*slurp_relocs) (abfd, relplt, dynsyms, TRUE)) + if (! (*slurp_relocs) (abfd, relplt, dynsyms, true)) return -1; count = relplt->size / hdr->sh_entsize; @@ -12557,7 +12557,7 @@ asection _bfd_elf_large_com_section = BFD_FAKE_SECTION (_bfd_elf_large_com_section, &lcomm_sym, "LARGE_COMMON", 0, SEC_IS_COMMON); -bfd_boolean +bool _bfd_elf_final_write_processing (bfd *abfd) { Elf_Internal_Ehdr *i_ehdrp; /* ELF file header, internal form. */ @@ -12590,10 +12590,10 @@ _bfd_elf_final_write_processing (bfd *abfd) _bfd_error_handler (_("GNU_RETAIN section is supported " "only by GNU and FreeBSD targets")); bfd_set_error (bfd_error_sorry); - return FALSE; + return false; } } - return TRUE; + return true; } @@ -12601,7 +12601,7 @@ _bfd_elf_final_write_processing (bfd *abfd) This is the default version of this function, which is sufficient for most targets. It returns true if TYPE is STT_FUNC or STT_GNU_IFUNC. */ -bfd_boolean +bool _bfd_elf_is_function_type (unsigned int type) { return (type == STT_FUNC @@ -12641,7 +12641,7 @@ _bfd_elf_maybe_function_sym (const asymbol *sym, asection *sec, /* Create a BFD section to hold a secondary reloc section. */ -bfd_boolean +bool _bfd_elf_init_secondary_reloc_section (bfd * abfd, Elf_Internal_Shdr *hdr, const char * name, @@ -12649,7 +12649,7 @@ _bfd_elf_init_secondary_reloc_section (bfd * abfd, { /* We only support RELA secondary relocs. */ if (hdr->sh_type != SHT_RELA) - return FALSE; + return false; #if DEBUG_SECONDARY_RELOCS fprintf (stderr, "secondary reloc section %s encountered\n", name); @@ -12660,15 +12660,15 @@ _bfd_elf_init_secondary_reloc_section (bfd * abfd, /* Read in any secondary relocs associated with SEC. */ -bfd_boolean +bool _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, asection * sec, asymbol ** symbols, - bfd_boolean dynamic) + bool dynamic) { const struct elf_backend_data * const ebd = get_elf_backend_data (abfd); asection * relsec; - bfd_boolean result = TRUE; + bool result = true; bfd_vma (*r_sym) (bfd_vma); #if BFD_DEFAULT_TARGET_SIZE > 32 @@ -12700,7 +12700,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, size_t amt; if (ebd->elf_info_to_howto == NULL) - return FALSE; + return false; #if DEBUG_SECONDARY_RELOCS fprintf (stderr, "read secondary relocs for %s from %s\n", @@ -12711,7 +12711,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, native_relocs = bfd_malloc (hdr->sh_size); if (native_relocs == NULL) { - result = FALSE; + result = false; continue; } @@ -12720,7 +12720,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, { free (native_relocs); bfd_set_error (bfd_error_file_too_big); - result = FALSE; + result = false; continue; } @@ -12728,7 +12728,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, if (internal_relocs == NULL) { free (native_relocs); - result = FALSE; + result = false; continue; } @@ -12739,7 +12739,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, free (native_relocs); /* The internal_relocs will be freed when the memory for the bfd is released. */ - result = FALSE; + result = false; continue; } @@ -12753,7 +12753,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, i < reloc_count; i++, internal_reloc++, native_reloc += entsize) { - bfd_boolean res; + bool res; Elf_Internal_Rela rela; if (entsize == ebd->s->sizeof_rel) @@ -12786,7 +12786,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, bfd_set_error (bfd_error_bad_value); internal_reloc->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; - result = FALSE; + result = false; } else { @@ -12807,7 +12807,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, fprintf (stderr, "there is no howto associated with reloc %lx\n", rela.r_info); #endif - result = FALSE; + result = false; } } @@ -12822,7 +12822,7 @@ _bfd_elf_slurp_secondary_reloc_section (bfd * abfd, /* Set the ELF section header fields of an output secondary reloc section. */ -bfd_boolean +bool _bfd_elf_copy_special_section_fields (const bfd * ibfd ATTRIBUTE_UNUSED, bfd * obfd ATTRIBUTE_UNUSED, const Elf_Internal_Shdr * isection, @@ -12833,18 +12833,18 @@ _bfd_elf_copy_special_section_fields (const bfd * ibfd ATTRIBUTE_UNUSED, struct bfd_elf_section_data * esd; if (isection == NULL) - return FALSE; + return false; if (isection->sh_type != SHT_SECONDARY_RELOC) - return TRUE; + return true; isec = isection->bfd_section; if (isec == NULL) - return FALSE; + return false; osec = osection->bfd_section; if (osec == NULL) - return FALSE; + return false; esd = elf_section_data (osec); BFD_ASSERT (esd->sec_info == NULL); @@ -12859,7 +12859,7 @@ _bfd_elf_copy_special_section_fields (const bfd * ibfd ATTRIBUTE_UNUSED, (_("%pB(%pA): link section cannot be set because the output file does not have a symbol table"), obfd, osec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Find the output section that corresponds to the isection's sh_info link. */ @@ -12871,7 +12871,7 @@ _bfd_elf_copy_special_section_fields (const bfd * ibfd ATTRIBUTE_UNUSED, (_("%pB(%pA): info section index is invalid"), obfd, osec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } isection = elf_elfsections (ibfd)[isection->sh_info]; @@ -12885,13 +12885,13 @@ _bfd_elf_copy_special_section_fields (const bfd * ibfd ATTRIBUTE_UNUSED, (_("%pB(%pA): info section index cannot be set because the section is not in the output"), obfd, osec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } esd = elf_section_data (isection->bfd_section->output_section); BFD_ASSERT (esd != NULL); osection->sh_info = esd->this_idx; - esd->has_secondary_relocs = TRUE; + esd->has_secondary_relocs = true; #if DEBUG_SECONDARY_RELOCS fprintf (stderr, "update header of %s, sh_link = %u, sh_info = %u\n", osec->name, osection->sh_link, osection->sh_info); @@ -12899,7 +12899,7 @@ _bfd_elf_copy_special_section_fields (const bfd * ibfd ATTRIBUTE_UNUSED, bfd_section_name (isection->bfd_section->output_section)); #endif - return TRUE; + return true; } /* Write out a secondary reloc section. @@ -12909,17 +12909,17 @@ _bfd_elf_copy_special_section_fields (const bfd * ibfd ATTRIBUTE_UNUSED, fix this is for _bfd_elf_copy_special_section_fields() to chain secondary relocs together and then to have this function just walk that chain. */ -bfd_boolean +bool _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) { const struct elf_backend_data * const ebd = get_elf_backend_data (abfd); bfd_vma addr_offset; asection * relsec; bfd_vma (*r_info) (bfd_vma, bfd_vma); - bfd_boolean result = TRUE; + bool result = true; if (sec == NULL) - return FALSE; + return false; #if BFD_DEFAULT_TARGET_SIZE > 32 if (bfd_arch_bits_per_address (abfd) != 32) @@ -12960,7 +12960,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: secondary reloc section processed twice"), abfd, relsec); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; continue; } @@ -12972,7 +12972,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: secondary reloc section has zero sized entries"), abfd, relsec); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; continue; } else if (entsize != ebd->s->sizeof_rel @@ -12983,7 +12983,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: secondary reloc section has non-standard sized entries"), abfd, relsec); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; continue; } @@ -12995,7 +12995,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: secondary reloc section is empty!"), abfd, relsec); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; continue; } @@ -13018,7 +13018,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: internal relocs missing for secondary reloc section"), abfd, relsec); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; continue; } @@ -13037,7 +13037,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: reloc table entry %u is empty"), abfd, relsec, idx); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; break; } @@ -13062,7 +13062,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: secondary reloc %u references a missing symbol"), abfd, relsec, idx); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; n = 0; } @@ -13079,7 +13079,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: secondary reloc %u references a deleted symbol"), abfd, relsec, idx); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; n = 0; } } @@ -13092,7 +13092,7 @@ _bfd_elf_write_secondary_reloc_section (bfd *abfd, asection *sec) (_("%pB(%pA): error: secondary reloc %u is of an unknown type"), abfd, relsec, idx); bfd_set_error (bfd_error_bad_value); - result = FALSE; + result = false; src_rela.r_info = r_info (0, 0); } else diff --git a/bfd/elf32-am33lin.c b/bfd/elf32-am33lin.c index 5ddc7c4345..d260768b3b 100644 --- a/bfd/elf32-am33lin.c +++ b/bfd/elf32-am33lin.c @@ -38,7 +38,7 @@ #define _bfd_mn10300_elf_final_write_processing _bfd_am33_elf_final_write_processing /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf32_am33lin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -47,7 +47,7 @@ elf32_am33lin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 184: case 188: /* Linux/am33 */ @@ -69,13 +69,13 @@ elf32_am33lin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) note->descpos + offset); } -static bfd_boolean +static bool elf32_am33lin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/am33 elf_prpsinfo */ elf_tdata (abfd)->core->program @@ -96,12 +96,12 @@ elf32_am33lin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } #define elf_backend_grok_prstatus elf32_am33lin_grok_prstatus #define elf_backend_grok_psinfo elf32_am33lin_grok_psinfo -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf-m10300.c" diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c index c796104afd..d201d5a8c4 100644 --- a/bfd/elf32-arc.c +++ b/bfd/elf32-arc.c @@ -125,33 +125,33 @@ bfd_put_32_me (bfd *abfd, bfd_vma value,unsigned char *data) bfd_put_16 (abfd, value & 0xffff, data + 2); } -static ATTRIBUTE_UNUSED bfd_boolean +static ATTRIBUTE_UNUSED bool is_reloc_PC_relative (reloc_howto_type *howto) { return strstr (howto->name, "PC") != NULL; } -static bfd_boolean +static bool is_reloc_SDA_relative (reloc_howto_type *howto) { return strstr (howto->name, "SDA") != NULL; } -static bfd_boolean +static bool is_reloc_for_GOT (reloc_howto_type * howto) { if (strstr (howto->name, "TLS") != NULL) - return FALSE; + return false; return strstr (howto->name, "GOT") != NULL; } -static bfd_boolean +static bool is_reloc_for_PLT (reloc_howto_type * howto) { return strstr (howto->name, "PLT") != NULL; } -static bfd_boolean +static bool is_reloc_for_TLS (reloc_howto_type *howto) { return strstr (howto->name, "TLS") != NULL; @@ -159,24 +159,24 @@ is_reloc_for_TLS (reloc_howto_type *howto) struct arc_relocation_data { - bfd_signed_vma reloc_offset; - bfd_signed_vma reloc_addend; - bfd_signed_vma got_offset_value; + bfd_signed_vma reloc_offset; + bfd_signed_vma reloc_addend; + bfd_signed_vma got_offset_value; - bfd_signed_vma sym_value; - asection * sym_section; + bfd_signed_vma sym_value; + asection *sym_section; reloc_howto_type *howto; - asection * input_section; + asection *input_section; - bfd_signed_vma sdata_begin_symbol_vma; - bfd_boolean sdata_begin_symbol_vma_set; - bfd_signed_vma got_symbol_vma; + bfd_signed_vma sdata_begin_symbol_vma; + bool sdata_begin_symbol_vma_set; + bfd_signed_vma got_symbol_vma; - bfd_boolean should_relocate; + bool should_relocate; - const char * symbol_name; + const char *symbol_name; }; /* ARC ELF linker hash entry. */ @@ -238,9 +238,9 @@ enum howto_list #undef ARC_RELOC_HOWTO #define ARC_RELOC_HOWTO(TYPE, VALUE, RSIZE, BITSIZE, RELOC_FUNCTION, OVERFLOW, FORMULA) \ - [TYPE] = HOWTO (R_##TYPE, 0, RSIZE, BITSIZE, FALSE, 0, \ + [TYPE] = HOWTO (R_##TYPE, 0, RSIZE, BITSIZE, false, 0, \ complain_overflow_##OVERFLOW, arc_elf_reloc, \ - "R_" #TYPE, FALSE, 0, 0, FALSE), + "R_" #TYPE, false, 0, 0, false), static struct reloc_howto_struct elf_arc_howto_table[] = { @@ -251,15 +251,15 @@ static struct reloc_howto_struct elf_arc_howto_table[] = 0, // Rightshift. 2, // Size (0 = byte, 1 = short, 2 = long). 32, // Bitsize. - FALSE, // PC_relative. + false, // PC_relative. 0, // Bitpos. complain_overflow_bitfield, // Complain_on_overflow. bfd_elf_generic_reloc, // Special_function. "R_ARC_NONE", // Name. - TRUE, // Partial_inplace. + true, // Partial_inplace. 0, // Src_mask. 0, // Dst_mask. - FALSE), // PCrel_offset. + false), // PCrel_offset. */ }; #undef ARC_RELOC_HOWTO @@ -431,16 +431,16 @@ arc_elf32_bfd_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, } /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool arc_elf_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Print private flags. */ -static bfd_boolean +static bool arc_elf_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -478,23 +478,23 @@ arc_elf_print_private_bfd_data (bfd *abfd, void * ptr) } fputc ('\n', file); - return TRUE; + return true; } /* Copy backend specific data from one object module to another. */ -static bfd_boolean +static bool arc_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; BFD_ASSERT (!elf_flags_init (obfd) || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags); elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; /* Copy object attributes. */ _bfd_elf_copy_obj_attributes (ibfd, obfd); @@ -518,7 +518,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd * abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an ARC ELF reloc. */ -static bfd_boolean +static bool arc_info_to_howto_rel (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -532,11 +532,11 @@ arc_info_to_howto_rel (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = arc_elf_howto (r_type); - return TRUE; + return true; } /* Extract CPU features from an NTBS. */ @@ -581,14 +581,14 @@ arc_stralloc (char * s1, const char * s2) /* Merge ARC object attributes from IBFD into OBFD. Raise an error if there are conflicting attributes. */ -static bfd_boolean +static bool arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; obj_attribute *in_attr; obj_attribute *out_attr; int i; - bfd_boolean result = TRUE; + bool result = true; const char *sec_name = get_elf_backend_data (ibfd)->obj_attrs_section; char *tagname = NULL; @@ -596,13 +596,13 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) of accepting unknown attributes in the first input file - but is that a bug? */ if (ibfd->flags & BFD_LINKER_CREATED) - return TRUE; + return true; /* Skip any input that hasn't attribute section. This enables to link object files without attribute section with any others. */ if (bfd_get_section_by_name (ibfd, sec_name) == NULL) - return TRUE; + return true; if (!elf_known_obj_attributes_proc (obfd)[0].i) { @@ -615,7 +615,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) initialized. */ out_attr[0].i = 1; - return TRUE; + return true; } in_attr = elf_known_obj_attributes_proc (ibfd); @@ -663,7 +663,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) obfd, tagval[in_attr[i].i], tagval[out_attr[i].i]); - result = FALSE; + result = false; break; } else @@ -698,7 +698,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB: unable to merge ISA extension attributes " "%s"), obfd, bfd_feature_list[j].name); - result = FALSE; + result = false; break; } /* Second, if we have compatible features with the @@ -722,7 +722,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB: conflicting ISA extension attributes " "%s with %s"), obfd, p1, p2); - result = FALSE; + result = false; break; } /* Everithing is alright. */ @@ -761,7 +761,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: %pB: cannot mix rf16 with full register set %pB"), obfd, ibfd); - result = FALSE; + result = false; } break; @@ -791,7 +791,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) obfd, tagname, tagval[in_attr[i].i], tagval[out_attr[i].i]); - result = FALSE; + result = false; } tagname = NULL; break; @@ -816,7 +816,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: %pB: conflicting attributes %s"), obfd, tagname); - result = FALSE; + result = false; } break; @@ -844,7 +844,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge Tag_compatibility attributes and any common GNU ones. */ if (!_bfd_elf_merge_object_attributes (ibfd, info)) - return FALSE; + return false; /* Check for any attributes not known on ARC. */ result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd); @@ -855,7 +855,7 @@ arc_elf_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -867,11 +867,11 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Check if we have the same endianess. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; /* Collect ELF flags. */ in_flags = elf_elfheader (ibfd)->e_flags & EF_ARC_MACH_MSK; @@ -879,33 +879,33 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) /* First call, no flags set. */ { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; out_flags = in_flags; } if (!arc_elf_merge_attributes (ibfd, info)) - return FALSE; + return false; /* Check to see if the input BFD actually contains any sections. Do not short-circuit dynamic objects; their section list may be emptied by elf_link_add_object_symbols. */ if (!(ibfd->flags & DYNAMIC)) { - bfd_boolean null_input_bfd = TRUE; - bfd_boolean only_data_sections = TRUE; + bool null_input_bfd = true; + bool only_data_sections = true; for (sec = ibfd->sections; sec != NULL; sec = sec->next) { if ((bfd_section_flags (sec) & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) - only_data_sections = FALSE; + only_data_sections = false; - null_input_bfd = FALSE; + null_input_bfd = false; } if (null_input_bfd || only_data_sections) - return TRUE; + return true; } /* Complain about various flag/architecture mismatches. */ @@ -922,7 +922,7 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: attempting to link %pB " "with a binary %pB of different architecture"), ibfd, obfd); - return FALSE; + return false; } else if ((in_flags != out_flags) /* If we have object attributes, then we already @@ -938,7 +938,7 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("%pB: uses different e_flags (%#x) fields than " "previous modules (%#x)"), ibfd, in_flags, out_flags); - return FALSE; + return false; } /* MWDT doesnt set the eflags hence make sure we choose the eflags set by gcc. */ @@ -959,7 +959,7 @@ arc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return bfd_set_arch_mach (obfd, bfd_arch_arc, bfd_get_mach (ibfd)); } - return TRUE; + return true; } /* Return a best guess for the machine number based on the attributes. */ @@ -987,7 +987,7 @@ bfd_arc_get_mach_from_attributes (bfd * abfd) } /* Set the right machine number for an ARC ELF file. */ -static bfd_boolean +static bool arc_elf_object_p (bfd * abfd) { /* Make sure this is initialised, or you'll have the potential of passing @@ -1025,7 +1025,7 @@ arc_elf_object_p (bfd * abfd) { _bfd_error_handler (_("error: the ARC4 architecture is no longer supported")); - return FALSE; + return false; } else { @@ -1041,7 +1041,7 @@ arc_elf_object_p (bfd * abfd) /* The final processing done just before writing out an ARC ELF object file. This gets the ARC architecture right based on the machine number. */ -static bfd_boolean +static bool arc_elf_final_write_processing (bfd *abfd) { unsigned long emf; @@ -1128,7 +1128,7 @@ debug_arc_reloc (struct arc_relocation_data reloc_data) #endif /* ARC_ENABLE_DEBUG */ static bfd_vma -middle_endian_convert (bfd_vma insn, bfd_boolean do_it) +middle_endian_convert (bfd_vma insn, bool do_it) { if (do_it) { @@ -1447,15 +1447,15 @@ elf_arc_relocate_section (bfd * output_bfd, relend = relocs + input_section->reloc_count; for (; rel < relend; wrel++, rel++) { - enum elf_arc_reloc_type r_type; - reloc_howto_type * howto; - unsigned long r_symndx; - struct elf_link_hash_entry * h; - Elf_Internal_Sym * sym; - asection * sec; - struct elf_link_hash_entry * h2; - const char * msg; - bfd_boolean unresolved_reloc = FALSE; + enum elf_arc_reloc_type r_type; + reloc_howto_type *howto; + unsigned long r_symndx; + struct elf_link_hash_entry *h; + Elf_Internal_Sym *sym; + asection *sec; + struct elf_link_hash_entry *h2; + const char *msg; + bool unresolved_reloc = false; struct arc_relocation_data reloc_data = { @@ -1467,9 +1467,9 @@ elf_arc_relocate_section (bfd * output_bfd, .howto = NULL, .input_section = NULL, .sdata_begin_symbol_vma = 0, - .sdata_begin_symbol_vma_set = FALSE, + .sdata_begin_symbol_vma_set = false, .got_symbol_vma = 0, - .should_relocate = FALSE + .should_relocate = false }; r_type = ELF32_R_TYPE (rel->r_info); @@ -1477,7 +1477,7 @@ elf_arc_relocate_section (bfd * output_bfd, if (r_type >= (int) R_ARC_max) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = arc_elf_howto (r_type); @@ -1513,7 +1513,7 @@ elf_arc_relocate_section (bfd * output_bfd, } h2 = elf_link_hash_lookup (elf_hash_table (info), "__SDATA_BEGIN__", - FALSE, FALSE, TRUE); + false, false, true); if (!reloc_data.sdata_begin_symbol_vma_set && h2 != NULL && h2->root.type != bfd_link_hash_undefined @@ -1523,7 +1523,7 @@ elf_arc_relocate_section (bfd * output_bfd, reloc_data.sdata_begin_symbol_vma = (h2->root.u.def.value + h2->root.u.def.section->output_section->vma); - reloc_data.sdata_begin_symbol_vma_set = TRUE; + reloc_data.sdata_begin_symbol_vma_set = true; } reloc_data.input_section = input_section; @@ -1543,7 +1543,7 @@ elf_arc_relocate_section (bfd * output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; bfd_vma relocation ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, @@ -1627,7 +1627,7 @@ elf_arc_relocate_section (bfd * output_bfd, reloc_data.got_symbol_vma = htab->sgot->output_section->vma + htab->sgot->output_offset; - reloc_data.should_relocate = TRUE; + reloc_data.should_relocate = true; } else /* Global symbol. */ { @@ -1661,7 +1661,7 @@ elf_arc_relocate_section (bfd * output_bfd, reloc_data.sym_value = h->root.u.def.value; reloc_data.sym_section = h->root.u.def.section; - reloc_data.should_relocate = TRUE; + reloc_data.should_relocate = true; if (is_reloc_for_GOT (howto) && !bfd_link_pic (info)) { @@ -1695,7 +1695,7 @@ elf_arc_relocate_section (bfd * output_bfd, { reloc_data.sym_value = h->root.u.def.value; reloc_data.sym_section = htab->sgot; - reloc_data.should_relocate = TRUE; + reloc_data.should_relocate = true; } else if (is_reloc_for_PLT (howto) && h->plt.offset != (bfd_vma) -1) @@ -1703,7 +1703,7 @@ elf_arc_relocate_section (bfd * output_bfd, /* TODO: This is repeated up here. */ reloc_data.sym_value = h->plt.offset; reloc_data.sym_section = htab->splt; - reloc_data.should_relocate = TRUE; + reloc_data.should_relocate = true; } else continue; @@ -1715,7 +1715,7 @@ elf_arc_relocate_section (bfd * output_bfd, reloc_data.sym_value = h->root.u.def.value; reloc_data.sym_section = htab->sgot; - reloc_data.should_relocate = TRUE; + reloc_data.should_relocate = true; } else if (is_reloc_for_PLT (howto)) { @@ -1724,16 +1724,16 @@ elf_arc_relocate_section (bfd * output_bfd, if (bfd_link_executable (info)) (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); reloc_data.sym_value = h->plt.offset; reloc_data.sym_section = htab->splt; - reloc_data.should_relocate = TRUE; + reloc_data.should_relocate = true; } else if (!bfd_link_pic (info) || bfd_link_executable (info)) (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); } BFD_ASSERT (htab->sgot != NULL || !is_reloc_for_GOT (howto)); @@ -1745,7 +1745,7 @@ elf_arc_relocate_section (bfd * output_bfd, if ((is_reloc_for_GOT (howto) || is_reloc_for_TLS (howto))) { - reloc_data.should_relocate = TRUE; + reloc_data.should_relocate = true; struct got_entry **list = get_got_entry_list_for_symbol (input_bfd, r_symndx, h); @@ -1791,11 +1791,11 @@ elf_arc_relocate_section (bfd * output_bfd, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip = FALSE; - bfd_boolean relocate = FALSE; + bool skip = false; + bool relocate = false; asection *sreloc = _bfd_elf_get_dynamic_reloc_section (input_bfd, input_section, - /*RELA*/ TRUE); + /*RELA*/ true); BFD_ASSERT (sreloc != NULL); @@ -1805,7 +1805,7 @@ elf_arc_relocate_section (bfd * output_bfd, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; outrel.r_addend = rel->r_addend; outrel.r_offset += (input_section->output_section->vma @@ -1814,7 +1814,7 @@ elf_arc_relocate_section (bfd * output_bfd, if (skip) { memset (&outrel, 0, sizeof outrel); - relocate = FALSE; + relocate = false; } else if (h != NULL && h->dynindx != -1 @@ -1825,9 +1825,9 @@ elf_arc_relocate_section (bfd * output_bfd, { BFD_ASSERT (h != NULL); if ((input_section->flags & SEC_ALLOC) != 0) - relocate = FALSE; + relocate = false; else - relocate = TRUE; + relocate = true; BFD_ASSERT (h->dynindx != -1); outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); @@ -1844,7 +1844,7 @@ elf_arc_relocate_section (bfd * output_bfd, dynamic symbol table, and it's a regular symbol not defined in a shared object, then treat the symbol as local, resolve it now. */ - relocate = TRUE; + relocate = true; /* outrel.r_addend = 0; */ outrel.r_info = ELF32_R_INFO (0, R_ARC_RELATIVE); } @@ -1871,7 +1871,7 @@ elf_arc_relocate_section (bfd * output_bfd, _bfd_error_handler ("error: linker symbol __SDATA_BEGIN__ not found"); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } DEBUG_ARC_RELOC (reloc_data); @@ -1884,7 +1884,7 @@ elf_arc_relocate_section (bfd * output_bfd, _bfd_error_handler (_("GOT and PLT relocations cannot be fixed with a non dynamic linker")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } msg = NULL; @@ -1901,7 +1901,7 @@ elf_arc_relocate_section (bfd * output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, reloc_data.symbol_name, input_bfd, input_section, rel->r_offset, TRUE); + (info, reloc_data.symbol_name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_other: @@ -1932,10 +1932,10 @@ elf_arc_relocate_section (bfd * output_bfd, if (msg) _bfd_error_handler (msg, input_bfd, input_section, reloc_data.symbol_name); - return FALSE; + return false; } - return TRUE; + return true; } #define elf_arc_hash_table(p) \ @@ -1943,7 +1943,7 @@ elf_arc_relocate_section (bfd * output_bfd, && elf_hash_table_id (elf_hash_table (p)) == ARC_ELF_DATA) \ ? (struct elf_arc_link_hash_table *) (p)->hash : NULL) -static bfd_boolean +static bool elf_arc_check_relocs (bfd * abfd, struct bfd_link_info * info, asection * sec, @@ -1958,7 +1958,7 @@ elf_arc_check_relocs (bfd * abfd, struct elf_link_hash_table * htab = elf_hash_table (info); if (bfd_link_relocatable (info)) - return TRUE; + return true; if (htab->dynobj == NULL) htab->dynobj = abfd; @@ -1980,7 +1980,7 @@ elf_arc_check_relocs (bfd * abfd, if (r_type >= (int) R_ARC_max) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = arc_elf_howto (r_type); @@ -2026,7 +2026,7 @@ elf_arc_check_relocs (bfd * abfd, arc_elf_howto (r_type)->name, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* In some cases we are not setting the 'non_got_ref' @@ -2048,14 +2048,14 @@ elf_arc_check_relocs (bfd * abfd, if (info->dynamic && ! htab->dynamic_sections_created && ! _bfd_elf_link_create_dynamic_sections (abfd, info)) - return FALSE; + return false; sreloc = _bfd_elf_make_dynamic_reloc_section (sec, dynobj, 2, abfd, /*rela*/ - TRUE); + true); if (sreloc == NULL) - return FALSE; + return false; } sreloc->size += sizeof (Elf32_External_Rela); @@ -2094,10 +2094,10 @@ elf_arc_check_relocs (bfd * abfd, arc_elf_howto (r_type)->name, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (! _bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; arc_fill_got_info_for_reloc ( arc_got_entry_type_for_reloc (howto), @@ -2107,7 +2107,7 @@ elf_arc_check_relocs (bfd * abfd, } } - return TRUE; + return true; } #define ELF_DYNAMIC_INTERPRETER "/sbin/ld-uClibc.so" @@ -2315,7 +2315,7 @@ relocate_plt_for_entry (bfd *abfd, have to change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2335,13 +2335,13 @@ elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info, a procedure linkage table, and we can just do a PC32 reloc instead. */ BFD_ASSERT (h->needs_plt); - return TRUE; + return true; } /* Make sure this symbol is output as a dynamic symbol. */ if (h->dynindx == -1 && !h->forced_local && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; if (bfd_link_pic (info) || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h)) @@ -2360,7 +2360,7 @@ elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info, h->plt.offset = (bfd_vma) -1; h->needs_plt = 0; } - return TRUE; + return true; } /* If this is a weak symbol, and there is a real definition, the @@ -2372,7 +2372,7 @@ elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2383,18 +2383,18 @@ elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (!bfd_link_executable (info)) - return TRUE; + return true; /* If there are no non-GOT references, we do not need a copy relocation. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -2408,7 +2408,7 @@ elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info, same memory location for the variable. */ if (htab == NULL) - return FALSE; + return false; /* We must generate a R_ARC_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the @@ -2439,7 +2439,7 @@ elf_arc_adjust_dynamic_symbol (struct bfd_link_info *info, sym : Returns : True/False as the return status. */ -static bfd_boolean +static bool elf_arc_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -2474,7 +2474,7 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd, struct elf_arc_link_hash_table *arc_htab = elf_arc_hash_table (info); if (arc_htab == NULL) - return FALSE; + return false; if (h->dynindx == -1 || (h->root.type != bfd_link_hash_defined @@ -2506,14 +2506,14 @@ elf_arc_finish_dynamic_symbol (bfd * output_bfd, || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } #define GET_SYMBOL_OR_SECTION(TAG, SYMBOL, SECTION) \ case TAG: \ if (SYMBOL != NULL) \ h = elf_link_hash_lookup (elf_hash_table (info), \ - SYMBOL, FALSE, FALSE, TRUE); \ + SYMBOL, false, false, true); \ else if (SECTION != NULL) \ s = bfd_get_linker_section (dynobj, SECTION); \ break; @@ -2524,7 +2524,7 @@ struct obfd_info_group { struct bfd_link_info *info; }; -static bfd_boolean +static bool arc_create_forced_local_got_entries_for_tls (struct bfd_hash_entry *bh, void *data) { @@ -2547,7 +2547,7 @@ arc_create_forced_local_got_entries_for_tls (struct bfd_hash_entry *bh, } } - return TRUE; + return true; } @@ -2559,7 +2559,7 @@ arc_create_forced_local_got_entries_for_tls (struct bfd_hash_entry *bh, sym : Returns : True/False as the return status. */ -static bfd_boolean +static bool elf_arc_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info *info) { @@ -2577,7 +2577,7 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd, for (; dyncon < dynconend; dyncon++) { Elf_Internal_Dyn internal_dyn; - bfd_boolean do_it = FALSE; + bool do_it = false; struct elf_link_hash_entry *h = NULL; asection *s = NULL; @@ -2619,7 +2619,7 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd, library and does not apply to this one. */ internal_dyn.d_un.d_val = 0; } - do_it = TRUE; + do_it = true; } else if (s != NULL) /* With a section information. */ { @@ -2632,12 +2632,12 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd, case DT_VERNEED: internal_dyn.d_un.d_ptr = (s->output_section->vma + s->output_offset); - do_it = TRUE; + do_it = true; break; case DT_PLTRELSZ: internal_dyn.d_un.d_val = s->size; - do_it = TRUE; + do_it = true; break; default: @@ -2665,7 +2665,7 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd, { struct elf_link_hash_entry *h; h = elf_link_hash_lookup (elf_hash_table (info), "_GLOBAL_OFFSET_TABLE_", - FALSE, FALSE, TRUE); + false, false, true); if (h != NULL && h->root.type != bfd_link_hash_undefined && h->root.u.def.section != NULL) @@ -2690,24 +2690,24 @@ elf_arc_finish_dynamic_sections (bfd * output_bfd, bfd_hash_traverse (&info->hash->table, arc_create_forced_local_got_entries_for_tls, &group); - return TRUE; + return true; } #define ADD_DYNAMIC_SYMBOL(NAME, TAG) \ h = elf_link_hash_lookup (elf_hash_table (info), \ - NAME, FALSE, FALSE, FALSE); \ + NAME, false, false, false); \ if ((h != NULL && (h->ref_regular || h->def_regular))) \ if (! _bfd_elf_add_dynamic_entry (info, TAG, 0)) \ - return FALSE; + return false; /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean relocs_exist = FALSE; + bool relocs_exist = false; struct elf_link_hash_table *htab = elf_hash_table (info); dynobj = htab->dynobj; @@ -2762,7 +2762,7 @@ elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (strncmp (s->name, ".rela", 5) == 0) { if (s->size != 0 && s != htab->srelplt) - relocs_exist = TRUE; + relocs_exist = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -2786,7 +2786,7 @@ elf_arc_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs_exist); @@ -2857,7 +2857,7 @@ const struct elf_size_info arc_elf32_size_info = function relies on offsets inside elf_prstatus structure in Linux to be stable. */ -static bfd_boolean +static bool elf32_arc_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -2866,7 +2866,7 @@ elf32_arc_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 236: /* sizeof (struct elf_prstatus) on Linux/arc. */ /* pr_cursig */ @@ -2901,7 +2901,7 @@ elf32_arc_obj_attrs_arg_type (int tag) /* Attribute numbers >=14 can be safely ignored. */ -static bfd_boolean +static bool elf32_arc_obj_attrs_handle_unknown (bfd *abfd, int tag) { if ((tag & 127) < (Tag_ARC_ISA_mpy_option + 1)) @@ -2910,14 +2910,14 @@ elf32_arc_obj_attrs_handle_unknown (bfd *abfd, int tag) (_("%pB: unknown mandatory ARC object attribute %d"), abfd, tag); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { _bfd_error_handler (_("warning: %pB: unknown ARC object attribute %d"), abfd, tag); - return TRUE; + return true; } } @@ -2925,7 +2925,7 @@ elf32_arc_obj_attrs_handle_unknown (bfd *abfd, int tag) called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool elf32_arc_section_from_shdr (bfd *abfd, Elf_Internal_Shdr * hdr, const char *name, @@ -2938,13 +2938,13 @@ elf32_arc_section_from_shdr (bfd *abfd, break; default: - return FALSE; + return false; } if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; - return TRUE; + return true; } /* Relaxation hook. @@ -2955,9 +2955,9 @@ elf32_arc_section_from_shdr (bfd *abfd, */ -static bfd_boolean +static bool arc_elf_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -2966,7 +2966,7 @@ arc_elf_relax_section (bfd *abfd, asection *sec, Elf_Internal_Sym *isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a code @@ -2975,7 +2975,7 @@ arc_elf_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -3053,7 +3053,7 @@ arc_elf_relax_section (bfd *abfd, asection *sec, bfd_put_32_me (abfd, code, contents + irel->r_offset - 4); /* The size isn't changed, don't redo. */ - *again = FALSE; + *again = false; } } @@ -3080,7 +3080,7 @@ arc_elf_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -3090,7 +3090,7 @@ arc_elf_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } #define TARGET_LITTLE_SYM arc_elf32_le_vec diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 7d7c3edab1..51a65d89a8 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -66,10 +66,10 @@ /* The Adjusted Place, as defined by AAELF. */ #define Pa(X) ((X) & 0xfffffffc) -static bfd_boolean elf32_arm_write_section (bfd *output_bfd, - struct bfd_link_info *link_info, - asection *sec, - bfd_byte *contents); +static bool elf32_arm_write_section (bfd *output_bfd, + struct bfd_link_info *link_info, + asection *sec, + bfd_byte *contents); /* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g. R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO @@ -82,247 +82,247 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_PC24, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_PC24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32 bit absolute */ HOWTO (R_ARM_ABS32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ABS32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* standard 32bit pc-relative reloc */ HOWTO (R_ARM_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_REL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit absolute - R_ARM_LDR_PC_G0 in AAELF */ HOWTO (R_ARM_LDR_PC_G0, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDR_PC_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit absolute */ HOWTO (R_ARM_ABS16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ABS16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 12 bit absolute */ HOWTO (R_ARM_ABS12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ABS12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_ABS5, /* type */ 6, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_ABS5", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000007e0, /* src_mask */ 0x000007e0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8 bit absolute */ HOWTO (R_ARM_ABS8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ABS8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_SBREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_SBREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_CALL, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x07ff2fff, /* src_mask */ 0x07ff2fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_PC8, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_PC8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_BREL_ADJ, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_BREL_ADJ", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_DESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_DESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_SWI8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_SWI8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* BLX instruction for the ARM. */ HOWTO (R_ARM_XPC25, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_XPC25", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* BLX instruction for the Thumb. */ HOWTO (R_ARM_THM_XPC22, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_XPC22", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x07ff2fff, /* src_mask */ 0x07ff2fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Dynamic TLS relocations. */ @@ -330,43 +330,43 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_DTPMOD32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_DTPOFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_DTPOFF32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_TPOFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_TPOFF32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocs used in ARM Linux */ @@ -374,463 +374,463 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_COPY", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GLOB_DAT", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_JUMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_JUMP_SLOT", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_RELATIVE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GOTOFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOTOFF32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GOTPC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOTPC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_GOT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOT32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_PLT32, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_PLT32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_CALL, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_JUMP24, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_JUMP24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_JUMP24, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_JUMP24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x07ff2fff, /* src_mask */ 0x07ff2fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_BASE_ABS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_BASE_ABS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_ALU_PCREL7_0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PCREL_7_0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_PCREL15_8, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 8, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PCREL_15_8",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_PCREL23_15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 16, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PCREL_23_15",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDR_SBREL_11_0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDR_SBREL_11_0",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_ALU_SBREL_19_12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 12, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_SBREL_19_12",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000ff000, /* src_mask */ 0x000ff000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_ALU_SBREL_27_20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 20, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_SBREL_27_20",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0ff00000, /* src_mask */ 0x0ff00000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TARGET1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TARGET1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_ROSEGREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ROSEGREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_V4BX, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_V4BX", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TARGET2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TARGET2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_PREL31, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 31, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_PREL31", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7fffffff, /* src_mask */ 0x7fffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_MOVW_ABS_NC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_MOVW_ABS_NC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000f0fff, /* src_mask */ 0x000f0fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_MOVT_ABS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_MOVT_ABS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000f0fff, /* src_mask */ 0x000f0fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_MOVW_PREL_NC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_MOVW_PREL_NC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000f0fff, /* src_mask */ 0x000f0fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_MOVT_PREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_MOVT_PREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000f0fff, /* src_mask */ 0x000f0fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_MOVW_ABS_NC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_MOVW_ABS_NC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x040f70ff, /* src_mask */ 0x040f70ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_MOVT_ABS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_MOVT_ABS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x040f70ff, /* src_mask */ 0x040f70ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_MOVW_PREL_NC,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_MOVW_PREL_NC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x040f70ff, /* src_mask */ 0x040f70ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_MOVT_PREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_MOVT_PREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x040f70ff, /* src_mask */ 0x040f70ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_JUMP19, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_JUMP19", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x043f2fff, /* src_mask */ 0x043f2fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_JUMP6, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_JUMP6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x02f8, /* src_mask */ 0x02f8, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* These are declared as 13-bit signed relocations because we can address -4095 .. 4095(base) by altering ADDW to SUBW or vice @@ -839,57 +839,57 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 13, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_ALU_PREL_11_0",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_PC12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 13, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_PC12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ABS32_NOI, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ABS32_NOI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_REL32_NOI, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_REL32_NOI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Group relocations. */ @@ -897,379 +897,379 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PC_G0_NC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_PC_G0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PC_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_PC_G1_NC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PC_G1_NC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_PC_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PC_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_PC_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_PC_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDR_PC_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDR_PC_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDR_PC_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDR_PC_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDRS_PC_G0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDRS_PC_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDRS_PC_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDRS_PC_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDRS_PC_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDRS_PC_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDC_PC_G0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDC_PC_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDC_PC_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDC_PC_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDC_PC_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDC_PC_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_SB_G0_NC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_SB_G0_NC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_SB_G0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_SB_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_SB_G1_NC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_SB_G1_NC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_SB_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_SB_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_ALU_SB_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_ALU_SB_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDR_SB_G0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDR_SB_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDR_SB_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDR_SB_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDR_SB_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDR_SB_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDRS_SB_G0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDRS_SB_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDRS_SB_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDRS_SB_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDRS_SB_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDRS_SB_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDC_SB_G0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDC_SB_G0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDC_SB_G1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDC_SB_G1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_LDC_SB_G2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_LDC_SB_G2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* End of group relocations. */ @@ -1277,211 +1277,211 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_MOVW_BREL_NC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_MOVT_BREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_MOVT_BREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_MOVW_BREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_MOVW_BREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_MOVW_BREL_NC,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_MOVW_BREL_NC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x040f70ff, /* src_mask */ 0x040f70ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_MOVT_BREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_MOVT_BREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x040f70ff, /* src_mask */ 0x040f70ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_MOVW_BREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_MOVW_BREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x040f70ff, /* src_mask */ 0x040f70ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_GOTDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ NULL, /* special_function */ "R_ARM_TLS_GOTDESC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_CALL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_DESCSEQ, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_DESCSEQ", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_TLS_CALL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_TLS_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x07ff07ff, /* src_mask */ 0x07ff07ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_PLT32_ABS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_PLT32_ABS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GOT_ABS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOT_ABS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GOT_PREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOT_PREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_GOT_BREL12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOT_BREL12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GOTOFF12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOTOFF12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_ARM_GOTRELAX), /* reserved for future GOT-load optimizations */ @@ -1490,171 +1490,171 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_ARM_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO (R_ARM_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_ARM_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_THM_JUMP11, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_JUMP11", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000007ff, /* src_mask */ 0x000007ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_ARM_THM_JUMP8, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_JUMP8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* TLS relocations */ HOWTO (R_ARM_TLS_GD32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ NULL, /* special_function */ "R_ARM_TLS_GD32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_LDM32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_LDM32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_LDO32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_LDO32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_IE32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ NULL, /* special_function */ "R_ARM_TLS_IE32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_LE32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ NULL, /* special_function */ "R_ARM_TLS_LE32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_LDO12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_LDO12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_LE12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_LE12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_IE12GP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_IE12GP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 112-127 private relocations. */ EMPTY_HOWTO (112), @@ -1681,109 +1681,109 @@ static reloc_howto_type elf32_arm_howto_table_1[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_THM_TLS_DESCSEQ",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (130), EMPTY_HOWTO (131), HOWTO (R_ARM_THM_ALU_ABS_G0_NC,/* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield,/* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_ARM_THM_ALU_ABS_G0_NC",/* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x00000000, /* src_mask. */ 0x00000000, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_ARM_THM_ALU_ABS_G1_NC,/* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield,/* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_ARM_THM_ALU_ABS_G1_NC",/* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x00000000, /* src_mask. */ 0x00000000, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_ARM_THM_ALU_ABS_G2_NC,/* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield,/* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_ARM_THM_ALU_ABS_G2_NC",/* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x00000000, /* src_mask. */ 0x00000000, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_ARM_THM_ALU_ABS_G3_NC,/* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield,/* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_ARM_THM_ALU_ABS_G3_NC",/* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x00000000, /* src_mask. */ 0x00000000, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* Relocations for Armv8.1-M Mainline. */ HOWTO (R_ARM_THM_BF16, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont,/* do not complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_ARM_THM_BF16", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x001f0ffe, /* src_mask. */ 0x001f0ffe, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_ARM_THM_BF12, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 12, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont,/* do not complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_ARM_THM_BF12", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x00010ffe, /* src_mask. */ 0x00010ffe, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_ARM_THM_BF18, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 18, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont,/* do not complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_ARM_THM_BF18", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x007f0ffe, /* src_mask. */ 0x007f0ffe, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ }; /* 160 onwards: */ @@ -1793,106 +1793,106 @@ static reloc_howto_type elf32_arm_howto_table_2[8] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_IRELATIVE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GOTFUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOTFUNCDESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_GOTOFFFUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_GOTOFFFUNCDESC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_FUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_FUNCDESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_FUNCDESC_VALUE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_FUNCDESC_VALUE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_GD32_FDPIC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_GD32_FDPIC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_LDM32_FDPIC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_LDM32_FDPIC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_TLS_IE32_FDPIC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_TLS_IE32_FDPIC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* 249-255 extended, currently unused, relocations: */ @@ -1902,57 +1902,57 @@ static reloc_howto_type elf32_arm_howto_table_3[4] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_RREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_RABS32, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_RABS32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_RPC24, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_RPC24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_ARM_RBASE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_ARM_RBASE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; static reloc_howto_type * @@ -1972,7 +1972,7 @@ elf32_arm_howto_from_type (unsigned int r_type) return NULL; } -static bfd_boolean +static bool elf32_arm_info_to_howto (bfd * abfd, arelent * bfd_reloc, Elf_Internal_Rela * elf_reloc) { @@ -1985,9 +1985,9 @@ elf32_arm_info_to_howto (bfd * abfd, arelent * bfd_reloc, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } struct elf32_arm_reloc_map @@ -2140,7 +2140,7 @@ elf32_arm_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf32_arm_nabi_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -2149,7 +2149,7 @@ elf32_arm_nabi_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 148: /* Linux/ARM 32-bit. */ /* pr_cursig */ @@ -2170,13 +2170,13 @@ elf32_arm_nabi_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf32_arm_nabi_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/ARM elf_prpsinfo. */ elf_tdata (abfd)->core->pid @@ -2198,7 +2198,7 @@ elf32_arm_nabi_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } static char * @@ -2426,7 +2426,7 @@ static const bfd_vma elf32_arm_plt_entry_long [] = 0xe5bcf000, /* ldr pc, [ip, #0xNNN]! */ }; -static bfd_boolean elf32_arm_use_long_plt_entry = FALSE; +static bool elf32_arm_use_long_plt_entry = false; #endif /* not FOUR_WORD_PLT */ @@ -3088,7 +3088,7 @@ struct a8_erratum_reloc const char *sym_name; unsigned int r_type; enum arm_st_branch_type branch_type; - bfd_boolean non_a8_stub; + bool non_a8_stub; }; /* The size of the thread control block. */ @@ -3184,7 +3184,7 @@ struct elf_arm_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == ARM_ELF_DATA) -static bfd_boolean +static bool elf32_arm_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_arm_obj_tdata), @@ -3243,7 +3243,7 @@ struct elf32_arm_link_hash_entry #define elf32_arm_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* Get the ARM elf linker hash table from a link_info structure. */ @@ -3354,7 +3354,7 @@ struct elf32_arm_link_hash_table bfd_size_type plt_entry_size; /* True if the target uses REL relocations. */ - bfd_boolean use_rel; + bool use_rel; /* Nonzero if import library must be a secure gateway import library as per ARMv8-M Security Extensions. */ @@ -3556,7 +3556,7 @@ elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry, ret->plt.maybe_thumb_refcount = 0; ret->plt.noncall_refcount = 0; ret->plt.got_offset = -1; - ret->is_iplt = FALSE; + ret->is_iplt = false; ret->export_glue = NULL; ret->stub_cache = NULL; @@ -3574,7 +3574,7 @@ elf32_arm_link_hash_newfunc (struct bfd_hash_entry * entry, /* Ensure that we have allocated bookkeeping structures for ABFD's local symbols. */ -static bfd_boolean +static bool elf32_arm_allocate_local_sym_info (bfd *abfd) { if (elf_local_got_refcounts (abfd) == NULL) @@ -3591,7 +3591,7 @@ elf32_arm_allocate_local_sym_info (bfd *abfd) + sizeof (char)); data = bfd_zalloc (abfd, size); if (data == NULL) - return FALSE; + return false; /* It is important that these all be allocated in descending order of required alignment, so that arrays allocated later @@ -3620,7 +3620,7 @@ elf32_arm_allocate_local_sym_info (bfd *abfd) <= __alignof__ (*elf32_arm_local_fdpic_cnts (abfd))); #endif } - return TRUE; + return true; } /* Return the .iplt information for local symbol R_SYMNDX, which belongs @@ -3650,7 +3650,7 @@ elf32_arm_create_local_iplt (bfd *abfd, unsigned long r_symndx) true, point *ROOT_PLT at the target-independent reference count/offset union and *ARM_PLT at the ARM-specific information. */ -static bfd_boolean +static bool elf32_arm_get_plt_info (bfd *abfd, struct elf32_arm_link_hash_table *globals, struct elf32_arm_link_hash_entry *h, unsigned long r_symndx, union gotplt_union **root_plt, @@ -3659,33 +3659,33 @@ elf32_arm_get_plt_info (bfd *abfd, struct elf32_arm_link_hash_table *globals, struct arm_local_iplt_info *local_iplt; if (globals->root.splt == NULL && globals->root.iplt == NULL) - return FALSE; + return false; if (h != NULL) { *root_plt = &h->root.plt; *arm_plt = &h->plt; - return TRUE; + return true; } if (elf32_arm_local_iplt (abfd) == NULL) - return FALSE; + return false; local_iplt = elf32_arm_local_iplt (abfd)[r_symndx]; if (local_iplt == NULL) - return FALSE; + return false; *root_plt = &local_iplt->root; *arm_plt = &local_iplt->arm; - return TRUE; + return true; } -static bfd_boolean using_thumb_only (struct elf32_arm_link_hash_table *globals); +static bool using_thumb_only (struct elf32_arm_link_hash_table *globals); /* Return true if the PLT described by ARM_PLT requires a Thumb stub before it. */ -static bfd_boolean +static bool elf32_arm_plt_needs_thumb_stub_p (struct bfd_link_info *info, struct arm_plt_info *arm_plt) { @@ -3777,17 +3777,17 @@ stub_hash_newfunc (struct bfd_hash_entry *entry, /* Create .got, .gotplt, and .rel(a).got sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool create_got_section (bfd *dynobj, struct bfd_link_info *info) { struct elf32_arm_link_hash_table *htab; htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (! _bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; /* Also create .rofixup. */ if (htab->fdpic_p) @@ -3797,15 +3797,15 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) | SEC_IN_MEMORY | SEC_LINKER_CREATED | SEC_READONLY)); if (htab->srofixup == NULL || !bfd_set_section_alignment (htab->srofixup, 2)) - return FALSE; + return false; } - return TRUE; + return true; } /* Create the .iplt, .rel(a).iplt and .igot.plt sections. */ -static bfd_boolean +static bool create_ifunc_sections (struct bfd_link_info *info) { struct elf32_arm_link_hash_table *htab; @@ -3825,7 +3825,7 @@ create_ifunc_sections (struct bfd_link_info *info) flags | SEC_READONLY | SEC_CODE); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; htab->root.iplt = s; } @@ -3836,7 +3836,7 @@ create_ifunc_sections (struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->root.irelplt = s; } @@ -3845,15 +3845,15 @@ create_ifunc_sections (struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (dynobj, ".igot.plt", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->root.igotplt = s; } - return TRUE; + return true; } /* Determine if we're dealing with a Thumb only architecture. */ -static bfd_boolean +static bool using_thumb_only (struct elf32_arm_link_hash_table *globals) { int arch; @@ -3874,14 +3874,14 @@ using_thumb_only (struct elf32_arm_link_hash_table *globals) || arch == TAG_CPU_ARCH_V8M_BASE || arch == TAG_CPU_ARCH_V8M_MAIN || arch == TAG_CPU_ARCH_V8_1M_MAIN) - return TRUE; + return true; - return FALSE; + return false; } /* Determine if we're dealing with a Thumb-2 object. */ -static bfd_boolean +static bool using_thumb2 (struct elf32_arm_link_hash_table *globals) { int arch; @@ -3907,7 +3907,7 @@ using_thumb2 (struct elf32_arm_link_hash_table *globals) /* Determine whether Thumb-2 BL instruction is available. */ -static bfd_boolean +static bool using_thumb2_bl (struct elf32_arm_link_hash_table *globals) { int arch = @@ -3925,25 +3925,25 @@ using_thumb2_bl (struct elf32_arm_link_hash_table *globals) .rel(a).bss sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool elf32_arm_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { struct elf32_arm_link_hash_table *htab; htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (!htab->root.sgot && !create_got_section (dynobj, info)) - return FALSE; + return false; if (!_bfd_elf_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; if (htab->root.target_os == is_vxworks) { if (!elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2)) - return FALSE; + return false; if (bfd_link_pic (info)) { @@ -3993,7 +3993,7 @@ elf32_arm_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) || (!bfd_link_pic (info) && !htab->root.srelbss)) abort (); - return TRUE; + return true; } /* Copy the extra info we tack onto an elf_link_hash_entry. */ @@ -4079,7 +4079,7 @@ elf32_arm_link_hash_table_create (bfd *abfd) ret->plt_header_size = 20; ret->plt_entry_size = elf32_arm_use_long_plt_entry ? 16 : 12; #endif - ret->use_rel = TRUE; + ret->use_rel = true; ret->obfd = abfd; ret->fdpic_p = 0; @@ -4096,7 +4096,7 @@ elf32_arm_link_hash_table_create (bfd *abfd) /* Determine what kind of NOPs are available. */ -static bfd_boolean +static bool arch_has_arm_nop (struct elf32_arm_link_hash_table *globals) { const int arch = bfd_elf_get_obj_attr_int (globals->obfd, OBJ_ATTR_PROC, @@ -4112,7 +4112,7 @@ arch_has_arm_nop (struct elf32_arm_link_hash_table *globals) || arch == TAG_CPU_ARCH_V8R); } -static bfd_boolean +static bool arm_stub_is_thumb (enum elf32_arm_stub_type stub_type) { switch (stub_type) @@ -4126,13 +4126,13 @@ arm_stub_is_thumb (enum elf32_arm_stub_type stub_type) case arm_stub_long_branch_v4t_thumb_tls_pic: case arm_stub_long_branch_thumb_only_pic: case arm_stub_cmse_branch_thumb_only: - return TRUE; + return true; case arm_stub_none: BFD_FAIL (); - return FALSE; + return false; break; default: - return FALSE; + return false; } } @@ -4154,7 +4154,7 @@ arm_type_of_stub (struct bfd_link_info *info, bfd_signed_vma branch_offset; unsigned int r_type; struct elf32_arm_link_hash_table * globals; - bfd_boolean thumb2, thumb2_bl, thumb_only; + bool thumb2, thumb2_bl, thumb_only; enum elf32_arm_stub_type stub_type = arm_stub_none; int use_plt = 0; enum arm_st_branch_type branch_type = *actual_branch_type; @@ -4585,7 +4585,7 @@ elf32_arm_get_stub_entry (const asection *input_section, return NULL; stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, - stub_name, FALSE, FALSE); + stub_name, false, false); if (h != NULL) h->stub_cache = stub_entry; @@ -4598,7 +4598,7 @@ elf32_arm_get_stub_entry (const asection *input_section, /* Whether veneers of type STUB_TYPE require to be in a dedicated output section. */ -static bfd_boolean +static bool arm_dedicated_stub_output_section_required (enum elf32_arm_stub_type stub_type) { if (stub_type >= max_stub_type) @@ -4607,10 +4607,10 @@ arm_dedicated_stub_output_section_required (enum elf32_arm_stub_type stub_type) switch (stub_type) { case arm_stub_cmse_branch_thumb_only: - return TRUE; + return true; default: - return FALSE; + return false; } abort (); /* Should be unreachable. */ @@ -4701,7 +4701,7 @@ elf32_arm_create_or_find_stub_sec (asection **link_sec_p, asection *section, { asection *link_sec, *out_sec, **stub_sec_p; const char *stub_sec_prefix; - bfd_boolean dedicated_output_section = + bool dedicated_output_section = arm_dedicated_stub_output_section_required (stub_type); int align; @@ -4787,7 +4787,7 @@ elf32_arm_add_stub (const char *stub_name, asection *section, /* Enter this entry into the linker stub hash table. */ stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, - TRUE, FALSE); + true, false); if (stub_entry == NULL) { if (section == NULL) @@ -4881,7 +4881,7 @@ static bfd_reloc_status_type elf32_arm_final_link_relocate (reloc_howto_type *, bfd *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, bfd_vma, struct bfd_link_info *, asection *, const char *, unsigned char, enum arm_st_branch_type, - struct elf_link_hash_entry *, bfd_boolean *, char **); + struct elf_link_hash_entry *, bool *, char **); static unsigned int arm_stub_required_alignment (enum elf32_arm_stub_type stub_type) @@ -4925,7 +4925,7 @@ arm_stub_required_alignment (enum elf32_arm_stub_type stub_type) /* Returns whether stubs of type STUB_TYPE take over the symbol they are veneering (TRUE) or have their own symbol (FALSE). */ -static bfd_boolean +static bool arm_stub_sym_claimed (enum elf32_arm_stub_type stub_type) { if (stub_type >= max_stub_type) @@ -4934,10 +4934,10 @@ arm_stub_sym_claimed (enum elf32_arm_stub_type stub_type) switch (stub_type) { case arm_stub_cmse_branch_thumb_only: - return TRUE; + return true; default: - return FALSE; + return false; } abort (); /* Should be unreachable. */ @@ -4983,12 +4983,12 @@ arm_new_stubs_start_offset_ptr (struct elf32_arm_link_hash_table *htab, } } -static bfd_boolean +static bool arm_build_one_stub (struct bfd_hash_entry *gen_entry, void * in_arg) { #define MAXRELOCS 3 - bfd_boolean removed_sg_veneer; + bool removed_sg_veneer; struct elf32_arm_stub_hash_entry *stub_entry; struct elf32_arm_link_hash_table *globals; struct bfd_link_info *info; @@ -5019,14 +5019,14 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, globals = elf32_arm_hash_table (info); if (globals == NULL) - return FALSE; + return false; stub_sec = stub_entry->stub_sec; if ((globals->fix_cortex_a8 < 0) != (arm_stub_required_alignment (stub_entry->stub_type) == 2)) /* We have to do less-strictly-aligned fixes last. */ - return TRUE; + return true; /* Assign a slot at the end of section if none assigned yet. */ if (stub_entry->stub_offset == (bfd_vma) -1) @@ -5103,7 +5103,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, default: BFD_FAIL (); - return FALSE; + return false; } } @@ -5127,7 +5127,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, for (i = 0; i < nrelocs; i++) { Elf_Internal_Rela rel; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; char *error_message; bfd_vma points_to = sym_value + template_sequence[stub_reloc_idx[i]].reloc_addend; @@ -5156,7 +5156,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry, &error_message); } - return TRUE; + return true; #undef MAXRELOCS } @@ -5207,7 +5207,7 @@ find_stub_size_and_template (enum elf32_arm_stub_type stub_type, /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool arm_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UNUSED) { @@ -5234,12 +5234,12 @@ arm_size_one_stub (struct bfd_hash_entry *gen_entry, /* Already accounted for. */ if (stub_entry->stub_offset != (bfd_vma) -1) - return TRUE; + return true; size = (size + 7) & ~7; stub_entry->stub_sec->size += size; - return TRUE; + return true; } /* External entry points for sizing and building linker stubs. */ @@ -5363,7 +5363,7 @@ elf32_arm_next_input_section (struct bfd_link_info *info, static void group_sections (struct elf32_arm_link_hash_table *htab, bfd_size_type stub_group_size, - bfd_boolean stubs_always_after_branch) + bool stubs_always_after_branch) { asection **list = htab->input_list; @@ -5479,7 +5479,7 @@ static struct elf_link_hash_entry *find_thumb_glue (struct bfd_link_info *, NUM_A8_FIXES_P, A8_FIX_TABLE_SIZE_P. Returns true if an error occurs, false otherwise. */ -static bfd_boolean +static bool cortex_a8_erratum_scan (bfd *input_bfd, struct bfd_link_info *info, struct a8_erratum_fix **a8_fixes_p, @@ -5488,7 +5488,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, struct a8_erratum_reloc *a8_relocs, unsigned int num_a8_relocs, unsigned prev_num_a8_fixes, - bfd_boolean *stub_changed_p) + bool *stub_changed_p) { asection *section; struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); @@ -5497,7 +5497,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, unsigned int a8_fix_table_size = *a8_fix_table_size_p; if (htab == NULL) - return FALSE; + return false; for (section = input_bfd->sections; section != NULL; @@ -5520,7 +5520,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, if (elf_section_data (section)->this_hdr.contents != NULL) contents = elf_section_data (section)->this_hdr.contents; else if (! bfd_malloc_and_get_section (input_bfd, section, &contents)) - return TRUE; + return true; sec_data = elf32_arm_section_data (section); @@ -5531,7 +5531,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, ? section->size : sec_data->map[span + 1].vma; unsigned int i; char span_type = sec_data->map[span].type; - bfd_boolean last_was_32bit = FALSE, last_was_branch = FALSE; + bool last_was_32bit = false, last_was_branch = false; if (span_type != 't') continue; @@ -5551,11 +5551,11 @@ cortex_a8_erratum_scan (bfd *input_bfd, for (i = span_start; i < span_end;) { unsigned int insn = bfd_getl16 (&contents[i]); - bfd_boolean insn_32bit = FALSE, is_blx = FALSE, is_b = FALSE; - bfd_boolean is_bl = FALSE, is_bcc = FALSE, is_32bit_branch; + bool insn_32bit = false, is_blx = false, is_b = false; + bool is_bl = false, is_bcc = false, is_32bit_branch; if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0x0000) - insn_32bit = TRUE; + insn_32bit = true; if (insn_32bit) { @@ -5582,12 +5582,12 @@ cortex_a8_erratum_scan (bfd *input_bfd, && ! last_was_branch) { bfd_signed_vma offset = 0; - bfd_boolean force_target_arm = FALSE; - bfd_boolean force_target_thumb = FALSE; + bool force_target_arm = false; + bool force_target_thumb = false; bfd_vma target; enum elf32_arm_stub_type stub_type = arm_stub_none; struct a8_erratum_reloc key, *found; - bfd_boolean use_plt = FALSE; + bool use_plt = false; key.from = base_vma + i; found = (struct a8_erratum_reloc *) @@ -5606,20 +5606,20 @@ cortex_a8_erratum_scan (bfd *input_bfd, &error_message); if (entry) - found->non_a8_stub = TRUE; + found->non_a8_stub = true; /* Keep a simpler condition, for the sake of clarity. */ if (htab->root.splt != NULL && found->hash != NULL && found->hash->root.plt.offset != (bfd_vma) -1) - use_plt = TRUE; + use_plt = true; if (found->r_type == R_ARM_THM_CALL) { if (found->branch_type == ST_BRANCH_TO_ARM || use_plt) - force_target_arm = TRUE; + force_target_arm = true; else - force_target_thumb = TRUE; + force_target_thumb = true; } } @@ -5677,8 +5677,8 @@ cortex_a8_erratum_scan (bfd *input_bfd, && stub_type == arm_stub_a8_veneer_bl) { stub_type = arm_stub_a8_veneer_blx; - is_blx = TRUE; - is_bl = FALSE; + is_blx = true; + is_bl = false; } /* Conversely, if the original instruction was BLX but the target is Thumb mode, use the BL @@ -5687,8 +5687,8 @@ cortex_a8_erratum_scan (bfd *input_bfd, && stub_type == arm_stub_a8_veneer_blx) { stub_type = arm_stub_a8_veneer_bl; - is_blx = FALSE; - is_bl = TRUE; + is_blx = false; + is_bl = true; } if (is_blx) @@ -5741,7 +5741,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, { free (stub_name); stub_name = NULL; - *stub_changed_p = TRUE; + *stub_changed_p = true; } } @@ -5782,7 +5782,7 @@ cortex_a8_erratum_scan (bfd *input_bfd, *num_a8_fixes_p = num_a8_fixes; *a8_fix_table_size_p = a8_fix_table_size; - return FALSE; + return false; } /* Create or update a stub entry depending on whether the stub can already be @@ -5808,16 +5808,16 @@ elf32_arm_create_stub (struct elf32_arm_link_hash_table *htab, Elf_Internal_Rela *irela, asection *sym_sec, struct elf32_arm_link_hash_entry *hash, char *sym_name, bfd_vma sym_value, enum arm_st_branch_type branch_type, - bfd_boolean *new_stub) + bool *new_stub) { const asection *id_sec; char *stub_name; struct elf32_arm_stub_hash_entry *stub_entry; unsigned int r_type; - bfd_boolean sym_claimed = arm_stub_sym_claimed (stub_type); + bool sym_claimed = arm_stub_sym_claimed (stub_type); BFD_ASSERT (stub_type != arm_stub_none); - *new_stub = FALSE; + *new_stub = false; if (sym_claimed) stub_name = sym_name; @@ -5837,8 +5837,8 @@ elf32_arm_create_stub (struct elf32_arm_link_hash_table *htab, return NULL; } - stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, FALSE, - FALSE); + stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, false, + false); /* The proper stub has already been created, just update its value. */ if (stub_entry != NULL) { @@ -5893,7 +5893,7 @@ elf32_arm_create_stub (struct elf32_arm_link_hash_table *htab, sprintf (stub_entry->output_name, STUB_ENTRY_NAME, sym_name); } - *new_stub = TRUE; + *new_stub = true; return stub_entry; } @@ -5918,7 +5918,7 @@ elf32_arm_create_stub (struct elf32_arm_link_hash_table *htab, The return value gives whether a stub failed to be allocated. */ -static bfd_boolean +static bool cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, obj_attribute *out_attr, struct elf_link_hash_entry **sym_hashes, int *cmse_stub_created) @@ -5933,7 +5933,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, bfd_vma sym_value; asection *section; struct elf32_arm_stub_hash_entry *stub_entry; - bfd_boolean is_v8m, new_stub, cmse_invalid, ret = TRUE; + bool is_v8m, new_stub, cmse_invalid, ret = true; bed = get_elf_backend_data (input_bfd); symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; @@ -5948,12 +5948,12 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (symtab_hdr->sh_info && local_syms == NULL) - return FALSE; + return false; /* Scan symbols. */ for (i = 0; i < sym_count; i++) { - cmse_invalid = FALSE; + cmse_invalid = false; if (i < ext_start) { @@ -5965,7 +5965,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, continue; /* Special symbol with local binding. */ - cmse_invalid = TRUE; + cmse_invalid = true; } else { @@ -5978,7 +5978,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, if ((cmse_hash->root.root.type != bfd_link_hash_defined && cmse_hash->root.root.type != bfd_link_hash_defweak) || cmse_hash->root.type != STT_FUNC) - cmse_invalid = TRUE; + cmse_invalid = true; } if (!is_v8m) @@ -5986,8 +5986,8 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, _bfd_error_handler (_("%pB: special symbol `%s' only allowed for " "ARMv8-M architecture or later"), input_bfd, sym_name); - is_v8m = TRUE; /* Avoid multiple warning. */ - ret = FALSE; + is_v8m = true; /* Avoid multiple warning. */ + ret = false; } if (cmse_invalid) @@ -5995,14 +5995,14 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, _bfd_error_handler (_("%pB: invalid special symbol `%s'; it must be" " a global or weak function symbol"), input_bfd, sym_name); - ret = FALSE; + ret = false; if (i < ext_start) continue; } sym_name += strlen (CMSE_PREFIX); hash = (struct elf32_arm_link_hash_entry *) - elf_link_hash_lookup (&(htab)->root, sym_name, FALSE, FALSE, TRUE); + elf_link_hash_lookup (&(htab)->root, sym_name, false, false, true); /* No associated normal symbol or it is neither global nor weak. */ if (!hash @@ -6038,7 +6038,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, else _bfd_error_handler (_("%pB: absent standard symbol `%s'"), input_bfd, sym_name); - ret = FALSE; + ret = false; if (!hash) continue; } @@ -6051,7 +6051,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, _bfd_error_handler (_("%pB: `%s' and its special symbol are in different sections"), input_bfd, sym_name); - ret = FALSE; + ret = false; } if (cmse_hash->root.root.u.def.value != sym_value) continue; /* Ignore: could be an entry function starting with SG. */ @@ -6069,7 +6069,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, { _bfd_error_handler (_("%pB: entry function `%s' is empty"), input_bfd, sym_name); - ret = FALSE; + ret = false; } if (!ret) @@ -6081,7 +6081,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, sym_value, branch_type, &new_stub); if (stub_entry == NULL) - ret = FALSE; + ret = false; else { BFD_ASSERT (new_stub); @@ -6098,7 +6098,7 @@ cmse_scan (bfd *input_bfd, struct elf32_arm_link_hash_table *htab, code entry function, ie can be called from non secure code without using a veneer. */ -static bfd_boolean +static bool cmse_entry_fct_p (struct elf32_arm_link_hash_entry *hash) { bfd_byte contents[4]; @@ -6110,9 +6110,9 @@ cmse_entry_fct_p (struct elf32_arm_link_hash_entry *hash) /* Defined symbol of function type. */ if (hash->root.root.type != bfd_link_hash_defined && hash->root.root.type != bfd_link_hash_defweak) - return FALSE; + return false; if (hash->root.type != STT_FUNC) - return FALSE; + return false; /* Read first instruction. */ section = hash->root.root.u.def.section; @@ -6120,7 +6120,7 @@ cmse_entry_fct_p (struct elf32_arm_link_hash_entry *hash) offset = hash->root.root.u.def.value - section->vma; if (!bfd_get_section_contents (abfd, section, contents, offset, sizeof (contents))) - return FALSE; + return false; first_insn = bfd_get_32 (abfd, contents); @@ -6132,7 +6132,7 @@ cmse_entry_fct_p (struct elf32_arm_link_hash_entry *hash) secure gateway veneers (ie. the veneers was not in the input import library) and there is no output import library (GEN_INFO->out_implib_bfd is NULL. */ -static bfd_boolean +static bool arm_list_new_cmse_stub (struct bfd_hash_entry *gen_entry, void *gen_info) { struct elf32_arm_stub_hash_entry *stub_entry; @@ -6143,15 +6143,15 @@ arm_list_new_cmse_stub (struct bfd_hash_entry *gen_entry, void *gen_info) info = (struct bfd_link_info *) gen_info; if (info->out_implib_bfd) - return TRUE; + return true; if (stub_entry->stub_type != arm_stub_cmse_branch_thumb_only) - return TRUE; + return true; if (stub_entry->stub_offset == (bfd_vma) -1) _bfd_error_handler (" %s", stub_entry->output_name); - return TRUE; + return true; } /* Set offset of each secure gateway veneers so that its address remain @@ -6167,7 +6167,7 @@ arm_list_new_cmse_stub (struct bfd_hash_entry *gen_entry, void *gen_info) and this function and HTAB->new_cmse_stub_offset is set to the biggest veneer observed set for new veneers to be layed out after. */ -static bfd_boolean +static bool set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, struct elf32_arm_link_hash_table *htab, int *cmse_stub_created) @@ -6178,7 +6178,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, long i, symcount; bfd *in_implib_bfd; asection *stub_out_sec; - bfd_boolean ret = TRUE; + bool ret = true; Elf_Internal_Sym *intsym; const char *out_sec_name; bfd_size_type cmse_stub_size; @@ -6192,30 +6192,30 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, /* No input secure gateway import library. */ if (!htab->in_implib_bfd) - return TRUE; + return true; in_implib_bfd = htab->in_implib_bfd; if (!htab->cmse_implib) { _bfd_error_handler (_("%pB: --in-implib only supported for Secure " "Gateway import libraries"), in_implib_bfd); - return FALSE; + return false; } /* Get symbol table size. */ symsize = bfd_get_symtab_upper_bound (in_implib_bfd); if (symsize < 0) - return FALSE; + return false; /* Read in the input secure gateway import library's symbol table. */ sympp = (asymbol **) bfd_malloc (symsize); if (sympp == NULL) - return FALSE; + return false; symcount = bfd_canonicalize_symtab (in_implib_bfd, sympp); if (symcount < 0) { - ret = FALSE; + ret = false; goto free_sym_buf; } @@ -6250,34 +6250,34 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, "symbol should be absolute, global and " "refer to Thumb functions"), in_implib_bfd, sym_name); - ret = FALSE; + ret = false; continue; } veneer_value = bfd_asymbol_value (sym); stub_offset = veneer_value - cmse_stub_sec_vma; stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, sym_name, - FALSE, FALSE); + false, false); hash = (struct elf32_arm_link_hash_entry *) - elf_link_hash_lookup (&(htab)->root, sym_name, FALSE, FALSE, TRUE); + elf_link_hash_lookup (&(htab)->root, sym_name, false, false, true); /* Stub entry should have been created by cmse_scan or the symbol be of a secure function callable from non secure code. */ if (!stub_entry && !hash) { - bfd_boolean new_stub; + bool new_stub; _bfd_error_handler (_("entry function `%s' disappeared from secure code"), sym_name); hash = (struct elf32_arm_link_hash_entry *) - elf_link_hash_lookup (&(htab)->root, sym_name, TRUE, TRUE, TRUE); + elf_link_hash_lookup (&(htab)->root, sym_name, true, true, true); stub_entry = elf32_arm_create_stub (htab, arm_stub_cmse_branch_thumb_only, NULL, NULL, bfd_abs_section_ptr, hash, sym_name, veneer_value, ST_BRANCH_TO_THUMB, &new_stub); if (stub_entry == NULL) - ret = FALSE; + ret = false; else { BFD_ASSERT (new_stub); @@ -6294,7 +6294,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, { _bfd_error_handler (_("`%s' refers to a non entry function"), sym_name); - ret = FALSE; + ret = false; } continue; } @@ -6318,7 +6318,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, { _bfd_error_handler (_("%pB: incorrect size for symbol `%s'"), in_implib_bfd, sym_name); - ret = FALSE; + ret = false; } /* Previous veneer address is before current SG veneer section. */ @@ -6328,7 +6328,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, if (stub_entry) stub_entry->stub_offset = 0; stub_offset = 0; - ret = FALSE; + ret = false; } /* Complain if stub offset not a multiple of stub size. */ @@ -6337,7 +6337,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, _bfd_error_handler (_("offset of veneer for entry function `%s' not a multiple of " "its size"), sym_name); - ret = FALSE; + ret = false; } if (!ret) @@ -6365,7 +6365,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, _bfd_error_handler (_("start address of `%s' is different from previous link"), out_sec_name); - ret = FALSE; + ret = false; } free_sym_buf: @@ -6379,7 +6379,7 @@ set_cmse_veneer_addr_from_implib (struct bfd_link_info *info, PC-relative calls to a target that is unreachable with a "bl" instruction. */ -bfd_boolean +bool elf32_arm_size_stubs (bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info, @@ -6389,11 +6389,11 @@ elf32_arm_size_stubs (bfd *output_bfd, unsigned int), void (*layout_sections_again) (void)) { - bfd_boolean ret = TRUE; + bool ret = true; obj_attribute *out_attr; int cmse_stub_created = 0; bfd_size_type stub_group_size; - bfd_boolean m_profile, stubs_always_after_branch, first_veneer_scan = TRUE; + bool m_profile, stubs_always_after_branch, first_veneer_scan = true; struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); struct a8_erratum_fix *a8_fixes = NULL; unsigned int num_a8_fixes = 0, a8_fix_table_size = 10; @@ -6401,7 +6401,7 @@ elf32_arm_size_stubs (bfd *output_bfd, unsigned int num_a8_relocs = 0, a8_reloc_table_size = 10, i; if (htab == NULL) - return FALSE; + return false; if (htab->fix_cortex_a8) { @@ -6468,7 +6468,7 @@ elf32_arm_size_stubs (bfd *output_bfd, unsigned int bfd_indx; asection *stub_sec; enum elf32_arm_stub_type stub_type; - bfd_boolean stub_changed = FALSE; + bool stub_changed = false; unsigned prev_num_a8_fixes = num_a8_fixes; num_a8_fixes = 0; @@ -6506,7 +6506,7 @@ elf32_arm_size_stubs (bfd *output_bfd, goto error_ret_free_local; if (cmse_stub_created != 0) - stub_changed = TRUE; + stub_changed = true; } /* Walk over each section attached to the input bfd. */ @@ -6549,7 +6549,7 @@ elf32_arm_size_stubs (bfd *output_bfd, const char *sym_name; unsigned char st_type; enum arm_st_branch_type branch_type; - bfd_boolean created_stub = FALSE; + bool created_stub = false; r_type = ELF32_R_TYPE (irela->r_info); r_indx = ELF32_R_SYM (irela->r_info); @@ -6564,7 +6564,7 @@ elf32_arm_size_stubs (bfd *output_bfd, error_ret_free_local: if (symtab_hdr->contents != (unsigned char *) local_syms) free (local_syms); - return FALSE; + return false; } hash = NULL; @@ -6735,7 +6735,7 @@ elf32_arm_size_stubs (bfd *output_bfd, do { - bfd_boolean new_stub; + bool new_stub; struct elf32_arm_stub_hash_entry *stub_entry; /* Determine what (if any) linker stub is needed. */ @@ -6760,7 +6760,7 @@ elf32_arm_size_stubs (bfd *output_bfd, else if (!new_stub) break; else - stub_changed = TRUE; + stub_changed = true; } while (0); @@ -6839,10 +6839,10 @@ elf32_arm_size_stubs (bfd *output_bfd, if (first_veneer_scan && !set_cmse_veneer_addr_from_implib (info, htab, &cmse_stub_created)) - ret = FALSE; + ret = false; if (prev_num_a8_fixes != num_a8_fixes) - stub_changed = TRUE; + stub_changed = true; if (!stub_changed) break; @@ -6908,7 +6908,7 @@ elf32_arm_size_stubs (bfd *output_bfd, a8_fixes[i].section, htab, a8_fixes[i].stub_type); if (stub_sec == NULL) - return FALSE; + return false; stub_sec->size += find_stub_size_and_template (a8_fixes[i].stub_type, NULL, @@ -6918,7 +6918,7 @@ elf32_arm_size_stubs (bfd *output_bfd, /* Ask the linker to do its stuff. */ (*htab->layout_sections_again) (); - first_veneer_scan = FALSE; + first_veneer_scan = false; } /* Add stubs for Cortex-A8 erratum fixes now. */ @@ -6936,12 +6936,12 @@ elf32_arm_size_stubs (bfd *output_bfd, int template_size, size = 0; stub_entry = arm_stub_hash_lookup (&htab->stub_hash_table, stub_name, - TRUE, FALSE); + true, false); if (stub_entry == NULL) { _bfd_error_handler (_("%pB: cannot create stub entry %s"), section->owner, stub_name); - return FALSE; + return false; } stub_entry->stub_sec = stub_sec; @@ -6982,7 +6982,7 @@ elf32_arm_size_stubs (bfd *output_bfd, functions here. This function is called via arm_elf_finish in the linker. */ -bfd_boolean +bool elf32_arm_build_stubs (struct bfd_link_info *info) { asection *stub_sec; @@ -6992,7 +6992,7 @@ elf32_arm_build_stubs (struct bfd_link_info *info) htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; for (stub_sec = htab->stub_bfd->sections; stub_sec != NULL; @@ -7011,7 +7011,7 @@ elf32_arm_build_stubs (struct bfd_link_info *info) size = stub_sec->size; stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) - return FALSE; + return false; stub_sec->size = 0; } @@ -7042,7 +7042,7 @@ elf32_arm_build_stubs (struct bfd_link_info *info) bfd_hash_traverse (table, arm_build_one_stub, info); } - return TRUE; + return true; } /* Locate the Thumb encoded calling stub for NAME. */ @@ -7069,7 +7069,7 @@ find_thumb_glue (struct bfd_link_info *link_info, sprintf (tmp_name, THUMB2ARM_GLUE_ENTRY_NAME, name); hash = elf_link_hash_lookup - (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE); + (&(hash_table)->root, tmp_name, false, false, true); if (hash == NULL && asprintf (error_message, _("unable to find %s glue '%s' for '%s'"), @@ -7104,7 +7104,7 @@ find_arm_glue (struct bfd_link_info *link_info, sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); myh = elf_link_hash_lookup - (&(hash_table)->root, tmp_name, FALSE, FALSE, TRUE); + (&(hash_table)->root, tmp_name, false, false, true); if (myh == NULL && asprintf (error_message, _("unable to find %s glue '%s' for '%s'"), @@ -7215,7 +7215,7 @@ arm_allocate_glue_section_space (bfd * abfd, bfd_size_type size, const char * na s->contents = contents; } -bfd_boolean +bool bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info) { struct elf32_arm_link_hash_table * globals; @@ -7243,7 +7243,7 @@ bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info * info) globals->bx_glue_size, ARM_BX_GLUE_SECTION_NAME); - return TRUE; + return true; } /* Allocate space and symbols for calling a Thumb function from Arm mode. @@ -7278,7 +7278,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info, sprintf (tmp_name, ARM2THUMB_GLUE_ENTRY_NAME, name); myh = elf_link_hash_lookup - (&(globals)->root, tmp_name, FALSE, FALSE, TRUE); + (&(globals)->root, tmp_name, false, false, true); if (myh != NULL) { @@ -7295,7 +7295,7 @@ record_arm_to_thumb_glue (struct bfd_link_info * link_info, val = globals->arm_glue_size + 1; _bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner, tmp_name, BSF_GLOBAL, s, val, - NULL, TRUE, FALSE, &bh); + NULL, true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); @@ -7355,7 +7355,7 @@ record_arm_bx_glue (struct bfd_link_info * link_info, int reg) sprintf (tmp_name, ARM_BX_GLUE_ENTRY_NAME, reg); myh = elf_link_hash_lookup - (&(globals)->root, tmp_name, FALSE, FALSE, FALSE); + (&(globals)->root, tmp_name, false, false, false); BFD_ASSERT (myh == NULL); @@ -7363,7 +7363,7 @@ record_arm_bx_glue (struct bfd_link_info * link_info, int reg) val = globals->bx_glue_size; _bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner, tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val, - NULL, TRUE, FALSE, &bh); + NULL, true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); @@ -7447,7 +7447,7 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, hash_table->num_vfp11_fixes); myh = elf_link_hash_lookup - (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE); + (&(hash_table)->root, tmp_name, false, false, false); BFD_ASSERT (myh == NULL); @@ -7455,7 +7455,7 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, val = hash_table->vfp11_erratum_glue_size; _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val, - NULL, TRUE, FALSE, &bh); + NULL, true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); @@ -7480,7 +7480,7 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, hash_table->num_vfp11_fixes); myh = elf_link_hash_lookup - (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE); + (&(hash_table)->root, tmp_name, false, false, false); if (myh != NULL) abort (); @@ -7488,7 +7488,7 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, bh = NULL; val = offset + 4; _bfd_generic_link_add_one_symbol (link_info, branch_bfd, tmp_name, BSF_LOCAL, - branch_sec, val, NULL, TRUE, FALSE, &bh); + branch_sec, val, NULL, true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); @@ -7506,7 +7506,7 @@ record_vfp11_erratum_veneer (struct bfd_link_info *link_info, _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, "$a", BSF_LOCAL, s, 0, NULL, - TRUE, FALSE, &bh); + true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE); @@ -7566,7 +7566,7 @@ record_stm32l4xx_erratum_veneer (struct bfd_link_info *link_info, hash_table->num_stm32l4xx_fixes); myh = elf_link_hash_lookup - (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE); + (&(hash_table)->root, tmp_name, false, false, false); BFD_ASSERT (myh == NULL); @@ -7574,7 +7574,7 @@ record_stm32l4xx_erratum_veneer (struct bfd_link_info *link_info, val = hash_table->stm32l4xx_erratum_glue_size; _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, tmp_name, BSF_FUNCTION | BSF_LOCAL, s, val, - NULL, TRUE, FALSE, &bh); + NULL, true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); @@ -7599,7 +7599,7 @@ record_stm32l4xx_erratum_veneer (struct bfd_link_info *link_info, hash_table->num_stm32l4xx_fixes); myh = elf_link_hash_lookup - (&(hash_table)->root, tmp_name, FALSE, FALSE, FALSE); + (&(hash_table)->root, tmp_name, false, false, false); if (myh != NULL) abort (); @@ -7607,7 +7607,7 @@ record_stm32l4xx_erratum_veneer (struct bfd_link_info *link_info, bh = NULL; val = offset + 4; _bfd_generic_link_add_one_symbol (link_info, branch_bfd, tmp_name, BSF_LOCAL, - branch_sec, val, NULL, TRUE, FALSE, &bh); + branch_sec, val, NULL, true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); @@ -7624,7 +7624,7 @@ record_stm32l4xx_erratum_veneer (struct bfd_link_info *link_info, _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner, "$t", BSF_LOCAL, s, 0, NULL, - TRUE, FALSE, &bh); + true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_NOTYPE); @@ -7651,7 +7651,7 @@ record_stm32l4xx_erratum_veneer (struct bfd_link_info *link_info, /* Create a fake section for use by the ARM backend of the linker. */ -static bfd_boolean +static bool arm_make_glue_section (bfd * abfd, const char * name) { asection * sec; @@ -7659,19 +7659,19 @@ arm_make_glue_section (bfd * abfd, const char * name) sec = bfd_get_linker_section (abfd, name); if (sec != NULL) /* Already made. */ - return TRUE; + return true; sec = bfd_make_section_anyway_with_flags (abfd, name, ARM_GLUE_SECTION_FLAGS); if (sec == NULL || !bfd_set_section_alignment (sec, 2)) - return FALSE; + return false; /* Set the gc mark to prevent the section from being removed by garbage collection, despite the fact that no relocs refer to this section. */ sec->gc_mark = 1; - return TRUE; + return true; } /* Set size of .plt entries. This function is called from the @@ -7680,25 +7680,25 @@ arm_make_glue_section (bfd * abfd, const char * name) void bfd_elf32_arm_use_long_plt (void) { - elf32_arm_use_long_plt_entry = TRUE; + elf32_arm_use_long_plt_entry = true; } /* Add the glue sections to ABFD. This function is called from the linker scripts in ld/emultempl/{armelf}.em. */ -bfd_boolean +bool bfd_elf32_arm_add_glue_sections_to_bfd (bfd *abfd, struct bfd_link_info *info) { struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (info); - bfd_boolean dostm32l4xx = globals + bool dostm32l4xx = globals && globals->stm32l4xx_fix != BFD_ARM_STM32L4XX_FIX_NONE; - bfd_boolean addglue; + bool addglue; /* If we are only performing a partial link do not bother adding the glue. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; addglue = arm_make_glue_section (abfd, ARM2THUMB_GLUE_SECTION_NAME) && arm_make_glue_section (abfd, THUMB2ARM_GLUE_SECTION_NAME) @@ -7747,7 +7747,7 @@ bfd_elf32_arm_keep_private_stub_output_sections (struct bfd_link_info *info) This function is called from the linker scripts in ld/emultempl/ {armelf/pe}.em. */ -bfd_boolean +bool bfd_elf32_arm_get_bfd_for_interworking (bfd *abfd, struct bfd_link_info *info) { struct elf32_arm_link_hash_table *globals; @@ -7755,7 +7755,7 @@ bfd_elf32_arm_get_bfd_for_interworking (bfd *abfd, struct bfd_link_info *info) /* If we are only performing a partial link do not bother getting a bfd to hold the glue. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; /* Make sure we don't attach the glue sections to a dynamic object. */ BFD_ASSERT (!(abfd->flags & DYNAMIC)); @@ -7764,12 +7764,12 @@ bfd_elf32_arm_get_bfd_for_interworking (bfd *abfd, struct bfd_link_info *info) BFD_ASSERT (globals != NULL); if (globals->bfd_of_glue_owner != NULL) - return TRUE; + return true; /* Save the bfd for later use. */ globals->bfd_of_glue_owner = abfd; - return TRUE; + return true; } static void @@ -7792,7 +7792,7 @@ check_use_blx (struct elf32_arm_link_hash_table *globals) } } -bfd_boolean +bool bfd_elf32_arm_process_before_allocation (bfd *abfd, struct bfd_link_info *link_info) { @@ -7807,7 +7807,7 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, /* If we are only performing a partial link do not bother to construct any glue. */ if (bfd_link_relocatable (link_info)) - return TRUE; + return true; /* Here we have a bfd that is to be included on the link. We have a hook to do reloc rummaging, before section sizes are nailed down. */ @@ -7820,20 +7820,20 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, { _bfd_error_handler (_("%pB: BE8 images only valid in big-endian mode"), abfd); - return FALSE; + return false; } /* PR 5398: If we have not decided to include any loadable sections in the output then we will not have a glue owner bfd. This is OK, it just means that there is nothing else for us to do here. */ if (globals->bfd_of_glue_owner == NULL) - return TRUE; + return true; /* Rummage around all the relocs and map the glue vectors. */ sec = abfd->sections; if (sec == NULL) - return TRUE; + return true; for (; sec != NULL; sec = sec->next) { @@ -7847,7 +7847,7 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, /* Load the relocs. */ internal_relocs - = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, FALSE); + = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, false); if (internal_relocs == NULL) goto error_return; @@ -7938,7 +7938,7 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, internal_relocs = NULL; } - return TRUE; + return true; error_return: if (elf_section_data (sec)->this_hdr.contents != contents) @@ -7946,7 +7946,7 @@ bfd_elf32_arm_process_before_allocation (bfd *abfd, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } #endif @@ -8098,7 +8098,7 @@ enum bfd_arm_vfp11_pipe encounter VFP3 instructions, so we allow the full range for DP registers. */ static unsigned int -bfd_arm_vfp11_regno (unsigned int insn, bfd_boolean is_double, unsigned int rx, +bfd_arm_vfp11_regno (unsigned int insn, bool is_double, unsigned int rx, unsigned int x) { if (is_double) @@ -8121,7 +8121,7 @@ bfd_arm_vfp11_write_mask (unsigned int *wmask, unsigned int reg) /* Return TRUE if WMASK overwrites anything in REGS. */ -static bfd_boolean +static bool bfd_arm_vfp11_antidependency (unsigned int wmask, int *regs, int numregs) { int i; @@ -8131,7 +8131,7 @@ bfd_arm_vfp11_antidependency (unsigned int wmask, int *regs, int numregs) unsigned int reg = regs[i]; if (reg < 32 && (wmask & (1 << reg)) != 0) - return TRUE; + return true; reg -= 32; @@ -8139,10 +8139,10 @@ bfd_arm_vfp11_antidependency (unsigned int wmask, int *regs, int numregs) continue; if ((wmask & (3 << (reg * 2))) != 0) - return TRUE; + return true; } - return FALSE; + return false; } /* In this function, we're interested in two things: finding input registers @@ -8158,7 +8158,7 @@ bfd_arm_vfp11_insn_decode (unsigned int insn, unsigned int *destmask, int *regs, int *numregs) { enum bfd_arm_vfp11_pipe vpipe = VFP11_BAD; - bfd_boolean is_double = ((insn & 0xf00) == 0xb00) ? 1 : 0; + bool is_double = ((insn & 0xf00) == 0xb00) ? 1 : 0; if ((insn & 0x0f000e10) == 0x0e000a00) /* A data-processing insn. */ { @@ -8346,7 +8346,7 @@ static int elf32_arm_compare_mapping (const void * a, const void * b); (available from ARM) for details of the erratum. A short version is described in ld.texinfo. */ -bfd_boolean +bool bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) { asection *sec; @@ -8357,7 +8357,7 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) int use_vector = (globals->vfp11_fix == BFD_ARM_VFP11_FIX_VECTOR); if (globals == NULL) - return FALSE; + return false; /* We use a simple FSM to match troublesome VFP11 instruction sequences. The states transition as follows: @@ -8388,21 +8388,21 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) /* If we are only performing a partial link do not bother to construct any glue. */ if (bfd_link_relocatable (link_info)) - return TRUE; + return true; /* Skip if this bfd does not correspond to an ELF image. */ if (! is_arm_elf (abfd)) - return TRUE; + return true; /* We should have chosen a fix type by the time we get here. */ BFD_ASSERT (globals->vfp11_fix != BFD_ARM_VFP11_FIX_DEFAULT); if (globals->vfp11_fix == BFD_ARM_VFP11_FIX_NONE) - return TRUE; + return true; /* Skip this BFD if it corresponds to an executable or dynamic object. */ if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) - return TRUE; + return true; for (sec = abfd->sections; sec != NULL; sec = sec->next) { @@ -8551,13 +8551,13 @@ bfd_elf32_arm_vfp11_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) contents = NULL; } - return TRUE; + return true; error_return: if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); - return FALSE; + return false; } /* Find virtual-memory addresses for VFP11 erratum veneers and return locations @@ -8605,7 +8605,7 @@ bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *abfd, errnode->u.b.veneer->u.v.id); myh = elf_link_hash_lookup - (&(globals)->root, tmp_name, FALSE, FALSE, TRUE); + (&(globals)->root, tmp_name, false, false, true); if (myh == NULL) _bfd_error_handler (_("%pB: unable to find %s veneer `%s'"), @@ -8625,7 +8625,7 @@ bfd_elf32_arm_vfp11_fix_veneer_locations (bfd *abfd, errnode->u.v.id); myh = elf_link_hash_lookup - (&(globals)->root, tmp_name, FALSE, FALSE, TRUE); + (&(globals)->root, tmp_name, false, false, true); if (myh == NULL) _bfd_error_handler (_("%pB: unable to find %s veneer `%s'"), @@ -8692,7 +8692,7 @@ bfd_elf32_arm_stm32l4xx_fix_veneer_locations (bfd *abfd, errnode->u.b.veneer->u.v.id); myh = elf_link_hash_lookup - (&(globals)->root, tmp_name, FALSE, FALSE, TRUE); + (&(globals)->root, tmp_name, false, false, true); if (myh == NULL) _bfd_error_handler (_("%pB: unable to find %s veneer `%s'"), @@ -8711,7 +8711,7 @@ bfd_elf32_arm_stm32l4xx_fix_veneer_locations (bfd *abfd, errnode->u.v.id); myh = elf_link_hash_lookup - (&(globals)->root, tmp_name, FALSE, FALSE, TRUE); + (&(globals)->root, tmp_name, false, false, true); if (myh == NULL) _bfd_error_handler (_("%pB: unable to find %s veneer `%s'"), @@ -8733,7 +8733,7 @@ bfd_elf32_arm_stm32l4xx_fix_veneer_locations (bfd *abfd, free (tmp_name); } -static inline bfd_boolean +static inline bool is_thumb2_ldmia (const insn32 insn) { /* Encoding T2: LDM.W {!}, @@ -8741,7 +8741,7 @@ is_thumb2_ldmia (const insn32 insn) return (insn & 0xffd02000) == 0xe8900000; } -static inline bfd_boolean +static inline bool is_thumb2_ldmdb (const insn32 insn) { /* Encoding T1: LDMDB {!}, @@ -8749,7 +8749,7 @@ is_thumb2_ldmdb (const insn32 insn) return (insn & 0xffd02000) == 0xe9100000; } -static inline bfd_boolean +static inline bool is_thumb2_vldm (const insn32 insn) { /* A6.5 Extension register load or store instruction @@ -8781,7 +8781,7 @@ is_thumb2_vldm (const insn32 insn) . replaces only if > 8-word accesses . or (testing purposes only) replaces all accesses. */ -static bfd_boolean +static bool stm32l4xx_need_create_replacing_stub (const insn32 insn, bfd_arm_stm32l4xx_fix stm32l4xx_fix) { @@ -8804,7 +8804,7 @@ stm32l4xx_need_create_replacing_stub (const insn32 insn, /* Look for potentially-troublesome code sequences which might trigger the STM STM32L4XX erratum. */ -bfd_boolean +bool bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, struct bfd_link_info *link_info) { @@ -8813,23 +8813,23 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (link_info); if (globals == NULL) - return FALSE; + return false; /* If we are only performing a partial link do not bother to construct any glue. */ if (bfd_link_relocatable (link_info)) - return TRUE; + return true; /* Skip if this bfd does not correspond to an ELF image. */ if (! is_arm_elf (abfd)) - return TRUE; + return true; if (globals->stm32l4xx_fix == BFD_ARM_STM32L4XX_FIX_NONE) - return TRUE; + return true; /* Skip this BFD if it corresponds to an executable or dynamic object. */ if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) - return TRUE; + return true; for (sec = abfd->sections; sec != NULL; sec = sec->next) { @@ -8876,17 +8876,17 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, for (i = span_start; i < span_end;) { unsigned int insn = bfd_get_16 (abfd, &contents[i]); - bfd_boolean insn_32bit = FALSE; - bfd_boolean is_ldm = FALSE; - bfd_boolean is_vldm = FALSE; - bfd_boolean is_not_last_in_it_block = FALSE; + bool insn_32bit = false; + bool is_ldm = false; + bool is_vldm = false; + bool is_not_last_in_it_block = false; /* The first 16-bits of all 32-bit thumb2 instructions start with opcode[15..13]=0b111 and the encoded op1 can be anything except opcode[12..11]!=0b00. See 32-bit Thumb instruction encoding. */ if ((insn & 0xe000) == 0xe000 && (insn & 0x1800) != 0x0000) - insn_32bit = TRUE; + insn_32bit = true; /* Compute the predicate that tells if the instruction is concerned by the IT block @@ -8964,7 +8964,7 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, There can be no nested IT blocks so an IT block is naturally a new one for which it is worth computing its size. */ - bfd_boolean is_newitblock = ((insn & 0xff00) == 0xbf00) + bool is_newitblock = ((insn & 0xff00) == 0xbf00) && ((insn & 0x000f) != 0x0000); /* If we have a new IT block we compute its size. */ if (is_newitblock) @@ -8986,13 +8986,13 @@ bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *abfd, contents = NULL; } - return TRUE; + return true; error_return: if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); - return FALSE; + return false; } /* Set target relocation values needed during linking. */ @@ -9090,7 +9090,7 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info, myh = find_thumb_glue (info, name, error_message); if (myh == NULL) - return FALSE; + return false; globals = elf32_arm_hash_table (info); BFD_ASSERT (globals != NULL); @@ -9116,7 +9116,7 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info, " first occurrence: %pB: %s call to %s"), sym_sec->owner, name, input_bfd, "Thumb", "ARM"); - return FALSE; + return false; } --my_offset; @@ -9165,7 +9165,7 @@ elf32_thumb_to_arm_stub (struct bfd_link_info * info, insert_thumb_branch (input_bfd, ret_offset, hit_data - input_section->vma); - return TRUE; + return true; } /* Populate an Arm to Thumb stub. Returns the stub symbol. */ @@ -9298,7 +9298,7 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info, myh = elf32_arm_create_thumb_stub (info, name, input_bfd, output_bfd, sym_sec, val, s, error_message); if (!myh) - return FALSE; + return false; my_offset = myh->root.u.def.value; tmp = bfd_get_32 (input_bfd, hit_data); @@ -9317,12 +9317,12 @@ elf32_arm_to_thumb_stub (struct bfd_link_info * info, bfd_put_32 (output_bfd, (bfd_vma) tmp, hit_data - input_section->vma); - return TRUE; + return true; } /* Populate Arm stub for an exported Thumb function. */ -static bfd_boolean +static bool elf32_arm_to_thumb_export_stub (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info * info = (struct bfd_link_info *) inf; @@ -9337,7 +9337,7 @@ elf32_arm_to_thumb_export_stub (struct elf_link_hash_entry *h, void * inf) eh = elf32_arm_hash_entry (h); /* Allocate stubs for exported Thumb functions on v4t. */ if (eh->export_glue == NULL) - return TRUE; + return true; globals = elf32_arm_hash_table (info); BFD_ASSERT (globals != NULL); @@ -9361,7 +9361,7 @@ elf32_arm_to_thumb_export_stub (struct elf_link_hash_entry *h, void * inf) globals->obfd, sec, val, s, &error_message); BFD_ASSERT (myh); - return TRUE; + return true; } /* Populate ARMv4 BX veneers. Returns the absolute adress of the veneer. */ @@ -9488,7 +9488,7 @@ elf32_arm_add_dynreloc (bfd *output_bfd, struct bfd_link_info *info, static void elf32_arm_allocate_plt_entry (struct bfd_link_info *info, - bfd_boolean is_iplt_entry, + bool is_iplt_entry, union gotplt_union *root_plt, struct arm_plt_info *arm_plt) { @@ -9582,7 +9582,7 @@ arm_movt_immediate (bfd_vma value) Returns FALSE if there was a problem. */ -static bfd_boolean +static bool elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info, union gotplt_union *root_plt, struct arm_plt_info *arm_plt, @@ -9791,7 +9791,7 @@ elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info, instructions... */ _bfd_error_handler (_("%pB: warning: thumb-1 mode PLT generation not currently supported"), output_bfd); - return FALSE; + return false; } /* Calculate the displacement between the PLT slot and the entry in @@ -9954,7 +9954,7 @@ elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Some relocations map to different relocations depending on the @@ -10259,7 +10259,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, unsigned char st_type, enum arm_st_branch_type branch_type, struct elf_link_hash_entry * h, - bfd_boolean * unresolved_reloc_p, + bool * unresolved_reloc_p, char ** error_message) { unsigned long r_type = howto->type; @@ -10281,8 +10281,8 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, struct arm_plt_info *arm_plt; bfd_vma plt_offset; bfd_vma gotplt_offset; - bfd_boolean has_iplt_entry; - bfd_boolean resolved_to_zero; + bool has_iplt_entry; + bool resolved_to_zero; globals = elf32_arm_hash_table (info); if (globals == NULL) @@ -10353,7 +10353,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* Find out whether the symbol has a PLT. Set ST_VALUE, BRANCH_TYPE and VALUE appropriately for relocations that we resolve at link time. */ - has_iplt_entry = FALSE; + has_iplt_entry = false; if (elf32_arm_get_plt_info (input_bfd, globals, eh, r_symndx, &root_plt, &arm_plt) && root_plt->offset != (bfd_vma) -1) @@ -10363,7 +10363,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, if (h == NULL || eh->is_iplt) { - has_iplt_entry = TRUE; + has_iplt_entry = true; splt = globals->root.iplt; /* Populate .iplt entries here, because not all of them will @@ -10414,7 +10414,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, case R_ARM_NONE: /* We don't need to find a value for this symbol. It's just a marker. */ - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; return bfd_reloc_ok; case R_ARM_ABS12: @@ -10453,7 +10453,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, value = (splt->output_section->vma + splt->output_offset + plt_offset); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; return _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, value, rel->r_addend); @@ -10484,7 +10484,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, && r_type != R_ARM_PLT32) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; int isrofixup = 0; if ((r_type == R_ARM_REL32 || r_type == R_ARM_REL32_NOI) @@ -10502,7 +10502,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, return bfd_reloc_notsupported; } - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; if (sreloc == NULL && globals->root.dynamic_sections_created) { @@ -10513,17 +10513,17 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, return bfd_reloc_notsupported; } - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_addend = addend; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -10558,7 +10558,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, else outrel.r_info = ELF32_R_INFO (symbol, R_ARM_RELATIVE); if (globals->use_rel) - relocate = TRUE; + relocate = true; else outrel.r_addend += dynreloc_value; } @@ -10649,7 +10649,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, + stub_entry->stub_sec->output_section->vma); if (plt_offset != (bfd_vma) -1) - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; } } else @@ -10661,7 +10661,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, value = (splt->output_section->vma + splt->output_offset + plt_offset); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; /* The PLT entry is in ARM mode, regardless of the target function. */ branch_type = ST_BRANCH_TO_ARM; @@ -10958,7 +10958,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, { bfd_vma relocation; bfd_vma reloc_sign; - bfd_boolean overflow = FALSE; + bool overflow = false; bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data); bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2); bfd_signed_vma reloc_signed_max; @@ -11085,7 +11085,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, + stub_entry->stub_sec->output_section->vma); if (plt_offset != (bfd_vma) -1) - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; } /* If this call becomes a call to Arm, force BLX. */ @@ -11123,7 +11123,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, value -= PLT_THUMB_STUB_SIZE; branch_type = ST_BRANCH_TO_THUMB; } - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; } relocation = value + signed_addend; @@ -11152,7 +11152,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* Assumes two's complement. */ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min) - overflow = TRUE; + overflow = true; if ((lower_insn & 0x5000) == 0x4000) /* For a BLX instruction, make sure that the relocation is rounded up @@ -11185,7 +11185,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, /* Thumb32 conditional branch instruction. */ { bfd_vma relocation; - bfd_boolean overflow = FALSE; + bool overflow = false; bfd_vma upper_insn = bfd_get_16 (input_bfd, hit_data); bfd_vma lower_insn = bfd_get_16 (input_bfd, hit_data + 2); bfd_signed_vma reloc_signed_max = 0xffffe; @@ -11222,7 +11222,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, + plt_offset); /* Target the Thumb stub before the ARM PLT entry. */ value -= PLT_THUMB_STUB_SIZE; - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; } hash = (struct elf32_arm_link_hash_entry *)h; @@ -11252,7 +11252,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, signed_check = (bfd_signed_vma) relocation; if (signed_check > reloc_signed_max || signed_check < reloc_signed_min) - overflow = TRUE; + overflow = true; /* Put RELOCATION back into the insn. */ { @@ -11376,7 +11376,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, if (sgot == NULL) return bfd_reloc_notsupported; - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; value = sgot->output_section->vma; return _bfd_final_link_relocate (howto, input_bfd, input_section, contents, rel->r_offset, value, @@ -11414,7 +11414,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, off &= ~1; if (globals->root.dynamic_sections_created && !SYMBOL_REFERENCES_LOCAL (info, h)) - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; } else { @@ -11431,7 +11431,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, if (globals->root.dynamic_sections_created) { outrel.r_info = ELF32_R_INFO (h->dynindx, R_ARM_GLOB_DAT); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; } else outrel.r_info = 0; @@ -11628,7 +11628,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, if (h != NULL) { - bfd_boolean dyn; + bool dyn; dyn = globals->root.dynamic_sections_created; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), @@ -11636,7 +11636,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, && (!bfd_link_pic (info) || !SYMBOL_REFERENCES_LOCAL (info, h))) { - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; indx = h->dynindx; } off = h->got.offset; @@ -11662,7 +11662,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, off &= ~1; else { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; Elf_Internal_Rela outrel; int cur_off = off; @@ -11676,7 +11676,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, && !resolved_to_zero) || h->root.type != bfd_link_hash_undefweak)) { - need_relocs = TRUE; + need_relocs = true; BFD_ASSERT (srelgot != NULL); } @@ -12557,7 +12557,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, bfd_put_16 (input_bfd, insn, hit_data); } - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; return bfd_reloc_ok; case R_ARM_GOTOFFFUNCDESC: @@ -12618,7 +12618,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, dynindx, offset, addr, dynreloc_value, seg); } } - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; return bfd_reloc_ok; case R_ARM_GOTFUNCDESC: @@ -12699,7 +12699,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, abort(); } } - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; return bfd_reloc_ok; case R_ARM_FUNCDESC: @@ -12793,7 +12793,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto, } } } - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; return bfd_reloc_ok; case R_ARM_THM_BF16: @@ -13043,7 +13043,7 @@ elf32_arm_relocate_section (bfd * output_bfd, globals = elf32_arm_hash_table (info); if (globals == NULL) - return FALSE; + return false; symtab_hdr = & elf_symtab_hdr (input_bfd); sym_hashes = elf_sym_hashes (input_bfd); @@ -13062,7 +13062,7 @@ elf32_arm_relocate_section (bfd * output_bfd, bfd_reloc_status_type r; arelent bfd_reloc; char sym_type; - bfd_boolean unresolved_reloc = FALSE; + bool unresolved_reloc = false; char *error_message = NULL; r_symndx = ELF32_R_SYM (rel->r_info); @@ -13103,7 +13103,7 @@ elf32_arm_relocate_section (bfd * output_bfd, (info, bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name), input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); if (globals->use_rel) { @@ -13147,7 +13147,7 @@ elf32_arm_relocate_section (bfd * output_bfd, "%s relocation against SEC_MERGE section"), input_bfd, input_section, (uint64_t) rel->r_offset, howto->name); - return FALSE; + return false; } value = bfd_get_32 (input_bfd, contents + rel->r_offset); @@ -13205,7 +13205,7 @@ elf32_arm_relocate_section (bfd * output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -13318,7 +13318,7 @@ elf32_arm_relocate_section (bfd * output_bfd, (uint64_t) rel->r_offset, howto->name, h->root.root.string); - return FALSE; + return false; } if (r != bfd_reloc_ok) @@ -13337,7 +13337,7 @@ elf32_arm_relocate_section (bfd * output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -13365,7 +13365,7 @@ elf32_arm_relocate_section (bfd * output_bfd, } } - return TRUE; + return true; } /* Add a new unwind edit to the list described by HEAD, TAIL. If TINDEX is zero, @@ -13456,11 +13456,11 @@ insert_cantunwind_after(asection *text_sec, asection *exidx_sec) The edits are applied when the tables are written (in elf32_arm_write_section). */ -bfd_boolean +bool elf32_arm_fix_exidx_coverage (asection **text_section_order, unsigned int num_text_sections, struct bfd_link_info *info, - bfd_boolean merge_exidx_entries) + bool merge_exidx_entries) { bfd *inp; unsigned int last_second_word = 0, i; @@ -13626,10 +13626,10 @@ elf32_arm_fix_exidx_coverage (asection **text_section_order, && last_unwind_type != 0) insert_cantunwind_after(last_text_sec, last_exidx_sec); - return TRUE; + return true; } -static bfd_boolean +static bool elf32_arm_output_glue_section (struct bfd_link_info *info, bfd *obfd, bfd *ibfd, const char *name) { @@ -13637,31 +13637,31 @@ elf32_arm_output_glue_section (struct bfd_link_info *info, bfd *obfd, sec = bfd_get_linker_section (ibfd, name); if (sec == NULL || (sec->flags & SEC_EXCLUDE) != 0) - return TRUE; + return true; osec = sec->output_section; if (elf32_arm_write_section (obfd, info, sec, sec->contents)) - return TRUE; + return true; if (! bfd_set_section_contents (obfd, osec, sec->contents, sec->output_offset, sec->size)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool elf32_arm_final_link (bfd *abfd, struct bfd_link_info *info) { struct elf32_arm_link_hash_table *globals = elf32_arm_hash_table (info); asection *sec, *osec; if (globals == NULL) - return FALSE; + return false; /* Invoke the regular ELF backend linker to do all the work. */ if (!bfd_elf_final_link (abfd, info)) - return FALSE; + return false; /* Process stub sections (eg BE8 encoding, ...). */ struct elf32_arm_link_hash_table *htab = elf32_arm_hash_table (info); @@ -13676,7 +13676,7 @@ elf32_arm_final_link (bfd *abfd, struct bfd_link_info *info) elf32_arm_write_section (abfd, info, sec, sec->contents); if (! bfd_set_section_contents (abfd, osec, sec->contents, sec->output_offset, sec->size)) - return FALSE; + return false; } } @@ -13687,30 +13687,30 @@ elf32_arm_final_link (bfd *abfd, struct bfd_link_info *info) if (! elf32_arm_output_glue_section (info, abfd, globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME)) - return FALSE; + return false; if (! elf32_arm_output_glue_section (info, abfd, globals->bfd_of_glue_owner, THUMB2ARM_GLUE_SECTION_NAME)) - return FALSE; + return false; if (! elf32_arm_output_glue_section (info, abfd, globals->bfd_of_glue_owner, VFP11_ERRATUM_VENEER_SECTION_NAME)) - return FALSE; + return false; if (! elf32_arm_output_glue_section (info, abfd, globals->bfd_of_glue_owner, STM32L4XX_ERRATUM_VENEER_SECTION_NAME)) - return FALSE; + return false; if (! elf32_arm_output_glue_section (info, abfd, globals->bfd_of_glue_owner, ARM_BX_GLUE_SECTION_NAME)) - return FALSE; + return false; } - return TRUE; + return true; } /* Return a best guess for the machine number based on the attributes. */ @@ -13800,7 +13800,7 @@ bfd_arm_get_mach_from_attributes (bfd * abfd) /* Set the right machine number. */ -static bfd_boolean +static bool elf32_arm_object_p (bfd *abfd) { unsigned int mach; @@ -13816,12 +13816,12 @@ elf32_arm_object_p (bfd *abfd) } bfd_default_set_arch_mach (abfd, bfd_arch_arm, mach); - return TRUE; + return true; } /* Function to keep ARM specific flags in the ELF header. */ -static bfd_boolean +static bool elf32_arm_set_private_flags (bfd *abfd, flagword flags) { if (elf_flags_init (abfd) @@ -13842,22 +13842,22 @@ elf32_arm_set_private_flags (bfd *abfd, flagword flags) else { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; + elf_flags_init (abfd) = true; } - return TRUE; + return true; } /* Copy backend specific data from one object module to another. */ -static bfd_boolean +static bool elf32_arm_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { flagword in_flags; flagword out_flags; if (! is_arm_elf (ibfd) || ! is_arm_elf (obfd)) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; @@ -13868,11 +13868,11 @@ elf32_arm_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { /* Cannot mix APCS26 and APCS32 code. */ if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26)) - return FALSE; + return false; /* Cannot mix float APCS and non-float APCS code. */ if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT)) - return FALSE; + return false; /* If the src and dest have different interworking flags then turn off the interworking bit. */ @@ -13892,7 +13892,7 @@ elf32_arm_copy_private_bfd_data (bfd *ibfd, bfd *obfd) } elf_elfheader (obfd)->e_flags = in_flags; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; return _bfd_elf_copy_private_bfd_data (ibfd, obfd); } @@ -13961,7 +13961,7 @@ elf32_arm_obj_attrs_order (int num) } /* Attribute numbers >=64 (mod 128) can be safely ignored. */ -static bfd_boolean +static bool elf32_arm_obj_attrs_handle_unknown (bfd *abfd, int tag) { if ((tag & 127) < 64) @@ -13970,14 +13970,14 @@ elf32_arm_obj_attrs_handle_unknown (bfd *abfd, int tag) (_("%pB: unknown mandatory EABI object attribute %d"), abfd, tag); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { _bfd_error_handler (_("warning: %pB: unknown EABI object attribute %d"), abfd, tag); - return TRUE; + return true; } } @@ -14324,7 +14324,7 @@ tag_cpu_arch_combine (bfd *ibfd, int oldtag, int *secondary_compat_out, /* Query attributes object to see if integer divide instructions may be present in an object. */ -static bfd_boolean +static bool elf32_arm_attributes_accept_div (const obj_attribute *attr) { int arch = attr[Tag_CPU_arch].i; @@ -14335,28 +14335,28 @@ elf32_arm_attributes_accept_div (const obj_attribute *attr) case 0: /* Integer divide allowed if instruction contained in archetecture. */ if (arch == TAG_CPU_ARCH_V7 && (profile == 'R' || profile == 'M')) - return TRUE; + return true; else if (arch >= TAG_CPU_ARCH_V7E_M) - return TRUE; + return true; else - return FALSE; + return false; case 1: /* Integer divide explicitly prohibited. */ - return FALSE; + return false; default: /* Unrecognised case - treat as allowing divide everywhere. */ case 2: /* Integer divide allowed in ARM state. */ - return TRUE; + return true; } } /* Query attributes object to see if integer divide instructions are forbidden to be in the object. This is not the inverse of elf32_arm_attributes_accept_div. */ -static bfd_boolean +static bool elf32_arm_attributes_forbid_div (const obj_attribute *attr) { return attr[Tag_DIV_use].i == 1; @@ -14365,7 +14365,7 @@ elf32_arm_attributes_forbid_div (const obj_attribute *attr) /* Merge EABI object attributes from IBFD into OBFD. Raise an error if there are conflicting attributes. */ -static bfd_boolean +static bool elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -14375,20 +14375,20 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) 2 = weak requirement. */ static const int order_021[3] = {0, 2, 1}; int i; - bfd_boolean result = TRUE; + bool result = true; const char *sec_name = get_elf_backend_data (ibfd)->obj_attrs_section; /* Skip the linker stubs file. This preserves previous behavior of accepting unknown attributes in the first input file - but is that a bug? */ if (ibfd->flags & BFD_LINKER_CREATED) - return TRUE; + return true; /* Skip any input that hasn't attribute section. This enables to link object files without attribute section with any others. */ if (bfd_get_section_by_name (ibfd, sec_name) == NULL) - return TRUE; + return true; if (!elf_known_obj_attributes_proc (obfd)[0].i) { @@ -14412,7 +14412,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("Error: %pB has both the current and legacy " "Tag_MPextension_use attributes"), ibfd); - result = FALSE; + result = false; } out_attr[Tag_MPextension_use] = @@ -14442,7 +14442,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB uses VFP register arguments, %pB does not"), in_attr[Tag_ABI_VFP_args].i ? ibfd : obfd, in_attr[Tag_ABI_VFP_args].i ? obfd : ibfd); - result = FALSE; + result = false; } } @@ -14499,7 +14499,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) /* Return with error if failed to merge. */ if (arch_attr == -1) - return FALSE; + return false; out_attr[i].i = arch_attr; @@ -14571,7 +14571,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: %pB: 8-byte data alignment conflicts with %pB"), obfd, ibfd); - result = FALSE; */ + result = false; */ } /* Fall through. */ case Tag_ABI_FP_denormal: @@ -14601,7 +14601,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB: unable to merge virtualization attributes " "with %pB"), obfd, ibfd); - result = FALSE; + result = false; } } break; @@ -14628,7 +14628,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) ibfd, in_attr[i].i ? in_attr[i].i : '0', out_attr[i].i ? out_attr[i].i : '0'); - result = FALSE; + result = false; } } break; @@ -14773,7 +14773,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler (_("error: %pB: conflicting use of R9"), ibfd); - result = FALSE; + result = false; } if (out_attr[i].i == AEABI_R9_unused) out_attr[i].i = in_attr[i].i; @@ -14786,7 +14786,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: %pB: SB relative addressing conflicts with use of R9"), ibfd); - result = FALSE; + result = false; } /* Use the smallest value specified. */ if (in_attr[i].i < out_attr[i].i) @@ -14842,7 +14842,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: %pB uses iWMMXt register arguments, %pB does not"), ibfd, obfd); - result = FALSE; + result = false; } break; case Tag_compatibility: @@ -14859,7 +14859,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: fp16 format mismatch between %pB and %pB"), ibfd, obfd); - result = FALSE; + result = false; } } if (in_attr[i].i != 0) @@ -14896,7 +14896,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) (_("%pB has both the current and legacy " "Tag_MPextension_use attributes"), ibfd); - result = FALSE; + result = false; } } @@ -14934,7 +14934,7 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge Tag_compatibility attributes and any common GNU ones. */ if (!_bfd_elf_merge_object_attributes (ibfd, info)) - return FALSE; + return false; /* Check for any attributes not known on ARM. */ result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd); @@ -14945,14 +14945,14 @@ elf32_arm_merge_eabi_attributes (bfd *ibfd, struct bfd_link_info *info) /* Return TRUE if the two EABI versions are incompatible. */ -static bfd_boolean +static bool elf32_arm_versions_compatible (unsigned iver, unsigned over) { /* v4 and v5 are the same spec before and after it was released, so allow mixing them. */ if ((iver == EF_ARM_EABI_VER4 && over == EF_ARM_EABI_VER5) || (iver == EF_ARM_EABI_VER5 && over == EF_ARM_EABI_VER4)) - return TRUE; + return true; return (iver == over); } @@ -14960,12 +14960,12 @@ elf32_arm_versions_compatible (unsigned iver, unsigned over) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_arm_merge_private_bfd_data (bfd *, struct bfd_link_info *); /* Display the flags field. */ -static bfd_boolean +static bool elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr) { FILE * file = (FILE *) ptr; @@ -15105,7 +15105,7 @@ elf32_arm_print_private_bfd_data (bfd *abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } static int @@ -15152,7 +15152,7 @@ elf32_arm_gc_mark_hook (asection *sec, /* Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -15163,19 +15163,19 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, bfd *dynobj; asection *sreloc; struct elf32_arm_link_hash_table *htab; - bfd_boolean call_reloc_p; - bfd_boolean may_become_dynamic_p; - bfd_boolean may_need_local_target_p; + bool call_reloc_p; + bool may_become_dynamic_p; + bool may_need_local_target_p; unsigned long nsyms; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_arm_elf (abfd)); htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; sreloc = NULL; @@ -15185,13 +15185,13 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, && ! htab->root.dynamic_sections_created) { if (! _bfd_elf_link_create_dynamic_sections (abfd, info)) - return FALSE; + return false; } if (htab->root.dynobj == NULL) htab->root.dynobj = abfd; if (!create_ifunc_sections (info)) - return FALSE; + return false; dynobj = htab->root.dynobj; @@ -15220,7 +15220,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, { _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } h = NULL; @@ -15233,7 +15233,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; } else { @@ -15246,9 +15246,9 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, eh = (struct elf32_arm_link_hash_entry *) h; - call_reloc_p = FALSE; - may_become_dynamic_p = FALSE; - may_need_local_target_p = FALSE; + call_reloc_p = false; + may_become_dynamic_p = false; + may_need_local_target_p = false; /* Could be done earlier, if h were already available. */ r_type = elf32_arm_tls_transition (info, r_type, h); @@ -15259,7 +15259,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, if (h == NULL) { if (!elf32_arm_allocate_local_sym_info (abfd)) - return FALSE; + return false; elf32_arm_local_fdpic_cnts(abfd)[r_symndx].gotofffuncdesc_cnt += 1; elf32_arm_local_fdpic_cnts(abfd)[r_symndx].funcdesc_offset = -1; } @@ -15291,7 +15291,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, if (h == NULL) { if (!elf32_arm_allocate_local_sym_info (abfd)) - return FALSE; + return false; elf32_arm_local_fdpic_cnts(abfd)[r_symndx].funcdesc_cnt += 1; elf32_arm_local_fdpic_cnts(abfd)[r_symndx].funcdesc_offset = -1; } @@ -15345,7 +15345,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, { /* This is a global offset table entry for a local symbol. */ if (!elf32_arm_allocate_local_sym_info (abfd)) - return FALSE; + return false; elf_local_got_refcounts (abfd)[r_symndx] += 1; old_tls_type = elf32_arm_local_got_tls_type (abfd) [r_symndx]; } @@ -15390,7 +15390,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_ARM_GOTPC: if (htab->root.sgot == NULL && !create_got_section (htab->root.dynobj, info)) - return FALSE; + return false; break; case R_ARM_PC24: @@ -15401,8 +15401,8 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_ARM_THM_CALL: case R_ARM_THM_JUMP24: case R_ARM_THM_JUMP19: - call_reloc_p = TRUE; - may_need_local_target_p = TRUE; + call_reloc_p = true; + may_need_local_target_p = true; break; case R_ARM_ABS12: @@ -15410,7 +15410,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, ldr __GOTT_INDEX__ offsets. */ if (htab->root.target_os != is_vxworks) { - may_need_local_target_p = TRUE; + may_need_local_target_p = true; break; } else goto jump_over; @@ -15428,7 +15428,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, abfd, elf32_arm_howto_table_1[r_type].name, (h) ? h->root.root.string : "a local symbol"); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Fall through. */ @@ -15459,32 +15459,32 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, we treat local relative references as calls; see the related SYMBOL_CALLS_LOCAL code in allocate_dynrelocs. */ - call_reloc_p = TRUE; - may_need_local_target_p = TRUE; + call_reloc_p = true; + may_need_local_target_p = true; } else /* We are creating a shared library or relocatable executable, and this is a reloc against a global symbol, or a non-PC-relative reloc against a local symbol. We may need to copy the reloc into the output. */ - may_become_dynamic_p = TRUE; + may_become_dynamic_p = true; } else - may_need_local_target_p = TRUE; + may_need_local_target_p = true; break; /* This relocation describes the C++ object vtable hierarchy. Reconstruct it for later use during GC. */ case R_ARM_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_ARM_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; } @@ -15522,7 +15522,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, { local_iplt = elf32_arm_create_local_iplt (abfd, r_symndx); if (local_iplt == NULL) - return FALSE; + return false; root_plt = &local_iplt->root; arm_plt = &local_iplt->arm; } @@ -15558,7 +15558,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, (sec, dynobj, 2, abfd, ! htab->use_rel); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, count the number of @@ -15569,7 +15569,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, { head = elf32_arm_get_local_dynreloc_list (abfd, r_symndx, isym); if (head == NULL) - return FALSE; + return false; } p = *head; @@ -15579,7 +15579,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, p = (struct elf_dyn_relocs *) bfd_alloc (htab->root.dynobj, amt); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -15605,7 +15605,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } static void @@ -15776,7 +15776,7 @@ elf32_arm_update_relocs (asection *o, their own section (as would be the case if code was compiled with -ffunction-sections). */ -static bfd_boolean +static bool elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, elf_gc_mark_hook_fn gc_mark_hook) { @@ -15789,8 +15789,8 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, const struct elf_backend_data *bed; struct elf_link_hash_entry **sym_hashes; struct elf32_arm_link_hash_entry *cmse_hash; - bfd_boolean again, is_v8m, first_bfd_browse = TRUE; - bfd_boolean debug_sec_need_to_be_marked = FALSE; + bool again, is_v8m, first_bfd_browse = true; + bool debug_sec_need_to_be_marked = false; asection *isec; _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook); @@ -15801,10 +15801,10 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, /* Marking EH data may cause additional code sections to be marked, requiring multiple passes. */ - again = TRUE; + again = true; while (again) { - again = FALSE; + again = false; for (sub = info->input_bfds; sub != NULL; sub = sub->link.next) { asection *o; @@ -15824,9 +15824,9 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, && !o->gc_mark && elf_shdrp[hdr->sh_link]->bfd_section->gc_mark) { - again = TRUE; + again = true; if (!_bfd_elf_gc_mark (info, o, gc_mark_hook)) - return FALSE; + return false; } } @@ -15853,10 +15853,10 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, cmse_sec = cmse_hash->root.root.u.def.section; if (!cmse_sec->gc_mark && !_bfd_elf_gc_mark (info, cmse_sec, gc_mark_hook)) - return FALSE; + return false; /* The debug sections related to these secure entry functions are marked on enabling below flag. */ - debug_sec_need_to_be_marked = TRUE; + debug_sec_need_to_be_marked = true; } } @@ -15871,19 +15871,19 @@ elf32_arm_gc_mark_extra_sections (struct bfd_link_info *info, if (!isec->gc_mark && (isec->flags & SEC_DEBUGGING)) isec->gc_mark = 1 ; } - debug_sec_need_to_be_marked = FALSE; + debug_sec_need_to_be_marked = false; } } } - first_bfd_browse = FALSE; + first_bfd_browse = false; } - return TRUE; + return true; } /* Treat mapping symbols as special target symbols. */ -static bfd_boolean +static bool elf32_arm_is_target_special_symbol (bfd * abfd ATTRIBUTE_UNUSED, asymbol * sym) { return bfd_is_arm_special_symbol_name (sym->name, @@ -15930,13 +15930,13 @@ elf32_arm_maybe_function_sym (const asymbol *sym, asection *sec, return size; } -static bfd_boolean +static bool elf32_arm_find_inliner_info (bfd * abfd, const char ** filename_ptr, const char ** functionname_ptr, unsigned int * line_ptr) { - bfd_boolean found; + bool found; found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr, functionname_ptr, line_ptr, & elf_tdata (abfd)->dwarf2_find_line_info); @@ -15949,7 +15949,7 @@ elf32_arm_find_inliner_info (bfd * abfd, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info, struct elf_link_hash_entry * h) { @@ -15960,7 +15960,7 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info, globals = elf32_arm_hash_table (info); if (globals == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; @@ -16000,7 +16000,7 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info, h->needs_plt = 0; } - return TRUE; + return true; } else { @@ -16024,13 +16024,13 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* If there are no non-GOT references, we do not need a copy relocation. */ if (!h->non_got_ref) - return TRUE; + return true; /* This is a reference to a symbol defined by a dynamic object which is not a function. */ @@ -16042,7 +16042,7 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info, can reference data in shared objects directly, so we don't need to do anything here. */ if (bfd_link_pic (info) || globals->root.is_relocatable_executable) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -16081,7 +16081,7 @@ elf32_arm_adjust_dynamic_symbol (struct bfd_link_info * info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info; @@ -16090,14 +16090,14 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; eh = (struct elf32_arm_link_hash_entry *) h; info = (struct bfd_link_info *) inf; htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; if ((htab->root.dynamic_sections_created || h->type == STT_GNU_IFUNC) && h->plt.refcount > 0) @@ -16108,7 +16108,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) && h->root.type == bfd_link_hash_undefweak) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If the call in the PLT entry binds locally, the associated @@ -16186,7 +16186,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = elf32_arm_hash_entry (h)->tls_type; int indx; @@ -16198,7 +16198,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) && h->root.type == bfd_link_hash_undefweak) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->root.sgot; @@ -16328,7 +16328,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) if (htab->root.dynamic_sections_created && h->dynindx == -1 && !h->forced_local) if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; if (h->dynindx == -1) { @@ -16363,7 +16363,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) if (htab->root.dynamic_sections_created && h->dynindx == -1 && !h->forced_local) if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; if (h->dynindx == -1) { @@ -16415,7 +16415,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) _bfd_generic_link_add_one_symbol (info, s->owner, name, BSF_GLOBAL, s, h->root.u.def.value, - NULL, TRUE, FALSE, &bh); + NULL, true, false, &bh); myh = (struct elf_link_hash_entry *) bh; myh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); @@ -16431,7 +16431,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) } if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -16492,7 +16492,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } @@ -16503,7 +16503,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) against them. For normal symbols we output a relocation against the section that contains them. */ if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } @@ -16526,7 +16526,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) && h->root.type == bfd_link_hash_undefweak) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -16558,7 +16558,7 @@ allocate_dynrelocs_for_symbol (struct elf_link_hash_entry *h, void * inf) elf32_arm_allocate_dynrelocs (info, sreloc, p->count); } - return TRUE; + return true; } void @@ -16576,19 +16576,19 @@ bfd_elf32_arm_set_byteswap_code (struct bfd_link_info *info, /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info * info) { bfd * dynobj; asection * s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; struct elf32_arm_link_hash_table *htab; htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -16723,7 +16723,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, if (local_iplt->root.refcount > 0) { - elf32_arm_allocate_plt_entry (info, TRUE, + elf32_arm_allocate_plt_entry (info, true, &local_iplt->root, &local_iplt->arm); if (local_iplt->arm.noncall_refcount == 0) @@ -16783,7 +16783,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, ibfd, symndx); if (isym == NULL) - return FALSE; + return false; /* If all references to an STT_GNU_IFUNC PLT are calls, then all non-call references, including this GOT entry, @@ -16885,7 +16885,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char * name; @@ -16909,7 +16909,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, /* Remember whether there are any reloc sections other than .rel(a).plt and .rela.plt.unloaded. */ if (s != htab->root.srelplt && s != htab->srelplt2) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -16949,7 +16949,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ s->contents = (unsigned char *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_maybe_vxworks_add_dynamic_tags (output_bfd, info, @@ -16959,7 +16959,7 @@ elf32_arm_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, /* Size sections even though they're not dynamic. We use it to setup _TLS_MODULE_BASE_, if needed. */ -static bfd_boolean +static bool elf32_arm_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -16969,7 +16969,7 @@ elf32_arm_always_size_sections (bfd *output_bfd, htab = elf32_arm_hash_table (info); if (bfd_link_relocatable (info)) - return TRUE; + return true; tls_sec = elf_hash_table (info)->tls_sec; @@ -16978,7 +16978,7 @@ elf32_arm_always_size_sections (bfd *output_bfd, struct elf_link_hash_entry *tlsbase; tlsbase = elf_link_hash_lookup - (elf_hash_table (info), "_TLS_MODULE_BASE_", TRUE, TRUE, FALSE); + (elf_hash_table (info), "_TLS_MODULE_BASE_", true, true, false); if (tlsbase) { @@ -16988,30 +16988,30 @@ elf32_arm_always_size_sections (bfd *output_bfd, if (!(_bfd_generic_link_add_one_symbol (info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL, - tls_sec, 0, NULL, FALSE, + tls_sec, 0, NULL, false, bed->collect, &bh))) - return FALSE; + return false; tlsbase->type = STT_TLS; tlsbase = (struct elf_link_hash_entry *)bh; tlsbase->def_regular = 1; tlsbase->other = STV_HIDDEN; - (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE); + (*bed->elf_backend_hide_symbol) (info, tlsbase, true); } } if (htab->fdpic_p && !bfd_link_relocatable (info) && !bfd_elf_stack_segment_size (output_bfd, info, "__stacksize", DEFAULT_STACK_SIZE)) - return FALSE; + return false; - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf32_arm_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info, struct elf_link_hash_entry * h, @@ -17022,7 +17022,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; eh = (struct elf32_arm_link_hash_entry *) h; @@ -17033,7 +17033,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, BFD_ASSERT (h->dynindx != -1); if (! elf32_arm_populate_plt_entry (output_bfd, info, &h->plt, &eh->plt, h->dynindx, 0)) - return FALSE; + return false; } if (!h->def_regular) @@ -17097,7 +17097,7 @@ elf32_arm_finish_dynamic_symbol (bfd * output_bfd, && h == htab->root.hgot)) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } static void @@ -17152,7 +17152,7 @@ arm_nacl_put_plt0 (struct elf32_arm_link_hash_table *htab, bfd *output_bfd, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info) { bfd * dynobj; @@ -17162,7 +17162,7 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; @@ -17170,7 +17170,7 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info /* A broken linker script might have discarded the dynamic sections. Catch this here so that we do not seg-fault later on. */ if (sgot != NULL && bfd_is_abs_section (sgot->output_section)) - return FALSE; + return false; sdyn = bfd_get_linker_section (dynobj, ".dynamic"); if (elf_hash_table (info)->dynamic_sections_created) @@ -17221,7 +17221,7 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info _bfd_error_handler (_("could not find section %s"), name); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } dyn.d_un.d_ptr = s->output_section->vma + s->output_offset; bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); @@ -17269,7 +17269,7 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info struct elf_link_hash_entry * eh; eh = elf_link_hash_lookup (elf_hash_table (info), name, - FALSE, FALSE, TRUE); + false, false, true); if (eh != NULL && ARM_GET_SYM_BRANCH_TYPE (eh->target_internal) == ST_BRANCH_TO_THUMB) @@ -17465,10 +17465,10 @@ elf32_arm_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info BFD_ASSERT (htab->srofixup->reloc_count * 4 == htab->srofixup->size); } - return TRUE; + return true; } -static bfd_boolean +static bool elf32_arm_init_file_header (bfd *abfd, struct bfd_link_info *link_info) { Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */ @@ -17476,7 +17476,7 @@ elf32_arm_init_file_header (bfd *abfd, struct bfd_link_info *link_info) struct elf_segment_map *m; if (!_bfd_elf_init_file_header (abfd, link_info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); @@ -17523,7 +17523,7 @@ elf32_arm_init_file_header (bfd *abfd, struct bfd_link_info *link_info) m->p_flags_valid = 1; } } - return TRUE; + return true; } static enum elf_reloc_type_class @@ -17552,7 +17552,7 @@ arm_final_write_processing (bfd *abfd) bfd_arm_update_notes (abfd, ARM_NOTE_SECTION); } -static bfd_boolean +static bool elf32_arm_final_write_processing (bfd *abfd) { arm_final_write_processing (abfd); @@ -17561,7 +17561,7 @@ elf32_arm_final_write_processing (bfd *abfd) /* Return TRUE if this is an unwinding table entry. */ -static bfd_boolean +static bool is_arm_elf_unwind_section_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name) { return (startswith (name, ELF_STRING_ARM_unwind) @@ -17572,7 +17572,7 @@ is_arm_elf_unwind_section_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name) /* Set the type and flags for an ARM section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool elf32_arm_fake_sections (bfd * abfd, Elf_Internal_Shdr * hdr, asection * sec) { const char * name; @@ -17588,14 +17588,14 @@ elf32_arm_fake_sections (bfd * abfd, Elf_Internal_Shdr * hdr, asection * sec) if (sec->flags & SEC_ELF_PURECODE) hdr->sh_flags |= SHF_ARM_PURECODE; - return TRUE; + return true; } /* Handle an ARM specific section when reading an object file. This is called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool elf32_arm_section_from_shdr (bfd *abfd, Elf_Internal_Shdr * hdr, const char *name, @@ -17614,13 +17614,13 @@ elf32_arm_section_from_shdr (bfd *abfd, break; default: - return FALSE; + return false; } if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; - return TRUE; + return true; } static _arm_elf_section_data * @@ -17652,7 +17652,7 @@ enum map_symbol_type /* Output a single mapping symbol. */ -static bfd_boolean +static bool elf32_arm_output_map_sym (output_arch_syminfo *osi, enum map_symbol_type type, bfd_vma offset) @@ -17675,9 +17675,9 @@ elf32_arm_output_map_sym (output_arch_syminfo *osi, /* Output mapping symbols for the PLT entry described by ROOT_PLT and ARM_PLT. IS_IPLT_ENTRY_P says whether the PLT is in .iplt rather than .plt. */ -static bfd_boolean +static bool elf32_arm_output_plt_map_1 (output_arch_syminfo *osi, - bfd_boolean is_iplt_entry_p, + bool is_iplt_entry_p, union gotplt_union *root_plt, struct arm_plt_info *arm_plt) { @@ -17685,11 +17685,11 @@ elf32_arm_output_plt_map_1 (output_arch_syminfo *osi, bfd_vma addr, plt_header_size; if (root_plt->offset == (bfd_vma) -1) - return TRUE; + return true; htab = elf32_arm_hash_table (osi->info); if (htab == NULL) - return FALSE; + return false; if (is_iplt_entry_p) { @@ -17708,18 +17708,18 @@ elf32_arm_output_plt_map_1 (output_arch_syminfo *osi, if (htab->root.target_os == is_vxworks) { if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 8)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr + 12)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 20)) - return FALSE; + return false; } else if (htab->root.target_os == is_nacl) { if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr)) - return FALSE; + return false; } else if (htab->fdpic_p) { @@ -17729,35 +17729,35 @@ elf32_arm_output_plt_map_1 (output_arch_syminfo *osi, if (elf32_arm_plt_needs_thumb_stub_p (osi->info, arm_plt)) if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr - 4)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (osi, type, addr)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 16)) - return FALSE; + return false; if (htab->plt_entry_size == 4 * ARRAY_SIZE(elf32_arm_fdpic_plt_entry)) if (!elf32_arm_output_map_sym (osi, type, addr + 24)) - return FALSE; + return false; } else if (using_thumb_only (htab)) { if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr)) - return FALSE; + return false; } else { - bfd_boolean thumb_stub_p; + bool thumb_stub_p; thumb_stub_p = elf32_arm_plt_needs_thumb_stub_p (osi->info, arm_plt); if (thumb_stub_p) { if (!elf32_arm_output_map_sym (osi, ARM_MAP_THUMB, addr - 4)) - return FALSE; + return false; } #ifdef FOUR_WORD_PLT if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (osi, ARM_MAP_DATA, addr + 12)) - return FALSE; + return false; #else /* A three-word PLT with no Thumb thunk contains only Arm code, so only need to output a mapping symbol for the first PLT entry and @@ -17765,24 +17765,24 @@ elf32_arm_output_plt_map_1 (output_arch_syminfo *osi, if (thumb_stub_p || addr == plt_header_size) { if (!elf32_arm_output_map_sym (osi, ARM_MAP_ARM, addr)) - return FALSE; + return false; } #endif } - return TRUE; + return true; } /* Output mapping symbols for PLT entries associated with H. */ -static bfd_boolean +static bool elf32_arm_output_plt_map (struct elf_link_hash_entry *h, void *inf) { output_arch_syminfo *osi = (output_arch_syminfo *) inf; struct elf32_arm_link_hash_entry *eh; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type == bfd_link_hash_warning) /* When warning symbols are created, they **replace** the "real" @@ -17811,7 +17811,7 @@ arm_stub_claim_sym (struct elf32_arm_stub_hash_entry *stub_entry) /* Output a single local symbol for a generated stub. */ -static bfd_boolean +static bool elf32_arm_output_stub_sym (output_arch_syminfo *osi, const char *name, bfd_vma offset, bfd_vma size) { @@ -17828,7 +17828,7 @@ elf32_arm_output_stub_sym (output_arch_syminfo *osi, const char *name, return osi->func (osi->flaginfo, name, &sym, osi->sec, NULL) == 1; } -static bfd_boolean +static bool arm_map_one_stub (struct bfd_hash_entry * gen_entry, void * in_arg) { @@ -17852,7 +17852,7 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry, /* Ensure this stub is attached to the current section being processed. */ if (stub_sec != osi->sec) - return TRUE; + return true; addr = (bfd_vma) stub_entry->stub_offset; template_sequence = stub_entry->stub_template; @@ -17867,13 +17867,13 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry, case ARM_TYPE: if (!elf32_arm_output_stub_sym (osi, stub_name, addr, stub_entry->stub_size)) - return FALSE; + return false; break; case THUMB16_TYPE: case THUMB32_TYPE: if (!elf32_arm_output_stub_sym (osi, stub_name, addr | 1, stub_entry->stub_size)) - return FALSE; + return false; break; default: BFD_FAIL (); @@ -17902,14 +17902,14 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry, default: BFD_FAIL (); - return FALSE; + return false; } if (template_sequence[i].type != prev_type) { prev_type = template_sequence[i].type; if (!elf32_arm_output_map_sym (osi, sym_type, addr + size)) - return FALSE; + return false; } switch (template_sequence[i].type) @@ -17929,18 +17929,18 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry, default: BFD_FAIL (); - return FALSE; + return false; } } - return TRUE; + return true; } /* Output mapping symbols for linker generated sections, and for those data-only sections that do not have a $d. */ -static bfd_boolean +static bool elf32_arm_output_arch_local_syms (bfd *output_bfd, struct bfd_link_info *info, void *flaginfo, @@ -17957,7 +17957,7 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd, htab = elf32_arm_hash_table (info); if (htab == NULL) - return FALSE; + return false; check_use_blx (htab); @@ -18083,32 +18083,32 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd, if (!bfd_link_pic (info)) { if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, 12)) - return FALSE; + return false; } } else if (htab->root.target_os == is_nacl) { if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0)) - return FALSE; + return false; } else if (using_thumb_only (htab) && !htab->fdpic_p) { if (!elf32_arm_output_map_sym (&osi, ARM_MAP_THUMB, 0)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, 12)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (&osi, ARM_MAP_THUMB, 16)) - return FALSE; + return false; } else if (!htab->fdpic_p) { if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0)) - return FALSE; + return false; #ifndef FOUR_WORD_PLT if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, 16)) - return FALSE; + return false; #endif } } @@ -18121,7 +18121,7 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd, osi.sec_shndx = (_bfd_elf_section_from_bfd_section (output_bfd, osi.sec->output_section)); if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, 0)) - return FALSE; + return false; } if ((htab->root.splt && htab->root.splt->size > 0) || (htab->root.iplt && htab->root.iplt->size > 0)) @@ -18140,10 +18140,10 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd, num_syms = elf_symtab_hdr (input_bfd).sh_info; for (i = 0; i < num_syms; i++) if (local_iplt[i] != NULL - && !elf32_arm_output_plt_map_1 (&osi, TRUE, + && !elf32_arm_output_plt_map_1 (&osi, true, &local_iplt[i]->root, &local_iplt[i]->arm)) - return FALSE; + return false; } } } @@ -18152,25 +18152,25 @@ elf32_arm_output_arch_local_syms (bfd *output_bfd, /* Mapping symbols for the lazy tls trampoline. */ if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, htab->root.tlsdesc_plt)) - return FALSE; + return false; if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, htab->root.tlsdesc_plt + 24)) - return FALSE; + return false; } if (htab->tls_trampoline != 0) { /* Mapping symbols for the tls trampoline. */ if (!elf32_arm_output_map_sym (&osi, ARM_MAP_ARM, htab->tls_trampoline)) - return FALSE; + return false; #ifdef FOUR_WORD_PLT if (!elf32_arm_output_map_sym (&osi, ARM_MAP_DATA, htab->tls_trampoline + 12)) - return FALSE; + return false; #endif } - return TRUE; + return true; } /* Filter normal symbols of CMSE entry functions of ABFD to include in @@ -18224,7 +18224,7 @@ elf32_arm_filter_cmse_symbols (bfd *abfd ATTRIBUTE_UNUSED, } snprintf (cmse_name, maxnamelen, "%s%s", CMSE_PREFIX, name); cmse_hash = (struct elf32_arm_link_hash_entry *) - elf_link_hash_lookup (&(htab)->root, cmse_name, FALSE, FALSE, TRUE); + elf_link_hash_lookup (&(htab)->root, cmse_name, false, false, true); if (!cmse_hash || (cmse_hash->root.root.type != bfd_link_hash_defined @@ -18267,7 +18267,7 @@ elf32_arm_filter_implib_symbols (bfd *abfd ATTRIBUTE_UNUSED, /* Allocate target specific section data. */ -static bfd_boolean +static bool elf32_arm_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -18277,7 +18277,7 @@ elf32_arm_new_section_hook (bfd *abfd, asection *sec) sdata = (_arm_elf_section_data *) bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -18350,7 +18350,7 @@ struct a8_branch_to_stub_data /* Helper to insert branches to Cortex-A8 erratum stubs in the right places for a particular section. */ -static bfd_boolean +static bool make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { @@ -18368,7 +18368,7 @@ make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry, if (stub_entry->target_section != data->writing_section || stub_entry->stub_type < arm_stub_a8_veneer_lwm) - return TRUE; + return true; contents = data->contents; @@ -18397,7 +18397,7 @@ make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry, { _bfd_error_handler (_("%pB: error: Cortex-A8 erratum stub is " "allocated in unsafe location"), abfd); - return FALSE; + return false; } switch (stub_entry->stub_type) @@ -18424,7 +18424,7 @@ make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry, happens. */ _bfd_error_handler (_("%pB: error: Cortex-A8 erratum stub out " "of range (input file too large)"), abfd); - return FALSE; + return false; } /* i1 = not(j1 eor s), so: @@ -18446,13 +18446,13 @@ make_branch_to_a8_stub (struct bfd_hash_entry *gen_entry, default: BFD_FAIL (); - return FALSE; + return false; } bfd_put_16 (abfd, (branch_insn >> 16) & 0xffff, &contents[loc]); bfd_put_16 (abfd, branch_insn & 0xffff, &contents[loc + 2]); - return TRUE; + return true; } /* Beginning of stm32l4xx work-around. */ @@ -19072,13 +19072,13 @@ stm32l4xx_create_replacing_stub_vldm (struct elf32_arm_link_hash_table * htab, } else { - bfd_boolean is_dp = /* DP encoding. */ + bool is_dp = /* DP encoding. */ (initial_insn & 0xfe100f00) == 0xec100b00; - bfd_boolean is_ia_nobang = /* (IA without !). */ + bool is_ia_nobang = /* (IA without !). */ (((initial_insn << 7) >> 28) & 0xd) == 0x4; - bfd_boolean is_ia_bang = /* (IA with !) - includes VPOP. */ + bool is_ia_bang = /* (IA with !) - includes VPOP. */ (((initial_insn << 7) >> 28) & 0xd) == 0x5; - bfd_boolean is_db_bang = /* (DB with !). */ + bool is_db_bang = /* (DB with !). */ (((initial_insn << 7) >> 28) & 0xd) == 0x9; int base_reg = ((unsigned int) initial_insn << 12) >> 28; /* d = UInt (Vd:D);. */ @@ -19190,7 +19190,7 @@ stm32l4xx_create_replacing_stub (struct elf32_arm_link_hash_table * htab, /* Do code byteswapping. Return FALSE afterwards so that the section is written out as normal. */ -static bfd_boolean +static bool elf32_arm_write_section (bfd *output_bfd, struct bfd_link_info *link_info, asection *sec, @@ -19209,13 +19209,13 @@ elf32_arm_write_section (bfd *output_bfd, unsigned int i; if (globals == NULL) - return FALSE; + return false; /* If this section has not been allocated an _arm_elf_section_data structure then we cannot record anything. */ arm_data = get_arm_elf_section_data (sec); if (arm_data == NULL) - return FALSE; + return false; mapcount = arm_data->mapcount; map = arm_data->map; @@ -19394,7 +19394,7 @@ elf32_arm_write_section (bfd *output_bfd, bfd_vma add_to_offsets = 0; if (edited_contents == NULL) - return FALSE; + return false; for (in_index = 0, out_index = 0; in_index * 8 < input_size || edit_node;) { if (edit_node) @@ -19475,7 +19475,7 @@ elf32_arm_write_section (bfd *output_bfd, edited_contents, (file_ptr) sec->output_offset, sec->size); - return TRUE; + return true; } /* Fix code to point to Cortex-A8 erratum stubs. */ @@ -19491,7 +19491,7 @@ elf32_arm_write_section (bfd *output_bfd, } if (mapcount == 0) - return FALSE; + return false; if (globals->byteswap_code) { @@ -19545,19 +19545,19 @@ elf32_arm_write_section (bfd *output_bfd, arm_data->mapsize = 0; arm_data->map = NULL; - return FALSE; + return false; } /* Mangle thumb function symbols as we read them in. */ -static bfd_boolean +static bool elf32_arm_swap_symbol_in (bfd * abfd, const void *psrc, const void *pshn, Elf_Internal_Sym *dst) { if (!bfd_elf32_swap_symbol_in (abfd, psrc, pshn, dst)) - return FALSE; + return false; dst->st_target_internal = 0; /* New EABI objects mark thumb function symbols by setting the low bit of @@ -19584,7 +19584,7 @@ elf32_arm_swap_symbol_in (bfd * abfd, else ARM_SET_SYM_BRANCH_TYPE (dst->st_target_internal, ST_BRANCH_UNKNOWN); - return TRUE; + return true; } @@ -19627,7 +19627,7 @@ elf32_arm_swap_symbol_out (bfd *abfd, /* Add the PT_ARM_EXIDX program header. */ -static bfd_boolean +static bool elf32_arm_modify_segment_map (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -19648,7 +19648,7 @@ elf32_arm_modify_segment_map (bfd *abfd, m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof (struct elf_segment_map)); if (m == NULL) - return FALSE; + return false; m->p_type = PT_ARM_EXIDX; m->count = 1; m->sections[0] = sec; @@ -19658,7 +19658,7 @@ elf32_arm_modify_segment_map (bfd *abfd, } } - return TRUE; + return true; } /* We may add a PT_ARM_EXIDX program header. */ @@ -19679,20 +19679,20 @@ elf32_arm_additional_program_headers (bfd *abfd, /* Hook called by the linker routine which adds symbols from an object file. */ -static bfd_boolean +static bool elf32_arm_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep, flagword *flagsp, asection **secp, bfd_vma *valp) { if (elf32_arm_hash_table (info) == NULL) - return FALSE; + return false; if (elf32_arm_hash_table (info)->root.target_os == is_vxworks && !elf_vxworks_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)) - return FALSE; + return false; - return TRUE; + return true; } /* We use this to override swap_symbol_in and swap_symbol_out. */ @@ -19850,7 +19850,7 @@ elf32_arm_get_synthetic_symtab (bfd *abfd, if (plt == NULL) return 0; - if (!elf32_arm_size_info.slurp_reloc_table (abfd, relplt, dynsyms, TRUE)) + if (!elf32_arm_size_info.slurp_reloc_table (abfd, relplt, dynsyms, true)) return -1; data = plt->contents; @@ -19925,12 +19925,12 @@ elf32_arm_get_synthetic_symtab (bfd *abfd, return n; } -static bfd_boolean +static bool elf32_arm_section_flags (const Elf_Internal_Shdr *hdr) { if (hdr->sh_flags & SHF_ARM_PURECODE) hdr->bfd_section->flags |= SEC_ELF_PURECODE; - return TRUE; + return true; } static flagword @@ -19956,7 +19956,7 @@ elf32_arm_count_additional_relocs (asection *sec) FALSE otherwise. ISECTION is the best guess matching section from the input bfd IBFD, but it might be NULL. */ -static bfd_boolean +static bool elf32_arm_copy_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED, @@ -20023,7 +20023,7 @@ elf32_arm_copy_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, then the index section should be too. */ if (oheaders[i]->sh_flags & SHF_GROUP) osection->sh_flags |= SHF_GROUP; - return TRUE; + return true; } } break; @@ -20039,7 +20039,7 @@ elf32_arm_copy_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, break; } - return FALSE; + return false; } /* Returns TRUE if NAME is an ARM mapping symbol. @@ -20049,7 +20049,7 @@ elf32_arm_copy_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, Other tools might also produce $b (Thumb BL), $f, $p, $m and $v, but we do not support them here. $t.x indicates the start of ThumbEE instructions. */ -static bfd_boolean +static bool is_arm_mapping_symbol (const char * name) { return name != NULL /* Paranoia. */ @@ -20170,7 +20170,7 @@ elf32_arm_backend_symbol_processing (bfd *abfd, asymbol *sym) #undef elf_backend_lookup_section_flags_hook #define elf_backend_lookup_section_flags_hook elf32_arm_lookup_section_flags -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf32-target.h" @@ -20209,14 +20209,14 @@ elf32_arm_nacl_link_hash_table_create (bfd *abfd) really need to use elf32_arm_modify_segment_map. But we do it anyway just to reduce gratuitous differences with the stock ARM backend. */ -static bfd_boolean +static bool elf32_arm_nacl_modify_segment_map (bfd *abfd, struct bfd_link_info *info) { return (elf32_arm_modify_segment_map (abfd, info) && nacl_modify_segment_map (abfd, info)); } -static bfd_boolean +static bool elf32_arm_nacl_final_write_processing (bfd *abfd) { arm_final_write_processing (abfd); @@ -20306,7 +20306,7 @@ elf32_arm_fdpic_link_hash_table_create (bfd *abfd) /* We need dynamic symbols for every section, since segments can relocate independently. */ -static bfd_boolean +static bool elf32_arm_fdpic_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, @@ -20319,12 +20319,12 @@ elf32_arm_fdpic_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, /* If sh_type is yet undecided, assume it could be SHT_PROGBITS/SHT_NOBITS. */ case SHT_NULL: - return FALSE; + return false; /* There shouldn't be section relative relocations against any other section. */ default: - return TRUE; + return true; } } @@ -20374,7 +20374,7 @@ elf32_arm_vxworks_link_hash_table_create (bfd *abfd) return ret; } -static bfd_boolean +static bool elf32_arm_vxworks_final_write_processing (bfd *abfd) { arm_final_write_processing (abfd); @@ -20410,24 +20410,24 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword out_flags; flagword in_flags; - bfd_boolean flags_compatible = TRUE; + bool flags_compatible = true; asection *sec; /* Check if we have the same endianness. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (! is_arm_elf (ibfd) || ! is_arm_elf (obfd)) - return TRUE; + return true; if (!elf32_arm_merge_eabi_attributes (ibfd, info)) - return FALSE; + return false; /* The input BFD must have had its flags initialised. */ /* The following seems bogus to me -- The flags are initialized in @@ -20447,7 +20447,7 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler (_("error: %pB is already in final BE8 format"), ibfd); - return FALSE; + return false; } if (!elf_flags_init (obfd)) @@ -20460,26 +20460,26 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) to the default values. */ if (bfd_get_arch_info (ibfd)->the_default && elf_elfheader (ibfd)->e_flags == 0) - return TRUE; + return true; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) && bfd_get_arch_info (obfd)->the_default) return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); - return TRUE; + return true; } /* Determine what should happen if the input ARM architecture does not match the output ARM architecture. */ if (! bfd_arm_merge_machines (ibfd, obfd)) - return FALSE; + return false; /* Identical flags must be compatible. */ if (in_flags == out_flags) - return TRUE; + return true; /* Check to see if the input BFD actually contains any sections. If not, its flags may not have been initialised either, but it @@ -20493,8 +20493,8 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) in data sections ? */ if (!(ibfd->flags & DYNAMIC)) { - bfd_boolean null_input_bfd = TRUE; - bfd_boolean only_data_sections = TRUE; + bool null_input_bfd = true; + bool only_data_sections = true; for (sec = ibfd->sections; sec != NULL; sec = sec->next) { @@ -20505,15 +20505,15 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if ((bfd_section_flags (sec) & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) - only_data_sections = FALSE; + only_data_sections = false; - null_input_bfd = FALSE; + null_input_bfd = false; break; } } if (null_input_bfd || only_data_sections) - return TRUE; + return true; } /* Complain about various flag mismatches. */ @@ -20524,7 +20524,7 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("error: source object %pB has EABI version %d, but target %pB has EABI version %d"), ibfd, (in_flags & EF_ARM_EABIMASK) >> 24, obfd, (out_flags & EF_ARM_EABIMASK) >> 24); - return FALSE; + return false; } /* Not sure what needs to be checked for EABI versions >= 1. */ @@ -20539,7 +20539,7 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB is compiled for APCS-%d, whereas target %pB uses APCS-%d"), ibfd, in_flags & EF_ARM_APCS_26 ? 26 : 32, obfd, out_flags & EF_ARM_APCS_26 ? 26 : 32); - flags_compatible = FALSE; + flags_compatible = false; } if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_APCS_FLOAT)) @@ -20553,7 +20553,7 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB passes floats in integer registers, whereas %pB passes them in float registers"), ibfd, obfd); - flags_compatible = FALSE; + flags_compatible = false; } if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT)) @@ -20567,7 +20567,7 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB uses %s instructions, whereas %pB does not"), ibfd, "FPA", obfd); - flags_compatible = FALSE; + flags_compatible = false; } if ((in_flags & EF_ARM_MAVERICK_FLOAT) != (out_flags & EF_ARM_MAVERICK_FLOAT)) @@ -20581,7 +20581,7 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB does not use %s instructions, whereas %pB does"), ibfd, "Maverick", obfd); - flags_compatible = FALSE; + flags_compatible = false; } #ifdef EF_ARM_SOFT_FLOAT @@ -20604,7 +20604,7 @@ elf32_arm_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB uses hardware FP, whereas %pB uses software FP"), ibfd, obfd); - flags_compatible = FALSE; + flags_compatible = false; } } #endif diff --git a/bfd/elf32-arm.h b/bfd/elf32-arm.h index b1e3766f50..c8f43223e4 100644 --- a/bfd/elf32-arm.h +++ b/bfd/elf32-arm.h @@ -37,7 +37,7 @@ extern void bfd_elf32_arm_set_vfp11_fix extern void bfd_elf32_arm_set_cortex_a8_fix (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf32_arm_vfp11_erratum_scan +extern bool bfd_elf32_arm_vfp11_erratum_scan (bfd *, struct bfd_link_info *); extern void bfd_elf32_arm_vfp11_fix_veneer_locations @@ -54,17 +54,17 @@ typedef enum extern void bfd_elf32_arm_set_stm32l4xx_fix (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf32_arm_stm32l4xx_erratum_scan +extern bool bfd_elf32_arm_stm32l4xx_erratum_scan (bfd *, struct bfd_link_info *); extern void bfd_elf32_arm_stm32l4xx_fix_veneer_locations (bfd *, struct bfd_link_info *); /* ELF ARM Interworking support. Called from linker. */ -extern bfd_boolean bfd_elf32_arm_allocate_interworking_sections +extern bool bfd_elf32_arm_allocate_interworking_sections (struct bfd_link_info *); -extern bfd_boolean bfd_elf32_arm_process_before_allocation +extern bool bfd_elf32_arm_process_before_allocation (bfd *, struct bfd_link_info *); struct elf32_arm_params { @@ -89,10 +89,10 @@ struct elf32_arm_params { void bfd_elf32_arm_set_target_params (bfd *, struct bfd_link_info *, struct elf32_arm_params *); -extern bfd_boolean bfd_elf32_arm_get_bfd_for_interworking +extern bool bfd_elf32_arm_get_bfd_for_interworking (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_elf32_arm_add_glue_sections_to_bfd +extern bool bfd_elf32_arm_add_glue_sections_to_bfd (bfd *, struct bfd_link_info *); extern void bfd_elf32_arm_keep_private_stub_output_sections @@ -108,14 +108,14 @@ extern int elf32_arm_setup_section_lists (bfd *, struct bfd_link_info *); extern void elf32_arm_next_input_section (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_arm_size_stubs +extern bool elf32_arm_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, struct bfd_section * (*) (const char *, struct bfd_section *, struct bfd_section *, unsigned int), void (*) (void)); -extern bfd_boolean elf32_arm_build_stubs +extern bool elf32_arm_build_stubs (struct bfd_link_info *); /* ARM unwind section editing support. */ -extern bfd_boolean elf32_arm_fix_exidx_coverage -(struct bfd_section **, unsigned int, struct bfd_link_info *, bfd_boolean); +extern bool elf32_arm_fix_exidx_coverage +(struct bfd_section **, unsigned int, struct bfd_link_info *, bool); diff --git a/bfd/elf32-avr.c b/bfd/elf32-avr.c index 79de45dc1d..4d1ab54778 100644 --- a/bfd/elf32-avr.c +++ b/bfd/elf32-avr.c @@ -27,10 +27,10 @@ #include "elf32-avr.h" /* Enable debugging printout at stdout with this variable. */ -static bfd_boolean debug_relax = FALSE; +static bool debug_relax = false; /* Enable debugging printout at stdout with this variable. */ -static bfd_boolean debug_stubs = FALSE; +static bool debug_stubs = false; static bfd_reloc_status_type bfd_elf_avr_diff_reloc (bfd *, arelent *, asymbol *, void *, @@ -62,7 +62,7 @@ struct elf32_avr_stub_hash_entry bfd_vma target_value; /* This way we could mark stubs to be no longer necessary. */ - bfd_boolean is_actually_needed; + bool is_actually_needed; }; struct elf32_avr_link_hash_table @@ -73,7 +73,7 @@ struct elf32_avr_link_hash_table /* The stub hash table. */ struct bfd_hash_table bstab; - bfd_boolean no_stubs; + bool no_stubs; /* Linker stub bfd. */ bfd *stub_bfd; @@ -123,74 +123,74 @@ static reloc_howto_type elf_avr_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_AVR_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 7 bit PC relative relocation. */ HOWTO (R_AVR_7_PCREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 3, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_7_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 13 bit PC relative relocation. */ HOWTO (R_AVR_13_PCREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 13, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_13_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_AVR_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation for command address Will be changed when linker stubs are needed. */ @@ -198,45 +198,45 @@ static reloc_howto_type elf_avr_howto_table[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_16_PM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 16 bit address. For LDI command. */ HOWTO (R_AVR_LO8_LDI, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_LO8_LDI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A high 8 bit absolute relocation of 16 bit address. For LDI command. */ HOWTO (R_AVR_HI8_LDI, /* type */ 8, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HI8_LDI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A high 6 bit absolute relocation of 22 bit address. For LDI command. As well second most significant 8 bit value of a 32 bit link-time constant. */ @@ -244,418 +244,418 @@ static reloc_howto_type elf_avr_howto_table[] = 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HH8_LDI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A negative low 8 bit absolute relocation of 16 bit address. For LDI command. */ HOWTO (R_AVR_LO8_LDI_NEG, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_LO8_LDI_NEG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A negative high 8 bit absolute relocation of 16 bit address. For LDI command. */ HOWTO (R_AVR_HI8_LDI_NEG, /* type */ 8, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HI8_LDI_NEG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A negative high 6 bit absolute relocation of 22 bit address. For LDI command. */ HOWTO (R_AVR_HH8_LDI_NEG, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HH8_LDI_NEG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will not be changed when linker stubs are needed. */ HOWTO (R_AVR_LO8_LDI_PM, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_LO8_LDI_PM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will not be changed when linker stubs are needed. */ HOWTO (R_AVR_HI8_LDI_PM, /* type */ 9, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HI8_LDI_PM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will not be changed when linker stubs are needed. */ HOWTO (R_AVR_HH8_LDI_PM, /* type */ 17, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HH8_LDI_PM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will not be changed when linker stubs are needed. */ HOWTO (R_AVR_LO8_LDI_PM_NEG, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_LO8_LDI_PM_NEG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will not be changed when linker stubs are needed. */ HOWTO (R_AVR_HI8_LDI_PM_NEG, /* type */ 9, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HI8_LDI_PM_NEG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will not be changed when linker stubs are needed. */ HOWTO (R_AVR_HH8_LDI_PM_NEG, /* type */ 17, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HH8_LDI_PM_NEG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocation for CALL command in ATmega. */ HOWTO (R_AVR_CALL, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 23, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation of 16 bit address. For LDI command. */ HOWTO (R_AVR_LDI, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_LDI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit absolute relocation of 6 bit offset. For ldd/sdd command. */ HOWTO (R_AVR_6, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit absolute relocation of 6 bit offset. For sbiw/adiw command. */ HOWTO (R_AVR_6_ADIW, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_6_ADIW", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Most significant 8 bit value of a 32 bit link-time constant. */ HOWTO (R_AVR_MS8_LDI, /* type */ 24, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_MS8_LDI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Negative most significant 8 bit value of a 32 bit link-time constant. */ HOWTO (R_AVR_MS8_LDI_NEG, /* type */ 24, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_MS8_LDI_NEG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will be changed when linker stubs are needed. */ HOWTO (R_AVR_LO8_LDI_GS, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_LO8_LDI_GS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A low 8 bit absolute relocation of 24 bit program memory address. For LDI command. Will be changed when linker stubs are needed. */ HOWTO (R_AVR_HI8_LDI_GS, /* type */ 9, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_HI8_LDI_GS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8 bit offset. */ HOWTO (R_AVR_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* lo8-part to use in .byte lo8(sym). */ HOWTO (R_AVR_8_LO8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_8_LO8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* hi8-part to use in .byte hi8(sym). */ HOWTO (R_AVR_8_HI8, /* type */ 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_8_HI8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* hlo8-part to use in .byte hlo8(sym). */ HOWTO (R_AVR_8_HLO8, /* type */ 16, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_8_HLO8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_AVR_DIFF8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_avr_diff_reloc, /* special_function */ "R_AVR_DIFF8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_AVR_DIFF16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_avr_diff_reloc,/* special_function */ "R_AVR_DIFF16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_AVR_DIFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_avr_diff_reloc,/* special_function */ "R_AVR_DIFF32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 7 bit immediate for LDS/STS in Tiny core. */ HOWTO (R_AVR_LDS_STS_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_LDS_STS_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_AVR_PORT6, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_PORT6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_AVR_PORT5, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_PORT5", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit PC relative relocation. */ HOWTO (R_AVR_32_PCREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AVR_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* Map BFD reloc types to AVR ELF reloc types. */ @@ -761,7 +761,7 @@ struct elf_avr_section_data /* Possibly initialise avr specific data for new section SEC from ABFD. */ -static bfd_boolean +static bool elf_avr_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -771,7 +771,7 @@ elf_avr_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -948,7 +948,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an AVR ELF reloc. */ -static bfd_boolean +static bool avr_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -962,13 +962,13 @@ avr_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_avr_howto_table[r_type]; - return TRUE; + return true; } -static bfd_boolean +static bool avr_stub_is_required_for_16_bit_reloc (bfd_vma relocation) { return (relocation >= 0x020000); @@ -1025,12 +1025,12 @@ avr_final_link_relocate (reloc_howto_type * howto, struct elf32_avr_link_hash_table * htab) { bfd_reloc_status_type r = bfd_reloc_ok; - bfd_vma x; - bfd_signed_vma srel; - bfd_signed_vma reloc_addr; - bfd_boolean use_stubs = FALSE; + bfd_vma x; + bfd_signed_vma srel; + bfd_signed_vma reloc_addr; + bool use_stubs = false; /* Usually is 0, unless we are generating code for a bootloader. */ - bfd_signed_vma base_addr = htab->vector_base; + bfd_signed_vma base_addr = htab->vector_base; /* Absolute addr of the reloc in the final excecutable. */ reloc_addr = rel->r_offset + input_section->output_section->vma @@ -1430,7 +1430,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, struct elf32_avr_link_hash_table * htab = avr_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -1467,7 +1467,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1501,7 +1501,7 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -1527,14 +1527,14 @@ elf32_avr_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* The final processing done just before writing out a AVR ELF object file. This gets the AVR architecture right based on the machine number. */ -static bfd_boolean +static bool bfd_elf_avr_final_write_processing (bfd *abfd) { unsigned long val; @@ -1623,7 +1623,7 @@ bfd_elf_avr_final_write_processing (bfd *abfd) /* Set the right machine number. */ -static bfd_boolean +static bool elf32_avr_object_p (bfd *abfd) { unsigned int e_set = bfd_mach_avr2; @@ -1715,7 +1715,7 @@ elf32_avr_object_p (bfd *abfd) /* Returns whether the relocation type passed is a diff reloc. */ -static bfd_boolean +static bool elf32_avr_is_diff_reloc (Elf_Internal_Rela *irel) { return (ELF32_R_TYPE (irel->r_info) == R_AVR_DIFF8 @@ -1845,10 +1845,9 @@ elf32_avr_adjust_reloc_if_spans_insn (bfd *abfd, else { bfd_vma reloc_value = symval + irel->r_addend; - bfd_boolean addend_within_shrink_boundary = - (reloc_value <= shrink_boundary); + bool addend_within_shrink_boundary = reloc_value <= shrink_boundary; - bfd_boolean reloc_spans_insn = + bool reloc_spans_insn = (symval <= shrinked_insn_address && reloc_value > shrinked_insn_address && addend_within_shrink_boundary); @@ -1863,38 +1862,36 @@ elf32_avr_adjust_reloc_if_spans_insn (bfd *abfd, } } -static bfd_boolean +static bool avr_should_move_sym (symvalue symval, bfd_vma start, bfd_vma end, - bfd_boolean did_pad) + bool did_pad) { - bfd_boolean sym_within_boundary = - did_pad ? symval < end : symval <= end; + bool sym_within_boundary = did_pad ? symval < end : symval <= end; return (symval > start && sym_within_boundary); } -static bfd_boolean +static bool avr_should_reduce_sym_size (symvalue symval, symvalue symend, bfd_vma start, bfd_vma end, - bfd_boolean did_pad) + bool did_pad) { - bfd_boolean sym_end_within_boundary = - did_pad ? symend < end : symend <= end; + bool sym_end_within_boundary = did_pad ? symend < end : symend <= end; return (symval <= start && symend > start && sym_end_within_boundary); } -static bfd_boolean +static bool avr_should_increase_sym_size (symvalue symval, symvalue symend, bfd_vma start, bfd_vma end, - bfd_boolean did_pad) + bool did_pad) { - return avr_should_move_sym (symval, start, end, did_pad) - && symend >= end && did_pad; + return (avr_should_move_sym (symval, start, end, did_pad) + && symend >= end && did_pad); } /* Delete some bytes from a section while changing the size of an instruction. @@ -1905,12 +1902,12 @@ avr_should_increase_sym_size (symvalue symval, record handling. In that case, addr is section-relative offset of start of padding, and count is the number of padding bytes to delete. */ -static bfd_boolean +static bool elf32_avr_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count, - bfd_boolean delete_shrinks_insn) + bool delete_shrinks_insn) { Elf_Internal_Shdr *symtab_hdr; unsigned int sec_shndx; @@ -1924,8 +1921,8 @@ elf32_avr_relax_delete_bytes (bfd *abfd, unsigned int symcount; struct avr_relax_info *relax_info; struct avr_property_record *prop_record = NULL; - bfd_boolean did_shrink = FALSE; - bfd_boolean did_pad = FALSE; + bool did_shrink = false; + bool did_pad = false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec); @@ -1964,12 +1961,12 @@ elf32_avr_relax_delete_bytes (bfd *abfd, { memmove (contents + addr, contents + addr + count, (size_t) (toaddr - addr - count)); - did_shrink = TRUE; + did_shrink = true; } if (prop_record == NULL) { sec->size -= count; - did_shrink = TRUE; + did_shrink = true; } else { @@ -1995,11 +1992,11 @@ elf32_avr_relax_delete_bytes (bfd *abfd, to remember we didn't delete anything i.e. don't set did_shrink, so that we don't corrupt reloc offsets or symbol values.*/ memset (contents + toaddr - count, fill, count); - did_pad = TRUE; + did_pad = true; } if (!did_shrink) - return TRUE; + return true; /* Adjust all the reloc addresses. */ for (irel = elf_section_data (sec)->relocs; irel < irelend; irel++) @@ -2055,7 +2052,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd, irel = elf_section_data (isec)->relocs; /* PR 12161: Read in the relocs for this section if necessary. */ if (irel == NULL) - irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE); + irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, true); for (irelend = irel + isec->reloc_count; irel < irelend; @@ -2071,7 +2068,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -2186,7 +2183,7 @@ elf32_avr_relax_delete_bytes (bfd *abfd, } } - return TRUE; + return true; } static Elf_Internal_Sym * @@ -2452,11 +2449,11 @@ avr_load_all_property_sections (struct bfd_link_info *link_info) contains 4-byte jump instructions whose relative offset must not be changed. */ -static bfd_boolean +static bool elf32_avr_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -2464,11 +2461,11 @@ elf32_avr_relax_section (bfd *abfd, bfd_byte *contents = NULL; Elf_Internal_Sym *isymbuf = NULL; struct elf32_avr_link_hash_table *htab; - static bfd_boolean relaxation_initialised = FALSE; + static bool relaxation_initialised = false; if (!relaxation_initialised) { - relaxation_initialised = TRUE; + relaxation_initialised = true; /* Load entries from the .avr.prop sections. */ avr_load_all_property_sections (link_info); @@ -2478,11 +2475,11 @@ elf32_avr_relax_section (bfd *abfd, relaxing. Such shrinking can cause issues for the sections such as .vectors and .jumptables. Instead the unused bytes should be filled with nop instructions. */ - bfd_boolean shrinkable = TRUE; + bool shrinkable = true; if (!strcmp (sec->name,".vectors") || !strcmp (sec->name,".jumptables")) - shrinkable = FALSE; + shrinkable = false; if (bfd_link_relocatable (link_info)) (*link_info->callbacks->einfo) @@ -2490,10 +2487,10 @@ elf32_avr_relax_section (bfd *abfd, htab = avr_link_hash_table (link_info); if (htab == NULL) - return FALSE; + return false; /* Assume nothing changes. */ - *again = FALSE; + *again = false; if ((!htab->no_stubs) && (sec == htab->stub_sec)) { @@ -2506,17 +2503,17 @@ elf32_avr_relax_section (bfd *abfd, (int) last_estimated_stub_section_size); elf32_avr_size_stubs (htab->stub_sec->output_section->owner, - link_info, FALSE); + link_info, false); /* Check if the number of trampolines changed. */ if (last_estimated_stub_section_size != htab->stub_sec->size) - *again = TRUE; + *again = true; if (debug_relax) printf ("Size of stub section after this pass: %i\n", (int) htab->stub_sec->size); - return TRUE; + return true; } /* We don't have to do anything for a relocatable link, if @@ -2526,12 +2523,12 @@ elf32_avr_relax_section (bfd *abfd, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; /* Check if the object file to relax uses internal symbols so that we could fix up the relocations. */ if (!(elf_elfheader (abfd)->e_flags & EF_AVR_LINKRELAX_PREPARED)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -2748,12 +2745,12 @@ elf32_avr_relax_section (bfd *abfd, /* Delete two bytes of data. */ if (!elf32_avr_relax_delete_bytes (abfd, sec, irel->r_offset + 2, 2, - TRUE)) + true)) goto error_return; /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } } @@ -2799,7 +2796,7 @@ elf32_avr_relax_section (bfd *abfd, printf ("converted rcall/ret sequence at address 0x%x" " into rjmp/ret sequence. Section is %s\n\n", (int) dot, sec->name); - *again = TRUE; + *again = true; break; } } @@ -2830,7 +2827,7 @@ elf32_avr_relax_section (bfd *abfd, printf ("converted call/ret sequence at address 0x%x" " into jmp/ret sequence. Section is %s\n\n", (int) dot, sec->name); - *again = TRUE; + *again = true; break; } } @@ -2993,7 +2990,7 @@ elf32_avr_relax_section (bfd *abfd, rel = elf_section_data (isec)->relocs; if (rel == NULL) - rel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE); + rel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, true); relend = rel + isec->reloc_count; @@ -3074,13 +3071,13 @@ elf32_avr_relax_section (bfd *abfd, /* Delete two bytes of data. */ if (!elf32_avr_relax_delete_bytes (abfd, sec, irel->r_offset + insn_size, 2, - TRUE)) + true)) goto error_return; /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } } @@ -3142,8 +3139,8 @@ elf32_avr_relax_section (bfd *abfd, record->offset -= count; elf32_avr_relax_delete_bytes (abfd, sec, addr - count, - count, FALSE); - *again = TRUE; + count, false); + *again = true; } } break; @@ -3167,7 +3164,7 @@ elf32_avr_relax_section (bfd *abfd, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -3177,7 +3174,7 @@ elf32_avr_relax_section (bfd *abfd, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -3193,7 +3190,7 @@ elf32_avr_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { Elf_Internal_Shdr *symtab_hdr; @@ -3224,7 +3221,7 @@ elf32_avr_get_relocated_section_contents (bfd *output_bfd, bfd_size_type amt; internal_relocs = (_bfd_elf_link_read_relocs - (input_bfd, input_section, NULL, NULL, FALSE)); + (input_bfd, input_section, NULL, NULL, false)); if (internal_relocs == NULL) goto error_return; @@ -3319,7 +3316,7 @@ avr_add_stub (const char *stub_name, struct elf32_avr_stub_hash_entry *hsh; /* Enter this entry into the linker stub hash table. */ - hsh = avr_stub_hash_lookup (&htab->bstab, stub_name, TRUE, FALSE); + hsh = avr_stub_hash_lookup (&htab->bstab, stub_name, true, false); if (hsh == NULL) { @@ -3340,7 +3337,7 @@ avr_add_stub (const char *stub_name, relative to the trampoline section start to the stub_offset entry in the stub hash table entry. */ -static bfd_boolean +static bool avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) { struct elf32_avr_stub_hash_entry *hsh; @@ -3358,13 +3355,13 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) hsh = avr_stub_hash_entry (bh); if (!hsh->is_actually_needed) - return TRUE; + return true; info = (struct bfd_link_info *) in_arg; htab = avr_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; target = hsh->target_value; @@ -3384,7 +3381,7 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) /* Check for the alignment of the address. */ if (target & 1) - return FALSE; + return false; starget = target >> 1; jmp_insn |= ((starget & 0x10000) | ((starget << 3) & 0x1f00000)) >> 16; @@ -3408,22 +3405,22 @@ avr_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) } } - return TRUE; + return true; } -static bfd_boolean +static bool avr_mark_stub_not_to_be_necessary (struct bfd_hash_entry *bh, void *in_arg ATTRIBUTE_UNUSED) { struct elf32_avr_stub_hash_entry *hsh; hsh = avr_stub_hash_entry (bh); - hsh->is_actually_needed = FALSE; + hsh->is_actually_needed = false; - return TRUE; + return true; } -static bfd_boolean +static bool avr_size_one_stub (struct bfd_hash_entry *bh, void *in_arg) { struct elf32_avr_stub_hash_entry *hsh; @@ -3440,18 +3437,18 @@ avr_size_one_stub (struct bfd_hash_entry *bh, void *in_arg) size = 0; htab->stub_sec->size += size; - return TRUE; + return true; } void elf32_avr_setup_params (struct bfd_link_info *info, bfd *avr_stub_bfd, asection *avr_stub_section, - bfd_boolean no_stubs, - bfd_boolean deb_stubs, - bfd_boolean deb_relax, + bool no_stubs, + bool deb_stubs, + bool deb_relax, bfd_vma pc_wrap_around, - bfd_boolean call_ret_replacement) + bool call_ret_replacement) { struct elf32_avr_link_hash_table *htab = avr_link_hash_table (info); @@ -3596,17 +3593,17 @@ get_local_syms (bfd *input_bfd, struct bfd_link_info *info) #define ADD_DUMMY_STUBS_FOR_DEBUGGING 0 -bfd_boolean +bool elf32_avr_size_stubs (bfd *output_bfd, struct bfd_link_info *info, - bfd_boolean is_prealloc_run) + bool is_prealloc_run) { struct elf32_avr_link_hash_table *htab; int stub_changed = 0; htab = avr_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* At this point we initialize htab->vector_base To the start of the text output section. */ @@ -3616,7 +3613,7 @@ elf32_avr_size_stubs (bfd *output_bfd, { if (htab->all_local_syms) goto error_ret_free_local; - return FALSE; + return false; } if (ADD_DUMMY_STUBS_FOR_DEBUGGING) @@ -3797,13 +3794,13 @@ elf32_avr_size_stubs (bfd *output_bfd, hsh = avr_stub_hash_lookup (&htab->bstab, stub_name, - FALSE, FALSE); + false, false); if (hsh != NULL) { /* The proper stub has already been created. Mark it to be used and write the possibly changed destination value. */ - hsh->is_actually_needed = TRUE; + hsh->is_actually_needed = true; hsh->target_value = destination; free (stub_name); continue; @@ -3816,7 +3813,7 @@ elf32_avr_size_stubs (bfd *output_bfd, goto error_ret_free_internal; } - hsh->is_actually_needed = TRUE; + hsh->is_actually_needed = true; hsh->target_value = destination; if (debug_stubs) @@ -3825,7 +3822,7 @@ elf32_avr_size_stubs (bfd *output_bfd, if (debug_stubs) printf ("(Pre-Alloc run: %i)\n", is_prealloc_run); - stub_changed = TRUE; + stub_changed = true; } /* We're done with the internal relocs, free them. */ @@ -3841,15 +3838,15 @@ elf32_avr_size_stubs (bfd *output_bfd, if (!stub_changed) break; - stub_changed = FALSE; + stub_changed = false; } free (htab->all_local_syms); - return TRUE; + return true; error_ret_free_local: free (htab->all_local_syms); - return FALSE; + return false; } @@ -3859,7 +3856,7 @@ elf32_avr_size_stubs (bfd *output_bfd, functions here. This function is called via hppaelf_finish in the linker. */ -bfd_boolean +bool elf32_avr_build_stubs (struct bfd_link_info *info) { asection *stub_sec; @@ -3869,7 +3866,7 @@ elf32_avr_build_stubs (struct bfd_link_info *info) htab = avr_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* In case that there were several stub sections: */ for (stub_sec = htab->stub_bfd->sections; @@ -3884,7 +3881,7 @@ elf32_avr_build_stubs (struct bfd_link_info *info) stub_sec->contents = bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) - return FALSE; + return false; stub_sec->size = 0; } @@ -3906,7 +3903,7 @@ elf32_avr_build_stubs (struct bfd_link_info *info) if (debug_stubs) printf ("Final Stub section Size: %i\n", (int) htab->stub_sec->size); - return TRUE; + return true; } /* Callback used by QSORT to order relocations AP and BP. */ @@ -3935,7 +3932,7 @@ internal_reloc_compare (const void *ap, const void *bp) /* Return true if ADDRESS is within the vma range of SECTION from ABFD. */ -static bfd_boolean +static bool avr_is_section_for_address (asection *section, bfd_vma address) { bfd_vma vma; @@ -3943,13 +3940,13 @@ avr_is_section_for_address (asection *section, bfd_vma address) vma = bfd_section_vma (section); if (address < vma) - return FALSE; + return false; size = section->size; if (address >= vma + size) - return FALSE; + return false; - return TRUE; + return true; } /* Data structure used by AVR_FIND_SECTION_FOR_ADDRESS. */ @@ -4018,7 +4015,7 @@ avr_elf32_load_records_from_section (bfd *abfd, asection *sec) /* Load the relocations for the '.avr.prop' section if there are any, and sort them. */ internal_relocs = (_bfd_elf_link_read_relocs - (abfd, sec, NULL, NULL, FALSE)); + (abfd, sec, NULL, NULL, false)); if (internal_relocs) qsort (internal_relocs, sec->reloc_count, sizeof (Elf_Internal_Rela), internal_reloc_compare); diff --git a/bfd/elf32-avr.h b/bfd/elf32-avr.h index 467d2b6158..3942adf448 100644 --- a/bfd/elf32-avr.h +++ b/bfd/elf32-avr.h @@ -25,16 +25,15 @@ extern void elf32_avr_setup_params (struct bfd_link_info *, bfd *, asection *, - bfd_boolean, bfd_boolean, bfd_boolean, - bfd_vma, bfd_boolean); + bool, bool, bool, bfd_vma, bool); extern int elf32_avr_setup_section_lists (bfd *, struct bfd_link_info *); -extern bfd_boolean -elf32_avr_size_stubs (bfd *, struct bfd_link_info *, bfd_boolean); +extern bool +elf32_avr_size_stubs (bfd *, struct bfd_link_info *, bool); -extern bfd_boolean +extern bool elf32_avr_build_stubs (struct bfd_link_info *); /* The name of the section into which the property records are stored. */ diff --git a/bfd/elf32-bfin.c b/bfd/elf32-bfin.c index c7a4f6c86b..9310412278 100644 --- a/bfd/elf32-bfin.c +++ b/bfd/elf32-bfin.c @@ -58,7 +58,7 @@ bfin_pcrel24_reloc (bfd *abfd, bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *output_section; - bfd_boolean relocatable = (output_bfd != NULL); + bool relocatable = (output_bfd != NULL); if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) return bfd_reloc_outofrange; @@ -155,7 +155,7 @@ bfin_imm16_reloc (bfd *abfd, bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *output_section; - bfd_boolean relocatable = (output_bfd != NULL); + bool relocatable = (output_bfd != NULL); /* Is the address of the relocation really within the section? */ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) @@ -226,7 +226,7 @@ bfin_byte4_reloc (bfd *abfd, bfd_size_type addr = reloc_entry->address; bfd_vma output_base = 0; asection *output_section; - bfd_boolean relocatable = (output_bfd != NULL); + bool relocatable = (output_bfd != NULL); /* Is the address of the relocation really within the section? */ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) @@ -293,7 +293,7 @@ bfin_bfd_reloc (bfd *abfd, bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *output_section; - bfd_boolean relocatable = (output_bfd != NULL); + bool relocatable = (output_bfd != NULL); /* Is the address of the relocation really within the section? */ if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) @@ -426,57 +426,57 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift. */ 3, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_BFIN_UNUSED0", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL5M2, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long).. */ 4, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_PCREL5M2", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x0000000F, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_BFIN_UNUSED1, /* type. */ 0, /* rightshift. */ 3, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_BFIN_UNUSED1", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL10, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 10, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_PCREL10", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x000003FF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL12_JUMP, /* type. */ 1, /* rightshift. */ @@ -486,225 +486,225 @@ static reloc_howto_type bfin_howto_table [] = Right shift the rightmost bit.. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 12, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_PCREL12_JUMP", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x0FFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_RIMM16, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_imm16_reloc, /* special_function. */ "R_BFIN_RIMM16", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x0000FFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_LUIMM16, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfin_imm16_reloc, /* special_function. */ "R_BFIN_LUIMM16", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x0000FFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_HUIMM16, /* type. */ 16, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_imm16_reloc, /* special_function. */ "R_BFIN_HUIMM16", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x0000FFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL12_JUMP_S, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 12, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_PCREL12_JUMP_S", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x00000FFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL24_JUMP_X, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ "R_BFIN_PCREL24_JUMP_X", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL24, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ "R_BFIN_PCREL24", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_UNUSEDB, /* type. */ 0, /* rightshift. */ 3, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_BFIN_UNUSEDB", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_BFIN_UNUSEDC, /* type. */ 0, /* rightshift. */ 3, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_BFIN_UNUSEDC", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL24_JUMP_L, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ "R_BFIN_PCREL24_JUMP_L", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL24_CALL_X, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 24, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_pcrel24_reloc, /* special_function. */ "R_BFIN_PCREL24_CALL_X", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x00FFFFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_VAR_EQ_SYMB, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_VAR_EQ_SYMB", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_BFIN_BYTE_DATA, /* type. */ 0, /* rightshift. */ 0, /* size (0 = byte, 1 = short, 2 = long). */ 8, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_BYTE_DATA", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0xFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_BYTE2_DATA, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_BYTE2_DATA", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0xFFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_BYTE4_DATA, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_byte4_reloc, /* special_function. */ "R_BFIN_BYTE4_DATA", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0xFFFFFFFF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_BFIN_PCREL11, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 10, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfin_bfd_reloc, /* special_function. */ "R_BFIN_PCREL11", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x000003FF, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* A 18-bit signed operand with the GOT offset for the address of @@ -713,15 +713,15 @@ static reloc_howto_type bfin_howto_table [] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_GOT17M4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the symbol. */ @@ -729,15 +729,15 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_GOTHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the symbol. */ @@ -745,30 +745,30 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_GOTLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The 32-bit address of the canonical descriptor of a function. */ HOWTO (R_BFIN_FUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the address of canonical descriptor of a function. */ @@ -776,15 +776,15 @@ static reloc_howto_type bfin_howto_table [] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC_GOT17M4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -792,15 +792,15 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC_GOTHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -808,30 +808,30 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC_GOTLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The 32-bit address of the canonical descriptor of a function. */ HOWTO (R_BFIN_FUNCDESC_VALUE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC_VALUE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the address of canonical descriptor of a function. */ @@ -839,15 +839,15 @@ static reloc_howto_type bfin_howto_table [] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC_GOTOFF17M4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -855,15 +855,15 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC_GOTOFFHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -871,15 +871,15 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_FUNCDESC_GOTOFFLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the address of the symbol. */ @@ -887,15 +887,15 @@ static reloc_howto_type bfin_howto_table [] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_GOTOFF17M4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the symbol. */ @@ -903,15 +903,15 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_GOTOFFHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the symbol. */ @@ -919,15 +919,15 @@ static reloc_howto_type bfin_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_BFIN_GOTOFFLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; static reloc_howto_type bfin_gnuext_howto_table [] = @@ -936,59 +936,59 @@ static reloc_howto_type bfin_gnuext_howto_table [] = 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfin_pltpc_reloc, /* special_function. */ "R_BFIN_PLTPC", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffff, /* src_mask. */ 0xffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_BFIN_GOT, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_BFIN_GOT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x7fff, /* src_mask. */ 0x7fff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_BFIN_GNU_VTINHERIT, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ NULL, /* special_function. */ "R_BFIN_GNU_VTINHERIT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_BFIN_GNU_VTENTRY, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ _bfd_elf_rel_vtable_reloc_fn, /* special_function. */ "R_BFIN_GNU_VTENTRY", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - FALSE) /* pcrel_offset. */ + false) /* pcrel_offset. */ }; struct bfin_reloc_map @@ -1041,7 +1041,7 @@ static const struct bfin_reloc_map bfin_reloc_map [] = }; -static bfd_boolean +static bool bfin_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -1062,10 +1062,10 @@ bfin_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Given a BFD reloc type, return the howto. */ @@ -1129,12 +1129,12 @@ bfin_reloc_type_lookup (bfd * abfd ATTRIBUTE_UNUSED, } /* Set by ld emulation if --code-in-l1. */ -bfd_boolean elf32_bfin_code_in_l1 = 0; +bool elf32_bfin_code_in_l1 = 0; /* Set by ld emulation if --data-in-l1. */ -bfd_boolean elf32_bfin_data_in_l1 = 0; +bool elf32_bfin_data_in_l1 = 0; -static bfd_boolean +static bool elf32_bfin_final_write_processing (bfd *abfd) { if (elf32_bfin_code_in_l1) @@ -1146,11 +1146,11 @@ elf32_bfin_final_write_processing (bfd *abfd) /* Return TRUE if the name is a local label. bfin local labels begin with L$. */ -static bfd_boolean +static bool bfin_is_local_label_name (bfd *abfd, const char *label) { if (label[0] == 'L' && label[1] == '$' ) - return TRUE; + return true; return _bfd_elf_is_local_label_name (abfd, label); } @@ -1159,7 +1159,7 @@ bfin_is_local_label_name (bfd *abfd, const char *label) allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool bfin_check_relocs (bfd * abfd, struct bfd_link_info *info, asection *sec, @@ -1175,7 +1175,7 @@ bfin_check_relocs (bfd * abfd, asection *srelgot; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -1208,14 +1208,14 @@ bfin_check_relocs (bfd * abfd, Reconstruct it for later use during GC. */ case R_BFIN_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_BFIN_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_BFIN_GOT: @@ -1229,7 +1229,7 @@ bfin_check_relocs (bfd * abfd, /* Create the .got section. */ elf_hash_table (info)->dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; } sgot = elf_hash_table (info)->sgot; @@ -1244,7 +1244,7 @@ bfin_check_relocs (bfd * abfd, if (h->dynindx == -1 && !h->forced_local) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* Allocate space in the .got section. */ @@ -1266,7 +1266,7 @@ bfin_check_relocs (bfd * abfd, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } if (local_got_refcounts[r_symndx] == 0) @@ -1289,7 +1289,7 @@ bfin_check_relocs (bfd * abfd, } } - return TRUE; + return true; } static enum elf_reloc_type_class @@ -1394,7 +1394,7 @@ bfin_relocate_section (bfd * output_bfd, Elf_Internal_Sym *sym; asection *sec; bfd_vma relocation = 0; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_reloc_status_type r; bfd_vma address; @@ -1402,7 +1402,7 @@ bfin_relocate_section (bfd * output_bfd, if (r_type < 0 || r_type >= 243) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (r_type == R_BFIN_GNU_VTENTRY @@ -1413,14 +1413,14 @@ bfin_relocate_section (bfd * output_bfd, if (howto == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } r_symndx = ELF32_R_SYM (rel->r_info); h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { @@ -1430,7 +1430,7 @@ bfin_relocate_section (bfd * output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1472,7 +1472,7 @@ bfin_relocate_section (bfd * output_bfd, /* Create the .got section. */ elf_hash_table (info)->dynobj = dynobj = output_bfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; } sgot = elf_hash_table (info)->sgot; @@ -1480,7 +1480,7 @@ bfin_relocate_section (bfd * output_bfd, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) - 1); @@ -1517,7 +1517,7 @@ bfin_relocate_section (bfd * output_bfd, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -1588,7 +1588,7 @@ bfin_relocate_section (bfd * output_bfd, "unresolvable relocation against symbol `%s'"), input_bfd, input_section, (uint64_t) rel->r_offset, h->root.root.string); - return FALSE; + return false; } if (r != bfd_reloc_ok) @@ -1603,7 +1603,7 @@ bfin_relocate_section (bfd * output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -1619,12 +1619,12 @@ bfin_relocate_section (bfd * output_bfd, (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"), input_bfd, input_section, (uint64_t) rel->r_offset, name, (int) r); - return FALSE; + return false; } } } - return TRUE; + return true; } static asection * @@ -2050,7 +2050,7 @@ _bfinfdpic_osec_to_segment (bfd *output_bfd, asection *osec) return (p != NULL) ? p - elf_tdata (output_bfd)->phdr : -1; } -inline static bfd_boolean +inline static bool _bfinfdpic_osec_readonly_p (bfd *output_bfd, asection *osec) { unsigned seg = _bfinfdpic_osec_to_segment (output_bfd, osec); @@ -2061,7 +2061,7 @@ _bfinfdpic_osec_readonly_p (bfd *output_bfd, asection *osec) /* Generate relocations for GOT entries, function descriptors, and code for PLT and lazy PLT entries. */ -inline static bfd_boolean +inline static bool _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, bfd *output_bfd, struct bfd_link_info *info, @@ -2073,7 +2073,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, int dynindx = -1; if (entry->done) - return TRUE; + return true; entry->done = 1; if (entry->got_entry || entry->fdgot_entry || entry->fd_entry) @@ -2189,7 +2189,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, idx = dynindx; ad = addend; if (ad) - return FALSE; + return false; } else { @@ -2333,7 +2333,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, else if (entry->lazyplt) { if (ad) - return FALSE; + return false; fd_lazy_rel_offset = ofst; @@ -2454,7 +2454,7 @@ _bfinfdpic_emit_got_relocs_plt_entries (struct bfinfdpic_relocs_info *entry, } } - return TRUE; + return true; } /* Relocate an Blackfin ELF section. @@ -2550,7 +2550,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, if (howto == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } h = NULL; @@ -2570,8 +2570,8 @@ bfinfdpic_relocate_section (bfd * output_bfd, } else { - bfd_boolean warned, ignored; - bfd_boolean unresolved_reloc; + bool warned, ignored; + bool unresolved_reloc; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2634,7 +2634,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, (info), input_bfd, r_symndx, orig_addend, INSERT); if (! picrel) - return FALSE; + return false; if (!_bfinfdpic_emit_got_relocs_plt_entries (picrel, output_bfd, info, osec, sym, @@ -2645,7 +2645,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, (_("%pB: relocation at `%pA+%#" PRIx64 "' " "references symbol `%s' with nonzero addend"), input_bfd, input_section, (uint64_t) rel->r_offset, name); - return FALSE; + return false; } @@ -2661,7 +2661,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, info->callbacks->warning (info, _("relocation references symbol not defined in the module"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } break; } @@ -2759,7 +2759,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, info->callbacks->warning (info, _("R_BFIN_FUNCDESC references dynamic symbol with nonzero addend"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } dynindx = h->dynindx; } @@ -2799,7 +2799,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, (info, _("cannot emit fixups in read-only section"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } offset = _bfd_elf_section_offset @@ -2829,7 +2829,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, (info, _("cannot emit dynamic relocations in read-only section"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); @@ -2879,7 +2879,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, info->callbacks->warning (info, _("R_BFIN_FUNCDESC_VALUE references dynamic symbol with nonzero addend"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } dynindx = h->dynindx; } @@ -2920,7 +2920,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, (info, _("cannot emit fixups in read-only section"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (!h || h->root.type != bfd_link_hash_undefweak) { @@ -2957,7 +2957,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, (info, _("cannot emit dynamic relocations in read-only section"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (offset != (bfd_vma)-1) @@ -3044,7 +3044,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, : _("warning: relocation references a different segment"), name, input_bfd, input_section, rel->r_offset); if (!silence_segment_error && bfd_link_pic (info)) - return FALSE; + return false; elf_elfheader (output_bfd)->e_flags |= EF_BFIN_PIC; } @@ -3124,7 +3124,7 @@ bfinfdpic_relocate_section (bfd * output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -3150,12 +3150,12 @@ bfinfdpic_relocate_section (bfd * output_bfd, } } - return TRUE; + return true; } /* We need dynamic symbols for every section, since segments can relocate independently. */ -static bfd_boolean +static bool _bfinfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, asection *p) @@ -3167,12 +3167,12 @@ _bfinfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, /* If sh_type is yet undecided, assume it could be SHT_PROGBITS/SHT_NOBITS. */ case SHT_NULL: - return FALSE; + return false; /* There shouldn't be section relative relocations against any other section. */ default: - return TRUE; + return true; } } @@ -3180,7 +3180,7 @@ _bfinfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, is almost entirely copied from elflink.c:_bfd_elf_create_got_section(). */ -static bfd_boolean +static bool _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) { flagword flags, pltflags; @@ -3192,7 +3192,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ s = elf_hash_table (info)->sgot; if (s != NULL) - return TRUE; + return true; /* Machine specific: although pointers are 32-bits wide, we want the GOT to be aligned to a 64-bit boundary, such that function @@ -3208,7 +3208,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) elf_hash_table (info)->sgot = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (bed->want_got_sym) { @@ -3219,12 +3219,12 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) h = _bfd_elf_define_linkage_sym (abfd, info, s, "__GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; /* Machine-specific: we want the symbol for executables as well. */ if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* The first bit of the global offset table is the header. */ @@ -3239,13 +3239,13 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) bfinfdpic_relocs_info_eq, (htab_del) NULL); if (! bfinfdpic_relocs_info (info)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".rel.got", (flags | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; bfinfdpic_gotrel_section (info) = s; @@ -3254,7 +3254,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) (flags | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; bfinfdpic_gotfixup_section (info) = s; } @@ -3268,7 +3268,7 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; /* Blackfin-specific: remember it. */ bfinfdpic_plt_section (info) = s; @@ -3280,15 +3280,15 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) if (! (_bfd_generic_link_add_one_symbol (info, abfd, "__PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, 0, NULL, - FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->type = STT_OBJECT; if (! bfd_link_executable (info) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* Blackfin-specific: we want rel relocations for the plt. */ @@ -3296,17 +3296,17 @@ _bfin_create_got_section (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; /* Blackfin-specific: remember it. */ bfinfdpic_pltrel_section (info) = s; - return TRUE; + return true; } /* Make sure the got and plt sections exist, and that our pointers in the link hash table point to them. */ -static bfd_boolean +static bool elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { /* This is mostly copied from @@ -3323,7 +3323,7 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* Blackfin-specific: we want to create the GOT in the Blackfin way. */ if (! _bfin_create_got_section (abfd, info)) - return FALSE; + return false; /* Blackfin-specific: make sure we created everything we wanted. */ BFD_ASSERT (bfinfdpic_got_section (info) && bfinfdpic_gotrel_section (info) @@ -3342,7 +3342,7 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".dynbss", SEC_ALLOC | SEC_LINKER_CREATED); if (s == NULL) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the @@ -3362,11 +3362,11 @@ elf32_bfinfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Compute the total GOT size required by each symbol in each range. @@ -3434,7 +3434,7 @@ _bfinfdpic_count_nontls_entries (struct bfinfdpic_relocs_info *entry, static void _bfinfdpic_count_relocs_fixups (struct bfinfdpic_relocs_info *entry, struct _bfinfdpic_dynamic_got_info *dinfo, - bfd_boolean subtract) + bool subtract) { bfd_vma relocs = 0, fixups = 0; @@ -3487,7 +3487,7 @@ _bfinfdpic_count_got_plt_entries (void **entryp, void *dinfo_) _bfinfdpic_count_nontls_entries (entry, dinfo); - _bfinfdpic_count_relocs_fixups (entry, dinfo, FALSE); + _bfinfdpic_count_relocs_fixups (entry, dinfo, false); return 1; } @@ -3860,7 +3860,7 @@ _bfinfdpic_resolve_final_relocs_info (void **entryp, void *p) section and the rofixup section. Assign locations for GOT and PLT entries. */ -static bfd_boolean +static bool _bfinfdpic_size_got_plt (bfd *output_bfd, struct _bfinfdpic_dynamic_got_plt_info *gpinfop) { @@ -3926,7 +3926,7 @@ _bfinfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, bfinfdpic_got_section (info)->size); if (bfinfdpic_got_section (info)->contents == NULL) - return FALSE; + return false; } if (elf_hash_table (info)->dynamic_sections_created) @@ -3945,7 +3945,7 @@ _bfinfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, bfinfdpic_gotrel_section (info)->size); if (bfinfdpic_gotrel_section (info)->contents == NULL) - return FALSE; + return false; } bfinfdpic_gotfixup_section (info)->size = (gpinfop->g.fixups + 1) * 4; @@ -3957,7 +3957,7 @@ _bfinfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, bfinfdpic_gotfixup_section (info)->size); if (bfinfdpic_gotfixup_section (info)->contents == NULL) - return FALSE; + return false; } if (elf_hash_table (info)->dynamic_sections_created) @@ -3971,7 +3971,7 @@ _bfinfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, bfinfdpic_pltrel_section (info)->size); if (bfinfdpic_pltrel_section (info)->contents == NULL) - return FALSE; + return false; } /* Add 4 bytes for every block of at most 65535 lazy PLT entries, @@ -4016,15 +4016,15 @@ _bfinfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, bfinfdpic_plt_section (info)->size); if (bfinfdpic_plt_section (info)->contents == NULL) - return FALSE; + return false; } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -4070,7 +4070,7 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, bfinfdpic_dynamic_got_plt_info (info) = bfd_alloc (dynobj, sizeof (gpinfo.g)); if (!_bfinfdpic_size_got_plt (output_bfd, &gpinfo)) - return FALSE; + return false; s = bfd_get_linker_section (dynobj, ".dynbss"); if (s && s->size == 0) @@ -4080,27 +4080,27 @@ elf32_bfinfdpic_size_dynamic_sections (bfd *output_bfd, if (s && s->size == 0) s->flags |= SEC_EXCLUDE; - return _bfd_elf_add_dynamic_tags (output_bfd, info, TRUE); + return _bfd_elf_add_dynamic_tags (output_bfd, info, true); } -static bfd_boolean +static bool elf32_bfinfdpic_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { if (!bfd_link_relocatable (info) && !bfd_elf_stack_segment_size (output_bfd, info, "__stacksize", DEFAULT_STACK_SIZE)) - return FALSE; + return false; - return TRUE; + return true; } /* Check whether any of the relocations was optimized away, and subtract it from the relocation or fixup count. */ -static bfd_boolean +static bool _bfinfdpic_check_discarded_relocs (bfd *abfd, asection *sec, struct bfd_link_info *info, - bfd_boolean *changed) + bool *changed) { Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes, **sym_hashes_end; @@ -4108,7 +4108,7 @@ _bfinfdpic_check_discarded_relocs (bfd *abfd, asection *sec, if ((sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -4156,28 +4156,28 @@ _bfinfdpic_check_discarded_relocs (bfd *abfd, asection *sec, rel->r_addend, NO_INSERT); if (! picrel) - return FALSE; + return false; - *changed = TRUE; + *changed = true; dinfo = bfinfdpic_dynamic_got_plt_info (info); - _bfinfdpic_count_relocs_fixups (picrel, dinfo, TRUE); + _bfinfdpic_count_relocs_fixups (picrel, dinfo, true); if (ELF32_R_TYPE (rel->r_info) == R_BFIN_BYTE4_DATA) picrel->relocs32--; else /* we know (ELF32_R_TYPE (rel->r_info) == R_BFIN_FUNCDESC) */ picrel->relocsfd--; - _bfinfdpic_count_relocs_fixups (picrel, dinfo, FALSE); + _bfinfdpic_count_relocs_fixups (picrel, dinfo, false); } - return TRUE; + return true; } -static bfd_boolean +static bool bfinfdpic_elf_discard_info (bfd *ibfd, struct elf_reloc_cookie *cookie ATTRIBUTE_UNUSED, struct bfd_link_info *info) { - bfd_boolean changed = FALSE; + bool changed = false; asection *s; bfd *obfd = NULL; @@ -4186,7 +4186,7 @@ bfinfdpic_elf_discard_info (bfd *ibfd, if (s->sec_info_type == SEC_INFO_TYPE_EH_FRAME) { if (!_bfinfdpic_check_discarded_relocs (ibfd, s, info, &changed)) - return FALSE; + return false; obfd = s->output_section->owner; } @@ -4204,13 +4204,13 @@ bfinfdpic_elf_discard_info (bfd *ibfd, NULL); if (!_bfinfdpic_size_got_plt (obfd, &gpinfo)) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -4246,7 +4246,7 @@ elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd, { _bfd_error_handler ("LINKER BUG: .rofixup section size mismatch"); - return FALSE; + return false; } } } @@ -4302,13 +4302,13 @@ elf32_bfinfdpic_finish_dynamic_sections (bfd *output_bfd, } } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a regular object. */ -static bfd_boolean +static bool elf32_bfinfdpic_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -4334,32 +4334,32 @@ elf32_bfinfdpic_adjust_dynamic_symbol (struct bfd_link_info *info, h->root.u.def.value = def->root.u.def.value; } - return TRUE; + return true; } /* Perform any actions needed for dynamic symbols. */ -static bfd_boolean +static bool elf32_bfinfdpic_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Decide whether to attempt to turn absptr or lsda encodings in shared libraries into pcrel within the given input section. */ -static bfd_boolean +static bool bfinfdpic_elf_use_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, asection *eh_frame_section ATTRIBUTE_UNUSED) { /* We can't use PC-relative encodings in FDPIC binaries, in general. */ - return FALSE; + return false; } /* Adjust the contents of an eh_frame_hdr section before they're output. */ @@ -4499,7 +4499,7 @@ bfinfdpic_elf_encode_eh_address (bfd *abfd, PLT entry should be faster), or taking hints from the compiler. Given infinite time and money... :-) */ -static bfd_boolean +static bool bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -4511,7 +4511,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, struct bfinfdpic_relocs_info *picrel; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -4560,7 +4560,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, { elf_hash_table (info)->dynobj = dynobj = abfd; if (! _bfin_create_got_section (abfd, info)) - return FALSE; + return false; } if (! IS_FDPIC (abfd)) { @@ -4589,7 +4589,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, (info), abfd, r_symndx, rel->r_addend, INSERT); if (! picrel) - return FALSE; + return false; break; default: @@ -4662,7 +4662,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, Reconstruct it for later use during GC. */ case R_BFIN_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually @@ -4671,7 +4671,7 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, BFD_ASSERT (h != NULL); if (h != NULL && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_BFIN_HUIMM16: @@ -4686,16 +4686,16 @@ bfinfdpic_check_relocs (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: unsupported relocation type %#x"), abfd, (int) ELF32_R_TYPE (rel->r_info)); - return FALSE; + return false; } } - return TRUE; + return true; } /* Set the right machine number for a Blackfin ELF file. */ -static bfd_boolean +static bool elf32_bfin_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_bfin, 0); @@ -4703,16 +4703,16 @@ elf32_bfin_object_p (bfd *abfd) == (IS_FDPIC (abfd))); } -static bfd_boolean +static bool elf32_bfin_set_private_flags (bfd * abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Display the flags field. */ -static bfd_boolean +static bool elf32_bfin_print_private_bfd_data (bfd * abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -4736,22 +4736,22 @@ elf32_bfin_print_private_bfd_data (bfd * abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword old_flags, new_flags; - bfd_boolean error = FALSE; + bool error = false; /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; @@ -4768,13 +4768,13 @@ elf32_bfin_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) /* First call, no flags set. */ { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } if (((new_flags & EF_BFIN_FDPIC) == 0) != (! IS_FDPIC (obfd))) { - error = TRUE; + error = true; if (IS_FDPIC (obfd)) _bfd_error_handler (_("%pB: cannot link non-fdpic object file into fdpic executable"), @@ -4851,7 +4851,7 @@ bfin_link_hash_table_create (bfd * abfd) /* Finish up the dynamic sections. */ -static bfd_boolean +static bool bfin_finish_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -4879,13 +4879,13 @@ bfin_finish_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool bfin_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -4949,7 +4949,7 @@ bfin_finish_dynamic_symbol (bfd * output_bfd, || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -4958,7 +4958,7 @@ bfin_finish_dynamic_symbol (bfd * output_bfd, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool bfin_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -4991,7 +4991,7 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -5002,7 +5002,7 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -5035,7 +5035,7 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info, if ((h->root.u.def.section->flags & SEC_ALLOC) != 0) { _bfd_error_handler (_("the bfin target does not currently support the generation of copy relocations")); - return FALSE; + return false; } #endif /* We need to figure out the alignment required for this symbol. I @@ -5049,7 +5049,7 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info, if (power_of_two > bfd_section_alignment (s)) { if (!bfd_set_section_alignment (s, power_of_two)) - return FALSE; + return false; } /* Define the symbol as being at this point in the section. */ @@ -5059,7 +5059,7 @@ bfin_adjust_dynamic_symbol (struct bfd_link_info *info, /* Increment the section size to make room for the symbol. */ s->size += h->size; - return TRUE; + return true; } /* The bfin linker needs to keep track of the number of relocs that it @@ -5094,7 +5094,7 @@ struct bfin_pcrel_relocs_copied against a readonly section, and set the DF_TEXTREL flag in this case. */ -static bfd_boolean +static bool bfin_discard_copies (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info = (struct bfd_link_info *) inf; @@ -5114,23 +5114,23 @@ bfin_discard_copies (struct elf_link_hash_entry *h, void * inf) } } - return TRUE; + return true; } for (s = bfin_hash_entry (h)->pcrel_relocs_copied; s != NULL; s = s->next) s->section->size -= s->count * sizeof (Elf32_External_Rela); - return TRUE; + return true; } -static bfd_boolean +static bool bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -5171,11 +5171,11 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; - bfd_boolean strip; + bool strip; if ((s->flags & SEC_LINKER_CREATED) == 0) continue; @@ -5184,7 +5184,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, of the dynobj section names depend upon the input files. */ name = bfd_section_name (s); - strip = FALSE; + strip = false; if (startswith (name, ".rela")) { @@ -5199,11 +5199,11 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, adjust_dynamic_symbol is called, and it is that function which decides whether anything needs to go into these sections. */ - strip = TRUE; + strip = true; } else { - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -5230,7 +5230,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, contents to zero. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL && s->size != 0) - return FALSE; + return false; } if (elf_hash_table (info)->dynamic_sections_created) @@ -5246,7 +5246,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, if (!bfd_link_pic (info)) { if (!add_dynamic_entry (DT_DEBUG, 0)) - return FALSE; + return false; } @@ -5256,18 +5256,18 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, || !add_dynamic_entry (DT_RELASZ, 0) || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela))) - return FALSE; + return false; } if ((info->flags & DF_TEXTREL) != 0) { if (!add_dynamic_entry (DT_TEXTREL, 0)) - return FALSE; + return false; } } #undef add_dynamic_entry - return TRUE; + return true; } /* Given a .data section and a .emreloc in-memory section, store @@ -5277,7 +5277,7 @@ bfin_size_dynamic_sections (bfd * output_bfd ATTRIBUTE_UNUSED, after the add_symbols entry point has been called for all the objects, and before the final_link entry point is called. */ -bfd_boolean +bool bfd_bfin_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info, asection *datasec, @@ -5296,7 +5296,7 @@ bfd_bfin_elf32_create_embedded_relocs (bfd *abfd, *errmsg = NULL; if (datasec->reloc_count == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -5380,14 +5380,14 @@ bfd_bfin_elf32_create_embedded_relocs (bfd *abfd, free (isymbuf); if (elf_section_data (datasec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (elf_section_data (datasec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } struct bfd_elf_special_section const elf32_bfin_special_sections[] = diff --git a/bfd/elf32-bfin.h b/bfd/elf32-bfin.h index 4a740cae60..4938cae4d5 100644 --- a/bfd/elf32-bfin.h +++ b/bfd/elf32-bfin.h @@ -18,6 +18,6 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -extern bfd_boolean bfd_bfin_elf32_create_embedded_relocs +extern bool bfd_bfin_elf32_create_embedded_relocs (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); diff --git a/bfd/elf32-cr16.c b/bfd/elf32-cr16.c index 958f648608..2a1c8be624 100644 --- a/bfd/elf32-cr16.c +++ b/bfd/elf32-cr16.c @@ -118,366 +118,366 @@ static reloc_howto_type cr16_elf_howto_table[] = 0, /* rightshift */ 3, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_NUM8, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_NUM8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_NUM16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_NUM16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_NUM32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_NUM32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_NUM32a, /* type */ 1, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_NUM32a", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_REGREL4, /* type */ 0, /* rightshift */ 0, /* size */ 4, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_REGREL4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xf, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_REGREL4a, /* type */ 0, /* rightshift */ 0, /* size */ 4, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_REGREL4a", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xf, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_REGREL14, /* type */ 0, /* rightshift */ 1, /* size */ 14, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_REGREL14", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_REGREL14a, /* type */ 0, /* rightshift */ 1, /* size */ 14, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_REGREL14a", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_REGREL16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_REGREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_REGREL20, /* type */ 0, /* rightshift */ 2, /* size */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_REGREL20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_REGREL20a, /* type */ 0, /* rightshift */ 2, /* size */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_REGREL20a", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_ABS20, /* type */ 0, /* rightshift */ 2, /* size */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_ABS20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_ABS24, /* type */ 0, /* rightshift */ 2, /* size */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_ABS24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_IMM4, /* type */ 0, /* rightshift */ 0, /* size */ 4, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_IMM4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xf, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_IMM8, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_IMM8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_IMM16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_IMM16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_IMM20, /* type */ 0, /* rightshift */ 2, /* size */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_IMM20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_IMM24, /* type */ 0, /* rightshift */ 2, /* size */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_IMM24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_IMM32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_IMM32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_IMM32a, /* type */ 1, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_IMM32a", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_DISP4, /* type */ 1, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_DISP4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xf, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_DISP8, /* type */ 1, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_DISP8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x1ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_DISP16, /* type */ 0, /* rightshift REVIITS: To sync with WinIDEA*/ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_DISP16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x1ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* REVISIT: DISP24 should be left-shift by 2 as per ISA doc but its not done, to sync with WinIDEA and CR16 4.1 tools */ HOWTO (R_CR16_DISP24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_DISP24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x1ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_DISP24a, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_DISP24a", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit switch table entry. This is generated for an expression such as ``.byte L1 - L2''. The offset holds the difference @@ -486,15 +486,15 @@ static reloc_howto_type cr16_elf_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_SWITCH8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit switch table entry. This is generated for an expression such as ``.word L1 - L2''. The offset holds the difference @@ -503,15 +503,15 @@ static reloc_howto_type cr16_elf_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_SWITCH16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32 bit switch table entry. This is generated for an expression such as ``.long L1 - L2''. The offset holds the difference @@ -520,63 +520,63 @@ static reloc_howto_type cr16_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_SWITCH32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_CR16_GOT_REGREL20, /* type */ 0, /* rightshift */ 2, /* size */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_GOT_REGREL20", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_GOTC_REGREL20, /* type */ 0, /* rightshift */ 2, /* size */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_GOTC_REGREL20", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CR16_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CR16_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE) /* pcrel_offset */ + true) /* pcrel_offset */ }; /* Create the GOT section. */ -static bfd_boolean +static bool _bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info) { flagword flags; @@ -588,7 +588,7 @@ _bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info) /* This function may be called more than once. */ if (htab->sgot != NULL) - return TRUE; + return true; switch (bed->s->arch_size) { @@ -602,7 +602,7 @@ _bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info) default: bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY @@ -612,7 +612,7 @@ _bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info) htab->sgot= s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (bed->want_got_plt) { @@ -620,7 +620,7 @@ _bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info) htab->sgotplt = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got @@ -630,12 +630,12 @@ _bfd_cr16_elf_create_got_section (bfd * abfd, struct bfd_link_info * info) h = _bfd_elf_define_linkage_sym (abfd, info, s, "_GLOBAL_OFFSET_TABLE_"); htab->hgot = h; if (h == NULL) - return FALSE; + return false; /* The first bit of the global offset table is the header. */ s->size += bed->got_header_size; - return TRUE; + return true; } @@ -672,7 +672,7 @@ elf_cr16_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Retrieve a howto ptr using an internal relocation entry. */ -static bfd_boolean +static bool elf_cr16_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -684,17 +684,17 @@ elf_cr16_info_to_howto (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = cr16_elf_howto_table + r_type; - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool cr16_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -710,10 +710,10 @@ cr16_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, sgot = NULL; srelgot = NULL; - bfd_boolean result = FALSE; + bool result = false; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -824,7 +824,7 @@ cr16_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, } } - result = TRUE; + result = true; fail: free (isymbuf); @@ -1206,7 +1206,7 @@ cr16_elf_final_link_relocate (reloc_howto_type *howto, /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool elf32_cr16_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd, asection *sec, bfd_vma addr, int count) { @@ -1330,7 +1330,7 @@ elf32_cr16_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd, sym_hash->root.u.def.value -= count; } - return TRUE; + return true; } /* Relocate a CR16 ELF section. */ @@ -1377,7 +1377,7 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1425,7 +1425,7 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -1452,7 +1452,7 @@ elf32_cr16_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -1463,7 +1463,7 @@ elf32_cr16_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { Elf_Internal_Shdr *symtab_hdr; @@ -1496,7 +1496,7 @@ elf32_cr16_get_relocated_section_contents (bfd *output_bfd, bfd_size_type amt; internal_relocs = _bfd_elf_link_read_relocs (input_bfd, input_section, - NULL, NULL, FALSE); + NULL, NULL, false); if (internal_relocs == NULL) goto error_return; @@ -1636,7 +1636,7 @@ elf_cr16_mach (flagword flags) file. This gets the CR16 architecture right based on the machine number. */ -static bfd_boolean +static bool _bfd_cr16_elf_final_write_processing (bfd *abfd) { unsigned long val; @@ -1652,35 +1652,35 @@ _bfd_cr16_elf_final_write_processing (bfd *abfd) } -static bfd_boolean +static bool _bfd_cr16_elf_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_cr16, elf_cr16_mach (elf_elfheader (abfd)->e_flags)); - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool _bfd_cr16_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) && bfd_get_mach (obfd) < bfd_get_mach (ibfd)) { if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd))) - return FALSE; + return false; } - return TRUE; + return true; } @@ -1695,9 +1695,9 @@ _bfd_cr16_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) Symbol- and reloc-reading infrastructure copied from elf-m10200.c. */ -static bfd_boolean +static bool elf32_cr16_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -1706,7 +1706,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, Elf_Internal_Sym *isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -1715,7 +1715,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -1858,7 +1858,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -1906,7 +1906,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -1977,7 +1977,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -2030,7 +2030,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -2123,7 +2123,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } #endif @@ -2153,7 +2153,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -2163,7 +2163,7 @@ elf32_cr16_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } static asection * @@ -2178,7 +2178,7 @@ elf32_cr16_gc_mark_hook (asection *sec, /* Create dynamic sections when linking against a dynamic object. */ -static bfd_boolean +static bool _bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -2199,7 +2199,7 @@ _bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) default: bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and @@ -2215,10 +2215,10 @@ _bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->srelplt = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (! _bfd_cr16_elf_create_got_section (abfd, info)) - return FALSE; + return false; if (bed->want_dynbss) { @@ -2231,7 +2231,7 @@ _bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".dynbss", SEC_ALLOC | SEC_LINKER_CREATED); if (s == NULL) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the @@ -2252,11 +2252,11 @@ _bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -2265,7 +2265,7 @@ _bfd_cr16_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, struct elf_link_hash_entry * h) { @@ -2298,14 +2298,14 @@ _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, a procedure linkage table, and we can just do a REL32 reloc instead. */ BFD_ASSERT (h->needs_plt); - return TRUE; + return true; } /* Make sure this symbol is output as a dynamic symbol. */ if (h->dynindx == -1) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* We also need to make an entry in the .got.plt section, which @@ -2321,7 +2321,7 @@ _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, BFD_ASSERT (s != NULL); s->size += sizeof (Elf32_External_Rela); - return TRUE; + return true; } /* If this is a weak symbol, and there is a real definition, the @@ -2333,7 +2333,7 @@ _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2344,12 +2344,12 @@ _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_executable (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -2383,13 +2383,13 @@ _bfd_cr16_elf_adjust_dynamic_symbol (struct bfd_link_info * info, /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool _bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info) { bfd * dynobj; asection * s; - bfd_boolean relocs; + bool relocs; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -2422,7 +2422,7 @@ _bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char * name; @@ -2446,7 +2446,7 @@ _bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd, /* Remember whether there are any reloc sections other than .rela.plt. */ if (strcmp (name, ".rela.plt") != 0) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -2483,7 +2483,7 @@ _bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd, instead of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -2492,7 +2492,7 @@ _bfd_cr16_elf_size_dynamic_sections (bfd * output_bfd, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool _bfd_cr16_elf_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info * info, struct elf_link_hash_entry * h, @@ -2574,12 +2574,12 @@ _bfd_cr16_elf_finish_dynamic_symbol (bfd * output_bfd, || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool _bfd_cr16_elf_finish_dynamic_sections (bfd * output_bfd, struct bfd_link_info * info) { @@ -2649,7 +2649,7 @@ _bfd_cr16_elf_finish_dynamic_sections (bfd * output_bfd, elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; - return TRUE; + return true; } /* Given a .data.rel section and a .emreloc in-memory section, store @@ -2659,7 +2659,7 @@ _bfd_cr16_elf_finish_dynamic_sections (bfd * output_bfd, after the add_symbols entry point has been called for all the objects, and before the final_link entry point is called. */ -bfd_boolean +bool bfd_cr16_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info, asection *datasec, @@ -2678,7 +2678,7 @@ bfd_cr16_elf32_create_embedded_relocs (bfd *abfd, *errmsg = NULL; if (datasec->reloc_count == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -2763,14 +2763,14 @@ bfd_cr16_elf32_create_embedded_relocs (bfd *abfd, free (isymbuf); if (elf_section_data (datasec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (elf_section_data (datasec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } diff --git a/bfd/elf32-cr16.h b/bfd/elf32-cr16.h index d28b5ffdcd..5a22d3acb1 100644 --- a/bfd/elf32-cr16.h +++ b/bfd/elf32-cr16.h @@ -17,6 +17,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -extern bfd_boolean bfd_cr16_elf32_create_embedded_relocs +extern bool bfd_cr16_elf32_create_embedded_relocs (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index c5f9a8bd73..7381c77c59 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -31,7 +31,7 @@ bfd_reloc_status_type cris_elf_pcrel_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -static bfd_boolean +static bool cris_elf_set_mach_from_flags (bfd *, unsigned long); /* Forward declarations. */ @@ -42,52 +42,52 @@ static reloc_howto_type cris_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_CRIS_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_CRIS_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_CRIS_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ /* We don't want overflow complaints for 64-bit vma builds for e.g. sym+0x40000000 (or actually sym-0xc0000000 in @@ -97,85 +97,85 @@ static reloc_howto_type cris_elf_howto_table [] = complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit PC-relative relocation. */ HOWTO (R_CRIS_8_PCREL, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ cris_elf_pcrel_reloc, /* special_function */ "R_CRIS_8_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x00ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit PC-relative relocation. */ HOWTO (R_CRIS_16_PCREL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ cris_elf_pcrel_reloc, /* special_function */ "R_CRIS_16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32 bit PC-relative relocation. */ HOWTO (R_CRIS_32_PCREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ cris_elf_pcrel_reloc, /* special_function */ "R_CRIS_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_CRIS_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_CRIS_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_CRIS_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_CRIS_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This is used only by the dynamic linker. The symbol should exist both in the object being run and in some shared library. The @@ -186,45 +186,45 @@ static reloc_howto_type cris_elf_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_CRIS_32, but used when setting global offset table entries. */ HOWTO (R_CRIS_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Marks a procedure linkage table entry for a symbol. */ HOWTO (R_CRIS_JUMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_JUMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Used only by the dynamic linker. When the object is run, this longword is set to the load address of the object, plus the @@ -233,44 +233,44 @@ static reloc_howto_type cris_elf_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_CRIS_32, but referring to the GOT table entry for the symbol. */ HOWTO (R_CRIS_16_GOT, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_16_GOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRIS_32_GOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_32_GOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_CRIS_32_GOT, but referring to (and requesting a) PLT part of the GOT table for the symbol. */ @@ -278,29 +278,29 @@ static reloc_howto_type cris_elf_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_16_GOTPLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRIS_32_GOTPLT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_32_GOTPLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32-bit offset from GOT to (local const) symbol: no GOT entry should be necessary. */ @@ -308,15 +308,15 @@ static reloc_howto_type cris_elf_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_32_GOTREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32-bit offset from GOT to entry for this symbol in PLT and request to create PLT entry for symbol. */ @@ -324,15 +324,15 @@ static reloc_howto_type cris_elf_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRIS_32_PLT_GOTREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32-bit offset from PC (location after the relocation) + addend to entry for this symbol in PLT and request to create PLT entry for @@ -341,15 +341,15 @@ static reloc_howto_type cris_elf_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ cris_elf_pcrel_reloc, /* special_function */ "R_CRIS_32_PLT_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* We don't handle these in any special manner and cross-format linking is not supported; just recognize them enough to pass them @@ -357,11 +357,11 @@ static reloc_howto_type cris_elf_howto_table [] = tests to actually refuse gracefully to handle these and PIC relocs for cross-format linking. */ #define TLSHOWTO32(name) \ - HOWTO (name, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, \ - bfd_elf_generic_reloc, #name, FALSE, 0, 0xffffffff, FALSE) + HOWTO (name, 0, 2, 32, false, 0, complain_overflow_bitfield, \ + bfd_elf_generic_reloc, #name, false, 0, 0xffffffff, false) #define TLSHOWTO16X(name, X) \ - HOWTO (name, 0, 1, 16, FALSE, 0, complain_overflow_ ## X, \ - bfd_elf_generic_reloc, #name, FALSE, 0, 0xffff, FALSE) + HOWTO (name, 0, 1, 16, false, 0, complain_overflow_ ## X, \ + bfd_elf_generic_reloc, #name, false, 0, 0xffff, false) #define TLSHOWTO16(name) TLSHOWTO16X(name, unsigned) #define TLSHOWTO16S(name) TLSHOWTO16X(name, signed) @@ -453,7 +453,7 @@ cris_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an CRIS ELF reloc. */ -static bfd_boolean +static bool cris_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -467,10 +467,10 @@ cris_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & cris_elf_howto_table [r_type]; - return TRUE; + return true; } bfd_reloc_status_type @@ -504,7 +504,7 @@ cris_elf_pcrel_reloc (bfd *abfd ATTRIBUTE_UNUSED, some similarities with other ports, hoping to simplify general changes, while still keeping Linux/CRIS and Linux/CRISv32 code apart. */ -static bfd_boolean +static bool cris_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -514,7 +514,7 @@ cris_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 202: /* Linux/CRISv32 */ /* pr_cursig */ @@ -533,7 +533,7 @@ cris_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 214: /* Linux/CRIS */ /* pr_cursig */ @@ -554,14 +554,14 @@ cris_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool cris_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (bfd_get_mach (abfd) == bfd_mach_cris_v32) switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/CRISv32 elf_prpsinfo */ elf_tdata (abfd)->core->program @@ -573,7 +573,7 @@ cris_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/CRIS elf_prpsinfo */ elf_tdata (abfd)->core->program @@ -594,7 +594,7 @@ cris_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* The name of the dynamic interpreter. This is put in the .interp @@ -787,10 +787,10 @@ struct elf_cris_link_hash_entry bfd_signed_vma dtp_refcount; }; -static bfd_boolean +static bool elf_cris_discard_excess_dso_dynamics (struct elf_cris_link_hash_entry *, void * ); -static bfd_boolean +static bool elf_cris_discard_excess_program_dynamics (struct elf_cris_link_hash_entry *, void *); @@ -831,7 +831,7 @@ struct elf_cris_link_hash_table #define elf_cris_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* Get the CRIS ELF linker hash table from a link_info structure. */ @@ -992,7 +992,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, htab = elf_cris_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; local_got_offsets = elf_local_got_offsets (input_bfd); @@ -1022,7 +1022,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, bfd_reloc_status_type r; const char *symname = NULL; enum elf_cris_reloc_type r_type; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; r_type = ELF32_R_TYPE (rel->r_info); @@ -1049,8 +1049,8 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean warned, ignored; - bfd_boolean unresolved_reloc; + bool warned, ignored; + bool unresolved_reloc; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1123,7 +1123,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, cris_elf_howto_table[r_type].name, symname); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } } @@ -1197,7 +1197,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, do; this is probably an internal error. But it is true that we didn't like that particular input. */ bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Fall through. */ @@ -1327,7 +1327,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, symname[0] != '\0' ? symname : _("[whose name is lost]")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } break; @@ -1352,7 +1352,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, cris_elf_howto_table[r_type].name, symname); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* This can happen if we get a link error with the input ELF @@ -1367,7 +1367,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, input_section, cris_elf_howto_table[r_type].name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* This relocation is like a PC-relative one, except the @@ -1451,7 +1451,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip, relocate; + bool skip, relocate; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -1460,25 +1460,25 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (sreloc == NULL) { sreloc = _bfd_elf_get_dynamic_reloc_section - (dynobj, input_section, /*rela?*/ TRUE); + (dynobj, input_section, /*rela?*/ true); /* The section should have been created in cris_elf_check_relocs, but that function will not be called for objects which fail in cris_elf_merge_private_bfd_data. */ if (sreloc == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2 /* For now, undefined weak symbols with non-default visibility (yielding 0), like exception info for @@ -1489,7 +1489,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, || (h != NULL && h->root.type == bfd_link_hash_undefweak && ELF_ST_VISIBILITY (h->other) != STV_DEFAULT)) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -1511,7 +1511,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (r_type == R_CRIS_32) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_CRIS_RELATIVE); } else @@ -1523,7 +1523,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -1591,7 +1591,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, symname != NULL && symname[0] != '\0' ? symname : _("[whose name is lost]")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } BFD_ASSERT ((input_section->flags & SEC_ALLOC) == 0 @@ -1652,7 +1652,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, /* We've already informed in cris_elf_check_relocs that this is an error. */ - return FALSE; + return false; } /* Fall through. */ @@ -1675,7 +1675,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, symname[0] != '\0' ? symname : _("[whose name is lost]")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (!bfd_link_pic (info) @@ -1804,7 +1804,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, /* We've already informed in cris_elf_check_relocs that this is an error. */ - return FALSE; + return false; } /* Fall through. */ @@ -1827,7 +1827,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (int64_t) rel->r_addend, symname[0] != '\0' ? symname : _("[whose name is lost]")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (!bfd_link_pic (info) @@ -1941,7 +1941,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, /* We've already informed in cris_elf_check_relocs that this is an error. */ - return FALSE; + return false; } if (h != NULL @@ -1962,7 +1962,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, cris_elf_howto_table[r_type].name, symname); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* NULL if we had an error. */ @@ -1976,7 +1976,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, default: BFD_FAIL (); - return FALSE; + return false; } r = cris_final_link_relocate (howto, input_bfd, input_section, @@ -2027,7 +2027,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, symname, input_bfd, input_section, rel->r_offset, TRUE); + (info, symname, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -2053,13 +2053,13 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_cris_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -2083,7 +2083,7 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd, htab = elf_cris_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Adjust the various PLT entry offsets. */ if (bfd_get_mach (output_bfd) == bfd_mach_cris_v32) @@ -2108,7 +2108,7 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd, = elf_cris_hash_entry (h)->gotplt_offset; Elf_Internal_Rela rela; bfd_byte *loc; - bfd_boolean has_gotplt = gotplt_offset != 0; + bool has_gotplt = gotplt_offset != 0; /* Get the index in the .rela.plt relocations for the .got.plt entry that corresponds to this symbol. @@ -2303,14 +2303,14 @@ elf_cris_finish_dynamic_symbol (bfd *output_bfd, || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. Do *not* emit relocs here, as their offsets were changed, as part of -z combreloc handling, from those we computed. */ -static bfd_boolean +static bool elf_cris_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -2432,7 +2432,7 @@ elf_cris_finish_dynamic_sections (bfd *output_bfd, elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -2530,7 +2530,7 @@ cris_elf_plt_sym_val (bfd_vma i ATTRIBUTE_UNUSED, const asection *plt, or elf_cris_size_dynamic_sections if no dynamic sections will be created (we're only linking static objects). */ -static bfd_boolean +static bool elf_cris_adjust_gotplt_to_got (struct elf_cris_link_hash_entry *h, void * p) { struct bfd_link_info *info = (struct bfd_link_info *) p; @@ -2543,7 +2543,7 @@ elf_cris_adjust_gotplt_to_got (struct elf_cris_link_hash_entry *h, void * p) /* If nobody wanted a GOTPLT with this symbol, we're done. */ if (h->gotplt_refcount <= 0) - return TRUE; + return true; if (h->reg_got_refcount > 0) { @@ -2581,7 +2581,7 @@ elf_cris_adjust_gotplt_to_got (struct elf_cris_link_hash_entry *h, void * p) srelgot->size += sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Try to fold PLT entries with GOT entries. There are two cases when we @@ -2608,7 +2608,7 @@ elf_cris_adjust_gotplt_to_got (struct elf_cris_link_hash_entry *h, void * p) version scripts. The differing cases are handled by elf_cris_hide_symbol. */ -static bfd_boolean +static bool elf_cris_try_fold_plt_to_got (struct elf_cris_link_hash_entry *h, void * p) { struct bfd_link_info *info = (struct bfd_link_info *) p; @@ -2617,7 +2617,7 @@ elf_cris_try_fold_plt_to_got (struct elf_cris_link_hash_entry *h, void * p) other reference so there's nothing to do. Likewise if there are no PLT references; GOTPLT references included. */ if (h->root.got.refcount <= 0 || h->root.plt.refcount <= 0) - return TRUE; + return true; /* GOTPLT relocs are supposed to be included into the PLT refcount. */ BFD_ASSERT (h->gotplt_refcount <= h->root.plt.refcount); @@ -2627,13 +2627,13 @@ elf_cris_try_fold_plt_to_got (struct elf_cris_link_hash_entry *h, void * p) /* The only PLT references are GOTPLT references, and there are GOT references. Convert PLT to GOT references. */ if (! elf_cris_adjust_gotplt_to_got (h, info)) - return FALSE; + return false; /* Clear the PLT references, so no PLT will be created. */ h->root.plt.offset = (bfd_vma) -1; } - return TRUE; + return true; } /* Our own version of hide_symbol, so that we can adjust a GOTPLT reloc @@ -2643,7 +2643,7 @@ elf_cris_try_fold_plt_to_got (struct elf_cris_link_hash_entry *h, void * p) static void elf_cris_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h, - bfd_boolean force_local) + bool force_local) { elf_cris_adjust_gotplt_to_got ((struct elf_cris_link_hash_entry *) h, info); @@ -2656,7 +2656,7 @@ elf_cris_hide_symbol (struct bfd_link_info *info, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_cris_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2668,7 +2668,7 @@ elf_cris_adjust_dynamic_symbol (struct bfd_link_info *info, htab = elf_cris_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; @@ -2721,21 +2721,21 @@ elf_cris_adjust_dynamic_symbol (struct bfd_link_info *info, if (bfd_link_pic (info) && !elf_cris_try_fold_plt_to_got ((struct elf_cris_link_hash_entry*) h, info)) - return FALSE; + return false; /* GC or folding may have rendered this entry unused. */ if (h->plt.refcount <= 0) { h->needs_plt = 0; h->plt.offset = (bfd_vma) -1; - return TRUE; + return true; } /* Make sure this symbol is output as a dynamic symbol. */ if (h->dynindx == -1) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->root.splt; @@ -2782,7 +2782,7 @@ elf_cris_adjust_dynamic_symbol (struct bfd_link_info *info, /* Make room for this entry. */ s->size += plt_entry_size; - return TRUE; + return true; } /* No GOT reference for this symbol; prepare for an ordinary PLT. */ @@ -2807,7 +2807,7 @@ elf_cris_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (s != NULL); s->size += sizeof (Elf32_External_Rela); - return TRUE; + return true; } /* Reinitialize the plt offset now that it is not used as a reference @@ -2823,7 +2823,7 @@ elf_cris_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2834,12 +2834,12 @@ elf_cris_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -2943,7 +2943,7 @@ elf_cris_copy_indirect_symbol (struct bfd_link_info *info, /* Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool cris_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2961,11 +2961,11 @@ cris_elf_check_relocs (bfd *abfd, asection *sreloc; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = elf_cris_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -3051,7 +3051,7 @@ cris_elf_check_relocs (bfd *abfd, (_("%pB, section %pA: v10/v32 compatible object" " must not contain a PIC relocation"), abfd, sec); - return FALSE; + return false; } } @@ -3063,7 +3063,7 @@ cris_elf_check_relocs (bfd *abfd, can assume it's always present whenever there's a dynobj. It's ok to call this function more than once. */ if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; sgot = elf_hash_table (info)->sgot; srelgot = elf_hash_table (info)->srelgot; @@ -3080,7 +3080,7 @@ cris_elf_check_relocs (bfd *abfd, amt *= sizeof (bfd_signed_vma); local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, amt)); if (local_got_refcounts == NULL) - return FALSE; + return false; local_got_refcounts++; elf_local_got_refcounts (abfd) = local_got_refcounts; @@ -3186,7 +3186,7 @@ cris_elf_check_relocs (bfd *abfd, if (h->dynindx == -1) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } @@ -3367,10 +3367,10 @@ cris_elf_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } if (sec->flags & SEC_READONLY) @@ -3436,10 +3436,10 @@ cris_elf_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } sreloc->size += sizeof (Elf32_External_Rela); @@ -3464,7 +3464,7 @@ cris_elf_check_relocs (bfd *abfd, p = ((struct elf_cris_pcrel_relocs_copied *) bfd_alloc (dynobj, (bfd_size_type) sizeof *p)); if (p == NULL) - return FALSE; + return false; p->next = eh->pcrel_relocs_copied; eh->pcrel_relocs_copied = p; p->section = sec; @@ -3480,14 +3480,14 @@ cris_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_CRIS_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_CRIS_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_CRIS_16_TPREL: @@ -3498,27 +3498,27 @@ cris_elf_check_relocs (bfd *abfd, default: /* Other relocs do not appear here. */ bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_cris_link_hash_table * htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; htab = elf_cris_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; BFD_ASSERT (dynobj != NULL); @@ -3569,7 +3569,7 @@ elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -3605,7 +3605,7 @@ elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Remember whether there are any reloc sections other than .rela.plt. */ if (strcmp (name, ".rela.plt") != 0) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3645,7 +3645,7 @@ elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, this will make entries have the type R_CRIS_NONE. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -3660,7 +3660,7 @@ elf_cris_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, check_relocs routine, but we won't fill them in in the relocate_section routine. */ -static bfd_boolean +static bool elf_cris_discard_excess_dso_dynamics (struct elf_cris_link_hash_entry *h, void * inf) { @@ -3680,10 +3680,10 @@ elf_cris_discard_excess_dso_dynamics (struct elf_cris_link_hash_entry *h, = _bfd_elf_get_dynamic_reloc_section (elf_hash_table (info) ->dynobj, s->section, - /*rela?*/ TRUE); + /*rela?*/ true); sreloc->size -= s->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* If we have accounted for PC-relative relocs for read-only @@ -3709,14 +3709,14 @@ elf_cris_discard_excess_dso_dynamics (struct elf_cris_link_hash_entry *h, info->flags |= DF_TEXTREL; } - return TRUE; + return true; } /* This function is called via elf_cris_link_hash_traverse if we are *not* creating a shared object. We discard space for relocs for symbols put in the .got, but which we found we do not have to resolve at run-time. */ -static bfd_boolean +static bool elf_cris_discard_excess_program_dynamics (struct elf_cris_link_hash_entry *h, void * inf) { @@ -3764,17 +3764,17 @@ elf_cris_discard_excess_program_dynamics (struct elf_cris_link_hash_entry *h, } } - return TRUE; + return true; } /* Reject a file depending on presence and expectation of prefixed underscores on symbols. */ -static bfd_boolean +static bool cris_elf_object_p (bfd *abfd) { if (! cris_elf_set_mach_from_flags (abfd, elf_elfheader (abfd)->e_flags)) - return FALSE; + return false; if ((elf_elfheader (abfd)->e_flags & EF_CRIS_UNDERSCORE)) return (bfd_get_symbol_leading_char (abfd) == '_'); @@ -3785,7 +3785,7 @@ cris_elf_object_p (bfd *abfd) /* Mark presence or absence of leading underscore. Set machine type flags from mach type. */ -static bfd_boolean +static bool cris_elf_final_write_processing (bfd *abfd) { unsigned long e_flags = elf_elfheader (abfd)->e_flags; @@ -3819,7 +3819,7 @@ cris_elf_final_write_processing (bfd *abfd) /* Set the mach type from e_flags value. */ -static bfd_boolean +static bool cris_elf_set_mach_from_flags (bfd *abfd, unsigned long flags) { @@ -3842,15 +3842,15 @@ cris_elf_set_mach_from_flags (bfd *abfd, with this code; we'd have to require that all future handling would be optional. */ bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } - return TRUE; + return true; } /* Display the flags field. */ -static bfd_boolean +static bool cris_elf_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -3871,30 +3871,30 @@ cris_elf_print_private_bfd_data (bfd *abfd, void * ptr) fprintf (file, _(" [v32]")); fputc ('\n', file); - return TRUE; + return true; } /* Don't mix files with and without a leading underscore. */ -static bfd_boolean +static bool cris_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; int imach, omach; if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; imach = bfd_get_mach (ibfd); if (! elf_flags_init (obfd)) { /* This happens when ld starts out with a 'blank' output file. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; /* We ignore the linker-set mach, and instead set it according to the first input file. This would also happen if we could @@ -3904,7 +3904,7 @@ cris_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) the output type, which might be a sane thing to do for a v10+v32 compatibility object. */ if (! bfd_set_arch_mach (obfd, bfd_arch_cris, imach)) - return FALSE; + return false; } if (bfd_get_symbol_leading_char (ibfd) @@ -3916,7 +3916,7 @@ cris_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) : _("%pB: uses non-prefixed symbols, but writing file with _-prefixed symbols"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } omach = bfd_get_mach (obfd); @@ -3938,7 +3938,7 @@ cris_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) " with previous objects"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* We don't have to check the case where the input is compatible @@ -3946,24 +3946,24 @@ cris_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) to the other (compatible) mach. */ if (omach == bfd_mach_cris_v10_v32 && ! bfd_set_arch_mach (obfd, bfd_arch_cris, imach)) - return FALSE; + return false; } - return TRUE; + return true; } /* Do side-effects of e_flags copying to obfd. */ -static bfd_boolean +static bool cris_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; /* Call the base function. */ if (!_bfd_elf_copy_private_bfd_data (ibfd, obfd)) - return FALSE; + return false; /* Do what we really came here for. */ return bfd_set_arch_mach (obfd, bfd_arch_cris, bfd_get_mach (ibfd)); @@ -4119,7 +4119,7 @@ elf_cris_got_elt_size (bfd *abfd ATTRIBUTE_UNUSED, #define elf_backend_may_use_rela_p 1 #define elf_backend_rela_normal 1 -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf32-target.h" diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c index d201226fab..44c21df71b 100644 --- a/bfd/elf32-crx.c +++ b/bfd/elf32-crx.c @@ -28,9 +28,9 @@ static reloc_howto_type *elf_crx_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean elf_crx_info_to_howto +static bool elf_crx_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *); -static bfd_boolean elf32_crx_relax_delete_bytes +static bool elf32_crx_relax_delete_bytes (struct bfd_link_info *, bfd *, asection *, bfd_vma, int); static bfd_reloc_status_type crx_elf_final_link_relocate (reloc_howto_type *, bfd *, bfd *, asection *, @@ -39,11 +39,11 @@ static bfd_reloc_status_type crx_elf_final_link_relocate static int elf32_crx_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **); -static bfd_boolean elf32_crx_relax_section - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *); +static bool elf32_crx_relax_section + (bfd *, asection *, struct bfd_link_info *, bool *); static bfd_byte * elf32_crx_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **); + bfd_byte *, bool, asymbol **); /* crx_reloc_map array maps BFD relocation enum into a CRGAS relocation type. */ @@ -84,253 +84,253 @@ static reloc_howto_type crx_elf_howto_table[] = 0, /* rightshift */ 3, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REL4, /* type */ 1, /* rightshift */ 0, /* size */ 4, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xf, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REL8, /* type */ 1, /* rightshift */ 0, /* size */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REL8_CMP, /* type */ 1, /* rightshift */ 0, /* size */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL8_CMP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REL16, /* type */ 1, /* rightshift */ 1, /* size */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REL24, /* type */ 1, /* rightshift */ 2, /* size */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REL32, /* type */ 1, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REGREL12, /* type */ 0, /* rightshift */ 1, /* size */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REGREL22, /* type */ 0, /* rightshift */ 2, /* size */ 22, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL22", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REGREL28, /* type */ 0, /* rightshift */ 2, /* size */ 28, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL28", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_REGREL32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_ABS16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_ABS16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_ABS32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_ABS32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_NUM8, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_NUM16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_NUM32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_IMM16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_IMM16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_CRX_IMM32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_IMM32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit switch table entry. This is generated for an expression such as ``.byte L1 - L2''. The offset holds the difference @@ -339,15 +339,15 @@ static reloc_howto_type crx_elf_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit switch table entry. This is generated for an expression such as ``.word L1 - L2''. The offset holds the difference @@ -356,15 +356,15 @@ static reloc_howto_type crx_elf_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32 bit switch table entry. This is generated for an expression such as ``.long L1 - L2''. The offset holds the difference @@ -373,15 +373,15 @@ static reloc_howto_type crx_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE) /* pcrel_offset */ + true) /* pcrel_offset */ }; /* Retrieve a howto ptr using a BFD reloc_code. */ @@ -418,7 +418,7 @@ elf_crx_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Retrieve a howto ptr using an internal relocation entry. */ -static bfd_boolean +static bool elf_crx_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -429,10 +429,10 @@ elf_crx_info_to_howto (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &crx_elf_howto_table[r_type]; - return TRUE; + return true; } /* Perform a relocation as part of a final link. */ @@ -584,7 +584,7 @@ crx_elf_final_link_relocate (reloc_howto_type *howto, bfd *input_bfd, /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool elf32_crx_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd, asection *sec, bfd_vma addr, int count) { @@ -710,7 +710,7 @@ elf32_crx_relax_delete_bytes (struct bfd_link_info *link_info, bfd *abfd, sym_hash->root.u.def.value -= count; } - return TRUE; + return true; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -721,7 +721,7 @@ elf32_crx_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { Elf_Internal_Shdr *symtab_hdr; @@ -755,7 +755,7 @@ elf32_crx_get_relocated_section_contents (bfd *output_bfd, internal_relocs = (_bfd_elf_link_read_relocs (input_bfd, input_section, NULL, - (Elf_Internal_Rela *) NULL, FALSE)); + (Elf_Internal_Rela *) NULL, false)); if (internal_relocs == NULL) goto error_return; @@ -860,7 +860,7 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -906,7 +906,7 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -933,7 +933,7 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* This function handles relaxing for the CRX. @@ -947,9 +947,9 @@ elf32_crx_relocate_section (bfd *output_bfd, struct bfd_link_info *info, Symbol- and reloc-reading infrastructure copied from elf-m10200.c. */ -static bfd_boolean +static bool elf32_crx_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -958,7 +958,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, Elf_Internal_Sym *isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -967,7 +967,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -1110,7 +1110,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -1155,7 +1155,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -1207,7 +1207,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -1248,7 +1248,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } } @@ -1280,7 +1280,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -1290,7 +1290,7 @@ elf32_crx_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Definitions for setting CRX target vector. */ diff --git a/bfd/elf32-csky.c b/bfd/elf32-csky.c index 6233669541..1dee29a7b4 100644 --- a/bfd/elf32-csky.c +++ b/bfd/elf32-csky.c @@ -86,60 +86,60 @@ static reloc_howto_type csky_elf_howto_table[] = 0, /* rightshift */ 0, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 1. */ HOWTO (R_CKCORE_ADDR32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_ADDR32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 2: Only for csky v1. */ HOWTO (R_CKCORE_PCREL_IMM8BY4, /* type */ 2, /* rightshift */ 1, /* size */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_PCREL_IMM8BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 3: Only for csky v1. */ HOWTO (R_CKCORE_PCREL_IMM11BY2, /* type */ 1, /* rightshift */ 1, /* size */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_IMM11BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7ff, /* src_mask */ 0x7ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 4: DELETED. */ HOWTO (R_CKCORE_PCREL_IMM4BY2,0,0,0,0,0,0,0,"R_CKCORE_PCREL_IMM4BY2",0,0,0,0), @@ -149,75 +149,75 @@ static reloc_howto_type csky_elf_howto_table[] = 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 6: Only for csky v1. */ HOWTO (R_CKCORE_PCREL_JSR_IMM11BY2, /* type */ 1, /* rightshift */ 1, /* size */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_JSR_IMM11BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7ff, /* src_mask */ 0x7ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 7: GNU extension to record C++ vtable member usage. */ HOWTO (R_CKCORE_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_CKCORE_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8: GNU extension to record C++ vtable hierarchy. */ HOWTO (R_CKCORE_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 9. */ HOWTO (R_CKCORE_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_RELATIVE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 10: None. */ /* FIXME: It is a bug that copy relocations are not implemented. */ @@ -225,15 +225,15 @@ static reloc_howto_type csky_elf_howto_table[] = 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_COPY", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 11: None. */ HOWTO (R_CKCORE_GLOB_DAT,0,0,0,0,0,0,0,"R_CKCORE_GLOB_DAT",0,0,0,0), @@ -246,60 +246,60 @@ static reloc_howto_type csky_elf_howto_table[] = 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOTOFF", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffffl, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 14. */ HOWTO (R_CKCORE_GOTPC, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOTPC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 15. */ HOWTO (R_CKCORE_GOT32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOT32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16. */ HOWTO (R_CKCORE_PLT32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PLT32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 17: None. */ HOWTO (R_CKCORE_ADDRGOT,0,0,0,0,0,0,0,"R_CKCORE_ADDRGOT",0,0,0,0), @@ -312,255 +312,255 @@ static reloc_howto_type csky_elf_howto_table[] = 1, /* rightshift */ 2, /* size */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_IMM26BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 20: Only for csky v2. */ HOWTO (R_CKCORE_PCREL_IMM16BY2, /* type */ 1, /* rightshift */ 2, /* size */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_PCREL_IMM16BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 21: Only for csky v2. */ HOWTO (R_CKCORE_PCREL_IMM16BY4, /* type */ 2, /* rightshift */ 2, /* size */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_PCREL_IMM16BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff0000, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 22: Only for csky v2. */ HOWTO (R_CKCORE_PCREL_IMM10BY2, /* type */ 1, /* rightshift */ 1, /* size */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_IMM10BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 23: Only for csky v2. */ HOWTO (R_CKCORE_PCREL_IMM10BY4, /* type */ 2, /* rightshift */ 2, /* size */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_PCREL_IMM10BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 24: Only for csky v2. */ HOWTO (R_CKCORE_ADDR_HI16, /* type */ 16, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_ADDR_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 25. */ HOWTO (R_CKCORE_ADDR_LO16, /* type */ 0, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_ADDR_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 26. */ HOWTO (R_CKCORE_GOTPC_HI16, /* type */ 16, /* rightshift */ 2, /* size */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOTPC_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 27. */ HOWTO (R_CKCORE_GOTPC_LO16, /* type */ 0, /* rightshift */ 2, /* size */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOTPC_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 28. */ HOWTO (R_CKCORE_GOTOFF_HI16, /* type */ 16, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOTOFF_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 29. */ HOWTO (R_CKCORE_GOTOFF_LO16, /* type */ 0, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOTOFF_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 30. */ HOWTO (R_CKCORE_GOT12, /* type */ 2, /* rightshift */ 2, /* size */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOT12", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 31. */ HOWTO (R_CKCORE_GOT_HI16, /* type */ 16, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOT_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32. */ HOWTO (R_CKCORE_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOT_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 33. */ HOWTO (R_CKCORE_PLT12, /* type */ 2, /* rightshift */ 2, /* size */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PLT12", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 34. */ HOWTO (R_CKCORE_PLT_HI16, /* type */ 16, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PLT_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 35. */ HOWTO (R_CKCORE_PLT_LO16, /* type */ 0, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PLT_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 36: None. */ HOWTO (R_CKCORE_ADDRGOT_HI16,0,0,0,0,0,0,0,"R_CKCORE_",0,0,0,0), @@ -579,240 +579,240 @@ static reloc_howto_type csky_elf_howto_table[] = 1, /* rightshift */ 2, /* size */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_JSR_IMM26BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 41. */ HOWTO (R_CKCORE_TOFFSET_LO16, /* type */ 0, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_TOFFSET_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 42. */ HOWTO (R_CKCORE_DOFFSET_LO16, /* type */ 0, /* rightshift */ 2, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_DOFFSET_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 43. */ HOWTO (R_CKCORE_PCREL_IMM18BY2, /* type */ 1, /* rightshift */ 2, /* size */ 18, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_PCREL_IMM18BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 44. */ HOWTO (R_CKCORE_DOFFSET_IMM18, /* type */ 0, /* rightshift */ 2, /* size */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_DOFFSET_IMM18", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 45. */ HOWTO (R_CKCORE_DOFFSET_IMM18BY2, /* type */ 1, /* rightshift */ 2, /* size */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_DOFFSET_IMM18BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 46. */ HOWTO (R_CKCORE_DOFFSET_IMM18BY4, /* type */ 2, /* rightshift */ 2, /* size */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_DOFFSET_IMM18BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x3ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 47. */ HOWTO (R_CKCORE_GOTOFF_IMM18, /* type */ 0, /* rightshift */ 2, /* size */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOTOFF_IMM18", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfffc, /* src_mask */ 0x3ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 48. */ HOWTO (R_CKCORE_GOT_IMM18BY4, /* type */ 2, /* rightshift */ 2, /* size */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_GOT_IMM18BY4", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfffc, /* src_mask */ 0x3ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 49. */ HOWTO (R_CKCORE_PLT_IMM18BY4, /* type */ 2, /* rightshift */ 2, /* size */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PLT_IMM18BY4", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfffc, /* src_mask */ 0x3ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 50: for lrw16. */ HOWTO (R_CKCORE_PCREL_IMM7BY4, /* type */ 2, /* rightshift */ 1, /* size */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_IMM7BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xec1f, /* src_mask */ 0x31f, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 51: for static nptl. */ HOWTO (R_CKCORE_TLS_LE32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_TLS_LE32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 52: for static nptl. */ HOWTO (R_CKCORE_TLS_IE32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_TLS_IE32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 53: for pic nptl. */ HOWTO (R_CKCORE_TLS_GD32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_TLS_GD32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 54: for pic nptl. */ HOWTO (R_CKCORE_TLS_LDM32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_TLS_LDM32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 55: for pic nptl. */ HOWTO (R_CKCORE_TLS_LDO32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_TLS_LDO32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 56: for linker. */ HOWTO (R_CKCORE_TLS_DTPMOD32,0,0,0,0,0,0,0,"R_CKCORE_TLS_DTPMOD32",0,0,0,0), @@ -828,45 +828,45 @@ static reloc_howto_type csky_elf_howto_table[] = 2, /* rightshift */ 2, /* size */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_PCREL_FLRW_IMM8BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfe1fff0f, /* src_mask */ 0x1e000f0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 60: for 810 not to generate jsri. */ HOWTO (R_CKCORE_NOJSRI, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_NOJSRI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 61: for callgraph. */ HOWTO (R_CKCORE_CALLGRAPH, /* type */ 0, /* rightshift */ 0, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_CKCORE_CALLGRAPH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 62: IRELATIVE*/ HOWTO (R_CKCORE_IRELATIVE,0,0,0,0,0,0,0,"R_CKCORE_IRELATIVE",0,0,0,0), @@ -881,10 +881,10 @@ static reloc_howto_type csky_elf_howto_table[] = complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_BLOOP_IMM4BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xf, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 64: for bloop instruction */ HOWTO (R_CKCORE_PCREL_BLOOP_IMM12BY4, /* type */ 1, /* rightshift */ @@ -895,10 +895,10 @@ static reloc_howto_type csky_elf_howto_table[] = complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_CKCORE_PCREL_BLOOP_IMM12BY4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; @@ -976,7 +976,7 @@ elf32_csky_howto_from_type (unsigned int r_type) return NULL; } -static bfd_boolean +static bool csky_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -991,9 +991,9 @@ csky_elf_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* The Global Offset Table max size. */ @@ -1037,7 +1037,7 @@ enum stub_insn_type DATA_TYPE }; -bfd_boolean use_branch_stub = TRUE; +bool use_branch_stub = true; typedef struct { bfd_vma data; @@ -1178,10 +1178,10 @@ struct csky_elf_link_hash_entry }; /* Traverse an C-SKY ELF linker hash table. */ -#define csky_elf_link_hash_traverse(table, func, info) \ - (elf_link_hash_traverse \ - (&(table)->root, \ - (bfd_boolean (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \ +#define csky_elf_link_hash_traverse(table, func, info) \ + (elf_link_hash_traverse \ + (&(table)->root, \ + (bool (*) PARAMS ((struct elf_link_hash_entry *, PTR))) (func), \ (info))) /* Get the C-SKY ELF linker hash table from a link_info structure. */ @@ -1519,7 +1519,7 @@ csky_elf_link_hash_table_create (bfd *abfd) return &ret->elf.root; } -static bfd_boolean +static bool csky_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct csky_elf_obj_tdata), @@ -1532,7 +1532,7 @@ csky_elf_mkobject (bfd *abfd) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool csky_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1542,11 +1542,11 @@ csky_elf_adjust_dynamic_symbol (struct bfd_link_info *info, asection *s; eh = (struct csky_elf_link_hash_entry *)h; if (eh == NULL) - return FALSE; + return false; htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Clear jsri2bsr_refcount, if creating shared library files. */ if (bfd_link_pic (info) && eh->jsri2bsr_refcount > 0) @@ -1580,7 +1580,7 @@ csky_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->got.refcount -= eh->plt_refcount; eh->plt_refcount = 0; } - return TRUE; + return true; } else /* It's possible that we incorrectly decided a .plt reloc was @@ -1599,13 +1599,13 @@ csky_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* If there are no non-GOT references, we do not need a copy relocation. */ if (!h->non_got_ref) - return TRUE; + return true; /* This is a reference to a symbol defined by a dynamic object which is not a function. */ @@ -1615,7 +1615,7 @@ csky_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info) || htab->elf.is_relocatable_executable) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -1652,13 +1652,13 @@ csky_elf_adjust_dynamic_symbol (struct bfd_link_info *info, } h->non_got_ref = 0; - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) { struct bfd_link_info *info; @@ -1668,7 +1668,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) /* For indirect case, such as _ZdlPv to _ZdlPv@@GLIBCXX_3.4. */ if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -1677,7 +1677,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) info = (struct bfd_link_info *) inf; htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /*TODO: how to deal with weak symbol relocs. */ if ((htab->elf.dynamic_sections_created || h->type == STT_GNU_IFUNC) && h->plt.refcount > 0) @@ -1687,7 +1687,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (h->dynindx == -1 && !h->forced_local && h->root.type == bfd_link_hash_undefweak && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; if (bfd_link_pic (info) || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h)) { asection *splt = htab->elf.splt; @@ -1741,7 +1741,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (h->got.refcount > 0) { asection *sgot; - bfd_boolean dyn; + bool dyn; int indx; int tls_type = csky_elf_hash_entry (h)->tls_type; @@ -1750,7 +1750,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (h->dynindx == -1 && !h->forced_local && h->root.type == bfd_link_hash_undefweak && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; sgot = htab->elf.sgot; h->got.offset = sgot->size; @@ -1799,7 +1799,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) eh = (struct csky_elf_link_hash_entry *) h; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -1843,7 +1843,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) else if (h->dynindx == -1 && !h->forced_local && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } @@ -1866,7 +1866,7 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) && h->root.type == bfd_link_hash_undefweak) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -1887,27 +1887,27 @@ csky_allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) srelgot->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct csky_elf_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; if (dynobj == NULL) - return FALSE; + return false; if (htab->elf.dynamic_sections_created) { @@ -2017,15 +2017,15 @@ csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, && htab->elf.sgot->size + htab->elf.sgotplt->size > GOT_MAX_SIZE) { _bfd_error_handler (_("GOT table size out of range")); /* */ - return FALSE; + return false; } /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { - bfd_boolean strip_section = TRUE; + bool strip_section = true; if ((s->flags & SEC_LINKER_CREATED) == 0) continue; @@ -2043,12 +2043,12 @@ csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, It's too late to tell BFD to get rid of the symbols. */ if (htab->elf.hplt != NULL) - strip_section = FALSE; + strip_section = false; } else if (startswith (bfd_section_name (s), ".rel") ) { if (s->size != 0 ) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -2086,7 +2086,7 @@ csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } if (htab->elf.dynamic_sections_created) @@ -2097,7 +2097,7 @@ csky_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool csky_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -2107,7 +2107,7 @@ csky_elf_finish_dynamic_symbol (bfd *output_bfd, htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Sanity check to make sure no unexpected symbol reaches here. This matches the test in csky_elf_relocate_section handling @@ -2268,12 +2268,12 @@ csky_elf_finish_dynamic_symbol (bfd *output_bfd, || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool csky_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -2284,7 +2284,7 @@ csky_elf_finish_dynamic_sections (bfd *output_bfd, htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); @@ -2300,7 +2300,7 @@ csky_elf_finish_dynamic_sections (bfd *output_bfd, for (; dyncon < dynconend; dyncon++) { Elf_Internal_Dyn dyn; - bfd_boolean size = FALSE; + bool size = false; const char *name = NULL; bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); @@ -2310,15 +2310,15 @@ csky_elf_finish_dynamic_sections (bfd *output_bfd, continue; case DT_RELA: name = ".rela.dyn"; - size = FALSE; + size = false; break; case DT_RELASZ: name = ".rela.dyn"; - size = TRUE; + size = true; break; case DT_PLTRELSZ: name = ".rela.plt"; - size = TRUE; + size = true; break; case DT_PLTGOT: dyn.d_un.d_ptr = htab->elf.sgot->output_section->vma; @@ -2362,7 +2362,7 @@ csky_elf_finish_dynamic_sections (bfd *output_bfd, } elf_section_data (got_sec->output_section)->this_hdr.sh_entsize = 4; } - return TRUE; + return true; } /* Copy the extra info we tack onto an elf_link_hash_entry. */ @@ -2436,7 +2436,7 @@ csky_elf_gc_mark_hook (asection *sec, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool csky_elf_check_relocs (bfd * abfd, struct bfd_link_info * info, asection * sec, @@ -2451,11 +2451,11 @@ csky_elf_check_relocs (bfd * abfd, /* if output type is relocatable, return. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -2477,7 +2477,7 @@ csky_elf_check_relocs (bfd * abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; h = NULL; } else @@ -2546,10 +2546,10 @@ csky_elf_check_relocs (bfd * abfd, htab->elf.dynobj = abfd; sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->elf.dynobj, 2, abfd, TRUE); + (sec, htab->elf.dynobj, 2, abfd, true); if (sreloc == NULL) - return FALSE; + return false; } if (h == NULL && !use_branch_stub @@ -2584,7 +2584,7 @@ csky_elf_check_relocs (bfd * abfd, loc_isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (loc_isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, loc_isym->st_shndx); if (s == NULL) s = sec; @@ -2599,7 +2599,7 @@ csky_elf_check_relocs (bfd * abfd, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -2699,7 +2699,7 @@ csky_elf_check_relocs (bfd * abfd, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; csky_elf_local_got_tls_type (abfd) = (char *) (local_got_refcounts + symtab_hdr->sh_info); @@ -2743,7 +2743,7 @@ csky_elf_check_relocs (bfd * abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } break; @@ -2751,19 +2751,19 @@ csky_elf_check_relocs (bfd * abfd, Reconstruct it for later use during GC. */ case R_CKCORE_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_CKCORE_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } static const struct bfd_elf_special_section csky_elf_special_sections[]= @@ -2775,15 +2775,15 @@ static const struct bfd_elf_special_section csky_elf_special_sections[]= /* Function to keep CSKY specific flags in the ELF header. */ -static bfd_boolean +static bool csky_elf_set_private_flags (bfd * abfd, flagword flags) { BFD_ASSERT (! elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } static csky_arch_for_merge * @@ -2826,7 +2826,7 @@ csky_find_arch_with_name (const char *name) return csky_arch; } -static bfd_boolean +static bool elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -2836,7 +2836,7 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) csky_arch_for_merge *old_arch = NULL; csky_arch_for_merge *new_arch = NULL; int i; - bfd_boolean result = TRUE; + bool result = true; const char *msg = NULL; const char *sec_name = get_elf_backend_data (ibfd)->obj_attrs_section; @@ -2845,14 +2845,14 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) of accepting unknown attributes in the first input file - but is that a bug? */ if (ibfd->flags & BFD_LINKER_CREATED) - return TRUE; + return true; /* Skip any input that hasn't attribute section. This enables to link object files without attribute section with any others. */ if (bfd_get_section_by_name (ibfd, sec_name) == NULL) { - return TRUE; + return true; } if (!elf_known_obj_attributes_proc (obfd)[0].i) @@ -2896,7 +2896,7 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) msg = _("%pB: machine flag conflict with target"); (*_bfd_error_handler) (msg, ibfd); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } else if (new_arch->class_level != old_arch->class_level) { @@ -2936,7 +2936,7 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler (_("Error: %pB and %pB has different VDSP version"), ibfd, obfd); - result = FALSE; + result = false; } break; @@ -2953,7 +2953,7 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler (_("Error: %pB and %pB has different DSP version"), ibfd, obfd); - result = FALSE; + result = false; } break; @@ -2971,7 +2971,7 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler (_("Error: %pB and %pB has different FPU ABI"), ibfd, obfd); - result = FALSE; + result = false; } break; @@ -2988,7 +2988,7 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge Tag_compatibility attributes and any common GNU ones. */ if (!_bfd_elf_merge_object_attributes (ibfd, info)) - return FALSE; + return false; /* Check for any attributes not known on CSKY. */ result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd); @@ -2999,7 +2999,7 @@ elf32_csky_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool csky_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -3013,20 +3013,20 @@ csky_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Check if we have the same endianness. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; /* Merge ".csky.attribute" section. */ if (!elf32_csky_merge_attributes (ibfd, info)) - return FALSE; + return false; if (! elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; } /* Try to merge e_flag. */ @@ -3053,7 +3053,7 @@ csky_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB: machine flag conflict with target"), ibfd); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } else if (new_arch->class_level != old_arch->class_level) { @@ -3092,23 +3092,23 @@ csky_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) elf_elfheader (obfd)->e_flags = newest_flag; - return TRUE; + return true; } /* Ignore the discarded relocs in special sections in link time. */ -static bfd_boolean +static bool csky_elf_ignore_discarded_relocs (asection *sec) { if (strcmp (sec->name, ".csky_stack_size") == 0) - return TRUE; - return FALSE; + return true; + return false; } /* .csky_stack_size are not referenced directly. This pass marks all of them as required. */ -static bfd_boolean +static bool elf32_csky_gc_mark_extra_sections (struct bfd_link_info *info, elf_gc_mark_hook_fn gc_mark_hook ATTRIBUTE_UNUSED) { @@ -3125,7 +3125,7 @@ elf32_csky_gc_mark_extra_sections (struct bfd_link_info *info, o->gc_mark = 1; } - return TRUE; + return true; } /* The linker repeatedly calls this function for each input section, @@ -3166,7 +3166,7 @@ elf32_csky_next_input_section (struct bfd_link_info *info, static void group_sections (struct csky_elf_link_hash_table *htab, bfd_size_type stub_group_size, - bfd_boolean stubs_always_after_branch) + bool stubs_always_after_branch) { asection **list = htab->input_list; @@ -3260,16 +3260,16 @@ group_sections (struct csky_elf_link_hash_table *htab, or it is a weak symbol and we aim to create shared object file, we must create a stub for this bsr. */ -static bfd_boolean +static bool sym_must_create_stub (struct elf_link_hash_entry *h, struct bfd_link_info *info) { if (h != NULL && ((h->def_dynamic && !h->def_regular) || (bfd_link_pic (info) && h->root.type == bfd_link_hash_defweak))) - return TRUE; + return true; else - return FALSE; + return false; } /* Calculate the template, template size and instruction size for a stub. @@ -3304,7 +3304,7 @@ find_stub_size_and_template (enum elf32_csky_stub_type stub_type, default: BFD_FAIL (); - return FALSE; + return false; } } @@ -3319,7 +3319,7 @@ find_stub_size_and_template (enum elf32_csky_stub_type stub_type, /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool csky_size_one_stub (struct bfd_hash_entry *gen_entry, void * in_arg ATTRIBUTE_UNUSED) { @@ -3341,7 +3341,7 @@ csky_size_one_stub (struct bfd_hash_entry *gen_entry, size = (size + 7) & ~7; stub_entry->stub_sec->size += size; - return TRUE; + return true; } /* Add a new stub entry to the stub hash. Not all fields of the new @@ -3362,7 +3362,7 @@ elf32_csky_add_stub (const char *stub_name, /* Enter this entry into the linker stub hash table. */ stub_entry = csky_stub_hash_lookup (&htab->stub_hash_table, stub_name, - TRUE, FALSE); + true, false); if (stub_entry == NULL) { _bfd_error_handler (_("%pB: cannot create stub entry %s"), @@ -3382,7 +3382,7 @@ elf32_csky_add_stub (const char *stub_name, PC-relative calls to a target that is unreachable with a "bsr" instruction. */ -bfd_boolean +bool elf32_csky_size_stubs (bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info, @@ -3391,11 +3391,11 @@ elf32_csky_size_stubs (bfd *output_bfd, void (*layout_sections_again) (void)) { bfd_size_type stub_group_size; - bfd_boolean stubs_always_after_branch; + bool stubs_always_after_branch; struct csky_elf_link_hash_table *htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Propagate mach to stub bfd, because it may not have been finalized when we created stub_bfd. */ @@ -3429,7 +3429,7 @@ elf32_csky_size_stubs (bfd *output_bfd, bfd *input_bfd; unsigned int bfd_indx; asection *stub_sec; - bfd_boolean stub_changed = FALSE; + bool stub_changed = false; for (input_bfd = info->input_bfds, bfd_indx = 0; input_bfd != NULL; @@ -3612,7 +3612,7 @@ elf32_csky_size_stubs (bfd *output_bfd, stub_entry = csky_stub_hash_lookup (&htab->stub_hash_table, stub_name, - FALSE, FALSE); + false, false); if (stub_entry != NULL) { /* The proper stub has already been created. */ @@ -3646,7 +3646,7 @@ elf32_csky_size_stubs (bfd *output_bfd, } sprintf (stub_entry->output_name, STUB_ENTRY_NAME, sym_name); - stub_changed = TRUE; + stub_changed = true; } while (0); } @@ -3673,12 +3673,12 @@ elf32_csky_size_stubs (bfd *output_bfd, (*htab->layout_sections_again) (); } - return TRUE; + return true; error_ret_free_local: - return FALSE; + return false; } -static bfd_boolean +static bool csky_build_one_stub (struct bfd_hash_entry *gen_entry, void * in_arg) { @@ -3713,7 +3713,7 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry, globals = csky_elf_hash_table (info); if (globals == NULL) - return FALSE; + return false; stub_sec = stub_entry->stub_sec; /* Make a note of the offset within the stubs for this entry. */ @@ -3761,7 +3761,7 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry, break; default: BFD_FAIL (); - return FALSE; + return false; } stub_sec->size += size; @@ -3800,7 +3800,7 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry, template_sequence[stub_reloc_idx[i]].reloc_addend); } - return TRUE; + return true; #undef MAXRELOCS } @@ -3810,7 +3810,7 @@ csky_build_one_stub (struct bfd_hash_entry *gen_entry, functions here. This function is called via arm_elf_finish in the linker. */ -bfd_boolean +bool elf32_csky_build_stubs (struct bfd_link_info *info) { asection *stub_sec; @@ -3820,7 +3820,7 @@ elf32_csky_build_stubs (struct bfd_link_info *info) htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; for (stub_sec = htab->stub_bfd->sections; stub_sec != NULL; @@ -3836,7 +3836,7 @@ elf32_csky_build_stubs (struct bfd_link_info *info) size = stub_sec->size; stub_sec->contents = bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) - return FALSE; + return false; stub_sec->size = 0; } @@ -3844,7 +3844,7 @@ elf32_csky_build_stubs (struct bfd_link_info *info) table = &htab->stub_hash_table; bfd_hash_traverse (table, csky_build_one_stub, info); - return TRUE; + return true; } /* Set up various things so that we can make a list of input sections @@ -4170,7 +4170,7 @@ elf32_csky_get_stub_entry (const asection *input_section, if (stub_name == NULL) return NULL; stub_entry = csky_stub_hash_lookup (&htab->stub_hash_table, - stub_name, FALSE, FALSE); + stub_name, false, false); if (h != NULL) h->stub_cache = stub_entry; free (stub_name); @@ -4269,13 +4269,13 @@ csky_elf_relocate_section (bfd * output_bfd, Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; const char *name; - bfd_boolean ret = TRUE; + bool ret = true; struct csky_elf_link_hash_table * htab; bfd_vma *local_got_offsets = elf_local_got_offsets (input_bfd); htab = csky_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = & elf_symtab_hdr (input_bfd); sym_hashes = elf_sym_hashes (input_bfd); @@ -4284,20 +4284,20 @@ csky_elf_relocate_section (bfd * output_bfd, relend = relocs + input_section->reloc_count; for (; rel < relend; rel++) { - enum elf_csky_reloc_type r_type + enum elf_csky_reloc_type r_type = (enum elf_csky_reloc_type) ELF32_R_TYPE (rel->r_info); - unsigned long r_symndx; - reloc_howto_type * howto; - Elf_Internal_Sym * sym; - asection * sec; - bfd_vma relocation; - bfd_vma off; + unsigned long r_symndx; + reloc_howto_type *howto; + Elf_Internal_Sym *sym; + asection *sec; + bfd_vma relocation; + bfd_vma off; struct elf_link_hash_entry * h; - bfd_vma addend = (bfd_vma)rel->r_addend; - bfd_reloc_status_type r = bfd_reloc_ok; - bfd_boolean unresolved_reloc = FALSE; - int do_final_relocate = TRUE; - bfd_boolean relative_reloc = FALSE; + bfd_vma addend = (bfd_vma)rel->r_addend; + bfd_reloc_status_type r = bfd_reloc_ok; + bool unresolved_reloc = false; + int do_final_relocate = true; + bool relative_reloc = false; bfd_signed_vma disp; /* Ignore these relocation types: @@ -4312,7 +4312,7 @@ csky_elf_relocate_section (bfd * output_bfd, _bfd_error_handler (_("%pB: unsupported relocation type: %#x"), input_bfd, r_type); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; continue; } @@ -4322,7 +4322,7 @@ csky_elf_relocate_section (bfd * output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { @@ -4334,7 +4334,7 @@ csky_elf_relocate_section (bfd * output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -4412,7 +4412,7 @@ csky_elf_relocate_section (bfd * output_bfd, if (h != NULL) { /* Global symbol is defined by other modules. */ - bfd_boolean dyn; + bool dyn; off = h->got.offset; dyn = htab->elf.dynamic_sections_created; if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, @@ -4455,11 +4455,11 @@ csky_elf_relocate_section (bfd * output_bfd, if (GENERATE_RELATIVE_RELOC_P (info, h)) /* If this symbol isn't dynamic in PIC, generate R_CKCORE_RELATIVE here. */ - relative_reloc = TRUE; + relative_reloc = true; } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } /* End if h != NULL. */ else { @@ -4477,7 +4477,7 @@ csky_elf_relocate_section (bfd * output_bfd, htab->elf.sgot->contents + off); local_got_offsets[r_symndx] |= 1; if (bfd_link_pic (info)) - relative_reloc = TRUE; + relative_reloc = true; } } if (relative_reloc) @@ -4522,7 +4522,7 @@ csky_elf_relocate_section (bfd * output_bfd, /* Use global offset table as symbol value. */ relocation = htab->elf.sgot->output_section->vma; addend = -addend; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_CKCORE_DOFFSET_IMM18: @@ -4566,7 +4566,7 @@ csky_elf_relocate_section (bfd * output_bfd, using -Bsymbolic. */ if (h->got.offset != (bfd_vma) -1) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; dyn = htab->elf.dynamic_sections_created; @@ -4596,7 +4596,7 @@ csky_elf_relocate_section (bfd * output_bfd, { h->got.offset |= 1; if (GENERATE_RELATIVE_RELOC_P (info, h)) - relative_reloc = TRUE; + relative_reloc = true; } } bfd_put_32 (output_bfd, relocation, @@ -4631,7 +4631,7 @@ csky_elf_relocate_section (bfd * output_bfd, relocation = (h->plt.offset / PLT_ENTRY_SIZE + 2) * 4; else relocation = (h->plt.offset / PLT_ENTRY_SIZE_P + 2) * 4; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_CKCORE_PCREL_IMM26BY2: @@ -4651,19 +4651,19 @@ csky_elf_relocate_section (bfd * output_bfd, /* TODO: deal with callgraph. */ if (h == NULL && r_symndx == 0) { - do_final_relocate = FALSE; + do_final_relocate = false; break; } /* Ignore weak references to undefined symbols. */ if (h != NULL && h->root.type == bfd_link_hash_undefweak) { - do_final_relocate = FALSE; + do_final_relocate = false; break; } /* Using branch stub. */ - if (use_branch_stub == TRUE + if (use_branch_stub == true && ELF32_R_TYPE (rel->r_info) == R_CKCORE_PCREL_IMM26BY2) { struct elf32_csky_stub_hash_entry *stub_entry = NULL; @@ -4743,24 +4743,24 @@ csky_elf_relocate_section (bfd * output_bfd, || h->root.type == bfd_link_hash_indirect))))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; bfd_byte *loc; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) { - skip = TRUE; - relocate = TRUE; + skip = true; + relocate = true; } outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -4779,7 +4779,7 @@ csky_elf_relocate_section (bfd * output_bfd, else { /* This symbol is local, or marked to become local. */ - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, r_type); outrel.r_addend = relocation + rel->r_addend; } @@ -4808,7 +4808,7 @@ csky_elf_relocate_section (bfd * output_bfd, if (r_symndx == 0 && strcmp (sec->name, ".csky_stack_size") == 0) { - do_final_relocate = FALSE; + do_final_relocate = false; break; } if (r_symndx >= symtab_hdr->sh_info @@ -4829,25 +4829,25 @@ csky_elf_relocate_section (bfd * output_bfd, || h->root.type == bfd_link_hash_indirect))))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; bfd_byte *loc; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) { - skip = TRUE; - relocate = TRUE; + skip = true; + relocate = true; } outrel.r_offset += (input_section->output_section->vma @@ -4941,7 +4941,7 @@ csky_elf_relocate_section (bfd * output_bfd, "in shared object"), input_bfd, input_section, (uint64_t)rel->r_offset, howto->name); - return FALSE; + return false; } else relocation = tpoff (info, relocation); @@ -4957,14 +4957,14 @@ csky_elf_relocate_section (bfd * output_bfd, indx = 0; if (h != NULL) { - bfd_boolean dyn; + bool dyn; dyn = htab->elf.dynamic_sections_created; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), h) && (!bfd_link_pic (info) || !SYMBOL_REFERENCES_LOCAL (info, h))) { - unresolved_reloc = FALSE; + unresolved_reloc = false; indx = h->dynindx; } off = h->got.offset; @@ -4983,7 +4983,7 @@ csky_elf_relocate_section (bfd * output_bfd, off &= ~1; else { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; Elf_Internal_Rela outrel; bfd_byte *loc = NULL; int cur_off = off; @@ -4996,7 +4996,7 @@ csky_elf_relocate_section (bfd * output_bfd, && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)) || h->root.type != bfd_link_hash_undefined)) { - need_relocs = TRUE; + need_relocs = true; BFD_ASSERT (htab->elf.srelgot != NULL); loc = htab->elf.srelgot->contents; @@ -5143,7 +5143,7 @@ csky_elf_relocate_section (bfd * output_bfd, if (r != bfd_reloc_ok) { - ret = FALSE; + ret = false; switch (r) { default: @@ -5173,7 +5173,7 @@ csky_elf_relocate_section (bfd * output_bfd, return ret; } -static bfd_boolean +static bool csky_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -5182,7 +5182,7 @@ csky_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; /* Sizeof (struct elf_prstatus) on C-SKY V1 arch. */ case 148: elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12); @@ -5203,13 +5203,13 @@ csky_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool csky_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; /* Sizeof (struct elf_prpsinfo) on linux csky. */ case 124: @@ -5230,7 +5230,7 @@ csky_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Determine whether an object attribute tag takes an integer, a @@ -5267,11 +5267,11 @@ elf32_csky_obj_attrs_arg_type (int tag) /* Attribute numbers >=64 (mod 128) can be safely ignored. */ -static bfd_boolean +static bool elf32_csky_obj_attrs_handle_unknown (bfd *abfd ATTRIBUTE_UNUSED, int tag ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* End of external entry points for sizing and building linker stubs. */ diff --git a/bfd/elf32-csky.h b/bfd/elf32-csky.h index c608e8cd55..7f7e2c8384 100644 --- a/bfd/elf32-csky.h +++ b/bfd/elf32-csky.h @@ -18,9 +18,9 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -extern bfd_boolean elf32_csky_build_stubs +extern bool elf32_csky_build_stubs (struct bfd_link_info *); -extern bfd_boolean elf32_csky_size_stubs +extern bool elf32_csky_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, struct bfd_section *(*) (const char*, struct bfd_section*), void (*) (void)); diff --git a/bfd/elf32-d10v.c b/bfd/elf32-d10v.c index d8cdfa1d51..50fdeeb229 100644 --- a/bfd/elf32-d10v.c +++ b/bfd/elf32-d10v.c @@ -35,135 +35,135 @@ static reloc_howto_type elf_d10v_howto_table[] = 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_NONE", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* An PC Relative 10-bit relocation, shifted by 2, right container. */ HOWTO (R_D10V_10_PCREL_R, /* Type. */ 2, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_10_PCREL_R", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xff, /* Src_mask. */ 0xff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* An PC Relative 10-bit relocation, shifted by 2, left container. */ HOWTO (R_D10V_10_PCREL_L, /* Type. */ 2, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 15, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_10_PCREL_L", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x07f8000, /* Src_mask. */ 0x07f8000, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A 16 bit absolute relocation. */ HOWTO (R_D10V_16, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_16", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* An 18 bit absolute relocation, right shifted 2. */ HOWTO (R_D10V_18, /* Type. */ 2, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_18", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A relative 18 bit relocation, right shifted by 2. */ HOWTO (R_D10V_18_PCREL, /* Type. */ 2, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_18_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A 32 bit absolute relocation. */ HOWTO (R_D10V_32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D10V_32", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Src_mask. */ 0xffffffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_D10V_GNU_VTINHERIT, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ NULL, /* Special_function. */ "R_D10V_GNU_VTINHERIT",/* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_D10V_GNU_VTENTRY, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ _bfd_elf_rel_vtable_reloc_fn, /* Special_function. */ "R_D10V_GNU_VTENTRY", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ }; /* Map BFD reloc types to D10V ELF reloc types. */ @@ -220,7 +220,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an D10V ELF reloc. */ -static bfd_boolean +static bool d10v_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -234,10 +234,10 @@ d10v_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_d10v_howto_table[r_type]; - return TRUE; + return true; } static asection * @@ -262,7 +262,7 @@ elf32_d10v_gc_mark_hook (asection *sec, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool elf32_d10v_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -274,7 +274,7 @@ elf32_d10v_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -302,19 +302,19 @@ elf32_d10v_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_D10V_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_D10V_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; } } - return TRUE; + return true; } static bfd_vma @@ -460,7 +460,7 @@ elf32_d10v_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -503,7 +503,7 @@ elf32_d10v_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -530,7 +530,7 @@ elf32_d10v_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } #define ELF_ARCH bfd_arch_d10v #define ELF_MACHINE_CODE EM_D10V diff --git a/bfd/elf32-d30v.c b/bfd/elf32-d30v.c index 5836d8124c..ede07b9ce5 100644 --- a/bfd/elf32-d30v.c +++ b/bfd/elf32-d30v.c @@ -256,195 +256,195 @@ static reloc_howto_type elf_d30v_howto_table[] = 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D30V_NONE", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A 6 bit absolute relocation. */ HOWTO (R_D30V_6, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 6, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D30V_6", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x3f, /* Src_mask. */ 0x3f, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A relative 9 bit relocation, right shifted by 3. */ HOWTO (R_D30V_9_PCREL, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 6, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_d30v_reloc_21, /* Special_function. */ "R_D30V_9_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x3f, /* Src_mask. */ 0x3f, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A relative 9 bit relocation, right shifted by 3. */ HOWTO (R_D30V_9_PCREL_R, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 6, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_d30v_reloc_21, /* Special_function. */ "R_D30V_9_PCREL_R", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x3f, /* Src_mask. */ 0x3f, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* An absolute 15 bit relocation, right shifted by 3. */ HOWTO (R_D30V_15, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 12, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D30V_15", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfff, /* Src_mask. */ 0xfff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A relative 15 bit relocation, right shifted by 3. */ HOWTO (R_D30V_15_PCREL, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 12, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_d30v_reloc_21, /* Special_function. */ "R_D30V_15_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfff, /* Src_mask. */ 0xfff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A relative 15 bit relocation, right shifted by 3. */ HOWTO (R_D30V_15_PCREL_R, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 12, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_d30v_reloc_21, /* Special_function. */ "R_D30V_15_PCREL_R", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfff, /* Src_mask. */ 0xfff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* An absolute 21 bit relocation, right shifted by 3. */ HOWTO (R_D30V_21, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 18, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D30V_21", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x3ffff, /* Src_mask. */ 0x3ffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A relative 21 bit relocation, right shifted by 3. */ HOWTO (R_D30V_21_PCREL, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 18, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_d30v_reloc_21, /* Special_function. */ "R_D30V_21_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x3ffff, /* Src_mask. */ 0x3ffff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A relative 21 bit relocation, right shifted by 3, in the Right container. */ HOWTO (R_D30V_21_PCREL_R, /* Type. */ 3, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 18, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_d30v_reloc_21, /* Special_function. */ "R_D30V_21_PCREL_R", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x3ffff, /* Src_mask. */ 0x3ffff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A D30V 32 bit absolute relocation. */ HOWTO (R_D30V_32, /* Type. */ 0, /* Rightshift. */ 4, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ bfd_elf_d30v_reloc, /* Special_function. */ "R_D30V_32", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Src_mask. */ 0xffffffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A relative 32 bit relocation. */ HOWTO (R_D30V_32_PCREL, /* Type. */ 0, /* Rightshift. */ 4, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ bfd_elf_d30v_reloc, /* Special_function. */ "R_D30V_32_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Src_mask. */ 0xffffffff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A regular 32 bit absolute relocation. */ HOWTO (R_D30V_32_NORMAL, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_D30V_32_NORMAL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Src_mask. */ 0xffffffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ }; @@ -508,7 +508,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an D30V ELF reloc (type REL). */ -static bfd_boolean +static bool d30v_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -522,15 +522,15 @@ d30v_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_d30v_howto_table[r_type]; - return TRUE; + return true; } /* Set the howto pointer for an D30V ELF reloc (type RELA). */ -static bfd_boolean +static bool d30v_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -544,10 +544,10 @@ d30v_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_d30v_howto_table[r_type]; - return TRUE; + return true; } #define ELF_ARCH bfd_arch_d30v diff --git a/bfd/elf32-dlx.c b/bfd/elf32-dlx.c index 4c3f5ac20e..2d7114b748 100644 --- a/bfd/elf32-dlx.c +++ b/bfd/elf32-dlx.c @@ -240,90 +240,90 @@ static reloc_howto_type dlx_elf_howto_table[]= 0, /* Rightshift. */ 3, /* size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_DLX_NONE", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 8 bit relocation. */ HOWTO (R_DLX_RELOC_8, /* Type. */ 0, /* Rightshift. */ 0, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_DLX_RELOC_8", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xff, /* Src_mask. */ 0xff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 16 bit relocation. */ HOWTO (R_DLX_RELOC_16, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_DLX_RELOC_16", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 32 bit relocation. */ HOWTO (R_DLX_RELOC_32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_DLX_RELOC_32", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffffffff, /* Src_mask. */ 0xffffffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_DLX_GNU_VTINHERIT, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ NULL, /* Special_function. */ "R_DLX_GNU_VTINHERIT", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_DLX_GNU_VTENTRY, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ _bfd_elf_rel_vtable_reloc_fn,/* Special_function. */ "R_DLX_GNU_VTENTRY", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE) /* PCrel_offset. */ + false) /* PCrel_offset. */ }; /* 16 bit offset for pc-relative branches. */ @@ -332,15 +332,15 @@ static reloc_howto_type elf_dlx_gnu_rel16_s2 = 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ elf32_dlx_relocate16, /* Special_function. */ "R_DLX_RELOC_16_PCREL",/* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - TRUE); /* PCrel_offset. */ + true); /* PCrel_offset. */ /* 26 bit offset for pc-relative branches. */ static reloc_howto_type elf_dlx_gnu_rel26_s2 = @@ -348,15 +348,15 @@ static reloc_howto_type elf_dlx_gnu_rel26_s2 = 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 26, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ elf32_dlx_relocate26, /* Special_function. */ "R_DLX_RELOC_26_PCREL",/* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - TRUE); /* PCrel_offset. */ + true); /* PCrel_offset. */ /* High 16 bits of symbol value. */ static reloc_howto_type elf_dlx_reloc_16_hi = @@ -364,15 +364,15 @@ static reloc_howto_type elf_dlx_reloc_16_hi = 16, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ _bfd_dlx_elf_hi16_reloc,/* Special_function. */ "R_DLX_RELOC_16_HI", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xFFFF, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE); /* PCrel_offset. */ + false); /* PCrel_offset. */ /* Low 16 bits of symbol value. */ static reloc_howto_type elf_dlx_reloc_16_lo = @@ -380,15 +380,15 @@ static reloc_howto_type elf_dlx_reloc_16_lo = 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_DLX_RELOC_16_LO", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE); /* PCrel_offset. */ + false); /* PCrel_offset. */ /* A mapping from BFD reloc types to DLX ELF reloc types. Stolen from elf32-mips.c. @@ -419,7 +419,7 @@ static const struct elf_reloc_map dlx_reloc_map[] = Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool elf32_dlx_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -431,7 +431,7 @@ elf32_dlx_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -459,19 +459,19 @@ elf32_dlx_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_DLX_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_DLX_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } /* Given a BFD reloc type, return a howto structure. */ @@ -552,15 +552,15 @@ dlx_rtype_to_howto (bfd *abfd, unsigned int r_type) } } -static bfd_boolean +static bool elf32_dlx_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, arelent * cache_ptr ATTRIBUTE_UNUSED, Elf_Internal_Rela * dst ATTRIBUTE_UNUSED) { - return FALSE; + return false; } -static bfd_boolean +static bool elf32_dlx_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) diff --git a/bfd/elf32-epiphany.c b/bfd/elf32-epiphany.c index c6a884901d..6de4211546 100644 --- a/bfd/elf32-epiphany.c +++ b/bfd/elf32-epiphany.c @@ -42,7 +42,7 @@ struct epiphany_opcode unsigned short mask; }; -static bfd_boolean epiphany_relaxed = FALSE; +static bool epiphany_relaxed = false; /* Relocation tables. */ static reloc_howto_type epiphany_elf_howto_table [] = @@ -57,45 +57,45 @@ static reloc_howto_type epiphany_elf_howto_table [] = co, /* complain_on_overflow */ \ bfd_elf_generic_reloc,/* special_function */ \ name, /* name */ \ - FALSE, /* partial_inplace */ \ + false, /* partial_inplace */ \ sm, /* src_mask */ \ dm, /* dst_mask */ \ pr) /* pcrel_offset */ /* This reloc does nothing. */ - AHOW (R_EPIPHANY_NONE, 0, 3,0, FALSE, 0, complain_overflow_dont, "R_EPIPHANY_NONE", 0, 0), + AHOW (R_EPIPHANY_NONE, 0, 3,0, false, 0, complain_overflow_dont, "R_EPIPHANY_NONE", 0, 0), /* 8 bit absolute (not likely) */ - AHOW (R_EPIPHANY_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, "R_EPIPHANY_8", 0x000000ff, 0x000000ff), + AHOW (R_EPIPHANY_8, 0, 0, 8, false, 0, complain_overflow_bitfield, "R_EPIPHANY_8", 0x000000ff, 0x000000ff), /* 16 bit absolute */ - AHOW (R_EPIPHANY_16, 0, 1,16, FALSE, 0, complain_overflow_bitfield, "R_EPIPHANY_16", 0x0000ffff, 0x00ff1fe0), + AHOW (R_EPIPHANY_16, 0, 1,16, false, 0, complain_overflow_bitfield, "R_EPIPHANY_16", 0x0000ffff, 0x00ff1fe0), /* A 32 bit absolute relocation. */ - AHOW (R_EPIPHANY_32, 0, 2,32, FALSE, 0, complain_overflow_dont, "R_EPIPHANY_32", 0xffffffff, 0xffffffff), + AHOW (R_EPIPHANY_32, 0, 2,32, false, 0, complain_overflow_dont, "R_EPIPHANY_32", 0xffffffff, 0xffffffff), /* 8 bit relative relocation */ - HOWTO ( R_EPIPHANY_8_PCREL, 0, 0, 8, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_EPIPHANY_8_PCREL", FALSE, 0x000000ff, 0x000000ff, FALSE), + HOWTO ( R_EPIPHANY_8_PCREL, 0, 0, 8, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_EPIPHANY_8_PCREL", false, 0x000000ff, 0x000000ff, false), /* 16 bit relative relocation */ - HOWTO ( R_EPIPHANY_16_PCREL, 0, 1, 16, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_EPIPHANY_8_PCREL", FALSE, 0x000000ff, 0x000000ff, FALSE), + HOWTO ( R_EPIPHANY_16_PCREL, 0, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_EPIPHANY_8_PCREL", false, 0x000000ff, 0x000000ff, false), /* 32 bit relative relocation */ - HOWTO ( R_EPIPHANY_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_EPIPHANY_8_PCREL", FALSE, 0x000000ff, 0x000000ff, FALSE), + HOWTO ( R_EPIPHANY_32_PCREL, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_EPIPHANY_8_PCREL", false, 0x000000ff, 0x000000ff, false), /* 8 bit pc-relative relocation */ - AHOW (R_EPIPHANY_SIMM8, 1, 0, 8, TRUE, 8, complain_overflow_signed, "R_EPIPHANY_SIMM8", 0x000000ff, 0x0000ff00), + AHOW (R_EPIPHANY_SIMM8, 1, 0, 8, true, 8, complain_overflow_signed, "R_EPIPHANY_SIMM8", 0x000000ff, 0x0000ff00), /* 24 bit pc-relative relocation */ - AHOW (R_EPIPHANY_SIMM24, 1, 2,24, TRUE, 8, complain_overflow_signed, "R_EPIPHANY_SIMM24", 0x00ffffff, 0xffffff00), + AHOW (R_EPIPHANY_SIMM24, 1, 2,24, true, 8, complain_overflow_signed, "R_EPIPHANY_SIMM24", 0x00ffffff, 0xffffff00), /* %HIGH(EA) */ - AHOW (R_EPIPHANY_HIGH, 0, 2,16, FALSE, 0, complain_overflow_dont, "R_EPIPHANY_HIGH", 0x0ff01fe0, 0x0ff01fe0), + AHOW (R_EPIPHANY_HIGH, 0, 2,16, false, 0, complain_overflow_dont, "R_EPIPHANY_HIGH", 0x0ff01fe0, 0x0ff01fe0), /* %LOW(EA) */ - AHOW (R_EPIPHANY_LOW, 0, 2,16, FALSE, 0, complain_overflow_dont, "R_EPIPHANY_LOW", 0x0ff01fe0, 0x0ff01fe0), + AHOW (R_EPIPHANY_LOW, 0, 2,16, false, 0, complain_overflow_dont, "R_EPIPHANY_LOW", 0x0ff01fe0, 0x0ff01fe0), /* simm11 */ - AHOW (R_EPIPHANY_SIMM11, 0, 2,11, FALSE, 0, complain_overflow_bitfield, "R_EPIPHANY_SIMM11", 0x00ff0380, 0x00ff0380), + AHOW (R_EPIPHANY_SIMM11, 0, 2,11, false, 0, complain_overflow_bitfield, "R_EPIPHANY_SIMM11", 0x00ff0380, 0x00ff0380), /* imm12 - sign-magnitude */ - AHOW (R_EPIPHANY_IMM11, 0, 2,11, FALSE, 0, complain_overflow_bitfield, "R_EPIPHANY_IMM12", 0x00ff0380, 0x00ff0380), + AHOW (R_EPIPHANY_IMM11, 0, 2,11, false, 0, complain_overflow_bitfield, "R_EPIPHANY_IMM12", 0x00ff0380, 0x00ff0380), /* imm8 */ - AHOW (R_EPIPHANY_IMM8, 0, 1, 8, FALSE, 8, complain_overflow_signed, "R_EPIPHANY_IMM8", 0x0000ff00, 0x0000ff00) + AHOW (R_EPIPHANY_IMM8, 0, 1, 8, false, 8, complain_overflow_signed, "R_EPIPHANY_IMM8", 0x0000ff00, 0x0000ff00) }; @@ -175,10 +175,10 @@ epiphany_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* This function handles relaxing for the epiphany. Dummy placeholder for future optimizations. */ -static bfd_boolean +static bool epiphany_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -189,24 +189,24 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, static unsigned long page_start = 0; static unsigned long page_end = 0; static unsigned int pass = 0; - static bfd_boolean new_pass = FALSE; - static bfd_boolean changed = FALSE; + static bool new_pass = false; + static bool changed = false; struct misc misc ATTRIBUTE_UNUSED; asection *stab; /* Assume nothing changes. */ - *again = FALSE; + *again = false; if (first_section == NULL) { - epiphany_relaxed = TRUE; + epiphany_relaxed = true; first_section = sec; } if (first_section == sec) { pass++; - new_pass = TRUE; + new_pass = true; } /* We don't have to do anything for a relocatable link, @@ -216,7 +216,7 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -278,8 +278,8 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, if (new_pass) { pass = 1; - new_pass = FALSE; - changed = TRUE; /* Pre-initialize to break out of pass 1. */ + new_pass = false; + changed = true; /* Pre-initialize to break out of pass 1. */ search_addr = 0xFFFFFFFF; } @@ -292,15 +292,15 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, search_addr = BASEADDR (sec); /* Found a page => more work to do. */ - *again = TRUE; + *again = true; } } else { if (new_pass) { - new_pass = FALSE; - changed = FALSE; + new_pass = false; + changed = false; page_start = PAGENO (search_addr); page_end = page_start | 0x00003FFF; } @@ -313,9 +313,9 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, if (!epiphany_elf_relax_section_page (abfd, sec, &changed, &misc, page_start, page_end)) #endif - return FALSE; + return false; } - *again = TRUE; + *again = true; } /* Perform some house keeping after relaxing the section. */ @@ -344,7 +344,7 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -353,12 +353,12 @@ epiphany_elf_relax_section (bfd *abfd, asection *sec, free (contents); if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Set the howto pointer for a EPIPHANY ELF reloc. */ -static bfd_boolean +static bool epiphany_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -372,10 +372,10 @@ epiphany_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & epiphany_elf_howto_table [r_type]; - return TRUE; + return true; } /* Perform a single relocation. @@ -518,9 +518,9 @@ epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean unresolved_reloc ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool unresolved_reloc ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -555,7 +555,7 @@ epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -584,7 +584,7 @@ epiphany_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* We only have a little-endian target. */ diff --git a/bfd/elf32-fr30.c b/bfd/elf32-fr30.c index cd9395ae9b..7ee83cab9b 100644 --- a/bfd/elf32-fr30.c +++ b/bfd/elf32-fr30.c @@ -39,194 +39,194 @@ static reloc_howto_type fr30_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_FR30_8, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x0ff0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 20 bit absolute relocation. */ HOWTO (R_FR30_20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ fr30_elf_i20_reloc, /* special_function */ "R_FR30_20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00f0ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_FR30_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit into 48 bits absolute relocation. */ HOWTO (R_FR30_48, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ fr30_elf_i32_reloc, /* special_function */ "R_FR30_48", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit absolute relocation. */ HOWTO (R_FR30_6_IN_4, /* type */ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_6_IN_4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x00f0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_FR30_8_IN_8, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc,/* special_function */ "R_FR30_8_IN_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x0ff0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 9 bit absolute relocation. */ HOWTO (R_FR30_9_IN_8, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc,/* special_function */ "R_FR30_9_IN_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x0ff0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 10 bit absolute relocation. */ HOWTO (R_FR30_10_IN_8, /* type */ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc,/* special_function */ "R_FR30_10_IN_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x0ff0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A PC relative 9 bit relocation, right shifted by 1. */ HOWTO (R_FR30_9_PCREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_9_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A PC relative 12 bit relocation, right shifted by 1. */ HOWTO (R_FR30_12_PCREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FR30_12_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x07ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO (R_FR30_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_FR30_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_FR30_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_FR30_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* Utility to actually perform an R_FR30_20 reloc. */ @@ -367,7 +367,7 @@ fr30_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an FR30 ELF reloc. */ -static bfd_boolean +static bool fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -381,10 +381,10 @@ fr30_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & fr30_elf_howto_table [r_type]; - return TRUE; + return true; } /* Perform a single relocation. By default we use the standard BFD @@ -553,7 +553,7 @@ fr30_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -587,7 +587,7 @@ fr30_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -613,7 +613,7 @@ fr30_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -641,7 +641,7 @@ fr30_elf_gc_mark_hook (asection *sec, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool fr30_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -653,7 +653,7 @@ fr30_elf_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -681,19 +681,19 @@ fr30_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_FR30_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_FR30_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } #define ELF_ARCH bfd_arch_fr30 diff --git a/bfd/elf32-frv.c b/bfd/elf32-frv.c index 007e05334d..cf0980cd26 100644 --- a/bfd/elf32-frv.c +++ b/bfd/elf32-frv.c @@ -37,158 +37,158 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_FRV_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit pc-relative relocation. */ HOWTO (R_FRV_LABEL16, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_LABEL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 24-bit pc-relative relocation. */ HOWTO (R_FRV_LABEL24, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_LABEL24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7e03ffff, /* src_mask */ 0x7e03ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_FRV_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FRV_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FRV_GPREL12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GPREL12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FRV_GPRELU12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GPRELU12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0x3f03f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FRV_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FRV_GPRELHI, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GPRELHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FRV_GPRELLO, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GPRELLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the address of the symbol. */ @@ -196,15 +196,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOT12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the symbol. */ @@ -212,15 +212,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the symbol. */ @@ -228,30 +228,30 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The 32-bit address of the canonical descriptor of a function. */ HOWTO (R_FRV_FUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the address of canonical descriptor of a function. */ @@ -259,15 +259,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_GOT12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -275,15 +275,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_GOTHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -291,30 +291,30 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_GOTLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The 64-bit descriptor of a function. */ HOWTO (R_FRV_FUNCDESC_VALUE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_VALUE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the address of canonical descriptor of a function. */ @@ -322,15 +322,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_GOTOFF12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -338,15 +338,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_GOTOFFHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the canonical descriptor of a function. */ @@ -354,15 +354,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_GOTOFFLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the address of the symbol. */ @@ -370,15 +370,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTOFF12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the address of the symbol. */ @@ -386,15 +386,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTOFFHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the address of the symbol. */ @@ -402,15 +402,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTOFFLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24-bit pc-relative relocation referencing the TLS PLT entry for a thread-local symbol. If the symbol number is 0, it refers to @@ -419,15 +419,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GETTLSOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7e03ffff, /* src_mask */ 0x7e03ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 64-bit TLS descriptor for a symbol. This relocation is only valid as a REL, dynamic relocation. */ @@ -435,15 +435,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSDESC_VALUE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the TLS descriptor of the symbol. */ @@ -451,15 +451,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTTLSDESC12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the TLS descriptor of the symbol. */ @@ -467,15 +467,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTTLSDESCHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the TLS descriptor of the symbol. */ @@ -483,15 +483,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTTLSDESCLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the offset from the module base address to the thread-local symbol address. */ @@ -499,15 +499,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSMOFF12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the offset from the module base address to the thread-local symbol address. */ @@ -515,15 +515,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSMOFFHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the offset from the module base address to the thread-local symbol address. */ @@ -531,15 +531,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSMOFFLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12-bit signed operand with the GOT offset for the TLSOFF entry for a symbol. */ @@ -547,15 +547,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTTLSOFF12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The upper 16 bits of the GOT offset for the TLSOFF entry for a symbol. */ @@ -563,15 +563,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTTLSOFFHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The lower 16 bits of the GOT offset for the TLSOFF entry for a symbol. */ @@ -579,15 +579,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GOTTLSOFFLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The 32-bit offset from the thread pointer (not the module base address) to a thread-local symbol. */ @@ -595,15 +595,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An annotation for linker relaxation, that denotes the symbol+addend whose TLS descriptor is referenced by the sum of @@ -612,15 +612,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSDESC_RELAX", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An annotation for linker relaxation, that denotes the symbol+addend whose TLS resolver entry point is given by the sum @@ -629,15 +629,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_GETTLSOFF_RELAX", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An annotation for linker relaxation, that denotes the symbol+addend whose TLS offset GOT entry is given by the sum of @@ -646,15 +646,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSOFF_RELAX", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32-bit offset from the module base address to the thread-local symbol address. */ @@ -662,15 +662,15 @@ static reloc_howto_type elf32_frv_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSMOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* GNU extension to record C++ vtable hierarchy. */ @@ -679,15 +679,15 @@ static reloc_howto_type elf32_frv_vtinherit_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_FRV_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ static reloc_howto_type elf32_frv_vtentry_howto = @@ -695,62 +695,62 @@ static reloc_howto_type elf32_frv_vtentry_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_FRV_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* The following 3 relocations are REL. The only difference to the - entries in the table above are that partial_inplace is TRUE. */ + entries in the table above are that partial_inplace is true. */ static reloc_howto_type elf32_frv_rel_32_howto = HOWTO (R_FRV_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ static reloc_howto_type elf32_frv_rel_funcdesc_howto = HOWTO (R_FRV_FUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ static reloc_howto_type elf32_frv_rel_funcdesc_value_howto = HOWTO (R_FRV_FUNCDESC_VALUE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_FUNCDESC_VALUE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ static reloc_howto_type elf32_frv_rel_tlsdesc_value_howto = /* A 64-bit TLS descriptor for a symbol. The first word resolves to @@ -768,15 +768,15 @@ static reloc_howto_type elf32_frv_rel_tlsdesc_value_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSDESC_VALUE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ static reloc_howto_type elf32_frv_rel_tlsoff_howto = /* The 32-bit offset from the thread pointer (not the module base @@ -785,15 +785,15 @@ static reloc_howto_type elf32_frv_rel_tlsoff_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FRV_TLSOFF", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ @@ -1292,7 +1292,7 @@ _frvfdpic_osec_to_segment (bfd *output_bfd, asection *osec) return (p != NULL) ? p - elf_tdata (output_bfd)->phdr : -1; } -inline static bfd_boolean +inline static bool _frvfdpic_osec_readonly_p (bfd *output_bfd, asection *osec) { unsigned seg = _frvfdpic_osec_to_segment (output_bfd, osec); @@ -1318,7 +1318,7 @@ tls_biased_base (struct bfd_link_info *info) /* Generate relocations for GOT entries, function descriptors, and code for PLT and lazy PLT entries. */ -inline static bfd_boolean +inline static bool _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, bfd *output_bfd, struct bfd_link_info *info, @@ -1331,7 +1331,7 @@ _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, int dynindx = -1; if (entry->done) - return TRUE; + return true; entry->done = 1; if (entry->got_entry || entry->fdgot_entry || entry->fd_entry @@ -1454,7 +1454,7 @@ _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, elf_hash_table (info)->dynobj, frvfdpic_got_section (info), entry->fdgot_entry); - return FALSE; + return false; } } else @@ -1605,7 +1605,7 @@ _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, elf_hash_table (info)->dynobj, frvfdpic_got_section (info), entry->fd_entry); - return FALSE; + return false; } fd_lazy_rel_offset = ofst; @@ -1788,8 +1788,8 @@ _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, { (*info->callbacks->undefined_symbol) (info, "TLS section", elf_hash_table (info)->dynobj, - frvfdpic_got_section (info), entry->tlsoff_entry, TRUE); - return FALSE; + frvfdpic_got_section (info), entry->tlsoff_entry, true); + return false; } idx = elf_section_data (elf_hash_table (info)->tls_sec)->dynindx; ad += FRVFDPIC_TLS_BIAS; @@ -1902,8 +1902,8 @@ _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, { (*info->callbacks->undefined_symbol) (info, "TLS section", elf_hash_table (info)->dynobj, - frvfdpic_got_section (info), entry->tlsdesc_entry, TRUE); - return FALSE; + frvfdpic_got_section (info), entry->tlsdesc_entry, true); + return false; } idx = elf_section_data (elf_hash_table (info)->tls_sec)->dynindx; ad += FRVFDPIC_TLS_BIAS; @@ -2116,7 +2116,7 @@ _frvfdpic_emit_got_relocs_plt_entries (struct frvfdpic_relocs_info *entry, } } - return TRUE; + return true; } /* Handle an FRV small data reloc. */ @@ -2133,7 +2133,7 @@ elf32_frv_relocate_gprel12 (struct bfd_link_info *info, bfd_vma gp; struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_gp", false, false, true); gp = (h->u.def.value + h->u.def.section->output_section->vma @@ -2171,7 +2171,7 @@ elf32_frv_relocate_gprelu12 (struct bfd_link_info *info, struct bfd_link_hash_entry *h; bfd_vma mask; - h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_gp", false, false, true); gp = (h->u.def.value + h->u.def.section->output_section->vma @@ -2298,7 +2298,7 @@ elf32_frv_relocate_gprelhi (struct bfd_link_info *info, bfd_vma gp; struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_gp", false, false, true); gp = (h->u.def.value + h->u.def.section->output_section->vma @@ -2331,7 +2331,7 @@ elf32_frv_relocate_gprello (struct bfd_link_info *info, bfd_vma gp; struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_gp", false, false, true); gp = (h->u.def.value + h->u.def.section->output_section->vma @@ -2534,7 +2534,7 @@ frv_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an FRV ELF reloc. */ -static bfd_boolean +static bool frv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -2559,17 +2559,17 @@ frv_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & elf32_frv_howto_table [r_type]; break; } - return TRUE; + return true; } /* Set the howto pointer for an FRV ELF REL reloc. */ -static bfd_boolean +static bool frvfdpic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -2600,9 +2600,9 @@ frvfdpic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, default: cache_ptr->howto = NULL; - return FALSE; + return false; } - return TRUE; + return true; } /* Perform a single relocation. By default we use the standard BFD @@ -2741,8 +2741,8 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean warned, ignored; - bfd_boolean unresolved_reloc; + bool warned, ignored; + bool unresolved_reloc; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2822,7 +2822,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (info), input_bfd, r_symndx, orig_addend, INSERT); if (! picrel) - return FALSE; + return false; if (!_frvfdpic_emit_got_relocs_plt_entries (picrel, output_bfd, info, osec, sym, @@ -2833,7 +2833,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: relocation to `%s+%v'" " may have caused the error above\n"), input_bfd, input_section, rel->r_offset, name, rel->r_addend); - return FALSE; + return false; } break; @@ -2850,7 +2850,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: relocation references symbol" " not defined in the module\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } break; } @@ -2925,7 +2925,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, info->callbacks->einfo (_("%H: R_FRV_GETTLSOFF not applied to a call instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_GETTLSOFF_LOCAL_EXEC_P (info, picrel, @@ -2967,7 +2967,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_GOTTLSDESC12" " not applied to an lddi instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_TLSDESC_LOCAL_EXEC_P (info, picrel, @@ -3038,7 +3038,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_GOTTLSDESCHI" " not applied to a sethi instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_TLSDESC_LOCAL_EXEC_P (info, picrel, @@ -3075,7 +3075,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_GOTTLSDESCLO" " not applied to a setlo or setlos instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_TLSDESC_LOCAL_EXEC_P (info, picrel, @@ -3122,7 +3122,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_TLSDESC_RELAX" " not applied to an ldd instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_TLSDESC_LOCAL_EXEC_P (info, picrel, @@ -3206,7 +3206,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_GETTLSOFF_RELAX" " not applied to a calll instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_TLSDESC_LOCAL_EXEC_P (info, picrel, @@ -3260,7 +3260,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_GOTTLSOFF12" " not applied to an ldi instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_GOTTLSOFF_LOCAL_EXEC_P (info, picrel, @@ -3290,7 +3290,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_GOTTLSOFFHI" " not applied to a sethi instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_GOTTLSOFF_LOCAL_EXEC_P (info, picrel, @@ -3319,7 +3319,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_GOTTLSOFFLO" " not applied to a setlo or setlos instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_GOTTLSOFF_LOCAL_EXEC_P (info, picrel, @@ -3349,7 +3349,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_TLSOFF_RELAX" " not applied to an ld instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (RELAX_GOTTLSOFF_LOCAL_EXEC_P (info, picrel, @@ -3394,7 +3394,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: R_FRV_TLSMOFFHI" " not applied to a sethi instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (TLSMOFF_IN_RANGE_FOR_SETLOS_P (relocation + rel->r_addend, @@ -3421,7 +3421,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("R_FRV_TLSMOFFLO" " not applied to a setlo or setlos instruction\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (TLSMOFF_IN_RANGE_FOR_SETLOS_P (relocation + rel->r_addend, @@ -3543,7 +3543,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, " with nonzero addend\n"), input_bfd, input_section, rel->r_offset, "R_FRV_FUNCDESC"); - return FALSE; + return false; } dynindx = h->dynindx; } @@ -3583,7 +3583,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: cannot emit fixups" " in read-only section\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } offset = _bfd_elf_section_offset @@ -3613,7 +3613,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: cannot emit dynamic relocations" " in read-only section\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } offset = _bfd_elf_section_offset @@ -3663,7 +3663,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, " with nonzero addend\n"), input_bfd, input_section, rel->r_offset, "R_FRV_FUNCDESC_VALUE"); - return FALSE; + return false; } dynindx = h->dynindx; } @@ -3703,7 +3703,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, info->callbacks->einfo (_("%H: cannot emit fixups in read-only section\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } if (!h || h->root.type != bfd_link_hash_undefweak) { @@ -3746,7 +3746,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%H: cannot emit dynamic relocations" " in read-only section\n"), input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } offset = _bfd_elf_section_offset @@ -3919,7 +3919,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, input_bfd, input_section, rel->r_offset, name); } if (!silence_segment_error && bfd_link_pic (info)) - return FALSE; + return false; elf_elfheader (output_bfd)->e_flags |= EF_FRV_PIC; } @@ -4042,7 +4042,7 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -4068,12 +4068,12 @@ elf32_frv_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, /* xgettext:c-format */ (_("%H: reloc against `%s': %s\n"), input_bfd, input_section, rel->r_offset, name, msg); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -4100,7 +4100,7 @@ elf32_frv_gc_mark_hook (asection *sec, /* Hook called by the linker routine which adds symbols from an object file. We use it to put .comm items in .scomm, and not .comm. */ -static bfd_boolean +static bool elf32_frv_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -4126,19 +4126,19 @@ elf32_frv_add_symbol_hook (bfd *abfd, | SEC_SMALL_DATA | SEC_LINKER_CREATED)); if (scomm == NULL) - return FALSE; + return false; } *secp = scomm; *valp = sym->st_size; } - return TRUE; + return true; } /* We need dynamic symbols for every section, since segments can relocate independently. */ -static bfd_boolean +static bool _frvfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, @@ -4151,12 +4151,12 @@ _frvfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, /* If sh_type is yet undecided, assume it could be SHT_PROGBITS/SHT_NOBITS. */ case SHT_NULL: - return FALSE; + return false; /* There shouldn't be section relative relocations against any other section. */ default: - return TRUE; + return true; } } @@ -4164,7 +4164,7 @@ _frvfdpic_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, is almost entirely copied from elflink.c:_bfd_elf_create_got_section(). */ -static bfd_boolean +static bool _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) { flagword flags, pltflags; @@ -4178,7 +4178,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ s = elf_hash_table (info)->sgot; if (s != NULL) - return TRUE; + return true; /* Machine specific: although pointers are 32-bits wide, we want the GOT to be aligned to a 64-bit boundary, such that function @@ -4194,7 +4194,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) elf_hash_table (info)->sgot = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (bed->want_got_sym) { @@ -4205,12 +4205,12 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) h = _bfd_elf_define_linkage_sym (abfd, info, s, "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; /* Machine-specific: we want the symbol for executables as well. */ if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* The first bit of the global offset table is the header. */ @@ -4225,21 +4225,21 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) frvfdpic_relocs_info_eq, (htab_del) NULL); if (! frvfdpic_relocs_info (info)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".rel.got", (flags | SEC_READONLY)); elf_hash_table (info)->srelgot = s; if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; /* Machine-specific. */ s = bfd_make_section_anyway_with_flags (abfd, ".rofixup", (flags | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; frvfdpic_gotfixup_section (info) = s; offset = -2048; @@ -4256,9 +4256,9 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) linker script will override it. */ bh = NULL; if (!(_bfd_generic_link_add_one_symbol - (info, abfd, "_gp", flags, s, offset, (const char *) NULL, FALSE, + (info, abfd, "_gp", flags, s, offset, (const char *) NULL, false, bed->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->type = STT_OBJECT; @@ -4266,10 +4266,10 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) /* Machine-specific: we want the symbol for executables as well. */ if (IS_FDPIC (abfd) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; if (!IS_FDPIC (abfd)) - return TRUE; + return true; /* FDPIC supports Thread Local Storage, and this may require a procedure linkage table for TLS PLT entries. */ @@ -4287,7 +4287,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; /* FRV-specific: remember it. */ frvfdpic_plt_section (info) = s; @@ -4299,7 +4299,7 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) "_PROCEDURE_LINKAGE_TABLE_"); elf_hash_table (info)->hplt = h; if (h == NULL) - return FALSE; + return false; } /* FRV-specific: we want rel relocations for the plt. */ @@ -4307,17 +4307,17 @@ _frv_create_got_section (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; /* FRV-specific: remember it. */ frvfdpic_pltrel_section (info) = s; - return TRUE; + return true; } /* Make sure the got and plt sections exist, and that our pointers in the link hash table point to them. */ -static bfd_boolean +static bool elf32_frvfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { /* This is mostly copied from @@ -4335,7 +4335,7 @@ elf32_frvfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* FRV-specific: we want to create the GOT and the PLT in the FRV way. */ if (! _frv_create_got_section (abfd, info)) - return FALSE; + return false; /* FRV-specific: make sure we created everything we wanted. */ BFD_ASSERT (frvfdpic_got_section (info) && frvfdpic_gotrel_section (info) @@ -4354,7 +4354,7 @@ elf32_frvfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".dynbss", SEC_ALLOC | SEC_LINKER_CREATED); if (s == NULL) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the @@ -4375,11 +4375,11 @@ elf32_frvfdpic_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Compute the total GOT and PLT size required by each symbol in each @@ -4455,7 +4455,7 @@ _frvfdpic_count_nontls_entries (struct frvfdpic_relocs_info *entry, static void _frvfdpic_count_tls_entries (struct frvfdpic_relocs_info *entry, struct _frvfdpic_dynamic_got_info *dinfo, - bfd_boolean subtract) + bool subtract) { const int l = subtract ? -1 : 1; @@ -4500,7 +4500,7 @@ _frvfdpic_count_tls_entries (struct frvfdpic_relocs_info *entry, static void _frvfdpic_count_relocs_fixups (struct frvfdpic_relocs_info *entry, struct _frvfdpic_dynamic_got_info *dinfo, - bfd_boolean subtract) + bool subtract) { bfd_vma relocs = 0, fixups = 0, tlsrets = 0; @@ -4571,9 +4571,9 @@ _frvfdpic_count_relocs_fixups (struct frvfdpic_relocs_info *entry, static void _frvfdpic_relax_tls_entries (struct frvfdpic_relocs_info *entry, struct _frvfdpic_dynamic_got_info *dinfo, - bfd_boolean relaxing) + bool relaxing) { - bfd_boolean changed = ! relaxing; + bool changed = ! relaxing; BFD_ASSERT (bfd_link_executable (dinfo->info) || (dinfo->info->flags & DF_STATIC_TLS)); @@ -4582,9 +4582,9 @@ _frvfdpic_relax_tls_entries (struct frvfdpic_relocs_info *entry, { if (! changed) { - _frvfdpic_count_relocs_fixups (entry, dinfo, TRUE); - _frvfdpic_count_tls_entries (entry, dinfo, TRUE); - changed = TRUE; + _frvfdpic_count_relocs_fixups (entry, dinfo, true); + _frvfdpic_count_tls_entries (entry, dinfo, true); + changed = true; } /* When linking an executable, we can always decay GOTTLSDESC to @@ -4638,9 +4638,9 @@ _frvfdpic_relax_tls_entries (struct frvfdpic_relocs_info *entry, { if (! changed) { - _frvfdpic_count_relocs_fixups (entry, dinfo, TRUE); - _frvfdpic_count_tls_entries (entry, dinfo, TRUE); - changed = TRUE; + _frvfdpic_count_relocs_fixups (entry, dinfo, true); + _frvfdpic_count_tls_entries (entry, dinfo, true); + changed = true; } entry->tlsplt = @@ -4660,9 +4660,9 @@ _frvfdpic_relax_tls_entries (struct frvfdpic_relocs_info *entry, { if (! changed) { - _frvfdpic_count_relocs_fixups (entry, dinfo, TRUE); - _frvfdpic_count_tls_entries (entry, dinfo, TRUE); - changed = TRUE; + _frvfdpic_count_relocs_fixups (entry, dinfo, true); + _frvfdpic_count_tls_entries (entry, dinfo, true); + changed = true; } entry->tlsoff12 = 1; @@ -4671,8 +4671,8 @@ _frvfdpic_relax_tls_entries (struct frvfdpic_relocs_info *entry, if (changed) { - _frvfdpic_count_tls_entries (entry, dinfo, FALSE); - _frvfdpic_count_relocs_fixups (entry, dinfo, FALSE); + _frvfdpic_count_tls_entries (entry, dinfo, false); + _frvfdpic_count_relocs_fixups (entry, dinfo, false); } return; @@ -4693,11 +4693,11 @@ _frvfdpic_count_got_plt_entries (void **entryp, void *dinfo_) if (bfd_link_executable (dinfo->info) || (dinfo->info->flags & DF_STATIC_TLS)) - _frvfdpic_relax_tls_entries (entry, dinfo, FALSE); + _frvfdpic_relax_tls_entries (entry, dinfo, false); else { - _frvfdpic_count_tls_entries (entry, dinfo, FALSE); - _frvfdpic_count_relocs_fixups (entry, dinfo, FALSE); + _frvfdpic_count_tls_entries (entry, dinfo, false); + _frvfdpic_count_relocs_fixups (entry, dinfo, false); } return 1; @@ -5214,7 +5214,7 @@ _frvfdpic_resolve_final_relocs_info (void **entryp, void *p) section and the rofixup section. Assign locations for GOT and PLT entries. */ -static bfd_boolean +static bool _frvfdpic_size_got_plt (bfd *output_bfd, struct _frvfdpic_dynamic_got_plt_info *gpinfop) { @@ -5313,7 +5313,7 @@ _frvfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, frvfdpic_got_section (info)->size); if (frvfdpic_got_section (info)->contents == NULL) - return FALSE; + return false; } if (frvfdpic_gotrel_section (info)) @@ -5332,7 +5332,7 @@ _frvfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, frvfdpic_gotrel_section (info)->size); if (frvfdpic_gotrel_section (info)->contents == NULL) - return FALSE; + return false; } frvfdpic_gotfixup_section (info)->size = (gpinfop->g.fixups + 1) * 4; @@ -5344,7 +5344,7 @@ _frvfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, frvfdpic_gotfixup_section (info)->size); if (frvfdpic_gotfixup_section (info)->contents == NULL) - return FALSE; + return false; } if (frvfdpic_pltrel_section (info)) @@ -5360,7 +5360,7 @@ _frvfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, frvfdpic_pltrel_section (info)->size); if (frvfdpic_pltrel_section (info)->contents == NULL) - return FALSE; + return false; } } @@ -5413,16 +5413,16 @@ _frvfdpic_size_got_plt (bfd *output_bfd, (bfd_byte *) bfd_zalloc (dynobj, frvfdpic_plt_section (info)->size); if (frvfdpic_plt_section (info)->contents == NULL) - return FALSE; + return false; } } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -5466,30 +5466,29 @@ elf32_frvfdpic_size_dynamic_sections (bfd *output_bfd, frvfdpic_dynamic_got_plt_info (info) = bfd_alloc (dynobj, sizeof (gpinfo.g)); if (!_frvfdpic_size_got_plt (output_bfd, &gpinfo)) - return FALSE; + return false; - return _bfd_elf_add_dynamic_tags (output_bfd, info, TRUE); + return _bfd_elf_add_dynamic_tags (output_bfd, info, true); } -static bfd_boolean +static bool elf32_frvfdpic_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { if (!bfd_link_relocatable (info) && !bfd_elf_stack_segment_size (output_bfd, info, "__stacksize", DEFAULT_STACK_SIZE)) - return FALSE; + return false; - return TRUE; + return true; } /* Check whether any of the relocations was optimized away, and subtract it from the relocation or fixup count. */ -static bfd_boolean +static bool _frvfdpic_check_discarded_relocs (bfd *abfd, asection *sec, struct bfd_link_info *info, - - bfd_boolean *changed) + bool *changed) { Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; @@ -5497,7 +5496,7 @@ _frvfdpic_check_discarded_relocs (bfd *abfd, asection *sec, if ((sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -5542,28 +5541,28 @@ _frvfdpic_check_discarded_relocs (bfd *abfd, asection *sec, rel->r_addend, NO_INSERT); if (! picrel) - return FALSE; + return false; - *changed = TRUE; + *changed = true; dinfo = frvfdpic_dynamic_got_plt_info (info); - _frvfdpic_count_relocs_fixups (picrel, dinfo, TRUE); + _frvfdpic_count_relocs_fixups (picrel, dinfo, true); if (ELF32_R_TYPE (rel->r_info) == R_FRV_32) picrel->relocs32--; else /* we know (ELF32_R_TYPE (rel->r_info) == R_FRV_FUNCDESC) */ picrel->relocsfd--; - _frvfdpic_count_relocs_fixups (picrel, dinfo, FALSE); + _frvfdpic_count_relocs_fixups (picrel, dinfo, false); } - return TRUE; + return true; } -static bfd_boolean +static bool frvfdpic_elf_discard_info (bfd *ibfd, struct elf_reloc_cookie *cookie ATTRIBUTE_UNUSED, struct bfd_link_info *info) { - bfd_boolean changed = FALSE; + bool changed = false; asection *s; bfd *obfd = NULL; @@ -5572,7 +5571,7 @@ frvfdpic_elf_discard_info (bfd *ibfd, if (s->sec_info_type == SEC_INFO_TYPE_EH_FRAME) { if (!_frvfdpic_check_discarded_relocs (ibfd, s, info, &changed)) - return FALSE; + return false; obfd = s->output_section->owner; } @@ -5590,10 +5589,10 @@ frvfdpic_elf_discard_info (bfd *ibfd, NULL); if (!_frvfdpic_size_got_plt (obfd, &gpinfo)) - return FALSE; + return false; } - return TRUE; + return true; } /* Look for opportunities to relax TLS relocations. We can assume @@ -5606,14 +5605,14 @@ _frvfdpic_relax_got_plt_entries (void **entryp, void *dinfo_) struct frvfdpic_relocs_info *entry = *entryp; struct _frvfdpic_dynamic_got_info *dinfo = dinfo_; - _frvfdpic_relax_tls_entries (entry, dinfo, TRUE); + _frvfdpic_relax_tls_entries (entry, dinfo, true); return 1; } -static bfd_boolean +static bool elf32_frvfdpic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, - struct bfd_link_info *info, bfd_boolean *again) + struct bfd_link_info *info, bool *again) { struct _frvfdpic_dynamic_got_plt_info gpinfo; @@ -5622,22 +5621,22 @@ elf32_frvfdpic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, (_("%P%F: --relax and -r may not be used together\n")); /* If we return early, we didn't change anything. */ - *again = FALSE; + *again = false; /* We'll do our thing when requested to relax the GOT section. */ if (sec != frvfdpic_got_section (info)) - return TRUE; + return true; /* We can only relax when linking the main executable or a library that can't be dlopened. */ if (! bfd_link_executable (info) && ! (info->flags & DF_STATIC_TLS)) - return TRUE; + return true; /* If there isn't a TLS section for this binary, we can't do anything about its TLS relocations (it probably doesn't have any. */ if (elf_hash_table (info)->tls_sec == NULL) - return TRUE; + return true; memset (&gpinfo, 0, sizeof (gpinfo)); memcpy (&gpinfo.g, frvfdpic_dynamic_got_plt_info (info), sizeof (gpinfo.g)); @@ -5661,7 +5660,7 @@ elf32_frvfdpic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, be a better way to get to it. */ if (!_frvfdpic_size_got_plt (elf_hash_table (info)->tls_sec->owner, &gpinfo)) - return FALSE; + return false; /* Repeat until we don't make any further changes. We could fail to introduce changes in a round if, for example, the 12-bit range is @@ -5669,23 +5668,23 @@ elf32_frvfdpic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, descriptors in it. We have to repeat the whole process because we might have changed the size of a section processed before this one. */ - *again = TRUE; + *again = true; } - return TRUE; + return true; } /* Fill in code and data in dynamic sections. */ -static bfd_boolean +static bool elf32_frv_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) { /* Nothing to be done for non-FDPIC. */ - return TRUE; + return true; } -static bfd_boolean +static bool elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -5721,11 +5720,11 @@ elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd, error: info->callbacks->einfo ("LINKER BUG: .rofixup section size mismatch\n"); - return FALSE; + return false; } hend = bfd_link_hash_lookup (info->hash, "__ROFIXUP_END__", - FALSE, FALSE, TRUE); + false, false, true); if (hend && (hend->type == bfd_link_hash_defined || hend->type == bfd_link_hash_defweak) @@ -5796,13 +5795,13 @@ elf32_frvfdpic_finish_dynamic_sections (bfd *output_bfd, } } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a regular object. */ -static bfd_boolean +static bool elf32_frvfdpic_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h ATTRIBUTE_UNUSED) @@ -5827,35 +5826,35 @@ elf32_frvfdpic_adjust_dynamic_symbol BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } - return TRUE; + return true; } /* Perform any actions needed for dynamic symbols. */ -static bfd_boolean +static bool elf32_frvfdpic_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Decide whether to attempt to turn absptr or lsda encodings in shared libraries into pcrel within the given input section. */ -static bfd_boolean +static bool frvfdpic_elf_use_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, asection *eh_frame_section ATTRIBUTE_UNUSED) { /* We can't use PC-relative encodings in FDPIC binaries, in general. */ - return FALSE; + return false; } /* Adjust the contents of an eh_frame_hdr section before they're output. */ @@ -5993,7 +5992,7 @@ frvfdpic_elf_encode_eh_address (bfd *abfd, PLT entry should be faster), or taking hints from the compiler. Given infinite time and money... :-) */ -static bfd_boolean +static bool elf32_frv_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -6007,7 +6006,7 @@ elf32_frv_check_relocs (bfd *abfd, struct frvfdpic_relocs_info *picrel; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -6072,7 +6071,7 @@ elf32_frv_check_relocs (bfd *abfd, { elf_hash_table (info)->dynobj = dynobj = abfd; if (! _frv_create_got_section (abfd, info)) - return FALSE; + return false; } if (! IS_FDPIC (abfd)) { @@ -6101,7 +6100,7 @@ elf32_frv_check_relocs (bfd *abfd, (info), abfd, r_symndx, rel->r_addend, INSERT); if (! picrel) - return FALSE; + return false; break; default: @@ -6212,14 +6211,14 @@ elf32_frv_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_FRV_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_FRV_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_FRV_LABEL16: @@ -6240,11 +6239,11 @@ elf32_frv_check_relocs (bfd *abfd, /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, (unsigned int) ELF32_R_TYPE (rel->r_info)); - return FALSE; + return false; } } - return TRUE; + return true; } @@ -6271,7 +6270,7 @@ elf32_frv_machine (bfd *abfd) /* Set the right machine number for a FRV ELF file. */ -static bfd_boolean +static bool elf32_frv_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_frv, elf32_frv_machine (abfd)); @@ -6281,57 +6280,57 @@ elf32_frv_object_p (bfd *abfd) /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool frv_elf_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Return true if the architecture described by elf header flag EXTENSION is an extension of the architecture described by BASE. */ -static bfd_boolean +static bool frv_elf_arch_extension_p (flagword base, flagword extension) { if (base == extension) - return TRUE; + return true; /* CPU_GENERIC code can be merged with code for a specific architecture, in which case the result is marked as being for the specific architecture. Everything is therefore an extension of CPU_GENERIC. */ if (base == EF_FRV_CPU_GENERIC) - return TRUE; + return true; if (extension == EF_FRV_CPU_FR450) if (base == EF_FRV_CPU_FR400 || base == EF_FRV_CPU_FR405) - return TRUE; + return true; if (extension == EF_FRV_CPU_FR405) if (base == EF_FRV_CPU_FR400) - return TRUE; + return true; - return FALSE; + return false; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword old_flags, old_partial; flagword new_flags, new_partial; - bfd_boolean error = FALSE; + bool error = false; char new_opt[80]; char old_opt[80]; /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; new_opt[0] = old_opt[0] = '\0'; new_flags = elf_elfheader (ibfd)->e_flags; @@ -6349,7 +6348,7 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) /* First call, no flags set. */ { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; old_flags = new_flags; } @@ -6491,7 +6490,7 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { old_flags &= ~ EF_FRV_PIC_FLAGS; #ifndef FRV_NO_PIC_ERROR - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: compiled with %s and linked with modules" @@ -6545,7 +6544,7 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Print out any mismatches from above. */ if (new_opt[0]) { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: compiled with %s and linked with modules compiled with %s"), @@ -6558,7 +6557,7 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (new_partial != old_partial) { old_flags |= new_partial; - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: uses different unknown e_flags (%#x) fields" @@ -6580,7 +6579,7 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (((new_flags & EF_FRV_FDPIC) == 0) != (! IS_FDPIC (ibfd))) { - error = TRUE; + error = true; if (IS_FDPIC (obfd)) _bfd_error_handler (_("%pB: cannot link non-fdpic object file into fdpic executable"), @@ -6598,7 +6597,7 @@ frv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) } -static bfd_boolean +static bool frv_elf_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -6675,13 +6674,13 @@ frv_elf_print_private_bfd_data (bfd *abfd, void * ptr) fprintf (file, " -G0"); fputc ('\n', file); - return TRUE; + return true; } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf32_frv_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -6690,7 +6689,7 @@ elf32_frv_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; /* The Linux/FRV elf_prstatus struct is 268 bytes long. The other hardcoded offsets and sizes listed below (and contained within @@ -6725,13 +6724,13 @@ elf32_frv_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) note->descpos + offset); } -static bfd_boolean +static bool elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; /* The Linux/FRV elf_prpsinfo struct is 124 bytes long. */ case 124: @@ -6757,7 +6756,7 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } #define ELF_ARCH bfd_arch_frv #define ELF_MACHINE_CODE EM_CYGNUS_FRV @@ -6796,7 +6795,7 @@ elf32_frv_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) #define elf_backend_grok_prstatus elf32_frv_grok_prstatus #define elf_backend_grok_psinfo elf32_frv_grok_psinfo -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf32-target.h" diff --git a/bfd/elf32-ft32.c b/bfd/elf32-ft32.c index 0ba2da0625..c3c393e348 100644 --- a/bfd/elf32-ft32.c +++ b/bfd/elf32-ft32.c @@ -29,7 +29,7 @@ #include "elf/ft32.h" #include "opcode/ft32.h" -static bfd_boolean debug_relax = FALSE; +static bool debug_relax = false; static bfd_reloc_status_type bfd_elf_ft32_diff_reloc (bfd *, arelent *, asymbol *, void *, @@ -42,15 +42,15 @@ static reloc_howto_type ft32_elf_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ @@ -58,166 +58,166 @@ static reloc_howto_type ft32_elf_howto_table [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_10, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_10", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00003ff0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_17, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_17", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0001ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_18, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_18", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0003ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_RELAX, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_RELAX", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_SC0, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_SC0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_SC1, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 22, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_SC1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x07ffff80, /* src_mask */ 0x07ffff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_FT32_15", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_FT32_DIFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_ft32_diff_reloc, /* special_function */ "R_FT32_DIFF32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -291,7 +291,7 @@ ft32_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an FT32 ELF reloc. */ -static bfd_boolean +static bool ft32_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -305,7 +305,7 @@ ft32_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & ft32_elf_howto_table [r_type]; @@ -392,7 +392,7 @@ ft32_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -486,7 +486,7 @@ ft32_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -512,12 +512,12 @@ ft32_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Relaxation. */ -static bfd_boolean +static bool ft32_reloc_shortable (bfd * abfd, asection * sec, @@ -571,7 +571,7 @@ ft32_reloc_shortable /* This appears to be a reference to an undefined symbol. Just ignore it--it will be caught by the regular reloc processing. */ - return FALSE; + return false; symval = (h->root.u.def.value + h->root.u.def.section->output_section->vma @@ -586,7 +586,7 @@ ft32_reloc_shortable case R_FT32_20: case R_FT32_RELAX: if (symval != 0) - return FALSE; + return false; insn = bfd_get_32 (abfd, contents + irel->r_offset); insn |= ((symval + irel->r_addend) << howto->bitpos) & howto->dst_mask; return ft32_shortcode (insn, sc); @@ -603,23 +603,23 @@ ft32_reloc_shortable { switch (insn) { - case 0x00200000: *sc = (3 << 13) | (0 << 9); return TRUE; - case 0x00280000: *sc = (3 << 13) | (1 << 9); return TRUE; - case 0x00600000: *sc = (3 << 13) | (2 << 9); return TRUE; - case 0x00680000: *sc = (3 << 13) | (3 << 9); return TRUE; - case 0x00a00000: *sc = (3 << 13) | (4 << 9); return TRUE; - case 0x00a80000: *sc = (3 << 13) | (5 << 9); return TRUE; - case 0x00e00000: *sc = (3 << 13) | (6 << 9); return TRUE; - case 0x00e80000: *sc = (3 << 13) | (7 << 9); return TRUE; - case 0x01200000: *sc = (3 << 13) | (8 << 9); return TRUE; - case 0x01280000: *sc = (3 << 13) | (9 << 9); return TRUE; - case 0x01600000: *sc = (3 << 13) | (10 << 9); return TRUE; - case 0x01680000: *sc = (3 << 13) | (11 << 9); return TRUE; - case 0x01a00000: *sc = (3 << 13) | (12 << 9); return TRUE; - case 0x01a80000: *sc = (3 << 13) | (13 << 9); return TRUE; - - case 0x00300000: *sc = (3 << 13) | (14 << 9); return TRUE; - case 0x00340000: *sc = (3 << 13) | (15 << 9); return TRUE; + case 0x00200000: *sc = (3 << 13) | (0 << 9); return true; + case 0x00280000: *sc = (3 << 13) | (1 << 9); return true; + case 0x00600000: *sc = (3 << 13) | (2 << 9); return true; + case 0x00680000: *sc = (3 << 13) | (3 << 9); return true; + case 0x00a00000: *sc = (3 << 13) | (4 << 9); return true; + case 0x00a80000: *sc = (3 << 13) | (5 << 9); return true; + case 0x00e00000: *sc = (3 << 13) | (6 << 9); return true; + case 0x00e80000: *sc = (3 << 13) | (7 << 9); return true; + case 0x01200000: *sc = (3 << 13) | (8 << 9); return true; + case 0x01280000: *sc = (3 << 13) | (9 << 9); return true; + case 0x01600000: *sc = (3 << 13) | (10 << 9); return true; + case 0x01680000: *sc = (3 << 13) | (11 << 9); return true; + case 0x01a00000: *sc = (3 << 13) | (12 << 9); return true; + case 0x01a80000: *sc = (3 << 13) | (13 << 9); return true; + + case 0x00300000: *sc = (3 << 13) | (14 << 9); return true; + case 0x00340000: *sc = (3 << 13) | (15 << 9); return true; default: break; @@ -630,12 +630,12 @@ ft32_reloc_shortable default: break; } - return FALSE; + return false; } /* Returns whether the relocation type passed is a diff reloc. */ -static bfd_boolean +static bool elf32_ft32_is_diff_reloc (Elf_Internal_Rela *irel) { return (ELF32_R_TYPE (irel->r_info) == R_FT32_DIFF32); @@ -645,7 +645,7 @@ elf32_ft32_is_diff_reloc (Elf_Internal_Rela *irel) insn address happens to fall between the two symbols for which this diff reloc was emitted. */ -static bfd_boolean +static bool elf32_ft32_adjust_diff_reloc_value (bfd *abfd, struct bfd_section *isec, Elf_Internal_Rela *irel, @@ -665,7 +665,7 @@ elf32_ft32_adjust_diff_reloc_value (bfd *abfd, if (isec_contents == NULL) { if (! bfd_malloc_and_get_section (abfd, isec, &isec_contents)) - return FALSE; + return false; elf_section_data (isec)->this_hdr.contents = isec_contents; } @@ -680,7 +680,7 @@ elf32_ft32_adjust_diff_reloc_value (bfd *abfd, break; default: - return FALSE; + return false; } /* For a diff reloc sym1 - sym2 the diff at assembly time (x) is written @@ -713,14 +713,14 @@ elf32_ft32_adjust_diff_reloc_value (bfd *abfd, break; default: - return FALSE; + return false; } } - return TRUE; + return true; } -static bfd_boolean +static bool elf32_ft32_adjust_reloc_if_spans_insn (bfd *abfd, asection *isec, Elf_Internal_Rela *irel, bfd_vma symval, @@ -735,32 +735,32 @@ elf32_ft32_adjust_reloc_if_spans_insn (bfd *abfd, symval, shrinked_insn_address, count)) - return FALSE; + return false; } else { bfd_vma reloc_value = symval + irel->r_addend; - bfd_boolean addend_within_shrink_boundary = + bool addend_within_shrink_boundary = (reloc_value <= shrink_boundary); - bfd_boolean reloc_spans_insn = + bool reloc_spans_insn = (symval <= shrinked_insn_address && reloc_value > shrinked_insn_address && addend_within_shrink_boundary); if (! reloc_spans_insn) - return TRUE; + return true; irel->r_addend -= count; if (debug_relax) printf ("Relocation's addend needed to be fixed \n"); } - return TRUE; + return true; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool elf32_ft32_relax_delete_bytes (struct bfd_link_info *link_info, bfd * abfd, asection * sec, bfd_vma addr, int count) { @@ -825,7 +825,7 @@ elf32_ft32_relax_delete_bytes (struct bfd_link_info *link_info, bfd * abfd, irel = elf_section_data (isec)->relocs; /* PR 12161: Read in the relocs for this section if necessary. */ if (irel == NULL) - irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE); + irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, true); for (irelend = irel + isec->reloc_count; irel < irelend; irel++) { @@ -839,7 +839,7 @@ elf32_ft32_relax_delete_bytes (struct bfd_link_info *link_info, bfd * abfd, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -886,7 +886,7 @@ elf32_ft32_relax_delete_bytes (struct bfd_link_info *link_info, bfd * abfd, shrinked_insn_address, shrink_boundary, count)) - return FALSE; + return false; } } /* else reference symbol is absolute. No adjustment needed. */ @@ -952,12 +952,12 @@ elf32_ft32_relax_delete_bytes (struct bfd_link_info *link_info, bfd * abfd, sym_hash->root.u.def.value -= count; } - return TRUE; + return true; } /* Return TRUE if LOC can be a target of a branch, jump or call. */ -static bfd_boolean +static bool elf32_ft32_relax_is_branch_target (struct bfd_link_info *link_info, bfd * abfd, asection * sec, bfd_vma loc) @@ -981,7 +981,7 @@ elf32_ft32_relax_is_branch_target (struct bfd_link_info *link_info, { irel = elf_section_data (isec)->relocs; if (irel == NULL) - irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE); + irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, true); irelend = irel + isec->reloc_count; @@ -997,7 +997,7 @@ elf32_ft32_relax_is_branch_target (struct bfd_link_info *link_info, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -1023,7 +1023,7 @@ elf32_ft32_relax_is_branch_target (struct bfd_link_info *link_info, (unsigned int) symval, (unsigned int) (symval + irel->r_addend)); if ((irel->r_addend) == loc) - return TRUE; + return true; } } } @@ -1066,18 +1066,17 @@ elf32_ft32_relax_is_branch_target (struct bfd_link_info *link_info, || sym_hash->root.type == bfd_link_hash_defweak) && sym_hash->root.u.def.section == sec && sym_hash->root.u.def.value == loc) - return TRUE; + return true; } - return FALSE; + return false; } -static bfd_boolean -ft32_elf_relax_section - (bfd * abfd, - asection * sec, - struct bfd_link_info * link_info, - bfd_boolean * again) +static bool +ft32_elf_relax_section (bfd *abfd, + asection *sec, + struct bfd_link_info *link_info, + bool *again) { Elf_Internal_Rela * free_relocs = NULL; Elf_Internal_Rela * internal_relocs; @@ -1088,7 +1087,7 @@ ft32_elf_relax_section Elf_Internal_Sym * isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -1097,7 +1096,7 @@ ft32_elf_relax_section || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; /* Get the section contents. */ if (elf_section_data (sec)->this_hdr.contents != NULL) @@ -1198,7 +1197,7 @@ ft32_elf_relax_section /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; irel += 2; } @@ -1232,12 +1231,12 @@ ft32_elf_relax_section if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: free (free_relocs); - return TRUE; + return true; } #define ELF_ARCH bfd_arch_ft32 diff --git a/bfd/elf32-gen.c b/bfd/elf32-gen.c index 2de6d8cc86..27635059df 100644 --- a/bfd/elf32-gen.c +++ b/bfd/elf32-gen.c @@ -31,32 +31,32 @@ static reloc_howto_type dummy = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "UNKNOWN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ -static bfd_boolean +static bool elf_generic_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED) { bfd_reloc->howto = &dummy; - return TRUE; + return true; } -static bfd_boolean +static bool elf_generic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED) { bfd_reloc->howto = &dummy; - return TRUE; + return true; } static void @@ -72,20 +72,20 @@ check_for_relocs (bfd * abfd, asection * o, void * failed) abfd, ehdrp->e_machine); bfd_set_error (bfd_error_wrong_format); - * (bfd_boolean *) failed = TRUE; + * (bool *) failed = true; } } -static bfd_boolean +static bool elf32_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean failed = FALSE; + bool failed = false; /* Check if there are any relocations. */ bfd_map_over_sections (abfd, check_for_relocs, & failed); if (failed) - return FALSE; + return false; return bfd_elf_link_add_symbols (abfd, info); } diff --git a/bfd/elf32-h8300.c b/bfd/elf32-h8300.c index 187551642d..a69ac0cbdb 100644 --- a/bfd/elf32-h8300.c +++ b/bfd/elf32-h8300.c @@ -27,22 +27,22 @@ static reloc_howto_type *elf32_h8_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code); -static bfd_boolean elf32_h8_info_to_howto +static bool elf32_h8_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *); -static bfd_boolean elf32_h8_info_to_howto_rel +static bool elf32_h8_info_to_howto_rel (bfd *, arelent *, Elf_Internal_Rela *); static unsigned long elf32_h8_mach (flagword); -static bfd_boolean elf32_h8_object_p (bfd *); -static bfd_boolean elf32_h8_merge_private_bfd_data +static bool elf32_h8_object_p (bfd *); +static bool elf32_h8_merge_private_bfd_data (bfd *, struct bfd_link_info *); -static bfd_boolean elf32_h8_relax_section - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *); -static bfd_boolean elf32_h8_relax_delete_bytes +static bool elf32_h8_relax_section + (bfd *, asection *, struct bfd_link_info *, bool *); +static bool elf32_h8_relax_delete_bytes (bfd *, asection *, bfd_vma, int); -static bfd_boolean elf32_h8_symbol_address_p (bfd *, asection *, bfd_vma); +static bool elf32_h8_symbol_address_p (bfd *, asection *, bfd_vma); static bfd_byte *elf32_h8_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **); + bfd_byte *, bool, asymbol **); static bfd_reloc_status_type elf32_h8_final_link_relocate (unsigned long, bfd *, bfd *, asection *, bfd_byte *, bfd_vma, bfd_vma, bfd_vma, @@ -64,169 +64,169 @@ static reloc_howto_type h8_elf_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ "R_H8_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR32_X (R_H8_NONE_X + 1) HOWTO (R_H8_DIR32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ "R_H8_DIR32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR16_X (R_H8_DIR32_X + 1) HOWTO (R_H8_DIR16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ "R_H8_DIR16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR8_X (R_H8_DIR16_X + 1) HOWTO (R_H8_DIR8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ "R_H8_DIR8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR16A8_X (R_H8_DIR8_X + 1) HOWTO (R_H8_DIR16A8, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ special, /* special_function */ "R_H8_DIR16A8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR16R8_X (R_H8_DIR16A8_X + 1) HOWTO (R_H8_DIR16R8, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ special, /* special_function */ "R_H8_DIR16R8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR24A8_X (R_H8_DIR16R8_X + 1) HOWTO (R_H8_DIR24A8, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ special, /* special_function */ "R_H8_DIR24A8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff000000, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR24R8_X (R_H8_DIR24A8_X + 1) HOWTO (R_H8_DIR24R8, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ special, /* special_function */ "R_H8_DIR24R8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff000000, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DIR32A16_X (R_H8_DIR24R8_X + 1) HOWTO (R_H8_DIR32A16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ "R_H8_DIR32A16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_DISP32A16_X (R_H8_DIR32A16_X + 1) HOWTO (R_H8_DISP32A16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ special, /* special_function */ "R_H8_DISP32A16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #define R_H8_PCREL16_X (R_H8_DISP32A16_X + 1) HOWTO (R_H8_PCREL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ special, /* special_function */ "R_H8_PCREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ #define R_H8_PCREL8_X (R_H8_PCREL16_X + 1) HOWTO (R_H8_PCREL8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ special, /* special_function */ "R_H8_PCREL8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* This structure is used to map BFD reloc codes to H8 ELF relocs. */ @@ -284,7 +284,7 @@ elf32_h8_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -static bfd_boolean +static bool elf32_h8_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { @@ -296,20 +296,20 @@ elf32_h8_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, if (h8_elf_howto_table[i].type == r) { bfd_reloc->howto = &h8_elf_howto_table[i]; - return TRUE; + return true; } /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } -static bfd_boolean +static bool elf32_h8_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc ATTRIBUTE_UNUSED, Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED) { - return FALSE; + return false; } /* Special handling for H8/300 relocs. @@ -470,7 +470,7 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -516,7 +516,7 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -543,7 +543,7 @@ elf32_h8_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Object files encode the specific H8 model they were compiled @@ -584,7 +584,7 @@ elf32_h8_mach (flagword flags) file. We use this opportunity to encode the BFD machine type into the flags field in the object file. */ -static bfd_boolean +static bool elf32_h8_final_write_processing (bfd *abfd) { unsigned long val; @@ -629,36 +629,36 @@ elf32_h8_final_write_processing (bfd *abfd) /* Return nonzero if ABFD represents a valid H8 ELF object file; also record the encoded machine type found in the ELF flags. */ -static bfd_boolean +static bool elf32_h8_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_h8300, elf32_h8_mach (elf_elfheader (abfd)->e_flags)); - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. The only data we need to copy at this time is the architecture/machine information. */ -static bfd_boolean +static bool elf32_h8_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) && bfd_get_mach (obfd) < bfd_get_mach (ibfd)) { if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd))) - return FALSE; + return false; } - return TRUE; + return true; } /* This function handles relaxing for the H8.. @@ -687,9 +687,9 @@ elf32_h8_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) mov.[bwl] @(displ:24/32+ERx) -> mov.[bwl] @(displ:16+ERx) 4 bytes. */ -static bfd_boolean +static bool elf32_h8_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -700,7 +700,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, static Elf_Internal_Rela *last_reloc = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -709,7 +709,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -934,7 +934,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, 4)) goto error_return; - *again = TRUE; + *again = true; break; } } @@ -959,7 +959,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } break; } @@ -1030,7 +1030,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } break; } @@ -1118,7 +1118,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } break; } @@ -1205,7 +1205,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; break; } } @@ -1344,7 +1344,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } break; /* case R_H8_DIR32A16 */ } @@ -1433,7 +1433,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } } @@ -1468,7 +1468,7 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -1477,12 +1477,12 @@ elf32_h8_relax_section (bfd *abfd, asection *sec, free (contents); if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) { Elf_Internal_Shdr *symtab_hdr; @@ -1548,12 +1548,12 @@ elf32_h8_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) sym_hash->root.u.def.value -= count; } - return TRUE; + return true; } /* Return TRUE if a symbol exists at the given address, else return FALSE. */ -static bfd_boolean +static bool elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr) { Elf_Internal_Shdr *symtab_hdr; @@ -1574,7 +1574,7 @@ elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr) { if (isym->st_shndx == sec_shndx && isym->st_value == addr) - return TRUE; + return true; } symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym) @@ -1588,10 +1588,10 @@ elf32_h8_symbol_address_p (bfd *abfd, asection *sec, bfd_vma addr) || sym_hash->root.type == bfd_link_hash_defweak) && sym_hash->root.u.def.section == sec && sym_hash->root.u.def.value == addr) - return TRUE; + return true; } - return FALSE; + return false; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -1602,7 +1602,7 @@ elf32_h8_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { Elf_Internal_Shdr *symtab_hdr; @@ -1635,7 +1635,7 @@ elf32_h8_get_relocated_section_contents (bfd *output_bfd, internal_relocs = (_bfd_elf_link_read_relocs (input_bfd, input_section, NULL, - (Elf_Internal_Rela *) NULL, FALSE)); + (Elf_Internal_Rela *) NULL, false)); if (internal_relocs == NULL) goto error_return; diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index c00dbeeb16..22a4625b84 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -433,7 +433,7 @@ elf32_hppa_link_hash_table_create (bfd *abfd) return NULL; } htab->etab.root.hash_table_free = elf32_hppa_link_hash_table_free; - htab->etab.dt_pltgot_required = TRUE; + htab->etab.dt_pltgot_required = true; htab->text_segment_base = (bfd_vma) -1; htab->data_segment_base = (bfd_vma) -1; @@ -524,7 +524,7 @@ hppa_get_stub_entry (const asection *input_section, return NULL; hsh_entry = hppa_stub_hash_lookup (&htab->bstab, - stub_name, FALSE, FALSE); + stub_name, false, false); if (hh != NULL) hh->hsh_cache = hsh_entry; @@ -575,7 +575,7 @@ hppa_add_stub (const char *stub_name, /* Enter this entry into the linker stub hash table. */ hsh = hppa_stub_hash_lookup (&htab->bstab, stub_name, - TRUE, FALSE); + true, false); if (hsh == NULL) { /* xgettext:c-format */ @@ -691,7 +691,7 @@ hppa_type_of_stub (asection *input_sec, #define LDW_R1_DLT LDW_R1_DP #endif -static bfd_boolean +static bool hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) { struct elf32_hppa_stub_hash_entry *hsh; @@ -712,7 +712,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; stub_sec = hsh->stub_sec; @@ -867,7 +867,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) (uint64_t) hsh->stub_offset, hsh->bh_root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } val = hppa_field_adjust (sym_value, (bfd_signed_vma) -8, e_fsel) >> 2; @@ -892,11 +892,11 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) default: BFD_FAIL (); - return FALSE; + return false; } stub_sec->size += size; - return TRUE; + return true; } #undef LDIL_R1 @@ -923,7 +923,7 @@ hppa_build_one_stub (struct bfd_hash_entry *bh, void *in_arg) /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool hppa_size_one_stub (struct bfd_hash_entry *bh, void *in_arg) { struct elf32_hppa_stub_hash_entry *hsh; @@ -949,13 +949,13 @@ hppa_size_one_stub (struct bfd_hash_entry *bh, void *in_arg) } hsh->stub_sec->size += size; - return TRUE; + return true; } /* Return nonzero if ABFD represents an HPPA ELF32 file. Additionally we set the default architecture and machine. */ -static bfd_boolean +static bool elf32_hppa_object_p (bfd *abfd) { Elf_Internal_Ehdr * i_ehdrp; @@ -968,7 +968,7 @@ elf32_hppa_object_p (bfd *abfd) but the kernel produces corefiles with OSABI=SysV. */ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU && i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ - return FALSE; + return false; } else if (strcmp (bfd_get_target (abfd), "elf32-hppa-netbsd") == 0) { @@ -976,12 +976,12 @@ elf32_hppa_object_p (bfd *abfd) but the kernel produces corefiles with OSABI=SysV. */ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NETBSD && i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ - return FALSE; + return false; } else { if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX) - return FALSE; + return false; } flags = i_ehdrp->e_flags; @@ -996,13 +996,13 @@ elf32_hppa_object_p (bfd *abfd) case EFA_PARISC_2_0 | EF_PARISC_WIDE: return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 25); } - return TRUE; + return true; } /* Create the .plt and .got sections, and set up our hash table short-cuts to various dynamic sections. */ -static bfd_boolean +static bool elf32_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf32_hppa_link_hash_table *htab; @@ -1011,13 +1011,13 @@ elf32_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* Don't try to create the .plt and .got twice. */ htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->etab.splt != NULL) - return TRUE; + return true; /* Call the generic code to do most of the work. */ if (! _bfd_elf_create_dynamic_sections (abfd, info)) - return FALSE; + return false; /* hppa-linux needs _GLOBAL_OFFSET_TABLE_ to be visible from the main application, because __canonicalize_funcptr_for_compare needs it. */ @@ -1094,7 +1094,7 @@ hppa32_elf_local_refcounts (bfd *abfd) table, and dynamic reloc sections. At this point we haven't necessarily read all the input files. */ -static bfd_boolean +static bool elf32_hppa_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1108,11 +1108,11 @@ elf32_hppa_check_relocs (bfd *abfd, asection *sreloc; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; eh_syms = elf_sym_hashes (abfd); sreloc = NULL; @@ -1242,7 +1242,7 @@ elf32_hppa_check_relocs (bfd *abfd, abfd, elf_hppa_howto_table[r_type].name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Fall through. */ @@ -1260,14 +1260,14 @@ elf32_hppa_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_PARISC_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, &hh->eh, rela->r_offset)) - return FALSE; + return false; continue; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_PARISC_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, &hh->eh, rela->r_addend)) - return FALSE; + return false; continue; case R_PARISC_TLS_GD21L: @@ -1316,7 +1316,7 @@ elf32_hppa_check_relocs (bfd *abfd, if (htab->etab.sgot == NULL) { if (!elf32_hppa_create_dynamic_sections (htab->etab.dynobj, info)) - return FALSE; + return false; } if (hh != NULL) @@ -1334,7 +1334,7 @@ elf32_hppa_check_relocs (bfd *abfd, /* This is a global offset table entry for a local symbol. */ local_got_refcounts = hppa32_elf_local_refcounts (abfd); if (local_got_refcounts == NULL) - return FALSE; + return false; if (tls_type == GOT_TLS_LDM) htab->tls_ldm_got.refcount += 1; else @@ -1374,7 +1374,7 @@ elf32_hppa_check_relocs (bfd *abfd, local_got_refcounts = hppa32_elf_local_refcounts (abfd); if (local_got_refcounts == NULL) - return FALSE; + return false; local_plt_refcounts = (local_got_refcounts + symtab_hdr->sh_info); local_plt_refcounts[r_symndx] += 1; @@ -1439,12 +1439,12 @@ elf32_hppa_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->etab.dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, htab->etab.dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -1466,7 +1466,7 @@ elf32_hppa_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; sr = bfd_section_from_elf_index (abfd, isym->st_shndx); if (sr == NULL) @@ -1481,7 +1481,7 @@ elf32_hppa_check_relocs (bfd *abfd, { hdh_p = bfd_alloc (htab->etab.dynobj, sizeof *hdh_p); if (hdh_p == NULL) - return FALSE; + return false; hdh_p->next = *hdh_head; *hdh_head = hdh_p; hdh_p->sec = sec; @@ -1500,7 +1500,7 @@ elf32_hppa_check_relocs (bfd *abfd, } } - return TRUE; + return true; } /* Return the section that should be marked against garbage collection @@ -1526,7 +1526,7 @@ elf32_hppa_gc_mark_hook (asection *sec, /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -1535,7 +1535,7 @@ elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 396: /* Linux/hppa */ /* pr_cursig */ @@ -1556,13 +1556,13 @@ elf32_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf32_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/hppa elf_prpsinfo. */ elf_tdata (abfd)->core->program @@ -1582,7 +1582,7 @@ elf32_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Our own version of hide_symbol, so that we can keep plt entries for @@ -1591,7 +1591,7 @@ elf32_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) static void elf32_hppa_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *eh, - bfd_boolean force_local) + bool force_local) { if (force_local) { @@ -1621,18 +1621,18 @@ elf32_hppa_hide_symbol (struct bfd_link_info *info, aliases, that apply to read-only sections. Cannot be used after size_dynamic_sections. */ -static bfd_boolean +static bool alias_readonly_dynrelocs (struct elf_link_hash_entry *eh) { struct elf32_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); do { if (_bfd_elf_readonly_dynrelocs (&hh->eh)) - return TRUE; + return true; hh = hppa_elf_hash_entry (hh->eh.u.alias); } while (hh != NULL && &hh->eh != eh); - return FALSE; + return false; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -1641,7 +1641,7 @@ alias_readonly_dynrelocs (struct elf_link_hash_entry *eh) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *eh) { @@ -1653,8 +1653,8 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, if (eh->type == STT_FUNC || eh->needs_plt) { - bfd_boolean local = (SYMBOL_CALLS_LOCAL (info, eh) - || UNDEFWEAK_NO_DYNAMIC_RELOC (info, eh)); + bool local = (SYMBOL_CALLS_LOCAL (info, eh) + || UNDEFWEAK_NO_DYNAMIC_RELOC (info, eh)); /* Discard dyn_relocs when non-pic if we've decided that a function symbol is local. */ if (!bfd_link_pic (info) && local) @@ -1688,14 +1688,14 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, be discarded. */ /* Function symbols can't have copy relocs. */ - return TRUE; + return true; } else eh->plt.offset = (bfd_vma) -1; htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* If this is a weak symbol, and there is a real definition, the processor independent code will have arranged for us to see the @@ -1709,7 +1709,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, if (def->root.u.def.section == htab->etab.sdynbss || def->root.u.def.section == htab->etab.sdynrelro) eh->dyn_relocs = NULL; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1720,22 +1720,22 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!eh->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) - return TRUE; + return true; /* If we don't find any dynamic relocs in read-only sections, then we'll be keeping the dynamic relocs and avoiding the copy reloc. */ if (ELIMINATE_COPY_RELOCS && !alias_readonly_dynrelocs (eh)) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -1772,7 +1772,7 @@ elf32_hppa_adjust_dynamic_symbol (struct bfd_link_info *info, /* If EH is undefined, make it dynamic if that makes sense. */ -static bfd_boolean +static bool ensure_undef_dynamic (struct bfd_link_info *info, struct elf_link_hash_entry *eh) { @@ -1787,13 +1787,13 @@ ensure_undef_dynamic (struct bfd_link_info *info, && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, eh) && ELF_ST_VISIBILITY (eh->other) == STV_DEFAULT) return bfd_elf_link_record_dynamic_symbol (info, eh); - return TRUE; + return true; } /* Allocate space in the .plt for entries that won't have relocations. ie. plabel entries. */ -static bfd_boolean +static bool allocate_plt_static (struct elf_link_hash_entry *eh, void *inf) { struct bfd_link_info *info; @@ -1802,19 +1802,19 @@ allocate_plt_static (struct elf_link_hash_entry *eh, void *inf) asection *sec; if (eh->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; hh = hppa_elf_hash_entry (eh); htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->etab.dynamic_sections_created && eh->plt.refcount > 0) { if (!ensure_undef_dynamic (info, eh)) - return FALSE; + return false; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), eh)) { @@ -1848,7 +1848,7 @@ allocate_plt_static (struct elf_link_hash_entry *eh, void *inf) eh->needs_plt = 0; } - return TRUE; + return true; } /* Calculate size of GOT entries for symbol given its TLS_TYPE. */ @@ -1874,7 +1874,7 @@ got_entries_needed (int tls_type) static inline unsigned int got_relocs_needed (int tls_type, unsigned int need, - bfd_boolean dtprel_known, bfd_boolean tprel_known) + bool dtprel_known, bool tprel_known) { /* All the entries we allocated need relocs. Except for GD and IE with local symbols. */ @@ -1888,7 +1888,7 @@ got_relocs_needed (int tls_type, unsigned int need, /* Allocate space in .plt, .got and associated reloc sections for global syms. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) { struct bfd_link_info *info; @@ -1898,12 +1898,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) struct elf_dyn_relocs *hdh_p; if (eh->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = inf; htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; hh = hppa_elf_hash_entry (eh); @@ -1927,7 +1927,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) unsigned int need; if (!ensure_undef_dynamic (info, eh)) - return FALSE; + return false; sec = htab->etab.sgot; eh->got.offset = sec->size; @@ -1940,7 +1940,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) && !SYMBOL_REFERENCES_LOCAL (info, eh))) && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, eh)) { - bfd_boolean local = SYMBOL_REFERENCES_LOCAL (info, eh); + bool local = SYMBOL_REFERENCES_LOCAL (info, eh); htab->etab.srelgot->size += got_relocs_needed (hh->tls_type, need, local, local && bfd_link_executable (info)); @@ -1960,7 +1960,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) eh->dyn_relocs = NULL; if (eh->dyn_relocs == NULL) - return TRUE; + return true; /* If this is a -Bsymbolic shared link, then we need to discard all space allocated for dynamic pc-relative relocs against symbols @@ -1989,7 +1989,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) if (eh->dyn_relocs != NULL) { if (!ensure_undef_dynamic (info, eh)) - return FALSE; + return false; } } else if (ELIMINATE_COPY_RELOCS) @@ -2003,7 +2003,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) && !ELF_COMMON_DEF_P (eh)) { if (!ensure_undef_dynamic (info, eh)) - return FALSE; + return false; if (eh->dynindx == -1) eh->dyn_relocs = NULL; @@ -2019,7 +2019,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) sreloc->size += hdh_p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* This function is called via elf_link_hash_traverse to force @@ -2029,21 +2029,21 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) for all dynamic symbols. Arguably, this is a bug in elf_adjust_dynamic_symbol. */ -static bfd_boolean +static bool clobber_millicode_symbols (struct elf_link_hash_entry *eh, struct bfd_link_info *info) { if (eh->type == STT_PARISC_MILLI && !eh->forced_local) { - elf32_hppa_hide_symbol (info, eh, TRUE); + elf32_hppa_hide_symbol (info, eh, true); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2051,11 +2051,11 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, bfd *dynobj; bfd *ibfd; asection *sec; - bfd_boolean relocs; + bool relocs; htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->etab.dynobj; if (dynobj == NULL) @@ -2145,7 +2145,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, || (bfd_link_pic (info) && (*local_tls_type & GOT_NORMAL) != 0)) htab->etab.srelgot->size - += got_relocs_needed (*local_tls_type, need, TRUE, + += got_relocs_needed (*local_tls_type, need, true, bfd_link_executable (info)); } else @@ -2204,7 +2204,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (sec = dynobj->sections; sec != NULL; sec = sec->next) { if ((sec->flags & SEC_LINKER_CREATED) == 0) @@ -2239,7 +2239,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Remember whether there are any reloc sections other than .rela.plt. */ if (sec != htab->etab.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -2274,7 +2274,7 @@ elf32_hppa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, we may not fill in all the reloc sections. */ sec->contents = bfd_zalloc (dynobj, sec->size); if (sec->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -2395,7 +2395,7 @@ elf32_hppa_next_input_section (struct bfd_link_info *info, asection *isec) static void group_sections (struct elf32_hppa_link_hash_table *htab, bfd_size_type stub_group_size, - bfd_boolean stubs_always_before_branch) + bool stubs_always_before_branch) { asection **list = htab->input_list + htab->top_index; do @@ -2408,7 +2408,7 @@ group_sections (struct elf32_hppa_link_hash_table *htab, asection *curr; asection *prev; bfd_size_type total; - bfd_boolean big_sec; + bool big_sec; curr = tail; total = tail->size; @@ -2563,7 +2563,7 @@ get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info) stub_name = hh_name (hh); hsh = hppa_stub_hash_lookup (&htab->bstab, stub_name, - FALSE, FALSE); + false, false); if (hsh == NULL) { hsh = hppa_add_stub (stub_name, sec, htab); @@ -2596,20 +2596,20 @@ get_local_syms (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info) PC-relative calls to a target that is unreachable with a "bl" instruction. */ -bfd_boolean +bool elf32_hppa_size_stubs (bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info, - bfd_boolean multi_subspace, bfd_signed_vma group_size, + bool multi_subspace, bfd_signed_vma group_size, asection * (*add_stub_section) (const char *, asection *), void (*layout_sections_again) (void)) { bfd_size_type stub_group_size; - bfd_boolean stubs_always_before_branch; - bfd_boolean stub_changed; + bool stubs_always_before_branch; + bool stub_changed; struct elf32_hppa_link_hash_table *htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Stash our params away. */ htab->stub_bfd = stub_bfd; @@ -2649,14 +2649,14 @@ elf32_hppa_size_stubs default: if (htab->all_local_syms) goto error_ret_free_local; - return FALSE; + return false; case 0: - stub_changed = FALSE; + stub_changed = false; break; case 1: - stub_changed = TRUE; + stub_changed = true; break; } @@ -2827,7 +2827,7 @@ elf32_hppa_size_stubs hsh = hppa_stub_hash_lookup (&htab->bstab, stub_name, - FALSE, FALSE); + false, false); if (hsh != NULL) { /* The proper stub has already been created. */ @@ -2853,7 +2853,7 @@ elf32_hppa_size_stubs hsh->stub_type = hppa_stub_long_branch_shared; } hsh->hh = hh; - stub_changed = TRUE; + stub_changed = true; } /* We're done with the internal relocs, free them. */ @@ -2877,28 +2877,28 @@ elf32_hppa_size_stubs /* Ask the linker to do its stuff. */ (*htab->layout_sections_again) (); - stub_changed = FALSE; + stub_changed = false; } free (htab->all_local_syms); - return TRUE; + return true; error_ret_free_local: free (htab->all_local_syms); - return FALSE; + return false; } /* For a final link, this function is called after we have sized the stubs to provide a value for __gp. */ -bfd_boolean +bool elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info) { struct bfd_link_hash_entry *h; asection *sec = NULL; bfd_vma gp_val = 0; - h = bfd_link_hash_lookup (info->hash, "$global$", FALSE, FALSE, FALSE); + h = bfd_link_hash_lookup (info->hash, "$global$", false, false, false); if (h != NULL && (h->type == bfd_link_hash_defined @@ -2968,7 +2968,7 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info) elf_gp (abfd) = gp_val; } - return TRUE; + return true; } /* Build all the stubs associated with the current output file. The @@ -2977,7 +2977,7 @@ elf32_hppa_set_gp (bfd *abfd, struct bfd_link_info *info) functions here. This function is called via hppaelf_finish in the linker. */ -bfd_boolean +bool elf32_hppa_build_stubs (struct bfd_link_info *info) { asection *stub_sec; @@ -2986,7 +2986,7 @@ elf32_hppa_build_stubs (struct bfd_link_info *info) htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; for (stub_sec = htab->stub_bfd->sections; stub_sec != NULL; @@ -2997,7 +2997,7 @@ elf32_hppa_build_stubs (struct bfd_link_info *info) /* Allocate memory to hold the linker stubs. */ stub_sec->contents = bfd_zalloc (htab->stub_bfd, stub_sec->size); if (stub_sec->contents == NULL) - return FALSE; + return false; stub_sec->size = 0; } @@ -3005,7 +3005,7 @@ elf32_hppa_build_stubs (struct bfd_link_info *info) table = &htab->bstab; bfd_hash_traverse (table, hppa_build_one_stub, info); - return TRUE; + return true; } /* Return the base vma address which should be subtracted from the real @@ -3039,26 +3039,26 @@ tpoff (struct bfd_link_info *info, bfd_vma address) /* Perform a final link. */ -static bfd_boolean +static bool elf32_hppa_final_link (bfd *abfd, struct bfd_link_info *info) { struct stat buf; /* Invoke the regular ELF linker to do all the work. */ if (!bfd_elf_final_link (abfd, info)) - return FALSE; + return false; /* If we're producing a final executable, sort the contents of the unwind section. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; /* Do not attempt to sort non-regular files. This is here especially for configure scripts and kernel builds which run tests with "ld [...] -o /dev/null". */ if (stat (bfd_get_filename (abfd), &buf) != 0 || !S_ISREG(buf.st_mode)) - return TRUE; + return true; return elf_hppa_sort_unwind (abfd); } @@ -3463,7 +3463,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; local_got_offsets = elf_local_got_offsets (input_bfd); @@ -3480,14 +3480,14 @@ elf32_hppa_relocate_section (bfd *output_bfd, bfd_vma relocation; bfd_reloc_status_type rstatus; const char *sym_name; - bfd_boolean plabel; - bfd_boolean warned_undef; + bool plabel; + bool warned_undef; r_type = ELF32_R_TYPE (rela->r_info); if (r_type >= (unsigned int) R_PARISC_UNIMPLEMENTED) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (r_type == (unsigned int) R_PARISC_GNU_VTENTRY || r_type == (unsigned int) R_PARISC_GNU_VTINHERIT) @@ -3497,7 +3497,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, hh = NULL; sym = NULL; sym_sec = NULL; - warned_undef = FALSE; + warned_undef = false; if (r_symndx < symtab_hdr->sh_info) { /* This is a local symbol, h defaults to NULL. */ @@ -3508,7 +3508,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, else { struct elf_link_hash_entry *eh; - bfd_boolean unresolved_reloc, ignored; + bool unresolved_reloc, ignored; struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rela, @@ -3529,8 +3529,8 @@ elf32_hppa_relocate_section (bfd *output_bfd, { (*info->callbacks->undefined_symbol) (info, eh_name (eh), input_bfd, - input_section, rela->r_offset, FALSE); - warned_undef = TRUE; + input_section, rela->r_offset, false); + warned_undef = true; } } hh = hppa_elf_hash_entry (eh); @@ -3556,14 +3556,14 @@ elf32_hppa_relocate_section (bfd *output_bfd, case R_PARISC_DLTIND21L: { bfd_vma off; - bfd_boolean do_got = FALSE; - bfd_boolean reloc = bfd_link_pic (info); + bool do_got = false; + bool reloc = bfd_link_pic (info); /* Relocation is to the entry for this symbol in the global offset table. */ if (hh != NULL) { - bfd_boolean dyn; + bool dyn; off = hh->eh.got.offset; dyn = htab->etab.dynamic_sections_created; @@ -3587,7 +3587,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, else { hh->eh.got.offset |= 1; - do_got = TRUE; + do_got = true; } } } @@ -3607,7 +3607,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, else { local_got_offsets[r_symndx] |= 1; - do_got = TRUE; + do_got = true; } } @@ -3659,7 +3659,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, if (htab->etab.dynamic_sections_created) { bfd_vma off; - bfd_boolean do_plt = 0; + bool do_plt = 0; /* If we have a global symbol with a PLT slot, then redirect this relocation to it. */ if (hh != NULL) @@ -3776,7 +3776,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, && hh->eh.dyn_relocs != NULL)) { Elf_Internal_Rela outrel; - bfd_boolean skip; + bool skip; asection *sreloc; bfd_byte *loc; @@ -3932,7 +3932,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, off &= ~1; else { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; Elf_Internal_Rela outrel; bfd_byte *loc = NULL; int cur_off = off; @@ -3946,7 +3946,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, && (hh == NULL || !UNDEFWEAK_NO_DYNAMIC_RELOC (info, &hh->eh)))) { - need_relocs = TRUE; + need_relocs = true; loc = htab->etab.srelgot->contents; loc += (htab->etab.srelgot->reloc_count * sizeof (Elf32_External_Rela)); @@ -4039,13 +4039,13 @@ elf32_hppa_relocate_section (bfd *output_bfd, = bfd_sym_from_r_symndx (&htab->etab.sym_cache, input_bfd, r_symndx); if (isym == NULL) - return FALSE; + return false; sym_name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, isym->st_name); if (sym_name == NULL) - return FALSE; + return false; if (*sym_name == '\0') sym_name = bfd_section_name (sym_sec); _bfd_error_handler @@ -4053,7 +4053,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, input_bfd, sym_name); } bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if ((tls_type & GOT_TLS_GD) @@ -4095,7 +4095,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (sym_name == NULL) - return FALSE; + return false; if (*sym_name == '\0') sym_name = bfd_section_name (sym_sec); } @@ -4115,7 +4115,7 @@ elf32_hppa_relocate_section (bfd *output_bfd, howto->name, sym_name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } else @@ -4124,13 +4124,13 @@ elf32_hppa_relocate_section (bfd *output_bfd, (bfd_vma) 0, input_bfd, input_section, rela->r_offset); } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *eh, @@ -4142,7 +4142,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (eh->plt.offset != (bfd_vma) -1) { @@ -4201,8 +4201,8 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, && (hppa_elf_hash_entry (eh)->tls_type & GOT_NORMAL) != 0 && !UNDEFWEAK_NO_DYNAMIC_RELOC (info, eh)) { - bfd_boolean is_dyn = (eh->dynindx != -1 - && !SYMBOL_REFERENCES_LOCAL (info, eh)); + bool is_dyn = (eh->dynindx != -1 + && !SYMBOL_REFERENCES_LOCAL (info, eh)); if (is_dyn || bfd_link_pic (info)) { @@ -4273,7 +4273,7 @@ elf32_hppa_finish_dynamic_symbol (bfd *output_bfd, sym->st_shndx = SHN_ABS; } - return TRUE; + return true; } /* Used to decide how to sort relocs in an optimal manner for the @@ -4311,7 +4311,7 @@ elf32_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf32_hppa_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -4322,7 +4322,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd, htab = hppa_link_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->etab.dynobj; @@ -4330,7 +4330,7 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd, /* A broken linker script might have discarded the dynamic sections. Catch this here so that we do not seg-fault later on. */ if (sgot != NULL && bfd_is_abs_section (sgot->output_section)) - return FALSE; + return false; sdyn = bfd_get_linker_section (dynobj, ".dynamic"); @@ -4413,12 +4413,12 @@ elf32_hppa_finish_dynamic_sections (bfd *output_bfd, { _bfd_error_handler (_(".got section not immediately after .plt section")); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Called when writing out an object file to decide the type of a diff --git a/bfd/elf32-hppa.h b/bfd/elf32-hppa.h index 091a456492..79327e845e 100644 --- a/bfd/elf32-hppa.h +++ b/bfd/elf32-hppa.h @@ -49,14 +49,14 @@ int elf32_hppa_setup_section_lists void elf32_hppa_next_input_section (struct bfd_link_info *, asection *); -bfd_boolean elf32_hppa_size_stubs - (bfd *, bfd *, struct bfd_link_info *, bfd_boolean, bfd_signed_vma, +bool elf32_hppa_size_stubs + (bfd *, bfd *, struct bfd_link_info *, bool, bfd_signed_vma, asection * (*) (const char *, asection *), void (*) (void)); -bfd_boolean elf32_hppa_set_gp +bool elf32_hppa_set_gp (bfd *, struct bfd_link_info *); -bfd_boolean elf32_hppa_build_stubs +bool elf32_hppa_build_stubs (struct bfd_link_info *); elf_hppa_reloc_type elf32_hppa_reloc_final_type diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c index ccbf2d6d0e..377e76d0f3 100644 --- a/bfd/elf32-i386.c +++ b/bfd/elf32-i386.c @@ -30,39 +30,39 @@ static reloc_howto_type elf_howto_table[]= { - HOWTO(R_386_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, + HOWTO(R_386_NONE, 0, 3, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_386_NONE", - TRUE, 0x00000000, 0x00000000, FALSE), - HOWTO(R_386_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0x00000000, 0x00000000, false), + HOWTO(R_386_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_PC32, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_PC32", - TRUE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(R_386_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, true), + HOWTO(R_386_GOT32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_GOT32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_PLT32, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_PLT32", - TRUE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(R_386_COPY, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, true), + HOWTO(R_386_COPY, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_COPY", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_GLOB_DAT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_GLOB_DAT, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_GLOB_DAT", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_JUMP_SLOT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_JUMP_SLOT, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_JUMP_SLOT", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_RELATIVE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_RELATIVE, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_RELATIVE", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_GOTOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_GOTOFF, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_GOTOFF", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_GOTPC, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_GOTPC, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_GOTPC", - TRUE, 0xffffffff, 0xffffffff, TRUE), + true, 0xffffffff, 0xffffffff, true), /* We have a gap in the reloc numbers here. R_386_standard counts the number up to this point, and @@ -72,76 +72,76 @@ static reloc_howto_type elf_howto_table[]= #define R_386_ext_offset (R_386_TLS_TPOFF - R_386_standard) /* These relocs are a GNU extension. */ - HOWTO(R_386_TLS_TPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + HOWTO(R_386_TLS_TPOFF, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_TPOFF", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_IE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_IE, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_IE", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_GOTIE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_GOTIE, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_GOTIE", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_LE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_LE, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_LE", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_GD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_GD, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_GD", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_LDM, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_LDM, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_LDM", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_16, 0, 1, 16, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_16", - TRUE, 0xffff, 0xffff, FALSE), - HOWTO(R_386_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield, + true, 0xffff, 0xffff, false), + HOWTO(R_386_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_PC16", - TRUE, 0xffff, 0xffff, TRUE), - HOWTO(R_386_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, + true, 0xffff, 0xffff, true), + HOWTO(R_386_8, 0, 0, 8, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_8", - TRUE, 0xff, 0xff, FALSE), - HOWTO(R_386_PC8, 0, 0, 8, TRUE, 0, complain_overflow_signed, + true, 0xff, 0xff, false), + HOWTO(R_386_PC8, 0, 0, 8, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_386_PC8", - TRUE, 0xff, 0xff, TRUE), + true, 0xff, 0xff, true), #define R_386_ext (R_386_PC8 + 1 - R_386_ext_offset) #define R_386_tls_offset (R_386_TLS_LDO_32 - R_386_ext) /* These are common with Solaris TLS implementation. */ - HOWTO(R_386_TLS_LDO_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + HOWTO(R_386_TLS_LDO_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_LDO_32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_IE_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_IE_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_IE_32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_LE_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_LE_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_LE_32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_DTPMOD32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_DTPMOD32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_DTPMOD32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_DTPOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_DTPOFF32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_TPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_TPOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_TPOFF32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_SIZE32, 0, 2, 32, FALSE, 0, complain_overflow_unsigned, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_SIZE32, 0, 2, 32, false, 0, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_386_SIZE32", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_GOTDESC, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_GOTDESC, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_GOTDESC", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_TLS_DESC_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_TLS_DESC_CALL, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_386_TLS_DESC_CALL", - FALSE, 0, 0, FALSE), - HOWTO(R_386_TLS_DESC, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + false, 0, 0, false), + HOWTO(R_386_TLS_DESC, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_TLS_DESC", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_IRELATIVE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_IRELATIVE, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_IRELATIVE", - TRUE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(R_386_GOT32X, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + true, 0xffffffff, 0xffffffff, false), + HOWTO(R_386_GOT32X, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_386_GOT32X", - TRUE, 0xffffffff, 0xffffffff, FALSE), + true, 0xffffffff, 0xffffffff, false), /* Another gap. */ #define R_386_ext2 (R_386_GOT32X + 1 - R_386_tls_offset) @@ -152,30 +152,30 @@ static reloc_howto_type elf_howto_table[]= 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_386_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_386_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_386_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ #define R_386_vt (R_386_GNU_VTENTRY + 1 - R_386_vt_offset) @@ -387,7 +387,7 @@ elf_i386_rtype_to_howto (unsigned r_type) return &elf_howto_table[indx]; } -static bfd_boolean +static bool elf_i386_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -400,10 +400,10 @@ elf_i386_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Return whether a symbol name implies a local label. The UnixWare @@ -412,18 +412,18 @@ elf_i386_info_to_howto_rel (bfd *abfd, If so, we should move the .X recognition into _bfd_elf_is_local_label_name. */ -static bfd_boolean +static bool elf_i386_is_local_label_name (bfd *abfd, const char *name) { if (name[0] == '.' && name[1] == 'X') - return TRUE; + return true; return _bfd_elf_is_local_label_name (abfd, name); } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -434,7 +434,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) int pr_version = bfd_get_32 (abfd, note->descdata); if (pr_version != 1) - return FALSE; + return false; /* pr_cursig */ elf_tdata (abfd)->core->signal = bfd_get_32 (abfd, note->descdata + 20); @@ -451,7 +451,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 144: /* Linux/i386 */ /* pr_cursig */ @@ -473,7 +473,7 @@ elf_i386_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->namesz == 8 && strcmp (note->namedata, "FreeBSD") == 0) @@ -481,7 +481,7 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) int pr_version = bfd_get_32 (abfd, note->descdata); if (pr_version != 1) - return FALSE; + return false; elf_tdata (abfd)->core->program = _bfd_elfcore_strndup (abfd, note->descdata + 8, 17); @@ -493,7 +493,7 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/i386 elf_prpsinfo. */ elf_tdata (abfd)->core->pid @@ -516,7 +516,7 @@ elf_i386_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Functions for the i386 ELF linker. @@ -845,7 +845,7 @@ static const struct elf_x86_non_lazy_plt_layout elf_i386_non_lazy_ibt_plt = /* Return TRUE if the TLS access code sequence support transition from R_TYPE. */ -static bfd_boolean +static bool elf_i386_check_tls_transition (asection *sec, bfd_byte *contents, Elf_Internal_Shdr *symtab_hdr, @@ -859,7 +859,7 @@ elf_i386_check_tls_transition (asection *sec, struct elf_link_hash_entry *h; bfd_vma offset; bfd_byte *call; - bfd_boolean indirect_call; + bool indirect_call; offset = rel->r_offset; switch (r_type) @@ -867,9 +867,9 @@ elf_i386_check_tls_transition (asection *sec, case R_386_TLS_GD: case R_386_TLS_LDM: if (offset < 2 || (rel + 1) >= relend) - return FALSE; + return false; - indirect_call = FALSE; + indirect_call = false; call = contents + offset + 4; val = *(call - 5); type = *(call - 6); @@ -890,19 +890,19 @@ elf_i386_check_tls_transition (asection *sec, can transit to different access model. */ if ((offset + 10) > sec->size || (type != 0x8d && type != 0x04)) - return FALSE; + return false; if (type == 0x04) { /* leal foo@tlsgd(,%ebx,1), %eax call ___tls_get_addr@PLT */ if (offset < 3) - return FALSE; + return false; if (*(call - 7) != 0x8d || val != 0x1d || call[0] != 0xe8) - return FALSE; + return false; } else { @@ -920,7 +920,7 @@ elf_i386_check_tls_transition (asection *sec, is used to pass parameter to ___tls_get_addr. */ reg = val & 7; if ((val & 0xf8) != 0x80 || reg == 4 || reg == 0) - return FALSE; + return false; indirect_call = call[0] == 0xff; if (!(reg == 3 && call[0] == 0xe8 && call[5] == 0x90) @@ -928,7 +928,7 @@ elf_i386_check_tls_transition (asection *sec, && !(indirect_call && (call[1] & 0xf8) == 0x90 && (call[1] & 0x7) == reg)) - return FALSE; + return false; } } else @@ -943,13 +943,13 @@ elf_i386_check_tls_transition (asection *sec, addr32 call ___tls_get_addr can transit to different access model. */ if (type != 0x8d || (offset + 9) > sec->size) - return FALSE; + return false; /* %eax can't be used as the GOT base register since it is used to pass parameter to ___tls_get_addr. */ reg = val & 7; if ((val & 0xf8) != 0x80 || reg == 4 || reg == 0) - return FALSE; + return false; indirect_call = call[0] == 0xff; if (!(reg == 3 && call[0] == 0xe8) @@ -957,17 +957,17 @@ elf_i386_check_tls_transition (asection *sec, && !(indirect_call && (call[1] & 0xf8) == 0x90 && (call[1] & 0x7) == reg)) - return FALSE; + return false; } r_symndx = ELF32_R_SYM (rel[1].r_info); if (r_symndx < symtab_hdr->sh_info) - return FALSE; + return false; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; if (h == NULL || !((struct elf_x86_link_hash_entry *) h)->tls_get_addr) - return FALSE; + return false; else if (indirect_call) return (ELF32_R_TYPE (rel[1].r_info) == R_386_GOT32X); else @@ -982,15 +982,15 @@ elf_i386_check_tls_transition (asection *sec, */ if (offset < 1 || (offset + 4) > sec->size) - return FALSE; + return false; /* Check "movl foo@tpoff(%rip), %eax" first. */ val = bfd_get_8 (abfd, contents + offset - 1); if (val == 0xa1) - return TRUE; + return true; if (offset < 2) - return FALSE; + return false; /* Check movl|addl foo@tpoff(%rip), %reg. */ type = bfd_get_8 (abfd, contents + offset - 2); @@ -1006,11 +1006,11 @@ elf_i386_check_tls_transition (asection *sec, */ if (offset < 2 || (offset + 4) > sec->size) - return FALSE; + return false; val = bfd_get_8 (abfd, contents + offset - 1); if ((val & 0xc0) != 0x80 || (val & 7) == 4) - return FALSE; + return false; type = bfd_get_8 (abfd, contents + offset - 2); return type == 0x8b || type == 0x2b || type == 0x03; @@ -1024,10 +1024,10 @@ elf_i386_check_tls_transition (asection *sec, going to be eax. */ if (offset < 2 || (offset + 4) > sec->size) - return FALSE; + return false; if (bfd_get_8 (abfd, contents + offset - 2) != 0x8d) - return FALSE; + return false; val = bfd_get_8 (abfd, contents + offset - 1); return (val & 0xc7) == 0x83; @@ -1043,7 +1043,7 @@ elf_i386_check_tls_transition (asection *sec, return call[0] == 0xff && call[1] == 0x10; } - return FALSE; + return false; default: abort (); @@ -1053,7 +1053,7 @@ elf_i386_check_tls_transition (asection *sec, /* Return TRUE if the TLS access transition is OK or no transition will be performed. Update R_TYPE if there is a transition. */ -static bfd_boolean +static bool elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, asection *sec, bfd_byte *contents, Elf_Internal_Shdr *symtab_hdr, @@ -1063,17 +1063,17 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, const Elf_Internal_Rela *relend, struct elf_link_hash_entry *h, unsigned long r_symndx, - bfd_boolean from_relocate_section) + bool from_relocate_section) { unsigned int from_type = *r_type; unsigned int to_type = from_type; - bfd_boolean check = TRUE; + bool check = true; /* Skip TLS transition for functions. */ if (h != NULL && (h->type == STT_FUNC || h->type == STT_GNU_IFUNC)) - return TRUE; + return true; switch (from_type) { @@ -1126,12 +1126,12 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, break; default: - return TRUE; + return true; } /* Return TRUE if there is no transition. */ if (from_type == to_type) - return TRUE; + return true; /* Check if the transition can be performed. */ if (check @@ -1171,11 +1171,11 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, abfd, from->name, to->name, name, (uint64_t) rel->r_offset, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } *r_type = to_type; - return TRUE; + return true; } /* With the local symbol, foo, we convert @@ -1198,39 +1198,39 @@ elf_i386_tls_transition (struct bfd_link_info *info, bfd *abfd, instructions. */ static -bfd_boolean +bool elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, bfd_byte *contents, unsigned int *r_type_p, Elf_Internal_Rela *irel, struct elf_link_hash_entry *h, - bfd_boolean *converted, + bool *converted, struct bfd_link_info *link_info) { struct elf_x86_link_hash_table *htab; unsigned int opcode; unsigned int modrm; - bfd_boolean baseless; + bool baseless; Elf_Internal_Sym *isym; unsigned int addend; unsigned int nop; bfd_vma nop_offset; - bfd_boolean is_pic; - bfd_boolean to_reloc_32; - bfd_boolean abs_symbol; + bool is_pic; + bool to_reloc_32; + bool abs_symbol; unsigned int r_type; unsigned int r_symndx; bfd_vma roff = irel->r_offset; - bfd_boolean local_ref; + bool local_ref; struct elf_x86_link_hash_entry *eh; if (roff < 2) - return TRUE; + return true; /* Addend for R_386_GOT32X relocations must be 0. */ addend = bfd_get_32 (abfd, contents + roff); if (addend != 0) - return TRUE; + return true; htab = elf_x86_hash_table (link_info, I386_ELF_DATA); is_pic = bfd_link_pic (link_info); @@ -1250,7 +1250,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, } else { - local_ref = TRUE; + local_ref = true; isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); abs_symbol = isym->st_shndx == SHN_ABS; @@ -1272,7 +1272,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, (_("%pB: direct GOT relocation R_386_GOT32X against `%s' without base" " register can not be used when making a shared object"), abfd, name); - return FALSE; + return false; } opcode = bfd_get_8 (abfd, contents + roff - 2); @@ -1307,14 +1307,14 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, { /* No direct branch to 0 for PIC. */ if (is_pic) - return TRUE; + return true; else goto convert_branch; } else { /* We can convert load of address 0 to R_386_32. */ - to_reloc_32 = TRUE; + to_reloc_32 = true; goto convert_load; } } @@ -1369,7 +1369,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, bfd_put_32 (abfd, -4, contents + irel->r_offset); irel->r_info = ELF32_R_INFO (r_symndx, R_386_PC32); *r_type_p = R_386_PC32; - *converted = TRUE; + *converted = true; } } else @@ -1381,7 +1381,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, Avoid optimizing _DYNAMIC since ld.so may use its link-time address. */ if (h == htab->elf.hdynamic) - return TRUE; + return true; /* def_regular is set by an assignment in a linker script in bfd_elf_record_link_assignment. start_stop is set on @@ -1397,7 +1397,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, if (opcode == 0x8b) { if (abs_symbol && local_ref) - to_reloc_32 = TRUE; + to_reloc_32 = true; if (to_reloc_32) { @@ -1420,7 +1420,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, { /* Only R_386_32 is supported. */ if (!to_reloc_32) - return TRUE; + return true; if (opcode == 0x85) { @@ -1445,11 +1445,11 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, bfd_put_8 (abfd, opcode, contents + roff - 2); irel->r_info = ELF32_R_INFO (r_symndx, r_type); *r_type_p = r_type; - *converted = TRUE; + *converted = true; } } - return TRUE; + return true; } /* Rename some of the generic section flags to better document how they @@ -1460,7 +1460,7 @@ elf_i386_convert_load_reloc (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, calculate needed space in the global offset table, procedure linkage table, and dynamic reloc sections. */ -static bfd_boolean +static bool elf_i386_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1473,16 +1473,16 @@ elf_i386_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel_end; asection *sreloc; bfd_byte *contents; - bfd_boolean converted; + bool converted; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = elf_x86_hash_table (info, I386_ELF_DATA); if (htab == NULL) { sec->check_relocs_failed = 1; - return FALSE; + return false; } BFD_ASSERT (is_x86_elf (abfd, htab)); @@ -1493,13 +1493,13 @@ elf_i386_check_relocs (bfd *abfd, else if (!bfd_malloc_and_get_section (abfd, sec, &contents)) { sec->check_relocs_failed = 1; - return FALSE; + return false; } symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); - converted = FALSE; + converted = false; sreloc = NULL; @@ -1512,8 +1512,8 @@ elf_i386_check_relocs (bfd *abfd, struct elf_x86_link_hash_entry *eh; Elf_Internal_Sym *isym; const char *name; - bfd_boolean size_reloc; - bfd_boolean no_dynreloc; + bool size_reloc; + bool no_dynreloc; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); @@ -1537,7 +1537,7 @@ elf_i386_check_relocs (bfd *abfd, /* Check relocation against local STT_GNU_IFUNC symbol. */ if (ELF32_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { - h = _bfd_elf_x86_get_local_sym_hash (htab, abfd, rel, TRUE); + h = _bfd_elf_x86_get_local_sym_hash (htab, abfd, rel, true); if (h == NULL) goto error_return; @@ -1584,17 +1584,17 @@ elf_i386_check_relocs (bfd *abfd, if (!_bfd_elf_x86_valid_reloc_p (sec, info, htab, rel, h, isym, symtab_hdr, &no_dynreloc)) - return FALSE; + return false; if (! elf_i386_tls_transition (info, abfd, sec, contents, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, - rel, rel_end, h, r_symndx, FALSE)) + rel, rel_end, h, r_symndx, false)) goto error_return; /* Check if _GLOBAL_OFFSET_TABLE_ is referenced. */ if (h == htab->elf.hgot) - htab->got_referenced = TRUE; + htab->got_referenced = true; switch (r_type) { @@ -1621,7 +1621,7 @@ elf_i386_check_relocs (bfd *abfd, break; case R_386_SIZE32: - size_reloc = TRUE; + size_reloc = true; goto do_size; case R_386_TLS_IE_32: @@ -1749,7 +1749,7 @@ elf_i386_check_relocs (bfd *abfd, if (r_type == R_386_GOTOFF && h->root.type == bfd_link_hash_undefweak && bfd_link_executable (info)) - htab->got_referenced = TRUE; + htab->got_referenced = true; } break; } @@ -1776,7 +1776,7 @@ elf_i386_check_relocs (bfd *abfd, && (bfd_link_executable (info) || h->type == STT_GNU_IFUNC)) { - bfd_boolean func_pointer_ref = FALSE; + bool func_pointer_ref = false; if (r_type == R_386_PC32) { @@ -1802,7 +1802,7 @@ elf_i386_check_relocs (bfd *abfd, /* R_386_32 can be resolved at run-time. */ if (r_type == R_386_32 && (sec->flags & SEC_READONLY) == 0) - func_pointer_ref = TRUE; + func_pointer_ref = true; } if (!func_pointer_ref) @@ -1824,10 +1824,10 @@ elf_i386_check_relocs (bfd *abfd, } } - size_reloc = FALSE; + size_reloc = false; do_size: if (!no_dynreloc - && NEED_DYNAMIC_RELOCATION_P (info, FALSE, h, sec, r_type, + && NEED_DYNAMIC_RELOCATION_P (info, false, h, sec, r_type, R_386_32)) { struct elf_dyn_relocs *p; @@ -1839,7 +1839,7 @@ elf_i386_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ FALSE); + (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ false); if (sreloc == NULL) goto error_return; @@ -1929,19 +1929,19 @@ elf_i386_check_relocs (bfd *abfd, if (elf_section_data (sec)->relocs != relocs && converted) elf_section_data (sec)->relocs = (Elf_Internal_Rela *) relocs; - return TRUE; + return true; error_return: if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); sec->check_relocs_failed = 1; - return FALSE; + return false; } /* Set the correct type for an x86 ELF section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool elf_i386_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) @@ -1969,7 +1969,7 @@ elf_i386_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, if (strcmp (name, ".reloc") == 0) hdr->sh_type = SHT_PROGBITS; - return TRUE; + return true; } /* Return the relocation value for @tpoff relocation @@ -2011,21 +2011,21 @@ elf_i386_relocate_section (bfd *output_bfd, Elf_Internal_Rela *rel; Elf_Internal_Rela *wrel; Elf_Internal_Rela *relend; - bfd_boolean is_vxworks_tls; + bool is_vxworks_tls; unsigned plt_entry_size; /* Skip if check_relocs failed. */ if (input_section->check_relocs_failed) - return FALSE; + return false; htab = elf_x86_hash_table (info, I386_ELF_DATA); if (htab == NULL) - return FALSE; + return false; if (!is_x86_elf (input_bfd, htab)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } symtab_hdr = &elf_symtab_hdr (input_bfd); @@ -2056,14 +2056,14 @@ elf_i386_relocate_section (bfd *output_bfd, asection *sec; bfd_vma off, offplt, plt_offset; bfd_vma relocation; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_reloc_status_type r; unsigned int indx; int tls_type; bfd_vma st_size; asection *resolved_plt; - bfd_boolean resolved_to_zero; - bfd_boolean relative_reloc; + bool resolved_to_zero; + bool relative_reloc; r_type = ELF32_R_TYPE (rel->r_info); if (r_type == R_386_GNU_VTINHERIT @@ -2082,7 +2082,7 @@ elf_i386_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -2166,7 +2166,7 @@ elf_i386_relocate_section (bfd *output_bfd, { /* Relocate against local STT_GNU_IFUNC symbol. */ h = _bfd_elf_x86_get_local_sym_hash (htab, input_bfd, rel, - FALSE); + false); if (h == NULL) abort (); @@ -2177,8 +2177,8 @@ elf_i386_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2374,7 +2374,7 @@ elf_i386_relocate_section (bfd *output_bfd, "symbol `%s' isn't supported"), input_bfd, howto->name, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; case R_386_32: /* Generate dynamic relcoation only when there is a @@ -2468,7 +2468,7 @@ elf_i386_relocate_section (bfd *output_bfd, if (htab->elf.sgot == NULL) abort (); - relative_reloc = FALSE; + relative_reloc = false; if (h != NULL) { off = h->got.offset; @@ -2495,12 +2495,12 @@ elf_i386_relocate_section (bfd *output_bfd, /* PR ld/21402: If this symbol isn't dynamic in PIC, generate R_386_RELATIVE here. */ eh->no_finish_dynamic_symbol = 1; - relative_reloc = TRUE; + relative_reloc = true; } } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2521,7 +2521,7 @@ elf_i386_relocate_section (bfd *output_bfd, local_got_offsets[r_symndx] |= 1; if (bfd_link_pic (info)) - relative_reloc = TRUE; + relative_reloc = true; } } @@ -2577,7 +2577,7 @@ elf_i386_relocate_section (bfd *output_bfd, " when making a shared object"), input_bfd, howto->name, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } else @@ -2626,7 +2626,7 @@ elf_i386_relocate_section (bfd *output_bfd, " `%s' can not be used when making a shared object"), input_bfd, v, h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else if (!SYMBOL_REFERENCES_LOCAL_P (info, h) && (h->type == STT_FUNC @@ -2641,7 +2641,7 @@ elf_i386_relocate_section (bfd *output_bfd, h->type == STT_FUNC ? "function" : "data", h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -2658,7 +2658,7 @@ elf_i386_relocate_section (bfd *output_bfd, /* Use global offset table as symbol value. */ relocation = htab->elf.sgotplt->output_section->vma + htab->elf.sgotplt->output_offset; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_386_PLT32: @@ -2702,7 +2702,7 @@ elf_i386_relocate_section (bfd *output_bfd, relocation = (resolved_plt->output_section->vma + resolved_plt->output_offset + plt_offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_386_SIZE32: @@ -2717,27 +2717,27 @@ elf_i386_relocate_section (bfd *output_bfd, break; if (GENERATE_DYNAMIC_RELOCATION_P (info, eh, r_type, sec, - FALSE, resolved_to_zero, + false, resolved_to_zero, (r_type == R_386_PC32))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; asection *sreloc; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2748,7 +2748,7 @@ elf_i386_relocate_section (bfd *output_bfd, else { /* This symbol is local, or marked to become local. */ - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE); if (htab->params->report_relative_reloc) @@ -2817,8 +2817,8 @@ elf_i386_relocate_section (bfd *output_bfd, input_section, contents, symtab_hdr, sym_hashes, &r_type_tls, tls_type, rel, - relend, h, r_symndx, TRUE)) - return FALSE; + relend, h, r_symndx, true)) + return false; if (r_type_tls == R_386_TLS_LE_32) { @@ -3147,7 +3147,7 @@ elf_i386_relocate_section (bfd *output_bfd, || r_type_tls == R_386_TLS_DESC_CALL) { relocation = htab->sgotplt_jump_table_size + offplt; - unresolved_reloc = FALSE; + unresolved_reloc = false; } else if (r_type_tls == r_type) { @@ -3160,7 +3160,7 @@ elf_i386_relocate_section (bfd *output_bfd, relocation += 4; if (r_type == R_386_TLS_IE) relocation += g_o_t; - unresolved_reloc = FALSE; + unresolved_reloc = false; } else if (r_type == R_386_TLS_GD) { @@ -3291,7 +3291,7 @@ elf_i386_relocate_section (bfd *output_bfd, continue; } else - BFD_ASSERT (FALSE); + BFD_ASSERT (false); break; case R_386_TLS_LDM: @@ -3299,8 +3299,8 @@ elf_i386_relocate_section (bfd *output_bfd, input_section, contents, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, rel, - relend, h, r_symndx, TRUE)) - return FALSE; + relend, h, r_symndx, true)) + return false; if (r_type != R_386_TLS_LDM) { @@ -3361,7 +3361,7 @@ elf_i386_relocate_section (bfd *output_bfd, + htab->elf.sgot->output_offset + off - htab->elf.sgotplt->output_section->vma - htab->elf.sgotplt->output_offset; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_386_TLS_LDO_32: @@ -3429,7 +3429,7 @@ elf_i386_relocate_section (bfd *output_bfd, (uint64_t) rel->r_offset, howto->name, h->root.root.string); - return FALSE; + return false; } do_relocation: @@ -3450,7 +3450,7 @@ elf_i386_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -3466,7 +3466,7 @@ elf_i386_relocate_section (bfd *output_bfd, (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"), input_bfd, input_section, (uint64_t) rel->r_offset, name, (int) r); - return FALSE; + return false; } } @@ -3494,13 +3494,13 @@ elf_i386_relocate_section (bfd *output_bfd, input_section->reloc_count -= deleted; } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_i386_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3509,12 +3509,12 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, struct elf_x86_link_hash_table *htab; unsigned plt_entry_size; struct elf_x86_link_hash_entry *eh; - bfd_boolean local_undefweak; - bfd_boolean use_plt_second; + bool local_undefweak; + bool use_plt_second; htab = elf_x86_hash_table (info, I386_ELF_DATA); if (htab == NULL) - return FALSE; + return false; plt_entry_size = htab->plt.plt_entry_size; @@ -3866,7 +3866,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, (plt->output_section->vma + plt->output_offset + plt_offset), htab->elf.sgot->contents + h->got.offset); - return TRUE; + return true; } } else if (bfd_link_pic (info) @@ -3912,7 +3912,7 @@ elf_i386_finish_dynamic_symbol (bfd *output_bfd, elf_append_rel (output_bfd, s, &rel); } - return TRUE; + return true; } /* Finish up local dynamic symbol handling. We set the contents of @@ -3934,7 +3934,7 @@ elf_i386_finish_local_dynamic_symbol (void **slot, void *inf) here since undefined weak symbol may not be dynamic and may not be called for elf_i386_finish_dynamic_symbol. */ -static bfd_boolean +static bool elf_i386_pie_finish_undefweak_symbol (struct bfd_hash_entry *bh, void *inf) { @@ -3943,7 +3943,7 @@ elf_i386_pie_finish_undefweak_symbol (struct bfd_hash_entry *bh, if (h->root.type != bfd_link_hash_undefweak || h->dynindx != -1) - return TRUE; + return true; return elf_i386_finish_dynamic_symbol (info->output_bfd, info, h, NULL); @@ -3998,7 +3998,7 @@ elf_i386_reloc_type_class (const struct bfd_link_info *info, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_i386_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -4006,10 +4006,10 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, htab = _bfd_x86_elf_finish_dynamic_sections (output_bfd, info); if (htab == NULL) - return FALSE; + return false; if (!htab->elf.dynamic_sections_created) - return TRUE; + return true; if (htab->elf.splt && htab->elf.splt->size > 0) { @@ -4102,7 +4102,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, elf_i386_pie_finish_undefweak_symbol, info); - return TRUE; + return true; } /* Fill PLT/GOT entries and allocate dynamic relocations for local @@ -4110,7 +4110,7 @@ elf_i386_finish_dynamic_sections (bfd *output_bfd, It has to be done before elf_link_sort_relocs is called so that dynamic relocations are properly sorted. */ -static bfd_boolean +static bool elf_i386_output_arch_local_syms (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, @@ -4123,14 +4123,14 @@ elf_i386_output_arch_local_syms struct elf_x86_link_hash_table *htab = elf_x86_hash_table (info, I386_ELF_DATA); if (htab == NULL) - return FALSE; + return false; /* Fill PLT and GOT entries for local STT_GNU_IFUNC symbols. */ htab_traverse (htab->loc_hash_table, elf_i386_finish_local_dynamic_symbol, info); - return TRUE; + return true; } /* Similar to _bfd_elf_get_synthetic_symtab. Support PLTs with all @@ -4408,7 +4408,7 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info) #define elf_backend_setup_gnu_properties elf_i386_link_setup_gnu_properties #define elf_backend_hide_symbol _bfd_x86_elf_hide_symbol -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #define elf32_bed elf32_i386_bed @@ -4427,11 +4427,11 @@ elf_i386_link_setup_gnu_properties (struct bfd_link_info *info) "FreeBSD" label in the ELF header. So we put this label on all executables and (for simplicity) also all other object files. */ -static bfd_boolean +static bool elf_i386_fbsd_init_file_header (bfd *abfd, struct bfd_link_info *info) { if (!_bfd_elf_init_file_header (abfd, info)) - return FALSE; + return false; #ifdef OLD_FREEBSD_ABI_LABEL { @@ -4440,7 +4440,7 @@ elf_i386_fbsd_init_file_header (bfd *abfd, struct bfd_link_info *info) memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8); } #endif - return TRUE; + return true; } #undef elf_backend_init_file_header @@ -4491,7 +4491,7 @@ elf_i386_fbsd_init_file_header (bfd *abfd, struct bfd_link_info *info) FALSE otherwise. ISECTION is the best guess matching section from the input bfd IBFD, but it might be NULL. */ -static bfd_boolean +static bool elf32_i386_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED, @@ -4499,7 +4499,7 @@ elf32_i386_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED { /* PR 19938: FIXME: Need to add code for setting the sh_info and sh_link fields of Solaris specific section types. */ - return FALSE; + return false; /* Based upon Oracle Solaris 11.3 Linkers and Libraries Guide, Ch. 13, Object File Format, Table 13-9 ELF sh_link and sh_info Interpretation: @@ -4570,12 +4570,12 @@ SHT_SUNW_versym The section header index of 0 /* Intel MCU support. */ -static bfd_boolean +static bool elf32_iamcu_elf_object_p (bfd *abfd) { /* Set the right machine number for an IAMCU elf32 file. */ bfd_default_set_arch_mach (abfd, bfd_arch_iamcu, bfd_mach_i386_iamcu); - return TRUE; + return true; } #undef TARGET_LITTLE_SYM diff --git a/bfd/elf32-ip2k.c b/bfd/elf32-ip2k.c index 11d558189a..fb72756b1c 100644 --- a/bfd/elf32-ip2k.c +++ b/bfd/elf32-ip2k.c @@ -40,7 +40,7 @@ struct ip2k_opcode unsigned short mask; }; -static bfd_boolean ip2k_relaxed = FALSE; +static bool ip2k_relaxed = false; static const struct ip2k_opcode ip2k_page_opcode[] = { @@ -135,40 +135,40 @@ static reloc_howto_type ip2k_elf_howto_table [] = complain_overflow_dont,/* complain_on_overflow */ \ bfd_elf_generic_reloc,/* special_function */ \ name, /* name */ \ - FALSE, /* partial_inplace */ \ + false, /* partial_inplace */ \ sm, /* src_mask */ \ dm, /* dst_mask */ \ pr) /* pcrel_offset */ /* This reloc does nothing. */ - IP2K_HOWTO (R_IP2K_NONE, 0,3,0, FALSE, 0, "R_IP2K_NONE", 0, 0), + IP2K_HOWTO (R_IP2K_NONE, 0,3,0, false, 0, "R_IP2K_NONE", 0, 0), /* A 16 bit absolute relocation. */ - IP2K_HOWTO (R_IP2K_16, 0,1,16, FALSE, 0, "R_IP2K_16", 0, 0xffff), + IP2K_HOWTO (R_IP2K_16, 0,1,16, false, 0, "R_IP2K_16", 0, 0xffff), /* A 32 bit absolute relocation. */ - IP2K_HOWTO (R_IP2K_32, 0,2,32, FALSE, 0, "R_IP2K_32", 0, 0xffffffff), + IP2K_HOWTO (R_IP2K_32, 0,2,32, false, 0, "R_IP2K_32", 0, 0xffffffff), /* A 8-bit data relocation for the FR9 field. Ninth bit is computed specially. */ - IP2K_HOWTO (R_IP2K_FR9, 0,1,9, FALSE, 0, "R_IP2K_FR9", 0, 0x00ff), + IP2K_HOWTO (R_IP2K_FR9, 0,1,9, false, 0, "R_IP2K_FR9", 0, 0x00ff), /* A 4-bit data relocation. */ - IP2K_HOWTO (R_IP2K_BANK, 8,1,4, FALSE, 0, "R_IP2K_BANK", 0, 0x000f), + IP2K_HOWTO (R_IP2K_BANK, 8,1,4, false, 0, "R_IP2K_BANK", 0, 0x000f), /* A 13-bit insn relocation - word address => right-shift 1 bit extra. */ - IP2K_HOWTO (R_IP2K_ADDR16CJP, 1,1,13, FALSE, 0, "R_IP2K_ADDR16CJP", 0, 0x1fff), + IP2K_HOWTO (R_IP2K_ADDR16CJP, 1,1,13, false, 0, "R_IP2K_ADDR16CJP", 0, 0x1fff), /* A 3-bit insn relocation - word address => right-shift 1 bit extra. */ - IP2K_HOWTO (R_IP2K_PAGE3, 14,1,3, FALSE, 0, "R_IP2K_PAGE3", 0, 0x0007), + IP2K_HOWTO (R_IP2K_PAGE3, 14,1,3, false, 0, "R_IP2K_PAGE3", 0, 0x0007), /* Two 8-bit data relocations. */ - IP2K_HOWTO (R_IP2K_LO8DATA, 0,1,8, FALSE, 0, "R_IP2K_LO8DATA", 0, 0x00ff), - IP2K_HOWTO (R_IP2K_HI8DATA, 8,1,8, FALSE, 0, "R_IP2K_HI8DATA", 0, 0x00ff), + IP2K_HOWTO (R_IP2K_LO8DATA, 0,1,8, false, 0, "R_IP2K_LO8DATA", 0, 0x00ff), + IP2K_HOWTO (R_IP2K_HI8DATA, 8,1,8, false, 0, "R_IP2K_HI8DATA", 0, 0x00ff), /* Two 8-bit insn relocations. word address => right-shift 1 bit extra. */ - IP2K_HOWTO (R_IP2K_LO8INSN, 1,1,8, FALSE, 0, "R_IP2K_LO8INSN", 0, 0x00ff), - IP2K_HOWTO (R_IP2K_HI8INSN, 9,1,8, FALSE, 0, "R_IP2K_HI8INSN", 0, 0x00ff), + IP2K_HOWTO (R_IP2K_LO8INSN, 1,1,8, false, 0, "R_IP2K_LO8INSN", 0, 0x00ff), + IP2K_HOWTO (R_IP2K_HI8INSN, 9,1,8, false, 0, "R_IP2K_HI8INSN", 0, 0x00ff), /* Special 1 bit relocation for SKIP instructions. */ - IP2K_HOWTO (R_IP2K_PC_SKIP, 1,1,1, FALSE, 12, "R_IP2K_PC_SKIP", 0xfffe, 0x1000), + IP2K_HOWTO (R_IP2K_PC_SKIP, 1,1,1, false, 12, "R_IP2K_PC_SKIP", 0xfffe, 0x1000), /* 16 bit word address. */ - IP2K_HOWTO (R_IP2K_TEXT, 1,1,16, FALSE, 0, "R_IP2K_TEXT", 0, 0xffff), + IP2K_HOWTO (R_IP2K_TEXT, 1,1,16, false, 0, "R_IP2K_TEXT", 0, 0xffff), /* A 7-bit offset relocation for the FR9 field. Eigth and ninth bit comes from insn. */ - IP2K_HOWTO (R_IP2K_FR_OFFSET, 0,1,9, FALSE, 0, "R_IP2K_FR_OFFSET", 0x180, 0x007f), + IP2K_HOWTO (R_IP2K_FR_OFFSET, 0,1,9, false, 0, "R_IP2K_FR_OFFSET", 0x180, 0x007f), /* Bits 23:16 of an address. */ - IP2K_HOWTO (R_IP2K_EX8DATA, 16,1,8, FALSE, 0, "R_IP2K_EX8DATA", 0, 0x00ff), + IP2K_HOWTO (R_IP2K_EX8DATA, 16,1,8, false, 0, "R_IP2K_EX8DATA", 0, 0x00ff), }; @@ -247,7 +247,7 @@ ip2k_get_mem (bfd *abfd ATTRIBUTE_UNUSED, * ptr ++ = bfd_get_8 (abfd, addr ++); } -static bfd_boolean +static bool ip2k_is_opcode (bfd_byte *code, const struct ip2k_opcode *opcodes) { unsigned short insn = (code[0] << 8) | code[1]; @@ -255,12 +255,12 @@ ip2k_is_opcode (bfd_byte *code, const struct ip2k_opcode *opcodes) while (opcodes->mask != 0) { if ((insn & opcodes->mask) == opcodes->opcode) - return TRUE; + return true; opcodes ++; } - return FALSE; + return false; } #define PAGENO(ABSADDR) ((ABSADDR) & 0xFFFFC000) @@ -530,7 +530,7 @@ ip2k_nominal_page_bits (bfd *abfd ATTRIBUTE_UNUSED, return 0; } -static bfd_boolean +static bool ip2k_test_page_insn (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, Elf_Internal_Rela *irel, @@ -544,14 +544,14 @@ ip2k_test_page_insn (bfd *abfd ATTRIBUTE_UNUSED, /* This appears to be a reference to an undefined symbol. Just ignore it--it will be caught by the regular reloc processing. */ - return FALSE; + return false; /* Test if we can delete this page instruction. */ if (PAGENO (symval + irel->r_addend) != ip2k_nominal_page_bits (abfd, sec, irel->r_offset, misc->contents)) - return FALSE; + return false; - return TRUE; + return true; } /* Parts of a Stabs entry. */ @@ -780,7 +780,7 @@ adjust_all_relocations (bfd *abfd, /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool ip2k_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, @@ -796,14 +796,14 @@ ip2k_elf_relax_delete_bytes (bfd *abfd, sec->size -= count; adjust_all_relocations (abfd, sec, addr + count, endaddr, -count, 0); - return TRUE; + return true; } -static bfd_boolean +static bool ip2k_delete_page_insn (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, Elf_Internal_Rela *irel, - bfd_boolean *again, + bool *again, struct misc *misc) { /* Note that we've changed the relocs, section contents, etc. */ @@ -816,19 +816,19 @@ ip2k_delete_page_insn (bfd *abfd ATTRIBUTE_UNUSED, /* Delete the PAGE insn. */ if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset, 2)) - return FALSE; + return false; /* Modified => will need to iterate relaxation again. */ - *again = TRUE; + *again = true; - return TRUE; + return true; } -static bfd_boolean +static bool ip2k_relax_switch_table_128 (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, Elf_Internal_Rela *irel, - bfd_boolean *again, + bool *again, struct misc *misc) { Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count; @@ -853,18 +853,18 @@ ip2k_relax_switch_table_128 (bfd *abfd ATTRIBUTE_UNUSED, if (ireltest >= irelend) { _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information.")); - return FALSE; + return false; } if (ireltest->r_offset != addr) { _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information.")); - return FALSE; + return false; } if (! ip2k_test_page_insn (abfd, sec, ireltest, misc)) /* Un-removable page insn => nothing can be done. */ - return TRUE; + return true; addr += 4; ireltest += 2; @@ -876,30 +876,30 @@ ip2k_relax_switch_table_128 (bfd *abfd ATTRIBUTE_UNUSED, || (! IS_ADD_PCL_W_OPCODE (code + 2))) { _bfd_error_handler (_("ip2k relaxer: switch table header corrupt.")); - return FALSE; + return false; } if (!ip2k_elf_relax_delete_bytes (abfd, sec, irel->r_offset - 4, 2)) - return FALSE; + return false; - *again = TRUE; + *again = true; /* Delete all page instructions in table. */ while (irel < ireltest) { if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc)) - return FALSE; + return false; irel += 2; } - return TRUE; + return true; } -static bfd_boolean +static bool ip2k_relax_switch_table_256 (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, Elf_Internal_Rela *irel, - bfd_boolean *again, + bool *again, struct misc *misc) { Elf_Internal_Rela *irelend = misc->irelbase + sec->reloc_count; @@ -926,18 +926,18 @@ ip2k_relax_switch_table_256 (bfd *abfd ATTRIBUTE_UNUSED, if (ireltest >= irelend) { _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information.")); - return FALSE; + return false; } if (ireltest->r_offset != addr) { _bfd_error_handler (_("ip2k relaxer: switch table without complete matching relocation information.")); - return FALSE; + return false; } if (!ip2k_test_page_insn (abfd, sec, ireltest, misc)) /* Un-removable page insn => nothing can be done. */ - return TRUE; + return true; addr += 4; ireltest += 2; @@ -959,32 +959,32 @@ ip2k_relax_switch_table_256 (bfd *abfd ATTRIBUTE_UNUSED, || (!IS_INC_1SP_OPCODE (code + 10))) { _bfd_error_handler (_("ip2k relaxer: switch table header corrupt.")); - return FALSE; + return false; } /* Delete first 3 opcodes. */ if (!ip2k_elf_relax_delete_bytes (abfd, sec, addr + 0, 6)) - return FALSE; + return false; - *again = TRUE; + *again = true; /* Delete all page instructions in table. */ while (irel < ireltest) { if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc)) - return FALSE; + return false; irel += 2; } - return TRUE; + return true; } /* This function handles relaxation of a section in a specific page. */ -static bfd_boolean +static bool ip2k_elf_relax_section_page (bfd *abfd, asection *sec, - bfd_boolean *again, + bool *again, struct misc *misc, unsigned long page_start, unsigned long page_end) @@ -1009,7 +1009,7 @@ ip2k_elf_relax_section_page (bfd *abfd, if (BASEADDR (sec) + irel->r_offset > page_end) /* Flow beyond end of page => nothing more to do for this page. */ - return TRUE; + return true; /* Detect switch tables. */ switch_table_128 = ip2k_is_switch_table_128 (abfd, sec, irel->r_offset, misc->contents); @@ -1022,7 +1022,7 @@ ip2k_elf_relax_section_page (bfd *abfd, if (switch_table_128 == 0) { if (!ip2k_relax_switch_table_128 (abfd, sec, irel, again, misc)) - return FALSE; + return false; continue; } @@ -1030,7 +1030,7 @@ ip2k_elf_relax_section_page (bfd *abfd, if (switch_table_256 == 0) { if (!ip2k_relax_switch_table_256 (abfd, sec, irel, again, misc)) - return FALSE; + return false; continue; } @@ -1039,13 +1039,13 @@ ip2k_elf_relax_section_page (bfd *abfd, if (ip2k_test_page_insn (abfd, sec, irel, misc)) { if (!ip2k_delete_page_insn (abfd, sec, irel, again, misc)) - return FALSE; + return false; continue; } } - return TRUE; + return true; } /* This function handles relaxing for the ip2k. @@ -1058,11 +1058,11 @@ ip2k_elf_relax_section_page (bfd *abfd, Processing the pages one at a time from the lowest page allows a removal only policy to be used - pages can be removed but are never reinserted. */ -static bfd_boolean +static bool ip2k_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -1073,23 +1073,23 @@ ip2k_elf_relax_section (bfd *abfd, static unsigned long page_start = 0; static unsigned long page_end = 0; static unsigned int pass = 0; - static bfd_boolean new_pass = FALSE; - static bfd_boolean changed = FALSE; + static bool new_pass = false; + static bool changed = false; struct misc misc; /* Assume nothing changes. */ - *again = FALSE; + *again = false; if (first_section == NULL) { - ip2k_relaxed = TRUE; + ip2k_relaxed = true; first_section = sec; } if (first_section == sec) { pass++; - new_pass = TRUE; + new_pass = true; } /* We don't have to do anything for a relocatable link, @@ -1099,7 +1099,7 @@ ip2k_elf_relax_section (bfd *abfd, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -1149,8 +1149,8 @@ ip2k_elf_relax_section (bfd *abfd, if (new_pass) { pass = 1; - new_pass = FALSE; - changed = TRUE; /* Pre-initialize to break out of pass 1. */ + new_pass = false; + changed = true; /* Pre-initialize to break out of pass 1. */ search_addr = 0xFFFFFFFF; } @@ -1163,15 +1163,15 @@ ip2k_elf_relax_section (bfd *abfd, search_addr = BASEADDR (sec); /* Found a page => more work to do. */ - *again = TRUE; + *again = true; } } else { if (new_pass) { - new_pass = FALSE; - changed = FALSE; + new_pass = false; + changed = false; page_start = PAGENO (search_addr); page_end = page_start | 0x00003FFF; } @@ -1181,9 +1181,9 @@ ip2k_elf_relax_section (bfd *abfd, && (BASEADDR (sec) <= page_end)) { if (!ip2k_elf_relax_section_page (abfd, sec, &changed, &misc, page_start, page_end)) - return FALSE; + return false; } - *again = TRUE; + *again = true; } /* Perform some house keeping after relaxing the section. */ @@ -1212,7 +1212,7 @@ ip2k_elf_relax_section (bfd *abfd, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -1221,12 +1221,12 @@ ip2k_elf_relax_section (bfd *abfd, free (contents); if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Set the howto pointer for a IP2K ELF reloc. */ -static bfd_boolean +static bool ip2k_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -1240,10 +1240,10 @@ ip2k_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & ip2k_elf_howto_table [r_type]; - return TRUE; + return true; } /* Perform a single relocation. @@ -1434,8 +1434,8 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean warned, ignored; - bfd_boolean unresolved_reloc; + bool warned, ignored; + bool unresolved_reloc; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1470,7 +1470,7 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -1499,7 +1499,7 @@ ip2k_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } #define TARGET_BIG_SYM ip2k_elf32_vec diff --git a/bfd/elf32-iq2000.c b/bfd/elf32-iq2000.c index 7e52487b3f..5291a54692 100644 --- a/bfd/elf32-iq2000.c +++ b/bfd/elf32-iq2000.c @@ -37,52 +37,52 @@ static reloc_howto_type iq2000_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_IQ2000_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_IQ2000_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 31, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x7fffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 26 bit branch address. */ HOWTO (R_IQ2000_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -90,115 +90,115 @@ static reloc_howto_type iq2000_elf_howto_table [] = bits must match the PC. */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x03ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit PC relative reference. */ HOWTO (R_IQ2000_PC16, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_PC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* high 16 bits of symbol value. */ HOWTO (R_IQ2000_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ iq2000_elf_howto_hi16_reloc, /* special_function */ "R_IQ2000_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x7fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_IQ2000_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit jump offset. */ HOWTO (R_IQ2000_OFFSET_16, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_OFFSET_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 21-bit jump offset. */ HOWTO (R_IQ2000_OFFSET_21, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_OFFSET_21", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000, /* src_mask */ 0x1fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* unsigned high 16 bits of value. */ HOWTO (R_IQ2000_OFFSET_21, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_UHI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x7fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute debug relocation. */ HOWTO (R_IQ2000_32_DEBUG, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_IQ2000_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -208,15 +208,15 @@ static reloc_howto_type iq2000_elf_vtinherit_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_IQ2000_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ static reloc_howto_type iq2000_elf_vtentry_howto = @@ -224,15 +224,15 @@ static reloc_howto_type iq2000_elf_vtentry_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_IQ2000_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ static bfd_reloc_status_type @@ -417,7 +417,7 @@ iq2000_final_link_relocate (reloc_howto_type * howto, /* Set the howto pointer for a IQ2000 ELF reloc. */ -static bfd_boolean +static bool iq2000_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -442,19 +442,19 @@ iq2000_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & iq2000_elf_howto_table [r_type]; break; } - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool iq2000_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -464,10 +464,10 @@ iq2000_elf_check_relocs (bfd *abfd, struct elf_link_hash_entry **sym_hashes; const Elf_Internal_Rela *rel; const Elf_Internal_Rela *rel_end; - bfd_boolean changed = FALSE; + bool changed = false; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -495,14 +495,14 @@ iq2000_elf_check_relocs (bfd *abfd, hierarchy. Reconstruct it for later use during GC. */ case R_IQ2000_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_IQ2000_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_IQ2000_32: @@ -513,7 +513,7 @@ iq2000_elf_check_relocs (bfd *abfd, { ((Elf_Internal_Rela *) rel)->r_info = ELF32_R_INFO (ELF32_R_SYM (rel->r_info), R_IQ2000_32_DEBUG); - changed = TRUE; + changed = true; } break; } @@ -524,7 +524,7 @@ iq2000_elf_check_relocs (bfd *abfd, we'll free the relocs and lose our changes. */ elf_section_data (sec)->relocs = (Elf_Internal_Rela *) relocs; - return TRUE; + return true; } @@ -629,8 +629,8 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean unresolved_reloc; - bfd_boolean warned, ignored; + bool unresolved_reloc; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -684,7 +684,7 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -710,7 +710,7 @@ iq2000_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } @@ -755,24 +755,24 @@ elf32_iq2000_machine (bfd *abfd) /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool iq2000_elf_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword old_flags, old_partial; flagword new_flags, new_partial; - bfd_boolean error = FALSE; + bool error = false; char new_opt[80]; char old_opt[80]; @@ -783,7 +783,7 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } @@ -824,7 +824,7 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Print out any mismatches from above. */ if (new_opt[0]) { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: compiled with %s and linked with modules compiled with %s"), @@ -837,7 +837,7 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Warn about any other mismatches. */ if (new_flags != old_flags) { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ @@ -853,7 +853,7 @@ iq2000_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) } -static bfd_boolean +static bool iq2000_elf_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -880,16 +880,16 @@ iq2000_elf_print_private_bfd_data (bfd *abfd, void * ptr) } fputc ('\n', file); - return TRUE; + return true; } static -bfd_boolean +bool iq2000_elf_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_iq2000, elf32_iq2000_machine (abfd)); - return TRUE; + return true; } diff --git a/bfd/elf32-lm32.c b/bfd/elf32-lm32.c index 6c8b563cb6..be8d41632c 100644 --- a/bfd/elf32-lm32.c +++ b/bfd/elf32-lm32.c @@ -133,14 +133,14 @@ _lm32fdpic_add_rofixup (bfd *output_bfd, asection *rofixup, bfd_vma relocation) /* Create .rofixup sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool create_rofixup_section (bfd *dynobj, struct bfd_link_info *info) { struct elf_lm32_link_hash_table *htab; htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Fixup section for R_LM32_32 relocs. */ lm32fdpic_fixup32_section (info) @@ -154,9 +154,9 @@ create_rofixup_section (bfd *dynobj, struct bfd_link_info *info) | SEC_READONLY)); if (lm32fdpic_fixup32_section (info) == NULL || !bfd_set_section_alignment (lm32fdpic_fixup32_section (info), 2)) - return FALSE; + return false; - return TRUE; + return true; } static reloc_howto_type lm32_elf_howto_table [] = @@ -166,258 +166,258 @@ static reloc_howto_type lm32_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_LM32_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_LM32_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_LM32_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ lm32_elf_gprel_reloc, /* special_function */ "R_LM32_GPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_CALL, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x3ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_LM32_BRANCH, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_BRANCH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_LM32_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_LM32_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_LM32_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn,/* special_function */ "R_LM32_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_16_GOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_16_GOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_GOTOFF_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_GOTOFF_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_GOTOFF_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_GOTOFF_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_COPY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_LM32_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_LM32_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -482,7 +482,7 @@ lm32_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an Lattice Mico32 ELF reloc. */ -static bfd_boolean +static bool lm32_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -496,15 +496,15 @@ lm32_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &lm32_elf_howto_table[r_type]; - return TRUE; + return true; } /* Set the right machine number for an Lattice Mico32 ELF file. */ -static bfd_boolean +static bool lm32_elf_object_p (bfd *abfd) { return bfd_default_set_arch_mach (abfd, bfd_arch_lm32, bfd_mach_lm32); @@ -512,7 +512,7 @@ lm32_elf_object_p (bfd *abfd) /* Set machine type flags just before file is written out. */ -static bfd_boolean +static bool lm32_elf_final_write_processing (bfd *abfd) { elf_elfheader (abfd)->e_machine = EM_LATTICEMICO32; @@ -531,7 +531,7 @@ lm32_elf_final_write_processing (bfd *abfd) /* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a dangerous relocation. */ -static bfd_boolean +static bool lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) { unsigned int count; @@ -541,7 +541,7 @@ lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* If we've already figured out what GP will be, just return it. */ *pgp = _bfd_get_gp_value (output_bfd); if (*pgp) - return TRUE; + return true; count = bfd_get_symcount (output_bfd); sym = bfd_get_outsymbols (output_bfd); @@ -571,10 +571,10 @@ lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* Only get the error once. */ *pgp = 4; _bfd_set_gp_value (output_bfd, *pgp); - return FALSE; + return false; } - return TRUE; + return true; } /* We have to figure out the gp value, so that we can adjust the @@ -584,7 +584,7 @@ lm32_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) external symbol if we are producing relocatable output. */ static bfd_reloc_status_type -lm32_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable, +lm32_elf_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable, char **error_message, bfd_vma *pgp) { if (bfd_is_und_section (symbol->section) && !relocatable) @@ -655,7 +655,7 @@ lm32_elf_gprel_reloc (bfd *abfd, + symbol->section->output_section->vma + symbol->section->output_offset; if ((r = - lm32_elf_final_gp (abfd, symbol, FALSE, msg, &gp)) == bfd_reloc_ok) + lm32_elf_final_gp (abfd, symbol, false, msg, &gp)) == bfd_reloc_ok) { relocation = relocation + reloc_entry->addend - gp; reloc_entry->addend = 0; @@ -705,7 +705,7 @@ _lm32fdpic_osec_to_segment (bfd *output_bfd, asection *osec) /* Determine if an output section is read-only. */ -inline static bfd_boolean +inline static bool _lm32fdpic_osec_readonly_p (bfd *output_bfd, asection *osec) { unsigned seg = _lm32fdpic_osec_to_segment (output_bfd, osec); @@ -733,7 +733,7 @@ lm32_elf_relocate_section (bfd *output_bfd, asection *sgot; if (htab == NULL) - return FALSE; + return false; local_got_offsets = elf_local_got_offsets (input_bfd); @@ -783,8 +783,8 @@ lm32_elf_relocate_section (bfd *output_bfd, else { /* It's a global symbol. */ - bfd_boolean unresolved_reloc; - bfd_boolean warned, ignored; + bool unresolved_reloc; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -843,7 +843,7 @@ lm32_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (sgot != NULL); if (h != NULL) { - bfd_boolean dyn; + bool dyn; bfd_vma off; off = h->got.offset; @@ -1006,7 +1006,7 @@ lm32_elf_relocate_section (bfd *output_bfd, (info, _("cannot emit dynamic relocations in read-only section"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } /* Create entry in .rofixup section. */ _lm32fdpic_add_rofixup (output_bfd, @@ -1063,7 +1063,7 @@ lm32_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -1090,7 +1090,7 @@ lm32_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } static asection * @@ -1113,7 +1113,7 @@ lm32_elf_gc_mark_hook (asection *sec, /* Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool lm32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1127,7 +1127,7 @@ lm32_elf_check_relocs (bfd *abfd, bfd *dynobj; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -1137,7 +1137,7 @@ lm32_elf_check_relocs (bfd *abfd, htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; @@ -1171,7 +1171,7 @@ lm32_elf_check_relocs (bfd *abfd, if (dynobj == NULL) htab->root.dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; break; } } @@ -1187,12 +1187,12 @@ lm32_elf_check_relocs (bfd *abfd, if (dynobj == NULL) htab->root.dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; /* Create .rofixup section */ if (htab->sfixup32 == NULL) { if (! create_rofixup_section (dynobj, info)) - return FALSE; + return false; } break; case R_LM32_16_GOT: @@ -1204,7 +1204,7 @@ lm32_elf_check_relocs (bfd *abfd, if (dynobj == NULL) htab->root.dynobj = dynobj = abfd; if (! create_rofixup_section (dynobj, info)) - return FALSE; + return false; } break; } @@ -1229,7 +1229,7 @@ lm32_elf_check_relocs (bfd *abfd, size *= sizeof (bfd_signed_vma); local_got_refcounts = bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } local_got_refcounts[r_symndx] += 1; @@ -1240,25 +1240,25 @@ lm32_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_LM32_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_LM32_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool lm32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -1269,7 +1269,7 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd, htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; @@ -1386,11 +1386,11 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd, " != relocs %d", (int64_t) (lm32fdpic_fixup32_section (info)->size / 4), lm32fdpic_fixup32_section (info)->reloc_count); - return FALSE; + return false; } hend = bfd_link_hash_lookup (info->hash, "__ROFIXUP_END__", - FALSE, FALSE, TRUE); + false, false, true); if (hend && (hend->type == bfd_link_hash_defined || hend->type == bfd_link_hash_defweak) @@ -1409,18 +1409,18 @@ lm32_elf_finish_dynamic_sections (bfd *output_bfd, ("LINKER BUG: .rofixup section hend->u.def.value != value: %" PRId64 " != %" PRId64, (int64_t) hend->u.def.value, (int64_t) value); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool lm32_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -1431,7 +1431,7 @@ lm32_elf_finish_dynamic_symbol (bfd *output_bfd, htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (h->plt.offset != (bfd_vma) -1) { @@ -1574,7 +1574,7 @@ lm32_elf_finish_dynamic_symbol (bfd *output_bfd, if (h == htab->root.hdynamic || h == htab->root.hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } static enum elf_reloc_type_class @@ -1597,7 +1597,7 @@ lm32_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1636,7 +1636,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -1650,7 +1650,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1661,18 +1661,18 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (0 && info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -1680,7 +1680,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (0 && !_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -1695,7 +1695,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; s = htab->sdynbss; BFD_ASSERT (s != NULL); @@ -1720,7 +1720,7 @@ lm32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info; @@ -1728,12 +1728,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->root.dynamic_sections_created && h->plt.refcount > 0) @@ -1744,7 +1744,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -1795,7 +1795,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -1803,7 +1803,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->root.sgot; @@ -1818,7 +1818,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -1859,7 +1859,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -1882,7 +1882,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -1903,24 +1903,24 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) sreloc->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool lm32_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct elf_lm32_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; BFD_ASSERT (dynobj != NULL); @@ -2006,7 +2006,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -2023,7 +2023,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->root.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -2058,11 +2058,11 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, of garbage. */ s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } if (!_bfd_elf_add_dynamic_tags (output_bfd, info, relocs)) - return FALSE; + return false; /* Allocate .rofixup section. */ if (IS_FDPIC (output_bfd)) @@ -2082,7 +2082,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, Elf_Internal_Rela *internal_relocs, *end; internal_relocs = elf_section_data (s)->relocs; if (internal_relocs == NULL) - internal_relocs = (_bfd_elf_link_read_relocs (ibfd, s, NULL, NULL, FALSE)); + internal_relocs = (_bfd_elf_link_read_relocs (ibfd, s, NULL, NULL, false)); if (internal_relocs != NULL) { end = internal_relocs + s->reloc_count; @@ -2141,7 +2141,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, /* Create a new entry. */ new_entry = malloc (sizeof (struct weak_symbol_list)); if (!new_entry) - return FALSE; + return false; new_entry->name = h->root.root.string; new_entry->next = NULL; /* Add to list */ @@ -2164,7 +2164,7 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, } } else - return FALSE; + return false; } } } @@ -2186,16 +2186,16 @@ lm32_elf_size_dynamic_sections (bfd *output_bfd, lm32fdpic_fixup32_section (info)->contents = bfd_zalloc (dynobj, lm32fdpic_fixup32_section (info)->size); if (lm32fdpic_fixup32_section (info)->contents == NULL) - return FALSE; + return false; } } - return TRUE; + return true; } /* Create dynamic sections when linking against a dynamic object. */ -static bfd_boolean +static bool lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_lm32_link_hash_table *htab; @@ -2206,16 +2206,16 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab = lm32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Make sure we have a GOT - For the case where we have a dynamic object but none of the relocs in check_relocs */ if (!_bfd_elf_create_got_section (abfd, info)) - return FALSE; + return false; if (IS_FDPIC (abfd) && (htab->sfixup32 == NULL)) { if (! create_rofixup_section (abfd, info)) - return FALSE; + return false; } /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and @@ -2234,7 +2234,7 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->root.splt = s; if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; if (bed->want_plt_sym) { @@ -2245,9 +2245,9 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (! (_bfd_generic_link_add_one_symbol (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, - (bfd_vma) 0, NULL, FALSE, + (bfd_vma) 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->type = STT_OBJECT; @@ -2255,7 +2255,7 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = bfd_make_section_anyway_with_flags (abfd, @@ -2265,11 +2265,11 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->root.srelplt = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (htab->root.sgot == NULL && !_bfd_elf_create_got_section (abfd, info)) - return FALSE; + return false; if (bed->want_dynbss) { @@ -2283,7 +2283,7 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) SEC_ALLOC | SEC_LINKER_CREATED); htab->sdynbss = s; if (s == NULL) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the linker will map it to an output section. We can't just create it @@ -2304,45 +2304,45 @@ lm32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->srelbss = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } } - return TRUE; + return true; } -static bfd_boolean +static bool lm32_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { if (!bfd_link_relocatable (info)) { if (!bfd_elf_stack_segment_size (output_bfd, info, "__stacksize", DEFAULT_STACK_SIZE)) - return FALSE; + return false; asection *sec = bfd_get_section_by_name (output_bfd, ".stack"); if (sec) sec->size = info->stacksize >= 0 ? info->stacksize : 0; } - return TRUE; + return true; } -static bfd_boolean +static bool lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { unsigned i; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (! _bfd_elf_copy_private_bfd_data (ibfd, obfd)) - return FALSE; + return false; if (! elf_tdata (ibfd) || ! elf_tdata (ibfd)->phdr || ! elf_tdata (obfd) || ! elf_tdata (obfd)->phdr) - return TRUE; + return true; /* Copy the stack size. */ for (i = 0; i < elf_elfheader (ibfd)->e_phnum; i++) @@ -2360,14 +2360,14 @@ lm32_elf_fdpic_copy_private_bfd_data (bfd *ibfd, bfd *obfd) ->s->sizeof_ehdr, SEEK_SET) != 0 || get_elf_backend_data (obfd)->s->write_out_phdrs (obfd, elf_tdata (obfd)->phdr, elf_elfheader (obfd)->e_phnum) != 0) - return FALSE; + return false; break; } break; } - return TRUE; + return true; } diff --git a/bfd/elf32-m32c.c b/bfd/elf32-m32c.c index d7bc2f81cd..6f7be54610 100644 --- a/bfd/elf32-m32c.c +++ b/bfd/elf32-m32c.c @@ -28,19 +28,19 @@ /* Forward declarations. */ static reloc_howto_type * m32c_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean m32c_info_to_howto_rela +static bool m32c_info_to_howto_rela (bfd *, arelent *, Elf_Internal_Rela *); static int m32c_elf_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **); -static bfd_boolean m32c_elf_check_relocs +static bool m32c_elf_check_relocs (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); -static bfd_boolean m32c_elf_relax_delete_bytes (bfd *, asection *, bfd_vma, int); +static bool m32c_elf_relax_delete_bytes (bfd *, asection *, bfd_vma, int); #ifdef DEBUG char * m32c_get_reloc (long reloc); void dump_symtab (bfd *, void *, void *); #endif -static bfd_boolean m32c_elf_relax_section -(bfd *abfd, asection *sec, struct bfd_link_info *link_info, bfd_boolean *again); +static bool m32c_elf_relax_section +(bfd *abfd, asection *sec, struct bfd_link_info *link_info, bool *again); static bfd_reloc_status_type m32c_apply_reloc_24 (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); @@ -52,15 +52,15 @@ static reloc_howto_type m32c_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GCC intentionally overflows these next two in order to work around limitations in the addressing modes, so don't complain @@ -69,169 +69,169 @@ static reloc_howto_type m32c_elf_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m32c_apply_reloc_24, /* special_function */ "R_M32C_24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_8_PCREL, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_8_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_M32C_16_PCREL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_M32C_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_LO16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_HI8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_HI8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_HI16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_RL_JUMP, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_RL_JUMP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_RL_1ADDR, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_RL_1ADDR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32C_RL_2ADDR, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32C_RL_2ADDR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -291,7 +291,7 @@ m32c_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an M32C ELF reloc. */ -static bfd_boolean +static bool m32c_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -305,10 +305,10 @@ m32c_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & m32c_elf_howto_table [r_type]; - return TRUE; + return true; } @@ -480,7 +480,7 @@ m32c_elf_relocate_section else if (!bfd_link_relocatable (info)) (*info->callbacks->undefined_symbol) (info, h->root.root.string, input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); } if (sec != NULL && discarded_section (sec)) @@ -617,7 +617,7 @@ m32c_elf_relocate_section case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -643,13 +643,13 @@ m32c_elf_relocate_section } } - return TRUE; + return true; } /* We support 16-bit pointers to code above 64k by generating a thunk below 64k containing a JMP instruction to the final address. */ -static bfd_boolean +static bool m32c_elf_check_relocs (bfd * abfd, struct bfd_link_info * info, @@ -665,7 +665,7 @@ m32c_elf_check_relocs bfd *dynobj; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -710,7 +710,7 @@ m32c_elf_check_relocs elf_hash_table (info)->splt = splt; if (splt == NULL || !bfd_set_section_alignment (splt, 1)) - return FALSE; + return false; } if (h != NULL) @@ -725,7 +725,7 @@ m32c_elf_check_relocs size = symtab_hdr->sh_info * sizeof (bfd_vma); local_plt_offsets = (bfd_vma *) bfd_alloc (abfd, size); if (local_plt_offsets == NULL) - return FALSE; + return false; elf_local_got_offsets (abfd) = local_plt_offsets; for (i = 0; i < symtab_hdr->sh_info; i++) @@ -743,12 +743,12 @@ m32c_elf_check_relocs } } - return TRUE; + return true; } /* This must exist if dynobj is ever set. */ -static bfd_boolean +static bool m32c_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -769,10 +769,10 @@ m32c_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } -static bfd_boolean +static bool m32c_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -780,42 +780,42 @@ m32c_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, asection *splt; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) - return TRUE; + return true; splt = elf_hash_table (info)->splt; BFD_ASSERT (splt != NULL); splt->contents = (bfd_byte *) bfd_zalloc (dynobj, splt->size); if (splt->contents == NULL) - return FALSE; + return false; - return TRUE; + return true; } /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool m32c_elf_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword old_flags, old_partial; flagword new_flags, new_partial; - bfd_boolean error = FALSE; + bool error = false; char new_opt[80]; char old_opt[80]; @@ -833,7 +833,7 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } @@ -870,7 +870,7 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Print out any mismatches from above. */ if (new_opt[0]) { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: compiled with %s and linked with modules compiled with %s"), @@ -883,7 +883,7 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Warn about any other mismatches. */ if (new_flags != old_flags) { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: uses different e_flags (%#x) fields" @@ -899,7 +899,7 @@ m32c_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) } -static bfd_boolean +static bool m32c_elf_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = (FILE *) ptr; @@ -921,7 +921,7 @@ m32c_elf_print_private_bfd_data (bfd *abfd, void *ptr) } fputc ('\n', file); - return TRUE; + return true; } /* Return the MACH for an e_flags value. */ @@ -938,12 +938,12 @@ elf32_m32c_machine (bfd *abfd) return bfd_mach_m16c; } -static bfd_boolean +static bool m32c_elf_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_m32c, elf32_m32c_machine (abfd)); - return TRUE; + return true; } @@ -956,7 +956,7 @@ dump_symtab (bfd * abfd, void *internal_syms, void *external_syms) Elf_Internal_Sym *isymend; Elf_Internal_Sym *isym; Elf_Internal_Shdr *symtab_hdr; - bfd_boolean free_internal = 0, free_external = 0; + bool free_internal = 0, free_external = 0; char * st_info_str; char * st_info_stb_str; char * st_other_str; @@ -1097,10 +1097,10 @@ m32c_get_reloc (long reloc) struct relax_plt_data { asection *splt; - bfd_boolean *again; + bool *again; }; -static bfd_boolean +static bool m32c_relax_plt_check (struct elf_link_hash_entry *h, void * xdata) { struct relax_plt_data *data = (struct relax_plt_data *) xdata; @@ -1121,17 +1121,17 @@ m32c_relax_plt_check (struct elf_link_hash_entry *h, void * xdata) { h->plt.offset = -1; data->splt->size -= 4; - *data->again = TRUE; + *data->again = true; } } - return TRUE; + return true; } /* A subroutine of m32c_elf_relax_section. If the global symbol H previously had a plt entry, give it a new entry offset. */ -static bfd_boolean +static bool m32c_relax_plt_realloc (struct elf_link_hash_entry *h, void * xdata) { bfd_vma *entry = (bfd_vma *) xdata; @@ -1142,26 +1142,26 @@ m32c_relax_plt_realloc (struct elf_link_hash_entry *h, void * xdata) *entry += 4; } - return TRUE; + return true; } -static bfd_boolean +static bool m32c_elf_relax_plt_section (asection *splt, struct bfd_link_info *info, - bfd_boolean *again) + bool *again) { struct relax_plt_data relax_plt_data; bfd *ibfd; /* Assume nothing changes. */ - *again = FALSE; + *again = false; if (bfd_link_relocatable (info)) - return TRUE; + return true; /* Quick check for an empty plt. */ if (splt->size == 0) - return TRUE; + return true; /* Map across all global symbols; see which ones happen to fall in the low 64k. */ @@ -1191,7 +1191,7 @@ m32c_elf_relax_plt_section (asection *splt, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; } for (idx = 0; idx < symtab_hdr->sh_info; ++idx) @@ -1220,7 +1220,7 @@ m32c_elf_relax_plt_section (asection *splt, { local_plt_offsets[idx] = -1; splt->size -= 4; - *again = TRUE; + *again = true; } } @@ -1264,7 +1264,7 @@ m32c_elf_relax_plt_section (asection *splt, } } - return TRUE; + return true; } static int @@ -1426,12 +1426,11 @@ static EncodingTable m32c_addr_encodings[] = { { 0, 0, 31 }, /* */ }; -static bfd_boolean -m32c_elf_relax_section - (bfd * abfd, - asection * sec, - struct bfd_link_info * link_info, - bfd_boolean * again) +static bool +m32c_elf_relax_section (bfd *abfd, + asection *sec, + struct bfd_link_info *link_info, + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Shdr *shndx_hdr; @@ -1452,7 +1451,7 @@ m32c_elf_relax_section return m32c_elf_relax_plt_section (sec, link_info, again); /* Assume nothing changes. */ - *again = FALSE; + *again = false; machine = elf32_m32c_machine (abfd); @@ -1463,7 +1462,7 @@ m32c_elf_relax_section || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = & elf_symtab_hdr (abfd); if (elf_symtab_shndx_list (abfd)) @@ -1881,7 +1880,7 @@ m32c_elf_relax_section if (gap_size == 0) continue; - *again = TRUE; + *again = true; srel->r_info = ELF32_R_INFO (ELF32_R_SYM (srel->r_info), new_type); @@ -1935,7 +1934,7 @@ m32c_elf_relax_section free_intsyms = NULL; } - return TRUE; + return true; error_return: free (free_relocs); @@ -1946,17 +1945,16 @@ m32c_elf_relax_section free (shndx_buf); } free (free_intsyms); - return FALSE; + return false; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean -m32c_elf_relax_delete_bytes - (bfd * abfd, - asection * sec, - bfd_vma addr, - int count) +static bool +m32c_elf_relax_delete_bytes (bfd *abfd, + asection *sec, + bfd_vma addr, + int count) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Shdr *shndx_hdr; @@ -2098,7 +2096,7 @@ m32c_elf_relax_delete_bytes } } - return TRUE; + return true; } /* This is for versions of gcc prior to 4.3. */ diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 29ebd99b58..783632b651 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -476,60 +476,60 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_M32R_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ m32r_elf_generic_reloc,/* special_function */ "R_M32R_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_M32R_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ m32r_elf_generic_reloc,/* special_function */ "R_M32R_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24 bit address. */ HOWTO (R_M32R_24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ m32r_elf_generic_reloc,/* special_function */ "R_M32R_24", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An PC Relative 10-bit relocation, shifted by 2. This reloc is complicated because relocations are relative to pc & -4. @@ -543,30 +543,30 @@ static reloc_howto_type m32r_elf_howto_table[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ m32r_elf_10_pcrel_reloc, /* special_function */ "R_M32R_10_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 18 bit relocation, right shifted by 2. */ HOWTO (R_M32R_18_PCREL, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_18_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 26 bit relocation, right shifted by 2. */ /* ??? It's not clear whether this should have partial_inplace set or not. @@ -577,105 +577,105 @@ static reloc_howto_type m32r_elf_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_26_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* High 16 bits of address when lower 16 is or'd in. */ HOWTO (R_M32R_HI16_ULO, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m32r_elf_hi16_reloc, /* special_function */ "R_M32R_HI16_ULO", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of address when lower 16 is added in. */ HOWTO (R_M32R_HI16_SLO, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m32r_elf_hi16_reloc, /* special_function */ "R_M32R_HI16_SLO", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 16 bits of address. */ HOWTO (R_M32R_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m32r_elf_lo16_reloc, /* special_function */ "R_M32R_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 16 bits offset. */ HOWTO (R_M32R_SDA16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ m32r_elf_sda16_reloc, /* special_function */ "R_M32R_SDA16", /* name */ - TRUE, /* partial_inplace */ /* FIXME: correct? */ + true, /* partial_inplace */ /* FIXME: correct? */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_M32R_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_M32R_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_M32R_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_M32R_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (13), EMPTY_HOWTO (14), @@ -703,194 +703,194 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_16_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_M32R_32_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc,/* special_function */ "R_M32R_32_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24 bit address. */ HOWTO (R_M32R_24_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc,/* special_function */ "R_M32R_24_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32R_10_PCREL_RELA, /* type */ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ m32r_elf_10_pcrel_reloc, /* special_function */ "R_M32R_10_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 18 bit relocation, right shifted by 2. */ HOWTO (R_M32R_18_PCREL_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_18_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 26 bit relocation, right shifted by 2. */ HOWTO (R_M32R_26_PCREL_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_26_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* High 16 bits of address when lower 16 is or'd in. */ HOWTO (R_M32R_HI16_ULO_RELA, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_HI16_ULO_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of address when lower 16 is added in. */ HOWTO (R_M32R_HI16_SLO_RELA, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_HI16_SLO_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 16 bits of address. */ HOWTO (R_M32R_LO16_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_LO16_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 16 bits offset. */ HOWTO (R_M32R_SDA16_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_SDA16_RELA", /* name */ - TRUE, /* partial_inplace */ /* FIXME: correct? */ + true, /* partial_inplace */ /* FIXME: correct? */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_M32R_RELA_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_M32R_RELA_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_M32R_RELA_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_M32R_RELA_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit PC relative relocation. */ HOWTO (R_M32R_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc,/* special_function */ "R_M32R_REL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (46), EMPTY_HOWTO (47), @@ -901,15 +901,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOT24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_M32R_PCREL, but referring to the procedure linkage table entry for the symbol. */ @@ -917,15 +917,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_26_PLTREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* This is used only by the dynamic linker. The symbol should exist both in the object being run and in some shared library. The @@ -936,15 +936,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_M32R_24, but used when setting global offset table entries. */ @@ -952,30 +952,30 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Marks a procedure linkage table entry for a symbol. */ HOWTO (R_M32R_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Used only by the dynamic linker. When the object is run, this longword is set to the load address of the object, plus the @@ -984,29 +984,29 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32R_GOTOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An PC Relative 24-bit relocation used when setting PIC offset table register. */ @@ -1014,15 +1014,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTPC24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Like R_M32R_HI16_ULO, but referring to the GOT table entry for the symbol. */ @@ -1030,15 +1030,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOT16_HI_ULO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_M32R_HI16_SLO, but referring to the GOT table entry for the symbol. */ @@ -1046,15 +1046,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOT16_HI_SLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_M32R_LO16, but referring to the GOT table entry for the symbol. */ @@ -1062,15 +1062,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOT16_LO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An PC Relative relocation used when setting PIC offset table register. Like R_M32R_HI16_ULO, but referring to the GOT table entry for @@ -1079,15 +1079,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTPC_HI_ULO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An PC Relative relocation used when setting PIC offset table register. Like R_M32R_HI16_SLO, but referring to the GOT table entry for @@ -1096,15 +1096,15 @@ static reloc_howto_type m32r_elf_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTPC_HI_SLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An PC Relative relocation used when setting PIC offset table register. Like R_M32R_LO16, but referring to the GOT table entry for @@ -1113,57 +1113,57 @@ static reloc_howto_type m32r_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTPC_LO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_M32R_GOTOFF_HI_ULO, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTOFF_HI_ULO",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32R_GOTOFF_HI_SLO, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTOFF_HI_SLO",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_M32R_GOTOFF_LO, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M32R_GOTOFF_LO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* Map BFD reloc types to M32R ELF reloc types. */ @@ -1272,7 +1272,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an M32R ELF reloc. */ -static bfd_boolean +static bool m32r_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -1286,13 +1286,13 @@ m32r_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &m32r_elf_howto_table[r_type]; - return TRUE; + return true; } -static bfd_boolean +static bool m32r_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -1304,20 +1304,20 @@ m32r_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, && (r_type < (unsigned int) R_M32R_max))) { cache_ptr->howto = &m32r_elf_howto_table[r_type]; - return TRUE; + return true; } /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Given a BFD section, try to locate the corresponding ELF section index. */ -static bfd_boolean +static bool _bfd_m32r_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) @@ -1325,9 +1325,9 @@ _bfd_m32r_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, if (strcmp (bfd_section_name (sec), ".scommon") == 0) { *retval = SHN_M32R_SCOMMON; - return TRUE; + return true; } - return FALSE; + return false; } /* M32R ELF uses two common sections. One is the usual one, and the other @@ -1364,7 +1364,7 @@ _bfd_m32r_elf_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym) We also keep watching for whether we need to create the sdata special linker sections. */ -static bfd_boolean +static bool m32r_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -1396,13 +1396,13 @@ m32r_elf_add_symbol_hook (bfd *abfd, s = bfd_make_section_anyway_with_flags (abfd, ".sdata", flags); if (s == NULL) - return FALSE; + return false; if (!bfd_set_section_alignment (s, 2)) - return FALSE; + return false; } bh = bfd_link_hash_lookup (info->hash, "_SDA_BASE_", - FALSE, FALSE, FALSE); + false, false, false); if ((bh == NULL || bh->type == bfd_link_hash_undefined) && !(_bfd_generic_link_add_one_symbol (info, @@ -1412,10 +1412,10 @@ m32r_elf_add_symbol_hook (bfd *abfd, s, (bfd_vma) 32768, NULL, - FALSE, + false, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->type = STT_OBJECT; } @@ -1429,7 +1429,7 @@ m32r_elf_add_symbol_hook (bfd *abfd, break; } - return TRUE; + return true; } /* We have to figure out the SDA_BASE value, so that we can adjust the @@ -1448,7 +1448,7 @@ m32r_elf_final_sda_base (bfd *output_bfd, { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, "_SDA_BASE_", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_SDA_BASE_", false, false, true); if (h != NULL && h->type == bfd_link_hash_defined) elf_gp (output_bfd) = (h->u.def.value + h->u.def.section->output_section->vma @@ -1493,7 +1493,7 @@ struct elf_m32r_pcrel_relocs_copied #define m32r_elf_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* Get the m32r ELF linker hash table from a link_info structure. */ @@ -1529,7 +1529,7 @@ m32r_elf_link_hash_table_create (bfd *abfd) /* Create dynamic sections when linking against a dynamic object. */ -static bfd_boolean +static bool m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_table *htab; @@ -1540,7 +1540,7 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab = m32r_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and .rel[a].bss sections. */ @@ -1558,7 +1558,7 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->splt = s; if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; if (bed->want_plt_sym) { @@ -1569,9 +1569,9 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (! (_bfd_generic_link_add_one_symbol (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, - (bfd_vma) 0, NULL, FALSE, + (bfd_vma) 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->type = STT_OBJECT; @@ -1579,7 +1579,7 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = bfd_make_section_anyway_with_flags (abfd, @@ -1589,11 +1589,11 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->srelplt = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (htab->sgot == NULL && !_bfd_elf_create_got_section (abfd, info)) - return FALSE; + return false; if (bed->want_dynbss) { @@ -1607,7 +1607,7 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) SEC_ALLOC | SEC_LINKER_CREATED); htab->sdynbss = s; if (s == NULL) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the linker will map it to an output section. We can't just create it @@ -1628,11 +1628,11 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->srelbss = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } } - return TRUE; + return true; } @@ -1642,7 +1642,7 @@ m32r_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1685,7 +1685,7 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -1699,7 +1699,7 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1710,18 +1710,18 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (0 && info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -1729,7 +1729,7 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (0 && !_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -1744,7 +1744,7 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, htab = m32r_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; s = htab->sdynbss; BFD_ASSERT (s != NULL); @@ -1769,7 +1769,7 @@ m32r_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info; @@ -1777,12 +1777,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = m32r_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->dynamic_sections_created && h->plt.refcount > 0) @@ -1793,7 +1793,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -1844,7 +1844,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -1852,7 +1852,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->sgot; @@ -1867,7 +1867,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -1908,7 +1908,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -1931,7 +1931,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -1952,19 +1952,19 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) sreloc->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; #ifdef DEBUG_PIC @@ -1973,7 +1973,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, htab = m32r_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->dynobj; BFD_ASSERT (dynobj != NULL); @@ -2059,7 +2059,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -2076,7 +2076,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -2111,7 +2111,7 @@ m32r_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, of garbage. */ s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -2164,14 +2164,14 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); Elf_Internal_Rela *rel, *relend; /* Assume success. */ - bfd_boolean ret = TRUE; + bool ret = true; struct elf_link_hash_table *htab = m32r_elf_hash_table (info); bfd_vma *local_got_offsets; asection *sgot, *splt, *sreloc; bfd_vma high_address = bfd_get_section_limit (input_bfd, input_section); if (htab == NULL) - return FALSE; + return false; local_got_offsets = elf_local_got_offsets (input_bfd); @@ -2199,7 +2199,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, const char *sym_name; bfd_reloc_status_type r; const char *errmsg = NULL; - bfd_boolean use_rel = FALSE; + bool use_rel = false; h = NULL; r_type = ELF32_R_TYPE (rel->r_info); @@ -2209,7 +2209,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; continue; } @@ -2221,7 +2221,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, continue; if (r_type <= R_M32R_GNU_VTENTRY) - use_rel = TRUE; + use_rel = true; howto = m32r_elf_howto_table + r_type; r_symndx = ELF32_R_SYM (rel->r_info); @@ -2269,7 +2269,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { - bfd_boolean dyn; + bool dyn; sec = h->root.u.def.section; dyn = htab->dynamic_sections_created; @@ -2487,7 +2487,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (h != NULL) { - bfd_boolean dyn; + bool dyn; bfd_vma off; off = h->got.offset; @@ -2629,7 +2629,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, || !h->def_regular)))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; bfd_byte *loc; /* When generating a shared object, these relocations @@ -2638,22 +2638,22 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, if (sreloc == NULL) { sreloc = _bfd_elf_get_dynamic_reloc_section - (input_bfd, input_section, /*rela?*/ TRUE); + (input_bfd, input_section, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = relocate = TRUE; + skip = relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2676,7 +2676,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, || ((info->symbolic || h->dynindx == -1) && h->def_regular)) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_M32R_RELATIVE); outrel.r_addend = relocation + rel->r_addend; } @@ -2760,7 +2760,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, &sda_base); if (r != bfd_reloc_ok) { - ret = FALSE; + ret = false; goto check_reloc; } @@ -2780,7 +2780,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, m32r_elf_howto_table[(int) r_type].name, sec); /*bfd_set_error (bfd_error_bad_value); ??? why? */ - ret = FALSE; + ret = false; continue; } } @@ -2830,7 +2830,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, offset, TRUE); + (info, name, input_bfd, input_section, offset, true); break; case bfd_reloc_outofrange: @@ -2863,7 +2863,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool m32r_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -2878,7 +2878,7 @@ m32r_elf_finish_dynamic_symbol (bfd *output_bfd, htab = m32r_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (h->plt.offset != (bfd_vma) -1) { @@ -3058,13 +3058,13 @@ m32r_elf_finish_dynamic_symbol (bfd *output_bfd, if (h == htab->hdynamic || h == htab->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool m32r_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3079,7 +3079,7 @@ m32r_elf_finish_dynamic_sections (bfd *output_bfd, htab = m32r_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->dynobj; @@ -3174,13 +3174,13 @@ m32r_elf_finish_dynamic_sections (bfd *output_bfd, elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; } - return TRUE; + return true; } /* Set the right machine number. */ -static bfd_boolean +static bool m32r_elf_object_p (bfd *abfd) { switch (elf_elfheader (abfd)->e_flags & EF_M32R_ARCH) @@ -3190,12 +3190,12 @@ m32r_elf_object_p (bfd *abfd) case E_M32RX_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_m32r, bfd_mach_m32rx); break; case E_M32R2_ARCH: (void) bfd_default_set_arch_mach (abfd, bfd_arch_m32r, bfd_mach_m32r2); break; } - return TRUE; + return true; } /* Store the machine number in the flags field. */ -static bfd_boolean +static bool m32r_elf_final_write_processing (bfd *abfd) { unsigned long val; @@ -3215,21 +3215,21 @@ m32r_elf_final_write_processing (bfd *abfd) /* Function to keep M32R specific file flags. */ -static bfd_boolean +static bool m32r_elf_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool m32r_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -3238,7 +3238,7 @@ m32r_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; @@ -3252,9 +3252,9 @@ m32r_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) unitialised values, which surprise surprise, correspond to the default values. */ if (bfd_get_arch_info (ibfd)->the_default) - return TRUE; + return true; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -3262,12 +3262,12 @@ m32r_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); - return TRUE; + return true; } /* Check flag compatibility. */ if (in_flags == out_flags) - return TRUE; + return true; if ((in_flags & EF_M32R_ARCH) != (out_flags & EF_M32R_ARCH)) { @@ -3279,16 +3279,16 @@ m32r_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("%pB: instruction set mismatch with previous modules"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } - return TRUE; + return true; } /* Display the flags field. */ -static bfd_boolean +static bool m32r_elf_print_private_bfd_data (bfd *abfd, void * ptr) { FILE * file = (FILE *) ptr; @@ -3309,7 +3309,7 @@ m32r_elf_print_private_bfd_data (bfd *abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } static asection * @@ -3336,7 +3336,7 @@ m32r_elf_gc_mark_hook (asection *sec, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool m32r_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -3351,7 +3351,7 @@ m32r_elf_check_relocs (bfd *abfd, asection *sreloc; if (bfd_link_relocatable (info)) - return TRUE; + return true; sreloc = NULL; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -3359,7 +3359,7 @@ m32r_elf_check_relocs (bfd *abfd, htab = m32r_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->dynobj; @@ -3402,7 +3402,7 @@ m32r_elf_check_relocs (bfd *abfd, if (dynobj == NULL) htab->dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; break; default: @@ -3434,7 +3434,7 @@ m32r_elf_check_relocs (bfd *abfd, size *= sizeof (bfd_signed_vma); local_got_refcounts = bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } local_got_refcounts[r_symndx] += 1; @@ -3525,10 +3525,10 @@ m32r_elf_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -3545,7 +3545,7 @@ m32r_elf_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -3562,7 +3562,7 @@ m32r_elf_check_relocs (bfd *abfd, p = bfd_alloc (dynobj, amt); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -3584,23 +3584,23 @@ m32r_elf_check_relocs (bfd *abfd, case R_M32R_RELA_GNU_VTINHERIT: case R_M32R_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_M32R_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; case R_M32R_RELA_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } static const struct bfd_elf_special_section m32r_elf_special_sections[] = @@ -3610,7 +3610,7 @@ static const struct bfd_elf_special_section m32r_elf_special_sections[] = { NULL, 0, 0, 0, 0 } }; -static bfd_boolean +static bool m32r_elf_section_flags (const Elf_Internal_Shdr *hdr) { const char *name = hdr->bfd_section->name; @@ -3619,7 +3619,7 @@ m32r_elf_section_flags (const Elf_Internal_Shdr *hdr) || strncmp (name, ".sdata", 6) == 0) hdr->bfd_section->flags |= SEC_SMALL_DATA; - return TRUE; + return true; } static enum elf_reloc_type_class @@ -3693,7 +3693,7 @@ m32r_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, #define elf_backend_special_sections m32r_elf_special_sections #define elf_backend_section_flags m32r_elf_section_flags -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf32-target.h" diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c index d8c14c6249..52da17427f 100644 --- a/bfd/elf32-m68hc11.c +++ b/bfd/elf32-m68hc11.c @@ -32,20 +32,20 @@ /* Relocation functions. */ static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean m68hc11_info_to_howto_rel +static bool m68hc11_info_to_howto_rel (bfd *, arelent *, Elf_Internal_Rela *); /* Trampoline generation. */ -static bfd_boolean m68hc11_elf_size_one_stub +static bool m68hc11_elf_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg); -static bfd_boolean m68hc11_elf_build_one_stub +static bool m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg); static struct bfd_link_hash_table* m68hc11_elf_bfd_link_hash_table_create (bfd* abfd); /* Linker relaxation. */ -static bfd_boolean m68hc11_elf_relax_section - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *); +static bool m68hc11_elf_relax_section + (bfd *, asection *, struct bfd_link_info *, bool *); static void m68hc11_elf_relax_delete_bytes (bfd *, asection *, bfd_vma, int); static void m68hc11_relax_group @@ -67,90 +67,90 @@ static reloc_howto_type elf_m68hc11_howto_table[] = { 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation */ HOWTO (R_M68HC11_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation (upper address) */ HOWTO (R_M68HC11_HI8, /* type */ 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_HI8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation (upper address) */ HOWTO (R_M68HC11_LO8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_LO8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit PC-rel relocation */ HOWTO (R_M68HC11_PCREL_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_PCREL_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit absolute relocation */ HOWTO (R_M68HC11_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont /*bitfield */ , /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. This one is never used for the code relocation. It's used by gas for -gstabs generation. */ @@ -158,120 +158,120 @@ static reloc_howto_type elf_m68hc11_howto_table[] = { 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 3 bit absolute relocation */ HOWTO (R_M68HC11_3B, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 3, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_4B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x003, /* src_mask */ 0x003, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit PC-rel relocation */ HOWTO (R_M68HC11_PCREL_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_PCREL_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO (R_M68HC11_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_M68HC11_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_M68HC11_GNU_VTENTRY, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_M68HC11_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24 bit relocation */ HOWTO (R_M68HC11_24, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16-bit low relocation */ HOWTO (R_M68HC11_LO16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A page relocation */ HOWTO (R_M68HC11_PAGE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC11_PAGE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (14), EMPTY_HOWTO (15), @@ -285,30 +285,30 @@ static reloc_howto_type elf_m68hc11_howto_table[] = { 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m68hc11_elf_ignore_reloc, /* special_function */ "R_M68HC11_RL_JUMP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Mark beginning of Gcc relaxation group instruction. */ HOWTO (R_M68HC11_RL_GROUP, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m68hc11_elf_ignore_reloc, /* special_function */ "R_M68HC11_RL_GROUP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* Map BFD reloc types to M68HC11 ELF reloc types. */ @@ -377,7 +377,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an M68HC11 ELF reloc. */ -static bfd_boolean +static bool m68hc11_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -390,17 +390,17 @@ m68hc11_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_m68hc11_howto_table[r_type]; - return TRUE; + return true; } /* Far trampoline generation. */ /* Build a 68HC11 trampoline stub. */ -static bfd_boolean +static bool m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct elf32_m68hc11_stub_hash_entry *stub_entry; @@ -425,7 +425,7 @@ m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) htab = m68hc11_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; stub_sec = stub_entry->stub_sec; @@ -466,13 +466,13 @@ m68hc11_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) bfd_put_8 (stub_bfd, 0x7E, loc); bfd_put_16 (stub_bfd, htab->pinfo.trampoline_addr, loc + 1); - return TRUE; + return true; } /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool m68hc11_elf_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UNUSED) { @@ -482,7 +482,7 @@ m68hc11_elf_size_one_stub (struct bfd_hash_entry *gen_entry, stub_entry = (struct elf32_m68hc11_stub_hash_entry *) gen_entry; stub_entry->stub_sec->size += 10; - return TRUE; + return true; } /* Create a 68HC11 ELF linker hash table. */ @@ -686,9 +686,9 @@ m68hc11_relax_group (bfd *abfd, asection *sec, bfd_byte *contents, and somewhat more difficult to support. */ -static bfd_boolean +static bool m68hc11_elf_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -703,7 +703,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, Elf_Internal_Sym *isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -712,7 +712,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -953,7 +953,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, irel->r_offset + 1, 3); } prev_insn_branch = 0; - *again = TRUE; + *again = true; } /* Try to turn a 16 bit address into a 8 bit page0 address. */ @@ -995,7 +995,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_M68HC11_NONE); if (sec->size != old_sec_size) - *again = TRUE; + *again = true; continue; } @@ -1032,7 +1032,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, R_M68HC11_8); /* That will change things, so, we should relax again. */ - *again = TRUE; + *again = true; } else if (ELF32_R_TYPE (irel->r_info) == R_M68HC11_16 && !is_far) { @@ -1074,7 +1074,7 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, m68hc11_elf_relax_delete_bytes (abfd, sec, irel->r_offset + 1, 1); /* That will change things, so, we should relax again. */ - *again = TRUE; + *again = true; } } } @@ -1109,13 +1109,13 @@ m68hc11_elf_relax_section (bfd *abfd, asection *sec, free_extsyms = NULL; } - return TRUE; + return true; error_return: free (free_relocs); free (free_contents); free (free_extsyms); - return FALSE; + return false; } /* Delete some bytes from a section while relaxing. */ diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c index 728ac2565a..c6e40d27dd 100644 --- a/bfd/elf32-m68hc12.c +++ b/bfd/elf32-m68hc12.c @@ -32,7 +32,7 @@ /* Relocation functions. */ static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean m68hc11_info_to_howto_rel +static bool m68hc11_info_to_howto_rel (bfd *, arelent *, Elf_Internal_Rela *); /* Trampoline generation. */ @@ -109,90 +109,90 @@ static reloc_howto_type elf_m68hc11_howto_table[] = { 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation */ HOWTO (R_M68HC11_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation (upper address) */ HOWTO (R_M68HC11_HI8, /* type */ 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_HI8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation (upper address) */ HOWTO (R_M68HC11_LO8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_LO8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit PC-rel relocation */ HOWTO (R_M68HC11_PCREL_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_PCREL_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit absolute relocation */ HOWTO (R_M68HC11_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont /*bitfield */ , /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. This one is never used for the code relocation. It's used by gas for -gstabs generation. */ @@ -200,120 +200,120 @@ static reloc_howto_type elf_m68hc11_howto_table[] = { 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 3 bit absolute relocation */ HOWTO (R_M68HC11_3B, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 3, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_4B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x003, /* src_mask */ 0x003, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit PC-rel relocation */ HOWTO (R_M68HC11_PCREL_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_PCREL_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO (R_M68HC11_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_M68HC11_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_M68HC11_GNU_VTENTRY, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_M68HC11_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24 bit relocation */ HOWTO (R_M68HC11_24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m68hc11_elf_special_reloc, /* special_function */ "R_M68HC12_24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16-bit low relocation */ HOWTO (R_M68HC11_LO16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m68hc11_elf_special_reloc,/* special_function */ "R_M68HC12_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A page relocation */ HOWTO (R_M68HC11_PAGE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m68hc11_elf_special_reloc,/* special_function */ "R_M68HC12_PAGE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (14), @@ -322,105 +322,105 @@ static reloc_howto_type elf_m68hc11_howto_table[] = { 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_16B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 9 bit PC-rel relocation. */ HOWTO (R_M68HC12_PCREL_9, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize (result is >>1) */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_PCREL_9", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfe00, /* src_mask */ 0x01ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 10 bit PC-rel relocation. */ HOWTO (R_M68HC12_PCREL_10, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize (result is >>1) */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_PCREL_10", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xfc00, /* src_mask */ 0x03ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 8 bit absolute relocation (upper address). */ HOWTO (R_M68HC12_HI8XG, /* type */ 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_HI8XG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation (lower address). */ HOWTO (R_M68HC12_LO8XG, /* type */ 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_M68HC12_LO8XG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Mark beginning of a jump instruction (any form). */ HOWTO (R_M68HC11_RL_JUMP, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m68hc11_elf_ignore_reloc, /* special_function */ "R_M68HC12_RL_JUMP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Mark beginning of Gcc relaxation group instruction. */ HOWTO (R_M68HC11_RL_GROUP, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ m68hc11_elf_ignore_reloc, /* special_function */ "R_M68HC12_RL_GROUP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* Map BFD reloc types to M68HC11 ELF reloc types. */ @@ -497,7 +497,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an M68HC11 ELF reloc. */ -static bfd_boolean +static bool m68hc11_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -510,17 +510,17 @@ m68hc11_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_m68hc11_howto_table[r_type]; - return TRUE; + return true; } /* Far trampoline generation. */ /* Build a 68HC12 trampoline stub. */ -static bfd_boolean +static bool m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct elf32_m68hc11_stub_hash_entry *stub_entry; @@ -576,13 +576,13 @@ m68hc12_elf_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) bfd_put_16 (stub_bfd, htab->pinfo.trampoline_addr, loc + 1); bfd_put_8 (stub_bfd, phys_page, loc + 3); - return TRUE; + return true; } /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool m68hc12_elf_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UNUSED) { @@ -592,7 +592,7 @@ m68hc12_elf_size_one_stub (struct bfd_hash_entry *gen_entry, stub_entry = (struct elf32_m68hc11_stub_hash_entry *) gen_entry; stub_entry->stub_sec->size += 7; - return TRUE; + return true; } /* Create a 68HC12 ELF linker hash table. */ @@ -612,7 +612,7 @@ m68hc12_elf_bfd_link_hash_table_create (bfd *abfd) return &ret->root.root; } -static bfd_boolean +static bool m68hc12_elf_set_mach_from_flags (bfd *abfd) { flagword flags = elf_elfheader (abfd)->e_flags; @@ -630,9 +630,9 @@ m68hc12_elf_set_mach_from_flags (bfd *abfd) bfd_mach_m6812_default); break; default: - return FALSE; + return false; } - return TRUE; + return true; } /* Specific sections: diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c index 6b34b2051f..d000404e26 100644 --- a/bfd/elf32-m68hc1x.c +++ b/bfd/elf32-m68hc1x.c @@ -46,7 +46,7 @@ static void m68hc11_elf_set_symbol (bfd* abfd, struct bfd_link_info *info, const char* name, bfd_vma value, asection* sec); -static bfd_boolean m68hc11_elf_export_one_stub +static bool m68hc11_elf_export_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg); static void scan_sections_for_abi (bfd*, asection*, void *); @@ -54,7 +54,7 @@ static void scan_sections_for_abi (bfd*, asection*, void *); struct m68hc11_scan_param { struct m68hc11_page_info* pinfo; - bfd_boolean use_memory_banks; + bool use_memory_banks; }; @@ -158,7 +158,7 @@ m68hc12_add_stub (const char *stub_name, asection *section, /* Enter this entry into the linker stub hash table. */ stub_entry = m68hc12_stub_hash_lookup (htab->stub_hash_table, stub_name, - TRUE, FALSE); + true, false); if (stub_entry == NULL) { /* xgettext:c-format */ @@ -182,7 +182,7 @@ m68hc12_add_stub (const char *stub_name, asection *section, file. We use it for identify far symbols and force a loading of the trampoline handler. */ -bfd_boolean +bool elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep ATTRIBUTE_UNUSED, @@ -196,7 +196,7 @@ elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, h = (struct elf_link_hash_entry *) bfd_link_hash_lookup (info->hash, "__far_trampoline", - FALSE, FALSE, FALSE); + false, false, false); if (h == NULL) { struct bfd_link_hash_entry* entry = NULL; @@ -206,11 +206,11 @@ elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, BSF_GLOBAL, bfd_und_section_ptr, (bfd_vma) 0, (const char*) NULL, - FALSE, FALSE, &entry); + false, false, &entry); } } - return TRUE; + return true; } /* Merge non-visibility st_other attributes, STO_M68HC12_FAR and @@ -219,8 +219,8 @@ elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, void elf32_m68hc11_merge_symbol_attribute (struct elf_link_hash_entry *h, unsigned int st_other, - bfd_boolean definition, - bfd_boolean dynamic ATTRIBUTE_UNUSED) + bool definition, + bool dynamic ATTRIBUTE_UNUSED) { if (definition) h->other = ((st_other & ~ELF_ST_VISIBILITY (-1)) @@ -325,7 +325,7 @@ elf32_m68hc11_setup_section_lists (bfd *output_bfd, struct bfd_link_info *info) PC-relative calls to a target that is unreachable with a "bl" instruction. */ -bfd_boolean +bool elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info, asection * (*add_stub_section) (const char*, asection*)) @@ -339,7 +339,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd, struct m68hc11_elf_link_hash_table *htab = m68hc11_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Stash our params away. */ htab->stub_bfd = stub_bfd; @@ -357,7 +357,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd, amt = sizeof (Elf_Internal_Sym *) * bfd_count; all_local_syms = (Elf_Internal_Sym **) bfd_zmalloc (amt); if (all_local_syms == NULL) - return FALSE; + return false; /* Walk over all the input BFDs, swapping in local symbols. */ for (input_bfd = info->input_bfds, bfd_indx = 0; @@ -384,7 +384,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd, if (local_syms == NULL) { free (all_local_syms); - return FALSE; + return false; } all_local_syms[bfd_indx] = local_syms; @@ -459,7 +459,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd, { /* It's a local symbol. */ Elf_Internal_Shdr *hdr; - bfd_boolean is_far; + bool is_far; sym = local_syms + r_indx; is_far = (sym && (sym->st_other & STO_M68HC12_FAR)); @@ -524,7 +524,7 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd, stub_entry = m68hc12_stub_hash_lookup (htab->stub_hash_table, stub_name, - FALSE, FALSE); + false, false); if (stub_entry == NULL) { if (add_stub_section == 0) @@ -564,27 +564,27 @@ elf32_m68hc11_size_stubs (bfd *output_bfd, bfd *stub_bfd, bfd_hash_traverse (htab->stub_hash_table, htab->size_one_stub, htab); } free (all_local_syms); - return TRUE; + return true; error_ret_free_local: free (all_local_syms); - return FALSE; + return false; } /* Export the trampoline addresses in the symbol table. */ -static bfd_boolean +static bool m68hc11_elf_export_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct bfd_link_info *info; struct m68hc11_elf_link_hash_table *htab; struct elf32_m68hc11_stub_hash_entry *stub_entry; char* name; - bfd_boolean result; + bool result; info = (struct bfd_link_info *) in_arg; htab = m68hc11_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Massage our args to the form they really have. */ stub_entry = (struct elf32_m68hc11_stub_hash_entry *) gen_entry; @@ -611,7 +611,7 @@ m68hc11_elf_set_symbol (bfd *abfd, struct bfd_link_info *info, struct elf_link_hash_entry *h; h = (struct elf_link_hash_entry *) - bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, FALSE); + bfd_link_hash_lookup (info->hash, name, false, false, false); if (h == NULL) { _bfd_generic_link_add_one_symbol (info, abfd, @@ -620,7 +620,7 @@ m68hc11_elf_set_symbol (bfd *abfd, struct bfd_link_info *info, sec, value, (const char*) NULL, - TRUE, FALSE, NULL); + true, false, NULL); } else { @@ -636,7 +636,7 @@ m68hc11_elf_set_symbol (bfd *abfd, struct bfd_link_info *info, table. This function is called via m68hc12elf_finish in the linker. */ -bfd_boolean +bool elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info) { asection *stub_sec; @@ -647,7 +647,7 @@ elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info) m68hc11_elf_get_bank_parameters (info); htab = m68hc11_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; for (stub_sec = htab->stub_bfd->sections; stub_sec != NULL; @@ -659,7 +659,7 @@ elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info) size = stub_sec->size; stub_sec->contents = (unsigned char *) bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) - return FALSE; + return false; stub_sec->size = 0; } @@ -672,7 +672,7 @@ elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info) are mapped. This is used by gdb and the simulator to obtain the information. It can be used by programs to burn the eprom at the good addresses. */ - param.use_memory_banks = FALSE; + param.use_memory_banks = false; param.pinfo = &htab->pinfo; bfd_map_over_sections (abfd, scan_sections_for_abi, ¶m); if (param.use_memory_banks) @@ -688,7 +688,7 @@ elf32_m68hc11_build_stubs (bfd *abfd, struct bfd_link_info *info) bfd_abs_section_ptr); } - return TRUE; + return true; } void @@ -714,7 +714,7 @@ m68hc11_elf_get_bank_parameters (struct bfd_link_info *info) pinfo->bank_size = 1 << M68HC12_BANK_SHIFT; h = bfd_link_hash_lookup (info->hash, BFD_M68HC11_BANK_START_NAME, - FALSE, FALSE, TRUE); + false, false, true); if (h != (struct bfd_link_hash_entry*) NULL && h->type == bfd_link_hash_defined) pinfo->bank_physical = (h->u.def.value @@ -722,7 +722,7 @@ m68hc11_elf_get_bank_parameters (struct bfd_link_info *info) + h->u.def.section->output_offset); h = bfd_link_hash_lookup (info->hash, BFD_M68HC11_BANK_VIRTUAL_NAME, - FALSE, FALSE, TRUE); + false, false, true); if (h != (struct bfd_link_hash_entry*) NULL && h->type == bfd_link_hash_defined) pinfo->bank_virtual = (h->u.def.value @@ -730,7 +730,7 @@ m68hc11_elf_get_bank_parameters (struct bfd_link_info *info) + h->u.def.section->output_offset); h = bfd_link_hash_lookup (info->hash, BFD_M68HC11_BANK_SIZE_NAME, - FALSE, FALSE, TRUE); + false, false, true); if (h != (struct bfd_link_hash_entry*) NULL && h->type == bfd_link_hash_defined) pinfo->bank_size = (h->u.def.value @@ -745,8 +745,8 @@ m68hc11_elf_get_bank_parameters (struct bfd_link_info *info) pinfo->bank_physical_end = pinfo->bank_physical + pinfo->bank_size; pinfo->bank_param_initialized = 1; - h = bfd_link_hash_lookup (info->hash, "__far_trampoline", FALSE, - FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "__far_trampoline", false, + false, true); if (h != (struct bfd_link_hash_entry*) NULL && h->type == bfd_link_hash_defined) pinfo->trampoline_addr = (h->u.def.value @@ -845,7 +845,7 @@ m68hc11_elf_special_reloc (bfd *abfd ATTRIBUTE_UNUSED, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -bfd_boolean +bool elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -855,7 +855,7 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela * rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -884,22 +884,22 @@ elf32_m68hc11_check_relocs (bfd *abfd, struct bfd_link_info *info, Reconstruct it for later use during GC. */ case R_M68HC11_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_M68HC11_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } -static bfd_boolean ATTRIBUTE_PRINTF (6, 7) +static bool ATTRIBUTE_PRINTF (6, 7) reloc_warning (struct bfd_link_info *info, const char *name, bfd *input_bfd, asection *input_section, const Elf_Internal_Rela *rel, const char *fmt, ...) @@ -914,12 +914,12 @@ reloc_warning (struct bfd_link_info *info, const char *name, bfd *input_bfd, if (ret < 0) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } info->callbacks->warning (info, buf, name, input_bfd, input_section, rel->r_offset); free (buf); - return TRUE; + return true; } /* Relocate a 68hc11/68hc12 ELF section. */ @@ -946,7 +946,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, htab = m68hc11_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Get memory bank parameters. */ m68hc11_elf_get_bank_parameters (info); @@ -969,9 +969,9 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, bfd_vma phys_addr; bfd_vma insn_addr; bfd_vma insn_page; - bfd_boolean is_far = FALSE; - bfd_boolean is_xgate_symbol = FALSE; - bfd_boolean is_section_symbol = FALSE; + bool is_far = false; + bool is_xgate_symbol = false; + bool is_section_symbol = false; struct elf_link_hash_entry *h; bfd_vma val; const char *msg; @@ -1003,7 +1003,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1044,13 +1044,13 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, struct elf32_m68hc11_stub_hash_entry* stub; stub = m68hc12_stub_hash_lookup (htab->stub_hash_table, - name, FALSE, FALSE); + name, false, false); if (stub) { relocation = stub->stub_offset + stub->stub_sec->output_section->vma + stub->stub_sec->output_offset; - is_far = FALSE; + is_far = false; } } @@ -1136,7 +1136,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, _("reference to the far symbol `%s' using a " "wrong relocation may result in incorrect " "execution"), name)) - return FALSE; + return false; } /* Get virtual address of instruction having the relocation. */ @@ -1169,7 +1169,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, "you must manually offset the address, " "and possibly manage the page, in your " "code."), (long) phys_addr)) - return FALSE; + return false; break; } } @@ -1188,7 +1188,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, (long) insn_page, (long) m68hc11_phys_addr (pinfo, insn_addr), (long) insn_addr)) - return FALSE; + return false; break; } @@ -1199,7 +1199,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, "in the normal address space at %04lx"), (long) phys_page, (long) phys_addr, (long) insn_addr)) - return FALSE; + return false; relocation = phys_addr; break; } @@ -1235,7 +1235,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, "shared RAM(0x2000-0x4000), therefore " "you must manually offset the address " "in your code"), (long) phys_addr)) - return FALSE; + return false; break; } } @@ -1265,7 +1265,7 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -1292,42 +1292,42 @@ elf32_m68hc11_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* Set and control ELF flags in ELF header. */ -bfd_boolean +bool _bfd_m68hc11_elf_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -bfd_boolean +bool _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword old_flags; flagword new_flags; - bfd_boolean ok = TRUE; + bool ok = true; /* Check if we have the same endianness */ if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; new_flags = elf_elfheader (ibfd)->e_flags; elf_elfheader (obfd)->e_flags |= new_flags & EF_M68HC11_ABI; @@ -1335,7 +1335,7 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (! elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; elf_elfheader (obfd)->e_ident[EI_CLASS] = elf_elfheader (ibfd)->e_ident[EI_CLASS]; @@ -1345,10 +1345,10 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd))) - return FALSE; + return false; } - return TRUE; + return true; } /* Check ABI compatibility. */ @@ -1357,14 +1357,14 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: linking files compiled for 16-bit integers (-mshort) " "and others for 32-bit integers"), ibfd); - ok = FALSE; + ok = false; } if ((new_flags & E_M68HC11_F64) != (old_flags & E_M68HC11_F64)) { _bfd_error_handler (_("%pB: linking files compiled for 32-bit double (-fshort-double) " "and others for 64-bit double"), ibfd); - ok = FALSE; + ok = false; } /* Processor compatibility. */ @@ -1373,7 +1373,7 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: linking files compiled for HCS12 with " "others compiled for HC12"), ibfd); - ok = FALSE; + ok = false; } new_flags = ((new_flags & ~EF_M68HC11_MACH_MASK) | (EF_M68HC11_MERGE_MACH (new_flags, old_flags))); @@ -1390,19 +1390,19 @@ _bfd_m68hc11_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB: uses different e_flags (%#x) fields than previous modules (%#x)"), ibfd, new_flags, old_flags); - ok = FALSE; + ok = false; } if (! ok) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } -bfd_boolean +bool _bfd_m68hc11_elf_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = (FILE *) ptr; @@ -1442,7 +1442,7 @@ _bfd_m68hc11_elf_print_private_bfd_data (bfd *abfd, void *ptr) fputc ('\n', file); - return TRUE; + return true; } static void scan_sections_for_abi (bfd *abfd ATTRIBUTE_UNUSED, @@ -1451,30 +1451,30 @@ static void scan_sections_for_abi (bfd *abfd ATTRIBUTE_UNUSED, struct m68hc11_scan_param* p = (struct m68hc11_scan_param*) arg; if (asect->vma >= p->pinfo->bank_virtual) - p->use_memory_banks = TRUE; + p->use_memory_banks = true; } /* Tweak the OSABI field of the elf header. */ -bfd_boolean +bool elf32_m68hc11_init_file_header (bfd *abfd, struct bfd_link_info *link_info) { struct m68hc11_scan_param param; struct m68hc11_elf_link_hash_table *htab; if (!_bfd_elf_init_file_header (abfd, link_info)) - return FALSE; + return false; if (link_info == NULL) - return TRUE; + return true; htab = m68hc11_elf_hash_table (link_info); if (htab == NULL) - return TRUE; + return true; m68hc11_elf_get_bank_parameters (link_info); - param.use_memory_banks = FALSE; + param.use_memory_banks = false; param.pinfo = & htab->pinfo; bfd_map_over_sections (abfd, scan_sections_for_abi, ¶m); @@ -1486,5 +1486,5 @@ elf32_m68hc11_init_file_header (bfd *abfd, struct bfd_link_info *link_info) i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_flags |= E_M68HC12_BANKS; } - return TRUE; + return true; } diff --git a/bfd/elf32-m68hc1x.h b/bfd/elf32-m68hc1x.h index 419b22cb78..ee6987f128 100644 --- a/bfd/elf32-m68hc1x.h +++ b/bfd/elf32-m68hc1x.h @@ -33,10 +33,10 @@ #define BFD_M68HC11_BANK_VIRTUAL_NAME "__bank_virtual" /* Set and control ELF flags in ELF header. */ -extern bfd_boolean _bfd_m68hc11_elf_merge_private_bfd_data +extern bool _bfd_m68hc11_elf_merge_private_bfd_data (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_m68hc11_elf_set_private_flags (bfd*,flagword); -extern bfd_boolean _bfd_m68hc11_elf_print_private_bfd_data (bfd*, void*); +extern bool _bfd_m68hc11_elf_set_private_flags (bfd*,flagword); +extern bool _bfd_m68hc11_elf_print_private_bfd_data (bfd*, void*); /* This hash entry is used to record a trampoline that must be generated to call a far function using a normal calling convention ('jsr'). @@ -120,8 +120,8 @@ struct m68hc11_elf_link_hash_table int top_index; asection **input_list; - bfd_boolean (* size_one_stub) (struct bfd_hash_entry*, void*); - bfd_boolean (* build_one_stub) (struct bfd_hash_entry*, void*); + bool (* size_one_stub) (struct bfd_hash_entry*, void*); + bool (* build_one_stub) (struct bfd_hash_entry*, void*); }; /* Get the Sparc64 ELF linker hash table from a link_info structure. */ @@ -158,7 +158,7 @@ bfd_reloc_status_type m68hc11_elf_special_reloc asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message); -bfd_boolean elf32_m68hc11_check_relocs +bool elf32_m68hc11_check_relocs (bfd * abfd, struct bfd_link_info * info, asection * sec, const Elf_Internal_Rela * relocs); int elf32_m68hc11_relocate_section @@ -167,24 +167,24 @@ int elf32_m68hc11_relocate_section bfd_byte *contents, Elf_Internal_Rela *relocs, Elf_Internal_Sym *local_syms, asection **local_sections); -bfd_boolean elf32_m68hc11_add_symbol_hook +bool elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep, flagword *flagsp, asection **secp, bfd_vma *valp); void elf32_m68hc11_merge_symbol_attribute - (struct elf_link_hash_entry *, unsigned int, bfd_boolean, bfd_boolean); + (struct elf_link_hash_entry *, unsigned int, bool, bool); /* Tweak the OSABI field of the elf header. */ -extern bfd_boolean elf32_m68hc11_init_file_header (bfd*, struct bfd_link_info*); +extern bool elf32_m68hc11_init_file_header (bfd*, struct bfd_link_info*); int elf32_m68hc11_setup_section_lists (bfd *, struct bfd_link_info *); -bfd_boolean elf32_m68hc11_size_stubs +bool elf32_m68hc11_size_stubs (bfd *, bfd *, struct bfd_link_info *, asection * (*) (const char *, asection *)); -bfd_boolean elf32_m68hc11_build_stubs (bfd* abfd, struct bfd_link_info *); +bool elf32_m68hc11_build_stubs (bfd* abfd, struct bfd_link_info *); #endif diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index edbc3e9d29..3b4565c5b2 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -28,322 +28,322 @@ #include "cpu-m68k.h" #include "elf32-m68k.h" -static bfd_boolean +static bool elf_m68k_discard_copies (struct elf_link_hash_entry *, void *); static reloc_howto_type howto_table[] = { - HOWTO(R_68K_NONE, 0, 3, 0, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_NONE", FALSE, 0, 0x00000000,FALSE), - HOWTO(R_68K_32, 0, 2,32, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_32", FALSE, 0, 0xffffffff,FALSE), - HOWTO(R_68K_16, 0, 1,16, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_16", FALSE, 0, 0x0000ffff,FALSE), - HOWTO(R_68K_8, 0, 0, 8, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_8", FALSE, 0, 0x000000ff,FALSE), - HOWTO(R_68K_PC32, 0, 2,32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_PC32", FALSE, 0, 0xffffffff,TRUE), - HOWTO(R_68K_PC16, 0, 1,16, TRUE, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PC16", FALSE, 0, 0x0000ffff,TRUE), - HOWTO(R_68K_PC8, 0, 0, 8, TRUE, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PC8", FALSE, 0, 0x000000ff,TRUE), - HOWTO(R_68K_GOT32, 0, 2,32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_GOT32", FALSE, 0, 0xffffffff,TRUE), - HOWTO(R_68K_GOT16, 0, 1,16, TRUE, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT16", FALSE, 0, 0x0000ffff,TRUE), - HOWTO(R_68K_GOT8, 0, 0, 8, TRUE, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT8", FALSE, 0, 0x000000ff,TRUE), - HOWTO(R_68K_GOT32O, 0, 2,32, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_GOT32O", FALSE, 0, 0xffffffff,FALSE), - HOWTO(R_68K_GOT16O, 0, 1,16, FALSE,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT16O", FALSE, 0, 0x0000ffff,FALSE), - HOWTO(R_68K_GOT8O, 0, 0, 8, FALSE,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT8O", FALSE, 0, 0x000000ff,FALSE), - HOWTO(R_68K_PLT32, 0, 2,32, TRUE, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_PLT32", FALSE, 0, 0xffffffff,TRUE), - HOWTO(R_68K_PLT16, 0, 1,16, TRUE, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT16", FALSE, 0, 0x0000ffff,TRUE), - HOWTO(R_68K_PLT8, 0, 0, 8, TRUE, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT8", FALSE, 0, 0x000000ff,TRUE), - HOWTO(R_68K_PLT32O, 0, 2,32, FALSE,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_PLT32O", FALSE, 0, 0xffffffff,FALSE), - HOWTO(R_68K_PLT16O, 0, 1,16, FALSE,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT16O", FALSE, 0, 0x0000ffff,FALSE), - HOWTO(R_68K_PLT8O, 0, 0, 8, FALSE,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT8O", FALSE, 0, 0x000000ff,FALSE), - HOWTO(R_68K_COPY, 0, 0, 0, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_COPY", FALSE, 0, 0xffffffff,FALSE), - HOWTO(R_68K_GLOB_DAT, 0, 2,32, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_GLOB_DAT", FALSE, 0, 0xffffffff,FALSE), - HOWTO(R_68K_JMP_SLOT, 0, 2,32, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_JMP_SLOT", FALSE, 0, 0xffffffff,FALSE), - HOWTO(R_68K_RELATIVE, 0, 2,32, FALSE,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_RELATIVE", FALSE, 0, 0xffffffff,FALSE), + HOWTO(R_68K_NONE, 0, 3, 0, false,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_NONE", false, 0, 0x00000000,false), + HOWTO(R_68K_32, 0, 2,32, false,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_32", false, 0, 0xffffffff,false), + HOWTO(R_68K_16, 0, 1,16, false,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_16", false, 0, 0x0000ffff,false), + HOWTO(R_68K_8, 0, 0, 8, false,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_8", false, 0, 0x000000ff,false), + HOWTO(R_68K_PC32, 0, 2,32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_PC32", false, 0, 0xffffffff,true), + HOWTO(R_68K_PC16, 0, 1,16, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PC16", false, 0, 0x0000ffff,true), + HOWTO(R_68K_PC8, 0, 0, 8, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PC8", false, 0, 0x000000ff,true), + HOWTO(R_68K_GOT32, 0, 2,32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_GOT32", false, 0, 0xffffffff,true), + HOWTO(R_68K_GOT16, 0, 1,16, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT16", false, 0, 0x0000ffff,true), + HOWTO(R_68K_GOT8, 0, 0, 8, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT8", false, 0, 0x000000ff,true), + HOWTO(R_68K_GOT32O, 0, 2,32, false,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_GOT32O", false, 0, 0xffffffff,false), + HOWTO(R_68K_GOT16O, 0, 1,16, false,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT16O", false, 0, 0x0000ffff,false), + HOWTO(R_68K_GOT8O, 0, 0, 8, false,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_GOT8O", false, 0, 0x000000ff,false), + HOWTO(R_68K_PLT32, 0, 2,32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_PLT32", false, 0, 0xffffffff,true), + HOWTO(R_68K_PLT16, 0, 1,16, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT16", false, 0, 0x0000ffff,true), + HOWTO(R_68K_PLT8, 0, 0, 8, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT8", false, 0, 0x000000ff,true), + HOWTO(R_68K_PLT32O, 0, 2,32, false,0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_68K_PLT32O", false, 0, 0xffffffff,false), + HOWTO(R_68K_PLT16O, 0, 1,16, false,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT16O", false, 0, 0x0000ffff,false), + HOWTO(R_68K_PLT8O, 0, 0, 8, false,0, complain_overflow_signed, bfd_elf_generic_reloc, "R_68K_PLT8O", false, 0, 0x000000ff,false), + HOWTO(R_68K_COPY, 0, 0, 0, false,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_COPY", false, 0, 0xffffffff,false), + HOWTO(R_68K_GLOB_DAT, 0, 2,32, false,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_GLOB_DAT", false, 0, 0xffffffff,false), + HOWTO(R_68K_JMP_SLOT, 0, 2,32, false,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_JMP_SLOT", false, 0, 0xffffffff,false), + HOWTO(R_68K_RELATIVE, 0, 2,32, false,0, complain_overflow_dont, bfd_elf_generic_reloc, "R_68K_RELATIVE", false, 0, 0xffffffff,false), /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_68K_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_68K_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), + false), /* GNU extension to record C++ vtable member usage. */ HOWTO (R_68K_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_68K_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), + false), /* TLS general dynamic variable reference. */ HOWTO (R_68K_TLS_GD32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_GD32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_GD16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_GD16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_GD8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_GD8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_68K_TLS_LDM32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LDM32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_LDM16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LDM16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_LDM8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LDM8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_LDO32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LDO32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_LDO16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LDO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_LDO8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LDO8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS initial execution variable reference. */ HOWTO (R_68K_TLS_IE32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_IE32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_IE16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_IE16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_IE8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_IE8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local execution variable reference. */ HOWTO (R_68K_TLS_LE32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LE32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_LE16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LE16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_LE8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_LE8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD dynamic relocations. */ HOWTO (R_68K_TLS_DTPMOD32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_DTPMOD32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_DTPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_DTPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_68K_TLS_TPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_68K_TLS_TPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; -static bfd_boolean +static bool rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int indx = ELF32_R_TYPE (dst->r_info); @@ -354,10 +354,10 @@ rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, indx); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &howto_table[indx]; - return TRUE; + return true; } #define elf_info_to_howto rtype_to_howto @@ -756,7 +756,7 @@ elf_m68k_reloc_got_type (enum elf_m68k_reloc_type r_type) return R_68K_TLS_IE32; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); return 0; } } @@ -782,7 +782,7 @@ elf_m68k_reloc_got_offset_size (enum elf_m68k_reloc_type r_type) return R_8; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); return 0; } } @@ -804,14 +804,14 @@ elf_m68k_reloc_got_n_slots (enum elf_m68k_reloc_type r_type) return 2; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); return 0; } } /* Return TRUE if relocation R_TYPE is a TLS one. */ -static bfd_boolean +static bool elf_m68k_reloc_tls_p (enum elf_m68k_reloc_type r_type) { switch (r_type) @@ -822,10 +822,10 @@ elf_m68k_reloc_tls_p (enum elf_m68k_reloc_type r_type) case R_68K_TLS_IE32: case R_68K_TLS_IE16: case R_68K_TLS_IE8: case R_68K_TLS_LE32: case R_68K_TLS_LE16: case R_68K_TLS_LE8: case R_68K_TLS_DTPMOD32: case R_68K_TLS_DTPREL32: case R_68K_TLS_TPREL32: - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -895,13 +895,13 @@ struct elf_m68k_link_hash_table /* True, if GP is loaded within each function which uses it. Set to TRUE when GOT negative offsets or multi-GOT is enabled. */ - bfd_boolean local_gp_p; + bool local_gp_p; /* Switch controlling use of negative offsets to double the size of GOTs. */ - bfd_boolean use_neg_got_offsets_p; + bool use_neg_got_offsets_p; /* Switch controlling generation of multiple GOTs. */ - bfd_boolean allow_multigot_p; + bool allow_multigot_p; /* Multi-GOT data structure. */ struct elf_m68k_multi_got multi_got_; @@ -992,7 +992,7 @@ elf_m68k_link_hash_table_create (bfd *abfd) /* Set the right machine number. */ -static bfd_boolean +static bool elf32_m68k_object_p (bfd *abfd) { unsigned int mach = 0; @@ -1047,13 +1047,13 @@ elf32_m68k_object_p (bfd *abfd) mach = bfd_m68k_features_to_mach (features); bfd_default_set_arch_mach (abfd, bfd_arch_m68k, mach); - return TRUE; + return true; } /* Somewhat reverse of elf32_m68k_object_p, this sets the e_flag field based on the machine number. */ -static bfd_boolean +static bool elf_m68k_final_write_processing (bfd *abfd) { int mach = bfd_get_mach (abfd); @@ -1112,23 +1112,23 @@ elf_m68k_final_write_processing (bfd *abfd) /* Keep m68k-specific flags in the ELF header. */ -static bfd_boolean +static bool elf32_m68k_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge object attributes from IBFD into OBFD. Warn if there are conflicting attributes. */ -static bfd_boolean +static bool m68k_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; obj_attribute *in_attr, *in_attrs; obj_attribute *out_attr, *out_attrs; - bfd_boolean ret = TRUE; + bool ret = true; in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU]; out_attrs = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU]; @@ -1156,7 +1156,7 @@ m68k_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB uses hard float, %pB uses soft float"), last_fp, ibfd); - ret = FALSE; + ret = false; } else if (out_fp == 2 && in_fp == 1) { @@ -1164,7 +1164,7 @@ m68k_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB uses hard float, %pB uses soft float"), ibfd, last_fp); - ret = FALSE; + ret = false; } } @@ -1172,7 +1172,7 @@ m68k_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) { out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Merge Tag_compatibility attributes and any common GNU ones. */ @@ -1181,7 +1181,7 @@ m68k_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_m68k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -1195,24 +1195,24 @@ elf32_m68k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) || bfd_get_flavour (obfd) != bfd_target_elf_flavour) /* PR 24523: For non-ELF files do not try to merge any private data, but also do not prevent the link from succeeding. */ - return TRUE; + return true; /* Get the merged machine. This checks for incompatibility between Coldfire & non-Coldfire flags, incompability between different Coldfire ISAs, and incompability between different MAC types. */ - arch_info = bfd_arch_get_compatible (ibfd, obfd, FALSE); + arch_info = bfd_arch_get_compatible (ibfd, obfd, false); if (!arch_info) - return FALSE; + return false; bfd_set_arch_mach (obfd, bfd_arch_m68k, arch_info->mach); if (!m68k_elf_merge_obj_attributes (ibfd, info)) - return FALSE; + return false; in_flags = elf_elfheader (ibfd)->e_flags; if (!elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; out_flags = in_flags; } else @@ -1243,12 +1243,12 @@ elf32_m68k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) } elf_elfheader (obfd)->e_flags = out_flags; - return TRUE; + return true; } /* Display the flags field. */ -static bfd_boolean +static bool elf32_m68k_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -1335,7 +1335,7 @@ elf32_m68k_print_private_bfd_data (bfd *abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } /* Multi-GOT support implementation design: @@ -1881,7 +1881,7 @@ struct elf_m68k_can_merge_gots_arg struct bfd_link_info *info; /* Error flag. */ - bfd_boolean error_p; + bool error_p; }; /* Process a single entry from the small GOT to see if it should be added @@ -1934,7 +1934,7 @@ elf_m68k_can_merge_gots_1 (void **_entry_ptr, void *_arg) arg->info); if (entry == NULL) { - arg->error_p = TRUE; + arg->error_p = true; return 0; } @@ -1949,7 +1949,7 @@ elf_m68k_can_merge_gots_1 (void **_entry_ptr, void *_arg) in BIG GOT to accumulate information from SMALL. INFO is the context where memory should be allocated. */ -static bfd_boolean +static bool elf_m68k_can_merge_gots (struct elf_m68k_got *big, const struct elf_m68k_got *small, struct bfd_link_info *info, @@ -1962,12 +1962,12 @@ elf_m68k_can_merge_gots (struct elf_m68k_got *big, arg_.big = big; arg_.diff = diff; arg_.info = info; - arg_.error_p = FALSE; + arg_.error_p = false; htab_traverse_noresize (small->entries, elf_m68k_can_merge_gots_1, &arg_); if (arg_.error_p) { diff->offset = 0; - return FALSE; + return false; } /* Check for overflow. */ @@ -1975,9 +1975,9 @@ elf_m68k_can_merge_gots (struct elf_m68k_got *big, > ELF_M68K_R_8_MAX_N_SLOTS_IN_GOT (info)) || (big->n_slots[R_16] + arg_.diff->n_slots[R_16] > ELF_M68K_R_8_16_MAX_N_SLOTS_IN_GOT (info))) - return FALSE; + return false; - return TRUE; + return true; } struct elf_m68k_merge_gots_arg @@ -1989,7 +1989,7 @@ struct elf_m68k_merge_gots_arg struct bfd_link_info *info; /* Error flag. */ - bfd_boolean error_p; + bool error_p; }; /* Process a single entry from DIFF got. Add or update corresponding @@ -2009,7 +2009,7 @@ elf_m68k_merge_gots_1 (void **entry_ptr, void *_arg) arg->info); if (to == NULL) { - arg->error_p = TRUE; + arg->error_p = true; return 0; } @@ -2023,7 +2023,7 @@ elf_m68k_merge_gots_1 (void **entry_ptr, void *_arg) /* Merge data from DIFF to BIG. INFO is context where memory should be allocated. */ -static bfd_boolean +static bool elf_m68k_merge_gots (struct elf_m68k_got *big, struct elf_m68k_got *diff, struct bfd_link_info *info) @@ -2036,10 +2036,10 @@ elf_m68k_merge_gots (struct elf_m68k_got *big, /* Merge entries. */ arg_.big = big; arg_.info = info; - arg_.error_p = FALSE; + arg_.error_p = false; htab_traverse_noresize (diff->entries, elf_m68k_merge_gots_1, &arg_); if (arg_.error_p) - return FALSE; + return false; /* Merge counters. */ big->n_slots[R_8] += diff->n_slots[R_8]; @@ -2062,7 +2062,7 @@ elf_m68k_merge_gots (struct elf_m68k_got *big, && (big->n_slots[R_16] <= ELF_M68K_R_8_16_MAX_N_SLOTS_IN_GOT (info)))); - return TRUE; + return true; } struct elf_m68k_finalize_got_offsets_arg @@ -2165,7 +2165,7 @@ elf_m68k_finalize_got_offsets_1 (void **entry_ptr, void *_arg) static void elf_m68k_finalize_got_offsets (struct elf_m68k_got *got, - bfd_boolean use_neg_got_offsets_p, + bool use_neg_got_offsets_p, struct elf_m68k_link_hash_entry **symndx2h, bfd_vma *final_offset, bfd_vma *n_ldm_entries) { @@ -2278,7 +2278,7 @@ struct elf_m68k_partition_multi_got_arg bfd_vma slots_relas_diff; /* Error flag. */ - bfd_boolean error_p; + bool error_p; /* Mapping from global symndx to global symbols. This is used to build lists of got entries for global symbols. */ @@ -2345,7 +2345,7 @@ elf_m68k_partition_multi_got_1 (void **_entry, void *_arg) if (diff->offset == 0) /* Offset set to 0 in the diff_ indicates an error. */ { - arg->error_p = TRUE; + arg->error_p = true; goto final_return; } @@ -2369,7 +2369,7 @@ elf_m68k_partition_multi_got_1 (void **_entry, void *_arg) arg->current_got = elf_m68k_create_empty_got (arg->info); if (arg->current_got == NULL) { - arg->error_p = TRUE; + arg->error_p = true; goto final_return; } @@ -2382,7 +2382,7 @@ elf_m68k_partition_multi_got_1 (void **_entry, void *_arg) { if (!elf_m68k_merge_gots (arg->current_got, diff, arg->info)) { - arg->error_p = TRUE; + arg->error_p = true; goto final_return; } @@ -2416,7 +2416,7 @@ elf_m68k_partition_multi_got_1 (void **_entry, void *_arg) /* Helper function to build symndx2h mapping. */ -static bfd_boolean +static bool elf_m68k_init_symndx2h_1 (struct elf_link_hash_entry *_h, void *_arg) { @@ -2435,14 +2435,14 @@ elf_m68k_init_symndx2h_1 (struct elf_link_hash_entry *_h, arg->symndx2h[h->got_entry_key] = h; } - return TRUE; + return true; } /* Merge GOTs of some BFDs, assign offsets to GOT entries and build lists of GOT entries for global symbols. Calculate sizes of .got and .rela.got sections. */ -static bfd_boolean +static bool elf_m68k_partition_multi_got (struct bfd_link_info *info) { struct elf_m68k_multi_got *multi_got; @@ -2455,7 +2455,7 @@ elf_m68k_partition_multi_got (struct bfd_link_info *info) arg_.info = info; arg_.n_slots = 0; arg_.slots_relas_diff = 0; - arg_.error_p = FALSE; + arg_.error_p = false; if (multi_got->bfd2got != NULL) { @@ -2464,7 +2464,7 @@ elf_m68k_partition_multi_got (struct bfd_link_info *info) arg_.symndx2h = bfd_zmalloc (multi_got->global_symndx * sizeof (*arg_.symndx2h)); if (arg_.symndx2h == NULL) - return FALSE; + return false; elf_link_hash_traverse (elf_hash_table (info), elf_m68k_init_symndx2h_1, &arg_); @@ -2478,7 +2478,7 @@ elf_m68k_partition_multi_got (struct bfd_link_info *info) free (arg_.symndx2h); arg_.symndx2h = NULL; - return FALSE; + return false; } /* Finish up last current_got. */ @@ -2510,7 +2510,7 @@ elf_m68k_partition_multi_got (struct bfd_link_info *info) else BFD_ASSERT (multi_got->bfd2got == NULL); - return TRUE; + return true; } /* Copy any information related to dynamic linking from a pre-existing @@ -2558,7 +2558,7 @@ elf_m68k_copy_indirect_symbol (struct bfd_link_info *info, allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool elf_m68k_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2573,7 +2573,7 @@ elf_m68k_check_relocs (bfd *abfd, struct elf_m68k_got *got; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -2643,7 +2643,7 @@ elf_m68k_check_relocs (bfd *abfd, /* Create the .got section. */ elf_hash_table (info)->dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; } if (got == NULL) @@ -2654,7 +2654,7 @@ elf_m68k_check_relocs (bfd *abfd, = elf_m68k_get_bfd2got_entry (elf_m68k_multi_got (info), abfd, FIND_OR_CREATE, info); if (bfd2got_entry == NULL) - return FALSE; + return false; got = bfd2got_entry->got; BFD_ASSERT (got != NULL); @@ -2668,7 +2668,7 @@ elf_m68k_check_relocs (bfd *abfd, ELF32_R_TYPE (rel->r_info), r_symndx, info); if (got_entry == NULL) - return FALSE; + return false; if (got_entry->u.s1.refcount == 1) { @@ -2678,7 +2678,7 @@ elf_m68k_check_relocs (bfd *abfd, && !h->forced_local) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -2715,7 +2715,7 @@ elf_m68k_check_relocs (bfd *abfd, local symbol. FIXME: does it? How to handle it if it does make sense? */ bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Make sure this symbol is output as a dynamic symbol. */ @@ -2723,7 +2723,7 @@ elf_m68k_check_relocs (bfd *abfd, && !h->forced_local) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } h->needs_plt = 1; @@ -2791,10 +2791,10 @@ elf_m68k_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } if (sec->flags & SEC_READONLY @@ -2837,7 +2837,7 @@ elf_m68k_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&elf_m68k_hash_table (info)->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -2856,7 +2856,7 @@ elf_m68k_check_relocs (bfd *abfd, p = ((struct elf_m68k_pcrel_relocs_copied *) bfd_alloc (dynobj, (bfd_size_type) sizeof *p)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->section = sreloc; @@ -2873,14 +2873,14 @@ elf_m68k_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_68K_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_68K_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; default: @@ -2888,7 +2888,7 @@ elf_m68k_check_relocs (bfd *abfd, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -2933,16 +2933,16 @@ elf_m68k_get_plt_info (bfd *output_bfd) and the input sections have been assigned to output sections. It's a convenient place to determine the PLT style. */ -static bfd_boolean +static bool elf_m68k_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { /* Bind input BFDs to GOTs and calculate sizes of .got and .rela.got sections. */ if (!elf_m68k_partition_multi_got (info)) - return FALSE; + return false; elf_m68k_hash_table (info)->plt_info = elf_m68k_get_plt_info (output_bfd); - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -2951,7 +2951,7 @@ elf_m68k_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2993,7 +2993,7 @@ elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info, linkage table, and we can just do a PCxx reloc instead. */ h->plt.offset = (bfd_vma) -1; h->needs_plt = 0; - return TRUE; + return true; } /* Make sure this symbol is output as a dynamic symbol. */ @@ -3001,7 +3001,7 @@ elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info, && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->root.splt; @@ -3040,7 +3040,7 @@ elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (s != NULL); s->size += sizeof (Elf32_External_Rela); - return TRUE; + return true; } /* Reinitialize the plt offset now that it is not used as a reference @@ -3056,7 +3056,7 @@ elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -3067,12 +3067,12 @@ elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -3106,13 +3106,13 @@ elf_m68k_adjust_dynamic_symbol (struct bfd_link_info *info, /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -3154,7 +3154,7 @@ elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -3175,7 +3175,7 @@ elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { if (s->size != 0) { - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3215,7 +3215,7 @@ elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, contents to zero. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -3234,7 +3234,7 @@ elf_m68k_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, against a readonly section, and set the DF_TEXTREL flag in this case. */ -static bfd_boolean +static bool elf_m68k_discard_copies (struct elf_link_hash_entry *h, void * inf) { @@ -3265,10 +3265,10 @@ elf_m68k_discard_copies (struct elf_link_hash_entry *h, && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } - return TRUE; + return true; } for (s = elf_m68k_hash_entry (h)->pcrel_relocs_copied; @@ -3276,7 +3276,7 @@ elf_m68k_discard_copies (struct elf_link_hash_entry *h, s = s->next) s->section->size -= s->count * sizeof (Elf32_External_Rela); - return TRUE; + return true; } @@ -3353,7 +3353,7 @@ elf_m68k_init_got_entry_static (struct bfd_link_info *info, break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); } } @@ -3404,7 +3404,7 @@ elf_m68k_init_got_entry_local_shared (struct bfd_link_info *info, break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); } /* Offset of the GOT entry. */ @@ -3461,15 +3461,15 @@ elf_m68k_relocate_section (bfd *output_bfd, Elf_Internal_Sym *sym; asection *sec; bfd_vma relocation; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_reloc_status_type r; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; r_type = ELF32_R_TYPE (rel->r_info); if (r_type < 0 || r_type >= (int) R_68K_max) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = howto_table + r_type; @@ -3478,7 +3478,7 @@ elf_m68k_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { @@ -3488,7 +3488,7 @@ elf_m68k_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -3619,7 +3619,7 @@ elf_m68k_relocate_section (bfd *output_bfd, itself. */ && elf_m68k_reloc_got_type (r_type) != R_68K_TLS_LDM32) { - bfd_boolean dyn; + bool dyn; dyn = elf_hash_table (info)->dynamic_sections_created; if (!WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, @@ -3654,7 +3654,7 @@ elf_m68k_relocate_section (bfd *output_bfd, *off_ptr |= 1; } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else if (bfd_link_pic (info)) /* && h == NULL */ /* Process local symbol during dynamic link. */ @@ -3735,7 +3735,7 @@ elf_m68k_relocate_section (bfd *output_bfd, input_bfd, input_section, (uint64_t) rel->r_offset, howto->name); - return FALSE; + return false; } else relocation -= tpoff_base (info); @@ -3768,7 +3768,7 @@ elf_m68k_relocate_section (bfd *output_bfd, relocation = (splt->output_section->vma + splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_68K_PLT8O: @@ -3782,7 +3782,7 @@ elf_m68k_relocate_section (bfd *output_bfd, BFD_ASSERT (splt != NULL); relocation = h->plt.offset; - unresolved_reloc = FALSE; + unresolved_reloc = false; /* This relocation does not use the addend. */ rel->r_addend = 0; @@ -3809,22 +3809,22 @@ elf_m68k_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip, relocate; + bool skip, relocate; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -3849,7 +3849,7 @@ elf_m68k_relocate_section (bfd *output_bfd, if (r_type == R_68K_32) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_68K_RELATIVE); } else @@ -3861,7 +3861,7 @@ elf_m68k_relocate_section (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -3933,7 +3933,7 @@ elf_m68k_relocate_section (bfd *output_bfd, (uint64_t) rel->r_offset, howto->name, h->root.root.string); - return FALSE; + return false; } if (r_symndx != STN_UNDEF @@ -3990,7 +3990,7 @@ elf_m68k_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -4006,12 +4006,12 @@ elf_m68k_relocate_section (bfd *output_bfd, (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"), input_bfd, input_section, (uint64_t) rel->r_offset, name, (int) r); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Install an M_68K_PC32 relocation against VALUE at offset OFFSET @@ -4032,7 +4032,7 @@ elf_m68k_install_pc32 (asection *sec, bfd_vma offset, bfd_vma value) /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_m68k_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -4175,7 +4175,7 @@ elf_m68k_finish_dynamic_symbol (bfd *output_bfd, break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); } elf_m68k_init_got_entry_local_shared (info, @@ -4229,7 +4229,7 @@ elf_m68k_finish_dynamic_symbol (bfd *output_bfd, break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); break; } } @@ -4262,12 +4262,12 @@ elf_m68k_finish_dynamic_symbol (bfd *output_bfd, bfd_elf32_swap_reloca_out (output_bfd, &rela, loc); } - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_m68k_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; @@ -4358,7 +4358,7 @@ elf_m68k_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; - return TRUE; + return true; } /* Given a .data section and a .emreloc in-memory section, store @@ -4368,7 +4368,7 @@ elf_m68k_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) after the add_symbols entry point has been called for all the objects, and before the final_link entry point is called. */ -bfd_boolean +bool bfd_m68k_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info, asection *datasec, asection *relsec, char **errmsg) @@ -4385,7 +4385,7 @@ bfd_m68k_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info, *errmsg = NULL; if (datasec->reloc_count == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -4469,14 +4469,14 @@ bfd_m68k_elf32_create_embedded_relocs (bfd *abfd, struct bfd_link_info *info, free (isymbuf); if (elf_section_data (datasec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) free (isymbuf); if (elf_section_data (datasec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Set target options. */ @@ -4485,35 +4485,35 @@ void bfd_elf_m68k_set_target_options (struct bfd_link_info *info, int got_handling) { struct elf_m68k_link_hash_table *htab; - bfd_boolean use_neg_got_offsets_p; - bfd_boolean allow_multigot_p; - bfd_boolean local_gp_p; + bool use_neg_got_offsets_p; + bool allow_multigot_p; + bool local_gp_p; switch (got_handling) { case 0: /* --got=single. */ - local_gp_p = FALSE; - use_neg_got_offsets_p = FALSE; - allow_multigot_p = FALSE; + local_gp_p = false; + use_neg_got_offsets_p = false; + allow_multigot_p = false; break; case 1: /* --got=negative. */ - local_gp_p = TRUE; - use_neg_got_offsets_p = TRUE; - allow_multigot_p = FALSE; + local_gp_p = true; + use_neg_got_offsets_p = true; + allow_multigot_p = false; break; case 2: /* --got=multigot. */ - local_gp_p = TRUE; - use_neg_got_offsets_p = TRUE; - allow_multigot_p = TRUE; + local_gp_p = true; + use_neg_got_offsets_p = true; + allow_multigot_p = true; break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); return; } @@ -4556,7 +4556,7 @@ elf_m68k_plt_sym_val (bfd_vma i, const asection *plt, /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf_m68k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -4565,7 +4565,7 @@ elf_m68k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 154: /* Linux/m68k */ /* pr_cursig */ @@ -4586,13 +4586,13 @@ elf_m68k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf_m68k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/m68k elf_prpsinfo. */ elf_tdata (abfd)->core->pid @@ -4614,7 +4614,7 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } #define TARGET_BIG_SYM m68k_elf32_vec @@ -4664,6 +4664,6 @@ elf_m68k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) #define elf_backend_rela_normal 1 #define elf_backend_dtrel_excludes_plt 1 -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf32-target.h" diff --git a/bfd/elf32-m68k.h b/bfd/elf32-m68k.h index 91f326c7a0..1c42f5b380 100644 --- a/bfd/elf32-m68k.h +++ b/bfd/elf32-m68k.h @@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -extern bfd_boolean bfd_m68k_elf32_create_embedded_relocs +extern bool bfd_m68k_elf32_create_embedded_relocs (bfd *, struct bfd_link_info *, struct bfd_section *, struct bfd_section *, char **); diff --git a/bfd/elf32-mcore.c b/bfd/elf32-mcore.c index 20185fd131..286e2fdbfa 100644 --- a/bfd/elf32-mcore.c +++ b/bfd/elf32-mcore.c @@ -34,21 +34,21 @@ /* Function to set whether a module needs the -mrelocatable bit set. */ -static bfd_boolean +static bool mcore_elf_set_private_flags (bfd * abfd, flagword flags) { BFD_ASSERT (! elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool mcore_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -57,11 +57,11 @@ mcore_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Check if we have the same endianness. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; @@ -69,7 +69,7 @@ mcore_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (! elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } else if (new_flags == old_flags) @@ -80,7 +80,7 @@ mcore_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* FIXME */ } - return TRUE; + return true; } /* Don't pretend we can deal with unsupported relocs. */ @@ -113,30 +113,30 @@ static reloc_howto_type mcore_elf_howto_raw[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MCORE_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A standard 32 bit relocation. */ HOWTO (R_MCORE_ADDR32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "ADDR32", /* name *//* For compatibility with coff/pe port. */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8 bits + 2 zero bits; jmpi/jsri/lrw instructions. Should not appear in object files. */ @@ -144,15 +144,15 @@ static reloc_howto_type mcore_elf_howto_raw[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mcore_elf_unsupported_reloc, /* special_function */ "R_MCORE_PCRELIMM8BY4",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* bsr/bt/bf/br instructions; 11 bits + 1 zero bit Span 2k instructions == 4k bytes. @@ -161,45 +161,45 @@ static reloc_howto_type mcore_elf_howto_raw[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MCORE_PCRELIMM11BY2",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x7ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 4 bits + 1 zero bit; 'loopt' instruction only; unsupported. */ HOWTO (R_MCORE_PCRELIMM4BY2, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mcore_elf_unsupported_reloc,/* special_function */ "R_MCORE_PCRELIMM4BY2",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32-bit pc-relative. Eventually this will help support PIC code. */ HOWTO (R_MCORE_PCREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MCORE_PCREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Like PCRELIMM11BY2, this relocation indicates that there is a 'jsri' at the specified address. There is a separate relocation @@ -212,59 +212,59 @@ static reloc_howto_type mcore_elf_howto_raw[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MCORE_PCRELJSR_IMM11BY2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x7ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_MCORE_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MCORE_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_MCORE_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_MCORE_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MCORE_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ NULL, /* special_function */ "R_MCORE_RELATIVE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; #ifndef NUM_ELEM @@ -336,7 +336,7 @@ mcore_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for a RCE ELF reloc. */ -static bfd_boolean +static bool mcore_elf_info_to_howto (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -354,11 +354,11 @@ mcore_elf_info_to_howto (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = mcore_elf_howto_table [r_type]; - return TRUE; + return true; } /* The RELOCATE_SECTION function is called by the ELF backend linker @@ -404,7 +404,7 @@ mcore_elf_relocate_section (bfd * output_bfd, struct elf_link_hash_entry ** sym_hashes = elf_sym_hashes (input_bfd); Elf_Internal_Rela * rel = relocs; Elf_Internal_Rela * relend = relocs + input_section->reloc_count; - bfd_boolean ret = TRUE; + bool ret = true; #ifdef DEBUG _bfd_error_handler @@ -441,7 +441,7 @@ mcore_elf_relocate_section (bfd * output_bfd, input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; continue; } @@ -457,7 +457,7 @@ mcore_elf_relocate_section (bfd * output_bfd, howto->name); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; continue; } @@ -470,7 +470,7 @@ mcore_elf_relocate_section (bfd * output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -514,7 +514,7 @@ mcore_elf_relocate_section (bfd * output_bfd, if (r != bfd_reloc_ok) { - ret = FALSE; + ret = false; switch (r) { @@ -580,7 +580,7 @@ mcore_elf_gc_mark_hook (asection *sec, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool mcore_elf_check_relocs (bfd * abfd, struct bfd_link_info * info, asection * sec, @@ -592,7 +592,7 @@ mcore_elf_check_relocs (bfd * abfd, const Elf_Internal_Rela * rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -622,19 +622,19 @@ mcore_elf_check_relocs (bfd * abfd, Reconstruct it for later use during GC. */ case R_MCORE_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_MCORE_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } static const struct bfd_elf_special_section mcore_elf_special_sections[]= diff --git a/bfd/elf32-mep.c b/bfd/elf32-mep.c index 81a984c85e..e8240e8cf1 100644 --- a/bfd/elf32-mep.c +++ b/bfd/elf32-mep.c @@ -30,7 +30,7 @@ /* Private relocation functions. */ #define MEPREL(type, size, bits, right, left, pcrel, overflow, mask) \ - HOWTO (type, right, size, bits, pcrel, left, overflow, bfd_elf_generic_reloc, #type, FALSE, 0, mask, 0) + HOWTO (type, right, size, bits, pcrel, left, overflow, bfd_elf_generic_reloc, #type, false, 0, mask, 0) #define N complain_overflow_dont #define S complain_overflow_signed @@ -185,7 +185,7 @@ mep_lookup_global if (*cache || *warn) return *cache; - h = bfd_link_hash_lookup (mep_info->hash, name, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (mep_info->hash, name, false, false, true); if (h == 0 || h->type != bfd_link_hash_defined) { *warn = ofs + 1; @@ -371,7 +371,7 @@ mep_final_link_relocate /* Set the howto pointer for a MEP ELF reloc. */ -static bfd_boolean +static bool mep_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -385,10 +385,10 @@ mep_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & mep_elf_howto_table [r_type]; - return TRUE; + return true; } /* Relocate a MEP ELF section. @@ -477,7 +477,7 @@ mep_elf_relocate_section } else { - bfd_boolean warned, unresolved_reloc, ignored; + bool warned, unresolved_reloc, ignored; RELOC_FOR_GLOBAL_SYMBOL(info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -515,7 +515,7 @@ mep_elf_relocate_section case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -543,31 +543,31 @@ mep_elf_relocate_section if (warn_tp) info->callbacks->undefined_symbol - (info, "__tpbase", input_bfd, input_section, warn_tp-1, TRUE); + (info, "__tpbase", input_bfd, input_section, warn_tp-1, true); if (warn_sda) info->callbacks->undefined_symbol - (info, "__sdabase", input_bfd, input_section, warn_sda-1, TRUE); + (info, "__sdabase", input_bfd, input_section, warn_sda-1, true); if (warn_sda || warn_tp) - return FALSE; + return false; - return TRUE; + return true; } /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool mep_elf_set_private_flags (bfd * abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -577,7 +577,7 @@ mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Check if we have the same endianness. */ if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; @@ -590,7 +590,7 @@ mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* First call, no flags set. */ if (!elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; old_flags = new_flags; } else if ((new_flags | old_flags) & EF_MEP_LIBRARY) @@ -618,7 +618,7 @@ mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB and %pB are for different cores"), last_ibfd, ibfd); bfd_set_error (bfd_error_invalid_target); - return FALSE; + return false; } /* Make sure they're for the same me_module. Allow basic config to @@ -637,13 +637,13 @@ mep_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB and %pB are for different configurations"), last_ibfd, ibfd); bfd_set_error (bfd_error_invalid_target); - return FALSE; + return false; } } elf_elfheader (obfd)->e_flags = old_flags; last_ibfd = ibfd; - return TRUE; + return true; } /* This will be edited by the MeP configration tool. */ @@ -660,7 +660,7 @@ static const char * core_names[] = "MeP", "MeP-c2", "MeP-c3", "MeP-h1" }; -static bfd_boolean +static bool mep_elf_print_private_bfd_data (bfd * abfd, void * ptr) { FILE * file = (FILE *) ptr; @@ -684,7 +684,7 @@ mep_elf_print_private_bfd_data (bfd * abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } /* Return the machine subcode from the ELF e_flags header. */ @@ -705,29 +705,29 @@ elf32_mep_machine (bfd * abfd) return bfd_mach_mep; } -static bfd_boolean +static bool mep_elf_object_p (bfd * abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_mep, elf32_mep_machine (abfd)); - return TRUE; + return true; } -static bfd_boolean +static bool mep_elf_section_flags (const Elf_Internal_Shdr *hdr) { if (hdr->sh_flags & SHF_MEP_VLIW) hdr->bfd_section->flags |= SEC_MEP_VLIW; - return TRUE; + return true; } -static bfd_boolean +static bool mep_elf_fake_sections (bfd * abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr * hdr, asection * sec) { if (sec->flags & SEC_MEP_VLIW) hdr->sh_flags |= SHF_MEP_VLIW; - return TRUE; + return true; } diff --git a/bfd/elf32-metag.c b/bfd/elf32-metag.c index 20f8dc98a7..82e67eac99 100644 --- a/bfd/elf32-metag.c +++ b/bfd/elf32-metag.c @@ -97,90 +97,90 @@ static reloc_howto_type elf_metag_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_HIADDR16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low order 16 bit absolute. */ HOWTO (R_METAG_LOADDR16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_LOADDR16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit absolute. */ HOWTO (R_METAG_ADDR32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_ADDR32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* No relocation. */ HOWTO (R_METAG_NONE, /* type */ 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 19 bit pc relative */ HOWTO (R_METAG_RELBRANCH, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 5, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_RELBRANCH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00ffffe0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GET/SET offset */ HOWTO (R_METAG_GETSETOFF, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_GETSETOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (6), EMPTY_HOWTO (7), @@ -211,192 +211,192 @@ static reloc_howto_type elf_metag_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_METAG_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_METAG_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High order 16 bit GOT offset */ HOWTO (R_METAG_HI16_GOTOFF, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_HI16_GOTOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low order 16 bit GOT offset */ HOWTO (R_METAG_LO16_GOTOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_LO16_GOTOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GET/SET GOT offset */ HOWTO (R_METAG_GETSET_GOTOFF, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_GETSET_GOTOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GET/SET GOT relative */ HOWTO (R_METAG_GETSET_GOT, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_GETSET_GOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High order 16 bit GOT reference */ HOWTO (R_METAG_HI16_GOTPC, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_HI16_GOTPC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low order 16 bit GOT reference */ HOWTO (R_METAG_LO16_GOTPC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_LO16_GOTPC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High order 16 bit PLT */ HOWTO (R_METAG_HI16_PLT, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_HI16_PLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low order 16 bit PLT */ HOWTO (R_METAG_LO16_PLT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_LO16_PLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_RELBRANCH_PLT, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 5, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_RELBRANCH_PLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00ffffe0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Dummy relocs used by the linker internally. */ HOWTO (R_METAG_GOTOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_GOTOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_PLT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_GOTOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This is used only by the dynamic linker. The symbol should exist both in the object being run and in some shared library. The @@ -407,30 +407,30 @@ static reloc_howto_type elf_metag_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Marks a procedure linkage table entry for a symbol. */ HOWTO (R_METAG_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Used only by the dynamic linker. When the object is run, this longword is set to the load address of the object, plus the @@ -439,242 +439,242 @@ static reloc_howto_type elf_metag_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_LDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_LDO_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_LDO_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_LDO_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_LDO_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Dummy reloc used by the linker internally. */ HOWTO (R_METAG_TLS_LDO, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_LDO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_IE, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_IE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007ff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Dummy reloc used by the linker internally. */ HOWTO (R_METAG_TLS_IENONPIC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_IENONPIC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_IENONPIC_HI16,/* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_IENONPIC_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_IENONPIC_LO16,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_IENONPIC_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_TPOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_TPOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_DTPMOD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_DTPMOD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_DTPOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_DTPOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Dummy reloc used by the linker internally. */ HOWTO (R_METAG_TLS_LE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_LE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_LE_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_LE_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_METAG_TLS_LE_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 3, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_METAG_TLS_LE_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007fff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -857,7 +857,7 @@ tpoff (struct bfd_link_info *info, bfd_vma address) elf_hash_table (info)->tls_sec->alignment_power)); } -static bfd_boolean +static bool metag_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -871,10 +871,10 @@ metag_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & elf_metag_howto_table [r_type]; - return TRUE; + return true; } static reloc_howto_type * @@ -1037,7 +1037,7 @@ elf_metag_link_hash_table_create (bfd *abfd) return NULL; } htab->etab.root.hash_table_free = elf_metag_link_hash_table_free; - htab->etab.dt_pltgot_required = TRUE; + htab->etab.dt_pltgot_required = true; return &htab->etab.root; } @@ -1120,7 +1120,7 @@ metag_get_stub_entry (const asection *input_section, return NULL; hsh = metag_stub_hash_lookup (&htab->bstab, - stub_name, FALSE, FALSE); + stub_name, false, false); if (hh != NULL) hh->hsh_cache = hsh; @@ -1173,7 +1173,7 @@ metag_add_stub (const char *stub_name, /* Enter this entry into the linker stub hash table. */ hsh = metag_stub_hash_lookup (&htab->bstab, stub_name, - TRUE, FALSE); + true, false); if (hsh == NULL) { /* xgettext:c-format */ @@ -1191,7 +1191,7 @@ metag_add_stub (const char *stub_name, /* Check a signed integer value can be represented in the given number of bits. */ -static bfd_boolean +static bool within_signed_range (int value, unsigned int bits) { int min_val = -(1 << (bits - 1)); @@ -1518,7 +1518,7 @@ elf_metag_relocate_section (bfd *output_bfd, else { struct elf_link_hash_entry *eh; - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, eh_syms, @@ -1558,7 +1558,7 @@ elf_metag_relocate_section (bfd *output_bfd, || hh->eh.root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; bfd_byte *loc; /* When generating a shared object, these relocations @@ -1568,17 +1568,17 @@ elf_metag_relocate_section (bfd *output_bfd, sreloc = elf_section_data (input_section)->sreloc; BFD_ASSERT (sreloc != NULL); - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -1601,7 +1601,7 @@ elf_metag_relocate_section (bfd *output_bfd, || ((info->symbolic || hh->eh.dynindx == -1) && hh->eh.def_regular)) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_METAG_RELATIVE); outrel.r_addend = relocation + rel->r_addend; } @@ -1672,13 +1672,13 @@ elf_metag_relocate_section (bfd *output_bfd, case R_METAG_GETSET_GOT: { bfd_vma off; - bfd_boolean do_got = 0; + bool do_got = 0; /* Relocation is to the entry for this symbol in the global offset table. */ if (hh != NULL) { - bfd_boolean dyn; + bool dyn; off = hh->eh.got.offset; dyn = htab->etab.dynamic_sections_created; @@ -1767,7 +1767,7 @@ elf_metag_relocate_section (bfd *output_bfd, indx = 0; if (hh != NULL) { - bfd_boolean dyn; + bool dyn; dyn = htab->etab.dynamic_sections_created; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, @@ -1798,7 +1798,7 @@ elf_metag_relocate_section (bfd *output_bfd, off &= ~1; else { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; Elf_Internal_Rela outrel; bfd_byte *loc = NULL; int cur_off = off; @@ -1812,7 +1812,7 @@ elf_metag_relocate_section (bfd *output_bfd, || ELF_ST_VISIBILITY (hh->eh.other) == STV_DEFAULT || hh->eh.root.type != bfd_link_hash_undefweak)) { - need_relocs = TRUE; + need_relocs = true; loc = htab->etab.srelgot->contents; /* FIXME (CAO): Should this be reloc_count++ ? */ loc += htab->etab.srelgot->reloc_count * sizeof (Elf32_External_Rela); @@ -1859,7 +1859,7 @@ elf_metag_relocate_section (bfd *output_bfd, else _bfd_error_handler (_("%pB(%pA): shared library symbol %s encountered whilst performing a static link"), input_bfd, input_section, name); - return FALSE; + return false; } cur_off += 8; @@ -1914,7 +1914,7 @@ elf_metag_relocate_section (bfd *output_bfd, "%s relocation not permitted in shared object"), input_bfd, input_section, (uint64_t) rel->r_offset, howto->name); - return FALSE; + return false; } else relocation = tpoff (info, relocation); @@ -1977,7 +1977,7 @@ elf_metag_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -2003,13 +2003,13 @@ elf_metag_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Create the .plt and .got sections, and set up our hash table short-cuts to various dynamic sections. */ -static bfd_boolean +static bool elf_metag_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_metag_link_hash_table *htab; @@ -2020,11 +2020,11 @@ elf_metag_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* Don't try to create the .plt and .got twice. */ htab = metag_link_hash_table (info); if (htab->etab.splt != NULL) - return TRUE; + return true; /* Call the generic code to do most of the work. */ if (! _bfd_elf_create_dynamic_sections (abfd, info)) - return FALSE; + return false; /* The header goes at the start of the dynamic .got section, which is placed after the dynamic .got.plt section. ie. The header is @@ -2035,8 +2035,8 @@ elf_metag_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) bh = NULL; if (!(_bfd_generic_link_add_one_symbol (info, abfd, "__GLOBAL_OFFSET_TABLE__", BSF_GLOBAL, htab->etab.sgot, - (bfd_vma) 0, NULL, FALSE, bed->collect, &bh))) - return FALSE; + (bfd_vma) 0, NULL, false, bed->collect, &bh))) + return false; eh = (struct elf_link_hash_entry *) bh; eh->def_regular = 1; eh->type = STT_OBJECT; @@ -2044,11 +2044,11 @@ elf_metag_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (! bfd_link_executable (info) && ! bfd_elf_link_record_dynamic_symbol (info, eh)) - return FALSE; + return false; htab->etab.hgot = eh; - return TRUE; + return true; } /* Look through the relocs for a section during the first phase, and @@ -2056,7 +2056,7 @@ elf_metag_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) table, and dynamic reloc sections. At this point we haven't necessarily read all the input files. */ -static bfd_boolean +static bool elf_metag_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2072,7 +2072,7 @@ elf_metag_check_relocs (bfd *abfd, int tls_type = GOT_UNKNOWN, old_tls_type = GOT_UNKNOWN; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = metag_link_hash_table (info); dynobj = htab->etab.dynobj; @@ -2081,7 +2081,7 @@ elf_metag_check_relocs (bfd *abfd, sreloc = NULL; if (htab == NULL) - return FALSE; + return false; rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) @@ -2099,7 +2099,7 @@ elf_metag_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->etab.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; hh = NULL; } @@ -2135,7 +2135,7 @@ elf_metag_check_relocs (bfd *abfd, if (dynobj == NULL) htab->etab.dynobj = dynobj = abfd; if (!elf_metag_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; break; default: @@ -2184,7 +2184,7 @@ elf_metag_check_relocs (bfd *abfd, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; memset (metag_elf_local_got_tls_type (abfd), GOT_UNKNOWN, symtab_hdr->sh_info); @@ -2251,7 +2251,7 @@ elf_metag_check_relocs (bfd *abfd, (_("%pB: relocation %s against `%s' can not be used when making a shared object; recompile with -fPIC"), abfd, elf_metag_howto_table[r_type].name, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Fall through. */ @@ -2308,12 +2308,12 @@ elf_metag_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->etab.dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, htab->etab.dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } elf_section_data (sec)->sreloc = sreloc; @@ -2343,7 +2343,7 @@ elf_metag_check_relocs (bfd *abfd, hdh_p = ((struct elf_dyn_relocs *) bfd_alloc (dynobj, sizeof *hdh_p)); if (hdh_p == NULL) - return FALSE; + return false; hdh_p->next = *hdh_head; *hdh_head = hdh_p; hdh_p->sec = sec; @@ -2362,19 +2362,19 @@ elf_metag_check_relocs (bfd *abfd, case R_METAG_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, &hh->eh, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_METAG_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, &hh->eh, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } /* Copy the extra info we tack onto an elf_link_hash_entry. */ @@ -2405,7 +2405,7 @@ elf_metag_copy_indirect_symbol (struct bfd_link_info *info, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *eh) { @@ -2432,7 +2432,7 @@ elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info, eh->needs_plt = 0; } - return TRUE; + return true; } else eh->plt.offset = (bfd_vma) -1; @@ -2447,7 +2447,7 @@ elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info, eh->root.u.def.section = def->root.u.def.section; eh->root.u.def.value = def->root.u.def.value; eh->non_got_ref = def->non_got_ref; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2458,18 +2458,18 @@ elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!eh->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { eh->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -2477,7 +2477,7 @@ elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (eh)) { eh->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -2517,7 +2517,7 @@ elf_metag_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for global syms. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) { struct bfd_link_info *info; @@ -2525,7 +2525,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) struct elf_dyn_relocs *hdh_p; if (eh->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (eh->root.type == bfd_link_hash_warning) eh = (struct elf_link_hash_entry *) eh->root.u.i.link; @@ -2542,7 +2542,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) && !eh->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, eh)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), eh)) @@ -2593,7 +2593,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) if (eh->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = metag_elf_hash_entry (eh)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -2602,7 +2602,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) && !eh->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, eh)) - return FALSE; + return false; } s = htab->etab.sgot; @@ -2629,7 +2629,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) eh->got.offset = (bfd_vma) -1; if (eh->dyn_relocs == NULL) - return TRUE; + return true; /* If this is a -Bsymbolic shared link, then we need to discard all space allocated for dynamic pc-relative relocs against symbols @@ -2667,7 +2667,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) && !eh->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, eh)) - return FALSE; + return false; } } } @@ -2689,7 +2689,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) && !eh->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, eh)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -2699,7 +2699,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) } eh->dyn_relocs = NULL; - return TRUE; + return true; keep: ; } @@ -2711,12 +2711,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *eh, void *inf) sreloc->size += hdh_p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2724,7 +2724,7 @@ elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, bfd *dynobj; bfd *ibfd; asection *s; - bfd_boolean relocs; + bool relocs; htab = metag_link_hash_table (info); dynobj = htab->etab.dynobj; @@ -2830,10 +2830,10 @@ elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { - bfd_boolean reloc_section = FALSE; + bool reloc_section = false; if ((s->flags & SEC_LINKER_CREATED) == 0) continue; @@ -2850,12 +2850,12 @@ elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->etab.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ s->reloc_count = 0; - reloc_section = TRUE; + reloc_section = true; } else { @@ -2884,7 +2884,7 @@ elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; else if (reloc_section) { unsigned char *contents = s->contents; @@ -2907,7 +2907,7 @@ elf_metag_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_metag_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *eh, @@ -3097,22 +3097,22 @@ elf_metag_finish_dynamic_symbol (bfd *output_bfd, sym->st_shndx = SHN_ABS; } - return TRUE; + return true; } /* Set the Meta ELF ABI version. */ -static bfd_boolean +static bool elf_metag_init_file_header (bfd *abfd, struct bfd_link_info *link_info) { Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */ if (!_bfd_elf_init_file_header (abfd, link_info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_ident[EI_ABIVERSION] = METAG_ELF_ABI_VERSION; - return TRUE; + return true; } /* Used to decide how to sort relocs in an optimal manner for the @@ -3138,7 +3138,7 @@ elf_metag_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_metag_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3249,7 +3249,7 @@ elf_metag_finish_dynamic_sections (bfd *output_bfd, ->this_hdr.sh_entsize = GOT_ENTRY_SIZE; } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -3323,7 +3323,7 @@ metag_type_of_stub (asection *input_sec, #define ADD_A0_3_A0_3 0x82180000 #define MOV_PC_A0_3 0xa3180ca0 -static bfd_boolean +static bool metag_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct elf_metag_stub_hash_entry *hsh; @@ -3397,17 +3397,17 @@ metag_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) break; default: BFD_FAIL (); - return FALSE; + return false; } stub_sec->size += size; - return TRUE; + return true; } /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool metag_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UNUSED) { struct elf_metag_stub_hash_entry *hsh; @@ -3422,7 +3422,7 @@ metag_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UN size = 12; hsh->stub_sec->size += size; - return TRUE; + return true; } /* Set up various things so that we can make a list of input sections @@ -3537,7 +3537,7 @@ elf_metag_next_input_section (struct bfd_link_info *info, asection *isec) static void group_sections (struct elf_metag_link_hash_table *htab, bfd_size_type stub_group_size, - bfd_boolean stubs_always_before_branch) + bool stubs_always_before_branch) { asection **list = htab->input_list + htab->top_index; do @@ -3550,7 +3550,7 @@ group_sections (struct elf_metag_link_hash_table *htab, asection *curr; asection *prev; bfd_size_type total; - bfd_boolean big_sec; + bool big_sec; curr = tail; total = tail->size; @@ -3661,7 +3661,7 @@ instruction. */ /* See elf32-hppa.c and elf64-ppc.c. */ -bfd_boolean +bool elf_metag_size_stubs(bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info, bfd_signed_vma group_size, @@ -3669,8 +3669,8 @@ elf_metag_size_stubs(bfd *output_bfd, bfd *stub_bfd, void (*layout_sections_again) (void)) { bfd_size_type stub_group_size; - bfd_boolean stubs_always_before_branch; - bfd_boolean stub_changed; + bool stubs_always_before_branch; + bool stub_changed; struct elf_metag_link_hash_table *htab = metag_link_hash_table (info); /* Stash our params away. */ @@ -3703,14 +3703,14 @@ elf_metag_size_stubs(bfd *output_bfd, bfd *stub_bfd, default: if (htab->all_local_syms) goto error_ret_free_local; - return FALSE; + return false; case 0: - stub_changed = FALSE; + stub_changed = false; break; case 1: - stub_changed = TRUE; + stub_changed = true; break; } @@ -3888,7 +3888,7 @@ elf_metag_size_stubs(bfd *output_bfd, bfd *stub_bfd, hsh = metag_stub_hash_lookup (&htab->bstab, stub_name, - FALSE, FALSE); + false, false); if (hsh != NULL) { /* The proper stub has already been created. */ @@ -3907,7 +3907,7 @@ elf_metag_size_stubs(bfd *output_bfd, bfd *stub_bfd, hsh->stub_type = stub_type; hsh->hh = hh; hsh->addend = irela->r_addend; - stub_changed = TRUE; + stub_changed = true; } /* We're done with the internal relocs, free them. */ @@ -3930,22 +3930,22 @@ elf_metag_size_stubs(bfd *output_bfd, bfd *stub_bfd, /* Ask the linker to do its stuff. */ (*htab->layout_sections_again) (); - stub_changed = FALSE; + stub_changed = false; } free (htab->all_local_syms); - return TRUE; + return true; error_ret_free_local: free (htab->all_local_syms); - return FALSE; + return false; } /* Build all the stubs associated with the current output file. The stubs are kept in a hash table attached to the main linker hash table. This function is called via metagelf_finish in the linker. */ -bfd_boolean +bool elf_metag_build_stubs (struct bfd_link_info *info) { asection *stub_sec; @@ -3964,7 +3964,7 @@ elf_metag_build_stubs (struct bfd_link_info *info) size = stub_sec->size; stub_sec->contents = bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) - return FALSE; + return false; stub_sec->size = 0; } @@ -3972,12 +3972,12 @@ elf_metag_build_stubs (struct bfd_link_info *info) table = &htab->bstab; bfd_hash_traverse (table, metag_build_one_stub, info); - return TRUE; + return true; } /* Return TRUE if SYM represents a local label symbol. */ -static bfd_boolean +static bool elf_metag_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { if (name[0] == '$' && name[1] == 'L') diff --git a/bfd/elf32-metag.h b/bfd/elf32-metag.h index 82c41947d0..ade56d4f3b 100644 --- a/bfd/elf32-metag.h +++ b/bfd/elf32-metag.h @@ -28,11 +28,11 @@ extern int elf_metag_setup_section_lists extern void elf_metag_next_input_section (struct bfd_link_info *, asection *); -extern bfd_boolean elf_metag_size_stubs +extern bool elf_metag_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, asection * (*) (const char *, asection *), void (*) (void)); -extern bfd_boolean elf_metag_build_stubs +extern bool elf_metag_build_stubs (struct bfd_link_info *); #endif /* _ELF32_METAG_H */ diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index cfd7b8cf6b..b586858096 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -44,403 +44,403 @@ static reloc_howto_type microblaze_elf_howto_raw[] = 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ NULL, /* Special Function. */ "R_MICROBLAZE_NONE", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* A standard 32 bit relocation. */ HOWTO (R_MICROBLAZE_32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_32", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0xffffffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* A standard PCREL 32 bit relocation. */ HOWTO (R_MICROBLAZE_32_PCREL,/* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_32_PCREL", /* Name. */ - TRUE, /* Partial Inplace. */ + true, /* Partial Inplace. */ 0, /* Source Mask. */ 0xffffffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* A 64 bit PCREL relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_64_PCREL,/* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_64_PCREL", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* The low half of a PCREL 32 bit relocation. */ HOWTO (R_MICROBLAZE_32_PCREL_LO, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_MICROBLAZE_32_PCREL_LO", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* A 64 bit relocation. Table entry not really used. */ HOWTO (R_MICROBLAZE_64, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_64", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* The low half of a 32 bit relocation. */ HOWTO (R_MICROBLAZE_32_LO, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_32_LO", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* Read-only small data section relocation. */ HOWTO (R_MICROBLAZE_SRO32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_SRO32", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* Read-write small data area relocation. */ HOWTO (R_MICROBLAZE_SRW32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_SRW32", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* This reloc does nothing. Used for relaxation. */ HOWTO (R_MICROBLAZE_64_NONE, /* Type. */ 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ NULL, /* Special Function. */ "R_MICROBLAZE_64_NONE",/* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* Symbol Op Symbol relocation. */ HOWTO (R_MICROBLAZE_32_SYM_OP_SYM, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_32_SYM_OP_SYM", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0xffffffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_MICROBLAZE_GNU_VTINHERIT, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain on overflow. */ NULL, /* Special Function. */ "R_MICROBLAZE_GNU_VTINHERIT", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_MICROBLAZE_GNU_VTENTRY, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain on overflow. */ _bfd_elf_rel_vtable_reloc_fn, /* Special Function. */ "R_MICROBLAZE_GNU_VTENTRY", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* A 64 bit GOTPC relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_GOTPC_64, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_MICROBLAZE_GOTPC_64", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* A 64 bit TEXTPCREL relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_TEXTPCREL_64, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_MICROBLAZE_TEXTPCREL_64", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* A 64 bit GOT relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_GOT_64, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_GOT_64",/* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* A 64 bit TEXTREL relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_TEXTREL_64, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_TEXTREL_64",/* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* A 64 bit PLT relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_PLT_64, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_PLT_64",/* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* Table-entry not really used. */ HOWTO (R_MICROBLAZE_REL, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_REL", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* Table-entry not really used. */ HOWTO (R_MICROBLAZE_JUMP_SLOT,/* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_JUMP_SLOT", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* Table-entry not really used. */ HOWTO (R_MICROBLAZE_GLOB_DAT,/* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_GLOB_DAT", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ /* A 64 bit GOT relative relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_GOTOFF_64, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_GOTOFF_64", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* A 32 bit GOT relative relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_GOTOFF_32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_MICROBLAZE_GOTOFF_32", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* COPY relocation. Table-entry not really used. */ HOWTO (R_MICROBLAZE_COPY, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc,/* Special Function. */ "R_MICROBLAZE_COPY", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x0000ffff, /* Dest Mask. */ - FALSE), /* PC relative offset? */ + false), /* PC relative offset? */ /* Marker relocs for TLS. */ HOWTO (R_MICROBLAZE_TLS, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MICROBLAZE_TLSGD, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLSGD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MICROBLAZE_TLSLD, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLSLD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Computes the load module index of the load module that contains the definition of its TLS sym. */ @@ -448,15 +448,15 @@ static reloc_howto_type microblaze_elf_howto_raw[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLSDTPMOD32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Computes a dtv-relative displacement, the difference between the value of sym+add and the base address of the thread-local storage block that @@ -465,15 +465,15 @@ static reloc_howto_type microblaze_elf_howto_raw[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLSDTPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Computes a dtv-relative displacement, the difference between the value of sym+add and the base address of the thread-local storage block that @@ -482,15 +482,15 @@ static reloc_howto_type microblaze_elf_howto_raw[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLSDTPREL64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Computes a tp-relative displacement, the difference between the value of sym+add and the value of the thread pointer (r13). */ @@ -498,15 +498,15 @@ static reloc_howto_type microblaze_elf_howto_raw[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLSGOTTPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Computes a tp-relative displacement, the difference between the value of sym+add and the value of the thread pointer (r13). */ @@ -514,15 +514,15 @@ static reloc_howto_type microblaze_elf_howto_raw[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MICROBLAZE_TLSTPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -672,7 +672,7 @@ microblaze_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for a RCE ELF reloc. */ -static bfd_boolean +static bool microblaze_elf_info_to_howto (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -690,23 +690,23 @@ microblaze_elf_info_to_howto (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = microblaze_elf_howto_table [r_type]; - return TRUE; + return true; } /* Microblaze ELF local labels start with 'L.' or '$L', not '.L'. */ -static bfd_boolean +static bool microblaze_elf_is_local_label_name (bfd *abfd, const char *name) { if (name[0] == 'L' && name[1] == '.') - return TRUE; + return true; if (name[0] == '$' && name[1] == 'L') - return TRUE; + return true; /* With gcc, the labels go back to starting with '.', so we accept the generic ELF local label syntax as well. */ @@ -819,14 +819,14 @@ microblaze_elf_final_sdp (struct bfd_link_info *info) { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, RO_SDA_ANCHOR_NAME, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, RO_SDA_ANCHOR_NAME, false, false, true); if (h != (struct bfd_link_hash_entry *) NULL && h->type == bfd_link_hash_defined) ro_small_data_pointer = (h->u.def.value + h->u.def.section->output_section->vma + h->u.def.section->output_offset); - h = bfd_link_hash_lookup (info->hash, RW_SDA_ANCHOR_NAME, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, RW_SDA_ANCHOR_NAME, false, false, true); if (h != (struct bfd_link_hash_entry *) NULL && h->type == bfd_link_hash_defined) rw_small_data_pointer = (h->u.def.value @@ -918,7 +918,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, Elf_Internal_Rela *rel, *relend; int endian = (bfd_little_endian (output_bfd)) ? 0 : 2; /* Assume success. */ - bfd_boolean ret = TRUE; + bool ret = true; asection *sreloc; bfd_vma *local_got_offsets; unsigned int tls_type; @@ -928,7 +928,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, htab = elf32_mb_hash_table (info); if (htab == NULL) - return FALSE; + return false; local_got_offsets = elf_local_got_offsets (input_bfd); @@ -949,7 +949,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, const char *sym_name; bfd_reloc_status_type r = bfd_reloc_ok; const char *errmsg = NULL; - bfd_boolean unresolved_reloc = FALSE; + bool unresolved_reloc = false; h = NULL; r_type = ELF32_R_TYPE (rel->r_info); @@ -961,7 +961,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; continue; } @@ -1011,12 +1011,12 @@ microblaze_elf_relocate_section (bfd *output_bfd, else { bfd_vma relocation; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; /* This is a final link. */ sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { @@ -1034,8 +1034,8 @@ microblaze_elf_relocate_section (bfd *output_bfd, else { /* External symbol. */ - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1072,7 +1072,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, microblaze_elf_final_sdp (info); if (ro_small_data_pointer == 0) { - ret = FALSE; + ret = false; r = bfd_reloc_undefined; goto check_reloc; } @@ -1097,7 +1097,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, microblaze_elf_howto_table[(int) r_type]->name, sec); /*bfd_set_error (bfd_error_bad_value); ??? why? */ - ret = FALSE; + ret = false; continue; } } @@ -1120,7 +1120,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, microblaze_elf_final_sdp (info); if (rw_small_data_pointer == 0) { - ret = FALSE; + ret = false; r = bfd_reloc_undefined; goto check_reloc; } @@ -1145,7 +1145,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, microblaze_elf_howto_table[(int) r_type]->name, sec); /*bfd_set_error (bfd_error_bad_value); ??? why? */ - ret = FALSE; + ret = false; continue; } } @@ -1189,7 +1189,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, relocation = (htab->elf.splt->output_section->vma + htab->elf.splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; immediate = relocation - (input_section->output_section->vma + input_section->output_offset + offset + INST_WORD_SIZE); @@ -1226,7 +1226,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, unsigned long indx; bfd_vma static_value; - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; if (htab->elf.sgot == NULL) abort (); @@ -1268,7 +1268,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, /* Symbol index to use for relocs */ if (h != NULL) { - bfd_boolean dyn = + bool dyn = elf_hash_table (info)->dynamic_sections_created; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, @@ -1285,7 +1285,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, || (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && !resolved_to_zero) || h->root.type != bfd_link_hash_undefweak)) - need_relocs = TRUE; + need_relocs = true; /* 2. Compute/Emit Static value of r-expression */ static_value = relocation + addend; @@ -1391,7 +1391,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, bfd_put_16 (input_bfd, relocation & 0xffff, contents + offset + endian + INST_WORD_SIZE); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; } @@ -1490,7 +1490,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip; + bool skip; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -1498,15 +1498,15 @@ microblaze_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (sreloc != NULL); - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE; + skip = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -1536,7 +1536,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, (_("%pB: probably compiled without -fPIC?"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -1616,7 +1616,7 @@ microblaze_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, offset, TRUE); + (info, name, input_bfd, input_section, offset, true); break; case bfd_reloc_outofrange: @@ -1698,11 +1698,11 @@ microblaze_bfd_write_imm_value_64 (bfd *abfd, bfd_byte *bfd_addr, bfd_vma val) bfd_put_32 (abfd, instr_lo, bfd_addr + INST_WORD_SIZE); } -static bfd_boolean +static bool microblaze_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -1723,14 +1723,14 @@ microblaze_elf_relax_section (bfd *abfd, /* We only do this once per section. We may be able to delete some code by running multiple passes, but it is not worth it. */ - *again = FALSE; + *again = false; /* Only do this for a text section. */ if (bfd_link_relocatable (link_info) || (sec->flags & SEC_RELOC) == 0 || (sec->reloc_count == 0) || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; BFD_ASSERT ((sec->size > 0) || (sec->rawsize > 0)); @@ -1869,7 +1869,7 @@ microblaze_elf_relax_section (bfd *abfd, break; default: /* Cannot happen. */ - BFD_ASSERT (FALSE); + BFD_ASSERT (false); } } } /* Loop through all relocations. */ @@ -1957,7 +1957,7 @@ microblaze_elf_relax_section (bfd *abfd, /* We always cache the relocs. Perhaps, if info->keep_memory is FALSE, we should free them, if we are permitted to. */ - irelocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, TRUE); + irelocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, true); if (irelocs == NULL) goto error_return; @@ -2241,13 +2241,13 @@ microblaze_elf_relax_section (bfd *abfd, if (sec->relax_count == 0) { - *again = FALSE; + *again = false; free (sec->relax); sec->relax = NULL; } else - *again = TRUE; - return TRUE; + *again = true; + return true; error_return: free (free_relocs); @@ -2255,7 +2255,7 @@ microblaze_elf_relax_section (bfd *abfd, free (sec->relax); sec->relax = NULL; sec->relax_count = 0; - return FALSE; + return false; } /* Return the section that should be marked against GC for a given @@ -2289,7 +2289,7 @@ microblaze_elf_gc_mark_hook (asection *sec, #define PLT_ENTRY_WORD_2 0x98186000 /* "brad r12". */ #define PLT_ENTRY_WORD_3 0x80000000 /* "nop". */ -static bfd_boolean +static bool update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, unsigned long r_symndx, @@ -2305,7 +2305,7 @@ update_local_sym_info (bfd *abfd, size *= (sizeof (*local_got_refcounts) + sizeof (*local_got_tls_masks)); local_got_refcounts = bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } @@ -2314,11 +2314,11 @@ update_local_sym_info (bfd *abfd, local_got_tls_masks[r_symndx] |= tls_type; local_got_refcounts[r_symndx] += 1; - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool microblaze_elf_check_relocs (bfd * abfd, struct bfd_link_info * info, asection * sec, @@ -2333,11 +2333,11 @@ microblaze_elf_check_relocs (bfd * abfd, asection *sreloc = NULL; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = elf32_mb_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -2373,14 +2373,14 @@ microblaze_elf_check_relocs (bfd * abfd, Reconstruct it for later use during GC. */ case R_MICROBLAZE_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_MICROBLAZE_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; /* This relocation requires .plt entry. */ @@ -2408,7 +2408,7 @@ microblaze_elf_check_relocs (bfd * abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } if (h != NULL) { @@ -2418,7 +2418,7 @@ microblaze_elf_check_relocs (bfd * abfd, else { if (! update_local_sym_info(abfd, symtab_hdr, r_symndx, tls_type) ) - return FALSE; + return false; } break; @@ -2429,7 +2429,7 @@ microblaze_elf_check_relocs (bfd * abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } break; @@ -2502,7 +2502,7 @@ microblaze_elf_check_relocs (bfd * abfd, sreloc = _bfd_elf_make_dynamic_reloc_section (sec, dynobj, 2, abfd, 1); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -2522,11 +2522,11 @@ microblaze_elf_check_relocs (bfd * abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) - return FALSE; + return false; vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_dyn_relocs **) vpp; @@ -2539,7 +2539,7 @@ microblaze_elf_check_relocs (bfd * abfd, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -2556,7 +2556,7 @@ microblaze_elf_check_relocs (bfd * abfd, } } - return TRUE; + return true; } /* Copy the extra info we tack onto an elf_link_hash_entry. */ @@ -2576,7 +2576,7 @@ microblaze_elf_copy_indirect_symbol (struct bfd_link_info *info, _bfd_elf_link_hash_copy_indirect (info, dir, ind); } -static bfd_boolean +static bool microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2586,7 +2586,7 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, htab = elf32_mb_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* If this is a function, put it in the procedure linkage table. We will fill in the contents of the procedure linkage table later, @@ -2608,7 +2608,7 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else /* It's possible that we incorrectly decided a .plt reloc was @@ -2627,7 +2627,7 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2638,18 +2638,18 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -2657,7 +2657,7 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -2700,7 +2700,7 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (power_of_two > s->alignment_power) { if (!bfd_set_section_alignment (s, power_of_two)) - return FALSE; + return false; } /* Define the symbol as being at this point in the section. */ @@ -2709,13 +2709,13 @@ microblaze_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Increment the section size to make room for the symbol. */ s->size += h->size; - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) { struct bfd_link_info *info; @@ -2724,12 +2724,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) dat; htab = elf32_mb_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->elf.dynamic_sections_created && h->plt.refcount > 0) @@ -2740,7 +2740,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -2799,7 +2799,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } need = 0; @@ -2840,7 +2840,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -2888,7 +2888,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -2909,12 +2909,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * dat) sreloc->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2925,7 +2925,7 @@ microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, htab = elf32_mb_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; BFD_ASSERT (dynobj != NULL); @@ -3041,7 +3041,7 @@ microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; - bfd_boolean strip = FALSE; + bool strip = false; if ((s->flags & SEC_LINKER_CREATED) == 0) continue; @@ -3063,7 +3063,7 @@ microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, adjust_dynamic_symbol is called, and it is that function which decides whether anything needs to go into these sections. */ - strip = TRUE; + strip = true; } else { @@ -3096,18 +3096,18 @@ microblaze_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, contents to zero. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL && s->size != 0) - return FALSE; + return false; } /* ??? Force DF_BIND_NOW? */ info->flags |= DF_BIND_NOW; - return _bfd_elf_add_dynamic_tags (output_bfd, info, TRUE); + return _bfd_elf_add_dynamic_tags (output_bfd, info, true); } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool microblaze_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3118,7 +3118,7 @@ microblaze_elf_finish_dynamic_symbol (bfd *output_bfd, htab = elf32_mb_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (h->plt.offset != (bfd_vma) -1) { @@ -3272,13 +3272,13 @@ microblaze_elf_finish_dynamic_symbol (bfd *output_bfd, || h == htab->elf.hplt) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool microblaze_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3288,7 +3288,7 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, htab = elf32_mb_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; @@ -3305,7 +3305,7 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, { Elf_Internal_Dyn dyn; asection *s; - bfd_boolean size; + bool size; bfd_elf32_swap_dyn_in (dynobj, dyncon, &dyn); @@ -3313,17 +3313,17 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, { case DT_PLTGOT: s = htab->elf.sgotplt; - size = FALSE; + size = false; break; case DT_PLTRELSZ: s = htab->elf.srelplt; - size = TRUE; + size = true; break; case DT_JMPREL: s = htab->elf.srelplt; - size = FALSE; + size = false; break; default: @@ -3375,13 +3375,13 @@ microblaze_elf_finish_dynamic_sections (bfd *output_bfd, if (htab->elf.sgot && htab->elf.sgot->size > 0) elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4; - return TRUE; + return true; } /* Hook called by the linker routine which adds symbols from an object file. We use it to put .comm items in .sbss, and not .bss. */ -static bfd_boolean +static bool microblaze_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -3399,12 +3399,12 @@ microblaze_elf_add_symbol_hook (bfd *abfd, *secp = bfd_make_section_old_way (abfd, ".sbss"); if (*secp == NULL || !bfd_set_section_flags (*secp, SEC_IS_COMMON | SEC_SMALL_DATA)) - return FALSE; + return false; *valp = sym->st_size; } - return TRUE; + return true; } #define TARGET_LITTLE_SYM microblaze_elf32_le_vec diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 34e61865cd..1e645c6678 100644 --- a/bfd/elf32-mips.c +++ b/bfd/elf32-mips.c @@ -50,34 +50,34 @@ #include "ecoffswap.h" static bfd_reloc_status_type gprel32_with_gp - (bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma); + (bfd *, asymbol *, arelent *, asection *, bool, void *, bfd_vma); static bfd_reloc_status_type mips_elf_gprel32_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type mips32_64bit_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean mips_info_to_howto_rel +static bool mips_info_to_howto_rel (bfd *, arelent *, Elf_Internal_Rela *); -static bfd_boolean mips_info_to_howto_rela +static bool mips_info_to_howto_rela (bfd *, arelent *, Elf_Internal_Rela *); -static bfd_boolean mips_elf_sym_is_global +static bool mips_elf_sym_is_global (bfd *, asymbol *); -static bfd_boolean mips_elf32_elfsym_local_is_section +static bool mips_elf32_elfsym_local_is_section (bfd *); -static bfd_boolean mips_elf32_object_p +static bool mips_elf32_object_p (bfd *); -static bfd_boolean mips_elf_is_local_label_name +static bool mips_elf_is_local_label_name (bfd *, const char *); static bfd_reloc_status_type mips16_gprel_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type mips_elf_final_gp - (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); -static bfd_boolean mips_elf_assign_gp + (bfd *, asymbol *, bool, char **, bfd_vma *); +static bool mips_elf_assign_gp (bfd *, bfd_vma *); -static bfd_boolean elf32_mips_grok_prstatus +static bool elf32_mips_grok_prstatus (bfd *, Elf_Internal_Note *); -static bfd_boolean elf32_mips_grok_psinfo +static bool elf32_mips_grok_psinfo (bfd *, Elf_Internal_Note *); static irix_compat_t elf32_mips_irix_compat (bfd *); @@ -109,67 +109,67 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit relocation. */ HOWTO (R_MIPS_16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation. */ HOWTO (R_MIPS_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit symbol relative relocation. */ HOWTO (R_MIPS_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 26 bit jump address. */ HOWTO (R_MIPS_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -177,85 +177,85 @@ static reloc_howto_type elf_mips_howto_table_rel[] = bits must match the PC + 4. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03ffffff, /* src_mask */ 0x03ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MIPS_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MIPS_GPREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MIPS_LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit PC relative reference. Note that the ABI document has a typo and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. @@ -264,45 +264,45 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit GP relative reference. */ HOWTO (R_MIPS_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mips_elf_gprel32_reloc, /* special_function */ "R_MIPS_GPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The remaining relocs are defined on Irix 5, although they are not defined by the ABI. */ @@ -315,15 +315,15 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SHIFT5", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000007c0, /* src_mask */ 0x000007c0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit shift field. */ /* FIXME: This is not handled correctly; a special function is @@ -332,120 +332,120 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SHIFT6", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000007c4, /* src_mask */ 0x000007c4, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 64 bit relocation. */ HOWTO (R_MIPS_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mips32_64bit_reloc, /* special_function */ "R_MIPS_64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement in the global offset table. */ HOWTO (R_MIPS_GOT_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_PAGE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_OFST", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. Used in the N32 ABI. */ HOWTO (R_MIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SUB", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Used to cause the linker to insert and delete instructions? */ EMPTY_HOWTO (R_MIPS_INSERT_A), @@ -457,75 +457,75 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HIGHER", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the highest value of a 64 bit addend. */ HOWTO (R_MIPS_HIGHEST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HIGHEST", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement. */ HOWTO (R_MIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SCN_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_MIPS_REL16), EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE), @@ -538,44 +538,44 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD dynamic relocations. */ HOWTO (R_MIPS_TLS_DTPMOD32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPMOD32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_TLS_DTPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64), EMPTY_HOWTO (R_MIPS_TLS_DTPREL64), @@ -585,90 +585,90 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS IE dynamic relocations. */ HOWTO (R_MIPS_TLS_TPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_MIPS_TLS_TPREL64), @@ -677,45 +677,45 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation with no addend. */ HOWTO (R_MIPS_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (52), EMPTY_HOWTO (53), @@ -730,85 +730,85 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC21_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x001fffff, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC26_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC26_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03ffffff, /* src_mask */ 0x03ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC18_S3, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC18_S3", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0003ffff, /* src_mask */ 0x0003ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC19_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC19_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0007ffff, /* src_mask */ 0x0007ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCHI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCLO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* The reloc used for BFD_RELOC_CTOR when doing a 64 bit link. This @@ -818,15 +818,15 @@ static reloc_howto_type elf_mips_ctor64_howto = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips32_64bit_reloc, /* special_function */ "R_MIPS_64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ static reloc_howto_type elf_mips16_howto_table_rel[] = { @@ -835,7 +835,7 @@ static reloc_howto_type elf_mips16_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -843,205 +843,205 @@ static reloc_howto_type elf_mips16_howto_table_rel[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The reloc used for the mips16 gprel instruction. */ HOWTO (R_MIPS16_GPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips16_gprel_reloc, /* special_function */ "R_MIPS16_GPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 reference to the global offset table. */ HOWTO (R_MIPS16_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS16_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 call through the global offset table. */ HOWTO (R_MIPS16_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 high 16 bits of symbol value. */ HOWTO (R_MIPS16_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS16_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 low 16 bits of symbol value. */ HOWTO (R_MIPS16_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS16_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS general dynamic variable reference. */ HOWTO (R_MIPS16_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic variable reference. */ HOWTO (R_MIPS16_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 16-bit PC-relative branch offset. */ HOWTO (R_MIPS16_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_PC16_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; static reloc_howto_type elf_micromips_howto_table_rel[] = @@ -1055,7 +1055,7 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -1063,143 +1063,143 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_26_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MICROMIPS_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MICROMIPS_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MICROMIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MICROMIPS_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MICROMIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MICROMIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MICROMIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MICROMIPS_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This is for microMIPS branches. */ HOWTO (R_MICROMIPS_PC7_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC7_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000007f, /* src_mask */ 0x0000007f, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC10_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC10_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC16_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MICROMIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (143), EMPTY_HOWTO (144), @@ -1209,165 +1209,165 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_DISP",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_PAGE",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_OFST",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_HI16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. Used in the N32 ABI. */ HOWTO (R_MICROMIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SUB", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the higher value of a 64 bit addend. */ HOWTO (R_MICROMIPS_HIGHER, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HIGHER", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the highest value of a 64 bit addend. */ HOWTO (R_MICROMIPS_HIGHEST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HIGHEST", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_HI16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement. */ HOWTO (R_MICROMIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SCN_DISP",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -1375,15 +1375,15 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. Note that the high 16 bits of symbol values must be zero. This is used for relaxation. */ @@ -1391,15 +1391,15 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HI0_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (158), EMPTY_HOWTO (159), @@ -1411,75 +1411,75 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MICROMIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (167), EMPTY_HOWTO (168), @@ -1489,30 +1489,30 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (171), @@ -1521,29 +1521,29 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL7_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000007f, /* src_mask */ 0x0000007f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC23_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 23, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC23_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fffff, /* src_mask */ 0x007fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* 16 bit offset for pc-relative branches. */ @@ -1552,15 +1552,15 @@ static reloc_howto_type elf_mips_gnu_rel16_s2 = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GNU_REL16_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* 32 bit pc-relative. This was a GNU extension used by embedded-PIC. It was co-opted by mips-linux for exception-handling data. GCC stopped @@ -1571,15 +1571,15 @@ static reloc_howto_type elf_mips_gnu_pcrel32 = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ static reloc_howto_type elf_mips_gnu_vtinherit_howto = @@ -1587,15 +1587,15 @@ static reloc_howto_type elf_mips_gnu_vtinherit_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MIPS_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ static reloc_howto_type elf_mips_gnu_vtentry_howto = @@ -1603,15 +1603,15 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_MIPS_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Originally a VxWorks extension, but now used for other systems too. */ static reloc_howto_type elf_mips_copy_howto = @@ -1619,15 +1619,15 @@ static reloc_howto_type elf_mips_copy_howto = 0, /* rightshift */ 0, /* this one is variable size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Originally a VxWorks extension, but now used for other systems too. */ static reloc_howto_type elf_mips_jump_slot_howto = @@ -1635,15 +1635,15 @@ static reloc_howto_type elf_mips_jump_slot_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JUMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Used in EH tables. */ static reloc_howto_type elf_mips_eh_howto = @@ -1651,20 +1651,20 @@ static reloc_howto_type elf_mips_eh_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_EH", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a dangerous relocation. */ -static bfd_boolean +static bool mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) { unsigned int count; @@ -1674,7 +1674,7 @@ mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* If we've already figured out what GP will be, just return it. */ *pgp = _bfd_get_gp_value (output_bfd); if (*pgp) - return TRUE; + return true; count = bfd_get_symcount (output_bfd); sym = bfd_get_outsymbols (output_bfd); @@ -1704,10 +1704,10 @@ mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* Only get the error once. */ *pgp = 4; _bfd_set_gp_value (output_bfd, *pgp); - return FALSE; + return false; } - return TRUE; + return true; } /* We have to figure out the gp value, so that we can adjust the @@ -1717,7 +1717,7 @@ mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) external symbol if we are producing relocatable output. */ static bfd_reloc_status_type -mips_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable, +mips_elf_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable, char **error_message, bfd_vma *pgp) { if (bfd_is_und_section (symbol->section) @@ -1761,7 +1761,7 @@ _bfd_mips_elf32_gprel16_reloc (bfd *abfd, arelent *reloc_entry, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_byte *location; bfd_vma gp; @@ -1779,10 +1779,10 @@ _bfd_mips_elf32_gprel16_reloc (bfd *abfd, arelent *reloc_entry, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -1792,7 +1792,7 @@ _bfd_mips_elf32_gprel16_reloc (bfd *abfd, arelent *reloc_entry, return ret; location = (bfd_byte *) data + reloc_entry->address; - _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, false, location); ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section, relocatable, @@ -1811,7 +1811,7 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; @@ -1826,10 +1826,10 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -1844,7 +1844,7 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, static bfd_reloc_status_type gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, - asection *input_section, bfd_boolean relocatable, + asection *input_section, bool relocatable, void *data, bfd_vma gp) { bfd_vma relocation; @@ -1929,7 +1929,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_byte *location; bfd_vma gp; @@ -1945,10 +1945,10 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -1958,7 +1958,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, return ret; location = (bfd_byte *) data + reloc_entry->address; - _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, false, location); ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section, relocatable, @@ -2198,7 +2198,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, static reloc_howto_type * mips_elf32_rtype_to_howto (bfd *abfd, unsigned int r_type, - bfd_boolean rela_p ATTRIBUTE_UNUSED) + bool rela_p ATTRIBUTE_UNUSED) { reloc_howto_type *howto = NULL; @@ -2237,16 +2237,16 @@ mips_elf32_rtype_to_howto (bfd *abfd, /* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */ -static bfd_boolean +static bool mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - cache_ptr->howto = mips_elf32_rtype_to_howto (abfd, r_type, FALSE); + cache_ptr->howto = mips_elf32_rtype_to_howto (abfd, r_type, false); if (cache_ptr->howto == NULL) - return FALSE; + return false; /* The addend for a GPREL16 or LITERAL relocation comes from the GP value for the object file. We get the addend now, rather than @@ -2256,12 +2256,12 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) && (gprel16_reloc_p (r_type) || literal_reloc_p (r_type))) cache_ptr->addend = elf_gp (abfd); - return TRUE; + return true; } /* Given a MIPS Elf_Internal_Rela, fill in an arelent structure. */ -static bfd_boolean +static bool mips_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { return mips_info_to_howto_rel (abfd, cache_ptr, dst); @@ -2276,7 +2276,7 @@ mips_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) symbols. On most ELF targets the split is between static symbols and externally visible symbols. */ -static bfd_boolean +static bool mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) { if (SGI_COMPAT (abfd)) @@ -2289,7 +2289,7 @@ mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) /* Likewise, return TRUE if the symbol table split overall must be between section symbols and all other symbols. */ -static bfd_boolean +static bool mips_elf32_elfsym_local_is_section (bfd *abfd) { return SGI_COMPAT (abfd); @@ -2297,32 +2297,32 @@ mips_elf32_elfsym_local_is_section (bfd *abfd) /* Set the right machine number for a MIPS ELF file. */ -static bfd_boolean +static bool mips_elf32_object_p (bfd *abfd) { unsigned long mach; if (ABI_N32_P (abfd)) - return FALSE; + return false; /* Irix 5 and 6 are broken. Object file symbol tables are not always sorted correctly such that local symbols precede global symbols, and the sh_info field in the symbol table is not always right. */ if (SGI_COMPAT (abfd)) - elf_bad_symtab (abfd) = TRUE; + elf_bad_symtab (abfd) = true; mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags); bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); - return TRUE; + return true; } /* MIPS ELF local labels start with '$', not 'L'. */ -static bfd_boolean +static bool mips_elf_is_local_label_name (bfd *abfd, const char *name) { if (name[0] == '$') - return TRUE; + return true; /* On Irix 6, the labels go back to starting with '.', so we accept the generic ELF local label syntax as well. */ @@ -2330,7 +2330,7 @@ mips_elf_is_local_label_name (bfd *abfd, const char *name) } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -2339,7 +2339,7 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 256: /* Linux/MIPS */ /* pr_cursig */ @@ -2360,13 +2360,13 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 128: /* Linux/MIPS elf_prpsinfo */ elf_tdata (abfd)->core->pid @@ -2389,7 +2389,7 @@ elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Write Linux core PRSTATUS note into core file. */ @@ -2433,13 +2433,13 @@ elf32_mips_write_core_note (bfd *abfd, char *buf, int *bufsiz, int note_type, /* Remove the magic _gp_disp symbol from the symbol tables. */ -static bfd_boolean +static bool elf32_mips_fixup_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { if (strcmp (h->root.root.string, "_gp_disp") == 0) - _bfd_elf_link_hash_hide_symbol (info, h, TRUE); - return TRUE; + _bfd_elf_link_hash_hide_symbol (info, h, true); + return true; } /* Depending on the target vector we generate some version of Irix @@ -2500,9 +2500,9 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #define ELF_TARGET_ID MIPS_ELF_DATA #define ELF_MACHINE_CODE EM_MIPS -#define elf_backend_collect TRUE -#define elf_backend_type_change_ok TRUE -#define elf_backend_can_gc_sections TRUE +#define elf_backend_collect true +#define elf_backend_type_change_ok true +#define elf_backend_can_gc_sections true #define elf_backend_gc_mark_extra_sections \ _bfd_mips_elf_gc_mark_extra_sections #define elf_info_to_howto mips_info_to_howto_rela @@ -2555,7 +2555,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #define elf_backend_may_use_rel_p 1 #define elf_backend_may_use_rela_p 0 #define elf_backend_default_use_rela_p 0 -#define elf_backend_sign_extend_vma TRUE +#define elf_backend_sign_extend_vma true #define elf_backend_plt_readonly 1 #define elf_backend_discard_info _bfd_mips_elf_discard_info @@ -2655,7 +2655,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #include "elf32-target.h" /* Implement elf_backend_final_write_processing for VxWorks. */ -static bfd_boolean +static bool mips_vxworks_final_write_processing (bfd *abfd) { _bfd_mips_final_write_processing (abfd); diff --git a/bfd/elf32-moxie.c b/bfd/elf32-moxie.c index fbeb55c4a2..2b00b2614b 100644 --- a/bfd/elf32-moxie.c +++ b/bfd/elf32-moxie.c @@ -36,45 +36,45 @@ static reloc_howto_type moxie_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MOXIE_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_MOXIE_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MOXIE_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 10 bit PC-relative relocation. */ HOWTO (R_MOXIE_PCREL10, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 10, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_MOXIE_PCREL10", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0x000003FF, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ }; /* Map BFD reloc types to MOXIE ELF reloc types. */ @@ -123,7 +123,7 @@ moxie_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an MOXIE ELF reloc. */ -static bfd_boolean +static bool moxie_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -137,10 +137,10 @@ moxie_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & moxie_elf_howto_table [r_type]; - return TRUE; + return true; } /* Perform a single relocation. By default we use the standard BFD @@ -247,7 +247,7 @@ moxie_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -281,7 +281,7 @@ moxie_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -307,7 +307,7 @@ moxie_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -327,7 +327,7 @@ moxie_elf_gc_mark_hook (asection *sec, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool moxie_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -339,7 +339,7 @@ moxie_elf_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -362,7 +362,7 @@ moxie_elf_check_relocs (bfd *abfd, } } - return TRUE; + return true; } #define ELF_ARCH bfd_arch_moxie diff --git a/bfd/elf32-msp430.c b/bfd/elf32-msp430.c index 03439622b8..c2560b16d4 100644 --- a/bfd/elf32-msp430.c +++ b/bfd/elf32-msp430.c @@ -26,7 +26,7 @@ #include "elf-bfd.h" #include "elf/msp430.h" -static bfd_boolean debug_relocs = 0; +static bool debug_relocs = 0; /* All users of this file have bfd_octets_per_byte (abfd, sec) == 1. */ #define OCTETS_PER_BYTE(ABFD, SEC) 1 @@ -76,149 +76,149 @@ static reloc_howto_type elf_msp430_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MSP430_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 10 bit PC relative relocation. */ HOWTO (R_MSP430_10_PCREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_10_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff, /* src_mask */ 0x3ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_MSP430_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit PC relative relocation for command address. */ HOWTO (R_MSP430_16_PCREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit absolute relocation, byte operations. */ HOWTO (R_MSP430_16_BYTE, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_16_BYTE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation for command address. */ HOWTO (R_MSP430_16_PCREL_BYTE,/* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_16_PCREL_BYTE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 10 bit PC relative relocation for complicated polymorphs. */ HOWTO (R_MSP430_2X_PCREL, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_2X_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff, /* src_mask */ 0x3ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit relaxable relocation for command address. */ HOWTO (R_MSP430_RL_PCREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_RL_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE) /* pcrel_offset */ + true) /* pcrel_offset */ /* A 8-bit absolute relocation. */ , HOWTO (R_MSP430_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Together with a following reloc, allows for the difference between two symbols to be the real addend of the second reloc. */ @@ -226,15 +226,15 @@ static reloc_howto_type elf_msp430_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ rl78_sym_diff_handler, /* special handler. */ "R_MSP430_SYM_DIFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The length of unsigned-leb128 is variable, just assume the size is one byte here. */ @@ -242,15 +242,15 @@ static reloc_howto_type elf_msp430_howto_table[] = 0, /* rightshift */ 0, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ msp430_elf_ignore_reloc, /* special handler. */ "R_MSP430_GNU_SET_ULEB128", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The length of unsigned-leb128 is variable, just assume the size is one byte here. */ @@ -258,15 +258,15 @@ static reloc_howto_type elf_msp430_howto_table[] = 0, /* rightshift */ 0, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ msp430_elf_ignore_reloc, /* special handler. */ "R_MSP430_GNU_SUB_ULEB128", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -276,253 +276,253 @@ static reloc_howto_type elf_msp430x_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MSP430_ABS32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_ABS32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MSP430_ABS16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_ABS16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MSP430_ABS8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_ABS8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MSP430_PCR16, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_PCR16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_PCR20_EXT_SRC,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_PCR20_EXT_SRC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_PCR20_EXT_DST,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_PCR20_EXT_DST",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_PCR20_EXT_ODST,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_PCR20_EXT_ODST",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_ABS20_EXT_SRC,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_ABS20_EXT_SRC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_ABS20_EXT_DST,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_ABS20_EXT_DST",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_ABS20_EXT_ODST,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_ABS20_EXT_ODST",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_ABS20_ADR_SRC,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_ABS20_ADR_SRC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_ABS20_ADR_DST,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_ABS20_ADR_DST",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_PCR16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_PCR16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_PCR20_CALL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_PCR20_CALL",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430X_ABS16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_ABS16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430_ABS_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_ABS_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MSP430_PREL31, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430_PREL31", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (R_MSP430_EHTYPE), @@ -531,30 +531,30 @@ static reloc_howto_type elf_msp430x_howto_table[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_10_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff, /* src_mask */ 0x3ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 10 bit PC relative relocation for complicated polymorphs. */ HOWTO (R_MSP430X_2X_PCREL, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MSP430X_2X_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff, /* src_mask */ 0x3ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Together with a following reloc, allows for the difference between two symbols to be the real addend of the second reloc. */ @@ -562,15 +562,15 @@ static reloc_howto_type elf_msp430x_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ rl78_sym_diff_handler, /* special handler. */ "R_MSP430X_SYM_DIFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The length of unsigned-leb128 is variable, just assume the size is one byte here. */ @@ -578,15 +578,15 @@ static reloc_howto_type elf_msp430x_howto_table[] = 0, /* rightshift */ 0, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ msp430_elf_ignore_reloc, /* special handler. */ "R_MSP430X_GNU_SET_ULEB128", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The length of unsigned-leb128 is variable, just assume the size is one byte here. */ @@ -594,15 +594,15 @@ static reloc_howto_type elf_msp430x_howto_table[] = 0, /* rightshift */ 0, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ msp430_elf_ignore_reloc, /* special handler. */ "R_MSP430X_GNU_SUB_ULEB128", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -660,7 +660,7 @@ static const struct msp430_reloc_map msp430x_reloc_map[] = {BFD_RELOC_MSP430_SUB_ULEB128, R_MSP430X_GNU_SUB_ULEB128 } }; -static inline bfd_boolean +static inline bool uses_msp430x_relocs (bfd * abfd) { extern const bfd_target msp430_elf32_ti_vec; @@ -720,7 +720,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an MSP430 ELF reloc. */ -static bfd_boolean +static bool msp430_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -737,7 +737,7 @@ msp430_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = elf_msp430x_howto_table + r_type; } @@ -747,19 +747,19 @@ msp430_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else cache_ptr->howto = &elf_msp430_howto_table[r_type]; - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info, asection * sec, const Elf_Internal_Rela * relocs) { @@ -769,7 +769,7 @@ elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info, const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -792,7 +792,7 @@ elf32_msp430_check_relocs (bfd * abfd, struct bfd_link_info * info, } } - return TRUE; + return true; } /* Perform a single relocation. By default we use the standard BFD @@ -814,7 +814,7 @@ msp430_final_link_relocate (reloc_howto_type * howto, bfd_reloc_status_type r = bfd_reloc_ok; bfd_vma x; bfd_signed_vma srel; - bfd_boolean is_rel_reloc = FALSE; + bool is_rel_reloc = false; if (uses_msp430x_relocs (input_bfd)) { @@ -975,14 +975,14 @@ msp430_final_link_relocate (reloc_howto_type * howto, { if (info->disable_target_specific_optimizations < 0) { - static bfd_boolean warned = FALSE; + static bool warned = false; if (! warned) { info->callbacks->warning (info, _("try enabling relaxation to avoid relocation truncations"), NULL, input_bfd, input_section, relocation); - warned = TRUE; + warned = true; } } return bfd_reloc_overflow; @@ -1289,14 +1289,14 @@ msp430_final_link_relocate (reloc_howto_type * howto, { if (info->disable_target_specific_optimizations < 0) { - static bfd_boolean warned = FALSE; + static bool warned = false; if (! warned) { info->callbacks->warning (info, _("try enabling relaxation to avoid relocation truncations"), NULL, input_bfd, input_section, relocation); - warned = TRUE; + warned = true; } } return bfd_reloc_overflow; @@ -1466,7 +1466,7 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1499,7 +1499,7 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -1526,14 +1526,14 @@ elf32_msp430_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } - return TRUE; + return true; } /* The final processing done just before writing out a MSP430 ELF object file. This gets the MSP430 architecture right based on the machine number. */ -static bfd_boolean +static bool bfd_elf_msp430_final_write_processing (bfd *abfd) { unsigned long val; @@ -1574,7 +1574,7 @@ bfd_elf_msp430_final_write_processing (bfd *abfd) /* Set the right machine number. */ -static bfd_boolean +static bool elf32_msp430_object_p (bfd * abfd) { int e_set = bfd_mach_msp14; @@ -1709,7 +1709,7 @@ static struct rcodes_s /* Return TRUE if a symbol exists at the given address. */ -static bfd_boolean +static bool msp430_elf_symbol_address_p (bfd * abfd, asection * sec, Elf_Internal_Sym * isym, @@ -1728,7 +1728,7 @@ msp430_elf_symbol_address_p (bfd * abfd, symtab_hdr = &elf_tdata (abfd)->symtab_hdr; for (isymend = isym + symtab_hdr->sh_info; isym < isymend; isym++) if (isym->st_shndx == sec_shndx && isym->st_value == addr) - return TRUE; + return true; symcount = (symtab_hdr->sh_size / sizeof (Elf32_External_Sym) - symtab_hdr->sh_info); @@ -1742,16 +1742,16 @@ msp430_elf_symbol_address_p (bfd * abfd, || sym_hash->root.type == bfd_link_hash_defweak) && sym_hash->root.u.def.section == sec && sym_hash->root.u.def.value == addr) - return TRUE; + return true; } - return FALSE; + return false; } /* Adjust all local symbols defined as '.section + 0xXXXX' (.section has sec_shndx) referenced from current and other sections. */ -static bfd_boolean +static bool msp430_elf_relax_adjust_locals (bfd * abfd, asection * sec, bfd_vma addr, int count, unsigned int sec_shndx, bfd_vma toaddr) @@ -1763,7 +1763,7 @@ msp430_elf_relax_adjust_locals (bfd * abfd, asection * sec, bfd_vma addr, irel = elf_section_data (sec)->relocs; if (irel == NULL) - return TRUE; + return true; irelend = irel + sec->reloc_count; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; @@ -1781,12 +1781,12 @@ msp430_elf_relax_adjust_locals (bfd * abfd, asection * sec, bfd_vma addr, irel->r_addend -= count; } - return TRUE; + return true; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool msp430_elf_relax_delete_bytes (bfd * abfd, asection * sec, bfd_vma addr, int count) { @@ -1904,7 +1904,7 @@ msp430_elf_relax_delete_bytes (bfd * abfd, asection * sec, bfd_vma addr, sym_hash->size -= count; } - return TRUE; + return true; } /* Insert one or two words into a section whilst relaxing. */ @@ -1995,10 +1995,10 @@ msp430_elf_relax_add_words (bfd * abfd, asection * sec, bfd_vma addr, return contents; } -static bfd_boolean +static bool msp430_elf_relax_section (bfd * abfd, asection * sec, struct bfd_link_info * link_info, - bfd_boolean * again) + bool * again) { Elf_Internal_Shdr * symtab_hdr; Elf_Internal_Rela * internal_relocs; @@ -2008,7 +2008,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, Elf_Internal_Sym * isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -2016,7 +2016,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, if (bfd_link_relocatable (link_info) || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; if (debug_relocs) printf ("Relaxing %s (%p), output_offset: 0x%lx sec size: 0x%lx\n", @@ -2265,7 +2265,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, /* Growing the section may mean that other conditional branches need to be fixed. */ - *again = TRUE; + *again = true; } if (debug_relocs) @@ -2485,7 +2485,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -2598,7 +2598,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } } @@ -2629,7 +2629,7 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -2639,14 +2639,14 @@ msp430_elf_relax_section (bfd * abfd, asection * sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Handle an MSP430 specific section when reading an object file. This is called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool elf32_msp430_section_from_shdr (bfd *abfd, Elf_Internal_Shdr * hdr, const char *name, @@ -2659,18 +2659,18 @@ elf32_msp430_section_from_shdr (bfd *abfd, case SHT_MSP430_ATTRIBUTES: return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex); default: - return FALSE; + return false; } } -static bfd_boolean +static bool elf32_msp430_obj_attrs_handle_unknown (bfd *abfd, int tag) { _bfd_error_handler /* xgettext:c-format */ (_("warning: %pB: unknown MSPABI object attribute %d"), abfd, tag); - return TRUE; + return true; } /* Determine whether an object attribute tag takes an integer, a @@ -2725,24 +2725,24 @@ data_model (int model) /* Merge MSPABI and GNU object attributes from IBFD into OBFD. Raise an error if there are conflicting attributes. */ -static bfd_boolean +static bool elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; obj_attribute *in_msp_attr, *in_gnu_attr; obj_attribute *out_msp_attr, *out_gnu_attr; - bfd_boolean result = TRUE; + bool result = true; static bfd * first_input_bfd = NULL; /* Skip linker created files. */ if (ibfd->flags & BFD_LINKER_CREATED) - return TRUE; + return true; /* LTO can create temporary files for linking which may not have an attribute section. */ if (ibfd->lto_output && bfd_get_section_by_name (ibfd, ".MSP430.attributes") == NULL) - return TRUE; + return true; /* If this is the first real object just copy the attributes. */ if (!elf_known_obj_attributes_proc (obfd)[0].i) @@ -2756,7 +2756,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) out_msp_attr[0].i = 1; first_input_bfd = ibfd; - return TRUE; + return true; } in_msp_attr = elf_known_obj_attributes_proc (ibfd); @@ -2772,7 +2772,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB uses %s instructions but %pB uses %s"), ibfd, isa_type (in_msp_attr[OFBA_MSPABI_Tag_ISA].i), first_input_bfd, isa_type (out_msp_attr[OFBA_MSPABI_Tag_ISA].i)); - result = FALSE; + result = false; } /* The code models must be the same. */ @@ -2785,7 +2785,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) ibfd, code_model (in_msp_attr[OFBA_MSPABI_Tag_Code_Model].i), first_input_bfd, code_model (out_msp_attr[OFBA_MSPABI_Tag_Code_Model].i)); - result = FALSE; + result = false; } /* The large code model is only supported by the MSP430X. */ @@ -2796,7 +2796,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("error: %pB uses the large code model but %pB uses MSP430 instructions"), ibfd, first_input_bfd); - result = FALSE; + result = false; } /* The data models must be the same. */ @@ -2809,7 +2809,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) ibfd, data_model (in_msp_attr[OFBA_MSPABI_Tag_Data_Model].i), first_input_bfd, data_model (out_msp_attr[OFBA_MSPABI_Tag_Data_Model].i)); - result = FALSE; + result = false; } /* The small code model requires the use of the small data model. */ @@ -2821,7 +2821,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB uses the small code model but %pB uses the %s data model"), ibfd, first_input_bfd, data_model (out_msp_attr[OFBA_MSPABI_Tag_Data_Model].i)); - result = FALSE; + result = false; } /* The large data models are only supported by the MSP430X. */ @@ -2833,7 +2833,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB uses the %s data model but %pB only uses MSP430 instructions"), ibfd, data_model (in_msp_attr[OFBA_MSPABI_Tag_Data_Model].i), first_input_bfd); - result = FALSE; + result = false; } /* Just ignore the data region unless the large memory model is in use. @@ -2846,10 +2846,10 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) /* We cannot allow "lower region only" to be linked with any other values (i.e. ANY or NONE). Before this attribute existed, "ANY" region was the default. */ - bfd_boolean ibfd_lower_region_used + bool ibfd_lower_region_used = (in_gnu_attr[Tag_GNU_MSP430_Data_Region].i == Val_GNU_MSP430_Data_Region_Lower); - bfd_boolean obfd_lower_region_used + bool obfd_lower_region_used = (out_gnu_attr[Tag_GNU_MSP430_Data_Region].i == Val_GNU_MSP430_Data_Region_Lower); if (ibfd_lower_region_used != obfd_lower_region_used) @@ -2859,7 +2859,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) "but %pB assumes data is exclusively in lower memory"), ibfd_lower_region_used ? obfd : ibfd, ibfd_lower_region_used ? ibfd : obfd); - result = FALSE; + result = false; } } @@ -2869,7 +2869,7 @@ elf32_msp430_merge_msp430_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_msp430_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -2884,23 +2884,23 @@ elf32_msp430_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return elf32_msp430_merge_msp430_attributes (ibfd, info); } -static bfd_boolean +static bool msp430_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) { return _bfd_elf_is_local_label_name (abfd, sym->name); } -static bfd_boolean +static bool uses_large_model (bfd *abfd) { obj_attribute * attr; if (abfd->flags & BFD_LINKER_CREATED) - return FALSE; + return false; attr = elf_known_obj_attributes_proc (abfd); if (attr == NULL) - return FALSE; + return false; return attr[OFBA_MSPABI_Tag_Code_Model].i == 2; } diff --git a/bfd/elf32-mt.c b/bfd/elf32-mt.c index 42a84aeeb1..f5b08194bd 100644 --- a/bfd/elf32-mt.c +++ b/bfd/elf32-mt.c @@ -28,7 +28,7 @@ static reloc_howto_type * mt_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean mt_info_to_howto_rela +static bool mt_info_to_howto_rela (bfd *, arelent *, Elf_Internal_Rela *); static bfd_reloc_status_type mt_elf_relocate_hi16 @@ -50,105 +50,105 @@ static reloc_howto_type mt_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0 , /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_MT_16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0 , /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_MT_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0 , /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit pc-relative relocation. */ HOWTO (R_MT_32_PCREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0 , /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit pc-relative relocation. */ HOWTO (R_MT_PC16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_PC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* high 16 bits of symbol value. */ HOWTO (R_MT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff0000, /* src_mask */ 0xffff0000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MT_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* Map BFD reloc types to MT ELF reloc types. */ @@ -227,10 +227,10 @@ mt_elf_relocate_hi16 /* Set the howto pointer for a MT ELF reloc. */ -static bfd_boolean -mt_info_to_howto_rela (bfd * abfd, - arelent * cache_ptr, - Elf_Internal_Rela * dst) +static bool +mt_info_to_howto_rela (bfd *abfd, + arelent *cache_ptr, + Elf_Internal_Rela *dst) { unsigned int r_type; @@ -241,10 +241,10 @@ mt_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & mt_elf_howto_table [r_type]; - return TRUE; + return true; } /* Perform a single relocation. By default we use the standard BFD @@ -350,8 +350,8 @@ mt_elf_relocate_section } else { - bfd_boolean unresolved_reloc; - bfd_boolean warned, ignored; + bool unresolved_reloc; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -395,7 +395,7 @@ mt_elf_relocate_section case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -417,27 +417,26 @@ mt_elf_relocate_section } } - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean -mt_elf_check_relocs - (bfd * abfd, - struct bfd_link_info * info, - asection * sec, - const Elf_Internal_Rela * relocs) +static bool +mt_elf_check_relocs (bfd *abfd, + struct bfd_link_info *info, + asection *sec, + const Elf_Internal_Rela *relocs) { - Elf_Internal_Shdr * symtab_hdr; - struct elf_link_hash_entry ** sym_hashes; - const Elf_Internal_Rela * rel; - const Elf_Internal_Rela * rel_end; + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + const Elf_Internal_Rela *rel; + const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -460,7 +459,7 @@ mt_elf_check_relocs } } - return TRUE; + return true; } /* Return the MACH for an e_flags value. */ @@ -478,45 +477,44 @@ elf32_mt_machine (bfd *abfd) return bfd_mach_ms1; } -static bfd_boolean -mt_elf_object_p (bfd * abfd) +static bool +mt_elf_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_mt, elf32_mt_machine (abfd)); - return TRUE; + return true; } /* Function to set the ELF flag bits. */ -static bfd_boolean -mt_elf_set_private_flags (bfd * abfd, - flagword flags) +static bool +mt_elf_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool mt_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; - flagword old_flags, new_flags; - bfd_boolean ok = TRUE; + flagword old_flags, new_flags; + bool ok = true; /* Check if we have the same endianness. */ if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; /* If they're not both mt, then merging is meaningless, so just don't do it. */ if (strcmp (ibfd->arch_info->arch_name, "mt") != 0) - return TRUE; + return true; if (strcmp (obfd->arch_info->arch_name, "mt") != 0) - return TRUE; + return true; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; @@ -529,13 +527,13 @@ mt_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) { old_flags = new_flags; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; } else if ((new_flags & EF_MT_CPU_MASK) != (old_flags & EF_MT_CPU_MASK)) { /* CPU has changed. This is invalid, because MRISC, MRISC2 and MS2 are not subsets of each other. */ - ok = FALSE; + ok = false; } if (ok) @@ -547,10 +545,10 @@ mt_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return ok; } -static bfd_boolean -mt_elf_print_private_bfd_data (bfd * abfd, void * ptr) +static bool +mt_elf_print_private_bfd_data (bfd *abfd, void *ptr) { - FILE * file = (FILE *) ptr; + FILE *file = (FILE *) ptr; flagword flags; BFD_ASSERT (abfd != NULL && ptr != NULL); @@ -571,7 +569,7 @@ mt_elf_print_private_bfd_data (bfd * abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } diff --git a/bfd/elf32-nds32.c b/bfd/elf32-nds32.c index 61a52af56a..31a3ca0292 100644 --- a/bfd/elf32-nds32.c +++ b/bfd/elf32-nds32.c @@ -62,14 +62,14 @@ static bfd_reloc_status_type nds32_elf_do_9_pcrel_reloc static bfd_vma calculate_memory_address (bfd *, Elf_Internal_Rela *, Elf_Internal_Sym *, Elf_Internal_Shdr *); static int nds32_get_section_contents (bfd *, asection *, - bfd_byte **, bfd_boolean); + bfd_byte **, bool); static int nds32_get_local_syms (bfd *, asection *ATTRIBUTE_UNUSED, Elf_Internal_Sym **); -static bfd_boolean nds32_relax_fp_as_gp +static bool nds32_relax_fp_as_gp (struct bfd_link_info *link_info, bfd *abfd, asection *sec, Elf_Internal_Rela *internal_relocs, Elf_Internal_Rela *irelend, Elf_Internal_Sym *isymbuf); -static bfd_boolean nds32_fag_remove_unused_fpbase +static bool nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec, Elf_Internal_Rela *internal_relocs, Elf_Internal_Rela *irelend); @@ -253,7 +253,7 @@ struct elf_nds32_obj_tdata #define elf32_nds32_relax_group_ptr(bfd) \ &(elf_nds32_tdata (bfd)->relax_group) -static bfd_boolean +static bool nds32_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_nds32_obj_tdata), @@ -275,60 +275,60 @@ static reloc_howto_type nds32_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO2 (R_NDS32_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ nds32_elf_generic_reloc,/* special_function */ "R_NDS32_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO2 (R_NDS32_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ nds32_elf_generic_reloc,/* special_function */ "R_NDS32_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 20 bit address. */ HOWTO2 (R_NDS32_20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ nds32_elf_generic_reloc,/* special_function */ "R_NDS32_20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfffff, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An PC Relative 9-bit relocation, shifted by 2. This reloc is complicated because relocations are relative to pc & -4. @@ -342,45 +342,45 @@ static reloc_howto_type nds32_elf_howto_table[] = 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ nds32_elf_9_pcrel_reloc,/* special_function */ "R_NDS32_9_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 15 bit relocation, right shifted by 1. */ HOWTO2 (R_NDS32_15_PCREL, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 14, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_15_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3fff, /* src_mask */ 0x3fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 17 bit relocation, right shifted by 1. */ HOWTO2 (R_NDS32_17_PCREL, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_17_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 25 bit relocation, right shifted by 1. */ /* It's not clear whether this should have partial_inplace set or not. @@ -391,447 +391,447 @@ static reloc_howto_type nds32_elf_howto_table[] = 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_25_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* High 20 bits of address when lower 12 is or'd in. */ HOWTO2 (R_NDS32_HI20, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_hi20_reloc, /* special_function */ "R_NDS32_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S3, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_lo12_reloc, /* special_function */ "R_NDS32_LO12S3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000001ff, /* src_mask */ 0x000001ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_lo12_reloc, /* special_function */ "R_NDS32_LO12S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_lo12_reloc, /* special_function */ "R_NDS32_LO12S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000007ff, /* src_mask */ 0x000007ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_lo12_reloc, /* special_function */ "R_NDS32_LO12S0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 15 bits offset. */ HOWTO2 (R_NDS32_SDA15S3, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ nds32_elf_sda15_reloc, /* special_function */ "R_NDS32_SDA15S3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 15 bits offset. */ HOWTO2 (R_NDS32_SDA15S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ nds32_elf_sda15_reloc, /* special_function */ "R_NDS32_SDA15S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 15 bits offset. */ HOWTO2 (R_NDS32_SDA15S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ nds32_elf_sda15_reloc, /* special_function */ "R_NDS32_SDA15S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 15 bits offset. */ HOWTO2 (R_NDS32_SDA15S0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ nds32_elf_sda15_reloc, /* special_function */ "R_NDS32_SDA15S0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO2 (R_NDS32_GNU_VTINHERIT,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ NULL, /* special_function */ "R_NDS32_GNU_VTINHERIT",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO2 (R_NDS32_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn,/* special_function */ "R_NDS32_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO2 (R_NDS32_16_RELA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_16_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO2 (R_NDS32_32_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_32_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 20 bit address. */ HOWTO2 (R_NDS32_20_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_20_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfffff, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_9_PCREL_RELA, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_9_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 15 bit relocation, right shifted by 1. */ HOWTO2 (R_NDS32_15_PCREL_RELA,/* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 14, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_15_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3fff, /* src_mask */ 0x3fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 17 bit relocation, right shifted by 1. */ HOWTO2 (R_NDS32_17_PCREL_RELA,/* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_17_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative 25 bit relocation, right shifted by 2. */ HOWTO2 (R_NDS32_25_PCREL_RELA,/* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_25_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* High 20 bits of address when lower 16 is or'd in. */ HOWTO2 (R_NDS32_HI20_RELA, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_HI20_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S3_RELA, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_LO12S3_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000001ff, /* src_mask */ 0x000001ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S2_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_LO12S2_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S1_RELA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_LO12S1_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000007ff, /* src_mask */ 0x000007ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S0_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_LO12S0_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 15 bits offset. */ HOWTO2 (R_NDS32_SDA15S3_RELA, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA15S3_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 15 bits offset. */ HOWTO2 (R_NDS32_SDA15S2_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA15S2_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_SDA15S1_RELA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA15S1_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_SDA15S0_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA15S0_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO2 (R_NDS32_RELA_GNU_VTINHERIT,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ NULL, /* special_function */ "R_NDS32_RELA_GNU_VTINHERIT",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO2 (R_NDS32_RELA_GNU_VTENTRY,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn,/* special_function */ "R_NDS32_RELA_GNU_VTENTRY",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_NDS32_20, but referring to the GOT table entry for the symbol. */ @@ -839,15 +839,15 @@ static reloc_howto_type nds32_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOT20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfffff, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_NDS32_PCREL, but referring to the procedure linkage table entry for the symbol. */ @@ -855,15 +855,15 @@ static reloc_howto_type nds32_elf_howto_table[] = 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_25_PLTREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* This is used only by the dynamic linker. The symbol should exist both in the object being run and in some shared library. The @@ -874,15 +874,15 @@ static reloc_howto_type nds32_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_NDS32_20, but used when setting global offset table entries. */ @@ -890,30 +890,30 @@ static reloc_howto_type nds32_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Marks a procedure linkage table entry for a symbol. */ HOWTO2 (R_NDS32_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Used only by the dynamic linker. When the object is run, this longword is set to the load address of the object, plus the @@ -922,29 +922,29 @@ static reloc_howto_type nds32_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_GOTOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfffff, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An PC Relative 20-bit relocation used when setting PIC offset table register. */ @@ -952,15 +952,15 @@ static reloc_howto_type nds32_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTPC20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfffff, /* src_mask */ 0xfffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Like R_NDS32_HI20, but referring to the GOT table entry for the symbol. */ @@ -968,28 +968,28 @@ static reloc_howto_type nds32_elf_howto_table[] = 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOT_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_GOT_LO12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOT_LO12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An PC Relative relocation used when setting PIC offset table register. Like R_NDS32_HI20, but referring to the GOT table entry for @@ -998,55 +998,55 @@ static reloc_howto_type nds32_elf_howto_table[] = 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTPC_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO2 (R_NDS32_GOTPC_LO12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTPC_LO12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO2 (R_NDS32_GOTOFF_HI20, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTOFF_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_GOTOFF_LO12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTOFF_LO12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Alignment hint for relaxable instruction. This is used with R_NDS32_LABEL as a pair. Relax this instruction from 4 bytes to 2 @@ -1055,918 +1055,918 @@ static reloc_howto_type nds32_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_INSN16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Alignment hint for label. */ HOWTO2 (R_NDS32_LABEL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LABEL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for unconditional call sequence */ HOWTO2 (R_NDS32_LONGCALL1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGCALL1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional call sequence. */ HOWTO2 (R_NDS32_LONGCALL2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGCALL2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional call sequence. */ HOWTO2 (R_NDS32_LONGCALL3, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGCALL3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for unconditional branch sequence. */ HOWTO2 (R_NDS32_LONGJUMP1, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGJUMP1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional branch sequence. */ HOWTO2 (R_NDS32_LONGJUMP2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGJUMP2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional branch sequence. */ HOWTO2 (R_NDS32_LONGJUMP3, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGJUMP3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for load/store sequence. */ HOWTO2 (R_NDS32_LOADSTORE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LOADSTORE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for load/store sequence. */ HOWTO2 (R_NDS32_9_FIXED_RELA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_9_FIXED_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for load/store sequence. */ HOWTO2 (R_NDS32_15_FIXED_RELA,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_15_FIXED_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00003fff, /* src_mask */ 0x00003fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for load/store sequence. */ HOWTO2 (R_NDS32_17_FIXED_RELA,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_17_FIXED_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for load/store sequence. */ HOWTO2 (R_NDS32_25_FIXED_RELA,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_25_FIXED_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 20 bits of PLT symbol offset relative to PC. */ HOWTO2 (R_NDS32_PLTREL_HI20, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_PLTREL_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 12 bits of PLT symbol offset relative to PC. */ HOWTO2 (R_NDS32_PLTREL_LO12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_PLTREL_LO12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 20 bits of PLT symbol offset relative to GOT (GP). */ HOWTO2 (R_NDS32_PLT_GOTREL_HI20, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_PLT_GOTREL_HI20",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 12 bits of PLT symbol offset relative to GOT (GP). */ HOWTO2 (R_NDS32_PLT_GOTREL_LO12,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_PLT_GOTREL_LO12",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 12 bits offset. */ HOWTO2 (R_NDS32_SDA12S2_DP_RELA,/* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA12S2_DP_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 12 bits offset. */ HOWTO2 (R_NDS32_SDA12S2_SP_RELA,/* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA12S2_SP_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S2_DP_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_LO12S2_DP_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. */ HOWTO2 (R_NDS32_LO12S2_SP_RELA,/* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_LO12S2_SP_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 12 bits of address. Special identity for or case. */ HOWTO2 (R_NDS32_LO12S0_ORI_RELA,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_LO12S0_ORI_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 19 bits offset. */ HOWTO2 (R_NDS32_SDA16S3_RELA, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA16S3_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Small data area 15 bits offset. */ HOWTO2 (R_NDS32_SDA17S2_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA17S2_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0001ffff, /* src_mask */ 0x0001ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_SDA18S1_RELA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA18S1_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0003ffff, /* src_mask */ 0x0003ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_SDA19S0_RELA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA19S0_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0007ffff, /* src_mask */ 0x0007ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_DWARF2_OP1_RELA,/* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DWARF2_OP1_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_DWARF2_OP2_RELA,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DWARF2_OP2_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_DWARF2_LEB_RELA,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DWARF2_LEB_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_UPDATE_TA_RELA,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_UPDATE_TA_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_NDS32_PCREL, but referring to the procedure linkage table entry for the symbol. */ HOWTO2 (R_NDS32_9_PLTREL, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_9_PLTREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Low 20 bits of PLT symbol offset relative to GOT (GP). */ HOWTO2 (R_NDS32_PLT_GOTREL_LO20,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_PLT_GOTREL_LO20",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* low 15 bits of PLT symbol offset relative to GOT (GP) */ HOWTO2 (R_NDS32_PLT_GOTREL_LO15,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_PLT_GOTREL_LO15",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 19 bits of PLT symbol offset relative to GOT (GP). */ HOWTO2 (R_NDS32_PLT_GOTREL_LO19,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_PLT_GOTREL_LO19",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0007ffff, /* src_mask */ 0x0007ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_GOT_LO15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOT_LO15", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_GOT_LO19, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOT_LO19", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0007ffff, /* src_mask */ 0x0007ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_GOTOFF_LO15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTOFF_LO15", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_GOTOFF_LO19, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOTOFF_LO19", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0007ffff, /* src_mask */ 0x0007ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GOT 15 bits offset. */ HOWTO2 (R_NDS32_GOT15S2_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOT15S2_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GOT 17 bits offset. */ HOWTO2 (R_NDS32_GOT17S2_RELA, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_GOT17S2_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0001ffff, /* src_mask */ 0x0001ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 5 bit address. */ HOWTO2 (R_NDS32_5_RELA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_5_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1f, /* src_mask */ 0x1f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_10_UPCREL_RELA,/* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_10_UPCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1ff, /* src_mask */ 0x1ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO2 (R_NDS32_SDA_FP7U2_RELA,/* type */ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_SDA_FP7U2_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000007f, /* src_mask */ 0x0000007f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_WORD_9_PCREL_RELA,/* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_WORD_9_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO2 (R_NDS32_25_ABS_RELA, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_25_ABS_RELA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A relative 17 bit relocation for ifc, right shifted by 1. */ HOWTO2 (R_NDS32_17IFC_PCREL_RELA,/* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_17IFC_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A relative unsigned 10 bit relocation for ifc, right shifted by 1. */ HOWTO2 (R_NDS32_10IFCU_PCREL_RELA,/* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_10IFCU_PCREL_RELA",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1ff, /* src_mask */ 0x1ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Like R_NDS32_HI20, but referring to the TLS LE entry for the symbol. */ HOWTO2 (R_NDS32_TLS_LE_HI20, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_LE_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_LE_LO12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_LE_LO12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_NDS32_HI20, but referring to the TLS IE entry for the symbol. */ HOWTO2 (R_NDS32_TLS_IE_HI20, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_IE_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_IE_LO12S2,/* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_IE_LO12S2",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS LE TP offset relocation */ HOWTO2 (R_NDS32_TLS_TPOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_TPOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 20 bit address. */ HOWTO2 (R_NDS32_TLS_LE_20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_LE_20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfffff, /* src_mask */ 0xfffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_LE_15S0, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_LE_15S0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7fff, /* src_mask */ 0x7fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_LE_15S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_LE_15S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7fff, /* src_mask */ 0x7fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_LE_15S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_LE_15S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7fff, /* src_mask */ 0x7fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for unconditional call sequence */ HOWTO2 (R_NDS32_LONGCALL4, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGCALL4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional call sequence. */ HOWTO2 (R_NDS32_LONGCALL5, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGCALL5", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional call sequence. */ HOWTO2 (R_NDS32_LONGCALL6, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGCALL6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for unconditional branch sequence. */ HOWTO2 (R_NDS32_LONGJUMP4, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGJUMP4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional branch sequence. */ HOWTO2 (R_NDS32_LONGJUMP5, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGJUMP5", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional branch sequence. */ HOWTO2 (R_NDS32_LONGJUMP6, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGJUMP6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relax hint for conditional branch sequence. */ HOWTO2 (R_NDS32_LONGJUMP7, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LONGJUMP7", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_IE_LO12, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_IE_LO12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Like R_NDS32_HI20, but referring to the TLS IE (PIE) entry for the symbol. */ @@ -1974,118 +1974,118 @@ static reloc_howto_type nds32_elf_howto_table[] = 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_IEGP_HI20",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_IEGP_LO12,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_IEGP_LO12",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO2 (R_NDS32_TLS_IEGP_LO12S2,/* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_IEGP_LO12S2",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS description relocation */ HOWTO2 (R_NDS32_TLS_DESC, /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_hi20_reloc, /* special_function */ "R_NDS32_TLS_DESC_HI20",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description offset high part. */ HOWTO2 (R_NDS32_TLS_DESC_HI20,/* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_hi20_reloc, /* special_function */ "R_NDS32_TLS_DESC_HI20",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description offset low part. */ HOWTO2 (R_NDS32_TLS_DESC_LO12,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_lo12_reloc, /* special_function */ "R_NDS32_TLS_DESC_LO12",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000fff, /* src_mask */ 0x00000fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description offset set (movi). */ HOWTO2 (R_NDS32_TLS_DESC_20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_DESC_20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000fffff, /* src_mask */ 0x000fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description offset set (lwi.gp). */ HOWTO2 (R_NDS32_TLS_DESC_SDA17S2,/* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NDS32_TLS_DESC_SDA17S2",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0001ffff, /* src_mask */ 0x0001ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* Relocations used for relaxation. */ @@ -2097,399 +2097,399 @@ static reloc_howto_type nds32_elf_relax_howto_table[] = { 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_RELAX_ENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_GOT_SUFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_GOT_SUFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_GOTOFF_SUFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_GOTOFF_SUFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_PLT_GOT_SUFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_PLT_GOT_SUFF",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_MULCALL_SUFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_MULCALL_SUFF",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_PTR, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_PTR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_PTR_COUNT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_PTR_COUNT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_PTR_RESOLVED, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_PTR_RESOLVED",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_PLTBLOCK, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_PLTBLOCK", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_RELAX_REGION_BEGIN,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_RELAX_REGION_BEGIN",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_RELAX_REGION_END,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_RELAX_REGION_END",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_MINUEND, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_MINUEND", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_SUBTRAHEND, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_SUBTRAHEND", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_DIFF8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DIFF8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_DIFF16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DIFF16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_DIFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DIFF32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_DIFF_ULEB128, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DIFF_ULEB128",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_DATA, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_DATA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_TRAN, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TRAN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_TLS_LE_ADD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TLS_LE_ADD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_TLS_LE_LS, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TLS_LE_LS", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_EMPTY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_EMPTY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description address base addition. */ HOWTO3 (R_NDS32_TLS_DESC_ADD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TLS_DESC_ADD",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description function load. */ HOWTO3 (R_NDS32_TLS_DESC_FUNC,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TLS_DESC_FUNC",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS DESC resolve function call. */ HOWTO3 (R_NDS32_TLS_DESC_CALL,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TLS_DESC_CALL",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS DESC variable access. */ HOWTO3 (R_NDS32_TLS_DESC_MEM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TLS_DESC_MEM",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description mark (@tlsdec). */ HOWTO3 (R_NDS32_RELAX_REMOVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_REMOVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD description mark (@tlsdec). */ HOWTO3 (R_NDS32_RELAX_GROUP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_GROUP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO3 (R_NDS32_TLS_IEGP_LW, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_TLS_IEGP_LW", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LA and FLSI relaxation. */ HOWTO3 (R_NDS32_LSI, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ nds32_elf_ignore_reloc,/* special_function */ "R_NDS32_LSI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), + false), }; static unsigned long dl_tlsdesc_lazy_trampoline[] = @@ -3224,7 +3224,7 @@ bfd_elf32_bfd_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an NDS32 ELF reloc. */ -static bfd_boolean +static bool nds32_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -3237,15 +3237,15 @@ nds32_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } BFD_ASSERT (ELF32_R_TYPE (dst->r_info) <= R_NDS32_GNU_VTENTRY); cache_ptr->howto = bfd_elf32_bfd_reloc_type_table_lookup (r_type); - return TRUE; + return true; } -static bfd_boolean +static bool nds32_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -3256,19 +3256,19 @@ nds32_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, && (r_type < R_NDS32_max))) { cache_ptr->howto = bfd_elf32_bfd_reloc_type_table_lookup (r_type); - return TRUE; + return true; } /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Support for core dump NOTE sections. Reference to include/linux/elfcore.h in Linux. */ -static bfd_boolean +static bool nds32_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -3305,7 +3305,7 @@ nds32_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) break; default: - return FALSE; + return false; } /* Make a ".reg" section. */ @@ -3313,7 +3313,7 @@ nds32_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool nds32_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) @@ -3329,7 +3329,7 @@ nds32_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) break; default: - return FALSE; + return false; } /* Note that for some reason, a spurious space is tacked @@ -3343,7 +3343,7 @@ nds32_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Hook called by the linker routine which adds symbols from an object @@ -3351,7 +3351,7 @@ nds32_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) We also keep watching for whether we need to create the sdata special linker sections. */ -static bfd_boolean +static bool nds32_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -3385,7 +3385,7 @@ nds32_elf_add_symbol_hook (bfd *abfd, *secp = bfd_make_section_old_way (abfd, ".scommon_d"); break; default: - return TRUE; + return true; } (*secp)->flags |= SEC_IS_COMMON | SEC_SMALL_DATA; @@ -3393,7 +3393,7 @@ nds32_elf_add_symbol_hook (bfd *abfd, break; } - return TRUE; + return true; } /* This function can figure out the best location for a base register to access @@ -3444,10 +3444,10 @@ static asection *sda_rela_sec = NULL; #define SDA_SECTION_NUM 10 static bfd_reloc_status_type -nds32_elf_final_sda_base (bfd * output_bfd, - struct bfd_link_info * info, - bfd_vma * psb, - bfd_boolean add_symbol) +nds32_elf_final_sda_base (bfd *output_bfd, + struct bfd_link_info *info, + bfd_vma *psb, + bool add_symbol) { int relax_fp_as_gp; struct elf_nds32_link_hash_table *table; @@ -3456,7 +3456,7 @@ nds32_elf_final_sda_base (bfd * output_bfd, asection *first = NULL, *final = NULL, *temp; bfd_vma sda_base = 0; - h = bfd_link_hash_lookup (info->hash, "_SDA_BASE_", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_SDA_BASE_", false, false, true); if (!h || (h->type != bfd_link_hash_defined && h->type != bfd_link_hash_defweak)) { @@ -3579,9 +3579,9 @@ nds32_elf_final_sda_base (bfd * output_bfd, if (!_bfd_generic_link_add_one_symbol (info, output_bfd, "_SDA_BASE_", BSF_GLOBAL | BSF_WEAK, first, - (bfd_vma) sda_base, (const char *) NULL, FALSE, + (bfd_vma) sda_base, (const char *) NULL, false, get_elf_backend_data (output_bfd)->collect, &h)) - return FALSE; + return false; sda_rela_sec = first; } @@ -3589,7 +3589,7 @@ nds32_elf_final_sda_base (bfd * output_bfd, /* Set _FP_BASE_ to _SDA_BASE_. */ table = nds32_elf_hash_table (info); relax_fp_as_gp = table->relax_fp_as_gp; - h2 = bfd_link_hash_lookup (info->hash, FP_BASE_NAME, FALSE, FALSE, FALSE); + h2 = bfd_link_hash_lookup (info->hash, FP_BASE_NAME, false, false, false); /* _SDA_BASE_ is difined in linker script. */ if (!first) { @@ -3607,8 +3607,8 @@ nds32_elf_final_sda_base (bfd * output_bfd, if (!_bfd_generic_link_add_one_symbol (info, output_bfd, FP_BASE_NAME, BSF_GLOBAL | BSF_WEAK, first, sda_base, (const char *) NULL, - FALSE, get_elf_backend_data (output_bfd)->collect, &h2)) - return FALSE; + false, get_elf_backend_data (output_bfd)->collect, &h2)) + return false; } if (add_symbol) @@ -3704,13 +3704,13 @@ nds32_elf_link_hash_table_create (bfd *abfd) /* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool create_got_section (bfd *dynobj, struct bfd_link_info *info) { struct elf_link_hash_table *ehtab; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; ehtab = elf_hash_table (info); ehtab->sgot = bfd_get_section_by_name (dynobj, ".got"); @@ -3726,14 +3726,14 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) | SEC_IN_MEMORY | SEC_LINKER_CREATED | SEC_READONLY)) || !bfd_set_section_alignment (ehtab->srelgot, 2)) - return FALSE; + return false; - return TRUE; + return true; } /* Create dynamic sections when linking against a dynamic object. */ -static bfd_boolean +static bool nds32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_table *ehtab; @@ -3769,7 +3769,7 @@ nds32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || !bfd_set_section_flags (s, pltflags) || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; if (bed->want_plt_sym) { @@ -3780,16 +3780,16 @@ nds32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (!(_bfd_generic_link_add_one_symbol (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, - (bfd_vma) 0, (const char *) NULL, FALSE, + (bfd_vma) 0, (const char *) NULL, false, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->type = STT_OBJECT; if (bfd_link_pic (info) && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = bfd_make_section (abfd, @@ -3798,10 +3798,10 @@ nds32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || !bfd_set_section_flags (s, flags | SEC_READONLY) || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (ehtab->sgot == NULL && !create_got_section (abfd, info)) - return FALSE; + return false; for (sec = abfd->sections; sec; sec = sec->next) { @@ -3819,7 +3819,7 @@ nds32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || !bfd_set_section_flags (s, flags | SEC_READONLY) || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } if (bed->want_dynbss) @@ -3834,7 +3834,7 @@ nds32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->root.sdynbss = s; if (s == NULL || !bfd_set_section_flags (s, SEC_ALLOC | SEC_LINKER_CREATED)) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the linker will map it to an output section. We can't just create it @@ -3854,11 +3854,11 @@ nds32_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || !bfd_set_section_flags (s, flags | SEC_READONLY) || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Copy the extra info we tack onto an elf_link_hash_entry. */ @@ -3890,7 +3890,7 @@ nds32_elf_copy_indirect_symbol (struct bfd_link_info *info, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool nds32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -3928,7 +3928,7 @@ nds32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) - 1; @@ -3942,7 +3942,7 @@ nds32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -3953,18 +3953,18 @@ nds32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (0 && info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -3972,7 +3972,7 @@ nds32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -4014,7 +4014,7 @@ nds32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (power_of_two > bfd_section_alignment (s)) { if (!bfd_set_section_alignment (s, power_of_two)) - return FALSE; + return false; } /* Define the symbol as being at this point in the section. */ @@ -4024,13 +4024,13 @@ nds32_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Increment the section size to make room for the symbol. */ s->size += h->size; - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -4039,7 +4039,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; /* When warning symbols are created, they **replace** the "real" entry in the hash table, thus we never get to see the real @@ -4051,7 +4051,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) ehtab = elf_hash_table (info); htab = nds32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if ((htab->root.dynamic_sections_created || h->type == STT_GNU_IFUNC) && h->plt.refcount > 0 @@ -4062,7 +4062,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->dynindx == -1 && !h->forced_local) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -4114,7 +4114,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->got.refcount > 0) { asection *sgot; - bfd_boolean dyn; + bool dyn; int tls_type = elf32_nds32_hash_entry (h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -4122,7 +4122,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->dynindx == -1 && !h->forced_local) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } sgot = elf_hash_table (info)->sgot; @@ -4165,7 +4165,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->got.offset = (bfd_vma)-1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -4207,7 +4207,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->dynindx == -1 && !h->forced_local) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -4228,7 +4228,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) sreloc->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Add relocation REL to the end of relocation section SRELOC. */ @@ -4252,19 +4252,19 @@ elf32_nds32_add_dynreloc (bfd *output_bfd, /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_nds32_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = nds32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -4419,7 +4419,7 @@ nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -4442,7 +4442,7 @@ nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (strncmp (bfd_section_name (s), ".rela", 5) == 0) { if (s->size != 0 && s != elf_hash_table (info)->srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -4476,7 +4476,7 @@ nds32_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -4691,13 +4691,13 @@ nds32_elf_output_symbol_hook (struct bfd_link_info *info, table = nds32_elf_hash_table (info); sym_ld_script = table->sym_ld_script; if (!sym_ld_script) - return TRUE; + return true; if (!h || !name || *name == '\0') - return TRUE; + return true; if (input_sec->flags & SEC_EXCLUDE) - return TRUE; + return true; if (!check_start_export_sym) { @@ -4709,7 +4709,7 @@ nds32_elf_output_symbol_hook (struct bfd_link_info *info, || h->root.type == bfd_link_hash_defweak) { if (!h->root.u.def.section->output_section) - return TRUE; + return true; if (bfd_is_const_section (input_sec)) source = input_sec->name; @@ -4723,7 +4723,7 @@ nds32_elf_output_symbol_hook (struct bfd_link_info *info, + h->root.u.def.section->output_offset), source); } - return TRUE; + return true; } /* Relocate an NDS32/D ELF section. @@ -4785,7 +4785,7 @@ gottpoff (struct bfd_link_info *info, bfd_vma address) return tp_offset; } -static bfd_boolean +static bool patch_tls_desc_to_ie (bfd_byte *contents, Elf_Internal_Rela *rel, bfd *ibfd) { /* TLS_GD/TLS_LD model #1 @@ -4820,7 +4820,7 @@ patch_tls_desc_to_ie (bfd_byte *contents, Elf_Internal_Rela *rel, bfd *ibfd) 04 00 00 01 lwi $r0,[$r0+#0x4] 40 00 64 00 add $r0,$r0,$r25 */ - bfd_boolean rz = FALSE; + bool rz = false; typedef struct { @@ -4872,7 +4872,7 @@ patch_tls_desc_to_ie (bfd_byte *contents, Elf_Internal_Rela *rel, bfd *ibfd) /* already patched? */ if ((patch[0] == (0xfff07fffu & bfd_getb32 (p + 0))) && (patch[1] == bfd_getb32 (p + 4))) - rz = TRUE; + rz = true; } else if (mode0[0].opcode == (mode0[0].mask & bfd_getb32 (p + 0))) { @@ -4882,7 +4882,7 @@ patch_tls_desc_to_ie (bfd_byte *contents, Elf_Internal_Rela *rel, bfd *ibfd) bfd_putb32 (patch[0] | (regidx << 15), p + 0); bfd_putb32 (patch[1], p + 4); bfd_putb32 (patch[2], p + 8); - rz = TRUE; + rz = true; } } else if (mode1[0].opcode == (mode1[0].mask & bfd_getb32 (p + 0))) @@ -4893,7 +4893,7 @@ patch_tls_desc_to_ie (bfd_byte *contents, Elf_Internal_Rela *rel, bfd *ibfd) bfd_putb32 (patch[0] | (regidx << 15), p + 0); bfd_putb32 (patch[1], p + 4); bfd_putb32 (patch[2], p + 8); - rz = TRUE; + rz = true; } } @@ -4948,7 +4948,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel, *relend; - bfd_boolean ret = TRUE; /* Assume success. */ + bool ret = true; /* Assume success. */ int align = 0; bfd_reloc_status_type r; const char *errmsg = NULL; @@ -4987,9 +4987,9 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, if ((!bfd_link_relocatable (info))) { is_SDA_BASE_set = 1; - r = nds32_elf_final_sda_base (output_bfd, info, &gp, TRUE); + r = nds32_elf_final_sda_base (output_bfd, info, &gp, true); if (r != bfd_reloc_ok) - return FALSE; + return false; } /* Do TLS model conversion once at first. */ @@ -5029,7 +5029,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, r_type); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; continue; } @@ -5106,7 +5106,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, /* External symbol. */ if (bfd_link_relocatable (info)) continue; - bfd_boolean warned, ignored, unresolved_reloc; + bool warned, ignored, unresolved_reloc; int symndx = r_symndx - symtab_hdr->sh_info; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, @@ -5292,7 +5292,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, if (h != NULL) { /* External symbol */ - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) - 1); @@ -5409,7 +5409,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, && (!info->symbolic || !h->def_regular)))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; bfd_byte *loc; /* When generating a shared object, these relocations @@ -5424,7 +5424,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, (input_bfd, elf_elfheader (input_bfd)->e_shstrndx, elf_section_data (input_section)->rela.hdr->sh_name); if (name == NULL) - return FALSE; + return false; BFD_ASSERT (strncmp (name, ".rela", 5) == 0 && strcmp (bfd_section_name (input_section), @@ -5434,17 +5434,17 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, BFD_ASSERT (sreloc != NULL); } - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) - 1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) - 2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -5467,7 +5467,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, && h->def_regular) || (bfd_link_pie (info) && h->def_regular)) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_NDS32_RELATIVE); outrel.r_addend = relocation + rel->r_addend; @@ -5495,7 +5495,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, "making a shared object; recompile with -fPIC"), input_bfd, nds32_elf_howto_table[r_type].name, h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } outrel.r_info = ELF32_R_INFO (h->dynindx, r_type); @@ -5523,7 +5523,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: warning: %s unsupported in shared mode"), input_bfd, "R_NDS32_25_ABS_RELA"); - return FALSE; + return false; } break; @@ -5563,7 +5563,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) - 1); @@ -5648,7 +5648,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, /* Incorrect alignment. */ _bfd_error_handler (_("%pB: warning: unaligned access to GOT entry"), input_bfd); - ret = FALSE; + ret = false; r = bfd_reloc_dangerous; goto check_reloc; } @@ -5684,12 +5684,12 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, /* If the symbol is in the abs section, the out_bfd will be null. This happens when the relocation has a symbol@GOTOFF. */ - r = nds32_elf_final_sda_base (output_bfd, info, &gp, FALSE); + r = nds32_elf_final_sda_base (output_bfd, info, &gp, false); if (r != bfd_reloc_ok) { _bfd_error_handler (_("%pB: warning: relocate SDA_BASE failed"), input_bfd); - ret = FALSE; + ret = false; goto check_reloc; } @@ -5713,7 +5713,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, (_("%pB(%pA): warning: unaligned small data access" " of type %d"), input_bfd, input_section, r_type); - ret = FALSE; + ret = false; goto check_reloc; } break; @@ -5758,7 +5758,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, BFD_ASSERT (sgot != NULL); if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -5795,13 +5795,13 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, /* The offset must always be a multiple of 4. We use the least significant bit to record whether we have already processed this entry. */ - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; srelgot = ehtab->srelgot; if ((bfd_link_pic (info) || indx != 0) && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) { - need_relocs = TRUE; + need_relocs = true; BFD_ASSERT (srelgot != NULL); } @@ -6037,7 +6037,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, offset, TRUE); + (info, name, input_bfd, input_section, offset, true); break; case bfd_reloc_outofrange: @@ -6074,7 +6074,7 @@ nds32_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool nds32_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym) { @@ -6283,13 +6283,13 @@ nds32_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; @@ -6301,7 +6301,7 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) ehtab = elf_hash_table (info); htab = nds32_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; @@ -6309,7 +6309,7 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) /* A broken linker script might have discarded the dynamic sections. Catch this here so that we do not seg-fault later on. */ if (sgotplt != NULL && bfd_is_abs_section (sgotplt->output_section)) - return FALSE; + return false; sdyn = bfd_get_section_by_name (dynobj, ".dynamic"); if (elf_hash_table (info)->dynamic_sections_created) @@ -6485,13 +6485,13 @@ nds32_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) elf_section_data (sgotplt->output_section)->this_hdr.sh_entsize = 4; } - return TRUE; + return true; } /* Set the right machine number. */ -static bfd_boolean +static bool nds32_elf_object_p (bfd *abfd) { static unsigned int cur_arch = 0; @@ -6522,12 +6522,12 @@ nds32_elf_object_p (bfd *abfd) break; } - return TRUE; + return true; } /* Store the machine number in the flags field. */ -static bfd_boolean +static bool nds32_elf_final_write_processing (bfd *abfd) { unsigned long val; @@ -6570,15 +6570,15 @@ nds32_elf_final_write_processing (bfd *abfd) /* Function to keep NDS32 specific file flags. */ -static bfd_boolean +static bool nds32_elf_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } static unsigned int @@ -6609,7 +6609,7 @@ convert_e_flags (unsigned int e_flags, unsigned int arch) return e_flags; } -static bfd_boolean +static bool nds32_check_vec_size (bfd *ibfd) { static unsigned int nds32_vec_size = 0; @@ -6624,7 +6624,7 @@ nds32_check_vec_size (bfd *ibfd) /* Get vec_size in file. */ unsigned int flag_t; - nds32_get_section_contents (ibfd, sec_t, &contents, TRUE); + nds32_get_section_contents (ibfd, sec_t, &contents, true); flag_t = bfd_get_32 (ibfd, contents); /* The value could only be 4 or 16. */ @@ -6641,20 +6641,20 @@ nds32_check_vec_size (bfd *ibfd) ibfd, nds32_vec_size == 1 ? 4 : nds32_vec_size == 2 ? 16 : 0xffffffff, (flag_t & 0x3) == 1 ? 4 : (flag_t & 0x3) == 2 ? 16 : 0xffffffff); - return FALSE; + return false; } else /* Only keep the first vec_size section. */ sec_t->flags |= SEC_EXCLUDE; } - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -6671,15 +6671,15 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; /* TODO: Revise to use object-attributes instead. */ if (!nds32_check_vec_size (ibfd)) - return FALSE; + return false; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (bfd_little_endian (ibfd) != bfd_little_endian (obfd)) { @@ -6687,7 +6687,7 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("%pB: warning: endian mismatch with previous modules"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* -B option in objcopy cannot work as expected. e_flags = 0 shall be @@ -6767,9 +6767,9 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) unitialised values, which surprise surprise, correspond to the default values. */ if (bfd_get_arch_info (ibfd)->the_default) - return TRUE; + return true; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -6779,7 +6779,7 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) bfd_get_mach (ibfd)); } - return TRUE; + return true; } /* Check flag compatibility. */ @@ -6788,7 +6788,7 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: error: ABI mismatch with previous modules"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if ((in_flags & EF_NDS_ARCH) != (out_flags & EF_NDS_ARCH)) @@ -6800,7 +6800,7 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -6834,12 +6834,12 @@ nds32_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) } } - return TRUE; + return true; } /* Display the flags field. */ -static bfd_boolean +static bool nds32_elf_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = (FILE *) ptr; @@ -6863,7 +6863,7 @@ nds32_elf_print_private_bfd_data (bfd *abfd, void *ptr) fputc ('\n', file); - return TRUE; + return true; } static unsigned int @@ -6935,7 +6935,7 @@ get_tls_type (enum elf_nds32_reloc_type r_type, /* Ensure that we have allocated bookkeeping structures for ABFD's local symbols. */ -static bfd_boolean +static bool elf32_nds32_allocate_local_sym_info (bfd *abfd) { if (elf_local_got_refcounts (abfd) == NULL) @@ -6949,10 +6949,10 @@ elf32_nds32_allocate_local_sym_info (bfd *abfd) gp_offset. The details can refer to struct elf_nds32_obj_tdata. */ size = num_syms * (sizeof (bfd_signed_vma) + sizeof (char) + sizeof (bfd_vma) + sizeof (int) - + sizeof (bfd_boolean) + sizeof (bfd_vma)); + + sizeof (bool) + sizeof (bfd_vma)); data = bfd_zalloc (abfd, size); if (data == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = (bfd_signed_vma *) data; data += num_syms * sizeof (bfd_signed_vma); @@ -6967,14 +6967,14 @@ elf32_nds32_allocate_local_sym_info (bfd *abfd) data += num_syms * sizeof (int); } - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -6991,7 +6991,7 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (bfd_link_relocatable (info)) { elf32_nds32_check_relax_group (abfd, sec); - return TRUE; + return true; } symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -7059,7 +7059,7 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (dynobj == NULL) htab->root.dynobj = dynobj = abfd; if (!create_got_section (dynobj, info)) - return FALSE; + return false; break; default: @@ -7096,7 +7096,7 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { /* This is a global offset table entry for a local symbol. */ if (!elf32_nds32_allocate_local_sym_info (abfd)) - return FALSE; + return false; BFD_ASSERT (r_symndx < symtab_hdr->sh_info); if (tls_type != GOT_TLS_LE) @@ -7237,7 +7237,7 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, (abfd, elf_elfheader (abfd)->e_shstrndx, elf_section_data (sec)->rela.hdr->sh_name); if (name == NULL) - return FALSE; + return false; BFD_ASSERT (strncmp (name, ".rela", 5) == 0 && strcmp (bfd_section_name (sec), @@ -7256,7 +7256,7 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (sreloc == NULL || !bfd_set_section_flags (sreloc, flags) || !bfd_set_section_alignment (sreloc, 2)) - return FALSE; + return false; elf_section_type (sreloc) = SHT_RELA; } @@ -7276,12 +7276,12 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; /* Track dynamic relocs needed for local syms too. */ s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) - return FALSE; + return false; vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_dyn_relocs **) vpp; @@ -7293,7 +7293,7 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, size_t amt = sizeof (*p); p = (struct elf_dyn_relocs *) bfd_alloc (dynobj, amt); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -7353,23 +7353,23 @@ nds32_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_NDS32_RELA_GNU_VTINHERIT: case R_NDS32_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_NDS32_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; case R_NDS32_RELA_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } /* Write VAL in uleb128 format to P, returning a pointer to the @@ -8461,7 +8461,7 @@ nds32_convert_16_to_32 (bfd *abfd, uint16_t insn16, uint32_t *pinsn) } -static bfd_boolean +static bool is_sda_access_insn (unsigned long insn) { switch (N32_OP6 (insn)) @@ -8478,11 +8478,11 @@ is_sda_access_insn (unsigned long insn) case N32_OP6_LDC: case N32_OP6_SWC: case N32_OP6_SDC: - return TRUE; + return true; default: ; } - return FALSE; + return false; } static unsigned long @@ -8684,12 +8684,12 @@ is_16bit_NOP (bfd *abfd ATTRIBUTE_UNUSED, unsigned short insn16; if (!(rel->r_addend & R_NDS32_INSN16_CONVERT_FLAG)) - return FALSE; + return false; contents = elf_section_data (sec)->this_hdr.contents; insn16 = bfd_getb16 (contents + rel->r_offset); if (insn16 == NDS32_NOP16) - return TRUE; - return FALSE; + return true; + return false; } /* It checks whether the instruction could be converted to @@ -8717,12 +8717,12 @@ is_convert_32_to_16 (bfd *abfd, asection *sec, bfd_vma offset; if (reloc->r_offset + 4 > sec->size) - return FALSE; + return false; offset = reloc->r_offset; - if (!nds32_get_section_contents (abfd, sec, &contents, TRUE)) - return FALSE; + if (!nds32_get_section_contents (abfd, sec, &contents, true)) + return false; insn = bfd_getb32 (contents + offset); if (nds32_convert_32_to_16 (abfd, insn, insn16, NULL)) @@ -8730,11 +8730,11 @@ is_convert_32_to_16 (bfd *abfd, asection *sec, else if (special_convert_32_to_16 (insn, insn16, reloc)) convert_type = SPECIAL_32_TO_16; else - return FALSE; + return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; if (!nds32_get_local_syms (abfd, sec, &isymbuf)) - return FALSE; + return false; /* Find the first relocation of the same relocation-type, so we iteratie them forward. */ @@ -8752,7 +8752,7 @@ is_convert_32_to_16 (bfd *abfd, asection *sec, off = calculate_offset (abfd, sec, pc_rel, isymbuf, symtab_hdr); if (off >= ACCURATE_8BIT_S1 || off < -ACCURATE_8BIT_S1 || off == 0) - return FALSE; + return false; break; } else if (ELF32_R_TYPE (pc_rel->r_info) == R_NDS32_20_RELA) @@ -8763,7 +8763,7 @@ is_convert_32_to_16 (bfd *abfd, asection *sec, /* mem_addr is unsigned, but the value should be between [-16, 15]. */ if ((mem_addr + 0x10) >> 5) - return FALSE; + return false; break; } else if ((ELF32_R_TYPE (pc_rel->r_info) == R_NDS32_TLS_LE_20) @@ -8771,7 +8771,7 @@ is_convert_32_to_16 (bfd *abfd, asection *sec, { /* It never happen movi to movi55 for R_NDS32_TLS_LE_20, because it can be relaxed to addi for TLS_LE_ADD. */ - return FALSE; + return false; } else if ((ELF32_R_TYPE (pc_rel->r_info) == R_NDS32_SDA15S2_RELA || ELF32_R_TYPE (pc_rel->r_info) == R_NDS32_SDA17S2_RELA) @@ -8792,18 +8792,18 @@ is_convert_32_to_16 (bfd *abfd, asection *sec, { /* Prevent unresolved addi instruction translate to addi45 or addi333. */ - return FALSE; + return false; } else if ((ELF32_R_TYPE (pc_rel->r_info) == R_NDS32_17IFC_PCREL_RELA)) { off = calculate_offset (abfd, sec, pc_rel, isymbuf, symtab_hdr); if (off >= ACCURATE_U9BIT_S1 || off <= 0) - return FALSE; + return false; break; } } - return TRUE; + return true; } static void @@ -9030,7 +9030,7 @@ get_nds32_elf_blank_total (nds32_elf_blank_t **blank_p, bfd_vma addr, return blank_t->total_size + blank_t->size; } -static bfd_boolean +static bool insert_nds32_elf_blank (nds32_elf_blank_t **blank_p, bfd_vma addr, bfd_vma len) { nds32_elf_blank_t *blank_t, *blank_t2; @@ -9047,13 +9047,13 @@ insert_nds32_elf_blank (nds32_elf_blank_t **blank_p, bfd_vma addr, bfd_vma len) { blank_t = create_nds32_elf_blank (addr, len); if (!blank_t) - return FALSE; + return false; while ((*blank_p)->prev != NULL) *blank_p = (*blank_p)->prev; blank_t->next = *blank_p; (*blank_p)->prev = blank_t; (*blank_p) = blank_t; - return TRUE; + return true; } if (addr < blank_t->offset + blank_t->size) @@ -9066,7 +9066,7 @@ insert_nds32_elf_blank (nds32_elf_blank_t **blank_p, bfd_vma addr, bfd_vma len) { blank_t2 = create_nds32_elf_blank (addr, len); if (!blank_t2) - return FALSE; + return false; if (blank_t->next) { blank_t->next->prev = blank_t2; @@ -9077,17 +9077,17 @@ insert_nds32_elf_blank (nds32_elf_blank_t **blank_p, bfd_vma addr, bfd_vma len) *blank_p = blank_t2; } - return TRUE; + return true; } -static bfd_boolean +static bool insert_nds32_elf_blank_recalc_total (nds32_elf_blank_t **blank_p, bfd_vma addr, bfd_vma len) { nds32_elf_blank_t *blank_t; if (!insert_nds32_elf_blank (blank_p, addr, len)) - return FALSE; + return false; blank_t = *blank_p; @@ -9103,7 +9103,7 @@ insert_nds32_elf_blank_recalc_total (nds32_elf_blank_t **blank_p, bfd_vma addr, blank_t = blank_t->next; } - return TRUE; + return true; } static void @@ -9126,7 +9126,7 @@ calc_nds32_blank_total (nds32_elf_blank_t *blank_p) } } -static bfd_boolean +static bool nds32_elf_relax_delete_blanks (bfd *abfd, asection *sec, nds32_elf_blank_t *blank_p) { @@ -9171,7 +9171,7 @@ nds32_elf_relax_delete_blanks (bfd *abfd, asection *sec, symtab_hdr = &elf_tdata (abfd)->symtab_hdr; if (!nds32_get_local_syms (abfd, sec, &isym)) - return FALSE; + return false; if (isym == NULL) { @@ -9181,7 +9181,7 @@ nds32_elf_relax_delete_blanks (bfd *abfd, asection *sec, } if (isym == NULL || symtab_hdr->sh_info == 0) - return FALSE; + return false; blank_t = blank_head; calc_nds32_blank_total (blank_head); @@ -9192,7 +9192,7 @@ nds32_elf_relax_delete_blanks (bfd *abfd, asection *sec, /* Relocations MUST be kept in memory, because relaxation adjust them. */ internal_relocs = _bfd_elf_link_read_relocs (abfd, sect, NULL, NULL, - TRUE /* keep_memory */); + true /* keep_memory */); irelend = internal_relocs + sect->reloc_count; blank_t = blank_head; @@ -9202,7 +9202,7 @@ nds32_elf_relax_delete_blanks (bfd *abfd, asection *sec, continue; contents = NULL; - nds32_get_section_contents (abfd, sect, &contents, TRUE); + nds32_get_section_contents (abfd, sect, &contents, true); for (irel = internal_relocs; irel < irelend; irel++) { @@ -9444,14 +9444,14 @@ nds32_elf_relax_delete_blanks (bfd *abfd, asection *sec, remove_nds32_elf_blank (blank_t); } - return TRUE; + return true; } /* Get the contents of a section. */ static int nds32_get_section_contents (bfd *abfd, asection *sec, - bfd_byte **contents_p, bfd_boolean cache) + bfd_byte **contents_p, bool cache) { /* Get the section contents. */ if (elf_section_data (sec)->this_hdr.contents != NULL) @@ -9459,12 +9459,12 @@ nds32_get_section_contents (bfd *abfd, asection *sec, else { if (!bfd_get_full_section_contents (abfd, sec, contents_p)) - return FALSE; + return false; if (cache) elf_section_data (sec)->this_hdr.contents = *contents_p; } - return TRUE; + return true; } /* Get the contents of the internal symbol of abfd. */ @@ -9486,12 +9486,12 @@ nds32_get_local_syms (bfd *abfd, asection *sec ATTRIBUTE_UNUSED, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (*isymbuf_p == NULL) - return FALSE; + return false; } } symtab_hdr->contents = (bfd_byte *) (*isymbuf_p); - return TRUE; + return true; } /* Range of small data. */ @@ -9579,7 +9579,7 @@ static const char * unrecognized_reloc_msg = /* Relax LONGCALL1 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -9628,7 +9628,7 @@ nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL1", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -9638,7 +9638,7 @@ nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_24BIT_S1 || foff >= CONSERVATIVE_24BIT_S1) - return FALSE; + return false; /* Relax to: jal symbol; 25_PCREL. */ /* For simplicity of coding, we are going to modify the section @@ -9673,13 +9673,13 @@ nds32_elf_relax_longcall1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, lo_irelfn->r_addend = R_NDS32_INSN16_CONVERT_FLAG; *insn_len += 2; } - return TRUE; + return true; } #define CONVERT_CONDITION_CALL(insn) (((insn) & 0xffff0000) ^ 0x90000) /* Relax LONGCALL2 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -9708,7 +9708,7 @@ nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL2", (uint64_t) irel->r_offset); - return FALSE; + return false; } insn = bfd_getb32 (contents + laddr); @@ -9719,7 +9719,7 @@ nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_16BIT_S1 || foff >= CONSERVATIVE_16BIT_S1) - return FALSE; + return false; /* Relax to bgezal rt, label ; 17_PCREL or bltzal rt, label ; 17_PCREL */ @@ -9753,12 +9753,12 @@ nds32_elf_relax_longcall2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, bfd_putb32 (insn, contents + irel->r_offset); *insn_len = 4; - return TRUE; + return true; } /* Relax LONGCALL3 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -9813,7 +9813,7 @@ nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL3", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -9822,7 +9822,7 @@ nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_24BIT_S1 || foff >= CONSERVATIVE_24BIT_S1) - return FALSE; + return false; insn = bfd_getb32 (contents + laddr); if (foff >= -CONSERVATIVE_16BIT_S1 && foff < CONSERVATIVE_16BIT_S1) @@ -9890,12 +9890,12 @@ nds32_elf_relax_longcall3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, insn_len += 2; } } - return TRUE; + return true; } /* Relax LONGJUMP1 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -9946,7 +9946,7 @@ nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP1", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -9955,7 +9955,7 @@ nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff >= CONSERVATIVE_24BIT_S1 || foff < -CONSERVATIVE_24BIT_S1) - return FALSE; + return false; if (insn16_on && foff >= -ACCURATE_8BIT_S1 @@ -9998,7 +9998,7 @@ nds32_elf_relax_longjump1 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, lo_irelfn->r_addend = R_NDS32_INSN16_CONVERT_FLAG; *insn_len += 2; } - return TRUE; + return true; } /* Revert condition branch. This function does not check if the input @@ -10090,7 +10090,7 @@ nds32_elf_convert_branch (uint16_t insn16, uint32_t insn, /* Relax LONGJUMP2 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -10154,7 +10154,7 @@ nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP2", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -10162,7 +10162,7 @@ nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_16BIT_S1 || foff >= CONSERVATIVE_16BIT_S1) - return FALSE; + return false; /* Get the all corresponding instructions. */ if (first_size == 4) @@ -10220,7 +10220,7 @@ nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, cond_reloc = R_NDS32_NONE; } else - return FALSE; + return false; /* Set all relocations. */ irel->r_info = ELF32_R_INFO (ELF32_R_SYM (i2_irelfn->r_info), reloc); @@ -10243,12 +10243,12 @@ nds32_elf_relax_longjump2 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, else i2_irelfn->r_info = ELF32_R_INFO (ELF32_R_SYM (i2_irelfn->r_info), R_NDS32_NONE); - return TRUE; + return true; } /* Relax LONGJUMP3 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -10347,7 +10347,7 @@ nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP3", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -10356,7 +10356,7 @@ nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_24BIT_S1 || foff >= CONSERVATIVE_24BIT_S1) - return FALSE; + return false; /* Get the all corresponding instructions. */ if (first_size == 4) @@ -10457,7 +10457,7 @@ nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, cond_reloc = R_NDS32_25_PLTREL; } else - return FALSE; + return false; if (cond_removed == 1) { @@ -10492,12 +10492,12 @@ nds32_elf_relax_longjump3 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, else lo_irelfn->r_info = ELF32_R_INFO (ELF32_R_SYM (lo_irelfn->r_info), R_NDS32_NONE); - return TRUE; + return true; } /* Relax LONGCALL4 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -10527,7 +10527,7 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -10537,7 +10537,7 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_24BIT_S1 || foff >= CONSERVATIVE_24BIT_S1) - return FALSE; + return false; /* Relax to: jal symbol; 25_PCREL. */ /* For simplicity of coding, we are going to modify the section @@ -10557,12 +10557,12 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL4", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Check these is enough space to insert jal in R_NDS32_EMPTY. */ insn = bfd_getb32 (contents + irel->r_addend); if (insn & 0x80000000) - return FALSE; + return false; /* Replace the long call with a jal. */ em_irel->r_info = ELF32_R_INFO (ELF32_R_SYM (em_irel->r_info), @@ -10592,12 +10592,12 @@ nds32_elf_relax_longcall4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, insn_irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); - return TRUE; + return true; } /* Relax LONGCALL5 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -10627,7 +10627,7 @@ nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL5", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -10636,7 +10636,7 @@ nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_16BIT_S1 || foff >= CONSERVATIVE_16BIT_S1) - return FALSE; + return false; /* Relax to bgezal rt, label ; 17_PCREL or bltzal rt, label ; 17_PCREL. */ @@ -10668,12 +10668,12 @@ nds32_elf_relax_longcall5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, cond_irel->r_info = ELF32_R_INFO (ELF32_R_SYM (cond_irel->r_info), R_NDS32_NONE); - return TRUE; + return true; } /* Relax LONGCALL6 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -10704,7 +10704,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL6", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -10713,12 +10713,12 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_24BIT_S1 || foff >= CONSERVATIVE_24BIT_S1) - return FALSE; + return false; /* Check these is enough space to insert jal in R_NDS32_EMPTY. */ insn = bfd_getb32 (contents + irel->r_addend); if (insn & 0x80000000) - return FALSE; + return false; insn = bfd_getb32 (contents + laddr); if (foff >= -CONSERVATIVE_16BIT_S1 && foff < CONSERVATIVE_16BIT_S1) @@ -10742,7 +10742,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL6", (uint64_t) irel->r_offset); - return FALSE; + return false; } cond_irel->r_addend = 1; @@ -10791,7 +10791,7 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGCALL6", (uint64_t) irel->r_offset); - return FALSE; + return false; } cond_irel->r_addend = 1; @@ -10802,12 +10802,12 @@ nds32_elf_relax_longcall6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, cond_irel->r_info = ELF32_R_INFO (ELF32_R_SYM (cond_irel->r_info), R_NDS32_NONE); } - return TRUE; + return true; } /* Relax LONGJUMP4 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, bfd_byte *contents, Elf_Internal_Sym *isymbuf, @@ -10840,7 +10840,7 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -10849,7 +10849,7 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff >= CONSERVATIVE_24BIT_S1 || foff < -CONSERVATIVE_24BIT_S1) - return FALSE; + return false; /* Convert it to "j label", it may be converted to j8 in the final pass of relaxation. Therefore, we do not consider this currently. */ @@ -10862,7 +10862,7 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP4", (uint64_t) irel->r_offset); - return FALSE; + return false; } em_irel->r_info = @@ -10886,12 +10886,12 @@ nds32_elf_relax_longjump4 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, ELF32_R_INFO (ELF32_R_SYM (hi_irel->r_info), R_NDS32_NONE); } - return TRUE; + return true; } /* Relax LONGJUMP5 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, int *seq_len, bfd_byte *contents, @@ -10935,7 +10935,7 @@ nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP5", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -10944,7 +10944,7 @@ nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_16BIT_S1 || foff >= CONSERVATIVE_16BIT_S1) - return FALSE; + return false; /* Get the all corresponding instructions. */ insn = bfd_getb32 (contents + laddr); @@ -10980,7 +10980,7 @@ nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, reloc = R_NDS32_WORD_9_PCREL_RELA; } else - return FALSE; + return false; /* Set all relocations. */ cond_irel->r_info = ELF32_R_INFO (ELF32_R_SYM (cond_irel->r_info), reloc); @@ -11010,12 +11010,12 @@ nds32_elf_relax_longjump5 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, } *insn_len = 0; - return TRUE; + return true; } /* Relax LONGJUMP6 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, int *seq_len, bfd_byte *contents, @@ -11063,7 +11063,7 @@ nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP6", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -11072,7 +11072,7 @@ nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_24BIT_S1 || foff >= CONSERVATIVE_24BIT_S1) - return FALSE; + return false; insn = bfd_getb32 (contents + laddr); /* Check instruction size. */ @@ -11130,7 +11130,7 @@ nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, bfd_putb32 (insn, contents + em_irel->r_offset); } else - return FALSE; + return false; /* Set all relocations. */ em_irel->r_info = ELF32_R_INFO (ELF32_R_SYM (em_irel->r_info), reloc); @@ -11190,12 +11190,12 @@ nds32_elf_relax_longjump6 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, R_NDS32_LONGJUMP5); } - return TRUE; + return true; } /* Relax LONGJUMP7 relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, int *seq_len, bfd_byte *contents, @@ -11232,7 +11232,7 @@ nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LONGJUMP7", (uint64_t) irel->r_offset); - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -11241,7 +11241,7 @@ nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (foff == 0 || foff < -CONSERVATIVE_8BIT_S1 || foff >= CONSERVATIVE_8BIT_S1) - return FALSE; + return false; /* Get the first instruction for its size. */ insn = bfd_getb32 (contents + laddr); @@ -11290,7 +11290,7 @@ nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, } *insn_len = 0; - return TRUE; + return true; } /* We figure out and reassign the best gp value in nds32_elf_final_sda_base @@ -11298,16 +11298,16 @@ nds32_elf_relax_longjump7 (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, the truncated to fit errors for the the converted gp instructions. Therefore, we must reserve the minimum but safe enough size to prevent it. */ -static bfd_boolean +static bool nds32_elf_relax_guard (bfd_vma *access_addr, bfd_vma local_sda, asection *sec, - Elf_Internal_Rela *irel, bfd_boolean *again, - bfd_boolean init, + Elf_Internal_Rela *irel, bool *again, + bool init, struct elf_nds32_link_hash_table *table, Elf_Internal_Sym *isymbuf, Elf_Internal_Shdr *symtab_hdr) { int offset_to_gp; - static bfd_boolean sec_pass = FALSE; + static bool sec_pass = false; static asection *first_sec = NULL, *sym_sec; /* Record the number of instructions which may be removed. */ static int count = 0, record_count; @@ -11321,7 +11321,7 @@ nds32_elf_relax_guard (bfd_vma *access_addr, bfd_vma local_sda, asection *sec, /* Force doing relaxation when hyper-relax is high. */ if (table->hyper_relax == 2) - return TRUE; + return true; /* Do not relax the load/store patterns for the first relax round. */ @@ -11333,13 +11333,13 @@ nds32_elf_relax_guard (bfd_vma *access_addr, bfd_vma local_sda, asection *sec, { record_count = count; count = 0; - sec_pass = TRUE; + sec_pass = true; } if (!sec_pass) - *again = TRUE; + *again = true; - return TRUE; + return true; } /* Generally, _SDA_BASE_ is fixed or smaller. But the large @@ -11369,7 +11369,7 @@ nds32_elf_relax_guard (bfd_vma *access_addr, bfd_vma local_sda, asection *sec, { /* Forbid doing relaxation when hyper-relax is low. */ if (table->hyper_relax == 0) - return FALSE; + return false; offset_to_gp = *access_addr - local_sda; if (elf32_nds32_hash_entry (h)->offset_to_gp == 0) @@ -11391,7 +11391,7 @@ nds32_elf_relax_guard (bfd_vma *access_addr, bfd_vma local_sda, asection *sec, { /* Local symbols. */ if (!elf32_nds32_allocate_local_sym_info (abfd)) - return FALSE; + return false; isym = isymbuf + r_symndx; sym_sec = bfd_section_from_elf_index (abfd, isym->st_shndx); @@ -11399,7 +11399,7 @@ nds32_elf_relax_guard (bfd_vma *access_addr, bfd_vma local_sda, asection *sec, { /* Forbid doing relaxation when hyper-relax is low. */ if (table->hyper_relax == 0) - return FALSE; + return false; offset_to_gp = *access_addr - local_sda; if (elf32_nds32_local_gp_offset (abfd)[r_symndx] == 0) @@ -11418,14 +11418,14 @@ nds32_elf_relax_guard (bfd_vma *access_addr, bfd_vma local_sda, asection *sec, } } - return TRUE; + return true; } #define GET_LOADSTORE_RANGE(addend) (((addend) >> 8) & 0x3f) /* Relax LOADSTORE relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, @@ -11470,12 +11470,12 @@ nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd, if (i != 0) _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_LOADSTORE", (uint64_t) irel->r_offset); - return FALSE; + return false; } range_type = GET_LOADSTORE_RANGE (irel->r_addend); nds32_elf_final_sda_base (sec->output_section->owner, - link_info, &local_sda, FALSE); + link_info, &local_sda, false); switch (ELF32_R_TYPE (hi_irelfn->r_info)) { @@ -11505,15 +11505,15 @@ nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd, break; } else if (!nds32_elf_relax_guard (&access_addr, local_sda, sec, hi_irelfn, - NULL, FALSE, table, isymbuf, symtab_hdr)) - return FALSE; + NULL, false, table, isymbuf, symtab_hdr)) + return false; if (!load_store_relax) - return FALSE; + return false; /* Case for set gp register. */ if (N32_RT5 (insn) == REG_GP) - return FALSE; + return false; if (range_type == NDS32_LOADSTORE_FLOAT_S || range_type == NDS32_LOADSTORE_FLOAT_D) @@ -11529,7 +11529,7 @@ nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd, break; default: - return FALSE; + return false; } /* Delete sethi instruction. */ @@ -11542,10 +11542,10 @@ nds32_elf_relax_loadstore (struct bfd_link_info *link_info, bfd *abfd, irel->r_info = ELF32_R_INFO (ELF32_R_SYM (irel->r_info), R_NDS32_NONE); *insn_len = 0; - return TRUE; + return true; } - return FALSE; + return false; } /* Relax LO12 relocation for nds32_elf_relax_section. */ @@ -11568,7 +11568,7 @@ nds32_elf_relax_lo12 (struct bfd_link_info *link_info, bfd *abfd, /* For SDA base relative relaxation. */ nds32_elf_final_sda_base (sec->output_section->owner, link_info, - &local_sda, FALSE); + &local_sda, false); irelend = internal_relocs + sec->reloc_count; laddr = irel->r_offset; @@ -11601,7 +11601,7 @@ nds32_elf_relax_lo12 (struct bfd_link_info *link_info, bfd *abfd, /* Fall through. */ } else if (!nds32_elf_relax_guard (&access_addr, local_sda, sec, irel, NULL, - FALSE, table, isymbuf, symtab_hdr)) + false, table, isymbuf, symtab_hdr)) return; range_l = sdata_range[1][0]; @@ -11665,7 +11665,7 @@ nds32_elf_relax_lo12 (struct bfd_link_info *link_info, bfd *abfd, /* Relax PTR relocation for nds32_elf_relax_section. */ -static bfd_boolean +static bool nds32_elf_relax_ptr (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, int *insn_len, int *seq_len, bfd_byte *contents) @@ -11682,11 +11682,11 @@ nds32_elf_relax_ptr (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, { _bfd_error_handler (unrecognized_reloc_msg, abfd, "R_NDS32_PTR", (uint64_t) irel->r_offset); - return FALSE; + return false; } if (re_irel->r_addend != 1) - return FALSE; + return false; /* Pointed target is relaxed and no longer needs this void *, change the type to NONE. */ @@ -11702,16 +11702,16 @@ nds32_elf_relax_ptr (bfd *abfd, asection *sec, Elf_Internal_Rela *irel, if (count_irel != irelend) { if (--count_irel->r_addend > 0) - return FALSE; + return false; } if (ptr_irel != irelend) - return FALSE; + return false; /* If the PTR_COUNT is already 0, remove current instruction. */ *seq_len = nds32_elf_insn_size (abfd, contents, irel->r_offset); *insn_len = 0; - return TRUE; + return true; } /* Relax LWC relocation for nds32_elf_relax_section. */ @@ -11721,7 +11721,7 @@ nds32_elf_relax_flsi (struct bfd_link_info *link_info, bfd *abfd, asection *sec, Elf_Internal_Rela *irel, Elf_Internal_Rela *internal_relocs, bfd_byte *contents, Elf_Internal_Sym *isymbuf, - Elf_Internal_Shdr *symtab_hdr, bfd_boolean *again) + Elf_Internal_Shdr *symtab_hdr, bool *again) { /* Pattern: sethi ra, hi20(symbol) ; HI20/LOADSTORE @@ -11769,7 +11769,7 @@ nds32_elf_relax_flsi (struct bfd_link_info *link_info, bfd *abfd, /* For SDA base relative relaxation. */ nds32_elf_final_sda_base (sec->output_section->owner, link_info, - &local_sda, FALSE); + &local_sda, false); access_addr = calculate_memory_address (abfd, irel, isymbuf, symtab_hdr); flsi_offset = (insn & 0xfff) << 2; access_addr += flsi_offset; @@ -11788,11 +11788,11 @@ nds32_elf_relax_flsi (struct bfd_link_info *link_info, bfd *abfd, bfd_putb32 (insn, contents + re_irel->r_offset); re_irel->r_addend |= 1; - *again = TRUE; + *again = true; } } -static bfd_boolean +static bool nds32_relax_adjust_label (bfd *abfd, asection *sec, Elf_Internal_Rela *internal_relocs, bfd_byte *contents, @@ -11933,13 +11933,13 @@ nds32_relax_adjust_label (bfd *abfd, asection *sec, if (!insert_nds32_elf_blank_recalc_total (relax_blank_list, insn_rel->r_offset + 2, 2)) - return FALSE; + return false; } else if (is_16bit_NOP (abfd, sec, insn_rel)) { if (!insert_nds32_elf_blank_recalc_total (relax_blank_list, insn_rel->r_offset, 2)) - return FALSE; + return false; } insn_rel->r_info = ELF32_R_INFO (ELF32_R_SYM (insn_rel->r_info), R_NDS32_NONE); @@ -11974,7 +11974,7 @@ nds32_relax_adjust_label (bfd *abfd, asection *sec, { /* Check if there is case which can not be aligned. */ if (irel->r_addend == 2 && address & 0x2) - return FALSE; + return false; continue; } @@ -12017,13 +12017,13 @@ nds32_relax_adjust_label (bfd *abfd, asection *sec, if (!insert_nds32_elf_blank_recalc_total (relax_blank_list, insn_rel->r_offset + 2, 2)) - return FALSE; + return false; } else if (is_16bit_NOP (abfd, sec, insn_rel)) { if (!insert_nds32_elf_blank_recalc_total (relax_blank_list, insn_rel->r_offset, 2)) - return FALSE; + return false; } } @@ -12043,7 +12043,7 @@ nds32_relax_adjust_label (bfd *abfd, asection *sec, irelend, insn16); if (!insert_nds32_elf_blank_recalc_total (relax_blank_list, insn_rel->r_offset + 2, 2)) - return FALSE; + return false; insn_rel->r_info = ELF32_R_INFO (ELF32_R_SYM (insn_rel->r_info), R_NDS32_NONE); } @@ -12051,18 +12051,18 @@ nds32_relax_adjust_label (bfd *abfd, asection *sec, { if (!insert_nds32_elf_blank_recalc_total (relax_blank_list, insn_rel->r_offset, 2)) - return FALSE; + return false; insn_rel->r_info = ELF32_R_INFO (ELF32_R_SYM (insn_rel->r_info), R_NDS32_NONE); } } insn_rel = NULL; - return TRUE; + return true; } -static bfd_boolean +static bool nds32_elf_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { nds32_elf_blank_t *relax_blank_list = NULL; Elf_Internal_Shdr *symtab_hdr; @@ -12071,7 +12071,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, Elf_Internal_Rela *irelend; Elf_Internal_Sym *isymbuf = NULL; bfd_byte *contents = NULL; - bfd_boolean result = TRUE; + bool result = true; int optimize = 0; int opt_size = 0; uint32_t insn; @@ -12083,7 +12083,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, relax_blank_list = NULL; - *again = FALSE; + *again = false; /* Nothing to do for * relocatable link or @@ -12097,13 +12097,13 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_CODE) == 0 || sec->size == 0 || sec->reloc_count == 0) - return TRUE; + return true; /* 09.12.11 Workaround. */ /* We have to adjust align for R_NDS32_LABEL if needed. The adjust approach only can fix 2-byte align once. */ if (sec->alignment_power > 2) - return TRUE; + return true; /* Do TLS model conversion once at first. */ nds32_elf_unify_tls_model (abfd, sec, contents, link_info); @@ -12115,7 +12115,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, /* Save the first section for abs symbol relaxation. This is used for checking gp relaxation in the nds32_elf_relax_loadstore and nds32_elf_relax_lo12. */ - nds32_elf_relax_guard (NULL, 0, sec, NULL, again, TRUE, + nds32_elf_relax_guard (NULL, 0, sec, NULL, again, true, table, NULL, NULL); /* The begining of general relaxation. */ @@ -12125,14 +12125,14 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, bfd_vma gp; is_SDA_BASE_set = 1; nds32_elf_final_sda_base (sec->output_section->owner, link_info, - &gp, FALSE); + &gp, false); relax_range_measurement (abfd, link_info); } symtab_hdr = &elf_tdata (abfd)->symtab_hdr; /* Relocations MUST be kept in memory, because relaxation adjust them. */ internal_relocs = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, - TRUE /* keep_memory */); + true /* keep_memory */); if (internal_relocs == NULL) goto error_return; @@ -12141,12 +12141,12 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, irelend, R_NDS32_RELAX_ENTRY); if (irel == irelend) - return TRUE; + return true; if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_ENTRY) { if (irel->r_addend & R_NDS32_RELAX_ENTRY_DISABLE_RELAX_FLAG) - return TRUE; + return true; if (irel->r_addend & R_NDS32_RELAX_ENTRY_OPTIMIZE_FLAG) optimize = 1; @@ -12159,7 +12159,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, /* Get symbol table and section content. */ contents = NULL; - if (!nds32_get_section_contents (abfd, sec, &contents, TRUE) + if (!nds32_get_section_contents (abfd, sec, &contents, true) || !nds32_get_local_syms (abfd, sec, &isymbuf)) goto error_return; @@ -12169,7 +12169,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, { int seq_len; /* Original length of instruction sequence. */ int insn_len = 0; /* Final length of instruction sequence. */ - bfd_boolean removed; + bool removed; insn = 0; if (ELF32_R_TYPE (irel->r_info) == R_NDS32_LABEL @@ -12237,7 +12237,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, continue; insn_len = seq_len; - removed = FALSE; + removed = false; switch (ELF32_R_TYPE (irel->r_info)) { @@ -12353,7 +12353,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, (&relax_blank_list, irel->r_offset + insn_len, seq_len - insn_len)) goto error_return; - *again = TRUE; + *again = true; } } @@ -12434,7 +12434,7 @@ nds32_elf_relax_section (bfd *abfd, asection *sec, return result; error_return: - result = FALSE; + result = false; goto finish; } @@ -12445,7 +12445,7 @@ static struct bfd_elf_special_section const nds32_elf_special_sections[] = {NULL, 0, 0, 0, 0} }; -static bfd_boolean +static bool nds32_elf_section_flags (const Elf_Internal_Shdr *hdr) { const char *name = hdr->bfd_section->name; @@ -12454,10 +12454,10 @@ nds32_elf_section_flags (const Elf_Internal_Shdr *hdr) || strncmp (name, ".sdata", 6) == 0) hdr->bfd_section->flags |= SEC_SMALL_DATA; - return TRUE; + return true; } -static bfd_boolean +static bool nds32_elf_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, void *finfo ATTRIBUTE_UNUSED, @@ -12476,7 +12476,7 @@ nds32_elf_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED, if (check_start_export_sym) fprintf (sym_ld_script, "}\n"); - return TRUE; + return true; } static enum elf_reloc_type_class @@ -12705,7 +12705,7 @@ nds32_fag_find_base (struct nds32_fag *head, struct nds32_fag **bestpp) `best_fag' is the best fp-base. Only those inside the window of best_fag is applied the flag. */ -static bfd_boolean +static bool nds32_fag_mark_relax (struct bfd_link_info *link_info, asection *sec, struct nds32_fag *best_fag, Elf_Internal_Rela *internal_relocs, @@ -12716,12 +12716,12 @@ nds32_fag_mark_relax (struct bfd_link_info *link_info, bfd *output_bfd; output_bfd = sec->output_section->owner; - nds32_elf_final_sda_base (output_bfd, link_info, &gp, FALSE); + nds32_elf_final_sda_base (output_bfd, link_info, &gp, false); best_fpbase = best_fag->addr; if (best_fpbase > gp + sdata_range[1][1] || best_fpbase < gp - sdata_range[1][0]) - return FALSE; + return false; /* Mark these inside the window R_NDS32_INSN16_FP7U2_FLAG flag, so we know they can be converted to lwi37.fp. */ @@ -12747,7 +12747,7 @@ nds32_fag_mark_relax (struct bfd_link_info *link_info, insn16_rel->r_addend = R_NDS32_INSN16_FP7U2_FLAG; } } - return TRUE; + return true; } /* Reset INSN16 to clean fp as gp. */ @@ -12781,7 +12781,7 @@ nds32_fag_unmark_relax (struct nds32_fag *fag, /* This is the main function of fp-as-gp optimization. It should be called by relax_section. */ -static bfd_boolean +static bool nds32_relax_fp_as_gp (struct bfd_link_info *link_info, bfd *abfd, asection *sec, Elf_Internal_Rela *internal_relocs, @@ -12793,7 +12793,7 @@ nds32_relax_fp_as_gp (struct bfd_link_info *link_info, struct nds32_fag fag_head; Elf_Internal_Shdr *symtab_hdr; bfd_byte *contents; - bfd_boolean ifc_inside = FALSE; + bool ifc_inside = false; /* FIXME: Can we bfd_elf_link_read_relocs for the relocs? */ @@ -12817,9 +12817,9 @@ nds32_relax_fp_as_gp (struct bfd_link_info *link_info, symtab_hdr = &elf_tdata (abfd)->symtab_hdr; contents = NULL; - if (!nds32_get_section_contents (abfd, sec, &contents, TRUE) + if (!nds32_get_section_contents (abfd, sec, &contents, true) || !nds32_get_local_syms (abfd, sec, &isymbuf)) - return FALSE; + return false; /* Check whether it is worth for fp-as-gp optimization, i.e., at least 3 gp-load. @@ -12844,7 +12844,7 @@ nds32_relax_fp_as_gp (struct bfd_link_info *link_info, begin_rel = irel; nds32_fag_init (&fag_head); - ifc_inside = FALSE; + ifc_inside = false; } else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_END && (irel->r_addend & R_NDS32_RELAX_REGION_OMIT_FP_FLAG)) @@ -12927,16 +12927,16 @@ nds32_relax_fp_as_gp (struct bfd_link_info *link_info, || ELF32_R_TYPE (irel->r_info) == R_NDS32_10IFCU_PCREL_RELA) { /* Suppress fp as gp when encounter ifc. */ - ifc_inside = TRUE; + ifc_inside = true; } } - return TRUE; + return true; } /* Remove unused `la $fp, _FD_BASE_' instruction. */ -static bfd_boolean +static bool nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec, Elf_Internal_Rela *internal_relocs, Elf_Internal_Rela *irelend) @@ -12945,8 +12945,8 @@ nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec, Elf_Internal_Shdr *symtab_hdr; bfd_byte *contents = NULL; nds32_elf_blank_t *relax_blank_list = NULL; - bfd_boolean result = TRUE; - bfd_boolean unused_region = FALSE; + bool result = true; + bool unused_region = false; /* NOTE: Disable fp-as-gp if we encounter ifcall relocations: @@ -12954,7 +12954,7 @@ nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec, R_NDS32_10IFCU_PCREL_RELA. */ symtab_hdr = &elf_tdata (abfd)->symtab_hdr; - nds32_get_section_contents (abfd, sec, &contents, TRUE); + nds32_get_section_contents (abfd, sec, &contents, true); for (irel = internal_relocs; irel < irelend; irel++) { @@ -12968,10 +12968,10 @@ nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec, if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_BEGIN && (irel->r_addend & R_NDS32_RELAX_REGION_NOT_OMIT_FP_FLAG)) - unused_region = TRUE; + unused_region = true; else if (ELF32_R_TYPE (irel->r_info) == R_NDS32_RELAX_REGION_END && (irel->r_addend & R_NDS32_RELAX_REGION_NOT_OMIT_FP_FLAG)) - unused_region = FALSE; + unused_region = false; /* We're not in the region. */ if (!unused_region) @@ -13026,7 +13026,7 @@ nds32_fag_remove_unused_fpbase (bfd *abfd, asection *sec, return result; error_return: - result = FALSE; + result = false; goto finish; } @@ -13042,7 +13042,7 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { bfd *input_bfd = link_order->u.indirect.section->owner; @@ -13056,7 +13056,7 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, return NULL; /* Read in the section. */ - if (!nds32_get_section_contents (input_bfd, input_section, &data, FALSE)) + if (!nds32_get_section_contents (input_bfd, input_section, &data, false)) return NULL; if (reloc_size == 0) @@ -13085,8 +13085,8 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, { bfd_vma off; static reloc_howto_type none_howto - = HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, - "unused", FALSE, 0, 0, FALSE); + = HOWTO (0, 0, 0, 0, false, 0, complain_overflow_dont, NULL, + "unused", false, 0, 0, false); off = (*parent)->address * OCTETS_PER_BYTE (input_bfd, input_section); @@ -13119,7 +13119,7 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, case bfd_reloc_undefined: (*link_info->callbacks->undefined_symbol) (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr), - input_bfd, input_section, (*parent)->address, TRUE); + input_bfd, input_section, (*parent)->address, true); break; case bfd_reloc_dangerous: BFD_ASSERT (error_message != NULL); @@ -13163,12 +13163,12 @@ nds32_elf_get_relocated_section_contents (bfd *abfd, /* Check target symbol. */ -static bfd_boolean +static bool nds32_elf_is_target_special_symbol (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) { if (!sym || !sym->name || sym->name[0] != '$') - return FALSE; - return TRUE; + return false; + return true; } /* nds32 find maybe function sym. Ignore target special symbol @@ -13221,7 +13221,7 @@ list_insert (relax_group_list_t *pHead, Elf_Internal_Rela *pElem) /* Insert node. */ relax_group_list_t *pNew = bfd_malloc (sizeof (relax_group_list_t)); if (!pNew) - return FALSE; + return false; relax_group_list_t *tmp = pNext->next; pNext->next = pNew; @@ -13231,7 +13231,7 @@ list_insert (relax_group_list_t *pHead, Elf_Internal_Rela *pElem) pNew->next = tmp; pNew->next_sibling = NULL; - return TRUE; + return true; } int @@ -13248,7 +13248,7 @@ list_insert_sibling (relax_group_list_t *pNode, Elf_Internal_Rela *pElem) /* Insert node. */ relax_group_list_t *pNew = bfd_malloc (sizeof (relax_group_list_t)); if (!pNew) - return FALSE; + return false; relax_group_list_t *tmp = pNext->next_sibling; pNext->next_sibling = pNew; @@ -13258,7 +13258,7 @@ list_insert_sibling (relax_group_list_t *pNode, Elf_Internal_Rela *pElem) pNew->next = NULL; pNew->next_sibling = tmp; - return TRUE; + return true; } void @@ -13300,7 +13300,7 @@ elf32_nds32_check_relax_group (bfd *abfd, asection *asec) { /* Relocations MUST be kept in memory, because relaxation adjust them. */ relocs = _bfd_elf_link_read_relocs (abfd, asec, NULL, NULL, - TRUE /* keep_memory */); + true /* keep_memory */); if (relocs == NULL) break; @@ -13320,7 +13320,7 @@ elf32_nds32_check_relax_group (bfd *abfd, asection *asec) max_id = id; } } - while (FALSE); + while (false); if (elf_section_data (asec)->relocs != relocs) free (relocs); @@ -13410,7 +13410,7 @@ elf32_nds32_unify_relax_group (bfd *abfd, asection *asec) elf32_nds32_relax_group_t *relax_group_ptr = elf32_nds32_relax_group_ptr (abfd); - bfd_boolean result = TRUE; + bool result = true; Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; Elf_Internal_Rela *relocs = NULL; @@ -13430,7 +13430,7 @@ elf32_nds32_unify_relax_group (bfd *abfd, asection *asec) /* Relocations MUST be kept in memory, because relaxation adjust them. */ relocs = _bfd_elf_link_read_relocs (abfd, asec, NULL, NULL, - TRUE /* keep_memory */); + true /* keep_memory */); if (relocs == NULL) { BFD_ASSERT (0); /* feed me */ @@ -13459,7 +13459,7 @@ elf32_nds32_unify_relax_group (bfd *abfd, asection *asec) count++; } } - while (FALSE); + while (false); if (elf_section_data (asec)->relocs != relocs) free (relocs); @@ -13471,7 +13471,7 @@ int nds32_elf_unify_tls_model (bfd *inbfd, asection *insec, bfd_byte *incontents, struct bfd_link_info *lnkinfo) { - bfd_boolean result = TRUE; + bool result = true; Elf_Internal_Rela *irel; Elf_Internal_Rela *irelend; Elf_Internal_Rela *internal_relocs; @@ -13500,7 +13500,7 @@ nds32_elf_unify_tls_model (bfd *inbfd, asection *insec, bfd_byte *incontents, /* Relocations MUST be kept in memory, because relaxation adjust them. */ internal_relocs = _bfd_elf_link_read_relocs (inbfd, insec, NULL, NULL, - TRUE /* keep_memory */); + true /* keep_memory */); if (internal_relocs == NULL) goto error_return; @@ -13572,7 +13572,7 @@ nds32_elf_unify_tls_model (bfd *inbfd, asection *insec, bfd_byte *incontents, /* Get symbol table and section content. */ if (incontents) contents = incontents; - else if (!nds32_get_section_contents (inbfd, insec, &contents, TRUE) + else if (!nds32_get_section_contents (inbfd, insec, &contents, true) || !nds32_get_local_syms (inbfd, insec, &local_syms)) goto error_return; @@ -13911,7 +13911,7 @@ nds32_elf_unify_tls_model (bfd *inbfd, asection *insec, bfd_byte *incontents, return result; error_return: - result = FALSE; + result = false; goto finish; } diff --git a/bfd/elf32-nios2.c b/bfd/elf32-nios2.c index 0235e5d037..5fb2e5dddf 100644 --- a/bfd/elf32-nios2.c +++ b/bfd/elf32-nios2.c @@ -84,649 +84,649 @@ static reloc_howto_type elf_nios2_r1_howto_table_rel[] = { 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NIOS2_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit signed immediate relocation. */ HOWTO (R_NIOS2_S16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_signed, /* complain on overflow */ bfd_elf_generic_reloc, /* special function */ "R_NIOS2_S16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x003fffc0, /* src_mask */ 0x003fffc0, /* dest_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit unsigned immediate relocation. */ HOWTO (R_NIOS2_U16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_unsigned, /* complain on overflow */ bfd_elf_generic_reloc, /* special function */ "R_NIOS2_U16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x003fffc0, /* src_mask */ 0x003fffc0, /* dest_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_NIOS2_PCREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 6, /* bitpos */ complain_overflow_signed, /* complain on overflow */ nios2_elf32_pcrel16_relocate, /* special function */ "R_NIOS2_PCREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x003fffc0, /* src_mask */ 0x003fffc0, /* dest_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_NIOS2_CALL26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_dont, /* complain on overflow */ nios2_elf32_call26_relocate, /* special function */ "R_NIOS2_CALL26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffc0, /* src_mask */ 0xffffffc0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_NIOS2_IMM5, 0, 2, 5, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_IMM5", - FALSE, + false, 0x000007c0, 0x000007c0, - FALSE), + false), HOWTO (R_NIOS2_CACHE_OPX, 0, 2, 5, - FALSE, + false, 22, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_CACHE_OPX", - FALSE, + false, 0x07c00000, 0x07c00000, - FALSE), + false), HOWTO (R_NIOS2_IMM6, 0, 2, 6, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_IMM6", - FALSE, + false, 0x00000fc0, 0x00000fc0, - FALSE), + false), HOWTO (R_NIOS2_IMM8, 0, 2, 8, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_IMM8", - FALSE, + false, 0x00003fc0, 0x00003fc0, - FALSE), + false), HOWTO (R_NIOS2_HI16, 0, 2, 32, - FALSE, + false, 6, complain_overflow_dont, nios2_elf32_hi16_relocate, "R_NIOS2_HI16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_LO16, 0, 2, 32, - FALSE, + false, 6, complain_overflow_dont, nios2_elf32_lo16_relocate, "R_NIOS2_LO16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_HIADJ16, 0, 2, 32, - FALSE, + false, 6, complain_overflow_dont, nios2_elf32_hiadj16_relocate, "R_NIOS2_HIADJ16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_BFD_RELOC_32, 0, 2, /* long */ 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_BFD_RELOC32", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_BFD_RELOC_16, 0, 1, /* short */ 16, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_BFD_RELOC16", - FALSE, + false, 0x0000ffff, 0x0000ffff, - FALSE), + false), HOWTO (R_NIOS2_BFD_RELOC_8, 0, 0, /* byte */ 8, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_BFD_RELOC8", - FALSE, + false, 0x000000ff, 0x000000ff, - FALSE), + false), HOWTO (R_NIOS2_GPREL, 0, 2, 32, - FALSE, + false, 6, complain_overflow_dont, nios2_elf32_gprel_relocate, "R_NIOS2_GPREL", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_GNU_VTINHERIT, 0, 2, /* short */ 0, - FALSE, + false, 0, complain_overflow_dont, NULL, "R_NIOS2_GNU_VTINHERIT", - FALSE, + false, 0, 0, - FALSE), + false), HOWTO (R_NIOS2_GNU_VTENTRY, 0, 2, /* byte */ 0, - FALSE, + false, 0, complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn, "R_NIOS2_GNU_VTENTRY", - FALSE, + false, 0, 0, - FALSE), + false), HOWTO (R_NIOS2_UJMP, 0, 2, 32, - FALSE, + false, 6, complain_overflow_dont, nios2_elf32_ujmp_relocate, "R_NIOS2_UJMP", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_CJMP, 0, 2, 32, - FALSE, + false, 6, complain_overflow_dont, nios2_elf32_cjmp_relocate, "R_NIOS2_CJMP", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_CALLR, 0, 2, 32, - FALSE, + false, 6, complain_overflow_dont, nios2_elf32_callr_relocate, "R_NIOS2_CALLR", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_ALIGN, 0, 2, 0, - FALSE, + false, 0, complain_overflow_dont, nios2_elf32_ignore_reloc, "R_NIOS2_ALIGN", - FALSE, + false, 0, 0, - TRUE), + true), HOWTO (R_NIOS2_GOT16, 0, 2, 16, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_GOT16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_CALL16, 0, 2, 16, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_CALL16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_GOTOFF_LO, 0, 2, 16, - FALSE, + false, 6, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOTOFF_LO", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_GOTOFF_HA, 0, 2, 16, - FALSE, + false, 6, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOTOFF_HA", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_PCREL_LO, 0, 2, 16, - TRUE, + true, 6, complain_overflow_dont, nios2_elf32_pcrel_lo16_relocate, "R_NIOS2_PCREL_LO", - FALSE, + false, 0x003fffc0, 0x003fffc0, - TRUE), + true), HOWTO (R_NIOS2_PCREL_HA, 0, 2, 16, - FALSE, /* This is a PC-relative relocation, but we need to subtract + false, /* This is a PC-relative relocation, but we need to subtract PC ourselves before the HIADJ. */ 6, complain_overflow_dont, nios2_elf32_pcrel_hiadj16_relocate, "R_NIOS2_PCREL_HA", - FALSE, + false, 0x003fffc0, 0x003fffc0, - TRUE), + true), HOWTO (R_NIOS2_TLS_GD16, 0, 2, 16, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_GD16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_TLS_LDM16, 0, 2, 16, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_LDM16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_TLS_LDO16, 0, 2, 16, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_LDO16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_TLS_IE16, 0, 2, 16, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_IE16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_TLS_LE16, 0, 2, 16, - FALSE, + false, 6, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_LE16", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_TLS_DTPMOD, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_TLS_DTPMOD", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_TLS_DTPREL, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_TLS_DTPREL", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_TLS_TPREL, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_TLS_TPREL", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_COPY, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_COPY", - FALSE, + false, 0, 0, - FALSE), + false), HOWTO (R_NIOS2_GLOB_DAT, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GLOB_DAT", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_JUMP_SLOT, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_JUMP_SLOT", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_RELATIVE, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_RELATIVE", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_GOTOFF, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOTOFF", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_CALL26_NOAT, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_dont, /* complain on overflow */ nios2_elf32_call26_relocate, /* special function */ "R_NIOS2_CALL26_NOAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffc0, /* src_mask */ 0xffffffc0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_NIOS2_GOT_LO, 0, 2, 16, - FALSE, + false, 6, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOT_LO", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_GOT_HA, 0, 2, 16, - FALSE, + false, 6, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOT_HA", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_CALL_LO, 0, 2, 16, - FALSE, + false, 6, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_CALL_LO", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), HOWTO (R_NIOS2_CALL_HA, 0, 2, 16, - FALSE, + false, 6, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_CALL_HA", - FALSE, + false, 0x003fffc0, 0x003fffc0, - FALSE), + false), /* Add other relocations here. */ }; @@ -737,830 +737,830 @@ static reloc_howto_type elf_nios2_r2_howto_table_rel[] = { 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NIOS2_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit signed immediate relocation. */ HOWTO (R_NIOS2_S16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed, /* complain on overflow */ bfd_elf_generic_reloc, /* special function */ "R_NIOS2_S16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff0000, /* src_mask */ 0xffff0000, /* dest_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit unsigned immediate relocation. */ HOWTO (R_NIOS2_U16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 16, /* bitpos */ complain_overflow_unsigned, /* complain on overflow */ bfd_elf_generic_reloc, /* special function */ "R_NIOS2_U16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff0000, /* src_mask */ 0xffff0000, /* dest_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_NIOS2_PCREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed, /* complain on overflow */ nios2_elf32_pcrel16_relocate, /* special function */ "R_NIOS2_PCREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff0000, /* src_mask */ 0xffff0000, /* dest_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_NIOS2_CALL26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_dont, /* complain on overflow */ nios2_elf32_call26_relocate, /* special function */ "R_NIOS2_CALL26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffc0, /* src_mask */ 0xffffffc0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_NIOS2_IMM5, 0, 2, 5, - FALSE, + false, 21, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_IMM5", - FALSE, + false, 0x03e00000, 0x03e00000, - FALSE), + false), HOWTO (R_NIOS2_CACHE_OPX, 0, 2, 5, - FALSE, + false, 11, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_CACHE_OPX", - FALSE, + false, 0x0000f800, 0x0000f800, - FALSE), + false), HOWTO (R_NIOS2_IMM6, 0, 2, 6, - FALSE, + false, 26, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_IMM6", - FALSE, + false, 0xfc000000, 0xfc000000, - FALSE), + false), HOWTO (R_NIOS2_IMM8, 0, 2, 8, - FALSE, + false, 24, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_IMM8", - FALSE, + false, 0xff000000, 0xff000000, - FALSE), + false), HOWTO (R_NIOS2_HI16, 0, 2, 32, - FALSE, + false, 16, complain_overflow_dont, nios2_elf32_hi16_relocate, "R_NIOS2_HI16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_LO16, 0, 2, 32, - FALSE, + false, 16, complain_overflow_dont, nios2_elf32_lo16_relocate, "R_NIOS2_LO16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_HIADJ16, 0, 2, 32, - FALSE, + false, 16, complain_overflow_dont, nios2_elf32_hiadj16_relocate, "R_NIOS2_HIADJ16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_BFD_RELOC_32, 0, 2, /* long */ 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_BFD_RELOC32", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_BFD_RELOC_16, 0, 1, /* short */ 16, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_BFD_RELOC16", - FALSE, + false, 0x0000ffff, 0x0000ffff, - FALSE), + false), HOWTO (R_NIOS2_BFD_RELOC_8, 0, 0, /* byte */ 8, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_BFD_RELOC8", - FALSE, + false, 0x000000ff, 0x000000ff, - FALSE), + false), HOWTO (R_NIOS2_GPREL, 0, 2, 32, - FALSE, + false, 16, complain_overflow_dont, nios2_elf32_gprel_relocate, "R_NIOS2_GPREL", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_GNU_VTINHERIT, 0, 2, /* short */ 0, - FALSE, + false, 0, complain_overflow_dont, NULL, "R_NIOS2_GNU_VTINHERIT", - FALSE, + false, 0, 0, - FALSE), + false), HOWTO (R_NIOS2_GNU_VTENTRY, 0, 2, /* byte */ 0, - FALSE, + false, 0, complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn, "R_NIOS2_GNU_VTENTRY", - FALSE, + false, 0, 0, - FALSE), + false), HOWTO (R_NIOS2_UJMP, 0, 2, 32, - FALSE, + false, 16, complain_overflow_dont, nios2_elf32_ujmp_relocate, "R_NIOS2_UJMP", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_CJMP, 0, 2, 32, - FALSE, + false, 16, complain_overflow_dont, nios2_elf32_cjmp_relocate, "R_NIOS2_CJMP", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_CALLR, 0, 2, 32, - FALSE, + false, 16, complain_overflow_dont, nios2_elf32_callr_relocate, "R_NIOS2_CALLR", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_ALIGN, 0, 2, 0, - FALSE, + false, 0, complain_overflow_dont, nios2_elf32_ignore_reloc, "R_NIOS2_ALIGN", - FALSE, + false, 0, 0, - TRUE), + true), HOWTO (R_NIOS2_GOT16, 0, 2, 16, - FALSE, + false, 16, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_GOT16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_CALL16, 0, 2, 16, - FALSE, + false, 16, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_CALL16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_GOTOFF_LO, 0, 2, 16, - FALSE, + false, 16, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOTOFF_LO", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_GOTOFF_HA, 0, 2, 16, - FALSE, + false, 16, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOTOFF_HA", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_PCREL_LO, 0, 2, 16, - TRUE, + true, 16, complain_overflow_dont, nios2_elf32_pcrel_lo16_relocate, "R_NIOS2_PCREL_LO", - FALSE, + false, 0xffff0000, 0xffff0000, - TRUE), + true), HOWTO (R_NIOS2_PCREL_HA, 0, 2, 16, - FALSE, /* This is a PC-relative relocation, but we need to subtract + false, /* This is a PC-relative relocation, but we need to subtract PC ourselves before the HIADJ. */ 16, complain_overflow_dont, nios2_elf32_pcrel_hiadj16_relocate, "R_NIOS2_PCREL_HA", - FALSE, + false, 0xffff0000, 0xffff0000, - TRUE), + true), HOWTO (R_NIOS2_TLS_GD16, 0, 2, 16, - FALSE, + false, 16, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_GD16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_TLS_LDM16, 0, 2, 16, - FALSE, + false, 16, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_LDM16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_TLS_LDO16, 0, 2, 16, - FALSE, + false, 16, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_LDO16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_TLS_IE16, 0, 2, 16, - FALSE, + false, 16, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_IE16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_TLS_LE16, 0, 2, 16, - FALSE, + false, 16, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_NIOS2_TLS_LE16", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_TLS_DTPMOD, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_TLS_DTPMOD", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_TLS_DTPREL, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_TLS_DTPREL", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_TLS_TPREL, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_TLS_TPREL", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_COPY, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_COPY", - FALSE, + false, 0, 0, - FALSE), + false), HOWTO (R_NIOS2_GLOB_DAT, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GLOB_DAT", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_JUMP_SLOT, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_JUMP_SLOT", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_RELATIVE, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_RELATIVE", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_GOTOFF, 0, 2, 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOTOFF", - FALSE, + false, 0xffffffff, 0xffffffff, - FALSE), + false), HOWTO (R_NIOS2_CALL26_NOAT, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_dont, /* complain on overflow */ nios2_elf32_call26_relocate, /* special function */ "R_NIOS2_CALL26_NOAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffc0, /* src_mask */ 0xffffffc0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_NIOS2_GOT_LO, 0, 2, 16, - FALSE, + false, 16, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOT_LO", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_GOT_HA, 0, 2, 16, - FALSE, + false, 16, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_GOT_HA", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_CALL_LO, 0, 2, 16, - FALSE, + false, 16, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_CALL_LO", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_CALL_HA, 0, 2, 16, - FALSE, + false, 16, complain_overflow_dont, bfd_elf_generic_reloc, "R_NIOS2_CALL_HA", - FALSE, + false, 0xffff0000, 0xffff0000, - FALSE), + false), HOWTO (R_NIOS2_R2_S12, 0, 2, 12, - FALSE, + false, 16, complain_overflow_signed, bfd_elf_generic_reloc, "R_NIOS2_R2_S12", - FALSE, + false, 0x0fff0000, 0x0fff0000, - FALSE), + false), HOWTO (R_NIOS2_R2_I10_1_PCREL, 1, 1, 10, - TRUE, + true, 6, complain_overflow_signed, bfd_elf_generic_reloc, /* FIXME? */ "R_NIOS2_R2_I10_1_PCREL", - FALSE, + false, 0xffc0, 0xffc0, - TRUE), + true), HOWTO (R_NIOS2_R2_T1I7_1_PCREL, 1, 1, 7, - TRUE, + true, 9, complain_overflow_signed, bfd_elf_generic_reloc, /* FIXME? */ "R_NIOS2_R2_T1I7_1_PCREL", - FALSE, + false, 0xfe00, 0xfe00, - TRUE), + true), HOWTO (R_NIOS2_R2_T1I7_2, 2, 1, 7, - FALSE, + false, 9, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_T1I7_2", - FALSE, + false, 0xfe00, 0xfe00, - FALSE), + false), HOWTO (R_NIOS2_R2_T2I4, 0, 1, 4, - FALSE, + false, 12, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_T2I4", - FALSE, + false, 0xf000, 0xf000, - FALSE), + false), HOWTO (R_NIOS2_R2_T2I4_1, 1, 1, 4, - FALSE, + false, 12, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_T2I4_1", - FALSE, + false, 0xf000, 0xf000, - FALSE), + false), HOWTO (R_NIOS2_R2_T2I4_2, 2, 1, 4, - FALSE, + false, 12, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_T2I4_2", - FALSE, + false, 0xf000, 0xf000, - FALSE), + false), HOWTO (R_NIOS2_R2_X1I7_2, 2, 1, 7, - FALSE, + false, 6, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_X1I7_2", - FALSE, + false, 0x1fc0, 0x1fc0, - FALSE), + false), HOWTO (R_NIOS2_R2_X2L5, 0, 1, 5, - FALSE, + false, 6, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_X2L5", - FALSE, + false, 0x07c0, 0x07c0, - FALSE), + false), HOWTO (R_NIOS2_R2_F1I5_2, 2, 1, 5, - FALSE, + false, 6, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_F1L5_2", - FALSE, + false, 0x07c0, 0x07c0, - FALSE), + false), HOWTO (R_NIOS2_R2_L5I4X1, 2, 1, 4, - FALSE, + false, 6, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_L5I4X1", - FALSE, + false, 0x03c0, 0x03c0, - FALSE), + false), HOWTO (R_NIOS2_R2_T1X1I6, 0, 1, 6, - FALSE, + false, 9, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_T1X1I6", - FALSE, + false, 0x7e00, 0x7e00, - FALSE), + false), HOWTO (R_NIOS2_R2_T1X1I6_2, 2, 2, 6, - FALSE, + false, 9, complain_overflow_unsigned, bfd_elf_generic_reloc, "R_NIOS2_R2_T1I1X6_2", - FALSE, + false, 0x7e00, 0x7e00, - FALSE), + false), /* Add other relocations here. */ }; @@ -1776,7 +1776,7 @@ struct elf32_nios2_link_hash_table bfd *stub_bfd; /* Linker call-backs. */ - asection * (*add_stub_section) (const char *, asection *, bfd_boolean); + asection * (*add_stub_section) (const char *, asection *, bool); void (*layout_sections_again) (void); /* Array to keep track of which stub sections have been created, and @@ -1819,7 +1819,7 @@ struct nios2_elf32_obj_tdata char *local_got_tls_type; /* TRUE if TLS GD relocs have been seen for this object. */ - bfd_boolean has_tlsgd; + bool has_tlsgd; }; #define elf32_nios2_tdata(abfd) \ @@ -1911,7 +1911,7 @@ bfd_vma hiadj (bfd_vma symbol_value) /* Implement elf_backend_grok_prstatus: Support for core dump NOTE sections. */ -static bfd_boolean +static bool nios2_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -1920,7 +1920,7 @@ nios2_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 212: /* Linux/Nios II */ /* pr_cursig */ @@ -1942,13 +1942,13 @@ nios2_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) } /* Implement elf_backend_grok_psinfo. */ -static bfd_boolean +static bool nios2_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/Nios II elf_prpsinfo */ elf_tdata (abfd)->core->program @@ -1969,7 +1969,7 @@ nios2_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Assorted hash table functions. */ @@ -2126,7 +2126,7 @@ nios2_get_stub_entry (const asection *input_section, return NULL; hsh = nios2_stub_hash_lookup (&htab->bstab, - stub_name, FALSE, FALSE); + stub_name, false, false); if (hh != NULL) hh->hsh_cache = hsh; @@ -2149,21 +2149,21 @@ nios2_add_stub (const char *stub_name, asection *stub_sec; asection **secptr, **linkptr; struct elf32_nios2_stub_hash_entry *hsh; - bfd_boolean afterp; + bool afterp; if (stub_type == nios2_stub_call26_before) { link_sec = htab->stub_group[section->id].first_sec; secptr = &(htab->stub_group[section->id].first_stub_sec); linkptr = &(htab->stub_group[link_sec->id].first_stub_sec); - afterp = FALSE; + afterp = false; } else { link_sec = htab->stub_group[section->id].last_sec; secptr = &(htab->stub_group[section->id].last_stub_sec); linkptr = &(htab->stub_group[link_sec->id].last_stub_sec); - afterp = TRUE; + afterp = true; } stub_sec = *secptr; if (stub_sec == NULL) @@ -2194,7 +2194,7 @@ nios2_add_stub (const char *stub_name, /* Enter this entry into the linker stub hash table. */ hsh = nios2_stub_hash_lookup (&htab->bstab, stub_name, - TRUE, FALSE); + true, false); if (hsh == NULL) { /* xgettext:c-format */ @@ -2476,7 +2476,7 @@ nios2_type_of_stub (asection *input_sec, return nios2_stub_none; } -static bfd_boolean +static bool nios2_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UNUSED) { struct elf32_nios2_stub_hash_entry *hsh @@ -2523,15 +2523,15 @@ nios2_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_U break; default: BFD_FAIL (); - return FALSE; + return false; } - return TRUE; + return true; } /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool nios2_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UNUSED) { struct elf32_nios2_stub_hash_entry *hsh @@ -2545,9 +2545,9 @@ nios2_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg ATTRIBUTE_UN break; default: BFD_FAIL (); - return FALSE; + return false; } - return TRUE; + return true; } /* Read in all local syms for all input bfds. @@ -2602,14 +2602,14 @@ get_local_syms (bfd *output_bfd ATTRIBUTE_UNUSED, bfd *input_bfd, } /* Determine and set the size of the stub section for a final link. */ -bfd_boolean +bool nios2_elf32_size_stubs (bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info, asection *(*add_stub_section) (const char *, - asection *, bfd_boolean), + asection *, bool), void (*layout_sections_again) (void)) { - bfd_boolean stub_changed = FALSE; + bool stub_changed = false; struct elf32_nios2_link_hash_table *htab = elf32_nios2_hash_table (info); /* Stash our params away. */ @@ -2627,7 +2627,7 @@ nios2_elf32_size_stubs (bfd *output_bfd, bfd *stub_bfd, { if (htab->all_local_syms) goto error_ret_free_local; - return FALSE; + return false; } while (1) @@ -2800,7 +2800,7 @@ nios2_elf32_size_stubs (bfd *output_bfd, bfd *stub_bfd, hsh = nios2_stub_hash_lookup (&htab->bstab, stub_name, - FALSE, FALSE); + false, false); if (hsh != NULL) { /* The proper stub has already been created. */ @@ -2819,7 +2819,7 @@ nios2_elf32_size_stubs (bfd *output_bfd, bfd *stub_bfd, hsh->stub_type = stub_type; hsh->hh = hh; hsh->addend = irela->r_addend; - stub_changed = TRUE; + stub_changed = true; } /* We're done with the internal relocs, free them. */ @@ -2842,21 +2842,21 @@ nios2_elf32_size_stubs (bfd *output_bfd, bfd *stub_bfd, /* Ask the linker to do its stuff. */ (*htab->layout_sections_again) (); - stub_changed = FALSE; + stub_changed = false; } free (htab->all_local_syms); - return TRUE; + return true; error_ret_free_local: free (htab->all_local_syms); - return FALSE; + return false; } /* Build all the stubs associated with the current output file. The stubs are kept in a hash table attached to the main linker hash table. This function is called via nios2elf_finish in the linker. */ -bfd_boolean +bool nios2_elf32_build_stubs (struct bfd_link_info *info) { asection *stub_sec; @@ -2880,7 +2880,7 @@ nios2_elf32_build_stubs (struct bfd_link_info *info) size = stub_sec->size; stub_sec->contents = bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) - return FALSE; + return false; stub_sec->size = 0; } @@ -2888,7 +2888,7 @@ nios2_elf32_build_stubs (struct bfd_link_info *info) table = &htab->bstab; bfd_hash_traverse (table, nios2_build_one_stub, info); - return TRUE; + return true; } @@ -2899,7 +2899,7 @@ nios2_elf32_build_stubs (struct bfd_link_info *info) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool nios2_elf32_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -2907,18 +2907,18 @@ nios2_elf32_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword new_flags; if (!is_nios2_elf (ibfd) || !is_nios2_elf (obfd)) - return TRUE; + return true; /* Check if we have the same endianness. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; if (!elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; switch (new_flags) @@ -2933,7 +2933,7 @@ nios2_elf32_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: %pB: big-endian R2 is not supported"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_default_set_arch_mach (obfd, bfd_arch_nios2, bfd_mach_nios2r2); break; @@ -2950,13 +2950,13 @@ nios2_elf32_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB: conflicting CPU architectures %d/%d"), ibfd, new_flags, old_flags); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Merge Tag_compatibility attributes and any common GNU ones. */ _bfd_elf_merge_object_attributes (ibfd, info); - return TRUE; + return true; } /* Implement bfd_elf32_bfd_reloc_type_lookup: @@ -3006,7 +3006,7 @@ nios2_elf32_bfd_reloc_name_lookup (bfd *abfd, /* Implement elf_info_to_howto: Given a ELF32 relocation, fill in a arelent structure. */ -static bfd_boolean +static bool nios2_elf32_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -3019,9 +3019,9 @@ nios2_elf32_info_to_howto (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Return the base VMA address which should be subtracted from real addresses @@ -3051,20 +3051,20 @@ tpoff (struct bfd_link_info *info, bfd_vma address) /* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a dangerous relocation. */ -static bfd_boolean +static bool nios2_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp, struct bfd_link_info *info) { - bfd_boolean gp_found; + bool gp_found; struct bfd_hash_entry *h; struct bfd_link_hash_entry *lh; /* If we've already figured out what GP will be, just return it. */ *pgp = _bfd_get_gp_value (output_bfd); if (*pgp) - return TRUE; + return true; - h = bfd_hash_lookup (&info->hash->table, "_gp", FALSE, FALSE); + h = bfd_hash_lookup (&info->hash->table, "_gp", false, false); lh = (struct bfd_link_hash_entry *) h; lookup: if (lh) @@ -3074,11 +3074,11 @@ nios2_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp, struct bfd_link_info *info) case bfd_link_hash_undefined: case bfd_link_hash_undefweak: case bfd_link_hash_common: - gp_found = FALSE; + gp_found = false; break; case bfd_link_hash_defined: case bfd_link_hash_defweak: - gp_found = TRUE; + gp_found = true; { asection *sym_sec = lh->u.def.section; bfd_vma sym_value = lh->u.def.value; @@ -3100,19 +3100,19 @@ nios2_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp, struct bfd_link_info *info) } } else - gp_found = FALSE; + gp_found = false; if (!gp_found) { /* Only get the error once. */ *pgp = 4; _bfd_set_gp_value (output_bfd, *pgp); - return FALSE; + return false; } _bfd_set_gp_value (output_bfd, *pgp); - return TRUE; + return true; } /* Retrieve the previously cached _gp pointer, returning bfd_reloc_dangerous @@ -3121,7 +3121,7 @@ nios2_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp, struct bfd_link_info *info) symbol value for an external symbol if we are producing relocatable output. */ static bfd_reloc_status_type -nios2_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable, +nios2_elf_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable, char **error_message, bfd_vma *pgp) { if (bfd_is_und_section (symbol->section) && !relocatable) @@ -3572,7 +3572,7 @@ nios2_elf32_gprel_relocate (bfd *abfd, arelent *reloc_entry, asymbol *symbol, + symbol->section->output_offset); /* This assumes we've already cached the _gp symbol. */ - r = nios2_elf_final_gp (abfd, symbol, FALSE, msg, &gp); + r = nios2_elf_final_gp (abfd, symbol, false, msg, &gp); if (r == bfd_reloc_ok) { relocation = relocation + reloc_entry->addend - gp; @@ -3726,7 +3726,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, const char *format; char *msgbuf = NULL; char *msg = NULL; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_vma off; int use_plt; @@ -3746,7 +3746,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -3764,7 +3764,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, if (howto) { - bfd_boolean resolved_to_zero; + bool resolved_to_zero; resolved_to_zero = (h != NULL && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)); @@ -3922,7 +3922,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, + splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; } /* Detect R_NIOS2_CALL26 relocations that would overflow the 256MB segment. Replace the target with a reference to a @@ -3998,7 +3998,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, if (h != NULL) { - bfd_boolean dyn; + bool dyn; eh = (struct elf32_nios2_link_hash_entry *)h; use_plt = (eh->got_types_used == CALL_USED @@ -4036,7 +4036,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -4225,7 +4225,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, indx = 0; if (h != NULL) { - bfd_boolean dyn; + bool dyn; dyn = htab->root.dynamic_sections_created; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, bfd_link_pic (info), @@ -4233,7 +4233,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, && (!bfd_link_pic (info) || !SYMBOL_REFERENCES_LOCAL (info, h))) { - unresolved_reloc = FALSE; + unresolved_reloc = false; indx = h->dynindx; } off = h->got.offset; @@ -4256,7 +4256,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, off &= ~1; else { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; Elf_Internal_Rela outrel; bfd_byte *loc = NULL; int cur_off = off; @@ -4271,7 +4271,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, && !resolved_to_zero) || h->root.type != bfd_link_hash_undefweak)) { - need_relocs = TRUE; + need_relocs = true; if (htab->root.srelgot == NULL) abort (); loc = htab->root.srelgot->contents; @@ -4383,7 +4383,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, "permitted in shared object"), input_bfd, input_section, (uint64_t) rel->r_offset, howto->name); - return FALSE; + return false; } else relocation = tpoff (info, relocation) - TP_OFFSET; @@ -4403,22 +4403,22 @@ nios2_elf32_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip, relocate; + bool skip, relocate; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -4437,7 +4437,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, { /* This symbol is local, or marked to become local. */ outrel.r_addend = relocation + rel->r_addend; - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_NIOS2_RELATIVE); } @@ -4503,7 +4503,7 @@ nios2_elf32_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) (info, name, input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -4532,28 +4532,28 @@ nios2_elf32_relocate_section (bfd *output_bfd, (*info->callbacks->warning) (info, msg, name, input_bfd, input_section, rel->r_offset); free (msgbuf); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Implement elf-backend_section_flags: Convert NIOS2 specific section flags to bfd internal section flags. */ -static bfd_boolean +static bool nios2_elf32_section_flags (const Elf_Internal_Shdr *hdr) { if (hdr->sh_flags & SHF_NIOS2_GPREL) hdr->bfd_section->flags |= SEC_SMALL_DATA; - return TRUE; + return true; } /* Implement elf_backend_fake_sections: Set the correct type for an NIOS2 ELF section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool nios2_elf32_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) { @@ -4565,12 +4565,12 @@ nios2_elf32_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, || strcmp (name, ".lit4") == 0 || strcmp (name, ".lit8") == 0) hdr->sh_flags |= SHF_NIOS2_GPREL; - return TRUE; + return true; } /* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool create_got_section (bfd *dynobj, struct bfd_link_info *info) { struct elf32_nios2_link_hash_table *htab; @@ -4579,12 +4579,12 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) htab = elf32_nios2_hash_table (info); if (! _bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; /* In order for the two loads in .PLTresolve to share the same %hiadj, _GLOBAL_OFFSET_TABLE_ must be aligned to a 16-byte boundary. */ if (!bfd_set_section_alignment (htab->root.sgotplt, 4)) - return FALSE; + return false; /* The Nios II ABI specifies that GOT-relative relocations are relative to the linker-created symbol _gp_got, rather than using @@ -4594,26 +4594,26 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) "_gp_got"); htab->h_gp_got = h; if (h == NULL) - return FALSE; + return false; - return TRUE; + return true; } /* Implement elf_backend_create_dynamic_sections: Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool nios2_elf32_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { struct elf32_nios2_link_hash_table *htab; htab = elf32_nios2_hash_table (info); if (!htab->root.sgot && !create_got_section (dynobj, info)) - return FALSE; + return false; if (!_bfd_elf_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; /* In order for the two loads in a shared object .PLTresolve to share the same %hiadj, the start of the PLT (as well as the GOT) must be aligned @@ -4648,7 +4648,7 @@ nios2_elf32_copy_indirect_symbol (struct bfd_link_info *info, /* Set the right machine number for a NIOS2 ELF file. */ -static bfd_boolean +static bool nios2_elf32_object_p (bfd *abfd) { unsigned long mach; @@ -4666,12 +4666,12 @@ nios2_elf32_object_p (bfd *abfd) break; } - return TRUE; + return true; } /* Implement elf_backend_check_relocs: Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -4684,7 +4684,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, bfd_signed_vma *local_got_refcounts; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -4782,7 +4782,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; elf32_nios2_local_got_tls_type (abfd) = (char *) (local_got_refcounts + symtab_hdr->sh_info); @@ -4813,7 +4813,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, if (htab->root.dynobj == NULL) htab->root.dynobj = abfd; if (!create_got_section (htab->root.dynobj, info)) - return FALSE; + return false; } break; @@ -4825,14 +4825,14 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, Reconstruct it for later use during GC. */ case R_NIOS2_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_NIOS2_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_NIOS2_BFD_RELOC_32: @@ -4880,9 +4880,9 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, htab->root.dynobj = abfd; sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->root.dynobj, 2, abfd, TRUE); + (sec, htab->root.dynobj, 2, abfd, true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -4902,7 +4902,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -4919,7 +4919,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->root.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -4934,7 +4934,7 @@ nios2_elf32_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } @@ -4961,7 +4961,7 @@ nios2_elf32_gc_mark_hook (asection *sec, /* Implement elf_backend_finish_dynamic_symbols: Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool nios2_elf32_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -5145,11 +5145,11 @@ nios2_elf32_finish_dynamic_symbol (bfd *output_bfd, || h == htab->h_gp_got) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Implement elf_backend_finish_dynamic_sections. */ -static bfd_boolean +static bool nios2_elf32_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -5278,7 +5278,7 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd, elf_section_data (sgotplt->output_section)->this_hdr.sh_entsize = 4; } - return TRUE; + return true; } /* Implement elf_backend_adjust_dynamic_symbol: @@ -5287,7 +5287,7 @@ nios2_elf32_finish_dynamic_sections (bfd *output_bfd, dynamic object, but we're not including those sections. We have to change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool nios2_elf32_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -5326,7 +5326,7 @@ nios2_elf32_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } /* Reinitialize the plt offset now that it is not used as a reference @@ -5342,13 +5342,13 @@ nios2_elf32_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* If there are no non-GOT references, we do not need a copy relocation. */ if (!h->non_got_ref) - return TRUE; + return true; /* This is a reference to a symbol defined by a dynamic object which is not a function. @@ -5357,13 +5357,13 @@ nios2_elf32_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; if (h->size == 0) { _bfd_error_handler (_("dynamic variable `%s' is zero size"), h->root.root.string); - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -5403,7 +5403,7 @@ nios2_elf32_adjust_dynamic_symbol (struct bfd_link_info *info, s->size = BFD_ALIGN (s->size, (bfd_size_type)1 << align2); if (align2 > bfd_section_alignment (s) && !bfd_set_section_alignment (s, align2)) - return FALSE; + return false; /* Define the symbol as being at this point in the section. */ h->root.u.def.section = s; @@ -5412,18 +5412,18 @@ nios2_elf32_adjust_dynamic_symbol (struct bfd_link_info *info, /* Increment the section size to make room for the symbol. */ s->size += h->size; - return TRUE; + return true; } /* Worker function for nios2_elf32_size_dynamic_sections. */ -static bfd_boolean +static bool adjust_dynrelocs (struct elf_link_hash_entry *h, PTR inf) { struct bfd_link_info *info; struct elf32_nios2_link_hash_table *htab; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type == bfd_link_hash_warning) /* When warning symbols are created, they **replace** the "real" @@ -5439,13 +5439,13 @@ adjust_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (htab->root.splt == h->root.u.def.section) h->root.u.def.value += htab->res_n_size; - return TRUE; + return true; } /* Another worker function for nios2_elf32_size_dynamic_sections. Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) { struct bfd_link_info *info; @@ -5455,7 +5455,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) int use_plt; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type == bfd_link_hash_warning) /* When warning symbols are created, they **replace** the "real" @@ -5474,7 +5474,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (h->dynindx == -1 && !h->forced_local && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) { @@ -5531,7 +5531,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = eh->tls_type; int indx; @@ -5540,7 +5540,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (h->dynindx == -1 && !h->forced_local && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; s = htab->root.sgot; h->got.offset = s->size; @@ -5594,7 +5594,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -5634,7 +5634,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) else if (h->dynindx == -1 && !h->forced_local && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } else @@ -5654,7 +5654,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) if (h->dynindx == -1 && !h->forced_local && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; /* If that succeeded, we know we'll be keeping all the relocs. */ @@ -5674,18 +5674,18 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, PTR inf) sreloc->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Implement elf_backend_size_dynamic_sections: Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; struct elf32_nios2_link_hash_table *htab; @@ -5813,7 +5813,7 @@ nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -5830,7 +5830,7 @@ nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (s->size != 0) { if (s != htab->root.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -5866,7 +5866,7 @@ nios2_elf32_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } /* Adjust dynamic symbols that point to the plt to account for the @@ -5941,7 +5941,7 @@ nios2_elf32_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, } /* Return 1 if target is one of ours. */ -static bfd_boolean +static bool is_nios2_elf_target (const struct bfd_target *targ) { return (targ == &nios2_elf32_le_vec @@ -5951,7 +5951,7 @@ is_nios2_elf_target (const struct bfd_target *targ) /* Implement elf_backend_add_symbol_hook. This hook is called by the linker when adding symbols from an object file. We use it to put .comm items in .sbss, and not .bss. */ -static bfd_boolean +static bool nios2_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -5980,20 +5980,20 @@ nios2_elf_add_symbol_hook (bfd *abfd, htab->sbss = bfd_make_section_anyway_with_flags (htab->root.dynobj, ".sbss", flags); if (htab->sbss == NULL) - return FALSE; + return false; } *secp = htab->sbss; *valp = sym->st_size; } - return TRUE; + return true; } /* Implement elf_backend_can_make_relative_eh_frame: Decide whether to attempt to turn absptr or lsda encodings in shared libraries into pcrel within the given input section. */ -static bfd_boolean +static bool nios2_elf32_can_make_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, @@ -6001,7 +6001,7 @@ nios2_elf32_can_make_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED, ATTRIBUTE_UNUSED) { /* We can't use PC-relative encodings in the .eh_frame section. */ - return FALSE; + return false; } /* Implement elf_backend_special_sections. */ diff --git a/bfd/elf32-nios2.h b/bfd/elf32-nios2.h index 1cdcda9b76..4961e87cf9 100644 --- a/bfd/elf32-nios2.h +++ b/bfd/elf32-nios2.h @@ -28,11 +28,11 @@ extern int nios2_elf32_setup_section_lists extern void nios2_elf32_next_input_section (struct bfd_link_info *, asection *); -extern bfd_boolean nios2_elf32_size_stubs +extern bool nios2_elf32_size_stubs (bfd *, bfd *, struct bfd_link_info *, - asection * (*) (const char *, asection *, bfd_boolean), void (*) (void)); + asection * (*) (const char *, asection *, bool), void (*) (void)); -extern bfd_boolean nios2_elf32_build_stubs +extern bool nios2_elf32_build_stubs (struct bfd_link_info *); #endif /* _ELF32_NIOS2_H */ diff --git a/bfd/elf32-or1k.c b/bfd/elf32-or1k.c index 1804854064..cd4398da86 100644 --- a/bfd/elf32-or1k.c +++ b/bfd/elf32-or1k.c @@ -47,593 +47,593 @@ static reloc_howto_type or1k_elf_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_32, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_16, 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_8, 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_LO_16_IN_INSN, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_LO_16_IN_INSN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_HI_16_IN_INSN, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_HI_16_IN_INSN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A PC relative 26 bit relocation, right shifted by 2. */ HOWTO (R_OR1K_INSN_REL_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_INSN_REL_26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x03ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_OR1K_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_OR1K_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_OR1K_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_OR1K_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_32_PCREL, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_16_PCREL, 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_8_PCREL, 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_8_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_GOTPC_HI16, /* Type. */ 16, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_OR1K_GOTPC_HI16", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0xffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ HOWTO (R_OR1K_GOTPC_LO16, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_OR1K_GOTPC_LO16", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0xffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ HOWTO (R_OR1K_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 26 bit PLT relocation. Shifted by 2. */ HOWTO (R_OR1K_PLT26, /* Type. */ 2, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 26, /* Bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_OR1K_PLT26", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x03ffffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ HOWTO (R_OR1K_GOTOFF_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GOTOFF_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_GOTOFF_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GOTOFF_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_COPY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_GD_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_GD_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_GD_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_GD_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LDM_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LDM_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LDM_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LDM_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LDO_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LDO_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LDO_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LDO_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_IE_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_IE_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_IE_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_IE_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LE_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LE_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LE_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LE_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_TPOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_TPOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_DTPOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_DTPOFF", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_DTPMOD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_DTPMOD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_AHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_AHI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_GOTOFF_AHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GOTOFF_AHI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_IE_AHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_IE_AHI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LE_AHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LE_AHI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_SLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_SLO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_GOTOFF_SLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GOTOFF_SLO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LE_SLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LE_SLO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A page relative 21 bit relocation, right shifted by 13, aligned. Note that this is *page* relative, not pc relative. The idea is @@ -644,170 +644,170 @@ static reloc_howto_type or1k_elf_howto_table[] = 13, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_PCREL_PG21", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_GOT_PG21, /* type */ 13, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GOT_PG21", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_TLS_GD_PG21, /* type */ 13, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_GD_PG21", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LDM_PG21, /* type */ 13, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_LDM_PG21", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_TLS_IE_PG21, /* type */ 13, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_IE_PG21", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_OR1K_LO13, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_LO13", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_GOT_LO13, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_GOT_LO13", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_GD_LO13, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_GD_LO13", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_LDM_LO13, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLD_LDM_LO13", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_TLS_IE_LO13, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_TLS_IE_LO13", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_OR1K_SLO13, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_OR1K_SLO13", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 26 bit PLT relocation, using ADRP. Shifted by 2. */ HOWTO (R_OR1K_PLTA26, /* Type. */ 2, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 26, /* Bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain on overflow. */ bfd_elf_generic_reloc, /* Special Function. */ "R_OR1K_PLTA26", /* Name. */ - FALSE, /* Partial Inplace. */ + false, /* Partial Inplace. */ 0, /* Source Mask. */ 0x03ffffff, /* Dest Mask. */ - TRUE), /* PC relative offset? */ + true), /* PC relative offset? */ }; /* Map BFD reloc types to Or1k ELF reloc types. */ @@ -916,7 +916,7 @@ struct elf_or1k_link_hash_table { struct elf_link_hash_table root; - bfd_boolean saw_plta; + bool saw_plta; }; /* Get the ELF linker hash table from a link_info structure. */ @@ -925,7 +925,7 @@ struct elf_or1k_link_hash_table && elf_hash_table_id (elf_hash_table (p)) == OR1K_ELF_DATA) \ ? (struct elf_or1k_link_hash_table *) (p)->hash : NULL) -static bfd_boolean +static bool elf_or1k_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_or1k_obj_tdata), @@ -1024,7 +1024,7 @@ or1k_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an Or1k ELF reloc. */ -static bfd_boolean +static bool or1k_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -1038,15 +1038,15 @@ or1k_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = & or1k_elf_howto_table[r_type]; - return TRUE; + return true; } /* Return the relocation value for @tpoff relocations.. */ static bfd_vma -tpoff (struct bfd_link_info *info, bfd_vma address, bfd_boolean dynamic) +tpoff (struct bfd_link_info *info, bfd_vma address, bool dynamic) { struct elf_link_hash_table *htab = elf_hash_table (info); bfd_vma base; @@ -1261,10 +1261,10 @@ or1k_elf_relocate_section (bfd *output_bfd, bfd_vma *local_got_offsets; asection *sgot, *splt; bfd_vma plt_base, got_base, got_sym_value; - bfd_boolean ret_val = TRUE; + bool ret_val = true; if (htab == NULL) - return FALSE; + return false; local_got_offsets = elf_local_got_offsets (input_bfd); @@ -1315,7 +1315,7 @@ or1k_elf_relocate_section (bfd *output_bfd, (_("%pB: unknown relocation type %d"), input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret_val = FALSE; + ret_val = false; continue; } @@ -1336,7 +1336,7 @@ or1k_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1369,7 +1369,7 @@ or1k_elf_relocate_section (bfd *output_bfd, (_("%pB: addend should be zero for plt relocations"), input_bfd); bfd_set_error (bfd_error_bad_value); - ret_val = FALSE; + ret_val = false; } break; @@ -1384,7 +1384,7 @@ or1k_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (sgot != NULL); if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -1474,7 +1474,7 @@ or1k_elf_relocate_section (bfd *output_bfd, (_("%pB: addend should be zero for got relocations"), input_bfd); bfd_set_error (bfd_error_bad_value); - ret_val = FALSE; + ret_val = false; } } break; @@ -1490,7 +1490,7 @@ or1k_elf_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: gotoff relocation against dynamic symbol %s"), input_bfd, h->root.root.string); - ret_val = FALSE; + ret_val = false; bfd_set_error (bfd_error_bad_value); } relocation -= got_sym_value; @@ -1507,7 +1507,7 @@ or1k_elf_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: pc-relative relocation against dynamic symbol %s"), input_bfd, name); - ret_val = FALSE; + ret_val = false; bfd_set_error (bfd_error_bad_value); } break; @@ -1521,7 +1521,7 @@ or1k_elf_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: non-pic relocation against symbol %s"), input_bfd, name); - ret_val = FALSE; + ret_val = false; bfd_set_error (bfd_error_bad_value); } break; @@ -1552,7 +1552,7 @@ or1k_elf_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip; + bool skip; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -1560,15 +1560,15 @@ or1k_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (sreloc != NULL); - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE; + skip = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -1606,7 +1606,7 @@ or1k_elf_relocate_section (bfd *output_bfd, (_("%pB: support for local dynamic not implemented"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; case R_OR1K_TLS_GD_HI16: case R_OR1K_TLS_GD_LO16: @@ -1622,7 +1622,7 @@ or1k_elf_relocate_section (bfd *output_bfd, Elf_Internal_Rela rela; asection *srelgot; bfd_byte *loc; - bfd_boolean dynamic; + bool dynamic; int indx = 0; unsigned char tls_type; @@ -1668,8 +1668,8 @@ or1k_elf_relocate_section (bfd *output_bfd, if (h != NULL) { - bfd_boolean dyn = htab->root.dynamic_sections_created; - bfd_boolean pic = bfd_link_pic (info); + bool dyn = htab->root.dynamic_sections_created; + bool pic = bfd_link_pic (info); if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, pic, h) && (!pic || !SYMBOL_REFERENCES_LOCAL (info, h))) @@ -1785,7 +1785,7 @@ or1k_elf_relocate_section (bfd *output_bfd, (_("%pB: will not resolve runtime TLS relocation"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; default: break; @@ -1808,7 +1808,7 @@ or1k_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -1860,7 +1860,7 @@ or1k_elf_gc_mark_hook (asection *sec, /* Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool or1k_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1876,14 +1876,14 @@ or1k_elf_check_relocs (bfd *abfd, asection *sreloc = NULL; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); htab = or1k_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; @@ -1956,7 +1956,7 @@ or1k_elf_check_relocs (bfd *abfd, size = symtab_hdr->sh_info; local_tls_type = bfd_zalloc (abfd, size); if (local_tls_type == NULL) - return FALSE; + return false; elf_or1k_local_tls_type (abfd) = local_tls_type; } local_tls_type[r_symndx] |= tls_type; @@ -1968,19 +1968,19 @@ or1k_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_OR1K_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_OR1K_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; /* This relocation requires .plt entry. */ case R_OR1K_PLTA26: - htab->saw_plta = TRUE; + htab->saw_plta = true; /* FALLTHRU */ case R_OR1K_PLT26: if (h != NULL) @@ -2018,7 +2018,7 @@ or1k_elf_check_relocs (bfd *abfd, size *= sizeof (bfd_signed_vma); local_got_refcounts = bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } local_got_refcounts[r_symndx] += 1; @@ -2034,7 +2034,7 @@ or1k_elf_check_relocs (bfd *abfd, if (dynobj == NULL) htab->root.dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; } break; @@ -2108,7 +2108,7 @@ or1k_elf_check_relocs (bfd *abfd, name = bfd_elf_string_from_elf_section (abfd, strndx, shnam); if (name == NULL) - return FALSE; + return false; if (strncmp (name, ".rela", 5) != 0 || strcmp (bfd_section_name (sec), name + 5) != 0) @@ -2127,10 +2127,10 @@ or1k_elf_check_relocs (bfd *abfd, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } elf_section_data (sec)->sreloc = sreloc; } @@ -2152,11 +2152,11 @@ or1k_elf_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) - return FALSE; + return false; vpp = &elf_section_data (s)->local_dynrel; head = (struct elf_dyn_relocs **) vpp; @@ -2171,7 +2171,7 @@ or1k_elf_check_relocs (bfd *abfd, sec_relocs = ((struct elf_dyn_relocs *) bfd_alloc (htab->root.dynobj, amt)); if (sec_relocs == NULL) - return FALSE; + return false; sec_relocs->next = *head; *head = sec_relocs; sec_relocs->sec = sec; @@ -2188,7 +2188,7 @@ or1k_elf_check_relocs (bfd *abfd, } } - return TRUE; + return true; } static void @@ -2223,7 +2223,7 @@ or1k_write_plt_entry (bfd *output_bfd, bfd_byte *contents, unsigned insn1, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool or1k_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -2233,7 +2233,7 @@ or1k_elf_finish_dynamic_sections (bfd *output_bfd, htab = or1k_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; @@ -2338,13 +2338,13 @@ or1k_elf_finish_dynamic_sections (bfd *output_bfd, if (htab->root.sgot && htab->root.sgot->size > 0) elf_section_data (htab->root.sgot->output_section)->this_hdr.sh_entsize = 4; - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool or1k_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -2355,7 +2355,7 @@ or1k_elf_finish_dynamic_symbol (bfd *output_bfd, htab = or1k_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (h->plt.offset != (bfd_vma) -1) { @@ -2519,7 +2519,7 @@ or1k_elf_finish_dynamic_symbol (bfd *output_bfd, || h == htab->root.hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } static enum elf_reloc_type_class @@ -2542,7 +2542,7 @@ or1k_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2581,7 +2581,7 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -2595,7 +2595,7 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2606,18 +2606,18 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -2625,7 +2625,7 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -2640,7 +2640,7 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, htab = or1k_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* We must generate a R_OR1K_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the @@ -2679,23 +2679,23 @@ or1k_elf_adjust_dynamic_symbol (struct bfd_link_info *info, static void or1k_set_got_and_rela_sizes (const unsigned char tls_type, - const bfd_boolean dynamic, + const bool dynamic, bfd_vma *got_size, bfd_vma *rela_size) { - bfd_boolean is_tls_entry = FALSE; + bool is_tls_entry = false; /* TLS GD requires two GOT entries and two relocs. */ if ((tls_type & TLS_GD) != 0) { *got_size += 8; - is_tls_entry = TRUE; + is_tls_entry = true; } if ((tls_type & TLS_IE) != 0) { *got_size += 4; - is_tls_entry = TRUE; + is_tls_entry = true; } if (!is_tls_entry) @@ -2718,7 +2718,7 @@ or1k_set_got_and_rela_sizes (const unsigned char tls_type, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info; @@ -2726,12 +2726,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) struct elf_dyn_relocs *sec_relocs; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = or1k_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->root.dynamic_sections_created && h->plt.refcount > 0) @@ -2742,7 +2742,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -2793,7 +2793,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) if (h->got.refcount > 0) { asection *sgot; - bfd_boolean dyn; + bool dyn; unsigned char tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -2802,7 +2802,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } sgot = htab->root.sgot; @@ -2820,7 +2820,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -2859,7 +2859,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -2882,7 +2882,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -2905,24 +2905,24 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) sreloc->size += sec_relocs->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_or1k_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = or1k_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; BFD_ASSERT (dynobj != NULL); @@ -3019,7 +3019,7 @@ or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -3037,7 +3037,7 @@ or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->root.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3073,7 +3073,7 @@ or1k_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -3106,7 +3106,7 @@ or1k_elf_copy_indirect_symbol (struct bfd_link_info *info, /* Set the right machine number. */ -static bfd_boolean +static bool or1k_elf_object_p (bfd *abfd) { unsigned long mach = bfd_mach_or1k; @@ -3119,7 +3119,7 @@ or1k_elf_object_p (bfd *abfd) /* Store the machine number in the flags field. */ -static bfd_boolean +static bool or1k_elf_final_write_processing (bfd *abfd) { switch (bfd_get_mach (abfd)) @@ -3134,21 +3134,21 @@ or1k_elf_final_write_processing (bfd *abfd) return _bfd_elf_final_write_processing (abfd); } -static bfd_boolean +static bool or1k_elf_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Make sure all input files are consistent with respect to EF_OR1K_NODELAY flag setting. */ -static bfd_boolean +static bool elf32_or1k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -3160,18 +3160,18 @@ elf32_or1k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; if (!elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; - return TRUE; + return true; } if (in_flags == out_flags) - return TRUE; + return true; if ((in_flags & EF_OR1K_NODELAY) != (out_flags & EF_OR1K_NODELAY)) { @@ -3180,16 +3180,16 @@ elf32_or1k_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd, "EF_OR1K_NODELAY"); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Implement elf_backend_grok_prstatus: Support for core dump NOTE sections. */ -static bfd_boolean +static bool or1k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -3198,7 +3198,7 @@ or1k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 212: /* Linux/OpenRISC */ /* pr_cursig */ @@ -3220,13 +3220,13 @@ or1k_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) } /* Implement elf_backend_grok_psinfo. */ -static bfd_boolean +static bool or1k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 128: /* Linux/OpenRISC elf_prpsinfo */ elf_tdata (abfd)->core->program @@ -3235,7 +3235,7 @@ or1k_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80); } - return TRUE; + return true; } diff --git a/bfd/elf32-pj.c b/bfd/elf32-pj.c index 796d646f8b..165b61329b 100644 --- a/bfd/elf32-pj.c +++ b/bfd/elf32-pj.c @@ -116,15 +116,15 @@ static reloc_howto_type pj_elf_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ pj_elf_reloc, /* special_function */ "R_PJ_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit absolute relocation. Setting partial_inplace to TRUE and src_mask to a non-zero value is similar to the COFF toolchain. */ @@ -132,60 +132,60 @@ static reloc_howto_type pj_elf_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ pj_elf_reloc, /* special_function */ "R_PJ_DIR32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit PC relative relocation. */ HOWTO (R_PJ_CODE_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ pj_elf_reloc, /* special_function */ "R_PJ_REL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit PC relative relocation. */ HOWTO (R_PJ_CODE_REL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overf6w */ pj_elf_reloc, /* special_function */ "R_PJ_REL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (4), EMPTY_HOWTO (5), HOWTO (R_PJ_CODE_DIR32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ pj_elf_reloc, /* special_function */ "R_PJ_CODE_DIR32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (7), EMPTY_HOWTO (8), @@ -198,59 +198,59 @@ static reloc_howto_type pj_elf_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ pj_elf_reloc, /* special_function */ "R_PJ_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_PJ_CODE_HI16, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ pj_elf_reloc, /* special_function */ "R_PJ_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_PJ_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_PJ_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_PJ_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_PJ_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* This structure is used to map BFD reloc codes to PJ ELF relocs. */ @@ -311,7 +311,7 @@ pj_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Given an ELF reloc, fill in the howto field of a relent. */ -static bfd_boolean +static bool pj_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -326,17 +326,17 @@ pj_elf_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &pj_elf_howto_table[r]; - return TRUE; + return true; } /* Take this moment to fill in the special picoJava bits in the e_flags field. */ -static bfd_boolean +static bool pj_elf_final_write_processing (bfd *abfd) { elf_elfheader (abfd)->e_flags |= EF_PICOJAVA_ARCH; diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 1a00a396e6..0ae7e0bcf6 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -20,7 +20,7 @@ Boston, MA 02110-1301, USA. */ /* Don't generate unused section symbols. */ -#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS FALSE +#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS false #include "sysdep.h" #include @@ -198,101 +198,101 @@ static const bfd_vma ppc_elf_vxworks_pic_plt0_entry complain, special_func) \ HOWTO (type, rightshift, size, bitsize, pc_relative, 0, \ complain_overflow_ ## complain, special_func, \ - #type, FALSE, 0, mask, pc_relative) + #type, false, 0, mask, pc_relative) static reloc_howto_type *ppc_elf_howto_table[R_PPC_max]; static reloc_howto_type ppc_elf_howto_raw[] = { /* This reloc does nothing. */ - HOW (R_PPC_NONE, 3, 0, 0, 0, FALSE, dont, + HOW (R_PPC_NONE, 3, 0, 0, 0, false, dont, bfd_elf_generic_reloc), /* A standard 32 bit relocation. */ - HOW (R_PPC_ADDR32, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_ADDR32, 2, 32, 0xffffffff, 0, false, dont, bfd_elf_generic_reloc), /* An absolute 26 bit branch; the lower two bits must be zero. FIXME: we don't check that, we just clear them. */ - HOW (R_PPC_ADDR24, 2, 26, 0x3fffffc, 0, FALSE, signed, + HOW (R_PPC_ADDR24, 2, 26, 0x3fffffc, 0, false, signed, bfd_elf_generic_reloc), /* A standard 16 bit relocation. */ - HOW (R_PPC_ADDR16, 1, 16, 0xffff, 0, FALSE, bitfield, + HOW (R_PPC_ADDR16, 1, 16, 0xffff, 0, false, bitfield, bfd_elf_generic_reloc), /* A 16 bit relocation without overflow. */ - HOW (R_PPC_ADDR16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_ADDR16_LO, 1, 16, 0xffff, 0, false, dont, bfd_elf_generic_reloc), /* The high order 16 bits of an address. */ - HOW (R_PPC_ADDR16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_ADDR16_HI, 1, 16, 0xffff, 16, false, dont, bfd_elf_generic_reloc), /* The high order 16 bits of an address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ - HOW (R_PPC_ADDR16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_ADDR16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_addr16_ha_reloc), /* An absolute 16 bit branch; the lower two bits must be zero. FIXME: we don't check that, we just clear them. */ - HOW (R_PPC_ADDR14, 2, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC_ADDR14, 2, 16, 0xfffc, 0, false, signed, bfd_elf_generic_reloc), /* An absolute 16 bit branch, for which bit 10 should be set to indicate that the branch is expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC_ADDR14_BRTAKEN, 2, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC_ADDR14_BRTAKEN, 2, 16, 0xfffc, 0, false, signed, bfd_elf_generic_reloc), /* An absolute 16 bit branch, for which bit 10 should be set to indicate that the branch is not expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC_ADDR14_BRNTAKEN, 2, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC_ADDR14_BRNTAKEN, 2, 16, 0xfffc, 0, false, signed, bfd_elf_generic_reloc), /* A relative 26 bit branch; the lower two bits must be zero. */ - HOW (R_PPC_REL24, 2, 26, 0x3fffffc, 0, TRUE, signed, + HOW (R_PPC_REL24, 2, 26, 0x3fffffc, 0, true, signed, bfd_elf_generic_reloc), /* A relative 16 bit branch; the lower two bits must be zero. */ - HOW (R_PPC_REL14, 2, 16, 0xfffc, 0, TRUE, signed, + HOW (R_PPC_REL14, 2, 16, 0xfffc, 0, true, signed, bfd_elf_generic_reloc), /* A relative 16 bit branch. Bit 10 should be set to indicate that the branch is expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC_REL14_BRTAKEN, 2, 16, 0xfffc, 0, TRUE, signed, + HOW (R_PPC_REL14_BRTAKEN, 2, 16, 0xfffc, 0, true, signed, bfd_elf_generic_reloc), /* A relative 16 bit branch. Bit 10 should be set to indicate that the branch is not expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC_REL14_BRNTAKEN, 2, 16, 0xfffc, 0, TRUE, signed, + HOW (R_PPC_REL14_BRNTAKEN, 2, 16, 0xfffc, 0, true, signed, bfd_elf_generic_reloc), /* Like R_PPC_ADDR16, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC_GOT16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_GOT16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like R_PPC_ADDR16_LO, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC_GOT16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_GOT16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like R_PPC_ADDR16_HI, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC_GOT16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like R_PPC_ADDR16_HA, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC_GOT16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like R_PPC_REL24, but referring to the procedure linkage table entry for the symbol. */ - HOW (R_PPC_PLTREL24, 2, 26, 0x3fffffc, 0, TRUE, signed, + HOW (R_PPC_PLTREL24, 2, 26, 0x3fffffc, 0, true, signed, ppc_elf_unhandled_reloc), /* This is used only by the dynamic linker. The symbol should exist @@ -300,269 +300,269 @@ static reloc_howto_type ppc_elf_howto_raw[] = { dynamic linker copies the data addressed by the symbol from the shared library into the object, because the object being run has to have the data at some particular address. */ - HOW (R_PPC_COPY, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_COPY, 2, 32, 0, 0, false, dont, ppc_elf_unhandled_reloc), /* Like R_PPC_ADDR32, but used when setting global offset table entries. */ - HOW (R_PPC_GLOB_DAT, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_GLOB_DAT, 2, 32, 0xffffffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Marks a procedure linkage table entry for a symbol. */ - HOW (R_PPC_JMP_SLOT, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_JMP_SLOT, 2, 32, 0, 0, false, dont, ppc_elf_unhandled_reloc), /* Used only by the dynamic linker. When the object is run, this longword is set to the load address of the object, plus the addend. */ - HOW (R_PPC_RELATIVE, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_RELATIVE, 2, 32, 0xffffffff, 0, false, dont, bfd_elf_generic_reloc), /* Like R_PPC_REL24, but uses the value of the symbol within the object rather than the final value. Normally used for _GLOBAL_OFFSET_TABLE_. */ - HOW (R_PPC_LOCAL24PC, 2, 26, 0x3fffffc, 0, TRUE, signed, + HOW (R_PPC_LOCAL24PC, 2, 26, 0x3fffffc, 0, true, signed, bfd_elf_generic_reloc), /* Like R_PPC_ADDR32, but may be unaligned. */ - HOW (R_PPC_UADDR32, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_UADDR32, 2, 32, 0xffffffff, 0, false, dont, bfd_elf_generic_reloc), /* Like R_PPC_ADDR16, but may be unaligned. */ - HOW (R_PPC_UADDR16, 1, 16, 0xffff, 0, FALSE, bitfield, + HOW (R_PPC_UADDR16, 1, 16, 0xffff, 0, false, bitfield, bfd_elf_generic_reloc), /* 32-bit PC relative */ - HOW (R_PPC_REL32, 2, 32, 0xffffffff, 0, TRUE, dont, + HOW (R_PPC_REL32, 2, 32, 0xffffffff, 0, true, dont, bfd_elf_generic_reloc), /* 32-bit relocation to the symbol's procedure linkage table. FIXME: not supported. */ - HOW (R_PPC_PLT32, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_PLT32, 2, 32, 0, 0, false, dont, ppc_elf_unhandled_reloc), /* 32-bit PC relative relocation to the symbol's procedure linkage table. FIXME: not supported. */ - HOW (R_PPC_PLTREL32, 2, 32, 0, 0, TRUE, dont, + HOW (R_PPC_PLTREL32, 2, 32, 0, 0, true, dont, ppc_elf_unhandled_reloc), /* Like R_PPC_ADDR16_LO, but referring to the PLT table entry for the symbol. */ - HOW (R_PPC_PLT16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_PLT16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like R_PPC_ADDR16_HI, but referring to the PLT table entry for the symbol. */ - HOW (R_PPC_PLT16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_PLT16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like R_PPC_ADDR16_HA, but referring to the PLT table entry for the symbol. */ - HOW (R_PPC_PLT16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_PLT16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* A sign-extended 16 bit value relative to _SDA_BASE_, for use with small data items. */ - HOW (R_PPC_SDAREL16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_SDAREL16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* 16-bit section relative relocation. */ - HOW (R_PPC_SECTOFF, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_SECTOFF, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* 16-bit lower half section relative relocation. */ - HOW (R_PPC_SECTOFF_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_SECTOFF_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* 16-bit upper half section relative relocation. */ - HOW (R_PPC_SECTOFF_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_SECTOFF_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* 16-bit upper half adjusted section relative relocation. */ - HOW (R_PPC_SECTOFF_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_SECTOFF_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Marker relocs for TLS. */ - HOW (R_PPC_TLS, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_TLS, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC_TLSGD, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_TLSGD, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC_TLSLD, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_TLSLD, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), /* Marker relocs on inline plt call instructions. */ - HOW (R_PPC_PLTSEQ, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_PLTSEQ, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC_PLTCALL, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC_PLTCALL, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), /* Computes the load module index of the load module that contains the definition of its TLS sym. */ - HOW (R_PPC_DTPMOD32, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_DTPMOD32, 2, 32, 0xffffffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Computes a dtv-relative displacement, the difference between the value of sym+add and the base address of the thread-local storage block that contains the definition of sym, minus 0x8000. */ - HOW (R_PPC_DTPREL32, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_DTPREL32, 2, 32, 0xffffffff, 0, false, dont, ppc_elf_unhandled_reloc), /* A 16 bit dtprel reloc. */ - HOW (R_PPC_DTPREL16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_DTPREL16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like DTPREL16, but no overflow. */ - HOW (R_PPC_DTPREL16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_DTPREL16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like DTPREL16_LO, but next higher group of 16 bits. */ - HOW (R_PPC_DTPREL16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_DTPREL16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like DTPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC_DTPREL16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_DTPREL16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Computes a tp-relative displacement, the difference between the value of sym+add and the value of the thread pointer (r13). */ - HOW (R_PPC_TPREL32, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_TPREL32, 2, 32, 0xffffffff, 0, false, dont, ppc_elf_unhandled_reloc), /* A 16 bit tprel reloc. */ - HOW (R_PPC_TPREL16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_TPREL16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like TPREL16, but no overflow. */ - HOW (R_PPC_TPREL16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_TPREL16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like TPREL16_LO, but next higher group of 16 bits. */ - HOW (R_PPC_TPREL16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_TPREL16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like TPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC_TPREL16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_TPREL16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Allocates two contiguous entries in the GOT to hold a tls_index structure, with values (sym+add)@dtpmod and (sym+add)@dtprel, and computes the offset to the first entry. */ - HOW (R_PPC_GOT_TLSGD16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_GOT_TLSGD16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like GOT_TLSGD16, but no overflow. */ - HOW (R_PPC_GOT_TLSGD16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_GOT_TLSGD16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_TLSGD16_LO, but next higher group of 16 bits. */ - HOW (R_PPC_GOT_TLSGD16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_TLSGD16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_TLSGD16_HI, but adjust for low 16 bits. */ - HOW (R_PPC_GOT_TLSGD16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_TLSGD16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Allocates two contiguous entries in the GOT to hold a tls_index structure, with values (sym+add)@dtpmod and zero, and computes the offset to the first entry. */ - HOW (R_PPC_GOT_TLSLD16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_GOT_TLSLD16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like GOT_TLSLD16, but no overflow. */ - HOW (R_PPC_GOT_TLSLD16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_GOT_TLSLD16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_TLSLD16_LO, but next higher group of 16 bits. */ - HOW (R_PPC_GOT_TLSLD16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_TLSLD16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_TLSLD16_HI, but adjust for low 16 bits. */ - HOW (R_PPC_GOT_TLSLD16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_TLSLD16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Allocates an entry in the GOT with value (sym+add)@dtprel, and computes the offset to the entry. */ - HOW (R_PPC_GOT_DTPREL16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_GOT_DTPREL16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like GOT_DTPREL16, but no overflow. */ - HOW (R_PPC_GOT_DTPREL16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_GOT_DTPREL16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_DTPREL16_LO, but next higher group of 16 bits. */ - HOW (R_PPC_GOT_DTPREL16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_DTPREL16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_DTPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC_GOT_DTPREL16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_DTPREL16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Allocates an entry in the GOT with value (sym+add)@tprel, and computes the offset to the entry. */ - HOW (R_PPC_GOT_TPREL16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_GOT_TPREL16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like GOT_TPREL16, but no overflow. */ - HOW (R_PPC_GOT_TPREL16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_GOT_TPREL16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_TPREL16_LO, but next higher group of 16 bits. */ - HOW (R_PPC_GOT_TPREL16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_TPREL16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* Like GOT_TPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC_GOT_TPREL16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_GOT_TPREL16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* The remaining relocs are from the Embedded ELF ABI, and are not in the SVR4 ELF ABI. */ /* 32 bit value resulting from the addend minus the symbol. */ - HOW (R_PPC_EMB_NADDR32, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_EMB_NADDR32, 2, 32, 0xffffffff, 0, false, dont, ppc_elf_unhandled_reloc), /* 16 bit value resulting from the addend minus the symbol. */ - HOW (R_PPC_EMB_NADDR16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_EMB_NADDR16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* 16 bit value resulting from the addend minus the symbol. */ - HOW (R_PPC_EMB_NADDR16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_EMB_NADDR16_LO, 1, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* The high order 16 bits of the addend minus the symbol. */ - HOW (R_PPC_EMB_NADDR16_HI, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_EMB_NADDR16_HI, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* The high order 16 bits of the result of the addend minus the address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ - HOW (R_PPC_EMB_NADDR16_HA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC_EMB_NADDR16_HA, 1, 16, 0xffff, 16, false, dont, ppc_elf_unhandled_reloc), /* 16 bit value resulting from allocating a 4 byte word to hold an address in the .sdata section, and returning the offset from _SDA_BASE_ for that relocation. */ - HOW (R_PPC_EMB_SDAI16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_EMB_SDAI16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* 16 bit value resulting from allocating a 4 byte word to hold an address in the .sdata2 section, and returning the offset from _SDA2_BASE_ for that relocation. */ - HOW (R_PPC_EMB_SDA2I16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_EMB_SDA2I16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* A sign-extended 16 bit value relative to _SDA2_BASE_, for use with small data items. */ - HOW (R_PPC_EMB_SDA2REL, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_EMB_SDA2REL, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Relocate against either _SDA_BASE_ or _SDA2_BASE_, filling in the 16 bit signed offset from the appropriate base, and filling in the register field with the appropriate register (0, 2, or 13). */ - HOW (R_PPC_EMB_SDA21, 2, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_EMB_SDA21, 2, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Relocation not handled: R_PPC_EMB_MRKREF */ @@ -575,121 +575,121 @@ static reloc_howto_type ppc_elf_howto_raw[] = { /* PC relative relocation against either _SDA_BASE_ or _SDA2_BASE_, filling in the 16 bit signed offset from the appropriate base, and filling in the register field with the appropriate register (0, 2, or 13). */ - HOW (R_PPC_EMB_RELSDA, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_EMB_RELSDA, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* A relative 8 bit branch. */ - HOW (R_PPC_VLE_REL8, 1, 8, 0xff, 1, TRUE, signed, + HOW (R_PPC_VLE_REL8, 1, 8, 0xff, 1, true, signed, bfd_elf_generic_reloc), /* A relative 15 bit branch. */ - HOW (R_PPC_VLE_REL15, 2, 16, 0xfffe, 0, TRUE, signed, + HOW (R_PPC_VLE_REL15, 2, 16, 0xfffe, 0, true, signed, bfd_elf_generic_reloc), /* A relative 24 bit branch. */ - HOW (R_PPC_VLE_REL24, 2, 25, 0x1fffffe, 0, TRUE, signed, + HOW (R_PPC_VLE_REL24, 2, 25, 0x1fffffe, 0, true, signed, bfd_elf_generic_reloc), /* The 16 LSBS in split16a format. */ - HOW (R_PPC_VLE_LO16A, 2, 16, 0x1f07ff, 0, FALSE, dont, + HOW (R_PPC_VLE_LO16A, 2, 16, 0x1f07ff, 0, false, dont, ppc_elf_unhandled_reloc), /* The 16 LSBS in split16d format. */ - HOW (R_PPC_VLE_LO16D, 2, 16, 0x3e007ff, 0, FALSE, dont, + HOW (R_PPC_VLE_LO16D, 2, 16, 0x3e007ff, 0, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 split16a format. */ - HOW (R_PPC_VLE_HI16A, 2, 16, 0x1f07ff, 16, FALSE, dont, + HOW (R_PPC_VLE_HI16A, 2, 16, 0x1f07ff, 16, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 split16d format. */ - HOW (R_PPC_VLE_HI16D, 2, 16, 0x3e007ff, 16, FALSE, dont, + HOW (R_PPC_VLE_HI16D, 2, 16, 0x3e007ff, 16, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 (High Adjusted) in split16a format. */ - HOW (R_PPC_VLE_HA16A, 2, 16, 0x1f07ff, 16, FALSE, dont, + HOW (R_PPC_VLE_HA16A, 2, 16, 0x1f07ff, 16, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 (High Adjusted) in split16d format. */ - HOW (R_PPC_VLE_HA16D, 2, 16, 0x3e007ff, 16, FALSE, dont, + HOW (R_PPC_VLE_HA16D, 2, 16, 0x3e007ff, 16, false, dont, ppc_elf_unhandled_reloc), /* This reloc is like R_PPC_EMB_SDA21 but only applies to e_add16i instructions. If the register base is 0 then the linker changes the e_add16i to an e_li instruction. */ - HOW (R_PPC_VLE_SDA21, 2, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_VLE_SDA21, 2, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), /* Like R_PPC_VLE_SDA21 but ignore overflow. */ - HOW (R_PPC_VLE_SDA21_LO, 2, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC_VLE_SDA21_LO, 2, 16, 0xffff, 0, false, dont, ppc_elf_unhandled_reloc), /* The 16 LSBS relative to _SDA_BASE_ in split16a format. */ - HOW (R_PPC_VLE_SDAREL_LO16A, 2, 16, 0x1f07ff, 0, FALSE, dont, + HOW (R_PPC_VLE_SDAREL_LO16A, 2, 16, 0x1f07ff, 0, false, dont, ppc_elf_unhandled_reloc), /* The 16 LSBS relative to _SDA_BASE_ in split16d format. */ - HOW (R_PPC_VLE_SDAREL_LO16D, 2, 16, 0x3e007ff, 0, FALSE, dont, + HOW (R_PPC_VLE_SDAREL_LO16D, 2, 16, 0x3e007ff, 0, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 relative to _SDA_BASE_ in split16a format. */ - HOW (R_PPC_VLE_SDAREL_HI16A, 2, 16, 0x1f07ff, 16, FALSE, dont, + HOW (R_PPC_VLE_SDAREL_HI16A, 2, 16, 0x1f07ff, 16, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 relative to _SDA_BASE_ in split16d format. */ - HOW (R_PPC_VLE_SDAREL_HI16D, 2, 16, 0x3e007ff, 16, FALSE, dont, + HOW (R_PPC_VLE_SDAREL_HI16D, 2, 16, 0x3e007ff, 16, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 (HA) relative to _SDA_BASE split16a format. */ - HOW (R_PPC_VLE_SDAREL_HA16A, 2, 16, 0x1f07ff, 16, FALSE, dont, + HOW (R_PPC_VLE_SDAREL_HA16A, 2, 16, 0x1f07ff, 16, false, dont, ppc_elf_unhandled_reloc), /* Bits 16-31 (HA) relative to _SDA_BASE split16d format. */ - HOW (R_PPC_VLE_SDAREL_HA16D, 2, 16, 0x3e007ff, 16, FALSE, dont, + HOW (R_PPC_VLE_SDAREL_HA16D, 2, 16, 0x3e007ff, 16, false, dont, ppc_elf_unhandled_reloc), /* e_li split20 format. */ - HOW (R_PPC_VLE_ADDR20, 2, 20, 0x1f7fff, 0, FALSE, dont, + HOW (R_PPC_VLE_ADDR20, 2, 20, 0x1f7fff, 0, false, dont, ppc_elf_unhandled_reloc), - HOW (R_PPC_IRELATIVE, 2, 32, 0xffffffff, 0, FALSE, dont, + HOW (R_PPC_IRELATIVE, 2, 32, 0xffffffff, 0, false, dont, ppc_elf_unhandled_reloc), /* A 16 bit relative relocation. */ - HOW (R_PPC_REL16, 1, 16, 0xffff, 0, TRUE, signed, + HOW (R_PPC_REL16, 1, 16, 0xffff, 0, true, signed, bfd_elf_generic_reloc), /* A 16 bit relative relocation without overflow. */ - HOW (R_PPC_REL16_LO, 1, 16, 0xffff, 0, TRUE, dont, + HOW (R_PPC_REL16_LO, 1, 16, 0xffff, 0, true, dont, bfd_elf_generic_reloc), /* The high order 16 bits of a relative address. */ - HOW (R_PPC_REL16_HI, 1, 16, 0xffff, 16, TRUE, dont, + HOW (R_PPC_REL16_HI, 1, 16, 0xffff, 16, true, dont, bfd_elf_generic_reloc), /* The high order 16 bits of a relative address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ - HOW (R_PPC_REL16_HA, 1, 16, 0xffff, 16, TRUE, dont, + HOW (R_PPC_REL16_HA, 1, 16, 0xffff, 16, true, dont, ppc_elf_addr16_ha_reloc), /* Like R_PPC_REL16_HA but for split field in addpcis. */ - HOW (R_PPC_REL16DX_HA, 2, 16, 0x1fffc1, 16, TRUE, signed, + HOW (R_PPC_REL16DX_HA, 2, 16, 0x1fffc1, 16, true, signed, ppc_elf_addr16_ha_reloc), /* A split-field reloc for addpcis, non-relative (gas internal use only). */ - HOW (R_PPC_16DX_HA, 2, 16, 0x1fffc1, 16, FALSE, signed, + HOW (R_PPC_16DX_HA, 2, 16, 0x1fffc1, 16, false, signed, ppc_elf_addr16_ha_reloc), /* GNU extension to record C++ vtable hierarchy. */ - HOW (R_PPC_GNU_VTINHERIT, 0, 0, 0, 0, FALSE, dont, + HOW (R_PPC_GNU_VTINHERIT, 0, 0, 0, 0, false, dont, NULL), /* GNU extension to record C++ vtable member usage. */ - HOW (R_PPC_GNU_VTENTRY, 0, 0, 0, 0, FALSE, dont, + HOW (R_PPC_GNU_VTENTRY, 0, 0, 0, 0, false, dont, NULL), /* Phony reloc to handle AIX style TOC entries. */ - HOW (R_PPC_TOC16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC_TOC16, 1, 16, 0xffff, 0, false, signed, ppc_elf_unhandled_reloc), }; @@ -880,7 +880,7 @@ ppc_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for a PowerPC ELF reloc. */ -static bfd_boolean +static bool ppc_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -898,7 +898,7 @@ ppc_elf_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = ppc_elf_howto_table[r_type]; @@ -912,10 +912,10 @@ ppc_elf_info_to_howto (bfd *abfd, abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Handle the R_PPC_ADDR16_HA and R_PPC_REL16_HA relocs. */ @@ -1049,7 +1049,7 @@ struct ppc_elf_obj_tdata /* Override the generic function because we store some extras. */ -static bfd_boolean +static bool ppc_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct ppc_elf_obj_tdata), @@ -1058,7 +1058,7 @@ ppc_elf_mkobject (bfd *abfd) /* When defaulting arch/mach, decode apuinfo to find a better match. */ -bfd_boolean +bool _bfd_elf_ppc_set_arch (bfd *abfd) { unsigned long mach = 0; @@ -1133,17 +1133,17 @@ _bfd_elf_ppc_set_arch (bfd *abfd) break; } } - return TRUE; + return true; } /* Fix bad default arch selected for a 32 bit input bfd when the default is 64 bit. Also select arch based on apuinfo. */ -static bfd_boolean +static bool ppc_elf_object_p (bfd *abfd) { if (!abfd->arch_info->the_default) - return TRUE; + return true; if (abfd->arch_info->bits_per_word == 64) { @@ -1161,20 +1161,20 @@ ppc_elf_object_p (bfd *abfd) /* Function to set whether a module needs the -mrelocatable bit set. */ -static bfd_boolean +static bool ppc_elf_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -1183,7 +1183,7 @@ ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 268: /* Linux/PPC. */ /* pr_cursig */ @@ -1204,13 +1204,13 @@ ppc_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 128: /* Linux/PPC elf_prpsinfo. */ elf_tdata (abfd)->core->pid @@ -1233,7 +1233,7 @@ ppc_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } static char * @@ -1318,7 +1318,7 @@ ppc_elf_plt_sym_val (bfd_vma i ATTRIBUTE_UNUSED, is called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool ppc_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -1328,7 +1328,7 @@ ppc_elf_section_from_shdr (bfd *abfd, flagword flags; if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; newsect = hdr->bfd_section; flags = 0; @@ -1350,7 +1350,7 @@ ppc_elf_section_from_shdr (bfd *abfd, /* Set up any other section flags and such that may be necessary. */ -static bfd_boolean +static bool ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *shdr, asection *asect) @@ -1358,7 +1358,7 @@ ppc_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, if ((asect->flags & SEC_SORT_ENTRIES) != 0) shdr->sh_type = SHT_ORDERED; - return TRUE; + return true; } /* If we have .sbss2 or .PPC.EMB.sbss0 output sections, we @@ -1384,7 +1384,7 @@ ppc_elf_additional_program_headers (bfd *abfd, /* Modify the segment map for VLE executables. */ -bfd_boolean +bool ppc_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -1455,7 +1455,7 @@ ppc_elf_modify_segment_map (bfd *abfd, amt += (m->count - j - 1) * sizeof (asection *); n = (struct elf_segment_map *) bfd_zalloc (abfd, amt); if (n == NULL) - return FALSE; + return false; n->p_type = PT_LOAD; n->count = m->count - j; @@ -1467,7 +1467,7 @@ ppc_elf_modify_segment_map (bfd *abfd, m->next = n; } - return TRUE; + return true; } /* Add extra PPC sections -- Note, for now, make .sbss2 and @@ -1523,13 +1523,13 @@ typedef struct apuinfo_list apuinfo_list; static apuinfo_list *head; -static bfd_boolean apuinfo_set; +static bool apuinfo_set; static void apuinfo_list_init (void) { head = NULL; - apuinfo_set = FALSE; + apuinfo_set = false; } static void @@ -1629,7 +1629,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info) if (length < 20) goto fail; - apuinfo_set = TRUE; + apuinfo_set = true; if (largest_input_size < asec->size) { free (buffer); @@ -1699,7 +1699,7 @@ ppc_elf_begin_write_processing (bfd *abfd, struct bfd_link_info *link_info) /* Prevent the output section from accumulating the input sections' contents. We have already stored this in our linked list structure. */ -static bfd_boolean +static bool ppc_elf_write_section (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, asection *asec, @@ -1763,20 +1763,20 @@ ppc_final_write_processing (bfd *abfd) apuinfo_list_finish (); } -static bfd_boolean +static bool ppc_elf_final_write_processing (bfd *abfd) { ppc_final_write_processing (abfd); return _bfd_elf_final_write_processing (abfd); } -static bfd_boolean +static bool is_nonpic_glink_stub (bfd *abfd, asection *glink, bfd_vma off) { bfd_byte buf[4 * 4]; if (!bfd_get_section_contents (abfd, glink, buf, off, sizeof buf)) - return FALSE; + return false; return ((bfd_get_32 (abfd, buf + 0) & 0xffff0000) == LIS_11 && (bfd_get_32 (abfd, buf + 4) & 0xffff0000) == LWZ_11_11 @@ -1784,7 +1784,7 @@ is_nonpic_glink_stub (bfd *abfd, asection *glink, bfd_vma off) && bfd_get_32 (abfd, buf + 12) == BCTR); } -static bfd_boolean +static bool section_covers_vma (bfd *abfd ATTRIBUTE_UNUSED, asection *section, void *ptr) { bfd_vma vma = *(bfd_vma *) ptr; @@ -1798,7 +1798,7 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, long dynsymcount, asymbol **dynsyms, asymbol **ret) { - bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_relocs) (bfd *, asection *, asymbol **, bool); asection *plt, *relplt, *dynamic, *glink; bfd_vma glink_vma = 0; bfd_vma resolv_vma = 0; @@ -1927,7 +1927,7 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, return 0; slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table; - if (! (*slurp_relocs) (abfd, relplt, dynsyms, TRUE)) + if (! (*slurp_relocs) (abfd, relplt, dynsyms, true)) return -1; size = count * sizeof (asymbol); @@ -2320,13 +2320,13 @@ ppc_elf_link_params (struct bfd_link_info *info, struct ppc_elf_params *params) /* Create .got and the related sections. */ -static bfd_boolean +static bool ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info) { struct ppc_elf_link_hash_table *htab; if (!_bfd_elf_create_got_section (abfd, info)) - return FALSE; + return false; htab = ppc_elf_hash_table (info); if (htab->elf.target_os != is_vxworks) @@ -2336,17 +2336,17 @@ ppc_elf_create_got (bfd *abfd, struct bfd_link_info *info) flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); if (!bfd_set_section_flags (htab->elf.sgot, flags)) - return FALSE; + return false; } - return TRUE; + return true; } /* Create a special linker section, used for R_PPC_EMB_SDAI16 and R_PPC_EMB_SDA2I16 pointers. These sections become part of .sdata and .sdata2. Create _SDA_BASE_ and _SDA2_BASE too. */ -static bfd_boolean +static bool ppc_elf_create_linker_section (bfd *abfd, struct bfd_link_info *info, flagword flags, @@ -2359,7 +2359,7 @@ ppc_elf_create_linker_section (bfd *abfd, s = bfd_make_section_anyway_with_flags (abfd, lsect->name, flags); if (s == NULL) - return FALSE; + return false; lsect->section = s; /* Define the sym on the first section of this name. */ @@ -2367,12 +2367,12 @@ ppc_elf_create_linker_section (bfd *abfd, lsect->sym = _bfd_elf_define_linkage_sym (abfd, info, s, lsect->sym_name); if (lsect->sym == NULL) - return FALSE; + return false; lsect->sym->root.u.def.value = 0x8000; - return TRUE; + return true; } -static bfd_boolean +static bool ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) { struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info); @@ -2389,7 +2389,7 @@ ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) p2align = htab->params->plt_stub_align; if (s == NULL || !bfd_set_section_alignment (s, p2align)) - return FALSE; + return false; if (!info->no_ld_generated_unwind_info) { @@ -2399,7 +2399,7 @@ ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) htab->glink_eh_frame = s; if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; } flags = SEC_ALLOC | SEC_LINKER_CREATED; @@ -2407,7 +2407,7 @@ ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) htab->elf.iplt = s; if (s == NULL || !bfd_set_section_alignment (s, 4)) - return FALSE; + return false; flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -2415,7 +2415,7 @@ ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) htab->elf.irelplt = s; if (s == NULL || ! bfd_set_section_alignment (s, 2)) - return FALSE; + return false; /* Local plt entries. */ flags = (SEC_ALLOC | SEC_LOAD @@ -2424,7 +2424,7 @@ ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) flags); if (htab->pltlocal == NULL || !bfd_set_section_alignment (htab->pltlocal, 2)) - return FALSE; + return false; if (bfd_link_pic (info)) { @@ -2434,25 +2434,25 @@ ppc_elf_create_glink (bfd *abfd, struct bfd_link_info *info) = bfd_make_section_anyway_with_flags (abfd, ".rela.branch_lt", flags); if (htab->relpltlocal == NULL || !bfd_set_section_alignment (htab->relpltlocal, 2)) - return FALSE; + return false; } if (!ppc_elf_create_linker_section (abfd, info, 0, &htab->sdata[0])) - return FALSE; + return false; if (!ppc_elf_create_linker_section (abfd, info, SEC_READONLY, &htab->sdata[1])) - return FALSE; + return false; - return TRUE; + return true; } /* We have to create .dynsbss and .rela.sbss here so that they get mapped to output sections (just like _bfd_elf_create_dynamic_sections has to create .dynbss and .rela.bss). */ -static bfd_boolean +static bool ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct ppc_elf_link_hash_table *htab; @@ -2463,20 +2463,20 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (htab->elf.sgot == NULL && !ppc_elf_create_got (abfd, info)) - return FALSE; + return false; if (!_bfd_elf_create_dynamic_sections (abfd, info)) - return FALSE; + return false; if (htab->glink == NULL && !ppc_elf_create_glink (abfd, info)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".dynsbss", SEC_ALLOC | SEC_LINKER_CREATED); htab->dynsbss = s; if (s == NULL) - return FALSE; + return false; if (! bfd_link_pic (info)) { @@ -2486,12 +2486,12 @@ ppc_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->relsbss = s; if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; } if (htab->elf.target_os == is_vxworks && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2)) - return FALSE; + return false; s = htab->elf.splt; flags = SEC_ALLOC | SEC_CODE | SEC_LINKER_CREATED; @@ -2608,7 +2608,7 @@ ppc_elf_copy_indirect_symbol (struct bfd_link_info *info, /* Hook called by the linker routine which adds symbols from an object file. We use it to put .comm items in .sbss, and not .bss. */ -static bfd_boolean +static bool ppc_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -2638,14 +2638,14 @@ ppc_elf_add_symbol_hook (bfd *abfd, ".sbss", flags); if (htab->sbss == NULL) - return FALSE; + return false; } *secp = htab->sbss; *valp = sym->st_size; } - return TRUE; + return true; } /* Find a linker generated pointer with a given addend and type. */ @@ -2665,7 +2665,7 @@ elf_find_pointer_linker_section /* Allocate a pointer to live in a linker created section. */ -static bfd_boolean +static bool elf_allocate_pointer_linker_section (bfd *abfd, elf_linker_section_t *lsect, struct elf_link_hash_entry *h, @@ -2688,7 +2688,7 @@ elf_allocate_pointer_linker_section (bfd *abfd, if (elf_find_pointer_linker_section (eh->linker_section_pointer, rel->r_addend, lsect)) - return TRUE; + return true; ptr_linker_section_ptr = &eh->linker_section_pointer; } @@ -2709,7 +2709,7 @@ elf_allocate_pointer_linker_section (bfd *abfd, ptr = bfd_zalloc (abfd, amt); if (!ptr) - return FALSE; + return false; elf_local_ptr_offsets (abfd) = ptr; } @@ -2718,7 +2718,7 @@ elf_allocate_pointer_linker_section (bfd *abfd, if (elf_find_pointer_linker_section (ptr[r_symndx], rel->r_addend, lsect)) - return TRUE; + return true; ptr_linker_section_ptr = &ptr[r_symndx]; } @@ -2730,7 +2730,7 @@ elf_allocate_pointer_linker_section (bfd *abfd, linker_section_ptr = bfd_alloc (abfd, amt); if (!linker_section_ptr) - return FALSE; + return false; linker_section_ptr->next = *ptr_linker_section_ptr; linker_section_ptr->addend = rel->r_addend; @@ -2738,7 +2738,7 @@ elf_allocate_pointer_linker_section (bfd *abfd, *ptr_linker_section_ptr = linker_section_ptr; if (!bfd_set_section_alignment (lsect->section, 2)) - return FALSE; + return false; linker_section_ptr->offset = lsect->section->size; lsect->section->size += 4; @@ -2749,7 +2749,7 @@ elf_allocate_pointer_linker_section (bfd *abfd, (long) lsect->section->size); #endif - return TRUE; + return true; } static struct plt_entry ** @@ -2783,7 +2783,7 @@ update_local_sym_info (bfd *abfd, return local_plt + r_symndx; } -static bfd_boolean +static bool update_plt_info (bfd *abfd, struct plt_entry **plist, asection *sec, bfd_vma addend) { @@ -2799,7 +2799,7 @@ update_plt_info (bfd *abfd, struct plt_entry **plist, size_t amt = sizeof (*ent); ent = bfd_alloc (abfd, amt); if (ent == NULL) - return FALSE; + return false; ent->next = *plist; ent->sec = sec; ent->addend = addend; @@ -2807,7 +2807,7 @@ update_plt_info (bfd *abfd, struct plt_entry **plist, *plist = ent; } ent->plt.refcount += 1; - return TRUE; + return true; } static struct plt_entry * @@ -2823,7 +2823,7 @@ find_plt_ent (struct plt_entry **plist, asection *sec, bfd_vma addend) return ent; } -static bfd_boolean +static bool is_branch_reloc (enum elf_ppc_reloc_type r_type) { return (r_type == R_PPC_PLTREL24 @@ -2841,7 +2841,7 @@ is_branch_reloc (enum elf_ppc_reloc_type r_type) /* Relocs on inline plt call sequence insns prior to the call. */ -static bfd_boolean +static bool is_plt_seq_reloc (enum elf_ppc_reloc_type r_type) { return (r_type == R_PPC_PLT16_HA @@ -2865,7 +2865,7 @@ bad_shared_reloc (bfd *abfd, enum elf_ppc_reloc_type r_type) allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool ppc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2880,7 +2880,7 @@ ppc_elf_check_relocs (bfd *abfd, struct elf_link_hash_entry *tga; if (bfd_link_relocatable (info)) - return TRUE; + return true; #ifdef DEBUG _bfd_error_handler ("ppc_elf_check_relocs called for section %pA in %pB", @@ -2899,10 +2899,10 @@ ppc_elf_check_relocs (bfd *abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!ppc_elf_create_glink (htab->elf.dynobj, info)) - return FALSE; + return false; } tga = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", - FALSE, FALSE, TRUE); + false, false, true); symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); got2 = bfd_get_section_by_name (abfd, ".got2"); @@ -2940,7 +2940,7 @@ ppc_elf_check_relocs (bfd *abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!ppc_elf_create_got (htab->elf.dynobj, info)) - return FALSE; + return false; BFD_ASSERT (h == htab->elf.hgot); } @@ -2952,7 +2952,7 @@ ppc_elf_check_relocs (bfd *abfd, Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { @@ -2960,7 +2960,7 @@ ppc_elf_check_relocs (bfd *abfd, ifunc = update_local_sym_info (abfd, symtab_hdr, r_symndx, NON_GOT | PLT_IFUNC); if (ifunc == NULL) - return FALSE; + return false; /* STT_GNU_IFUNC symbols must have a PLT entry; In a non-pie executable even when there are @@ -2981,7 +2981,7 @@ ppc_elf_check_relocs (bfd *abfd, || r_type == R_PPC_PLT16_HA)) addend = rel->r_addend; if (!update_plt_info (abfd, ifunc, got2, addend)) - return FALSE; + return false; } } } @@ -3013,7 +3013,7 @@ ppc_elf_check_relocs (bfd *abfd, else if (!update_local_sym_info (abfd, symtab_hdr, r_symndx, NON_GOT | TLS_TLS | TLS_MARK)) - return FALSE; + return false; break; case R_PPC_PLTSEQ: @@ -3062,7 +3062,7 @@ ppc_elf_check_relocs (bfd *abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!ppc_elf_create_got (htab->elf.dynobj, info)) - return FALSE; + return false; } if (h != NULL) { @@ -3072,14 +3072,14 @@ ppc_elf_check_relocs (bfd *abfd, else /* This is a global offset table entry for a local symbol. */ if (!update_local_sym_info (abfd, symtab_hdr, r_symndx, tls_type)) - return FALSE; + return false; /* We may also need a plt entry if the symbol turns out to be an ifunc. */ if (h != NULL && !bfd_link_pic (info)) { if (!update_plt_info (abfd, &h->plt.plist, NULL, 0)) - return FALSE; + return false; } break; @@ -3088,11 +3088,11 @@ ppc_elf_check_relocs (bfd *abfd, htab->sdata[0].sym->ref_regular = 1; if (!elf_allocate_pointer_linker_section (abfd, &htab->sdata[0], h, rel)) - return FALSE; + return false; if (h != NULL) { - ppc_elf_hash_entry (h)->has_sda_refs = TRUE; - h->non_got_ref = TRUE; + ppc_elf_hash_entry (h)->has_sda_refs = true; + h->non_got_ref = true; } break; @@ -3101,16 +3101,16 @@ ppc_elf_check_relocs (bfd *abfd, if (!bfd_link_executable (info)) { bad_shared_reloc (abfd, r_type); - return FALSE; + return false; } htab->sdata[1].sym->ref_regular = 1; if (!elf_allocate_pointer_linker_section (abfd, &htab->sdata[1], h, rel)) - return FALSE; + return false; if (h != NULL) { - ppc_elf_hash_entry (h)->has_sda_refs = TRUE; - h->non_got_ref = TRUE; + ppc_elf_hash_entry (h)->has_sda_refs = true; + h->non_got_ref = true; } break; @@ -3126,8 +3126,8 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_VLE_SDAREL_HA16D: if (h != NULL) { - ppc_elf_hash_entry (h)->has_sda_refs = TRUE; - h->non_got_ref = TRUE; + ppc_elf_hash_entry (h)->has_sda_refs = true; + h->non_got_ref = true; } break; @@ -3147,13 +3147,13 @@ ppc_elf_check_relocs (bfd *abfd, if (!bfd_link_executable (info)) { bad_shared_reloc (abfd, r_type); - return FALSE; + return false; } htab->sdata[1].sym->ref_regular = 1; if (h != NULL) { - ppc_elf_hash_entry (h)->has_sda_refs = TRUE; - h->non_got_ref = TRUE; + ppc_elf_hash_entry (h)->has_sda_refs = true; + h->non_got_ref = true; } break; @@ -3163,8 +3163,8 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_EMB_RELSDA: if (h != NULL) { - ppc_elf_hash_entry (h)->has_sda_refs = TRUE; - h->non_got_ref = TRUE; + ppc_elf_hash_entry (h)->has_sda_refs = true; + h->non_got_ref = true; } break; @@ -3174,7 +3174,7 @@ ppc_elf_check_relocs (bfd *abfd, case R_PPC_EMB_NADDR16_HI: case R_PPC_EMB_NADDR16_HA: if (h != NULL) - h->non_got_ref = TRUE; + h->non_got_ref = true; break; case R_PPC_PLTREL24: @@ -3202,7 +3202,7 @@ ppc_elf_check_relocs (bfd *abfd, pltent = update_local_sym_info (abfd, symtab_hdr, r_symndx, NON_GOT | PLT_KEEP); if (pltent == NULL) - return FALSE; + return false; } else { @@ -3219,7 +3219,7 @@ ppc_elf_check_relocs (bfd *abfd, || r_type == R_PPC_PLT16_HA)) addend = rel->r_addend; if (!update_plt_info (abfd, pltent, got2, addend)) - return FALSE; + return false; break; /* The following relocations don't need to propagate the @@ -3283,7 +3283,7 @@ ppc_elf_check_relocs (bfd *abfd, { h->needs_plt = 1; if (!update_plt_info (abfd, &h->plt.plist, NULL, 0)) - return FALSE; + return false; } break; @@ -3291,14 +3291,14 @@ ppc_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_PPC_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_PPC_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_PPC_TPREL16_HI: @@ -3337,7 +3337,7 @@ ppc_elf_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == got2) @@ -3362,7 +3362,7 @@ ppc_elf_check_relocs (bfd *abfd, /* We may need a plt entry if the symbol turns out to be a function defined in a dynamic object. */ if (!update_plt_info (abfd, &h->plt.plist, NULL, 0)) - return FALSE; + return false; /* We may need a copy reloc too. */ h->non_got_ref = 1; @@ -3401,7 +3401,7 @@ ppc_elf_check_relocs (bfd *abfd, a function defined in a dynamic object. */ h->needs_plt = 1; if (!update_plt_info (abfd, &h->plt.plist, NULL, 0)) - return FALSE; + return false; break; } @@ -3452,10 +3452,10 @@ ppc_elf_check_relocs (bfd *abfd, htab->elf.dynobj = abfd; sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -3471,7 +3471,7 @@ ppc_elf_check_relocs (bfd *abfd, { p = bfd_alloc (htab->elf.dynobj, sizeof *p); if (p == NULL) - return FALSE; + return false; p->next = *rel_head; *rel_head = p; p->sec = sec; @@ -3489,7 +3489,7 @@ ppc_elf_check_relocs (bfd *abfd, easily. Oh well. */ struct ppc_dyn_relocs *p; struct ppc_dyn_relocs **rel_head; - bfd_boolean is_ifunc; + bool is_ifunc; asection *s; void *vpp; Elf_Internal_Sym *isym; @@ -3497,7 +3497,7 @@ ppc_elf_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -3513,7 +3513,7 @@ ppc_elf_check_relocs (bfd *abfd, { p = bfd_alloc (htab->elf.dynobj, sizeof *p); if (p == NULL) - return FALSE; + return false; p->next = *rel_head; *rel_head = p; p->sec = sec; @@ -3528,19 +3528,19 @@ ppc_elf_check_relocs (bfd *abfd, } } - return TRUE; + return true; } /* Warn for conflicting Tag_GNU_Power_ABI_FP attributes between IBFD and OBFD, and merge non-conflicting ones. */ -bfd_boolean +bool _bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; obj_attribute *in_attr, *in_attrs; obj_attribute *out_attr, *out_attrs; - bfd_boolean ret = TRUE; - bfd_boolean warn_only; + bool ret = true; + bool warn_only; /* We only warn about shared library mismatches, because common libraries advertise support for a particular long double variant @@ -3665,16 +3665,16 @@ _bfd_elf_ppc_merge_fp_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge object attributes from IBFD into OBFD. Warn if there are conflicting attributes. */ -static bfd_boolean +static bool ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd; obj_attribute *in_attr, *in_attrs; obj_attribute *out_attr, *out_attrs; - bfd_boolean ret; + bool ret; if (!_bfd_elf_ppc_merge_fp_attributes (ibfd, info)) - return FALSE; + return false; obfd = info->output_bfd; in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU]; @@ -3684,7 +3684,7 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) merge non-conflicting ones. */ in_attr = &in_attrs[Tag_GNU_Power_ABI_Vector]; out_attr = &out_attrs[Tag_GNU_Power_ABI_Vector]; - ret = TRUE; + ret = true; if (in_attr->i != out_attr->i) { int in_vec = in_attr->i & 3; @@ -3719,7 +3719,7 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) (_("%pB uses AltiVec vector ABI, %pB uses SPE vector ABI"), last_vec, ibfd); out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; - ret = FALSE; + ret = false; } else if (out_vec > in_vec) { @@ -3728,7 +3728,7 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) (_("%pB uses AltiVec vector ABI, %pB uses SPE vector ABI"), ibfd, last_vec); out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; - ret = FALSE; + ret = false; } } @@ -3757,7 +3757,7 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) (_("%pB uses r3/r4 for small structure returns, " "%pB uses memory"), last_struct, ibfd); out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; - ret = FALSE; + ret = false; } else if (out_struct > in_struct) { @@ -3766,13 +3766,13 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) (_("%pB uses r3/r4 for small structure returns, " "%pB uses memory"), ibfd, last_struct); out_attr->type = ATTR_TYPE_FLAG_INT_VAL | ATTR_TYPE_FLAG_ERROR; - ret = FALSE; + ret = false; } } if (!ret) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Merge Tag_compatibility attributes and any common GNU ones. */ @@ -3782,33 +3782,33 @@ ppc_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword old_flags; flagword new_flags; - bfd_boolean error; + bool error; if (!is_ppc_elf (ibfd) || !is_ppc_elf (obfd)) - return TRUE; + return true; /* Check if we have the same endianness. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (!ppc_elf_merge_obj_attributes (ibfd, info)) - return FALSE; + return false; if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; if (!elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } @@ -3821,11 +3821,11 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { /* Warn about -mrelocatable mismatch. Allow -mrelocatable-lib to be linked with either. */ - error = FALSE; + error = false; if ((new_flags & EF_PPC_RELOCATABLE) != 0 && (old_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0) { - error = TRUE; + error = true; _bfd_error_handler (_("%pB: compiled with -mrelocatable and linked with " "modules compiled normally"), ibfd); @@ -3833,7 +3833,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0 && (old_flags & EF_PPC_RELOCATABLE) != 0) { - error = TRUE; + error = true; _bfd_error_handler (_("%pB: compiled normally and linked with " "modules compiled with -mrelocatable"), ibfd); @@ -3860,7 +3860,7 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Warn about any other mismatches. */ if (new_flags != old_flags) { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: uses different e_flags (%#x) fields " @@ -3871,11 +3871,11 @@ ppc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (error) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } - return TRUE; + return true; } static void @@ -3885,7 +3885,7 @@ ppc_elf_vle_split16 (bfd *input_bfd, bfd_byte *loc, bfd_vma value, split16_format_type split16_format, - bfd_boolean fixup) + bool fixup) { unsigned int insn, opcode; @@ -3984,7 +3984,7 @@ ppc_elf_select_plt_layout (bfd *output_bfd ATTRIBUTE_UNUSED, else if (bfd_link_pic (info) && htab->elf.dynamic_sections_created && (h = elf_link_hash_lookup (&htab->elf, "_mcount", - FALSE, FALSE, TRUE)) != NULL + false, false, true)) != NULL && (h->type == STT_FUNC || h->needs_plt) && h->ref_regular @@ -4079,7 +4079,7 @@ ppc_elf_gc_mark_hook (asection *sec, return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); } -static bfd_boolean +static bool get_sym_h (struct elf_link_hash_entry **hp, Elf_Internal_Sym **symp, asection **symsecp, @@ -4131,7 +4131,7 @@ get_sym_h (struct elf_link_hash_entry **hp, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (locsyms == NULL) - return FALSE; + return false; *locsymsp = locsyms; } sym = locsyms + r_symndx; @@ -4163,13 +4163,13 @@ get_sym_h (struct elf_link_hash_entry **hp, *tls_maskp = tls_mask; } } - return TRUE; + return true; } /* Analyze inline PLT call relocations to see whether calls to locally defined functions can be converted to direct calls. */ -bfd_boolean +bool ppc_elf_inline_plt (struct bfd_link_info *info) { struct ppc_elf_link_hash_table *htab; @@ -4179,7 +4179,7 @@ ppc_elf_inline_plt (struct bfd_link_info *info) htab = ppc_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* A bl insn can reach -0x2000000 to 0x1fffffc. The limit is reduced somewhat to cater for possible stubs that might be added @@ -4202,7 +4202,7 @@ ppc_elf_inline_plt (struct bfd_link_info *info) if (high_vma - low_vma < limit) { htab->can_convert_all_inline_plt = 1; - return TRUE; + return true; } /* Otherwise, go looking through relocs for cases where a direct @@ -4239,7 +4239,7 @@ ppc_elf_inline_plt (struct bfd_link_info *info) relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, info->keep_memory); if (relstart == NULL) - return FALSE; + return false; relend = relstart + sec->reloc_count; for (rel = relstart; rel < relend; ) @@ -4263,7 +4263,7 @@ ppc_elf_inline_plt (struct bfd_link_info *info) free (relstart); if (symtab_hdr->contents != (unsigned char *) local_syms) free (local_syms); - return FALSE; + return false; } if (sym_sec != NULL && sym_sec->output_section != NULL) @@ -4297,7 +4297,7 @@ ppc_elf_inline_plt (struct bfd_link_info *info) } } - return TRUE; + return true; } /* Set plt output section type, htab->tls_get_addr, and call the @@ -4310,15 +4310,15 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) htab = ppc_elf_hash_table (info); htab->tls_get_addr = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", - FALSE, FALSE, TRUE); + false, false, true); if (htab->plt_type != PLT_NEW) - htab->params->no_tls_get_addr_opt = TRUE; + htab->params->no_tls_get_addr_opt = true; if (!htab->params->no_tls_get_addr_opt) { struct elf_link_hash_entry *opt, *tga; opt = elf_link_hash_lookup (&htab->elf, "__tls_get_addr_opt", - FALSE, FALSE, TRUE); + false, false, true); if (opt != NULL && (opt->root.type == bfd_link_hash_defined || opt->root.type == bfd_link_hash_defweak)) @@ -4352,14 +4352,14 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, opt->dynstr_index); if (!bfd_elf_link_record_dynamic_symbol (info, opt)) - return FALSE; + return false; } htab->tls_get_addr = opt; } } } else - htab->params->no_tls_get_addr_opt = TRUE; + htab->params->no_tls_get_addr_opt = true; } if (htab->plt_type == PLT_NEW && htab->elf.splt != NULL @@ -4375,7 +4375,7 @@ ppc_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) /* Return TRUE iff REL is a branch reloc with a global symbol matching HASH. */ -static bfd_boolean +static bool branch_reloc_hash_match (const bfd *ibfd, const Elf_Internal_Rela *rel, const struct elf_link_hash_entry *hash) @@ -4394,15 +4394,15 @@ branch_reloc_hash_match (const bfd *ibfd, || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; if (h == hash) - return TRUE; + return true; } - return FALSE; + return false; } /* Run through all the TLS relocs looking for optimization opportunities. */ -bfd_boolean +bool ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -4412,11 +4412,11 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, int pass; if (!bfd_link_executable (info)) - return TRUE; + return true; htab = ppc_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; htab->do_tls_opt = 1; @@ -4442,7 +4442,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, info->keep_memory); if (relstart == NULL) - return FALSE; + return false; relend = relstart + sec->reloc_count; for (rel = relstart; rel < relend; rel++) @@ -4452,7 +4452,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h = NULL; unsigned char *tls_mask; unsigned char tls_set, tls_clear; - bfd_boolean is_local; + bool is_local; bfd_signed_vma *got_count; r_symndx = ELF32_R_SYM (rel->r_info); @@ -4487,7 +4487,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, ibfd, sec, rel->r_offset); if (elf_section_data (sec)->relocs != relstart) free (relstart); - return TRUE; + return true; } expecting_tls_get_addr = 0; @@ -4596,7 +4596,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, { if (elf_section_data (sec)->relocs != relstart) free (relstart); - return FALSE; + return false; } insn = bfd_get_32 (ibfd, buf); /* addis rt,2,imm */ @@ -4640,7 +4640,7 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, ibfd, sec, rel->r_offset); if (elf_section_data (sec)->relocs != relstart) free (relstart); - return TRUE; + return true; } if (h != NULL) @@ -4710,38 +4710,38 @@ ppc_elf_tls_optimize (bfd *obfd ATTRIBUTE_UNUSED, free (relstart); } } - return TRUE; + return true; } /* Return true if we have dynamic relocs against H or any of its weak aliases, that apply to read-only sections. Cannot be used after size_dynamic_sections. */ -static bfd_boolean +static bool alias_readonly_dynrelocs (struct elf_link_hash_entry *h) { struct ppc_elf_link_hash_entry *eh = ppc_elf_hash_entry (h); do { if (_bfd_elf_readonly_dynrelocs (&eh->elf)) - return TRUE; + return true; eh = ppc_elf_hash_entry (eh->elf.u.alias); } while (eh != NULL && &eh->elf != h); - return FALSE; + return false; } /* Return whether H has pc-relative dynamic relocs. */ -static bfd_boolean +static bool pc_dynrelocs (struct elf_link_hash_entry *h) { struct elf_dyn_relocs *p; for (p = h->dyn_relocs; p != NULL; p = p->next) if (p->pc_count != 0) - return TRUE; - return FALSE; + return true; + return false; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -4750,7 +4750,7 @@ pc_dynrelocs (struct elf_link_hash_entry *h) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -4777,7 +4777,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, || h->type == STT_GNU_IFUNC || h->needs_plt) { - bfd_boolean local = (SYMBOL_CALLS_LOCAL (info, h) + bool local = (SYMBOL_CALLS_LOCAL (info, h) || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)); /* Discard dyn_relocs when non-pic if we've decided that a function symbol is local. */ @@ -4843,7 +4843,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, } h->protected_def = 0; /* Function symbols can't have copy relocs. */ - return TRUE; + return true; } else h->plt.plist = NULL; @@ -4861,7 +4861,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, || def->root.u.def.section == htab->elf.sdynrelro || def->root.u.def.section == htab->dynsbss) h->dyn_relocs = NULL; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -4874,7 +4874,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (bfd_link_pic (info)) { h->protected_def = 0; - return TRUE; + return true; } /* If there are no references to this symbol that do not use the @@ -4882,7 +4882,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!h->non_got_ref) { h->protected_def = 0; - return TRUE; + return true; } /* Protected variables do not work with .dynbss. The copy in @@ -4897,12 +4897,12 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, && htab->params->pic_fixup == 0 && info->disable_target_specific_optimizations <= 1) htab->params->pic_fixup = 1; - return TRUE; + return true; } /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) - return TRUE; + return true; /* If we don't find any dynamic relocs in read-only sections, then we'll be keeping the dynamic relocs and avoiding the copy reloc. @@ -4915,7 +4915,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, && htab->elf.target_os != is_vxworks && !h->def_regular && !alias_readonly_dynrelocs (h)) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -4966,7 +4966,7 @@ ppc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, is xxxxxxxx.plt_pic32., and for -fPIC xxxxxxxx.got2.plt_pic32.. */ -static bfd_boolean +static bool add_stub_sym (struct plt_entry *ent, struct elf_link_hash_entry *h, struct bfd_link_info *info) @@ -4989,15 +4989,15 @@ add_stub_sym (struct plt_entry *ent, len3 = strlen (ent->sec->name); name = bfd_malloc (len1 + len2 + len3 + 9); if (name == NULL) - return FALSE; + return false; sprintf (name, "%08x", (unsigned) ent->addend & 0xffffffff); if (ent->sec) memcpy (name + 8, ent->sec->name, len3); memcpy (name + 8 + len3, stub, len2); memcpy (name + 8 + len3 + len2, h->root.root.string, len1 + 1); - sh = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE); + sh = elf_link_hash_lookup (&htab->elf, name, true, false, false); if (sh == NULL) - return FALSE; + return false; if (sh->root.type == bfd_link_hash_new) { sh->root.type = bfd_link_hash_defined; @@ -5010,7 +5010,7 @@ add_stub_sym (struct plt_entry *ent, sh->non_elf = 0; sh->root.linker_def = 1; } - return TRUE; + return true; } /* Allocate NEED contiguous space in .got, and return the offset. @@ -5074,7 +5074,7 @@ got_entries_needed (int tls_mask) /* If H is undefined, make it dynamic if that makes sense. */ -static bfd_boolean +static bool ensure_undef_dynamic (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -5088,14 +5088,14 @@ ensure_undef_dynamic (struct bfd_link_info *info, && !h->forced_local && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) return bfd_elf_link_record_dynamic_symbol (info, h); - return TRUE; + return true; } /* Choose whether to use htab->iplt or htab->pltlocal rather than the usual htab->elf.splt section for a PLT entry. */ static inline -bfd_boolean use_local_plt (struct bfd_link_info *info, +bool use_local_plt (struct bfd_link_info *info, struct elf_link_hash_entry *h) { return (h == NULL @@ -5105,7 +5105,7 @@ bfd_boolean use_local_plt (struct bfd_link_info *info, /* Allocate space in associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info = inf; @@ -5114,7 +5114,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; htab = ppc_elf_hash_table (info); eh = (struct ppc_elf_link_hash_entry *) h; @@ -5130,7 +5130,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* Make sure this symbol is output as a dynamic symbol. */ if (!ensure_undef_dynamic (info, &eh->elf)) - return FALSE; + return false; need = 0; if ((eh->tls_mask & (TLS_TLS | TLS_LD)) == (TLS_TLS | TLS_LD)) @@ -5237,7 +5237,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { /* Make sure this symbol is output as a dynamic symbol. */ if (!ensure_undef_dynamic (info, h)) - return FALSE; + return false; } } else if (ELIMINATE_COPY_RELOCS) @@ -5255,7 +5255,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { /* Make sure this symbol is output as a dynamic symbol. */ if (!ensure_undef_dynamic (info, h)) - return FALSE; + return false; if (h->dynindx == -1) h->dyn_relocs = NULL; @@ -5290,14 +5290,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) & (TLS_TLS | PLT_KEEP)) == PLT_KEEP)) { struct plt_entry *ent; - bfd_boolean doneone = FALSE; + bool doneone = false; bfd_vma plt_offset = 0, glink_offset = (bfd_vma) -1; for (ent = h->plt.plist; ent != NULL; ent = ent->next) if (ent->plt.refcount > 0) { asection *s = htab->elf.splt; - bfd_boolean dyn = !use_local_plt (info, h); + bool dyn = !use_local_plt (info, h); if (!dyn) { @@ -5338,7 +5338,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (htab->params->emit_stub_syms && !add_stub_sym (ent, h, info)) - return FALSE; + return false; } } else @@ -5432,7 +5432,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) htab->elf.sgotplt->size += 4; } } - doneone = TRUE; + doneone = true; } } else @@ -5450,7 +5450,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->needs_plt = 0; } - return TRUE; + return true; } static const unsigned char glink_eh_frame_cie[] = @@ -5469,13 +5469,13 @@ static const unsigned char glink_eh_frame_cie[] = /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool ppc_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct ppc_elf_link_hash_table *htab; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; #ifdef DEBUG @@ -5607,7 +5607,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, for (; local_plt < end_local_plt; ++local_plt, ++lgot_masks) { struct plt_entry *ent; - bfd_boolean doneone = FALSE; + bool doneone = false; bfd_vma plt_offset = 0, glink_offset = (bfd_vma) -1; for (ent = *local_plt; ent != NULL; ent = ent->next) @@ -5651,7 +5651,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, s = htab->relpltlocal; s->size += sizeof (Elf32_External_Rela); } - doneone = TRUE; + doneone = true; } } else @@ -5724,9 +5724,9 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, { struct elf_link_hash_entry *sh; sh = elf_link_hash_lookup (&htab->elf, "__glink", - TRUE, FALSE, FALSE); + true, false, false); if (sh == NULL) - return FALSE; + return false; if (sh->root.type == bfd_link_hash_new) { sh->root.type = bfd_link_hash_defined; @@ -5740,9 +5740,9 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, sh->root.linker_def = 1; } sh = elf_link_hash_lookup (&htab->elf, "__glink_PLTresolve", - TRUE, FALSE, FALSE); + true, false, false); if (sh == NULL) - return FALSE; + return false; if (sh->root.type == bfd_link_hash_new) { sh->root.type = bfd_link_hash_defined; @@ -5776,10 +5776,10 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, /* We've now determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = htab->elf.dynobj->sections; s != NULL; s = s->next) { - bfd_boolean strip_section = TRUE; + bool strip_section = true; if ((s->flags & SEC_LINKER_CREATED) == 0) continue; @@ -5791,7 +5791,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, we've exported dynamic symbols from them we must leave them. It's too late to tell BFD to get rid of the symbols. */ if (htab->elf.hplt != NULL) - strip_section = FALSE; + strip_section = false; /* Strip this section if we don't need it; see the comment below. */ } @@ -5817,7 +5817,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, if (s->size != 0) { /* Remember whether there are any relocation sections. */ - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -5851,7 +5851,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, /* Allocate memory for the section contents. */ s->contents = bfd_zalloc (htab->elf.dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } if (htab->elf.dynamic_sections_created) @@ -5866,19 +5866,19 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, if (!_bfd_elf_maybe_vxworks_add_dynamic_tags (output_bfd, info, relocs)) - return FALSE; + return false; if (htab->plt_type == PLT_NEW && htab->glink != NULL && htab->glink->size != 0) { if (!add_dynamic_entry (DT_PPC_GOT, 0)) - return FALSE; + return false; if (!htab->params->no_tls_get_addr_opt && htab->tls_get_addr != NULL && htab->tls_get_addr->plt.plist != NULL && !add_dynamic_entry (DT_PPC_OPT, PPC_OPT_TLS)) - return FALSE; + return false; } } #undef add_dynamic_entry @@ -5943,7 +5943,7 @@ ppc_elf_size_dynamic_sections (bfd *output_bfd, == htab->glink_eh_frame->size); } - return TRUE; + return true; } /* Arrange to have _SDA_BASE_ or _SDA2_BASE_ stripped from the output @@ -5988,14 +5988,14 @@ ppc_elf_maybe_strip_sdata_syms (struct bfd_link_info *info) /* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */ -static bfd_boolean +static bool ppc_elf_hash_symbol (struct elf_link_hash_entry *h) { if (h->plt.plist != NULL && !h->def_regular && (!h->pointer_equality_needed || !h->ref_regular_nonweak)) - return FALSE; + return false; return _bfd_elf_hash_symbol (h); } @@ -6035,11 +6035,11 @@ struct ppc_elf_relax_info space for the workaround has its size extended so that we can add trampolines at the end of the section. */ -static bfd_boolean +static bool ppc_elf_relax_section (bfd *abfd, asection *isec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { struct one_branch_fixup { @@ -6059,30 +6059,30 @@ ppc_elf_relax_section (bfd *abfd, struct one_branch_fixup *branch_fixups = NULL; struct ppc_elf_relax_info *relax_info = NULL; unsigned changes = 0; - bfd_boolean workaround_change; + bool workaround_change; struct ppc_elf_link_hash_table *htab; bfd_size_type trampbase, trampoff, newsize, picfixup_size; asection *got2; - bfd_boolean maybe_pasted; + bool maybe_pasted; - *again = FALSE; + *again = false; /* No need to do anything with non-alloc or non-code sections. */ if ((isec->flags & SEC_ALLOC) == 0 || (isec->flags & SEC_CODE) == 0 || (isec->flags & SEC_LINKER_CREATED) != 0 || isec->size < 4) - return TRUE; + return true; /* We cannot represent the required PIC relocs in the output, so don't do anything. The linker doesn't support mixing -shared and -r anyway. */ if (bfd_link_relocatable (link_info) && bfd_link_pic (link_info)) - return TRUE; + return true; htab = ppc_elf_hash_table (link_info); if (htab == NULL) - return TRUE; + return true; isec->size = (isec->size + 3) & -4; if (isec->rawsize == 0) @@ -6101,7 +6101,7 @@ ppc_elf_relax_section (bfd *abfd, elf_section_data (isec)->sec_info = bfd_zalloc (abfd, sizeof (struct ppc_elf_relax_info)); if (elf_section_data (isec)->sec_info == NULL) - return FALSE; + return false; } relax_info = elf_section_data (isec)->sec_info; trampbase -= relax_info->workaround_size; @@ -6519,7 +6519,7 @@ ppc_elf_relax_section (bfd *abfd, } } - workaround_change = FALSE; + workaround_change = false; newsize = trampoff; if (htab->params->ppc476_workaround && (!bfd_link_relocatable (link_info) @@ -6543,7 +6543,7 @@ ppc_elf_relax_section (bfd *abfd, if (relax_info->workaround_size < newsize) { relax_info->workaround_size = newsize; - workaround_change = TRUE; + workaround_change = true; } /* Ensure relocate_section is called. */ isec->flags |= SEC_RELOC; @@ -6617,7 +6617,7 @@ ppc_elf_relax_section (bfd *abfd, free (internal_relocs); *again = changes != 0 || workaround_change; - return TRUE; + return true; error_return: while (branch_fixups != NULL) @@ -6632,7 +6632,7 @@ ppc_elf_relax_section (bfd *abfd, free (contents); if (elf_section_data (isec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* What to do when ld finds relocations against symbols defined in @@ -6793,7 +6793,7 @@ write_glink_stub (struct elf_link_hash_entry *h, struct plt_entry *ent, /* Return true if symbol is defined statically. */ -static bfd_boolean +static bool is_static_defined (struct elf_link_hash_entry *h) { return ((h->root.type == bfd_link_hash_defined @@ -6887,7 +6887,7 @@ _bfd_elf_ppc_at_tprel_transform (unsigned int insn, unsigned int reg) return insn; } -static bfd_boolean +static bool is_insn_ds_form (unsigned int insn) { return ((insn & (0x3fu << 26)) == 58u << 26 /* ld,ldu,lwa */ @@ -6896,7 +6896,7 @@ is_insn_ds_form (unsigned int insn) || (insn & (0x3fu << 26)) == 61u << 26 /* stfdp */); } -static bfd_boolean +static bool is_insn_dq_form (unsigned int insn) { return ((insn & (0x3fu << 26)) == 56u << 26 /* lq */ @@ -6952,9 +6952,9 @@ ppc_elf_relocate_section (bfd *output_bfd, Elf_Internal_Rela outrel; asection *got2; bfd_vma *local_got_offsets; - bfd_boolean ret = TRUE; + bool ret = true; bfd_vma d_offset = (bfd_big_endian (input_bfd) ? 2 : 0); - bfd_boolean is_vxworks_tls; + bool is_vxworks_tls; unsigned int picfixup_size = 0; struct ppc_elf_relax_info *relax_info = NULL; @@ -6969,7 +6969,7 @@ ppc_elf_relocate_section (bfd *output_bfd, if (!is_ppc_elf (input_bfd)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } got2 = bfd_get_section_by_name (input_bfd, ".got2"); @@ -7004,8 +7004,8 @@ ppc_elf_relocate_section (bfd *output_bfd, unsigned long r_symndx; bfd_vma relocation; bfd_vma branch_bit, from; - bfd_boolean unresolved_reloc, save_unresolved_reloc; - bfd_boolean warned; + bool unresolved_reloc, save_unresolved_reloc; + bool warned; unsigned int tls_type, tls_mask, tls_gd; struct plt_entry **ifunc, **plt_list; struct reloc_howto_struct alt_howto; @@ -7015,8 +7015,8 @@ ppc_elf_relocate_section (bfd *output_bfd, sym = NULL; sec = NULL; h = NULL; - unresolved_reloc = FALSE; - warned = FALSE; + unresolved_reloc = false; + warned = false; r_symndx = ELF32_R_SYM (rel->r_info); if (r_symndx < symtab_hdr->sh_info) @@ -7029,7 +7029,7 @@ ppc_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean ignored; + bool ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -7502,7 +7502,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { /* Arrange to apply the reloc addend, if any. */ relocation = 0; - unresolved_reloc = FALSE; + unresolved_reloc = false; rel->r_info = ELF32_R_INFO (0, r_type); } else @@ -7576,7 +7576,7 @@ ppc_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, sym_name); } - unresolved_reloc = FALSE; + unresolved_reloc = false; if (htab->plt_type == PLT_NEW || !htab->elf.dynamic_sections_created || h == NULL @@ -7606,7 +7606,7 @@ ppc_elf_relocate_section (bfd *output_bfd, input_bfd, howto->name); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; goto copy_reloc; case R_PPC_NONE: @@ -7684,7 +7684,7 @@ ppc_elf_relocate_section (bfd *output_bfd, else { indx = h->dynindx; - unresolved_reloc = FALSE; + unresolved_reloc = false; } offp = &h->got.offset; } @@ -7905,7 +7905,7 @@ ppc_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, - TRUE); + true); goto copy_reloc; } if (h != NULL && h->type == STT_GNU_IFUNC && bfd_link_pic (info)) @@ -8071,7 +8071,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { indx = h->dynindx; BFD_ASSERT (indx != -1); - unresolved_reloc = FALSE; + unresolved_reloc = false; outrel.r_info = ELF32_R_INFO (indx, r_type); outrel.r_addend = rel->r_addend; } @@ -8102,14 +8102,14 @@ ppc_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, howto->name, sym_name); - ret = FALSE; + ret = false; } else if (r_symndx == STN_UNDEF || bfd_is_abs_section (sec)) ; else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; } else { @@ -8163,7 +8163,7 @@ ppc_elf_relocate_section (bfd *output_bfd, htab->maybe_local_ifunc_resolver = 1; } if (sreloc == NULL) - return FALSE; + return false; loc = sreloc->contents; loc += sreloc->reloc_count++ * sizeof (Elf32_External_Rela); @@ -8276,7 +8276,7 @@ ppc_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (htab->sdata[0].section != NULL); if (!is_static_defined (htab->sdata[0].sym)) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } relocation @@ -8290,7 +8290,7 @@ ppc_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (htab->sdata[1].section != NULL); if (!is_static_defined (htab->sdata[1].sym)) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } relocation @@ -8306,7 +8306,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_TOC16: /* phony GOT16 relocations */ if (sec == NULL || sec->output_section == NULL) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } BFD_ASSERT (strcmp (bfd_section_name (sec), ".got") == 0 @@ -8333,7 +8333,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { /* Relocation is to the entry for this symbol in the procedure linkage table. */ - unresolved_reloc = FALSE; + unresolved_reloc = false; if (htab->plt_type == PLT_NEW) relocation = (htab->glink->output_section->vma + htab->glink->output_offset @@ -8368,7 +8368,7 @@ ppc_elf_relocate_section (bfd *output_bfd, + symtab_hdr->sh_info); plt_list = local_plt + r_symndx; } - unresolved_reloc = TRUE; + unresolved_reloc = true; if (plt_list != NULL) { struct plt_entry *ent; @@ -8379,7 +8379,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { asection *plt; - unresolved_reloc = FALSE; + unresolved_reloc = false; plt = htab->elf.splt; if (use_local_plt (info, h)) { @@ -8418,7 +8418,7 @@ ppc_elf_relocate_section (bfd *output_bfd, || sec->output_section == NULL || !is_static_defined (sda)) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } addend -= SYM_VAL (sda); @@ -8449,7 +8449,7 @@ ppc_elf_relocate_section (bfd *output_bfd, || sec->output_section == NULL || !is_static_defined (sda)) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } addend -= SYM_VAL (sda); @@ -8525,7 +8525,7 @@ ppc_elf_relocate_section (bfd *output_bfd, if (sec == NULL || sec->output_section == NULL) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } @@ -8559,7 +8559,7 @@ ppc_elf_relocate_section (bfd *output_bfd, name); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; goto copy_reloc; } @@ -8567,7 +8567,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { if (!is_static_defined (sda)) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } addend -= SYM_VAL (sda); @@ -8632,7 +8632,7 @@ ppc_elf_relocate_section (bfd *output_bfd, if (sec == NULL || sec->output_section == NULL) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } @@ -8655,13 +8655,13 @@ ppc_elf_relocate_section (bfd *output_bfd, name); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; goto copy_reloc; } if (sda == NULL || !is_static_defined (sda)) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } value = relocation + addend - SYM_VAL (sda); @@ -8722,7 +8722,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_SECTOFF_HA: if (sec == NULL || sec->output_section == NULL) { - unresolved_reloc = TRUE; + unresolved_reloc = true; break; } addend -= sec->output_section->vma; @@ -8755,7 +8755,7 @@ ppc_elf_relocate_section (bfd *output_bfd, input_bfd, howto->name); bfd_set_error (bfd_error_invalid_operation); - ret = FALSE; + ret = false; goto copy_reloc; } @@ -8814,7 +8814,7 @@ ppc_elf_relocate_section (bfd *output_bfd, { bfd_byte *p = contents + (rel->r_offset & ~3); bfd_put_32 (input_bfd, NOP, p); - unresolved_reloc = FALSE; + unresolved_reloc = false; r_type = R_PPC_NONE; howto = ppc_elf_howto_table[r_type]; } @@ -8905,7 +8905,7 @@ ppc_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, howto->name, sym_name, mask + 1); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; } } break; @@ -8934,7 +8934,7 @@ ppc_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, howto->name, sym_name); - ret = FALSE; + ret = false; } /* 16-bit fields in insns mostly have signed values, but a @@ -9014,7 +9014,7 @@ ppc_elf_relocate_section (bfd *output_bfd, (_("%H: %s reloc against `%s': error %d\n"), input_bfd, input_section, rel->r_offset, howto->name, sym_name, (int) r); - ret = FALSE; + ret = false; } } copy_reloc: @@ -9099,13 +9099,13 @@ ppc_elf_relocate_section (bfd *output_bfd, { bfd_vma offset = addr - start_addr; Elf_Internal_Rela *lo, *hi; - bfd_boolean is_data; + bool is_data; bfd_vma patch_off, patch_addr; unsigned int insn; /* Do we have a data reloc at this offset? If so, leave the word alone. */ - is_data = FALSE; + is_data = false; lo = relocs; hi = relend; rel = NULL; @@ -9124,7 +9124,7 @@ ppc_elf_relocate_section (bfd *output_bfd, case R_PPC_UADDR32: case R_PPC_REL32: case R_PPC_ADDR30: - is_data = TRUE; + is_data = true; break; default: break; @@ -9345,19 +9345,19 @@ ppc_elf_relocate_section (bfd *output_bfd, /* Write out the PLT relocs and entries for H. */ -static bfd_boolean +static bool write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info = (struct bfd_link_info *) inf; struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info); struct plt_entry *ent; - bfd_boolean doneone; + bool doneone; - doneone = FALSE; + doneone = false; for (ent = h->plt.plist; ent != NULL; ent = ent->next) if (ent->plt.offset != (bfd_vma) -1) { - bfd_boolean dyn = !use_local_plt (info, h); + bool dyn = !use_local_plt (info, h); if (!doneone) { @@ -9571,7 +9571,7 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) } bfd_elf32_swap_reloca_out (info->output_bfd, &rela, loc); } - doneone = TRUE; + doneone = true; } if (htab->plt_type == PLT_NEW || !dyn) @@ -9597,19 +9597,19 @@ write_global_sym_plt (struct elf_link_hash_entry *h, void *inf) else break; } - return TRUE; + return true; } /* Finish up PLT handling. */ -bfd_boolean +bool ppc_finish_symbols (struct bfd_link_info *info) { struct ppc_elf_link_hash_table *htab = ppc_elf_hash_table (info); bfd *ibfd; if (!htab) - return TRUE; + return true; elf_link_hash_traverse (&htab->elf, write_global_sym_plt, info); @@ -9652,7 +9652,7 @@ ppc_finish_symbols (struct bfd_link_info *info) { if (symtab_hdr->contents != (unsigned char *) local_syms) free (local_syms); - return FALSE; + return false; } val = sym->st_value; @@ -9704,13 +9704,13 @@ ppc_finish_symbols (struct bfd_link_info *info) symtab_hdr->contents = (unsigned char *) local_syms; } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool ppc_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -9801,7 +9801,7 @@ ppc_elf_finish_dynamic_symbol (bfd *output_bfd, fprintf (stderr, "\n"); #endif - return TRUE; + return true; } static enum elf_reloc_type_class @@ -9829,7 +9829,7 @@ ppc_elf_reloc_type_class (const struct bfd_link_info *info, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool ppc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -9837,7 +9837,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, struct ppc_elf_link_hash_table *htab; bfd_vma got; bfd *dynobj; - bfd_boolean ret = TRUE; + bool ret = true; #ifdef DEBUG fprintf (stderr, "ppc_elf_finish_dynamic_sections called\n"); @@ -9946,7 +9946,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, (htab->elf.sgotplt != NULL ? htab->elf.sgotplt : htab->elf.sgot)); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; } elf_section_data (htab->elf.sgot->output_section)->this_hdr.sh_entsize = 4; @@ -10258,7 +10258,7 @@ ppc_elf_finish_dynamic_sections (bfd *output_bfd, && !_bfd_elf_write_section_eh_frame (output_bfd, info, htab->glink_eh_frame, htab->glink_eh_frame->contents)) - return FALSE; + return false; } return ret; @@ -10399,7 +10399,7 @@ ppc_elf_vxworks_link_hash_table_create (bfd *abfd) } /* Tweak magic VxWorks symbols as they are loaded. */ -static bfd_boolean +static bool ppc_elf_vxworks_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -10410,12 +10410,12 @@ ppc_elf_vxworks_add_symbol_hook (bfd *abfd, { if (!elf_vxworks_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)) - return FALSE; + return false; return ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp); } -static bfd_boolean +static bool ppc_elf_vxworks_final_write_processing (bfd *abfd) { ppc_final_write_processing (abfd); diff --git a/bfd/elf32-ppc.h b/bfd/elf32-ppc.h index 8f81ef9600..5e2ce2ac3e 100644 --- a/bfd/elf32-ppc.h +++ b/bfd/elf32-ppc.h @@ -60,10 +60,10 @@ struct ppc_elf_params void ppc_elf_link_params (struct bfd_link_info *, struct ppc_elf_params *); int ppc_elf_select_plt_layout (bfd *, struct bfd_link_info *); -bfd_boolean ppc_elf_inline_plt (struct bfd_link_info *); +bool ppc_elf_inline_plt (struct bfd_link_info *); asection *ppc_elf_tls_setup (bfd *, struct bfd_link_info *); -bfd_boolean ppc_elf_tls_optimize (bfd *, struct bfd_link_info *); +bool ppc_elf_tls_optimize (bfd *, struct bfd_link_info *); void ppc_elf_maybe_strip_sdata_syms (struct bfd_link_info *); -extern bfd_boolean ppc_elf_modify_segment_map (bfd *, struct bfd_link_info *); -extern bfd_boolean ppc_elf_section_processing (bfd *, Elf_Internal_Shdr *); -extern bfd_boolean ppc_finish_symbols (struct bfd_link_info *); +extern bool ppc_elf_modify_segment_map (bfd *, struct bfd_link_info *); +extern bool ppc_elf_section_processing (bfd *, Elf_Internal_Shdr *); +extern bool ppc_finish_symbols (struct bfd_link_info *); diff --git a/bfd/elf32-pru.c b/bfd/elf32-pru.c index 34cadf1a2e..e3001d5755 100644 --- a/bfd/elf32-pru.c +++ b/bfd/elf32-pru.c @@ -43,7 +43,7 @@ } while (0) /* Enable debugging printout at stdout with this variable. */ -static bfd_boolean debug_relax = FALSE; +static bool debug_relax = false; /* Forward declarations. */ static bfd_reloc_status_type pru_elf32_pmem_relocate @@ -67,227 +67,227 @@ static reloc_howto_type elf_pru_howto_table_rel[] = { 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 3, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_PRU_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_PRU_16_PMEM, 2, 1, /* short */ 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_PRU_16_PMEM", - FALSE, + false, 0, /* src_mask */ 0xffff, - FALSE), + false), HOWTO (R_PRU_U16_PMEMIMM, 2, 2, 32, - FALSE, + false, 8, complain_overflow_unsigned, pru_elf32_pmem_relocate, "R_PRU_U16_PMEMIMM", - FALSE, + false, 0, /* src_mask */ 0x00ffff00, - FALSE), + false), HOWTO (R_PRU_BFD_RELOC_16, 0, 1, /* short */ 16, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PRU_BFD_RELOC16", - FALSE, + false, 0, /* src_mask */ 0x0000ffff, - FALSE), + false), /* 16-bit unsigned immediate relocation. */ HOWTO (R_PRU_U16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned, /* complain on overflow */ bfd_elf_generic_reloc, /* special function */ "R_PRU_U16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00ffff00, /* dest_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_PRU_32_PMEM, 2, 2, /* long */ 32, - FALSE, + false, 0, complain_overflow_dont, pru_elf32_pmem_relocate, "R_PRU_32_PMEM", - FALSE, + false, 0, /* src_mask */ 0xffffffff, - FALSE), + false), HOWTO (R_PRU_BFD_RELOC_32, 0, 2, /* long */ 32, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_PRU_BFD_RELOC32", - FALSE, + false, 0, /* src_mask */ 0xffffffff, - FALSE), + false), HOWTO (R_PRU_S10_PCREL, 2, 2, 10, - TRUE, + true, 0, complain_overflow_bitfield, pru_elf32_s10_pcrel_relocate, "R_PRU_S10_PCREL", - FALSE, + false, 0, /* src_mask */ 0x060000ff, - TRUE), + true), HOWTO (R_PRU_U8_PCREL, 2, 2, 8, - TRUE, + true, 0, complain_overflow_unsigned, pru_elf32_u8_pcrel_relocate, "R_PRU_U8_PCREL", - FALSE, + false, 0, /* src_mask */ 0x000000ff, - TRUE), + true), HOWTO (R_PRU_LDI32, 0, /* rightshift */ 4, /* size (4 = 8bytes) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain on overflow */ pru_elf32_ldi32_relocate, /* special function */ "R_PRU_LDI32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dest_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU-specific relocations. */ HOWTO (R_PRU_GNU_BFD_RELOC_8, 0, 0, /* byte */ 8, - FALSE, + false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_PRU_BFD_RELOC8", - FALSE, + false, 0, /* src_mask */ 0x000000ff, - FALSE), + false), HOWTO (R_PRU_GNU_DIFF8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_pru_diff_relocate, /* special_function */ "R_PRU_DIFF8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_PRU_GNU_DIFF16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_pru_diff_relocate,/* special_function */ "R_PRU_DIFF16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_PRU_GNU_DIFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_pru_diff_relocate,/* special_function */ "R_PRU_DIFF32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_PRU_GNU_DIFF16_PMEM, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_pru_diff_relocate,/* special_function */ "R_PRU_DIFF16_PMEM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_PRU_GNU_DIFF32_PMEM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_pru_diff_relocate,/* special_function */ "R_PRU_DIFF32_PMEM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Add other relocations here. */ }; @@ -299,14 +299,14 @@ static unsigned char elf_code_to_howto_index[R_PRU_ILLEGAL + 1]; static reloc_howto_type * lookup_howto (unsigned int rtype) { - static bfd_boolean initialized = FALSE; + static bool initialized = false; int i; int howto_tbl_size = (int) (sizeof (elf_pru_howto_table_rel) / sizeof (elf_pru_howto_table_rel[0])); if (! initialized) { - initialized = TRUE; + initialized = true; memset (elf_code_to_howto_index, 0xff, sizeof (elf_code_to_howto_index)); for (i = 0; i < howto_tbl_size; i++) @@ -410,7 +410,7 @@ pru_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Implement elf_info_to_howto: Given a ELF32 relocation, fill in a arelent structure. */ -static bfd_boolean +static bool pru_elf32_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -422,7 +422,7 @@ pru_elf32_info_to_howto (bfd *abfd, arelent *cache_ptr, /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = lookup_howto (r_type); @@ -695,7 +695,7 @@ pru_elf32_relocate_section (bfd *output_bfd, struct elf_link_hash_entry **sym_hashes; Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; - bfd_boolean is_rel_reloc; + bool is_rel_reloc; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -719,7 +719,7 @@ pru_elf32_relocate_section (bfd *output_bfd, bfd_reloc_status_type r = bfd_reloc_ok; const char *name = NULL; const char* msg = (const char*) NULL; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_vma addend; /* If we are using a REL relocation then the addend should be empty. */ @@ -740,7 +740,7 @@ pru_elf32_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -923,7 +923,7 @@ pru_elf32_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) (info, name, input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -951,11 +951,11 @@ pru_elf32_relocate_section (bfd *output_bfd, { (*info->callbacks->warning) (info, msg, name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } } } - return TRUE; + return true; } @@ -977,7 +977,7 @@ bfd_elf_pru_diff_relocate (bfd *abfd ATTRIBUTE_UNUSED, /* Returns whether the relocation type passed is a diff reloc. */ -static bfd_boolean +static bool elf32_pru_is_diff_reloc (Elf_Internal_Rela *irel) { return (ELF32_R_TYPE (irel->r_info) == R_PRU_GNU_DIFF8 @@ -1116,7 +1116,7 @@ elf32_pru_adjust_diff_reloc_value (bfd *abfd, Idea copied from the AVR port. */ -static bfd_boolean +static bool pru_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, @@ -1200,7 +1200,7 @@ pru_elf_relax_delete_bytes (bfd *abfd, irel = elf_section_data (isec)->relocs; /* PR 12161: Read in the relocs for this section if necessary. */ if (irel == NULL) - irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, TRUE); + irel = _bfd_elf_link_read_relocs (abfd, isec, NULL, NULL, true); for (irelend = irel + isec->reloc_count; irel < irelend; @@ -1216,7 +1216,7 @@ pru_elf_relax_delete_bytes (bfd *abfd, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; } /* Get the value of the symbol referred to by the reloc. */ @@ -1332,13 +1332,13 @@ pru_elf_relax_delete_bytes (bfd *abfd, } } - return TRUE; + return true; } -static bfd_boolean -pru_elf32_relax_section (bfd * abfd, asection * sec, - struct bfd_link_info * link_info, - bfd_boolean * again) +static bool +pru_elf32_relax_section (bfd *abfd, asection *sec, + struct bfd_link_info *link_info, + bool *again) { Elf_Internal_Shdr * symtab_hdr; Elf_Internal_Rela * internal_relocs; @@ -1348,7 +1348,7 @@ pru_elf32_relax_section (bfd * abfd, asection * sec, Elf_Internal_Sym * isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -1356,7 +1356,7 @@ pru_elf32_relax_section (bfd * abfd, asection * sec, if (bfd_link_relocatable (link_info) || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; @@ -1495,7 +1495,7 @@ pru_elf32_relax_section (bfd * abfd, asection * sec, /* That will change things, so, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } } @@ -1526,7 +1526,7 @@ pru_elf32_relax_section (bfd * abfd, asection * sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -1536,7 +1536,7 @@ pru_elf32_relax_section (bfd * abfd, asection * sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Free the derived linker hash table. */ diff --git a/bfd/elf32-rl78.c b/bfd/elf32-rl78.c index 6bcfcbd081..163966f1d6 100644 --- a/bfd/elf32-rl78.c +++ b/bfd/elf32-rl78.c @@ -29,7 +29,7 @@ #define RL78REL(n,sz,bit,shift,complain,pcrel) \ HOWTO (R_RL78_##n, shift, sz, bit, pcrel, 0, complain_overflow_ ## complain, \ - bfd_elf_generic_reloc, "R_RL78_" #n, FALSE, 0, ~0, FALSE) + bfd_elf_generic_reloc, "R_RL78_" #n, false, 0, ~0, false) static bfd_reloc_status_type rl78_special_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); @@ -37,7 +37,7 @@ static bfd_reloc_status_type rl78_special_reloc (bfd *, arelent *, asymbol *, vo /* FIXME: We could omit the SHIFT parameter, it is always zero. */ #define RL78_OP_REL(n,sz,bit,shift,complain,pcrel) \ HOWTO (R_RL78_##n, shift, sz, bit, pcrel, 0, complain_overflow_ ## complain, \ - rl78_special_reloc, "R_RL78_" #n, FALSE, 0, ~0, FALSE) + rl78_special_reloc, "R_RL78_" #n, false, 0, ~0, false) /* Note that the relocations around 0x7f are internal to this file; feel free to move them as needed to avoid conflicts with published @@ -45,25 +45,25 @@ static bfd_reloc_status_type rl78_special_reloc (bfd *, arelent *, asymbol *, vo static reloc_howto_type rl78_elf_howto_table [] = { - RL78REL (NONE, 3, 0, 0, dont, FALSE), - RL78REL (DIR32, 2, 32, 0, signed, FALSE), - RL78REL (DIR24S, 2, 24, 0, signed, FALSE), - RL78REL (DIR16, 1, 16, 0, dont, FALSE), - RL78REL (DIR16U, 1, 16, 0, unsigned, FALSE), - RL78REL (DIR16S, 1, 16, 0, signed, FALSE), - RL78REL (DIR8, 0, 8, 0, dont, FALSE), - RL78REL (DIR8U, 0, 8, 0, unsigned, FALSE), - RL78REL (DIR8S, 0, 8, 0, signed, FALSE), - RL78REL (DIR24S_PCREL, 2, 24, 0, signed, TRUE), - RL78REL (DIR16S_PCREL, 1, 16, 0, signed, TRUE), - RL78REL (DIR8S_PCREL, 0, 8, 0, signed, TRUE), - RL78REL (DIR16UL, 1, 16, 2, unsigned, FALSE), - RL78REL (DIR16UW, 1, 16, 1, unsigned, FALSE), - RL78REL (DIR8UL, 0, 8, 2, unsigned, FALSE), - RL78REL (DIR8UW, 0, 8, 1, unsigned, FALSE), - RL78REL (DIR32_REV, 1, 16, 0, dont, FALSE), - RL78REL (DIR16_REV, 1, 16, 0, dont, FALSE), - RL78REL (DIR3U_PCREL, 0, 3, 0, dont, TRUE), + RL78REL (NONE, 3, 0, 0, dont, false), + RL78REL (DIR32, 2, 32, 0, signed, false), + RL78REL (DIR24S, 2, 24, 0, signed, false), + RL78REL (DIR16, 1, 16, 0, dont, false), + RL78REL (DIR16U, 1, 16, 0, unsigned, false), + RL78REL (DIR16S, 1, 16, 0, signed, false), + RL78REL (DIR8, 0, 8, 0, dont, false), + RL78REL (DIR8U, 0, 8, 0, unsigned, false), + RL78REL (DIR8S, 0, 8, 0, signed, false), + RL78REL (DIR24S_PCREL, 2, 24, 0, signed, true), + RL78REL (DIR16S_PCREL, 1, 16, 0, signed, true), + RL78REL (DIR8S_PCREL, 0, 8, 0, signed, true), + RL78REL (DIR16UL, 1, 16, 2, unsigned, false), + RL78REL (DIR16UW, 1, 16, 1, unsigned, false), + RL78REL (DIR8UL, 0, 8, 2, unsigned, false), + RL78REL (DIR8UW, 0, 8, 1, unsigned, false), + RL78REL (DIR32_REV, 1, 16, 0, dont, false), + RL78REL (DIR16_REV, 1, 16, 0, dont, false), + RL78REL (DIR3U_PCREL, 0, 3, 0, dont, true), EMPTY_HOWTO (0x13), EMPTY_HOWTO (0x14), @@ -92,10 +92,10 @@ static reloc_howto_type rl78_elf_howto_table [] = EMPTY_HOWTO (0x2a), EMPTY_HOWTO (0x2b), EMPTY_HOWTO (0x2c), - RL78REL (RH_RELAX, 0, 0, 0, dont, FALSE), + RL78REL (RH_RELAX, 0, 0, 0, dont, false), EMPTY_HOWTO (0x2e), - RL78REL (RH_SADDR, 0, 0, 0, dont, FALSE), + RL78REL (RH_SADDR, 0, 0, 0, dont, false), EMPTY_HOWTO (0x30), EMPTY_HOWTO (0x31), EMPTY_HOWTO (0x32), @@ -114,23 +114,23 @@ static reloc_howto_type rl78_elf_howto_table [] = EMPTY_HOWTO (0x3f), EMPTY_HOWTO (0x40), - RL78_OP_REL (ABS32, 2, 32, 0, dont, FALSE), - RL78_OP_REL (ABS24S, 2, 24, 0, signed, FALSE), - RL78_OP_REL (ABS16, 1, 16, 0, dont, FALSE), - RL78_OP_REL (ABS16U, 1, 16, 0, unsigned, FALSE), - RL78_OP_REL (ABS16S, 1, 16, 0, signed, FALSE), - RL78_OP_REL (ABS8, 0, 8, 0, dont, FALSE), - RL78_OP_REL (ABS8U, 0, 8, 0, unsigned, FALSE), - RL78_OP_REL (ABS8S, 0, 8, 0, signed, FALSE), - RL78_OP_REL (ABS24S_PCREL, 2, 24, 0, signed, TRUE), - RL78_OP_REL (ABS16S_PCREL, 1, 16, 0, signed, TRUE), - RL78_OP_REL (ABS8S_PCREL, 0, 8, 0, signed, TRUE), - RL78_OP_REL (ABS16UL, 1, 16, 0, unsigned, FALSE), - RL78_OP_REL (ABS16UW, 1, 16, 0, unsigned, FALSE), - RL78_OP_REL (ABS8UL, 0, 8, 0, unsigned, FALSE), - RL78_OP_REL (ABS8UW, 0, 8, 0, unsigned, FALSE), - RL78_OP_REL (ABS32_REV, 2, 32, 0, dont, FALSE), - RL78_OP_REL (ABS16_REV, 1, 16, 0, dont, FALSE), + RL78_OP_REL (ABS32, 2, 32, 0, dont, false), + RL78_OP_REL (ABS24S, 2, 24, 0, signed, false), + RL78_OP_REL (ABS16, 1, 16, 0, dont, false), + RL78_OP_REL (ABS16U, 1, 16, 0, unsigned, false), + RL78_OP_REL (ABS16S, 1, 16, 0, signed, false), + RL78_OP_REL (ABS8, 0, 8, 0, dont, false), + RL78_OP_REL (ABS8U, 0, 8, 0, unsigned, false), + RL78_OP_REL (ABS8S, 0, 8, 0, signed, false), + RL78_OP_REL (ABS24S_PCREL, 2, 24, 0, signed, true), + RL78_OP_REL (ABS16S_PCREL, 1, 16, 0, signed, true), + RL78_OP_REL (ABS8S_PCREL, 0, 8, 0, signed, true), + RL78_OP_REL (ABS16UL, 1, 16, 0, unsigned, false), + RL78_OP_REL (ABS16UW, 1, 16, 0, unsigned, false), + RL78_OP_REL (ABS8UL, 0, 8, 0, unsigned, false), + RL78_OP_REL (ABS8UW, 0, 8, 0, unsigned, false), + RL78_OP_REL (ABS32_REV, 2, 32, 0, dont, false), + RL78_OP_REL (ABS16_REV, 1, 16, 0, dont, false), #define STACK_REL_P(x) ((x) <= R_RL78_ABS16_REV && (x) >= R_RL78_ABS32) @@ -182,29 +182,29 @@ static reloc_howto_type rl78_elf_howto_table [] = EMPTY_HOWTO (0x7e), EMPTY_HOWTO (0x7f), - RL78_OP_REL (SYM, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPneg, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPadd, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPsub, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPmul, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPdiv, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPshla, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPshra, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPsctsize, 2, 32, 0, dont, FALSE), + RL78_OP_REL (SYM, 2, 32, 0, dont, false), + RL78_OP_REL (OPneg, 2, 32, 0, dont, false), + RL78_OP_REL (OPadd, 2, 32, 0, dont, false), + RL78_OP_REL (OPsub, 2, 32, 0, dont, false), + RL78_OP_REL (OPmul, 2, 32, 0, dont, false), + RL78_OP_REL (OPdiv, 2, 32, 0, dont, false), + RL78_OP_REL (OPshla, 2, 32, 0, dont, false), + RL78_OP_REL (OPshra, 2, 32, 0, dont, false), + RL78_OP_REL (OPsctsize, 2, 32, 0, dont, false), EMPTY_HOWTO (0x89), EMPTY_HOWTO (0x8a), EMPTY_HOWTO (0x8b), EMPTY_HOWTO (0x8c), - RL78_OP_REL (OPscttop, 2, 32, 0, dont, FALSE), + RL78_OP_REL (OPscttop, 2, 32, 0, dont, false), EMPTY_HOWTO (0x8e), EMPTY_HOWTO (0x8f), - RL78_OP_REL (OPand, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPor, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPxor, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPnot, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPmod, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPromtop, 2, 32, 0, dont, FALSE), - RL78_OP_REL (OPramtop, 2, 32, 0, dont, FALSE) + RL78_OP_REL (OPand, 2, 32, 0, dont, false), + RL78_OP_REL (OPor, 2, 32, 0, dont, false), + RL78_OP_REL (OPxor, 2, 32, 0, dont, false), + RL78_OP_REL (OPnot, 2, 32, 0, dont, false), + RL78_OP_REL (OPmod, 2, 32, 0, dont, false), + RL78_OP_REL (OPromtop, 2, 32, 0, dont, false), + RL78_OP_REL (OPramtop, 2, 32, 0, dont, false) }; /* Map BFD reloc types to RL78 ELF reloc types. */ @@ -277,7 +277,7 @@ rl78_reloc_name_lookup (bfd * abfd ATTRIBUTE_UNUSED, const char * r_name) /* Set the howto pointer for an RL78 ELF reloc. */ -static bfd_boolean +static bool rl78_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -291,10 +291,10 @@ rl78_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = rl78_elf_howto_table + r_type; - return TRUE; + return true; } static bfd_vma @@ -309,14 +309,14 @@ get_symbol_value (const char * name, if (info == NULL) return 0; - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, name, false, false, true); if (h == NULL || (h->type != bfd_link_hash_defined && h->type != bfd_link_hash_defweak)) { (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, offset, TRUE); + (info, name, input_bfd, input_section, offset, true); return 0; } @@ -331,13 +331,13 @@ get_romstart (struct bfd_link_info * info, asection * sec, int offset) { - static bfd_boolean cached = FALSE; - static bfd_vma cached_value = 0; + static bool cached = false; + static bfd_vma cached_value = 0; if (!cached) { cached_value = get_symbol_value ("_start", info, abfd, sec, offset); - cached = TRUE; + cached = true; } return cached_value; } @@ -348,13 +348,13 @@ get_ramstart (struct bfd_link_info * info, asection * sec, int offset) { - static bfd_boolean cached = FALSE; - static bfd_vma cached_value = 0; + static bool cached = false; + static bfd_vma cached_value = 0; if (!cached) { cached_value = get_symbol_value ("__datastart", info, abfd, sec, offset); - cached = TRUE; + cached = true; } return cached_value; } @@ -698,16 +698,16 @@ rl78_elf_relocate_section for (rel = relocs; rel < relend; rel ++) { - reloc_howto_type * howto; - unsigned long r_symndx; - Elf_Internal_Sym * sym; - asection * sec; - struct elf_link_hash_entry * h; - bfd_vma relocation; - bfd_reloc_status_type r; - const char * name = NULL; - bfd_boolean unresolved_reloc = TRUE; - int r_type; + reloc_howto_type *howto; + unsigned long r_symndx; + Elf_Internal_Sym *sym; + asection *sec; + struct elf_link_hash_entry *h; + bfd_vma relocation; + bfd_reloc_status_type r; + const char *name = NULL; + bool unresolved_reloc = true; + int r_type; r_type = ELF32_R_TYPE (rel->r_info); r_symndx = ELF32_R_SYM (rel->r_info); @@ -730,8 +730,8 @@ rl78_elf_relocate_section } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, h, @@ -1090,7 +1090,7 @@ rl78_elf_relocate_section case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_other: @@ -1124,25 +1124,25 @@ rl78_elf_relocate_section } } - return TRUE; + return true; } /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool rl78_elf_set_private_flags (bfd * abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } -static bfd_boolean no_warn_mismatch = FALSE; +static bool no_warn_mismatch = false; -void bfd_elf32_rl78_set_target_flags (bfd_boolean); +void bfd_elf32_rl78_set_target_flags (bool); void -bfd_elf32_rl78_set_target_flags (bfd_boolean user_no_warn_mismatch) +bfd_elf32_rl78_set_target_flags (bool user_no_warn_mismatch) { no_warn_mismatch = user_no_warn_mismatch; } @@ -1162,13 +1162,13 @@ rl78_cpu_name (flagword flags) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword new_flags; flagword old_flags; - bfd_boolean error = FALSE; + bool error = false; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; @@ -1176,7 +1176,7 @@ rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } else if (old_flags != new_flags) @@ -1198,7 +1198,7 @@ rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) If the output is set to "any" this means that it is a G14 file that does not use hardware multiply/divide, but that is still incompatible with the G10 ABI. */ - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ @@ -1215,7 +1215,7 @@ rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) } else { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ @@ -1238,14 +1238,14 @@ rl78_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ _bfd_error_handler (_("- %pB is 64-bit, %pB is not"), ibfd, obfd); - error = TRUE; + error = true; } } return !error; } -static bfd_boolean +static bool rl78_elf_print_private_bfd_data (bfd * abfd, void * ptr) { FILE * file = (FILE *) ptr; @@ -1266,7 +1266,7 @@ rl78_elf_print_private_bfd_data (bfd * abfd, void * ptr) fprintf (file, _(" [64-bit doubles]")); fputc ('\n', file); - return TRUE; + return true; } /* Return the MACH for an e_flags value. */ @@ -1277,12 +1277,12 @@ elf32_rl78_machine (bfd * abfd ATTRIBUTE_UNUSED) return bfd_mach_rl78; } -static bfd_boolean +static bool rl78_elf_object_p (bfd * abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_rl78, elf32_rl78_machine (abfd)); - return TRUE; + return true; } /* support PLT for 16-bit references to 24-bit functions. */ @@ -1290,7 +1290,7 @@ rl78_elf_object_p (bfd * abfd) /* We support 16-bit pointers to code above 64k by generating a thunk below 64k containing a JMP instruction to the final address. */ -static bfd_boolean +static bool rl78_elf_check_relocs (bfd * abfd, struct bfd_link_info * info, @@ -1306,7 +1306,7 @@ rl78_elf_check_relocs bfd *dynobj; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -1350,7 +1350,7 @@ rl78_elf_check_relocs elf_hash_table (info)->splt = splt; if (splt == NULL || !bfd_set_section_alignment (splt, 1)) - return FALSE; + return false; } if (h != NULL) @@ -1365,7 +1365,7 @@ rl78_elf_check_relocs size = symtab_hdr->sh_info * sizeof (bfd_vma); local_plt_offsets = (bfd_vma *) bfd_alloc (abfd, size); if (local_plt_offsets == NULL) - return FALSE; + return false; elf_local_got_offsets (abfd) = local_plt_offsets; for (i = 0; i < symtab_hdr->sh_info; i++) @@ -1383,12 +1383,12 @@ rl78_elf_check_relocs } } - return TRUE; + return true; } /* This must exist if dynobj is ever set. */ -static bfd_boolean +static bool rl78_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -1396,7 +1396,7 @@ rl78_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, asection *splt; if (!elf_hash_table (info)->dynamic_sections_created) - return TRUE; + return true; /* As an extra sanity check, verify that all plt entries have been filled in. However, relaxing might have changed the relocs so @@ -1405,7 +1405,7 @@ rl78_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, called before relaxation. */ if (info->relax_trip > 0) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; splt = elf_hash_table (info)->splt; @@ -1421,10 +1421,10 @@ rl78_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } -static bfd_boolean +static bool rl78_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -1432,20 +1432,20 @@ rl78_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, asection *splt; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) - return TRUE; + return true; splt = elf_hash_table (info)->splt; BFD_ASSERT (splt != NULL); splt->contents = (bfd_byte *) bfd_zalloc (dynobj, splt->size); if (splt->contents == NULL) - return FALSE; + return false; - return TRUE; + return true; } @@ -1458,10 +1458,10 @@ rl78_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct relax_plt_data { asection *splt; - bfd_boolean *again; + bool *again; }; -static bfd_boolean +static bool rl78_relax_plt_check (struct elf_link_hash_entry *h, void * xdata) { struct relax_plt_data *data = (struct relax_plt_data *) xdata; @@ -1482,17 +1482,17 @@ rl78_relax_plt_check (struct elf_link_hash_entry *h, void * xdata) { h->plt.offset = -1; data->splt->size -= 4; - *data->again = TRUE; + *data->again = true; } } - return TRUE; + return true; } /* A subroutine of rl78_elf_relax_section. If the global symbol H previously had a plt entry, give it a new entry offset. */ -static bfd_boolean +static bool rl78_relax_plt_realloc (struct elf_link_hash_entry *h, void * xdata) { bfd_vma *entry = (bfd_vma *) xdata; @@ -1503,32 +1503,32 @@ rl78_relax_plt_realloc (struct elf_link_hash_entry *h, void * xdata) *entry += 4; } - return TRUE; + return true; } -static bfd_boolean +static bool rl78_elf_relax_plt_section (bfd *dynobj, asection *splt, struct bfd_link_info *info, - bfd_boolean *again) + bool *again) { struct relax_plt_data relax_plt_data; bfd *ibfd; /* Assume nothing changes. */ - *again = FALSE; + *again = false; if (bfd_link_relocatable (info)) - return TRUE; + return true; /* We only relax the .plt section at the moment. */ if (dynobj != elf_hash_table (info)->dynobj || strcmp (splt->name, ".plt") != 0) - return TRUE; + return true; /* Quick check for an empty plt. */ if (splt->size == 0) - return TRUE; + return true; /* Map across all global symbols; see which ones happen to fall in the low 64k. */ @@ -1558,7 +1558,7 @@ rl78_elf_relax_plt_section (bfd *dynobj, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; } for (idx = 0; idx < symtab_hdr->sh_info; ++idx) @@ -1587,7 +1587,7 @@ rl78_elf_relax_plt_section (bfd *dynobj, { local_plt_offsets[idx] = -1; splt->size -= 4; - *again = TRUE; + *again = true; } } @@ -1631,12 +1631,12 @@ rl78_elf_relax_plt_section (bfd *dynobj, } } - return TRUE; + return true; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool elf32_rl78_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count, Elf_Internal_Rela *alignment_rel, int force_snip) { @@ -1668,7 +1668,7 @@ elf32_rl78_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count irel = elf_section_data (sec)->relocs; if (irel == NULL) { - _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, TRUE); + _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, true); irel = elf_section_data (sec)->relocs; } @@ -1755,7 +1755,7 @@ elf32_rl78_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count } } - return TRUE; + return true; } /* Used to sort relocs by address. If relocs have the same address, @@ -1766,34 +1766,34 @@ static void reloc_bubblesort (Elf_Internal_Rela * r, int count) { int i; - bfd_boolean again; - bfd_boolean swappit; + bool again; + bool swappit; /* This is almost a classic bubblesort. It's the slowest sort, but we're taking advantage of the fact that the relocations are mostly in order already (the assembler emits them that way) and we need relocs with the same address to remain in the same relative order. */ - again = TRUE; + again = true; while (again) { - again = FALSE; + again = false; for (i = 0; i < count - 1; i ++) { if (r[i].r_offset > r[i + 1].r_offset) - swappit = TRUE; + swappit = true; else if (r[i].r_offset < r[i + 1].r_offset) - swappit = FALSE; + swappit = false; else if (ELF32_R_TYPE (r[i + 1].r_info) == R_RL78_RH_RELAX && (r[i + 1].r_addend & RL78_RELAXA_ALIGN)) - swappit = TRUE; + swappit = true; else if (ELF32_R_TYPE (r[i + 1].r_info) == R_RL78_RH_RELAX && (r[i + 1].r_addend & RL78_RELAXA_ELIGN) && !(ELF32_R_TYPE (r[i].r_info) == R_RL78_RH_RELAX && (r[i].r_addend & RL78_RELAXA_ALIGN))) - swappit = TRUE; + swappit = true; else - swappit = FALSE; + swappit = false; if (swappit) { @@ -1807,7 +1807,7 @@ reloc_bubblesort (Elf_Internal_Rela * r, int count) most of the O(n^2) behavior for our cases. */ if (i > 0) i -= 2; - again = TRUE; + again = true; } } } @@ -2049,12 +2049,11 @@ const struct { /* Relax one section. */ -static bfd_boolean -rl78_elf_relax_section - (bfd * abfd, - asection * sec, - struct bfd_link_info * link_info, - bfd_boolean * again) +static bool +rl78_elf_relax_section (bfd *abfd, + asection *sec, + struct bfd_link_info *link_info, + bool *again) { Elf_Internal_Shdr * symtab_hdr; Elf_Internal_Shdr * shndx_hdr; @@ -2081,7 +2080,7 @@ rl78_elf_relax_section return rl78_elf_relax_plt_section (abfd, sec, link_info, again); /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -2090,7 +2089,7 @@ rl78_elf_relax_section || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = & elf_symtab_hdr (abfd); if (elf_symtab_shndx_list (abfd)) @@ -2232,7 +2231,7 @@ rl78_elf_relax_section elf32_rl78_relax_delete_bytes (abfd, sec, erel->r_offset - nbytes, nbytes, next_alignment, erel->r_offset == sec->size); - *again = TRUE; + *again = true; continue; } @@ -2333,7 +2332,7 @@ rl78_elf_relax_section SNIPNR (4, 1); SNIP (1, 2, R_RL78_DIR8S_PCREL); insn[1] = pcrel; - *again = TRUE; + *again = true; } } break; @@ -2346,7 +2345,7 @@ rl78_elf_relax_section insn[0] = 0xef; insn[1] = pcrel; SNIP (2, 2, R_RL78_DIR8S_PCREL); - *again = TRUE; + *again = true; } else if (symval < 65536) { @@ -2354,7 +2353,7 @@ rl78_elf_relax_section insn[1] = symval & 0xff; insn[2] = symval >> 8; SNIP (2, 1, R_RL78_DIR16U); - *again = TRUE; + *again = true; } else if (pcrel < 32767 && pcrel > -32767) @@ -2363,7 +2362,7 @@ rl78_elf_relax_section insn[1] = pcrel & 0xff; insn[2] = pcrel >> 8; SNIP (2, 1, R_RL78_DIR16S_PCREL); - *again = TRUE; + *again = true; } break; @@ -2375,7 +2374,7 @@ rl78_elf_relax_section insn[0] = 0xef; insn[1] = pcrel; SNIP (2, 1, R_RL78_DIR8S_PCREL); - *again = TRUE; + *again = true; } break; @@ -2386,7 +2385,7 @@ rl78_elf_relax_section insn[1] = symval & 0xff; insn[2] = symval >> 8; SNIP (2, 1, R_RL78_DIR16U); - *again = TRUE; + *again = true; } else if (pcrel < 32767 && pcrel > -32767) @@ -2395,7 +2394,7 @@ rl78_elf_relax_section insn[1] = pcrel & 0xff; insn[2] = pcrel >> 8; SNIP (2, 1, R_RL78_DIR16S_PCREL); - *again = TRUE; + *again = true; } break; @@ -2422,7 +2421,7 @@ rl78_elf_relax_section SNIPNR (5, 1); SNIP (2, 2, R_RL78_DIR8S_PCREL); insn[2] = pcrel; - *again = TRUE; + *again = true; } } break; @@ -2549,7 +2548,7 @@ rl78_elf_relax_section /*----------------------------------------------------------------------*/ } - return TRUE; + return true; error_return: free (free_relocs); @@ -2563,7 +2562,7 @@ rl78_elf_relax_section free (free_intsyms); - return TRUE; + return true; } diff --git a/bfd/elf32-rx.c b/bfd/elf32-rx.c index cd0bc002c8..95684d4d32 100644 --- a/bfd/elf32-rx.c +++ b/bfd/elf32-rx.c @@ -41,7 +41,7 @@ void rx_dump_symtab (bfd *, void *, void *); #define RXREL(n,sz,bit,shift,complain,pcrel) \ HOWTO (R_RX_##n, shift, sz, bit, pcrel, 0, complain_overflow_ ## complain, \ - bfd_elf_generic_reloc, "R_RX_" #n, FALSE, 0, ~0, FALSE) + bfd_elf_generic_reloc, "R_RX_" #n, false, 0, ~0, false) /* Note that the relocations around 0x7f are internal to this file; feel free to move them as needed to avoid conflicts with published @@ -49,25 +49,25 @@ void rx_dump_symtab (bfd *, void *, void *); static reloc_howto_type rx_elf_howto_table [] = { - RXREL (NONE, 3, 0, 0, dont, FALSE), - RXREL (DIR32, 2, 32, 0, signed, FALSE), - RXREL (DIR24S, 2, 24, 0, signed, FALSE), - RXREL (DIR16, 1, 16, 0, dont, FALSE), - RXREL (DIR16U, 1, 16, 0, unsigned, FALSE), - RXREL (DIR16S, 1, 16, 0, signed, FALSE), - RXREL (DIR8, 0, 8, 0, dont, FALSE), - RXREL (DIR8U, 0, 8, 0, unsigned, FALSE), - RXREL (DIR8S, 0, 8, 0, signed, FALSE), - RXREL (DIR24S_PCREL, 2, 24, 0, signed, TRUE), - RXREL (DIR16S_PCREL, 1, 16, 0, signed, TRUE), - RXREL (DIR8S_PCREL, 0, 8, 0, signed, TRUE), - RXREL (DIR16UL, 1, 16, 2, unsigned, FALSE), - RXREL (DIR16UW, 1, 16, 1, unsigned, FALSE), - RXREL (DIR8UL, 0, 8, 2, unsigned, FALSE), - RXREL (DIR8UW, 0, 8, 1, unsigned, FALSE), - RXREL (DIR32_REV, 1, 16, 0, dont, FALSE), - RXREL (DIR16_REV, 1, 16, 0, dont, FALSE), - RXREL (DIR3U_PCREL, 0, 3, 0, dont, TRUE), + RXREL (NONE, 3, 0, 0, dont, false), + RXREL (DIR32, 2, 32, 0, signed, false), + RXREL (DIR24S, 2, 24, 0, signed, false), + RXREL (DIR16, 1, 16, 0, dont, false), + RXREL (DIR16U, 1, 16, 0, unsigned, false), + RXREL (DIR16S, 1, 16, 0, signed, false), + RXREL (DIR8, 0, 8, 0, dont, false), + RXREL (DIR8U, 0, 8, 0, unsigned, false), + RXREL (DIR8S, 0, 8, 0, signed, false), + RXREL (DIR24S_PCREL, 2, 24, 0, signed, true), + RXREL (DIR16S_PCREL, 1, 16, 0, signed, true), + RXREL (DIR8S_PCREL, 0, 8, 0, signed, true), + RXREL (DIR16UL, 1, 16, 2, unsigned, false), + RXREL (DIR16UW, 1, 16, 1, unsigned, false), + RXREL (DIR8UL, 0, 8, 2, unsigned, false), + RXREL (DIR8UW, 0, 8, 1, unsigned, false), + RXREL (DIR32_REV, 1, 16, 0, dont, false), + RXREL (DIR16_REV, 1, 16, 0, dont, false), + RXREL (DIR3U_PCREL, 0, 3, 0, dont, true), EMPTY_HOWTO (0x13), EMPTY_HOWTO (0x14), @@ -83,20 +83,20 @@ static reloc_howto_type rx_elf_howto_table [] = EMPTY_HOWTO (0x1e), EMPTY_HOWTO (0x1f), - RXREL (RH_3_PCREL, 0, 3, 0, signed, TRUE), - RXREL (RH_16_OP, 1, 16, 0, signed, FALSE), - RXREL (RH_24_OP, 2, 24, 0, signed, FALSE), - RXREL (RH_32_OP, 2, 32, 0, signed, FALSE), - RXREL (RH_24_UNS, 2, 24, 0, unsigned, FALSE), - RXREL (RH_8_NEG, 0, 8, 0, signed, FALSE), - RXREL (RH_16_NEG, 1, 16, 0, signed, FALSE), - RXREL (RH_24_NEG, 2, 24, 0, signed, FALSE), - RXREL (RH_32_NEG, 2, 32, 0, signed, FALSE), - RXREL (RH_DIFF, 2, 32, 0, signed, FALSE), - RXREL (RH_GPRELB, 1, 16, 0, unsigned, FALSE), - RXREL (RH_GPRELW, 1, 16, 0, unsigned, FALSE), - RXREL (RH_GPRELL, 1, 16, 0, unsigned, FALSE), - RXREL (RH_RELAX, 0, 0, 0, dont, FALSE), + RXREL (RH_3_PCREL, 0, 3, 0, signed, true), + RXREL (RH_16_OP, 1, 16, 0, signed, false), + RXREL (RH_24_OP, 2, 24, 0, signed, false), + RXREL (RH_32_OP, 2, 32, 0, signed, false), + RXREL (RH_24_UNS, 2, 24, 0, unsigned, false), + RXREL (RH_8_NEG, 0, 8, 0, signed, false), + RXREL (RH_16_NEG, 1, 16, 0, signed, false), + RXREL (RH_24_NEG, 2, 24, 0, signed, false), + RXREL (RH_32_NEG, 2, 32, 0, signed, false), + RXREL (RH_DIFF, 2, 32, 0, signed, false), + RXREL (RH_GPRELB, 1, 16, 0, unsigned, false), + RXREL (RH_GPRELW, 1, 16, 0, unsigned, false), + RXREL (RH_GPRELL, 1, 16, 0, unsigned, false), + RXREL (RH_RELAX, 0, 0, 0, dont, false), EMPTY_HOWTO (0x2e), EMPTY_HOWTO (0x2f), @@ -118,23 +118,23 @@ static reloc_howto_type rx_elf_howto_table [] = EMPTY_HOWTO (0x3f), EMPTY_HOWTO (0x40), - RXREL (ABS32, 2, 32, 0, dont, FALSE), - RXREL (ABS24S, 2, 24, 0, signed, FALSE), - RXREL (ABS16, 1, 16, 0, dont, FALSE), - RXREL (ABS16U, 1, 16, 0, unsigned, FALSE), - RXREL (ABS16S, 1, 16, 0, signed, FALSE), - RXREL (ABS8, 0, 8, 0, dont, FALSE), - RXREL (ABS8U, 0, 8, 0, unsigned, FALSE), - RXREL (ABS8S, 0, 8, 0, signed, FALSE), - RXREL (ABS24S_PCREL, 2, 24, 0, signed, TRUE), - RXREL (ABS16S_PCREL, 1, 16, 0, signed, TRUE), - RXREL (ABS8S_PCREL, 0, 8, 0, signed, TRUE), - RXREL (ABS16UL, 1, 16, 0, unsigned, FALSE), - RXREL (ABS16UW, 1, 16, 0, unsigned, FALSE), - RXREL (ABS8UL, 0, 8, 0, unsigned, FALSE), - RXREL (ABS8UW, 0, 8, 0, unsigned, FALSE), - RXREL (ABS32_REV, 2, 32, 0, dont, FALSE), - RXREL (ABS16_REV, 1, 16, 0, dont, FALSE), + RXREL (ABS32, 2, 32, 0, dont, false), + RXREL (ABS24S, 2, 24, 0, signed, false), + RXREL (ABS16, 1, 16, 0, dont, false), + RXREL (ABS16U, 1, 16, 0, unsigned, false), + RXREL (ABS16S, 1, 16, 0, signed, false), + RXREL (ABS8, 0, 8, 0, dont, false), + RXREL (ABS8U, 0, 8, 0, unsigned, false), + RXREL (ABS8S, 0, 8, 0, signed, false), + RXREL (ABS24S_PCREL, 2, 24, 0, signed, true), + RXREL (ABS16S_PCREL, 1, 16, 0, signed, true), + RXREL (ABS8S_PCREL, 0, 8, 0, signed, true), + RXREL (ABS16UL, 1, 16, 0, unsigned, false), + RXREL (ABS16UW, 1, 16, 0, unsigned, false), + RXREL (ABS8UL, 0, 8, 0, unsigned, false), + RXREL (ABS8UW, 0, 8, 0, unsigned, false), + RXREL (ABS32_REV, 2, 32, 0, dont, false), + RXREL (ABS16_REV, 1, 16, 0, dont, false), #define STACK_REL_P(x) ((x) <= R_RX_ABS16_REV && (x) >= R_RX_ABS32) @@ -181,44 +181,44 @@ static reloc_howto_type rx_elf_howto_table [] = /* A 5-bit unsigned displacement to a B/W/L address, at bit position 8/12. */ /* ---- ---- 4--- 3210. */ #define R_RX_RH_ABS5p8B 0x78 - RXREL (RH_ABS5p8B, 0, 0, 0, dont, FALSE), + RXREL (RH_ABS5p8B, 0, 0, 0, dont, false), #define R_RX_RH_ABS5p8W 0x79 - RXREL (RH_ABS5p8W, 0, 0, 0, dont, FALSE), + RXREL (RH_ABS5p8W, 0, 0, 0, dont, false), #define R_RX_RH_ABS5p8L 0x7a - RXREL (RH_ABS5p8L, 0, 0, 0, dont, FALSE), + RXREL (RH_ABS5p8L, 0, 0, 0, dont, false), /* A 5-bit unsigned displacement to a B/W/L address, at bit position 5/12. */ /* ---- -432 1--- 0---. */ #define R_RX_RH_ABS5p5B 0x7b - RXREL (RH_ABS5p5B, 0, 0, 0, dont, FALSE), + RXREL (RH_ABS5p5B, 0, 0, 0, dont, false), #define R_RX_RH_ABS5p5W 0x7c - RXREL (RH_ABS5p5W, 0, 0, 0, dont, FALSE), + RXREL (RH_ABS5p5W, 0, 0, 0, dont, false), #define R_RX_RH_ABS5p5L 0x7d - RXREL (RH_ABS5p5L, 0, 0, 0, dont, FALSE), + RXREL (RH_ABS5p5L, 0, 0, 0, dont, false), /* A 4-bit unsigned immediate at bit position 8. */ #define R_RX_RH_UIMM4p8 0x7e - RXREL (RH_UIMM4p8, 0, 0, 0, dont, FALSE), + RXREL (RH_UIMM4p8, 0, 0, 0, dont, false), /* A 4-bit negative unsigned immediate at bit position 8. */ #define R_RX_RH_UNEG4p8 0x7f - RXREL (RH_UNEG4p8, 0, 0, 0, dont, FALSE), + RXREL (RH_UNEG4p8, 0, 0, 0, dont, false), /* End of internal relocs. */ - RXREL (SYM, 2, 32, 0, dont, FALSE), - RXREL (OPneg, 2, 32, 0, dont, FALSE), - RXREL (OPadd, 2, 32, 0, dont, FALSE), - RXREL (OPsub, 2, 32, 0, dont, FALSE), - RXREL (OPmul, 2, 32, 0, dont, FALSE), - RXREL (OPdiv, 2, 32, 0, dont, FALSE), - RXREL (OPshla, 2, 32, 0, dont, FALSE), - RXREL (OPshra, 2, 32, 0, dont, FALSE), - RXREL (OPsctsize, 2, 32, 0, dont, FALSE), - RXREL (OPscttop, 2, 32, 0, dont, FALSE), - RXREL (OPand, 2, 32, 0, dont, FALSE), - RXREL (OPor, 2, 32, 0, dont, FALSE), - RXREL (OPxor, 2, 32, 0, dont, FALSE), - RXREL (OPnot, 2, 32, 0, dont, FALSE), - RXREL (OPmod, 2, 32, 0, dont, FALSE), - RXREL (OPromtop, 2, 32, 0, dont, FALSE), - RXREL (OPramtop, 2, 32, 0, dont, FALSE) + RXREL (SYM, 2, 32, 0, dont, false), + RXREL (OPneg, 2, 32, 0, dont, false), + RXREL (OPadd, 2, 32, 0, dont, false), + RXREL (OPsub, 2, 32, 0, dont, false), + RXREL (OPmul, 2, 32, 0, dont, false), + RXREL (OPdiv, 2, 32, 0, dont, false), + RXREL (OPshla, 2, 32, 0, dont, false), + RXREL (OPshra, 2, 32, 0, dont, false), + RXREL (OPsctsize, 2, 32, 0, dont, false), + RXREL (OPscttop, 2, 32, 0, dont, false), + RXREL (OPand, 2, 32, 0, dont, false), + RXREL (OPor, 2, 32, 0, dont, false), + RXREL (OPxor, 2, 32, 0, dont, false), + RXREL (OPnot, 2, 32, 0, dont, false), + RXREL (OPmod, 2, 32, 0, dont, false), + RXREL (OPromtop, 2, 32, 0, dont, false), + RXREL (OPramtop, 2, 32, 0, dont, false) }; /* Map BFD reloc types to RX ELF reloc types. */ @@ -299,7 +299,7 @@ rx_reloc_name_lookup (bfd * abfd ATTRIBUTE_UNUSED, const char * r_name) /* Set the howto pointer for an RX ELF reloc. */ -static bfd_boolean +static bool rx_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -313,7 +313,7 @@ rx_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = rx_elf_howto_table + r_type; if (cache_ptr->howto->name == NULL) @@ -322,9 +322,9 @@ rx_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } static bfd_vma @@ -337,13 +337,13 @@ get_symbol_value (const char * name, bfd_vma value = 0; struct bfd_link_hash_entry * h; - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, name, false, false, true); if (h == NULL || (h->type != bfd_link_hash_defined && h->type != bfd_link_hash_defweak)) (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, offset, TRUE); + (info, name, input_bfd, input_section, offset, true); else value = (h->u.def.value + h->u.def.section->output_section->vma @@ -359,7 +359,7 @@ get_symbol_value_maybe (const char * name, bfd_vma value = 0; struct bfd_link_hash_entry * h; - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, name, false, false, true); if (h == NULL || (h->type != bfd_link_hash_defined @@ -379,13 +379,13 @@ get_gp (struct bfd_link_info * info, asection * sec, int offset) { - static bfd_boolean cached = FALSE; - static bfd_vma cached_value = 0; + static bool cached = false; + static bfd_vma cached_value = 0; if (!cached) { cached_value = get_symbol_value ("__gp", info, abfd, sec, offset); - cached = TRUE; + cached = true; } return cached_value; } @@ -396,13 +396,13 @@ get_romstart (struct bfd_link_info * info, asection * sec, int offset) { - static bfd_boolean cached = FALSE; - static bfd_vma cached_value = 0; + static bool cached = false; + static bfd_vma cached_value = 0; if (!cached) { cached_value = get_symbol_value ("_start", info, abfd, sec, offset); - cached = TRUE; + cached = true; } return cached_value; } @@ -413,13 +413,13 @@ get_ramstart (struct bfd_link_info * info, asection * sec, int offset) { - static bfd_boolean cached = FALSE; - static bfd_vma cached_value = 0; + static bool cached = false; + static bfd_vma cached_value = 0; if (!cached) { cached_value = get_symbol_value ("__datastart", info, abfd, sec, offset); - cached = TRUE; + cached = true; } return cached_value; } @@ -492,36 +492,36 @@ rx_elf_relocate_section Elf_Internal_Sym * local_syms, asection ** local_sections) { - Elf_Internal_Shdr * symtab_hdr; - struct elf_link_hash_entry ** sym_hashes; - Elf_Internal_Rela * rel; - Elf_Internal_Rela * relend; - bfd_boolean pid_mode; - bfd_boolean saw_subtract = FALSE; - const char * table_default_cache = NULL; - bfd_vma table_start_cache = 0; - bfd_vma table_end_cache = 0; + Elf_Internal_Shdr *symtab_hdr; + struct elf_link_hash_entry **sym_hashes; + Elf_Internal_Rela *rel; + Elf_Internal_Rela *relend; + bool pid_mode; + bool saw_subtract = false; + const char *table_default_cache = NULL; + bfd_vma table_start_cache = 0; + bfd_vma table_end_cache = 0; if (elf_elfheader (output_bfd)->e_flags & E_FLAG_RX_PID) - pid_mode = TRUE; + pid_mode = true; else - pid_mode = FALSE; + pid_mode = false; symtab_hdr = & elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); relend = relocs + input_section->reloc_count; for (rel = relocs; rel < relend; rel ++) { - reloc_howto_type * howto; - unsigned long r_symndx; - Elf_Internal_Sym * sym; - asection * sec; - struct elf_link_hash_entry * h; - bfd_vma relocation; - bfd_reloc_status_type r; - const char * name = NULL; - bfd_boolean unresolved_reloc = TRUE; - int r_type; + reloc_howto_type *howto; + unsigned long r_symndx; + Elf_Internal_Sym *sym; + asection *sec; + struct elf_link_hash_entry *h; + bfd_vma relocation; + bfd_reloc_status_type r; + const char * name = NULL; + bool unresolved_reloc = true; + int r_type; r_type = ELF32_R_TYPE (rel->r_info); r_symndx = ELF32_R_SYM (rel->r_info); @@ -533,7 +533,7 @@ rx_elf_relocate_section relocation = 0; if (rx_stack_top == 0) - saw_subtract = FALSE; + saw_subtract = false; if (r_symndx < symtab_hdr->sh_info) { @@ -547,7 +547,7 @@ rx_elf_relocate_section } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, h, @@ -578,7 +578,7 @@ rx_elf_relocate_section buf = (char *) bfd_malloc (13 + strlen (name + 20)); if (buf == NULL) - return FALSE; + return false; sprintf (buf, "$tablestart$%s", name + 20); table_start_cache = get_symbol_value (buf, @@ -622,11 +622,11 @@ rx_elf_relocate_section /* This will look like $tableentry$$ */ buf = (char *) bfd_malloc (12 + 20 + strlen (name + 20)); if (buf == NULL) - return FALSE; + return false; sprintf (buf, "$tableentry$%d$%s", idx, name + 20); - h = (struct elf_link_hash_entry *) bfd_link_hash_lookup (info->hash, buf, FALSE, FALSE, TRUE); + h = (struct elf_link_hash_entry *) bfd_link_hash_lookup (info->hash, buf, false, false, true); if (h) { @@ -1298,7 +1298,7 @@ rx_elf_relocate_section { int32_t tmp; - saw_subtract = TRUE; + saw_subtract = true; RX_STACK_POP (tmp); tmp = - tmp; RX_STACK_PUSH (tmp); @@ -1320,7 +1320,7 @@ rx_elf_relocate_section { int32_t tmp1, tmp2; - saw_subtract = TRUE; + saw_subtract = true; RX_STACK_POP (tmp1); RX_STACK_POP (tmp2); tmp2 -= tmp1; @@ -1467,7 +1467,7 @@ rx_elf_relocate_section case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_other: @@ -1501,7 +1501,7 @@ rx_elf_relocate_section } } - return TRUE; + return true; } /* Relaxation Support. */ @@ -1559,7 +1559,7 @@ next_smaller_reloc (int r) /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool elf32_rx_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count, Elf_Internal_Rela *alignment_rel, int force_snip, Elf_Internal_Rela *irelstart) @@ -1676,7 +1676,7 @@ elf32_rx_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count, } } - return TRUE; + return true; } /* Used to sort relocs by address. If relocs have the same address, @@ -1687,34 +1687,34 @@ static void reloc_bubblesort (Elf_Internal_Rela * r, int count) { int i; - bfd_boolean again; - bfd_boolean swappit; + bool again; + bool swappit; /* This is almost a classic bubblesort. It's the slowest sort, but we're taking advantage of the fact that the relocations are mostly in order already (the assembler emits them that way) and we need relocs with the same address to remain in the same relative order. */ - again = TRUE; + again = true; while (again) { - again = FALSE; + again = false; for (i = 0; i < count - 1; i ++) { if (r[i].r_offset > r[i + 1].r_offset) - swappit = TRUE; + swappit = true; else if (r[i].r_offset < r[i + 1].r_offset) - swappit = FALSE; + swappit = false; else if (ELF32_R_TYPE (r[i + 1].r_info) == R_RX_RH_RELAX && (r[i + 1].r_addend & RX_RELAXA_ALIGN)) - swappit = TRUE; + swappit = true; else if (ELF32_R_TYPE (r[i + 1].r_info) == R_RX_RH_RELAX && (r[i + 1].r_addend & RX_RELAXA_ELIGN) && !(ELF32_R_TYPE (r[i].r_info) == R_RX_RH_RELAX && (r[i].r_addend & RX_RELAXA_ALIGN))) - swappit = TRUE; + swappit = true; else - swappit = FALSE; + swappit = false; if (swappit) { @@ -1728,7 +1728,7 @@ reloc_bubblesort (Elf_Internal_Rela * r, int count) most of the O(n^2) behavior for our cases. */ if (i > 0) i -= 2; - again = TRUE; + again = true; } } } @@ -1991,26 +1991,26 @@ move_reloc (Elf_Internal_Rela * irel, Elf_Internal_Rela * srel, int delta) /* Relax one section. */ -static bfd_boolean -elf32_rx_relax_section (bfd * abfd, - asection * sec, - struct bfd_link_info * link_info, - bfd_boolean * again, - bfd_boolean allow_pcrel3) +static bool +elf32_rx_relax_section (bfd *abfd, + asection *sec, + struct bfd_link_info *link_info, + bool *again, + bool allow_pcrel3) { - Elf_Internal_Shdr * symtab_hdr; - Elf_Internal_Shdr * shndx_hdr; - Elf_Internal_Rela * internal_relocs; - Elf_Internal_Rela * irel; - Elf_Internal_Rela * srel; - Elf_Internal_Rela * irelend; - Elf_Internal_Rela * next_alignment; - Elf_Internal_Rela * prev_alignment; - bfd_byte * contents = NULL; - bfd_byte * free_contents = NULL; - Elf_Internal_Sym * intsyms = NULL; - Elf_Internal_Sym * free_intsyms = NULL; - bfd_byte * shndx_buf = NULL; + Elf_Internal_Shdr *symtab_hdr; + Elf_Internal_Shdr *shndx_hdr; + Elf_Internal_Rela *internal_relocs; + Elf_Internal_Rela *irel; + Elf_Internal_Rela *srel; + Elf_Internal_Rela *irelend; + Elf_Internal_Rela *next_alignment; + Elf_Internal_Rela *prev_alignment; + bfd_byte *contents = NULL; + bfd_byte *free_contents = NULL; + Elf_Internal_Sym *intsyms = NULL; + Elf_Internal_Sym *free_intsyms = NULL; + bfd_byte *shndx_buf = NULL; bfd_vma pc; bfd_vma sec_start; bfd_vma symval = 0; @@ -2021,7 +2021,7 @@ elf32_rx_relax_section (bfd * abfd, int scale; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -2030,7 +2030,7 @@ elf32_rx_relax_section (bfd * abfd, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = & elf_symtab_hdr (abfd); if (elf_symtab_shndx_list (abfd)) @@ -2086,7 +2086,7 @@ elf32_rx_relax_section (bfd * abfd, as bytes are deleted from the section, and with this relaxation function itself being called multiple times on the same section... */ internal_relocs = _bfd_elf_link_read_relocs - (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, TRUE); + (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, true); if (internal_relocs == NULL) goto error_return; @@ -2179,7 +2179,7 @@ elf32_rx_relax_section (bfd * abfd, elf32_rx_relax_delete_bytes (abfd, sec, erel->r_offset-nbytes, nbytes, next_alignment, erel->r_offset == sec->size, internal_relocs); - *again = TRUE; + *again = true; continue; } @@ -2249,7 +2249,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (3, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2257,7 +2257,7 @@ elf32_rx_relax_section (bfd * abfd, { insn[0] &= 0xfc; SNIP (2, 1, R_RX_NONE); - *again = TRUE; + *again = true; } /* Special case DSP:5 format: MOV.bwl dsp:5[Rsrc],Rdst. */ @@ -2354,7 +2354,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (offset+1, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2362,7 +2362,7 @@ elf32_rx_relax_section (bfd * abfd, { insn[0] &= 0xf3; SNIP (offset, 1, R_RX_NONE); - *again = TRUE; + *again = true; } /* Special case DSP:5 format: MOV.bwl Rsrc,dsp:5[Rdst] */ else if (code == 1 && symval/scale <= 31 @@ -2423,14 +2423,14 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (offset, 1, newrel); - *again = TRUE; + *again = true; } } else if (code == 1 && symval == 0) { insn[1] &= 0xfc; SNIP (offset, 1, R_RX_NONE); - *again = TRUE; + *again = true; } } @@ -2462,7 +2462,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (2, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2476,7 +2476,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (2, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2501,7 +2501,7 @@ elf32_rx_relax_section (bfd * abfd, newrel = R_RX_DIR8U; SNIP (2, 1, newrel); - *again = TRUE; + *again = true; } else if (code == 2 && ssymval <= 127 && ssymval >= -128) @@ -2514,7 +2514,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (2, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2536,7 +2536,7 @@ elf32_rx_relax_section (bfd * abfd, move_reloc (irel, srel, -1); SNIP (2, 1, R_RX_RH_UIMM4p8); - *again = TRUE; + *again = true; } /* Special case UIMM4 format: ADD -> ADD/SUB. */ @@ -2570,7 +2570,7 @@ elf32_rx_relax_section (bfd * abfd, move_reloc (irel, srel, -1); SNIP (2, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2609,7 +2609,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (offset, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2623,7 +2623,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE (srel->r_info)) { SNIP (offset, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2648,7 +2648,7 @@ elf32_rx_relax_section (bfd * abfd, newrel = R_RX_DIR8U; SNIP (2, 1, newrel); - *again = TRUE; + *again = true; } else if (code == 2 && ssymval <= 127 && ssymval >= -128) @@ -2661,7 +2661,7 @@ elf32_rx_relax_section (bfd * abfd, if (newrel != ELF32_R_TYPE(srel->r_info)) { SNIP (offset, 1, newrel); - *again = TRUE; + *again = true; } } @@ -2681,7 +2681,7 @@ elf32_rx_relax_section (bfd * abfd, move_reloc (irel, srel, -1); SNIP (2, 1, R_RX_RH_UIMM4p8); - *again = TRUE; + *again = true; } } @@ -2724,7 +2724,7 @@ elf32_rx_relax_section (bfd * abfd, { insn[0] = 0x38; SNIP (3, 1, newrel); - *again = TRUE; + *again = true; } break; @@ -2734,7 +2734,7 @@ elf32_rx_relax_section (bfd * abfd, { insn[0] = 0x2e; SNIP (2, 1, newrel); - *again = TRUE; + *again = true; } break; @@ -2751,7 +2751,7 @@ elf32_rx_relax_section (bfd * abfd, insn[0] = 0x08; SNIP (1, 1, newrel); move_reloc (irel, srel, -1); - *again = TRUE; + *again = true; } break; @@ -2761,7 +2761,7 @@ elf32_rx_relax_section (bfd * abfd, { insn[0] = 0x39; SNIP (1, 1, newrel); - *again = TRUE; + *again = true; } break; @@ -2772,7 +2772,7 @@ elf32_rx_relax_section (bfd * abfd, { insn[0] = 0x20 | (insn[0] & 1); SNIP (1, 1, newrel); - *again = TRUE; + *again = true; } break; @@ -2785,7 +2785,7 @@ elf32_rx_relax_section (bfd * abfd, insn[0] = 0x10 | ((insn[0] & 1) << 3); SNIP (1, 1, newrel); move_reloc (irel, srel, -1); - *again = TRUE; + *again = true; } break; @@ -2803,7 +2803,7 @@ elf32_rx_relax_section (bfd * abfd, will get moved too, and too much. */ SNIP (3, 2, newrel); move_reloc (irel, srel, -1); - *again = TRUE; + *again = true; } break; } @@ -2820,7 +2820,7 @@ elf32_rx_relax_section (bfd * abfd, insn[1] = 0x05; insn[2] = 0x38; SNIP (5, 1, newrel); - *again = TRUE; + *again = true; } /* Special case - synthetic conditional branches, pcrel16 */ @@ -2838,7 +2838,7 @@ elf32_rx_relax_section (bfd * abfd, delete_bytes move it also. */ move_reloc (irel, srel, -2); SNIP (2, 3, newrel); - *again = TRUE; + *again = true; } } @@ -3015,7 +3015,7 @@ elf32_rx_relax_section (bfd * abfd, } SNIPNR (3, ilen - 3); - *again = TRUE; + *again = true; /* We can't relax this new opcode. */ irel->r_addend = 0; @@ -3029,12 +3029,12 @@ elf32_rx_relax_section (bfd * abfd, don't request a pass after that one! */ if (!*again && !allow_pcrel3) { - bfd_boolean ignored; + bool ignored; - elf32_rx_relax_section (abfd, sec, link_info, &ignored, TRUE); + elf32_rx_relax_section (abfd, sec, link_info, &ignored, true); } - return TRUE; + return true; error_return: free (free_contents); @@ -3047,36 +3047,36 @@ elf32_rx_relax_section (bfd * abfd, free (free_intsyms); - return FALSE; + return false; } -static bfd_boolean -elf32_rx_relax_section_wrapper (bfd * abfd, - asection * sec, - struct bfd_link_info * link_info, - bfd_boolean * again) +static bool +elf32_rx_relax_section_wrapper (bfd *abfd, + asection *sec, + struct bfd_link_info *link_info, + bool *again) { - return elf32_rx_relax_section (abfd, sec, link_info, again, FALSE); + return elf32_rx_relax_section (abfd, sec, link_info, again, false); } /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool rx_elf_set_private_flags (bfd * abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } -static bfd_boolean no_warn_mismatch = FALSE; -static bfd_boolean ignore_lma = TRUE; +static bool no_warn_mismatch = false; +static bool ignore_lma = true; -void bfd_elf32_rx_set_target_flags (bfd_boolean, bfd_boolean); +void bfd_elf32_rx_set_target_flags (bool, bool); void -bfd_elf32_rx_set_target_flags (bfd_boolean user_no_warn_mismatch, - bfd_boolean user_ignore_lma) +bfd_elf32_rx_set_target_flags (bool user_no_warn_mismatch, + bool user_ignore_lma) { no_warn_mismatch = user_no_warn_mismatch; ignore_lma = user_ignore_lma; @@ -3119,13 +3119,13 @@ describe_flags (flagword flags, char *buf) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool rx_elf_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword old_flags; flagword new_flags; - bfd_boolean error = FALSE; + bool error = false; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; @@ -3133,7 +3133,7 @@ rx_elf_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } else if (old_flags != new_flags) @@ -3177,7 +3177,7 @@ rx_elf_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) describe_flags (new_flags, buf)); _bfd_error_handler (_(" the output file's flags: %s"), describe_flags (old_flags, buf)); - error = TRUE; + error = true; } } else @@ -3190,7 +3190,7 @@ rx_elf_merge_private_bfd_data (bfd * ibfd, struct bfd_link_info *info) return !error; } -static bfd_boolean +static bool rx_elf_print_private_bfd_data (bfd * abfd, void * ptr) { FILE * file = (FILE *) ptr; @@ -3206,7 +3206,7 @@ rx_elf_print_private_bfd_data (bfd * abfd, void * ptr) fprintf (file, _("private flags = 0x%lx:"), (long) flags); fprintf (file, "%s", describe_flags (flags, buf)); - return TRUE; + return true; } /* Return the MACH for an e_flags value. */ @@ -3229,7 +3229,7 @@ elf32_rx_machine (bfd * abfd ATTRIBUTE_UNUSED) return 0; } -static bfd_boolean +static bool rx_elf_object_p (bfd * abfd) { int i; @@ -3238,7 +3238,7 @@ rx_elf_object_p (bfd * abfd) Elf_Internal_Ehdr *ehdr = elf_elfheader (abfd); int nphdrs = ehdr->e_phnum; sec_ptr bsec; - static int saw_be = FALSE; + static int saw_be = false; bfd_vma end_phdroff; /* We never want to automatically choose the non-swapping big-endian @@ -3246,16 +3246,16 @@ rx_elf_object_p (bfd * abfd) and objcopy. */ if (abfd->xvec == &rx_elf32_be_ns_vec && abfd->target_defaulted) - return FALSE; + return false; /* BFD->target_defaulted is not set to TRUE when a target is chosen as a fallback, so we check for "scanning" to know when to stop using the non-swapping target. */ if (abfd->xvec == &rx_elf32_be_ns_vec && saw_be) - return FALSE; + return false; if (abfd->xvec == &rx_elf32_be_vec) - saw_be = TRUE; + saw_be = true; bfd_default_set_arch_mach (abfd, bfd_arch_rx, elf32_rx_machine (abfd)); @@ -3319,14 +3319,14 @@ rx_elf_object_p (bfd * abfd) } } - return TRUE; + return true; } -static bfd_boolean +static bool rx_linux_object_p (bfd * abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_rx, elf32_rx_machine (abfd)); - return TRUE; + return true; } @@ -3418,7 +3418,7 @@ rx_get_reloc (long reloc) have code sections stored with 32-bit words swapped relative to what you'd get by default. */ -static bfd_boolean +static bool rx_get_section_contents (bfd * abfd, sec_ptr section, void * location, @@ -3427,7 +3427,7 @@ rx_get_section_contents (bfd * abfd, { int exec = (abfd->flags & EXEC_P) ? 1 : 0; int s_code = (section->flags & SEC_CODE) ? 1 : 0; - bfd_boolean rv; + bool rv; #ifdef DJDEBUG fprintf (stderr, "dj: get %ld %ld from %s %s e%d sc%d %08lx:%08lx\n", @@ -3442,7 +3442,7 @@ rx_get_section_contents (bfd * abfd, char * cloc = (char *) location; bfd_size_type cnt, end_cnt; - rv = TRUE; + rv = true; /* Fetch and swap unaligned bytes at the beginning. */ if (offset % 4) @@ -3452,7 +3452,7 @@ rx_get_section_contents (bfd * abfd, rv = _bfd_generic_get_section_contents (abfd, section, buf, (offset & -4), 4); if (!rv) - return FALSE; + return false; bfd_putb32 (bfd_getl32 (buf), buf); @@ -3475,7 +3475,7 @@ rx_get_section_contents (bfd * abfd, rv = _bfd_generic_get_section_contents (abfd, section, cloc, offset, count - end_cnt); if (!rv) - return FALSE; + return false; for (cnt = count; cnt >= 4; cnt -= 4, cloc += 4) bfd_putb32 (bfd_getl32 (cloc), cloc); @@ -3490,7 +3490,7 @@ rx_get_section_contents (bfd * abfd, rv = _bfd_generic_get_section_contents (abfd, section, buf, offset + count - end_cnt, 4); if (!rv) - return FALSE; + return false; bfd_putb32 (bfd_getl32 (buf), buf); memcpy (cloc, buf, end_cnt); @@ -3503,7 +3503,7 @@ rx_get_section_contents (bfd * abfd, } #ifdef DJDEBUG -static bfd_boolean +static bool rx2_set_section_contents (bfd * abfd, sec_ptr section, const void * location, @@ -3534,16 +3534,16 @@ rx2_set_section_contents (bfd * abfd, #define _bfd_elf_set_section_contents rx2_set_section_contents #endif -static bfd_boolean +static bool rx_set_section_contents (bfd * abfd, sec_ptr section, const void * location, file_ptr offset, bfd_size_type count) { - bfd_boolean exec = (abfd->flags & EXEC_P) != 0; - bfd_boolean s_code = (section->flags & SEC_CODE) != 0; - bfd_boolean rv; + bool exec = (abfd->flags & EXEC_P) != 0; + bool s_code = (section->flags & SEC_CODE) != 0; + bool rv; char * swapped_data = NULL; bfd_size_type i; bfd_vma caddr = section->vma + offset; @@ -3607,7 +3607,7 @@ rx_set_section_contents (bfd * abfd, swapped_data = (char *) bfd_alloc (abfd, count); if (swapped_data == NULL) - return FALSE; + return false; for (i = 0; i < count; i += 4) { @@ -3648,10 +3648,10 @@ rx_set_section_contents (bfd * abfd, } } - return TRUE; + return true; } -static bfd_boolean +static bool rx_final_link (bfd * abfd, struct bfd_link_info * info) { asection * o; @@ -3676,7 +3676,7 @@ rx_final_link (bfd * abfd, struct bfd_link_info * info) return bfd_elf_final_link (abfd, info); } -static bfd_boolean +static bool elf32_rx_modify_headers (bfd *abfd, struct bfd_link_info *info) { const struct elf_backend_data * bed; @@ -3735,7 +3735,7 @@ typedef struct { FILE *mapfile; } RX_Table_Info; -static bfd_boolean +static bool rx_table_find (struct bfd_hash_entry *vent, void *vinfo) { RX_Table_Info *info = (RX_Table_Info *)vinfo; @@ -3753,14 +3753,14 @@ rx_table_find (struct bfd_hash_entry *vent, void *vinfo) $tablestart$. */ if (ent->type != bfd_link_hash_defined && ent->type != bfd_link_hash_defweak) - return TRUE; + return true; name = ent->root.string; sec = ent->u.def.section; abfd = sec->owner; if (strncmp (name, "$tablestart$", 12)) - return TRUE; + return true; sec->flags |= SEC_KEEP; @@ -3774,17 +3774,17 @@ rx_table_find (struct bfd_hash_entry *vent, void *vinfo) buf = (char *) bfd_malloc (12 + 10 + strlen (tname)); if (buf == NULL) - return FALSE; + return false; sprintf (buf, "$tableend$%s", tname); - h = bfd_link_hash_lookup (info->info->hash, buf, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->info->hash, buf, false, false, true); if (!h || (h->type != bfd_link_hash_defined && h->type != bfd_link_hash_defweak)) { /* xgettext:c-format */ _bfd_error_handler (_("%pB:%pA: table %s missing corresponding %s"), abfd, sec, name, buf); - return TRUE; + return true; } if (h->u.def.section != ent->u.def.section) @@ -3793,13 +3793,13 @@ rx_table_find (struct bfd_hash_entry *vent, void *vinfo) _bfd_error_handler (_("%pB:%pA: %s and %s must be in the same input section"), h->u.def.section->owner, h->u.def.section, name, buf); - return TRUE; + return true; } end_addr = h->u.def.value; sprintf (buf, "$tableentry$default$%s", tname); - h = bfd_link_hash_lookup (info->info->hash, buf, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->info->hash, buf, false, false, true); if (h && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak)) { @@ -3809,7 +3809,7 @@ rx_table_find (struct bfd_hash_entry *vent, void *vinfo) for (idx = 0; idx < (int) (end_addr - start_addr) / 4; idx ++) { sprintf (buf, "$tableentry$%d$%s", idx, tname); - h = bfd_link_hash_lookup (info->info->hash, buf, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->info->hash, buf, false, false, true); if (h && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak)) { @@ -3818,13 +3818,13 @@ rx_table_find (struct bfd_hash_entry *vent, void *vinfo) } /* Return TRUE to keep scanning, FALSE to end the traversal. */ - return TRUE; + return true; } /* We need to check for table entry symbols and build the tables, and we need to do it before the linker does garbage collection. This function is called once per input object file. */ -static bfd_boolean +static bool rx_check_directives (bfd * abfd ATTRIBUTE_UNUSED, struct bfd_link_info * info ATTRIBUTE_UNUSED) @@ -3835,11 +3835,11 @@ rx_check_directives stuff.info = info; bfd_hash_traverse (&(info->hash->table), rx_table_find, &stuff); - return TRUE; + return true; } -static bfd_boolean +static bool rx_table_map_2 (struct bfd_hash_entry *vent, void *vinfo) { RX_Table_Info *info = (RX_Table_Info *)vinfo; @@ -3853,12 +3853,12 @@ rx_table_map_2 (struct bfd_hash_entry *vent, void *vinfo) if (ent->type != bfd_link_hash_defined && ent->type != bfd_link_hash_defweak) - return TRUE; + return true; name = ent->root.string; if (name[0] == '$' || name[0] == '.' || name[0] < ' ') - return TRUE; + return true; addr = (ent->u.def.value + ent->u.def.section->output_section->vma @@ -3871,10 +3871,10 @@ rx_table_map_2 (struct bfd_hash_entry *vent, void *vinfo) if (addr == info->table_default_handler) info->table_default_entry = ent; - return TRUE; + return true; } -static bfd_boolean +static bool rx_table_map (struct bfd_hash_entry *vent, void *vinfo) { RX_Table_Info *info = (RX_Table_Info *)vinfo; @@ -3891,12 +3891,12 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo) $tablestart$. */ if (ent->type != bfd_link_hash_defined && ent->type != bfd_link_hash_defweak) - return TRUE; + return true; name = ent->root.string; if (strncmp (name, "$tablestart$", 12)) - return TRUE; + return true; tname = name + 12; start_addr = (ent->u.def.value @@ -3905,13 +3905,13 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo) buf = (char *) bfd_malloc (12 + 10 + strlen (tname)); if (buf == NULL) - return FALSE; + return false; sprintf (buf, "$tableend$%s", tname); end_addr = get_symbol_value_maybe (buf, info->info); sprintf (buf, "$tableentry$default$%s", tname); - h = bfd_link_hash_lookup (info->info->hash, buf, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->info->hash, buf, false, false, true); if (h) { info->table_default_handler = (h->u.def.value @@ -3930,7 +3930,7 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo) if (info->table_handlers == NULL) { free (buf); - return FALSE; + return false; } info->table_entries = (struct bfd_link_hash_entry **) bfd_malloc (info->table_size * sizeof (struct bfd_link_hash_entry)); @@ -3938,13 +3938,13 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo) { free (info->table_handlers); free (buf); - return FALSE; + return false; } for (idx = 0; idx < (int) (end_addr - start_addr) / 4; idx ++) { sprintf (buf, "$tableentry$%d$%s", idx, tname); - h = bfd_link_hash_lookup (info->info->hash, buf, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->info->hash, buf, false, false, true); if (h && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak)) { @@ -4012,7 +4012,7 @@ rx_table_map (struct bfd_hash_entry *vent, void *vinfo) if (need_elipses) fprintf (info->mapfile, " . . .\n"); - return TRUE; + return true; } void diff --git a/bfd/elf32-s12z.c b/bfd/elf32-s12z.c index 55315aacd3..22a23c50d2 100644 --- a/bfd/elf32-s12z.c +++ b/bfd/elf32-s12z.c @@ -33,7 +33,7 @@ /* Relocation functions. */ static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean s12z_info_to_howto_rel +static bool s12z_info_to_howto_rel (bfd *, arelent *, Elf_Internal_Rela *); static bfd_reloc_status_type @@ -102,90 +102,90 @@ static reloc_howto_type elf_s12z_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_S12Z_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24 bit absolute relocation emitted by the OPR mode operands */ HOWTO (R_S12Z_OPR, /* type */ 0, /* rightshift */ 5, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ shift_addend_reloc, "R_S12Z_OPR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ffffff, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The purpose of this reloc is not known */ HOWTO (R_S12Z_UKNWN_2, /* type */ 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_S12Z_UKNWN_2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 15 bit PC-rel relocation */ HOWTO (R_S12Z_PCREL_7_15, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ shift_addend_reloc, "R_S12Z_PCREL_7_15", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00, /* src_mask */ 0x007fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 24 bit absolute relocation emitted by EXT24 mode operands */ HOWTO (R_S12Z_EXT24, /* type */ 0, /* rightshift */ 5, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_S12Z_EXT24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 18 bit absolute relocation */ HOWTO (R_S12Z_EXT18, /* type */ 0, /* rightshift */ 5, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ opru18_reloc, /* special_function */ "R_S12Z_EXT18", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0005ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. This kind of relocation is schizophrenic - Although they appear in sections named .rela.debug.* @@ -200,30 +200,30 @@ static reloc_howto_type elf_s12z_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_S12Z_CW32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation */ HOWTO (R_S12Z_EXT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_S12Z_EXT32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* Map BFD reloc types to S12Z ELF reloc types. */ @@ -284,7 +284,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an S12Z ELF reloc. */ -static bfd_boolean +static bool s12z_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -296,19 +296,19 @@ s12z_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_s12z_howto_table[r_type]; - return TRUE; + return true; } -static bfd_boolean +static bool s12z_elf_set_mach_from_flags (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_s12z, 0); - return TRUE; + return true; } #define ELF_ARCH bfd_arch_s12z diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 98ded1e56f..b79e283ce3 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -42,140 +42,140 @@ static reloc_howto_type elf_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = 2 byte, 2 = 4 byte) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_390_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ - - HOWTO(R_390_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_8", FALSE, 0,0x000000ff, FALSE), - HOWTO(R_390_12, 0, 1, 12, FALSE, 0, complain_overflow_dont, - bfd_elf_generic_reloc, "R_390_12", FALSE, 0,0x00000fff, FALSE), - HOWTO(R_390_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_32", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC32", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_GOT12, 0, 1, 12, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOT12", FALSE, 0,0x00000fff, FALSE), - HOWTO(R_390_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOT32", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT32", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_COPY, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_COPY", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_GLOB_DAT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GLOB_DAT", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_JMP_SLOT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_JMP_SLOT", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_RELATIVE, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_RELATIVE", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_GOTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTOFF32", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_GOTPC, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPC", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_GOT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOT16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC16", FALSE, 0,0x0000ffff, TRUE), - HOWTO(R_390_PC16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC16DBL", FALSE, 0,0x0000ffff, TRUE), - HOWTO(R_390_PLT16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT16DBL", FALSE, 0,0x0000ffff, TRUE), - HOWTO(R_390_PC32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC32DBL", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_PLT32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT32DBL", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_GOTPCDBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPCDBL", FALSE, 0,0xffffffff, TRUE), + false), /* pcrel_offset */ + + HOWTO(R_390_8, 0, 0, 8, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_8", false, 0,0x000000ff, false), + HOWTO(R_390_12, 0, 1, 12, false, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "R_390_12", false, 0,0x00000fff, false), + HOWTO(R_390_16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_16", false, 0,0x0000ffff, false), + HOWTO(R_390_32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_32", false, 0,0xffffffff, false), + HOWTO(R_390_PC32, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC32", false, 0,0xffffffff, true), + HOWTO(R_390_GOT12, 0, 1, 12, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOT12", false, 0,0x00000fff, false), + HOWTO(R_390_GOT32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOT32", false, 0,0xffffffff, false), + HOWTO(R_390_PLT32, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT32", false, 0,0xffffffff, true), + HOWTO(R_390_COPY, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_COPY", false, 0,0xffffffff, false), + HOWTO(R_390_GLOB_DAT, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GLOB_DAT", false, 0,0xffffffff, false), + HOWTO(R_390_JMP_SLOT, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_JMP_SLOT", false, 0,0xffffffff, false), + HOWTO(R_390_RELATIVE, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_RELATIVE", false, 0,0xffffffff, false), + HOWTO(R_390_GOTOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTOFF32", false, 0,0xffffffff, false), + HOWTO(R_390_GOTPC, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPC", false, 0,0xffffffff, true), + HOWTO(R_390_GOT16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOT16", false, 0,0x0000ffff, false), + HOWTO(R_390_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC16", false, 0,0x0000ffff, true), + HOWTO(R_390_PC16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC16DBL", false, 0,0x0000ffff, true), + HOWTO(R_390_PLT16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT16DBL", false, 0,0x0000ffff, true), + HOWTO(R_390_PC32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC32DBL", false, 0,0xffffffff, true), + HOWTO(R_390_PLT32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT32DBL", false, 0,0xffffffff, true), + HOWTO(R_390_GOTPCDBL, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPCDBL", false, 0,0xffffffff, true), EMPTY_HOWTO (R_390_64), /* Empty entry for R_390_64. */ EMPTY_HOWTO (R_390_PC64), /* Empty entry for R_390_PC64. */ EMPTY_HOWTO (R_390_GOT64), /* Empty entry for R_390_GOT64. */ EMPTY_HOWTO (R_390_PLT64), /* Empty entry for R_390_PLT64. */ - HOWTO(R_390_GOTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTENT", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_GOTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTOFF16", FALSE, 0,0x0000ffff, FALSE), + HOWTO(R_390_GOTENT, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTENT", false, 0,0xffffffff, true), + HOWTO(R_390_GOTOFF16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTOFF16", false, 0,0x0000ffff, false), EMPTY_HOWTO (R_390_GOTOFF64), /* Empty entry for R_390_GOTOFF64. */ - HOWTO(R_390_GOTPLT12, 0, 1, 12, FALSE, 0, complain_overflow_dont, - bfd_elf_generic_reloc, "R_390_GOTPLT12", FALSE, 0,0x00000fff, FALSE), - HOWTO(R_390_GOTPLT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPLT16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_GOTPLT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPLT32", FALSE, 0,0xffffffff, FALSE), + HOWTO(R_390_GOTPLT12, 0, 1, 12, false, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "R_390_GOTPLT12", false, 0,0x00000fff, false), + HOWTO(R_390_GOTPLT16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPLT16", false, 0,0x0000ffff, false), + HOWTO(R_390_GOTPLT32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPLT32", false, 0,0xffffffff, false), EMPTY_HOWTO (R_390_GOTPLT64), /* Empty entry for R_390_GOTPLT64. */ - HOWTO(R_390_GOTPLTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPLTENT",FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_PLTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLTOFF16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_PLTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLTOFF32", FALSE, 0,0xffffffff, FALSE), + HOWTO(R_390_GOTPLTENT, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPLTENT",false, 0,0xffffffff, true), + HOWTO(R_390_PLTOFF16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLTOFF16", false, 0,0x0000ffff, false), + HOWTO(R_390_PLTOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLTOFF32", false, 0,0xffffffff, false), EMPTY_HOWTO (R_390_PLTOFF64), /* Empty entry for R_390_PLTOFF64. */ - HOWTO(R_390_TLS_LOAD, 0, 0, 0, FALSE, 0, complain_overflow_dont, - s390_tls_reloc, "R_390_TLS_LOAD", FALSE, 0, 0, FALSE), - HOWTO(R_390_TLS_GDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont, - s390_tls_reloc, "R_390_TLS_GDCALL", FALSE, 0, 0, FALSE), - HOWTO(R_390_TLS_LDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont, - s390_tls_reloc, "R_390_TLS_LDCALL", FALSE, 0, 0, FALSE), - HOWTO(R_390_TLS_GD32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_GD32", FALSE, 0, 0xffffffff, FALSE), + HOWTO(R_390_TLS_LOAD, 0, 0, 0, false, 0, complain_overflow_dont, + s390_tls_reloc, "R_390_TLS_LOAD", false, 0, 0, false), + HOWTO(R_390_TLS_GDCALL, 0, 0, 0, false, 0, complain_overflow_dont, + s390_tls_reloc, "R_390_TLS_GDCALL", false, 0, 0, false), + HOWTO(R_390_TLS_LDCALL, 0, 0, 0, false, 0, complain_overflow_dont, + s390_tls_reloc, "R_390_TLS_LDCALL", false, 0, 0, false), + HOWTO(R_390_TLS_GD32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_GD32", false, 0, 0xffffffff, false), EMPTY_HOWTO (R_390_TLS_GD64), /* Empty entry for R_390_TLS_GD64. */ - HOWTO(R_390_TLS_GOTIE12, 0, 1, 12, FALSE, 0, complain_overflow_dont, - bfd_elf_generic_reloc, "R_390_TLS_GOTIE12", FALSE, 0, 0x00000fff, FALSE), - HOWTO(R_390_TLS_GOTIE32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_GOTIE32", FALSE, 0, 0xffffffff, FALSE), + HOWTO(R_390_TLS_GOTIE12, 0, 1, 12, false, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "R_390_TLS_GOTIE12", false, 0, 0x00000fff, false), + HOWTO(R_390_TLS_GOTIE32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_GOTIE32", false, 0, 0xffffffff, false), EMPTY_HOWTO (R_390_TLS_GOTIE64), /* Empty entry for R_390_TLS_GOTIE64. */ - HOWTO(R_390_TLS_LDM32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_LDM32", FALSE, 0, 0xffffffff, FALSE), + HOWTO(R_390_TLS_LDM32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_LDM32", false, 0, 0xffffffff, false), EMPTY_HOWTO (R_390_TLS_LDM64), /* Empty entry for R_390_TLS_LDM64. */ - HOWTO(R_390_TLS_IE32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_IE32", FALSE, 0, 0xffffffff, FALSE), + HOWTO(R_390_TLS_IE32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_IE32", false, 0, 0xffffffff, false), EMPTY_HOWTO (R_390_TLS_IE64), /* Empty entry for R_390_TLS_IE64. */ - HOWTO(R_390_TLS_IEENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_IEENT", FALSE, 0, 0xffffffff, TRUE), - HOWTO(R_390_TLS_LE32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_LE32", FALSE, 0, 0xffffffff, FALSE), + HOWTO(R_390_TLS_IEENT, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_IEENT", false, 0, 0xffffffff, true), + HOWTO(R_390_TLS_LE32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_LE32", false, 0, 0xffffffff, false), EMPTY_HOWTO (R_390_TLS_LE64), /* Empty entry for R_390_TLS_LE64. */ - HOWTO(R_390_TLS_LDO32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_LDO32", FALSE, 0, 0xffffffff, FALSE), + HOWTO(R_390_TLS_LDO32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_LDO32", false, 0, 0xffffffff, false), EMPTY_HOWTO (R_390_TLS_LDO64), /* Empty entry for R_390_TLS_LDO64. */ - HOWTO(R_390_TLS_DTPMOD, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_DTPMOD", FALSE, 0, 0xffffffff, FALSE), - HOWTO(R_390_TLS_DTPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", FALSE, 0, 0xffffffff, FALSE), - HOWTO(R_390_TLS_TPOFF, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_TPOFF", FALSE, 0, 0xffffffff, FALSE), - HOWTO(R_390_20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_GOT20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_GOT20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_GOTPLT20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_GOTPLT20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_TLS_GOTIE20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_TLS_GOTIE20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_IRELATIVE, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_IRELATIVE", FALSE, 0, 0xffffffff, FALSE), - HOWTO(R_390_PC12DBL, 1, 1, 12, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC12DBL", FALSE, 0,0x00000fff, TRUE), - HOWTO(R_390_PLT12DBL, 1, 1, 12, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT12DBL", FALSE, 0,0x00000fff, TRUE), - HOWTO(R_390_PC24DBL, 1, 2, 24, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC24DBL", FALSE, 0,0x00ffffff, TRUE), - HOWTO(R_390_PLT24DBL, 1, 2, 24, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT24DBL", FALSE, 0,0x00ffffff, TRUE), + HOWTO(R_390_TLS_DTPMOD, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_DTPMOD", false, 0, 0xffffffff, false), + HOWTO(R_390_TLS_DTPOFF, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", false, 0, 0xffffffff, false), + HOWTO(R_390_TLS_TPOFF, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_TPOFF", false, 0, 0xffffffff, false), + HOWTO(R_390_20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_20", false, 0,0x0fffff00, false), + HOWTO(R_390_GOT20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_GOT20", false, 0,0x0fffff00, false), + HOWTO(R_390_GOTPLT20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_GOTPLT20", false, 0,0x0fffff00, false), + HOWTO(R_390_TLS_GOTIE20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_TLS_GOTIE20", false, 0,0x0fffff00, false), + HOWTO(R_390_IRELATIVE, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_IRELATIVE", false, 0, 0xffffffff, false), + HOWTO(R_390_PC12DBL, 1, 1, 12, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC12DBL", false, 0,0x00000fff, true), + HOWTO(R_390_PLT12DBL, 1, 1, 12, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT12DBL", false, 0,0x00000fff, true), + HOWTO(R_390_PC24DBL, 1, 2, 24, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC24DBL", false, 0,0x00ffffff, true), + HOWTO(R_390_PLT24DBL, 1, 2, 24, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT24DBL", false, 0,0x00ffffff, true), }; /* GNU extension to record C++ vtable hierarchy. */ static reloc_howto_type elf32_s390_vtinherit_howto = - HOWTO (R_390_GNU_VTINHERIT, 0,2,0,FALSE,0,complain_overflow_dont, NULL, "R_390_GNU_VTINHERIT", FALSE,0, 0, FALSE); + HOWTO (R_390_GNU_VTINHERIT, 0,2,0,false,0,complain_overflow_dont, NULL, "R_390_GNU_VTINHERIT", false,0, 0, false); static reloc_howto_type elf32_s390_vtentry_howto = - HOWTO (R_390_GNU_VTENTRY, 0,2,0,FALSE,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_390_GNU_VTENTRY", FALSE,0,0, FALSE); + HOWTO (R_390_GNU_VTENTRY, 0,2,0,false,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_390_GNU_VTENTRY", false,0,0, false); static reloc_howto_type * elf_s390_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, @@ -323,7 +323,7 @@ elf_s390_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* We need to use ELF32_R_TYPE so we have our own copy of this function, and elf32-s390.c has its own copy. */ -static bfd_boolean +static bool elf_s390_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -347,12 +347,12 @@ elf_s390_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_howto_table[r_type]; } - return TRUE; + return true; } /* A relocation function which doesn't do anything. */ @@ -421,11 +421,11 @@ s390_elf_ldisp_reloc (bfd *abfd ATTRIBUTE_UNUSED, return bfd_reloc_ok; } -static bfd_boolean +static bool elf_s390_is_local_label_name (bfd *abfd, const char *name) { if (name[0] == '.' && (name[1] == 'X' || name[1] == 'L')) - return TRUE; + return true; return _bfd_elf_is_local_label_name (abfd, name); } @@ -718,14 +718,14 @@ struct elf_s390_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == S390_ELF_DATA) -static bfd_boolean +static bool elf_s390_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_s390_obj_tdata), S390_ELF_DATA); } -static bfd_boolean +static bool elf_s390_object_p (bfd *abfd) { /* Set the right machine number for an s390 elf32 file. */ @@ -880,7 +880,7 @@ elf_s390_tls_transition (struct bfd_link_info *info, allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool elf_s390_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -897,7 +897,7 @@ elf_s390_check_relocs (bfd *abfd, Elf_Internal_Sym *isym; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_s390_elf (abfd)); @@ -922,7 +922,7 @@ elf_s390_check_relocs (bfd *abfd, /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx < symtab_hdr->sh_info) @@ -931,7 +931,7 @@ elf_s390_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { @@ -941,12 +941,12 @@ elf_s390_check_relocs (bfd *abfd, htab->elf.dynobj = abfd; if (!s390_elf_create_ifunc_sections (htab->elf.dynobj, info)) - return FALSE; + return false; if (local_got_refcounts == NULL) { if (!elf_s390_allocate_local_syminfo (abfd, symtab_hdr)) - return FALSE; + return false; local_got_refcounts = elf_local_got_refcounts (abfd); } plt = elf_s390_local_plt (abfd); @@ -990,7 +990,7 @@ elf_s390_check_relocs (bfd *abfd, && local_got_refcounts == NULL) { if (!elf_s390_allocate_local_syminfo (abfd, symtab_hdr)) - return FALSE; + return false; local_got_refcounts = elf_local_got_refcounts (abfd); } /* Fall through. */ @@ -1003,7 +1003,7 @@ elf_s390_check_relocs (bfd *abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } } @@ -1012,7 +1012,7 @@ elf_s390_check_relocs (bfd *abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!s390_elf_create_ifunc_sections (htab->elf.dynobj, info)) - return FALSE; + return false; /* Make sure an IFUNC symbol defined in a non-shared object always gets a PLT slot. */ @@ -1150,7 +1150,7 @@ elf_s390_check_relocs (bfd *abfd, /* xgettext:c-format */ (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h->root.root.string); - return FALSE; + return false; } if (old_tls_type > tls_type) tls_type = old_tls_type; @@ -1259,10 +1259,10 @@ elf_s390_check_relocs (bfd *abfd, htab->elf.dynobj = abfd; sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, htab->elf.dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -1282,7 +1282,7 @@ elf_s390_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -1300,7 +1300,7 @@ elf_s390_check_relocs (bfd *abfd, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -1323,14 +1323,14 @@ elf_s390_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_390_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_390_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; default: @@ -1338,7 +1338,7 @@ elf_s390_check_relocs (bfd *abfd, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -1390,7 +1390,7 @@ elf_s390_adjust_gotplt (struct elf_s390_link_hash_entry *h) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1436,7 +1436,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, h->plt.offset = (bfd_vma) -1; h->needs_plt = 0; } - return TRUE; + return true; } /* If this is a function, put it in the procedure linkage table. We @@ -1460,7 +1460,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h); } - return TRUE; + return true; } else /* It's possible that we incorrectly decided a .plt reloc was @@ -1481,7 +1481,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, h->root.u.def.value = def->root.u.def.value; if (ELIMINATE_COPY_RELOCS || info->nocopyreloc) h->non_got_ref = def->non_got_ref; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1492,18 +1492,18 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -1511,7 +1511,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, if (ELIMINATE_COPY_RELOCS && !_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -1551,7 +1551,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info; @@ -1559,7 +1559,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = elf_s390_hash_table (info); @@ -1577,7 +1577,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (bfd_link_pic (info) @@ -1651,7 +1651,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) else if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = elf_s390_hash_entry(h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -1660,7 +1660,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->elf.sgot; @@ -1687,7 +1687,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -1727,7 +1727,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -1750,7 +1750,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -1772,19 +1772,19 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) sreloc->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_s390_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = elf_s390_hash_table (info); @@ -1901,7 +1901,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -1922,7 +1922,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -1960,7 +1960,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -2036,7 +2036,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (!is_s390_elf (input_bfd)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } htab = elf_s390_hash_table (info); @@ -2056,11 +2056,11 @@ elf_s390_relocate_section (bfd *output_bfd, asection *sec; bfd_vma off; bfd_vma relocation; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_reloc_status_type r; int tls_type; asection *base_got = htab->elf.sgot; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; r_type = ELF32_R_TYPE (rel->r_info); if (r_type == (int) R_390_GNU_VTINHERIT @@ -2069,7 +2069,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (r_type >= (int) R_390_max) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = elf_howto_table + r_type; @@ -2078,7 +2078,7 @@ elf_s390_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -2087,7 +2087,7 @@ elf_s390_relocate_section (bfd *output_bfd, { struct plt_entry *local_plt = elf_s390_local_plt (input_bfd); if (local_plt == NULL) - return FALSE; + return false; /* Address of the PLT slot. */ relocation = (htab->elf.iplt->output_section->vma @@ -2136,8 +2136,8 @@ elf_s390_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2196,7 +2196,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (r_type == R_390_GOTPLTENT) relocation += htab->elf.sgot->output_section->vma; } - unresolved_reloc = FALSE; + unresolved_reloc = false; } /* Fall through. */ @@ -2213,7 +2213,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; dyn = htab->elf.dynamic_sections_created; @@ -2296,7 +2296,7 @@ elf_s390_relocate_section (bfd *output_bfd, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2383,7 +2383,7 @@ elf_s390_relocate_section (bfd *output_bfd, case R_390_GOTPCDBL: /* Use global offset table as symbol value. */ relocation = htab->elf.sgot->output_section->vma; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_PLT12DBL: @@ -2416,7 +2416,7 @@ elf_s390_relocate_section (bfd *output_bfd, relocation = (htab->elf.splt->output_section->vma + htab->elf.splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_PLTOFF16: @@ -2444,7 +2444,7 @@ elf_s390_relocate_section (bfd *output_bfd, + htab->elf.splt->output_offset + h->plt.offset - htab->elf.sgot->output_section->vma); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_PC16: @@ -2564,7 +2564,7 @@ elf_s390_relocate_section (bfd *output_bfd, || h->root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; asection *sreloc; bfd_byte *loc; @@ -2572,16 +2572,16 @@ elf_s390_relocate_section (bfd *output_bfd, are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2608,7 +2608,7 @@ elf_s390_relocate_section (bfd *output_bfd, outrel.r_addend = relocation + rel->r_addend; if (r_type == R_390_32) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_390_RELATIVE); } else @@ -2620,7 +2620,7 @@ elf_s390_relocate_section (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error(bfd_error_bad_value); - return FALSE; + return false; } else { @@ -2788,7 +2788,7 @@ elf_s390_relocate_section (bfd *output_bfd, relocation = htab->elf.sgot->output_offset + off; if (r_type == R_390_TLS_IE32 || r_type == R_390_TLS_IEENT) relocation += htab->elf.sgot->output_section->vma; - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2828,7 +2828,7 @@ elf_s390_relocate_section (bfd *output_bfd, relocation = htab->elf.sgot->output_offset + off; if (r_type == R_390_TLS_IEENT) relocation += htab->elf.sgot->output_section->vma; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_TLS_LDM32: @@ -2866,7 +2866,7 @@ elf_s390_relocate_section (bfd *output_bfd, htab->tls_ldm_got.offset |= 1; } relocation = htab->elf.sgot->output_offset + off; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_TLS_LE32: @@ -2954,7 +2954,7 @@ elf_s390_relocate_section (bfd *output_bfd, else { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } insn = 0x18000700 | (insn & 0x00f00000) | ry; bfd_put_32 (output_bfd, insn, contents + rel->r_offset); @@ -2970,7 +2970,7 @@ elf_s390_relocate_section (bfd *output_bfd, (insn & 0xff000000) != 0x0d000000) { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1)) { @@ -3002,7 +3002,7 @@ elf_s390_relocate_section (bfd *output_bfd, if ((insn & 0xff000000) == 0x0d000000) { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } if ((insn & 0xff000000) == 0x4d000000) @@ -3035,7 +3035,7 @@ elf_s390_relocate_section (bfd *output_bfd, (insn & 0xff000000) != 0x0d000000) { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } if ((insn & 0xff000000) == 0x0d000000) @@ -3122,7 +3122,7 @@ elf_s390_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -3138,12 +3138,12 @@ elf_s390_relocate_section (bfd *output_bfd, (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"), input_bfd, input_section, (uint64_t) rel->r_offset, name, (int) r); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Generate the PLT slots together with the dynamic relocations needed @@ -3295,7 +3295,7 @@ elf_s390_finish_ifunc_symbol (bfd *output_bfd, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_s390_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3493,7 +3493,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, + htab->elf.iplt->output_offset + h->plt.offset), htab->elf.sgot->contents + h->got.offset); - return TRUE; + return true; } } else if (bfd_link_pic (info) @@ -3506,7 +3506,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, will already have been initialized in the relocate_section function. */ if (!(h->def_regular || ELF_COMMON_DEF_P (h))) - return FALSE; + return false; BFD_ASSERT((h->got.offset & 1) != 0); rela.r_info = ELF32_R_INFO (0, R_390_RELATIVE); rela.r_addend = (h->root.u.def.value @@ -3561,7 +3561,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, || h == htab->elf.hplt) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Used to decide how to sort relocs in an optimal manner for the @@ -3604,7 +3604,7 @@ elf_s390_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_s390_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3722,7 +3722,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd, asection *sec = local_plt[i].sec; isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i); if (isym == NULL) - return FALSE; + return false; if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) elf_s390_finish_ifunc_symbol (output_bfd, info, NULL, htab, @@ -3734,12 +3734,12 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd, } } } - return TRUE; + return true; } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf_s390_grok_prstatus (bfd * abfd, Elf_Internal_Note * note) { int offset; @@ -3748,7 +3748,7 @@ elf_s390_grok_prstatus (bfd * abfd, Elf_Internal_Note * note) switch (note->descsz) { default: - return FALSE; + return false; case 224: /* S/390 Linux. */ /* pr_cursig */ @@ -3768,13 +3768,13 @@ elf_s390_grok_prstatus (bfd * abfd, Elf_Internal_Note * note) size, note->descpos + offset); } -static bfd_boolean +static bool elf_s390_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* sizeof(struct elf_prpsinfo) on s390 */ elf_tdata (abfd)->core->pid @@ -3798,7 +3798,7 @@ elf_s390_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } static char * @@ -3875,19 +3875,19 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt, /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; if (!is_s390_elf (ibfd) || !is_s390_elf (obfd)) - return TRUE; + return true; if (!elf_s390_merge_obj_attributes (ibfd, info)) - return FALSE; + return false; elf_elfheader (obfd)->e_flags |= elf_elfheader (ibfd)->e_flags; - return TRUE; + return true; } @@ -3937,6 +3937,6 @@ elf32_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) #define bfd_elf32_mkobject elf_s390_mkobject #define elf_backend_object_p elf_s390_object_p -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf32-target.h" diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c index 8ed22311d2..e8a7e6388a 100644 --- a/bfd/elf32-score.c +++ b/bfd/elf32-score.c @@ -47,22 +47,22 @@ struct score_elf_link_hash_entry unsigned int possibly_dynamic_relocs; /* If the R_SCORE_ABS32, R_SCORE_REL32 reloc is against a readonly section. */ - bfd_boolean readonly_reloc; + bool readonly_reloc; /* We must not create a stub for a symbol that has relocations related to taking the function's address, i.e. any but R_SCORE_CALL15 ones. */ - bfd_boolean no_fn_stub; + bool no_fn_stub; /* Are we forced local? This will only be set if we have converted the initial global GOT entry to a local GOT entry. */ - bfd_boolean forced_local; + bool forced_local; }; /* Traverse a score ELF linker hash table. */ #define score_elf_link_hash_traverse(table, func, info) \ - (elf_link_hash_traverse \ - ((table), \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (elf_link_hash_traverse \ + ((table), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* This structure is used to hold .got entries while estimating got sizes. */ @@ -351,7 +351,7 @@ score_elf_lo16_reloc (bfd *abfd, /* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a dangerous relocation. */ -static bfd_boolean +static bool score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) { unsigned int count; @@ -361,7 +361,7 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* If we've already figured out what GP will be, just return it. */ *pgp = _bfd_get_gp_value (output_bfd); if (*pgp) - return TRUE; + return true; count = bfd_get_symcount (output_bfd); sym = bfd_get_outsymbols (output_bfd); @@ -391,10 +391,10 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* Only get the error once. */ *pgp = 4; _bfd_set_gp_value (output_bfd, *pgp); - return FALSE; + return false; } - return TRUE; + return true; } /* We have to figure out the gp value, so that we can adjust the @@ -405,7 +405,7 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) static bfd_reloc_status_type score_elf_final_gp (bfd *output_bfd, asymbol *symbol, - bfd_boolean relocatable, + bool relocatable, char **error_message, bfd_vma *pgp) { @@ -443,7 +443,7 @@ score_elf_gprel15_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, asection *input_section, - bfd_boolean relocateable, + bool relocateable, void * data, bfd_vma gp ATTRIBUTE_UNUSED) { @@ -475,7 +475,7 @@ score_elf_gprel15_with_gp (bfd *abfd, static bfd_reloc_status_type gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, - asection *input_section, bfd_boolean relocatable, + asection *input_section, bool relocatable, void *data, bfd_vma gp) { bfd_vma relocation; @@ -525,7 +525,7 @@ score_elf_gprel15_reloc (bfd *abfd, bfd *output_bfd, char **error_message) { - bfd_boolean relocateable; + bool relocateable; bfd_reloc_status_type ret; bfd_vma gp; @@ -536,10 +536,10 @@ score_elf_gprel15_reloc (bfd *abfd, return bfd_reloc_ok; } if (output_bfd != NULL) - relocateable = TRUE; + relocateable = true; else { - relocateable = FALSE; + relocateable = false; output_bfd = symbol->section->output_section->owner; } @@ -559,7 +559,7 @@ score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; @@ -574,10 +574,10 @@ score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -650,330 +650,330 @@ static reloc_howto_type elf32_score_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_HI16 */ HOWTO (R_SCORE_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_hi16_reloc, /* special_function */ "R_SCORE_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37fff, /* src_mask */ 0x37fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_LO16 */ HOWTO (R_SCORE_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_lo16_reloc, /* special_function */ "R_SCORE_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37fff, /* src_mask */ 0x37fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_BCMP */ HOWTO (R_SCORE_BCMP, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_BCMP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x03e00381, /* src_mask */ 0x03e00381, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /*R_SCORE_24 */ HOWTO (R_SCORE_24, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff7fff, /* src_mask */ 0x3ff7fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /*R_SCORE_PC19 */ HOWTO (R_SCORE_PC19, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_PC19", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff03fe, /* src_mask */ 0x3ff03fe, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /*R_SCORE16_11 */ HOWTO (R_SCORE16_11, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE16_11", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ffe, /* src_mask */ 0x000000ffe, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE16_PC8 */ HOWTO (R_SCORE16_PC8, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE16_PC8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000001ff, /* src_mask */ 0x000001ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit absolute */ HOWTO (R_SCORE_ABS32, /* type 8 */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_ABS32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit absolute */ HOWTO (R_SCORE_ABS16, /* type 11 */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_ABS16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_DUMMY2 */ HOWTO (R_SCORE_DUMMY2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_DUMMY2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_GP15 */ HOWTO (R_SCORE_GP15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_gprel15_reloc,/* special_function */ "R_SCORE_GP15", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_SCORE_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ NULL, /* special_function */ "R_SCORE_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_SCORE_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_SCORE_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_SCORE_GOT15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ score_elf_got15_reloc, /* special_function */ "R_SCORE_GOT15", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_SCORE_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_got_lo16_reloc, /* special_function */ "R_SCORE_GOT_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37ffe, /* src_mask */ 0x37ffe, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 15 bit call through global offset table. */ HOWTO (R_SCORE_CALL15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_CALL15", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit GP relative reference. */ HOWTO (R_SCORE_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_gprel32_reloc, /* special_function */ "R_SCORE_GPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit symbol relative relocation. */ HOWTO (R_SCORE_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_REL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_DUMMY_HI16 */ HOWTO (R_SCORE_DUMMY_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_hi16_reloc, /* special_function */ "R_SCORE_DUMMY_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37fff, /* src_mask */ 0x37fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_IMM30 */ HOWTO (R_SCORE_IMM30, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 30, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_IMM30", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7f7fff7f80LL, /* src_mask */ 0x7f7fff7f80LL, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_IMM32 */ HOWTO (R_SCORE_IMM32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 5, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_IMM32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7f7fff7fe0LL, /* src_mask */ 0x7f7fff7fe0LL, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; struct score_reloc_map @@ -1035,14 +1035,14 @@ score_elf_got_entry_eq (const void *entry1, const void *entry2) /* If H needs a GOT entry, assign it the highest available dynamic index. Otherwise, assign it the lowest available dynamic index. */ -static bfd_boolean +static bool score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data) { struct score_elf_hash_sort_data *hsd = data; /* Symbols without dynamic symbol table entries aren't interesting at all. */ if (h->root.dynindx == -1) - return TRUE; + return true; /* Global symbols that need GOT entries that are not explicitly referenced are marked with got offset 2. Those that are @@ -1062,11 +1062,11 @@ score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data) hsd->low = (struct elf_link_hash_entry *) h; } - return TRUE; + return true; } static asection * -score_elf_got_section (bfd *abfd, bfd_boolean maybe_excluded) +score_elf_got_section (bfd *abfd, bool maybe_excluded) { asection *sgot = bfd_get_linker_section (abfd, ".got"); @@ -1083,7 +1083,7 @@ score_elf_got_info (bfd *abfd, asection **sgotp) asection *sgot; struct score_got_info *g; - sgot = score_elf_got_section (abfd, TRUE); + sgot = score_elf_got_section (abfd, true); BFD_ASSERT (sgot != NULL); BFD_ASSERT (elf_section_data (sgot) != NULL); g = score_elf_section_data (sgot)->u.got_info; @@ -1100,7 +1100,7 @@ score_elf_got_info (bfd *abfd, asection **sgotp) known to be in the dynamic symbol table. During s3_bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the section symbols are added and the count is higher. */ -static bfd_boolean +static bool score_elf_sort_hash_table (struct bfd_link_info *info, unsigned long max_local) { @@ -1138,7 +1138,7 @@ score_elf_sort_hash_table (struct bfd_link_info *info, table index in the GOT. */ g->global_gotsym = hsd.low; - return TRUE; + return true; } /* Create an entry in an score ELF linker hash table. */ @@ -1163,9 +1163,9 @@ score_elf_link_hash_newfunc (struct bfd_hash_entry *entry, if (ret != NULL) { ret->possibly_dynamic_relocs = 0; - ret->readonly_reloc = FALSE; - ret->no_fn_stub = FALSE; - ret->forced_local = FALSE; + ret->readonly_reloc = false; + ret->no_fn_stub = false; + ret->forced_local = false; } return (struct bfd_hash_entry *) ret; @@ -1206,11 +1206,11 @@ score_elf_sort_dynamic_relocs (const void *arg1, const void *arg2) } /* Return whether a relocation is against a local symbol. */ -static bfd_boolean +static bool score_elf_local_relocation_p (bfd *input_bfd, const Elf_Internal_Rela *relocation, asection **local_sections, - bfd_boolean check_forced) + bool check_forced) { unsigned long r_symndx; Elf_Internal_Shdr *symtab_hdr; @@ -1222,9 +1222,9 @@ score_elf_local_relocation_p (bfd *input_bfd, extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info; if (r_symndx < extsymoff) - return TRUE; + return true; if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL) - return TRUE; + return true; if (check_forced) { @@ -1236,15 +1236,15 @@ score_elf_local_relocation_p (bfd *input_bfd, || h->root.root.type == bfd_link_hash_warning) h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; if (h->root.forced_local) - return TRUE; + return true; } - return FALSE; + return false; } /* Returns the dynamic relocation section for DYNOBJ. */ static asection * -score_elf_rel_dyn_section (bfd *dynobj, bfd_boolean create_p) +score_elf_rel_dyn_section (bfd *dynobj, bool create_p) { static const char dname[] = ".rel.dyn"; asection *sreloc; @@ -1272,7 +1272,7 @@ score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n) { asection *s; - s = score_elf_rel_dyn_section (abfd, FALSE); + s = score_elf_rel_dyn_section (abfd, false); BFD_ASSERT (s != NULL); if (s->size == 0) @@ -1288,7 +1288,7 @@ score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n) is the original relocation, which is now being transformed into a dynamic relocation. The ADDENDP is adjusted if necessary; the caller should store the result in place of the original addend. */ -static bfd_boolean +static bool score_elf_create_dynamic_relocation (bfd *output_bfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel, @@ -1301,11 +1301,11 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, bfd *dynobj; int r_type; long indx; - bfd_boolean defined_p; + bool defined_p; r_type = ELF32_R_TYPE (rel->r_info); dynobj = elf_hash_table (info)->dynobj; - sreloc = score_elf_rel_dyn_section (dynobj, FALSE); + sreloc = score_elf_rel_dyn_section (dynobj, false); BFD_ASSERT (sreloc != NULL); BFD_ASSERT (sreloc->contents != NULL); BFD_ASSERT (sreloc->reloc_count * SCORE_ELF_REL_SIZE (output_bfd) < sreloc->size); @@ -1319,7 +1319,7 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, if (outrel[0].r_offset == MINUS_ONE) /* The relocation field has been deleted. */ - return TRUE; + return true; if (outrel[0].r_offset == MINUS_TWO) { @@ -1327,7 +1327,7 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, some sort. Functions like _bfd_elf_write_section_eh_frame expect the field to be fully relocated, so add in the symbol's value. */ *addendp += symbol; - return TRUE; + return true; } /* We must now calculate the dynamic symbol table index to use @@ -1343,12 +1343,12 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, relocation field. It therefore treats relocs against defined symbols in the same way as relocs against undefined symbols. */ - defined_p = FALSE; + defined_p = false; } else { indx = 0; - defined_p = TRUE; + defined_p = true; } /* If the relocation was previously an absolute relocation and @@ -1400,13 +1400,13 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, will be writing to it. */ elf_section_data (input_section->output_section)->this_hdr.sh_flags |= SHF_WRITE; - return TRUE; + return true; } -static bfd_boolean +static bool score_elf_create_got_section (bfd *abfd, struct bfd_link_info *info, - bfd_boolean maybe_exclude) + bool maybe_exclude) { flagword flags; asection *s; @@ -1416,12 +1416,12 @@ score_elf_create_got_section (bfd *abfd, size_t amt; /* This function may be called more than once. */ - s = score_elf_got_section (abfd, TRUE); + s = score_elf_got_section (abfd, true); if (s) { if (! maybe_exclude) s->flags &= ~SEC_EXCLUDE; - return TRUE; + return true; } flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -1435,7 +1435,7 @@ score_elf_create_got_section (bfd *abfd, elf_hash_table (info)->sgot = s; if (s == NULL || !bfd_set_section_alignment (s, 4)) - return FALSE; + return false; /* Define the symbol _GLOBAL_OFFSET_TABLE_. We don't do this in the linker script because we don't want to define the symbol if we @@ -1443,8 +1443,8 @@ score_elf_create_got_section (bfd *abfd, bh = NULL; if (! (_bfd_generic_link_add_one_symbol (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s, - 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; @@ -1453,12 +1453,12 @@ score_elf_create_got_section (bfd *abfd, elf_hash_table (info)->hgot = h; if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; amt = sizeof (struct score_got_info); g = bfd_alloc (abfd, amt); if (g == NULL) - return FALSE; + return false; g->global_gotsym = NULL; g->global_gotno = 0; @@ -1470,11 +1470,11 @@ score_elf_create_got_section (bfd *abfd, g->got_entries = htab_try_create (1, score_elf_got_entry_hash, score_elf_got_entry_eq, NULL); if (g->got_entries == NULL) - return FALSE; + return false; score_elf_section_data (s)->u.got_info = g; score_elf_section_data (s)->elf.this_hdr.sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL; - return TRUE; + return true; } /* Calculate the %high function. */ @@ -1535,7 +1535,7 @@ score_elf_create_local_got_entry (bfd *abfd, for value. Return the index into the GOT for this entry. */ static bfd_vma score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, - bfd_vma value, bfd_boolean external) + bfd_vma value, bool external) { asection *sgot; struct score_got_info *g; @@ -1563,7 +1563,7 @@ score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, static void s3_bfd_score_elf_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *entry, - bfd_boolean force_local) + bool force_local) { bfd *dynobj; asection *got; @@ -1573,12 +1573,12 @@ s3_bfd_score_elf_hide_symbol (struct bfd_link_info *info, h = (struct score_elf_link_hash_entry *) entry; if (h->forced_local) return; - h->forced_local = TRUE; + h->forced_local = true; dynobj = elf_hash_table (info)->dynobj; if (dynobj != NULL && force_local) { - got = score_elf_got_section (dynobj, FALSE); + got = score_elf_got_section (dynobj, false); if (got == NULL) return; g = score_elf_section_data (got)->u.got_info; @@ -1637,7 +1637,7 @@ s3_bfd_score_elf_hide_symbol (struct bfd_link_info *info, /* If H is a symbol that needs a global GOT entry, but has a dynamic symbol table index lower than any we've seen to date, record it for posterity. */ -static bfd_boolean +static bool score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, bfd *abfd, struct bfd_link_info *info, @@ -1652,11 +1652,11 @@ score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, { case STV_INTERNAL: case STV_HIDDEN: - s3_bfd_score_elf_hide_symbol (info, h, TRUE); + s3_bfd_score_elf_hide_symbol (info, h, true); break; } if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } entry.abfd = abfd; @@ -1668,30 +1668,30 @@ score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, /* If we've already marked this entry as needing GOT space, we don't need to do it again. */ if (*loc) - return TRUE; + return true; *loc = bfd_alloc (abfd, sizeof entry); if (! *loc) - return FALSE; + return false; entry.gotidx = -1; memcpy (*loc, &entry, sizeof (entry)); if (h->got.offset != MINUS_ONE) - return TRUE; + return true; /* By setting this to a value other than -1, we are indicating that there needs to be a GOT entry for H. Avoid using zero, as the generic ELF copy_indirect_symbol tests for <= 0. */ h->got.offset = 1; - return TRUE; + return true; } /* Reserve space in G for a GOT entry containing the value of symbol SYMNDX in input bfd ABDF, plus ADDEND. */ -static bfd_boolean +static bool score_elf_record_local_got_symbol (bfd *abfd, long symndx, bfd_vma addend, @@ -1705,17 +1705,17 @@ score_elf_record_local_got_symbol (bfd *abfd, loc = (struct score_got_entry **)htab_find_slot (g->got_entries, &entry, INSERT); if (*loc) - return TRUE; + return true; entry.gotidx = g->local_gotno++; *loc = bfd_alloc (abfd, sizeof(entry)); if (! *loc) - return FALSE; + return false; memcpy (*loc, &entry, sizeof (entry)); - return TRUE; + return true; } /* Returns the GOT offset at which the indicated address can be found. @@ -1977,7 +1977,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, int sym_flags ATTRIBUTE_UNUSED, struct score_elf_link_hash_entry *h, asection **local_sections, - bfd_boolean gp_disp_p) + bool gp_disp_p) { unsigned long r_type; unsigned long r_symndx; @@ -1992,7 +1992,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, symbol, adjusted by the addend, resides during execution. */ bfd_vma g = MINUS_ONE; /* TRUE if the symbol referred to by this relocation is a local symbol. */ - bfd_boolean local_p; + bool local_p; /* The eventual value we will relocate. */ bfd_vma value = symbol; unsigned long hi16_addend, hi16_offset, hi16_value, uvalue, offset, abs_value = 0; @@ -2031,7 +2031,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); rel_addr = (input_section->output_section->vma + input_section->output_offset + rel->r_offset); - local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, TRUE); + local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, true); if (r_type == R_SCORE_GOT15) { @@ -2078,7 +2078,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, symbol is defined locally, or was forced to be local. We must initialize this entry in the GOT. */ bfd *tmpbfd = elf_hash_table (info)->dynobj; - asection *sgot = score_elf_got_section (tmpbfd, FALSE); + asection *sgot = score_elf_got_section (tmpbfd, false); score_bfd_put_32 (tmpbfd, value, sgot->contents + g); } } @@ -2322,12 +2322,12 @@ score_elf_final_link_relocate (reloc_howto_type *howto, case R_SCORE_CALL15: if (local_p) { - bfd_boolean forced; + bool forced; /* The special case is when the symbol is forced to be local. We need the full address in the GOT since no R_SCORE_GOT_LO16 relocation follows. */ forced = ! score_elf_local_relocation_p (input_bfd, rel, - local_sections, FALSE); + local_sections, false); value = score_elf_got16_entry (output_bfd, input_bfd, info, symbol + addend, forced); if (value == MINUS_ONE) @@ -2378,7 +2378,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, } /* Score backend functions. */ -static bfd_boolean +static bool s3_bfd_score_info_to_howto (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) @@ -2392,11 +2392,11 @@ s3_bfd_score_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_reloc->howto = &elf32_score_howto_table[r_type]; - return TRUE; + return true; } /* Relocate an score ELF section. */ @@ -2417,7 +2417,7 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd, unsigned long offset; unsigned long hi16_addend, hi16_offset, hi16_value, uvalue; size_t extsymoff; - bfd_boolean gp_disp_p = FALSE; + bool gp_disp_p = false; /* Sort dynsym. */ if (elf_hash_table (info)->dynamic_sections_created) @@ -2436,7 +2436,7 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd, } if (!score_elf_sort_hash_table (info, dynsecsymcount + 1)) - return FALSE; + return false; } symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; @@ -2638,7 +2638,7 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd, if (r_type != R_SCORE_HI16 && r_type != R_SCORE_LO16) return bfd_reloc_notsupported; - gp_disp_p = TRUE; + gp_disp_p = true; } /* If this symbol is defined, calculate its address. Note that @@ -2736,7 +2736,7 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd, break; case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -2768,12 +2768,12 @@ s3_bfd_score_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Look through the relocs for a section during the first phase, and allocate space in the global offset table. */ -static bfd_boolean +static bool s3_bfd_score_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2790,7 +2790,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, asection *sreloc; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -2804,7 +2804,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, } else { - sgot = score_elf_got_section (dynobj, FALSE); + sgot = score_elf_got_section (dynobj, false); if (sgot == NULL) g = NULL; else @@ -2836,7 +2836,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, /* xgettext:c-format */ (_("%pB: malformed reloc detected for section %pA"), abfd, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -2859,8 +2859,8 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, case R_SCORE_CALL15: if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; - if (!score_elf_create_got_section (dynobj, info, FALSE)) - return FALSE; + if (!score_elf_create_got_section (dynobj, info, false)) + return false; g = score_elf_got_info (dynobj, &sgot); break; case R_SCORE_ABS32: @@ -2878,7 +2878,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, if (!h && (r_type == R_SCORE_GOT_LO16)) { if (! score_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, g)) - return FALSE; + return false; } switch (r_type) @@ -2891,13 +2891,13 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, (_("%pB: CALL15 reloc at %#" PRIx64 " not against global symbol"), abfd, (uint64_t) rel->r_offset); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { /* This symbol requires a global offset table entry. */ if (! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; + return false; /* We need a stub, not a plt entry for the undefined function. But we record it as if it needs plt. See _bfd_elf_adjust_dynamic_symbol. */ @@ -2907,7 +2907,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, break; case R_SCORE_GOT15: if (h && ! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; + return false; break; case R_SCORE_ABS32: case R_SCORE_REL32: @@ -2916,9 +2916,9 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, { if (sreloc == NULL) { - sreloc = score_elf_rel_dyn_section (dynobj, TRUE); + sreloc = score_elf_rel_dyn_section (dynobj, true); if (sreloc == NULL) - return FALSE; + return false; } #define SCORE_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY) if (bfd_link_pic (info)) @@ -2945,7 +2945,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, == SCORE_READONLY_SECTION) /* We need it to tell the dynamic linker if there are relocations against the text segment. */ - hscore->readonly_reloc = TRUE; + hscore->readonly_reloc = true; } /* Even though we don't directly need a GOT entry for this symbol, @@ -2955,11 +2955,11 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, { if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; - if (! score_elf_create_got_section (dynobj, info, TRUE)) - return FALSE; + if (! score_elf_create_got_section (dynobj, info, true)) + return false; g = score_elf_got_info (dynobj, &sgot); if (! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; + return false; } } break; @@ -2968,14 +2968,14 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_SCORE_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_SCORE_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; default: break; @@ -2991,7 +2991,7 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, struct score_elf_link_hash_entry *sh; sh = (struct score_elf_link_hash_entry *) h; - sh->no_fn_stub = TRUE; + sh->no_fn_stub = true; } break; case R_SCORE_CALL15: @@ -2999,10 +2999,10 @@ s3_bfd_score_elf_check_relocs (bfd *abfd, } } - return TRUE; + return true; } -static bfd_boolean +static bool s3_bfd_score_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -3024,7 +3024,7 @@ s3_bfd_score_elf_add_symbol_hook (bfd *abfd, break; } - return TRUE; + return true; } static void @@ -3062,7 +3062,7 @@ s3_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_U return 1; } -static bfd_boolean +static bool s3_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) @@ -3070,17 +3070,17 @@ s3_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, if (strcmp (bfd_section_name (sec), ".scommon") == 0) { *retval = SHN_SCORE_SCOMMON; - return TRUE; + return true; } - return FALSE; + return false; } /* Adjust a symbol defined by a dynamic object and referenced by a regular object. The current definition is in some section of the dynamic object, but we're not including those sections. We have to change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool s3_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -3115,7 +3115,7 @@ s3_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!hscore->no_fn_stub && h->needs_plt) { if (!elf_hash_table (info)->dynamic_sections_created) - return TRUE; + return true; /* If this symbol is not defined in a regular file, then set the symbol to the stub location. This is required to make @@ -3138,7 +3138,7 @@ s3_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* The last half word of the stub will be filled with the index of this symbol in .dynsym section. */ - return TRUE; + return true; } } else if ((h->type == STT_FUNC) && !h->needs_plt) @@ -3146,7 +3146,7 @@ s3_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* This will set the entry for this symbol in the GOT to 0, and the dynamic linker will take care of this. */ h->root.u.def.value = 0; - return TRUE; + return true; } /* If this is a weak symbol, and there is a real definition, the @@ -3158,17 +3158,17 @@ s3_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which is not a function. */ - return TRUE; + return true; } /* This function is called after all the input files have been read, and the input sections have been assigned to output sections. */ -static bfd_boolean +static bool s3_bfd_score_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3183,11 +3183,11 @@ s3_bfd_score_elf_always_size_sections (bfd *output_bfd, dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) /* Relocatable links don't have it. */ - return TRUE; + return true; g = score_elf_got_info (dynobj, &s); if (s == NULL) - return TRUE; + return true; /* Calculate the total loadable size of the output. That will give us the maximum number of GOT_PAGE entries required. */ @@ -3212,7 +3212,7 @@ s3_bfd_score_elf_always_size_sections (bfd *output_bfd, that need GOT entries at the end of the symbol table. We do that here. */ if (! score_elf_sort_hash_table (info, 1)) - return FALSE; + return false; if (g->global_gotsym != NULL) i = elf_hash_table (info)->dynsymcount - g->global_gotsym->dynindx; @@ -3241,16 +3241,16 @@ s3_bfd_score_elf_always_size_sections (bfd *output_bfd, /* Fixme. Error message or Warning message should be issued here. */ } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean reltext; + bool reltext; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -3270,7 +3270,7 @@ s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - reltext = FALSE; + reltext = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -3312,7 +3312,7 @@ s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i if ((target != NULL && (target->flags & SEC_READONLY) != 0 && (target->flags & SEC_ALLOC) != 0) || strcmp (outname, ".rel.dyn") == 0) - reltext = TRUE; + reltext = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3344,7 +3344,7 @@ s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i if (s->contents == NULL && s->size != 0) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } } @@ -3357,7 +3357,7 @@ s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i dynamic linker and used by the debugger. */ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0)) - return FALSE; + return false; if (reltext) info->flags |= DF_TEXTREL; @@ -3365,47 +3365,47 @@ s3_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i if ((info->flags & DF_TEXTREL) != 0) { if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0)) - return FALSE; + return false; } if (! SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0)) - return FALSE; + return false; - if (score_elf_rel_dyn_section (dynobj, FALSE)) + if (score_elf_rel_dyn_section (dynobj, false)) { if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0)) - return FALSE; + return false; } if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_BASE_ADDRESS, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_LOCAL_GOTNO, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_SYMTABNO, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_UNREFEXTNO, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_GOTSYM, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_HIPAGENO, 0)) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool s3_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_entry *h; @@ -3421,15 +3421,15 @@ s3_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s != NULL) { if (!bfd_set_section_flags (s, flags)) - return FALSE; + return false; } /* We need to create .got section. */ - if (!score_elf_create_got_section (abfd, info, FALSE)) - return FALSE; + if (!score_elf_create_got_section (abfd, info, false)) + return false; - if (!score_elf_rel_dyn_section (elf_hash_table (info)->dynobj, TRUE)) - return FALSE; + if (!score_elf_rel_dyn_section (elf_hash_table (info)->dynobj, true)) + return false; /* Create .stub section. */ if (bfd_get_linker_section (abfd, SCORE_ELF_STUB_SECTION_NAME) == NULL) @@ -3439,7 +3439,7 @@ s3_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; } if (!bfd_link_pic (info)) @@ -3450,8 +3450,8 @@ s3_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) bh = NULL; if (!(_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, - (bfd_vma) 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + (bfd_vma) 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *)bh; h->non_elf = 0; @@ -3459,16 +3459,16 @@ s3_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) h->type = STT_SECTION; if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool s3_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3494,7 +3494,7 @@ s3_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, /* FIXME: Can h->dynindex be more than 64K? */ if (h->dynindx & 0xffff0000) - return FALSE; + return false; /* Fill the stub. */ score_bfd_put_32 (output_bfd, STUB_LW, stub); @@ -3517,7 +3517,7 @@ s3_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, BFD_ASSERT (h->dynindx != -1 || h->forced_local); - sgot = score_elf_got_section (dynobj, FALSE); + sgot = score_elf_got_section (dynobj, false); BFD_ASSERT (sgot != NULL); BFD_ASSERT (score_elf_section_data (sgot) != NULL); g = score_elf_section_data (sgot)->u.got_info; @@ -3553,11 +3553,11 @@ s3_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, sym->st_value = elf_gp (output_bfd); } - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3571,7 +3571,7 @@ s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, sdyn = bfd_get_linker_section (dynobj, ".dynamic"); - sgot = score_elf_got_section (dynobj, FALSE); + sgot = score_elf_got_section (dynobj, false); if (sgot == NULL) g = NULL; else @@ -3595,13 +3595,13 @@ s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, Elf_Internal_Dyn dyn; const char *name; size_t elemsize; - bfd_boolean swap_out_p; + bool swap_out_p; /* Read in the current dynamic entry. */ (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn); /* Assume that we're going to modify it and write it out. */ - swap_out_p = TRUE; + swap_out_p = true; switch (dyn.d_tag) { @@ -3660,7 +3660,7 @@ s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, break; default: - swap_out_p = FALSE; + swap_out_p = false; break; } @@ -3684,7 +3684,7 @@ s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, /* We need to sort the entries of the dynamic relocation section. */ - s = score_elf_rel_dyn_section (dynobj, FALSE); + s = score_elf_rel_dyn_section (dynobj, false); if (s != NULL && s->size > (bfd_vma)2 * SCORE_ELF_REL_SIZE (output_bfd)) { @@ -3693,12 +3693,12 @@ s3_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, sizeof (Elf32_External_Rel), score_elf_sort_dynamic_relocs); } - return TRUE; + return true; } /* This function set up the ELF section header for a BFD section in preparation for writing it out. This is where the flags and type fields are set for unusual sections. */ -static bfd_boolean +static bool s3_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) @@ -3713,7 +3713,7 @@ s3_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, || strcmp (name, ".sbss") == 0) hdr->sh_flags |= SHF_SCORE_GPREL; - return TRUE; + return true; } /* This function do additional processing on the ELF section header before writing @@ -3723,7 +3723,7 @@ s3_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, warning message will be issued. backend_fake_section is called before assign_file_positions_except_relocs(); backend_section_processing after it. so, we modify section flag there, but not backend_fake_section. */ -static bfd_boolean +static bool s3_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr) { if (hdr->bfd_section != NULL) @@ -3747,20 +3747,20 @@ s3_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Sh } } - return TRUE; + return true; } -static bfd_boolean +static bool s3_bfd_score_elf_write_section (bfd *output_bfd, asection *sec, bfd_byte *contents) { bfd_byte *to, *from, *end; int i; if (strcmp (sec->name, ".pdr") != 0) - return FALSE; + return false; if (score_elf_section_data (sec)->u.tdata == NULL) - return FALSE; + return false; to = contents; end = contents + sec->size; @@ -3777,7 +3777,7 @@ s3_bfd_score_elf_write_section (bfd *output_bfd, asection *sec, bfd_byte *conten bfd_set_section_contents (output_bfd, sec->output_section, contents, (file_ptr) sec->output_offset, sec->size); - return TRUE; + return true; } /* Copy data from a SCORE ELF indirect symbol to its direct symbol, hiding the old @@ -3799,36 +3799,36 @@ s3_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info, dirscore->possibly_dynamic_relocs += indscore->possibly_dynamic_relocs; if (indscore->readonly_reloc) - dirscore->readonly_reloc = TRUE; + dirscore->readonly_reloc = true; if (indscore->no_fn_stub) - dirscore->no_fn_stub = TRUE; + dirscore->no_fn_stub = true; } /* Remove information about discarded functions from other sections which mention them. */ -static bfd_boolean +static bool s3_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, struct bfd_link_info *info) { asection *o; - bfd_boolean ret = FALSE; + bool ret = false; unsigned char *tdata; size_t i, skip; o = bfd_get_section_by_name (abfd, ".pdr"); if ((!o) || (o->size == 0) || (o->size % PDR_SIZE != 0) || (o->output_section != NULL && bfd_is_abs_section (o->output_section))) - return FALSE; + return false; tdata = bfd_zmalloc (o->size / PDR_SIZE); if (!tdata) - return FALSE; + return false; cookie->rels = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory); if (!cookie->rels) { free (tdata); - return FALSE; + return false; } cookie->rel = cookie->rels; @@ -3847,7 +3847,7 @@ s3_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, { score_elf_section_data (o)->u.tdata = tdata; o->size -= skip * PDR_SIZE; - ret = TRUE; + ret = true; } else free (tdata); @@ -3859,12 +3859,12 @@ s3_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, } /* Signal that discard_info() has removed the discarded relocations for this section. */ -static bfd_boolean +static bool s3_bfd_score_elf_ignore_discarded_relocs (asection *sec) { if (strcmp (sec->name, ".pdr") == 0) - return TRUE; - return FALSE; + return true; + return false; } /* Return the section that should be marked against GC for a given @@ -3889,7 +3889,7 @@ s3_bfd_score_elf_gc_mark_hook (asection *sec, /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool s3_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -3898,7 +3898,7 @@ s3_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 148: /* Linux/Score 32-bit. */ /* pr_cursig */ @@ -3921,13 +3921,13 @@ s3_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) note->descpos + offset); } -static bfd_boolean +static bool s3_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/Score elf_prpsinfo. */ elf_tdata (abfd)->core->program @@ -3948,7 +3948,7 @@ s3_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } @@ -3982,7 +3982,7 @@ elf32_score_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -static bfd_boolean +static bool s3_elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -4004,10 +4004,10 @@ s3_elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) } fputc ('\n', file); - return TRUE; + return true; } -static bfd_boolean +static bool s3_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -4015,25 +4015,25 @@ s3_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword out_flags; if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; if (! elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -4042,7 +4042,7 @@ s3_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); } - return TRUE; + return true; } if (((in_flags & EF_SCORE_PIC) != 0) != ((out_flags & EF_SCORE_PIC) != 0)) @@ -4051,10 +4051,10 @@ s3_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* FIXME: Maybe dependency fix compatibility should be checked here. */ - return TRUE; + return true; } -static bfd_boolean +static bool s3_elf32_score_new_section_hook (bfd *abfd, asection *sec) { struct _score_elf_section_data *sdata; @@ -4062,7 +4062,7 @@ s3_elf32_score_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; return _bfd_elf_new_section_hook (abfd, sec); @@ -4071,7 +4071,7 @@ s3_elf32_score_new_section_hook (bfd *abfd, asection *sec) /*****************************************************************************/ /* s3_s7: backend hooks. */ -static bfd_boolean +static bool _bfd_score_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) @@ -4102,7 +4102,7 @@ _bfd_score_elf_relocate_section (bfd *output_bfd, local_syms, local_sections); } -static bfd_boolean +static bool _bfd_score_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -4114,7 +4114,7 @@ _bfd_score_elf_check_relocs (bfd *abfd, return s7_bfd_score_elf_check_relocs (abfd, info, sec, relocs); } -static bfd_boolean +static bool _bfd_score_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -4164,7 +4164,7 @@ _bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNU return s7_bfd_score_elf_link_output_symbol_hook (info, name, sym, input_sec, h); } -static bfd_boolean +static bool _bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) @@ -4175,7 +4175,7 @@ _bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, return s7_bfd_score_elf_section_from_bfd_section (abfd, sec, retval); } -static bfd_boolean +static bool _bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -4185,7 +4185,7 @@ _bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, return s7_bfd_score_elf_adjust_dynamic_symbol (info, h); } -static bfd_boolean +static bool _bfd_score_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -4195,7 +4195,7 @@ _bfd_score_elf_always_size_sections (bfd *output_bfd, return s7_bfd_score_elf_always_size_sections (output_bfd, info); } -static bfd_boolean +static bool _bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { if (bfd_get_mach (output_bfd) == bfd_mach_score3) @@ -4204,7 +4204,7 @@ _bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *inf return s7_bfd_score_elf_size_dynamic_sections (output_bfd, info); } -static bfd_boolean +static bool _bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { if (bfd_get_mach (abfd) == bfd_mach_score3) @@ -4213,7 +4213,7 @@ _bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) return s7_bfd_score_elf_create_dynamic_sections (abfd, info); } -static bfd_boolean +static bool _bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -4225,7 +4225,7 @@ _bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, return s7_bfd_score_elf_finish_dynamic_symbol (output_bfd, info, h, sym); } -static bfd_boolean +static bool _bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -4235,7 +4235,7 @@ _bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, return s7_bfd_score_elf_finish_dynamic_sections (output_bfd, info); } -static bfd_boolean +static bool _bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) @@ -4246,7 +4246,7 @@ _bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, return s7_bfd_score_elf_fake_sections (abfd, hdr, sec); } -static bfd_boolean +static bool _bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr) { if (bfd_get_mach (abfd) == bfd_mach_score3) @@ -4255,7 +4255,7 @@ _bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr return s7_bfd_score_elf_section_processing (abfd, hdr); } -static bfd_boolean +static bool _bfd_score_elf_write_section (bfd *output_bfd, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, asection *sec, bfd_byte *contents) @@ -4280,7 +4280,7 @@ _bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info, static void _bfd_score_elf_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *entry, - bfd_boolean force_local) + bool force_local) { if (bfd_get_mach (info->input_bfds) == bfd_mach_score3) return s3_bfd_score_elf_hide_symbol (info, entry, force_local); @@ -4288,7 +4288,7 @@ _bfd_score_elf_hide_symbol (struct bfd_link_info *info, return s7_bfd_score_elf_hide_symbol (info, entry, force_local); } -static bfd_boolean +static bool _bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, struct bfd_link_info *info) { @@ -4298,7 +4298,7 @@ _bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, return s7_bfd_score_elf_discard_info (abfd, cookie, info); } -static bfd_boolean +static bool _bfd_score_elf_ignore_discarded_relocs (asection *sec) { if (bfd_get_mach (sec->owner) == bfd_mach_score3) @@ -4320,7 +4320,7 @@ _bfd_score_elf_gc_mark_hook (asection *sec, return s7_bfd_score_elf_gc_mark_hook (sec, info, rel, h, sym); } -static bfd_boolean +static bool _bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { if (bfd_get_mach (abfd) == bfd_mach_score3) @@ -4329,7 +4329,7 @@ _bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) return s7_bfd_score_elf_grok_prstatus (abfd, note); } -static bfd_boolean +static bool _bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (bfd_get_mach (abfd) == bfd_mach_score3) @@ -4377,7 +4377,7 @@ elf32_score_link_hash_table_create (bfd *abfd) return &ret->root; } -static bfd_boolean +static bool elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) { if (bfd_get_mach (abfd) == bfd_mach_score3) @@ -4386,7 +4386,7 @@ elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) return s7_elf32_score_print_private_bfd_data (abfd, ptr); } -static bfd_boolean +static bool elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { if (bfd_get_mach (info->output_bfd) == bfd_mach_score3) @@ -4395,7 +4395,7 @@ elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return s7_elf32_score_merge_private_bfd_data (ibfd, info); } -static bfd_boolean +static bool elf32_score_new_section_hook (bfd *abfd, asection *sec) { if (bfd_get_mach (abfd) == bfd_mach_score3) @@ -4408,7 +4408,7 @@ elf32_score_new_section_hook (bfd *abfd, asection *sec) /* s3_s7: don't need to split. */ /* Set the right machine number. */ -static bfd_boolean +static bool _bfd_score_elf_score_object_p (bfd * abfd) { int e_set = bfd_mach_score7; @@ -4433,7 +4433,7 @@ _bfd_score_elf_score_object_p (bfd * abfd) return bfd_default_set_arch_mach (abfd, bfd_arch_score, e_set); } -bfd_boolean +bool _bfd_score_elf_common_definition (Elf_Internal_Sym *sym) { return (sym->st_shndx == SHN_COMMON || sym->st_shndx == SHN_SCORE_SCOMMON); @@ -4490,8 +4490,8 @@ _bfd_score_elf_common_definition (Elf_Internal_Sym *sym) #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size (4 * SCORE_RESERVED_GOTNO) #define elf_backend_plt_header_size 0 -#define elf_backend_collect TRUE -#define elf_backend_type_change_ok TRUE +#define elf_backend_collect true +#define elf_backend_type_change_ok true #define elf_backend_object_p _bfd_score_elf_score_object_p #define bfd_elf32_bfd_reloc_type_lookup elf32_score_reloc_type_lookup diff --git a/bfd/elf32-score.h b/bfd/elf32-score.h index fdde38f9ce..156781ec06 100644 --- a/bfd/elf32-score.h +++ b/bfd/elf32-score.h @@ -28,9 +28,9 @@ extern void s7_bfd_score_elf_hide_symbol (struct bfd_link_info *, struct elf_link_hash_entry *, - bfd_boolean); + bool); -extern bfd_boolean +extern bool s7_bfd_score_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *); extern int @@ -43,13 +43,13 @@ s7_bfd_score_elf_relocate_section (bfd *, Elf_Internal_Sym *, asection **); -extern bfd_boolean +extern bool s7_bfd_score_elf_check_relocs (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); -extern bfd_boolean +extern bool s7_bfd_score_elf_add_symbol_hook (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, @@ -68,42 +68,42 @@ s7_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *, asection *, struct elf_link_hash_entry *); -extern bfd_boolean +extern bool s7_bfd_score_elf_section_from_bfd_section (bfd *, asection *, int *); -extern bfd_boolean +extern bool s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -extern bfd_boolean +extern bool s7_bfd_score_elf_always_size_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool s7_bfd_score_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool s7_bfd_score_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool s7_bfd_score_elf_finish_dynamic_symbol (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *); -extern bfd_boolean +extern bool s7_bfd_score_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool s7_bfd_score_elf_fake_sections (bfd *, Elf_Internal_Shdr *, asection *); -extern bfd_boolean +extern bool s7_bfd_score_elf_section_processing (bfd *, Elf_Internal_Shdr *); -extern bfd_boolean +extern bool s7_bfd_score_elf_write_section (bfd *, asection *, bfd_byte *); extern void @@ -111,11 +111,11 @@ s7_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); -extern bfd_boolean +extern bool s7_bfd_score_elf_discard_info (bfd *, struct elf_reloc_cookie *, struct bfd_link_info *); -extern bfd_boolean +extern bool s7_bfd_score_elf_ignore_discarded_relocs (asection *); extern asection * @@ -125,10 +125,10 @@ s7_bfd_score_elf_gc_mark_hook (asection *, struct elf_link_hash_entry *, Elf_Internal_Sym *); -extern bfd_boolean +extern bool s7_bfd_score_elf_grok_prstatus (bfd *, Elf_Internal_Note *); -extern bfd_boolean +extern bool s7_bfd_score_elf_grok_psinfo (bfd *, Elf_Internal_Note *); extern reloc_howto_type * @@ -137,16 +137,16 @@ s7_elf32_score_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); extern struct bfd_link_hash_table * s7_elf32_score_link_hash_table_create (bfd *); -extern bfd_boolean +extern bool s7_elf32_score_print_private_bfd_data (bfd *, void *); -extern bfd_boolean +extern bool s7_elf32_score_merge_private_bfd_data (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool s7_elf32_score_new_section_hook (bfd *, asection *); -extern bfd_boolean +extern bool _bfd_score_elf_common_definition (Elf_Internal_Sym *); #define elf_backend_common_definition _bfd_score_elf_common_definition diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c index b16c693200..a6960c02c5 100644 --- a/bfd/elf32-score7.c +++ b/bfd/elf32-score7.c @@ -44,22 +44,22 @@ struct score_elf_link_hash_entry unsigned int possibly_dynamic_relocs; /* If the R_SCORE_ABS32, R_SCORE_REL32 reloc is against a readonly section. */ - bfd_boolean readonly_reloc; + bool readonly_reloc; /* We must not create a stub for a symbol that has relocations related to taking the function's address, i.e. any but R_SCORE_CALL15 ones. */ - bfd_boolean no_fn_stub; + bool no_fn_stub; /* Are we forced local? This will only be set if we have converted the initial global GOT entry to a local GOT entry. */ - bfd_boolean forced_local; + bool forced_local; }; /* Traverse a score ELF linker hash table. */ #define score_elf_link_hash_traverse(table, func, info) \ - (elf_link_hash_traverse \ - ((table), \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (elf_link_hash_traverse \ + ((table), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* This structure is used to hold .got entries while estimating got sizes. */ @@ -250,7 +250,7 @@ score_elf_lo16_reloc (bfd *abfd, /* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a dangerous relocation. */ -static bfd_boolean +static bool score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) { unsigned int count; @@ -260,7 +260,7 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* If we've already figured out what GP will be, just return it. */ *pgp = _bfd_get_gp_value (output_bfd); if (*pgp) - return TRUE; + return true; count = bfd_get_symcount (output_bfd); sym = bfd_get_outsymbols (output_bfd); @@ -290,10 +290,10 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* Only get the error once. */ *pgp = 4; _bfd_set_gp_value (output_bfd, *pgp); - return FALSE; + return false; } - return TRUE; + return true; } /* We have to figure out the gp value, so that we can adjust the @@ -305,7 +305,7 @@ score_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) static bfd_reloc_status_type score_elf_final_gp (bfd *output_bfd, asymbol *symbol, - bfd_boolean relocatable, + bool relocatable, char **error_message, bfd_vma *pgp) { @@ -343,7 +343,7 @@ score_elf_gprel15_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, asection *input_section, - bfd_boolean relocateable, + bool relocateable, void * data, bfd_vma gp ATTRIBUTE_UNUSED) { @@ -375,7 +375,7 @@ score_elf_gprel15_with_gp (bfd *abfd, static bfd_reloc_status_type gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, - asection *input_section, bfd_boolean relocatable, + asection *input_section, bool relocatable, void *data, bfd_vma gp) { bfd_vma relocation; @@ -425,7 +425,7 @@ score_elf_gprel15_reloc (bfd *abfd, bfd *output_bfd, char **error_message) { - bfd_boolean relocateable; + bool relocateable; bfd_reloc_status_type ret; bfd_vma gp; @@ -436,10 +436,10 @@ score_elf_gprel15_reloc (bfd *abfd, return bfd_reloc_ok; } if (output_bfd != NULL) - relocateable = TRUE; + relocateable = true; else { - relocateable = FALSE; + relocateable = false; output_bfd = symbol->section->output_section->owner; } @@ -459,7 +459,7 @@ score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; @@ -474,10 +474,10 @@ score_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -551,299 +551,299 @@ static reloc_howto_type elf32_score_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_HI16 */ HOWTO (R_SCORE_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_hi16_reloc, /* special_function */ "R_SCORE_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37fff, /* src_mask */ 0x37fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_LO16 */ HOWTO (R_SCORE_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_lo16_reloc, /* special_function */ "R_SCORE_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37fff, /* src_mask */ 0x37fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_BCMP */ HOWTO (R_SCORE_BCMP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_BCMP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SCORE_24, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff7fff, /* src_mask */ 0x3ff7fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /*R_SCORE_PC19 */ HOWTO (R_SCORE_PC19, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_PC19", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ff03fe, /* src_mask */ 0x3ff03fe, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /*R_SCORE16_11 */ HOWTO (R_SCORE16_11, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE16_11", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ffe, /* src_mask */ 0x000000ffe, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE16_PC8 */ HOWTO (R_SCORE16_PC8, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE16_PC8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit absolute */ HOWTO (R_SCORE_ABS32, /* type 8 */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_ABS32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit absolute */ HOWTO (R_SCORE_ABS16, /* type 11 */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_ABS16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_DUMMY2 */ HOWTO (R_SCORE_DUMMY2, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_DUMMY2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_GP15 */ HOWTO (R_SCORE_GP15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_gprel15_reloc,/* special_function */ "R_SCORE_GP15", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_SCORE_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ NULL, /* special_function */ "R_SCORE_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_SCORE_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_SCORE_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_SCORE_GOT15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ score_elf_got15_reloc, /* special_function */ "R_SCORE_GOT15", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_SCORE_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_got_lo16_reloc, /* special_function */ "R_SCORE_GOT_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37ffe, /* src_mask */ 0x37ffe, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 15 bit call through global offset table. */ HOWTO (R_SCORE_CALL15, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_CALL15", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00007fff, /* src_mask */ 0x00007fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit GP relative reference. */ HOWTO (R_SCORE_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_gprel32_reloc, /* special_function */ "R_SCORE_GPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit symbol relative relocation. */ HOWTO (R_SCORE_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SCORE_REL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_SCORE_DUMMY_HI16 */ HOWTO (R_SCORE_DUMMY_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 1, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ score_elf_hi16_reloc, /* special_function */ "R_SCORE_DUMMY_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x37fff, /* src_mask */ 0x37fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; struct score_reloc_map @@ -918,14 +918,14 @@ score_elf_got_entry_eq (const void *entry1, const void *entry2) index. Otherwise, assign it the lowest available dynamic index. */ -static bfd_boolean +static bool score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data) { struct score_elf_hash_sort_data *hsd = data; /* Symbols without dynamic symbol table entries aren't interesting at all. */ if (h->root.dynindx == -1) - return TRUE; + return true; /* Global symbols that need GOT entries that are not explicitly referenced are marked with got offset 2. Those that are @@ -945,11 +945,11 @@ score_elf_sort_hash_table_f (struct score_elf_link_hash_entry *h, void *data) hsd->low = (struct elf_link_hash_entry *) h; } - return TRUE; + return true; } static asection * -score_elf_got_section (bfd *abfd, bfd_boolean maybe_excluded) +score_elf_got_section (bfd *abfd, bool maybe_excluded) { asection *sgot = bfd_get_linker_section (abfd, ".got"); @@ -967,7 +967,7 @@ score_elf_got_info (bfd *abfd, asection **sgotp) asection *sgot; struct score_got_info *g; - sgot = score_elf_got_section (abfd, TRUE); + sgot = score_elf_got_section (abfd, true); BFD_ASSERT (sgot != NULL); BFD_ASSERT (elf_section_data (sgot) != NULL); g = score_elf_section_data (sgot)->u.got_info; @@ -985,7 +985,7 @@ score_elf_got_info (bfd *abfd, asection **sgotp) s7_bfd_score_elf_size_dynamic_sections, this value is 1. Afterward, the section symbols are added and the count is higher. */ -static bfd_boolean +static bool score_elf_sort_hash_table (struct bfd_link_info *info, unsigned long max_local) { @@ -1023,7 +1023,7 @@ score_elf_sort_hash_table (struct bfd_link_info *info, table index in the GOT. */ g->global_gotsym = hsd.low; - return TRUE; + return true; } /* Returns the first relocation of type r_type found, beginning with @@ -1062,11 +1062,11 @@ score_elf_sort_dynamic_relocs (const void *arg1, const void *arg2) } /* Return whether a relocation is against a local symbol. */ -static bfd_boolean +static bool score_elf_local_relocation_p (bfd *input_bfd, const Elf_Internal_Rela *relocation, asection **local_sections, - bfd_boolean check_forced) + bool check_forced) { unsigned long r_symndx; Elf_Internal_Shdr *symtab_hdr; @@ -1078,9 +1078,9 @@ score_elf_local_relocation_p (bfd *input_bfd, extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info; if (r_symndx < extsymoff) - return TRUE; + return true; if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL) - return TRUE; + return true; if (check_forced) { @@ -1092,16 +1092,16 @@ score_elf_local_relocation_p (bfd *input_bfd, || h->root.root.type == bfd_link_hash_warning) h = (struct score_elf_link_hash_entry *) h->root.root.u.i.link; if (h->root.forced_local) - return TRUE; + return true; } - return FALSE; + return false; } /* Returns the dynamic relocation section for DYNOBJ. */ static asection * -score_elf_rel_dyn_section (bfd *dynobj, bfd_boolean create_p) +score_elf_rel_dyn_section (bfd *dynobj, bool create_p) { static const char dname[] = ".rel.dyn"; asection *sreloc; @@ -1129,7 +1129,7 @@ score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n) { asection *s; - s = score_elf_rel_dyn_section (abfd, FALSE); + s = score_elf_rel_dyn_section (abfd, false); BFD_ASSERT (s != NULL); if (s->size == 0) @@ -1146,7 +1146,7 @@ score_elf_allocate_dynamic_relocations (bfd *abfd, unsigned int n) dynamic relocation. The ADDENDP is adjusted if necessary; the caller should store the result in place of the original addend. */ -static bfd_boolean +static bool score_elf_create_dynamic_relocation (bfd *output_bfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel, @@ -1159,11 +1159,11 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, bfd *dynobj; int r_type; long indx; - bfd_boolean defined_p; + bool defined_p; r_type = ELF32_R_TYPE (rel->r_info); dynobj = elf_hash_table (info)->dynobj; - sreloc = score_elf_rel_dyn_section (dynobj, FALSE); + sreloc = score_elf_rel_dyn_section (dynobj, false); BFD_ASSERT (sreloc != NULL); BFD_ASSERT (sreloc->contents != NULL); BFD_ASSERT (sreloc->reloc_count * SCORE_ELF_REL_SIZE (output_bfd) < sreloc->size); @@ -1177,7 +1177,7 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, if (outrel[0].r_offset == MINUS_ONE) /* The relocation field has been deleted. */ - return TRUE; + return true; if (outrel[0].r_offset == MINUS_TWO) { @@ -1185,7 +1185,7 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, some sort. Functions like _bfd_elf_write_section_eh_frame expect the field to be fully relocated, so add in the symbol's value. */ *addendp += symbol; - return TRUE; + return true; } /* We must now calculate the dynamic symbol table index to use @@ -1201,12 +1201,12 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, relocation field. It therefore treats relocs against defined symbols in the same way as relocs against undefined symbols. */ - defined_p = FALSE; + defined_p = false; } else { indx = 0; - defined_p = TRUE; + defined_p = true; } /* If the relocation was previously an absolute relocation and @@ -1258,13 +1258,13 @@ score_elf_create_dynamic_relocation (bfd *output_bfd, will be writing to it. */ elf_section_data (input_section->output_section)->this_hdr.sh_flags |= SHF_WRITE; - return TRUE; + return true; } -static bfd_boolean +static bool score_elf_create_got_section (bfd *abfd, struct bfd_link_info *info, - bfd_boolean maybe_exclude) + bool maybe_exclude) { flagword flags; asection *s; @@ -1274,12 +1274,12 @@ score_elf_create_got_section (bfd *abfd, size_t amt; /* This function may be called more than once. */ - s = score_elf_got_section (abfd, TRUE); + s = score_elf_got_section (abfd, true); if (s) { if (! maybe_exclude) s->flags &= ~SEC_EXCLUDE; - return TRUE; + return true; } flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -1293,7 +1293,7 @@ score_elf_create_got_section (bfd *abfd, elf_hash_table (info)->sgot = s; if (s == NULL || !bfd_set_section_alignment (s, 4)) - return FALSE; + return false; /* Define the symbol _GLOBAL_OFFSET_TABLE_. We don't do this in the linker script because we don't want to define the symbol if we @@ -1301,8 +1301,8 @@ score_elf_create_got_section (bfd *abfd, bh = NULL; if (! (_bfd_generic_link_add_one_symbol (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s, - 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; @@ -1312,12 +1312,12 @@ score_elf_create_got_section (bfd *abfd, if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; amt = sizeof (struct score_got_info); g = bfd_alloc (abfd, amt); if (g == NULL) - return FALSE; + return false; g->global_gotsym = NULL; g->global_gotno = 0; @@ -1329,11 +1329,11 @@ score_elf_create_got_section (bfd *abfd, g->got_entries = htab_try_create (1, score_elf_got_entry_hash, score_elf_got_entry_eq, NULL); if (g->got_entries == NULL) - return FALSE; + return false; score_elf_section_data (s)->u.got_info = g; score_elf_section_data (s)->elf.this_hdr.sh_flags |= SHF_ALLOC | SHF_WRITE | SHF_SCORE_GPREL; - return TRUE; + return true; } /* Calculate the %high function. */ @@ -1397,7 +1397,7 @@ score_elf_create_local_got_entry (bfd *abfd, static bfd_vma score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, - bfd_vma value, bfd_boolean external) + bfd_vma value, bool external) { asection *sgot; struct score_got_info *g; @@ -1425,7 +1425,7 @@ score_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, void s7_bfd_score_elf_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *entry, - bfd_boolean force_local) + bool force_local) { bfd *dynobj; asection *got; @@ -1435,12 +1435,12 @@ s7_bfd_score_elf_hide_symbol (struct bfd_link_info *info, h = (struct score_elf_link_hash_entry *) entry; if (h->forced_local) return; - h->forced_local = TRUE; + h->forced_local = true; dynobj = elf_hash_table (info)->dynobj; if (dynobj != NULL && force_local) { - got = score_elf_got_section (dynobj, FALSE); + got = score_elf_got_section (dynobj, false); if (got == NULL) return; g = score_elf_section_data (got)->u.got_info; @@ -1500,7 +1500,7 @@ s7_bfd_score_elf_hide_symbol (struct bfd_link_info *info, symbol table index lower than any we've seen to date, record it for posterity. */ -static bfd_boolean +static bool score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, bfd *abfd, struct bfd_link_info *info, @@ -1515,11 +1515,11 @@ score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, { case STV_INTERNAL: case STV_HIDDEN: - s7_bfd_score_elf_hide_symbol (info, h, TRUE); + s7_bfd_score_elf_hide_symbol (info, h, true); break; } if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } entry.abfd = abfd; @@ -1531,31 +1531,31 @@ score_elf_record_global_got_symbol (struct elf_link_hash_entry *h, /* If we've already marked this entry as needing GOT space, we don't need to do it again. */ if (*loc) - return TRUE; + return true; *loc = bfd_alloc (abfd, sizeof entry); if (! *loc) - return FALSE; + return false; entry.gotidx = -1; memcpy (*loc, &entry, sizeof (entry)); if (h->got.offset != MINUS_ONE) - return TRUE; + return true; /* By setting this to a value other than -1, we are indicating that there needs to be a GOT entry for H. Avoid using zero, as the generic ELF copy_indirect_symbol tests for <= 0. */ h->got.offset = 1; - return TRUE; + return true; } /* Reserve space in G for a GOT entry containing the value of symbol SYMNDX in input bfd ABDF, plus ADDEND. */ -static bfd_boolean +static bool score_elf_record_local_got_symbol (bfd *abfd, long symndx, bfd_vma addend, @@ -1569,17 +1569,17 @@ score_elf_record_local_got_symbol (bfd *abfd, loc = (struct score_got_entry **) htab_find_slot (g->got_entries, &entry, INSERT); if (*loc) - return TRUE; + return true; entry.gotidx = g->local_gotno++; *loc = bfd_alloc (abfd, sizeof(entry)); if (! *loc) - return FALSE; + return false; memcpy (*loc, &entry, sizeof (entry)); - return TRUE; + return true; } /* Returns the GOT offset at which the indicated address can be found. @@ -1821,7 +1821,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, struct score_elf_link_hash_entry *h, Elf_Internal_Sym *local_syms, asection **local_sections, - bfd_boolean gp_disp_p) + bool gp_disp_p) { unsigned long r_type; unsigned long r_symndx; @@ -1838,14 +1838,14 @@ score_elf_final_link_relocate (reloc_howto_type *howto, symbol, adjusted by the addend, resides during execution. */ bfd_vma g = MINUS_ONE; /* TRUE if the symbol referred to by this relocation is a local symbol. */ - bfd_boolean local_p; + bool local_p; /* The eventual value we will relocate. */ bfd_vma value = symbol; unsigned long hi16_addend, hi16_offset, hi16_value, uvalue, offset, abs_value = 0; Elf_Internal_Sym *sym = 0; asection *sec = NULL; - bfd_boolean merge_p = 0; + bool merge_p = 0; if (elf_gp (output_bfd) == 0) @@ -1886,7 +1886,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, rel_addr = (input_section->output_section->vma + input_section->output_offset + rel->r_offset); /* For hidden symbol. */ - local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, FALSE); + local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, false); if (local_p) { sym = local_syms + r_symndx; @@ -1957,7 +1957,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, } } - local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, TRUE); + local_p = score_elf_local_relocation_p (input_bfd, rel, local_sections, true); /* If we haven't already determined the GOT offset, or the GP value, and we're going to need it, get it now. */ @@ -1978,7 +1978,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, symbol is defined locally, or was forced to be local. We must initialize this entry in the GOT. */ bfd *tmpbfd = elf_hash_table (info)->dynobj; - asection *sgot = score_elf_got_section (tmpbfd, FALSE); + asection *sgot = score_elf_got_section (tmpbfd, false); bfd_put_32 (tmpbfd, value, sgot->contents + g); } } @@ -2160,12 +2160,12 @@ score_elf_final_link_relocate (reloc_howto_type *howto, case R_SCORE_CALL15: if (local_p) { - bfd_boolean forced; + bool forced; /* The special case is when the symbol is forced to be local. We need the full address in the GOT since no R_SCORE_GOT_LO16 relocation follows. */ forced = ! score_elf_local_relocation_p (input_bfd, rel, - local_sections, FALSE); + local_sections, false); value = score_elf_got16_entry (output_bfd, input_bfd, info, symbol + addend, forced); if (value == MINUS_ONE) @@ -2217,7 +2217,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, /* Score backend functions. */ -bfd_boolean +bool s7_bfd_score_info_to_howto (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) @@ -2231,11 +2231,11 @@ s7_bfd_score_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_reloc->howto = &elf32_score_howto_table[r_type]; - return TRUE; + return true; } /* Relocate an score ELF section. */ @@ -2257,7 +2257,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd, unsigned long offset; unsigned long hi16_addend, hi16_offset, hi16_value, uvalue; size_t extsymoff; - bfd_boolean gp_disp_p = FALSE; + bool gp_disp_p = false; /* Sort dynsym. */ if (elf_hash_table (info)->dynamic_sections_created) @@ -2276,7 +2276,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd, } if (!score_elf_sort_hash_table (info, dynsecsymcount + 1)) - return FALSE; + return false; } symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; @@ -2412,7 +2412,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd, if (r_type != R_SCORE_HI16 && r_type != R_SCORE_LO16) return bfd_reloc_notsupported; - gp_disp_p = TRUE; + gp_disp_p = true; } /* If this symbol is defined, calculate its address. Note that @@ -2545,7 +2545,7 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd, break; case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -2572,13 +2572,13 @@ s7_bfd_score_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Look through the relocs for a section during the first phase, and allocate space in the global offset table. */ -bfd_boolean +bool s7_bfd_score_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2595,7 +2595,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, asection *sreloc; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -2609,7 +2609,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, } else { - sgot = score_elf_got_section (dynobj, FALSE); + sgot = score_elf_got_section (dynobj, false); if (sgot == NULL) g = NULL; else @@ -2641,7 +2641,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, /* xgettext:c-format */ (_("%pB: malformed reloc detected for section %pA"), abfd, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -2664,8 +2664,8 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, case R_SCORE_CALL15: if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; - if (!score_elf_create_got_section (dynobj, info, FALSE)) - return FALSE; + if (!score_elf_create_got_section (dynobj, info, false)) + return false; g = score_elf_got_info (dynobj, &sgot); break; case R_SCORE_ABS32: @@ -2683,7 +2683,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, if (!h && (r_type == R_SCORE_GOT_LO16)) { if (! score_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, g)) - return FALSE; + return false; } switch (r_type) @@ -2696,13 +2696,13 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, (_("%pB: CALL15 reloc at %#" PRIx64 " not against global symbol"), abfd, (uint64_t) rel->r_offset); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { /* This symbol requires a global offset table entry. */ if (! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; + return false; /* We need a stub, not a plt entry for the undefined function. But we record it as if it needs plt. See _bfd_elf_adjust_dynamic_symbol. */ @@ -2712,7 +2712,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, break; case R_SCORE_GOT15: if (h && ! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; + return false; break; case R_SCORE_ABS32: case R_SCORE_REL32: @@ -2721,9 +2721,9 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, { if (sreloc == NULL) { - sreloc = score_elf_rel_dyn_section (dynobj, TRUE); + sreloc = score_elf_rel_dyn_section (dynobj, true); if (sreloc == NULL) - return FALSE; + return false; } #define SCORE_READONLY_SECTION (SEC_ALLOC | SEC_LOAD | SEC_READONLY) if (bfd_link_pic (info)) @@ -2750,7 +2750,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, == SCORE_READONLY_SECTION) /* We need it to tell the dynamic linker if there are relocations against the text segment. */ - hscore->readonly_reloc = TRUE; + hscore->readonly_reloc = true; } /* Even though we don't directly need a GOT entry for this symbol, @@ -2760,11 +2760,11 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, { if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; - if (! score_elf_create_got_section (dynobj, info, TRUE)) - return FALSE; + if (! score_elf_create_got_section (dynobj, info, true)) + return false; g = score_elf_got_info (dynobj, &sgot); if (! score_elf_record_global_got_symbol (h, abfd, info, g)) - return FALSE; + return false; } } break; @@ -2773,14 +2773,14 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_SCORE_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_SCORE_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; default: break; @@ -2796,7 +2796,7 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, struct score_elf_link_hash_entry *sh; sh = (struct score_elf_link_hash_entry *) h; - sh->no_fn_stub = TRUE; + sh->no_fn_stub = true; } break; case R_SCORE_CALL15: @@ -2804,10 +2804,10 @@ s7_bfd_score_elf_check_relocs (bfd *abfd, } } - return TRUE; + return true; } -bfd_boolean +bool s7_bfd_score_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -2829,7 +2829,7 @@ s7_bfd_score_elf_add_symbol_hook (bfd *abfd, break; } - return TRUE; + return true; } void @@ -2867,7 +2867,7 @@ s7_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_U return 1; } -bfd_boolean +bool s7_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) @@ -2875,10 +2875,10 @@ s7_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, if (strcmp (bfd_section_name (sec), ".scommon") == 0) { *retval = SHN_SCORE_SCOMMON; - return TRUE; + return true; } - return FALSE; + return false; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -2886,7 +2886,7 @@ s7_bfd_score_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, dynamic object, but we're not including those sections. We have to change the definition to something the rest of the link can understand. */ -bfd_boolean +bool s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2921,7 +2921,7 @@ s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!hscore->no_fn_stub && h->needs_plt) { if (!elf_hash_table (info)->dynamic_sections_created) - return TRUE; + return true; /* If this symbol is not defined in a regular file, then set the symbol to the stub location. This is required to make @@ -2944,7 +2944,7 @@ s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* The last half word of the stub will be filled with the index of this symbol in .dynsym section. */ - return TRUE; + return true; } } else if ((h->type == STT_FUNC) && !h->needs_plt) @@ -2952,7 +2952,7 @@ s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* This will set the entry for this symbol in the GOT to 0, and the dynamic linker will take care of this. */ h->root.u.def.value = 0; - return TRUE; + return true; } /* If this is a weak symbol, and there is a real definition, the @@ -2964,18 +2964,18 @@ s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which is not a function. */ - return TRUE; + return true; } /* This function is called after all the input files have been read, and the input sections have been assigned to output sections. */ -bfd_boolean +bool s7_bfd_score_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -2990,11 +2990,11 @@ s7_bfd_score_elf_always_size_sections (bfd *output_bfd, dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) /* Relocatable links don't have it. */ - return TRUE; + return true; g = score_elf_got_info (dynobj, &s); if (s == NULL) - return TRUE; + return true; /* Calculate the total loadable size of the output. That will give us the maximum number of GOT_PAGE entries required. */ @@ -3019,7 +3019,7 @@ s7_bfd_score_elf_always_size_sections (bfd *output_bfd, that need GOT entries at the end of the symbol table. We do that here. */ if (! score_elf_sort_hash_table (info, 1)) - return FALSE; + return false; if (g->global_gotsym != NULL) i = elf_hash_table (info)->dynsymcount - g->global_gotsym->dynindx; @@ -3048,17 +3048,17 @@ s7_bfd_score_elf_always_size_sections (bfd *output_bfd, /* Fixme. Error message or Warning message should be issued here. */ } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -bfd_boolean +bool s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean reltext; + bool reltext; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -3078,7 +3078,7 @@ s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - reltext = FALSE; + reltext = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -3120,7 +3120,7 @@ s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i if ((target != NULL && (target->flags & SEC_READONLY) != 0 && (target->flags & SEC_ALLOC) != 0) || strcmp (outname, ".rel.dyn") == 0) - reltext = TRUE; + reltext = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3152,7 +3152,7 @@ s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i if (s->contents == NULL && s->size != 0) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } } @@ -3165,7 +3165,7 @@ s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i dynamic linker and used by the debugger. */ if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0)) - return FALSE; + return false; if (reltext) info->flags |= DF_TEXTREL; @@ -3173,47 +3173,47 @@ s7_bfd_score_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i if ((info->flags & DF_TEXTREL) != 0) { if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0)) - return FALSE; + return false; } if (! SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0)) - return FALSE; + return false; - if (score_elf_rel_dyn_section (dynobj, FALSE)) + if (score_elf_rel_dyn_section (dynobj, false)) { if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0)) - return FALSE; + return false; } if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_BASE_ADDRESS, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_LOCAL_GOTNO, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_SYMTABNO, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_UNREFEXTNO, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_GOTSYM, 0)) - return FALSE; + return false; if (!SCORE_ELF_ADD_DYNAMIC_ENTRY (info, DT_SCORE_HIPAGENO, 0)) - return FALSE; + return false; } - return TRUE; + return true; } -bfd_boolean +bool s7_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_entry *h; @@ -3229,15 +3229,15 @@ s7_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s != NULL) { if (!bfd_set_section_flags (s, flags)) - return FALSE; + return false; } /* We need to create .got section. */ - if (!score_elf_create_got_section (abfd, info, FALSE)) - return FALSE; + if (!score_elf_create_got_section (abfd, info, false)) + return false; - if (!score_elf_rel_dyn_section (elf_hash_table (info)->dynobj, TRUE)) - return FALSE; + if (!score_elf_rel_dyn_section (elf_hash_table (info)->dynobj, true)) + return false; /* Create .stub section. */ if (bfd_get_linker_section (abfd, SCORE_ELF_STUB_SECTION_NAME) == NULL) @@ -3247,7 +3247,7 @@ s7_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; } if (!bfd_link_pic (info)) @@ -3258,8 +3258,8 @@ s7_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) bh = NULL; if (!(_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, - (bfd_vma) 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + (bfd_vma) 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; @@ -3267,17 +3267,17 @@ s7_bfd_score_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) h->type = STT_SECTION; if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -bfd_boolean +bool s7_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3303,7 +3303,7 @@ s7_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, /* FIXME: Can h->dynindex be more than 64K? */ if (h->dynindx & 0xffff0000) - return FALSE; + return false; /* Fill the stub. */ bfd_put_32 (output_bfd, STUB_LW, stub); @@ -3326,7 +3326,7 @@ s7_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, BFD_ASSERT (h->dynindx != -1 || h->forced_local); - sgot = score_elf_got_section (dynobj, FALSE); + sgot = score_elf_got_section (dynobj, false); BFD_ASSERT (sgot != NULL); BFD_ASSERT (score_elf_section_data (sgot) != NULL); g = score_elf_section_data (sgot)->u.got_info; @@ -3362,12 +3362,12 @@ s7_bfd_score_elf_finish_dynamic_symbol (bfd *output_bfd, sym->st_value = elf_gp (output_bfd); } - return TRUE; + return true; } /* Finish up the dynamic sections. */ -bfd_boolean +bool s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3381,7 +3381,7 @@ s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, sdyn = bfd_get_linker_section (dynobj, ".dynamic"); - sgot = score_elf_got_section (dynobj, FALSE); + sgot = score_elf_got_section (dynobj, false); if (sgot == NULL) g = NULL; else @@ -3405,13 +3405,13 @@ s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, Elf_Internal_Dyn dyn; const char *name; size_t elemsize; - bfd_boolean swap_out_p; + bool swap_out_p; /* Read in the current dynamic entry. */ (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn); /* Assume that we're going to modify it and write it out. */ - swap_out_p = TRUE; + swap_out_p = true; switch (dyn.d_tag) { @@ -3470,7 +3470,7 @@ s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, break; default: - swap_out_p = FALSE; + swap_out_p = false; break; } @@ -3494,7 +3494,7 @@ s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, /* We need to sort the entries of the dynamic relocation section. */ - s = score_elf_rel_dyn_section (dynobj, FALSE); + s = score_elf_rel_dyn_section (dynobj, false); if (s != NULL && s->size > (bfd_vma)2 * SCORE_ELF_REL_SIZE (output_bfd)) { @@ -3503,13 +3503,13 @@ s7_bfd_score_elf_finish_dynamic_sections (bfd *output_bfd, sizeof (Elf32_External_Rel), score_elf_sort_dynamic_relocs); } - return TRUE; + return true; } /* This function set up the ELF section header for a BFD section in preparation for writing it out. This is where the flags and type fields are set for unusual sections. */ -bfd_boolean +bool s7_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) @@ -3524,7 +3524,7 @@ s7_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, || strcmp (name, ".sbss") == 0) hdr->sh_flags |= SHF_SCORE_GPREL; - return TRUE; + return true; } /* This function do additional processing on the ELF section header before writing @@ -3535,7 +3535,7 @@ s7_bfd_score_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, assign_file_positions_except_relocs(); backend_section_processing after it. so, we modify section flag there, but not backend_fake_section. */ -bfd_boolean +bool s7_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr) { if (hdr->bfd_section != NULL) @@ -3559,20 +3559,20 @@ s7_bfd_score_elf_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Sh } } - return TRUE; + return true; } -bfd_boolean +bool s7_bfd_score_elf_write_section (bfd *output_bfd, asection *sec, bfd_byte *contents) { bfd_byte *to, *from, *end; int i; if (strcmp (sec->name, ".pdr") != 0) - return FALSE; + return false; if (score_elf_section_data (sec)->u.tdata == NULL) - return FALSE; + return false; to = contents; end = contents + sec->size; @@ -3589,7 +3589,7 @@ s7_bfd_score_elf_write_section (bfd *output_bfd, asection *sec, bfd_byte *conten bfd_set_section_contents (output_bfd, sec->output_section, contents, (file_ptr) sec->output_offset, sec->size); - return TRUE; + return true; } /* Copy data from a SCORE ELF indirect symbol to its direct symbol, hiding the old @@ -3612,38 +3612,38 @@ s7_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *info, dirscore->possibly_dynamic_relocs += indscore->possibly_dynamic_relocs; if (indscore->readonly_reloc) - dirscore->readonly_reloc = TRUE; + dirscore->readonly_reloc = true; if (indscore->no_fn_stub) - dirscore->no_fn_stub = TRUE; + dirscore->no_fn_stub = true; } /* Remove information about discarded functions from other sections which mention them. */ -bfd_boolean +bool s7_bfd_score_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, struct bfd_link_info *info) { asection *o; - bfd_boolean ret = FALSE; + bool ret = false; unsigned char *tdata; size_t i, skip; o = bfd_get_section_by_name (abfd, ".pdr"); if ((!o) || (o->size == 0) || (o->size % PDR_SIZE != 0) || (o->output_section != NULL && bfd_is_abs_section (o->output_section))) - return FALSE; + return false; tdata = bfd_zmalloc (o->size / PDR_SIZE); if (!tdata) - return FALSE; + return false; cookie->rels = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory); if (!cookie->rels) { free (tdata); - return FALSE; + return false; } cookie->rel = cookie->rels; @@ -3662,7 +3662,7 @@ s7_bfd_score_elf_discard_info (bfd *abfd, { score_elf_section_data (o)->u.tdata = tdata; o->size -= skip * PDR_SIZE; - ret = TRUE; + ret = true; } else free (tdata); @@ -3675,12 +3675,12 @@ s7_bfd_score_elf_discard_info (bfd *abfd, /* Signal that discard_info() has removed the discarded relocations for this section. */ -bfd_boolean +bool s7_bfd_score_elf_ignore_discarded_relocs (asection *sec) { if (strcmp (sec->name, ".pdr") == 0) - return TRUE; - return FALSE; + return true; + return false; } /* Return the section that should be marked against GC for a given @@ -3706,7 +3706,7 @@ s7_bfd_score_elf_gc_mark_hook (asection *sec, /* Support for core dump NOTE sections. */ -bfd_boolean +bool s7_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -3715,7 +3715,7 @@ s7_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 272: /* Linux/Score elf_prstatus */ /* pr_cursig */ @@ -3738,13 +3738,13 @@ s7_bfd_score_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) note->descpos + offset); } -bfd_boolean +bool s7_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 128: /* Linux/Score elf_prpsinfo. */ /* pr_fname */ @@ -3769,7 +3769,7 @@ s7_bfd_score_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } @@ -3787,7 +3787,7 @@ s7_elf32_score_reloc_type_lookup (bfd *abfd ATTRIBUTE_UNUSED, bfd_reloc_code_rea return NULL; } -bfd_boolean +bool s7_elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -3809,10 +3809,10 @@ s7_elf32_score_print_private_bfd_data (bfd *abfd, void * ptr) } fputc ('\n', file); - return TRUE; + return true; } -bfd_boolean +bool s7_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -3820,25 +3820,25 @@ s7_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) flagword out_flags; if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; if (! elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -3847,7 +3847,7 @@ s7_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); } - return TRUE; + return true; } if (((in_flags & EF_SCORE_PIC) != 0) != ((out_flags & EF_SCORE_PIC) != 0)) @@ -3856,10 +3856,10 @@ s7_elf32_score_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) } /* Maybe dependency fix compatibility should be checked here. */ - return TRUE; + return true; } -bfd_boolean +bool s7_elf32_score_new_section_hook (bfd *abfd, asection *sec) { struct _score_elf_section_data *sdata; @@ -3867,7 +3867,7 @@ s7_elf32_score_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; return _bfd_elf_new_section_hook (abfd, sec); diff --git a/bfd/elf32-sh-relocs.h b/bfd/elf32-sh-relocs.h index 005a70fffa..bf551bc7a6 100644 --- a/bfd/elf32-sh-relocs.h +++ b/bfd/elf32-sh-relocs.h @@ -22,15 +22,15 @@ 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit absolute relocation. Setting partial_inplace to TRUE and src_mask to a non-zero value is similar to the COFF toolchain. */ @@ -38,7 +38,7 @@ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ SH_ELF_RELOC, /* special_function */ @@ -46,14 +46,14 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit PC relative relocation. */ HOWTO (R_SH_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ @@ -61,22 +61,22 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit PC relative branch divided by 2. */ HOWTO (R_SH_DIR8WPN, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_DIR8WPN", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 12 bit PC relative branch divided by 2. */ /* This cannot be partial_inplace because relaxation can't know the @@ -85,45 +85,45 @@ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ NULL, /* special_function */ "R_SH_IND12W", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xfff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit unsigned PC relative divided by 4. */ HOWTO (R_SH_DIR8WPL, /* type */ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_DIR8WPL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit unsigned PC relative divided by 2. */ HOWTO (R_SH_DIR8WPZ, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_DIR8WPZ", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit GBR relative. FIXME: This only makes sense if we have some special symbol for the GBR relative area, and that is not @@ -132,15 +132,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_DIR8BP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit GBR relative divided by 2. FIXME: This only makes sense if we have some special symbol for the GBR relative area, and that @@ -149,15 +149,15 @@ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_DIR8W", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit GBR relative divided by 4. FIXME: This only makes sense if we have some special symbol for the GBR relative area, and that @@ -166,45 +166,45 @@ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_DIR8L", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit PC relative divided by 2 - but specified in a very odd way. */ HOWTO (R_SH_LOOP_START, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_LOOP_START", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 8 bit PC relative divided by 2 - but specified in a very odd way. */ HOWTO (R_SH_LOOP_END, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_LOOP_END", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (12), EMPTY_HOWTO (13), @@ -227,30 +227,30 @@ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_SH_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_SH_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_SH_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit switch table entry. This is generated for an expression such as ``.word L1 - L2''. The offset holds the difference @@ -259,15 +259,15 @@ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_SWITCH8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit switch table entry. This is generated for an expression such as ``.word L1 - L2''. The offset holds the difference @@ -276,15 +276,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_SWITCH16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32 bit switch table entry. This is generated for an expression such as ``.long L1 - L2''. The offset holds the difference @@ -293,15 +293,15 @@ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_SWITCH32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Indicates a .uses pseudo-op. The compiler will generate .uses pseudo-ops when it finds a function call which can be relaxed. @@ -311,15 +311,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_USES", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The assembler will generate this reloc for addresses referred to by the register loads associated with USES relocs. The offset @@ -329,15 +329,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_COUNT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Indicates an alignment statement. The offset field is the power of 2 to which subsequent portions of the object file must be @@ -346,15 +346,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_ALIGN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The assembler will generate this reloc before a block of instructions. A section should be processed as assuming it @@ -363,15 +363,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_CODE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The assembler will generate this reloc after a block of instructions when it sees data that is not instructions. */ @@ -379,15 +379,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_DATA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The assembler generates this reloc for each label within a block of instructions. This permits the linker to avoid swapping @@ -396,184 +396,184 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_LABEL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The next 12 are only supported via linking in SHC-generated objects. */ HOWTO (R_SH_DIR16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR8UL, /* type */ 2, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR8UL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR8UW, /* type */ 1, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR8UW", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR8U, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR8U", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR8SW, /* type */ 1, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR8SW", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR8S, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR8S", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR4UL, /* type */ 2, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR4UL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR4UW, /* type */ 1, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR4UW", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_DIR4U, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 4, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR4U", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_PSHA, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_PSHA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_PSHL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 4, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_PSHL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (45), EMPTY_HOWTO (46), @@ -589,15 +589,15 @@ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_DIR16S", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (54), EMPTY_HOWTO (55), @@ -694,7 +694,7 @@ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -702,13 +702,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_TLS_LD_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -716,13 +716,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_TLS_LDO_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -730,13 +730,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_TLS_IE_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -744,13 +744,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_TLS_LE_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -758,13 +758,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_TLS_DTPMOD32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -772,13 +772,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_TLS_DTPOFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -786,13 +786,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_TLS_TPOFF32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -800,7 +800,7 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (152), EMPTY_HOWTO (153), @@ -815,7 +815,7 @@ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -823,13 +823,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_PLT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -837,13 +837,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_SH_COPY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -851,13 +851,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -865,13 +865,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -879,13 +879,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -893,13 +893,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_GOTOFF, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -907,13 +907,13 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_SH_GOTPC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ @@ -921,22 +921,22 @@ SH_PARTIAL32, /* partial_inplace */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_SH_GOTPLT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* */ "R_SH_GOTPLT32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ /* ??? Why not 0? */ SH_SRC_MASK32, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (169), EMPTY_HOWTO (170), @@ -976,45 +976,45 @@ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_GOT20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00f0ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* FDPIC-relative offset to a data object, for movi20. */ HOWTO (R_SH_GOTOFF20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_GOTOFF20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00f0ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* FDPIC-relative offset to a GOT entry for a function descriptor. */ HOWTO (R_SH_GOTFUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_GOTFUNCDESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* FDPIC-relative offset to a GOT entry for a function descriptor, for movi20. */ @@ -1022,75 +1022,75 @@ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_GOTFUNCDESC20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00f0ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* FDPIC-relative offset to a function descriptor. */ HOWTO (R_SH_GOTOFFFUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_GOTOFFFUNCDESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* FDPIC-relative offset to a function descriptor, for movi20. */ HOWTO (R_SH_GOTOFFFUNCDESC20, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 20, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_GOTOFFFUNCDESC20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00f0ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Address of an official function descriptor. */ HOWTO (R_SH_FUNCDESC, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_FUNCDESC", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Function descriptor to be filled in by the dynamic linker. */ HOWTO (R_SH_FUNCDESC_VALUE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_SH_FUNCDESC_VALUE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #undef SH_PARTIAL32 #undef SH_SRC_MASK32 diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index d1b760d853..dae248f50e 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -37,11 +37,11 @@ static bfd_reloc_status_type sh_elf_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type sh_elf_ignore_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -static bfd_boolean sh_elf_relax_delete_bytes +static bool sh_elf_relax_delete_bytes (bfd *, asection *, bfd_vma, int); -static bfd_boolean sh_elf_align_loads - (bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bfd_boolean *); -static bfd_boolean sh_elf_swap_insns +static bool sh_elf_align_loads + (bfd *, asection *, Elf_Internal_Rela *, bfd_byte *, bool *); +static bool sh_elf_swap_insns (bfd *, asection *, void *, bfd_byte *, bfd_vma); static int sh_elf_optimized_tls_reloc (struct bfd_link_info *, int, int); @@ -67,7 +67,7 @@ static bfd_vma tpoff (SYMBOL_REFERENCES_LOCAL (INFO, H) \ || ! elf_hash_table (INFO)->dynamic_sections_created) -#define SH_PARTIAL32 TRUE +#define SH_PARTIAL32 true #define SH_SRC_MASK32 0xffffffff #define SH_ELF_RELOC sh_elf_reloc static reloc_howto_type sh_elf_howto_table[] = @@ -75,7 +75,7 @@ static reloc_howto_type sh_elf_howto_table[] = #include "elf32-sh-relocs.h" }; -#define SH_PARTIAL32 FALSE +#define SH_PARTIAL32 false #define SH_SRC_MASK32 0 #define SH_ELF_RELOC bfd_elf_generic_reloc static reloc_howto_type sh_vxworks_howto_table[] = @@ -85,7 +85,7 @@ static reloc_howto_type sh_vxworks_howto_table[] = /* Return true if OUTPUT_BFD is a VxWorks object. */ -static bfd_boolean +static bool vxworks_object_p (bfd *abfd ATTRIBUTE_UNUSED) { #if !defined SH_TARGET_ALREADY_DEFINED @@ -95,13 +95,13 @@ vxworks_object_p (bfd *abfd ATTRIBUTE_UNUSED) return (abfd->xvec == &sh_elf32_vxworks_le_vec || abfd->xvec == &sh_elf32_vxworks_vec); #else - return FALSE; + return false; #endif } /* Return true if OUTPUT_BFD is an FDPIC object. */ -static bfd_boolean +static bool fdpic_object_p (bfd *abfd ATTRIBUTE_UNUSED) { #if !defined SH_TARGET_ALREADY_DEFINED @@ -111,7 +111,7 @@ fdpic_object_p (bfd *abfd ATTRIBUTE_UNUSED) return (abfd->xvec == &sh_elf32_fdpic_le_vec || abfd->xvec == &sh_elf32_fdpic_be_vec); #else - return FALSE; + return false; #endif } @@ -419,7 +419,7 @@ sh_elf_reloc_name_lookup (bfd *abfd, const char *r_name) /* Given an ELF reloc, fill in the howto field of a relent. */ -static bfd_boolean +static bool sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int r; @@ -438,11 +438,11 @@ sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = get_howto_table (abfd) + r; - return TRUE; + return true; } /* This function handles relaxing for SH ELF. See the corresponding @@ -455,23 +455,23 @@ sh_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) values; in coff-sh.c they come from include/coff/sh.h, whereas here they come from enum elf_sh_reloc_type in include/elf/sh.h. */ -static bfd_boolean +static bool sh_elf_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; - bfd_boolean have_code; + bool have_code; Elf_Internal_Rela *irel, *irelend; bfd_byte *contents = NULL; Elf_Internal_Sym *isymbuf = NULL; - *again = FALSE; + *again = false; if (bfd_link_relocatable (link_info) || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) - return TRUE; + return true; symtab_hdr = &elf_symtab_hdr (abfd); @@ -481,7 +481,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec, if (internal_relocs == NULL) goto error_return; - have_code = FALSE; + have_code = false; irelend = internal_relocs + sec->reloc_count; for (irel = internal_relocs; irel < irelend; irel++) @@ -492,7 +492,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec, bfd_signed_vma foff; if (ELF32_R_TYPE (irel->r_info) == (int) R_SH_CODE) - have_code = TRUE; + have_code = true; if (ELF32_R_TYPE (irel->r_info) != (int) R_SH_USES) continue; @@ -717,7 +717,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec, /* That will change things, so, just in case it permits some other function call to come within range, we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; /* Now check whether we got a COUNT reloc. */ if (irelcount >= irelend) @@ -759,7 +759,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec, if ((elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK) != EF_SH4 && have_code) { - bfd_boolean swapped; + bool swapped; /* Get the section contents. */ if (contents == NULL) @@ -812,7 +812,7 @@ sh_elf_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -822,14 +822,14 @@ sh_elf_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Delete some bytes from a section while relaxing. FIXME: There is a lot of duplication between this function and sh_relax_delete_bytes in coff-sh.c. */ -static bfd_boolean +static bool sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) { @@ -896,7 +896,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int insn = 0; int off, adjust, oinsn; bfd_signed_vma voff = 0; - bfd_boolean overflow; + bool overflow; /* Get the new reloc address. */ nraddr = irel->r_offset; @@ -1071,7 +1071,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, if (adjust != 0) { oinsn = insn; - overflow = FALSE; + overflow = false; switch ((enum elf_sh_reloc_type) ELF32_R_TYPE (irel->r_info)) { default: @@ -1082,14 +1082,14 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, case R_SH_DIR8WPZ: insn += adjust / 2; if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); break; case R_SH_IND12W: insn += adjust / 2; if ((oinsn & 0xf000) != (insn & 0xf000)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); break; @@ -1103,21 +1103,21 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, ++insn; } if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, contents + nraddr); break; case R_SH_SWITCH8: voff += adjust; if (voff < 0 || voff >= 0xff) - overflow = TRUE; + overflow = true; bfd_put_8 (abfd, voff, contents + nraddr); break; case R_SH_SWITCH16: voff += adjust; if (voff < - 0x8000 || voff >= 0x8000) - overflow = TRUE; + overflow = true; bfd_put_signed_16 (abfd, (bfd_vma) voff, contents + nraddr); break; @@ -1138,7 +1138,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"), abfd, (uint64_t) irel->r_offset); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -1163,9 +1163,9 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, FALSE, we should free them, if we are permitted to, when we leave sh_coff_relax_section. */ internal_relocs = (_bfd_elf_link_read_relocs - (abfd, o, NULL, (Elf_Internal_Rela *) NULL, TRUE)); + (abfd, o, NULL, (Elf_Internal_Rela *) NULL, true)); if (internal_relocs == NULL) - return FALSE; + return false; ocontents = NULL; irelscanend = internal_relocs + o->reloc_count; @@ -1190,7 +1190,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, if (!bfd_malloc_and_get_section (abfd, o, &ocontents)) { free (ocontents); - return FALSE; + return false; } elf_section_data (o)->this_hdr.contents = ocontents; @@ -1247,7 +1247,7 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, if (!bfd_malloc_and_get_section (abfd, o, &ocontents)) { free (ocontents); - return FALSE; + return false; } elf_section_data (o)->this_hdr.contents = ocontents; @@ -1308,24 +1308,24 @@ sh_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, } } - return TRUE; + return true; } /* Look for loads and stores which we can align to four byte boundaries. This is like sh_align_loads in coff-sh.c. */ -static bfd_boolean +static bool sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, Elf_Internal_Rela *internal_relocs, bfd_byte *contents ATTRIBUTE_UNUSED, - bfd_boolean *pswapped) + bool *pswapped) { Elf_Internal_Rela *irel, *irelend; bfd_vma *labels = NULL; bfd_vma *label, *label_end; bfd_size_type amt; - *pswapped = FALSE; + *pswapped = false; irelend = internal_relocs + sec->reloc_count; @@ -1376,16 +1376,16 @@ sh_elf_align_loads (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, free (labels); - return TRUE; + return true; error_return: free (labels); - return FALSE; + return false; } /* Swap two SH instructions. This is like sh_swap_insns in coff-sh.c. */ -static bfd_boolean +static bool sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs, bfd_byte *contents, bfd_vma addr) { @@ -1450,10 +1450,10 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs, { bfd_byte *loc; unsigned short insn, oinsn; - bfd_boolean overflow; + bool overflow; loc = contents + irel->r_offset; - overflow = FALSE; + overflow = false; switch (type) { default: @@ -1465,7 +1465,7 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs, oinsn = insn; insn += add / 2; if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, loc); break; @@ -1474,7 +1474,7 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs, oinsn = insn; insn += add / 2; if ((oinsn & 0xf000) != (insn & 0xf000)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, loc); break; @@ -1491,7 +1491,7 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs, oinsn = insn; insn += add / 2; if ((oinsn & 0xff00) != (insn & 0xff00)) - overflow = TRUE; + overflow = true; bfd_put_16 (abfd, (bfd_vma) insn, loc); } @@ -1505,12 +1505,12 @@ sh_elf_swap_insns (bfd *abfd, asection *sec, void *relocs, (_("%pB: %#" PRIx64 ": fatal: reloc overflow while relaxing"), abfd, (uint64_t) irel->r_offset); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Describes one of the various PLT styles. */ @@ -1542,9 +1542,8 @@ struct elf_sh_plt_info bfd_vma got_entry; /* the address of the symbol's .got.plt entry */ bfd_vma plt; /* .plt (or a branch to .plt on VxWorks) */ bfd_vma reloc_offset; /* the offset of the symbol's JMP_SLOT reloc */ - bfd_boolean got20; /* TRUE if got_entry points to a movi20 - instruction (instead of a constant pool - entry). */ + bool got20; /* TRUE if got_entry points to a movi20 instruction + (instead of a constant pool entry). */ } symbol_fields; /* The offset of the resolver stub from the start of SYMBOL_ENTRY. */ @@ -1678,7 +1677,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = { { MINUS_ONE, 24, 20 }, elf_sh_plt_entry_be, ELF_PLT_ENTRY_SIZE, - { 20, 16, 24, FALSE }, + { 20, 16, 24, false }, 8, NULL }, @@ -1689,7 +1688,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = { { MINUS_ONE, 24, 20 }, elf_sh_plt_entry_le, ELF_PLT_ENTRY_SIZE, - { 20, 16, 24, FALSE }, + { 20, 16, 24, false }, 8, NULL }, @@ -1702,7 +1701,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, elf_sh_pic_plt_entry_be, ELF_PLT_ENTRY_SIZE, - { 20, MINUS_ONE, 24, FALSE }, + { 20, MINUS_ONE, 24, false }, 8, NULL }, @@ -1713,7 +1712,7 @@ static const struct elf_sh_plt_info elf_sh_plts[2][2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, elf_sh_pic_plt_entry_le, ELF_PLT_ENTRY_SIZE, - { 20, MINUS_ONE, 24, FALSE }, + { 20, MINUS_ONE, 24, false }, 8, NULL }, @@ -1806,7 +1805,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = { { MINUS_ONE, MINUS_ONE, 8 }, vxworks_sh_plt_entry_be, VXWORKS_PLT_ENTRY_SIZE, - { 8, 14, 20, FALSE }, + { 8, 14, 20, false }, 12, NULL }, @@ -1817,7 +1816,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = { { MINUS_ONE, MINUS_ONE, 8 }, vxworks_sh_plt_entry_le, VXWORKS_PLT_ENTRY_SIZE, - { 8, 14, 20, FALSE }, + { 8, 14, 20, false }, 12, NULL }, @@ -1830,7 +1829,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, vxworks_sh_pic_plt_entry_be, VXWORKS_PLT_ENTRY_SIZE, - { 8, MINUS_ONE, 20, FALSE }, + { 8, MINUS_ONE, 20, false }, 12, NULL }, @@ -1841,7 +1840,7 @@ static const struct elf_sh_plt_info vxworks_sh_plts[2][2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, vxworks_sh_pic_plt_entry_le, VXWORKS_PLT_ENTRY_SIZE, - { 8, MINUS_ONE, 20, FALSE }, + { 8, MINUS_ONE, 20, false }, 12, NULL }, @@ -1902,7 +1901,7 @@ static const struct elf_sh_plt_info fdpic_sh_plts[2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, fdpic_sh_plt_entry_be, FDPIC_PLT_ENTRY_SIZE, - { 12, MINUS_ONE, 16, FALSE }, + { 12, MINUS_ONE, 16, false }, FDPIC_PLT_LAZY_OFFSET, NULL }, @@ -1913,7 +1912,7 @@ static const struct elf_sh_plt_info fdpic_sh_plts[2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, fdpic_sh_plt_entry_le, FDPIC_PLT_ENTRY_SIZE, - { 12, MINUS_ONE, 16, FALSE }, + { 12, MINUS_ONE, 16, false }, FDPIC_PLT_LAZY_OFFSET, NULL }, @@ -1962,7 +1961,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_short_plt_be = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, fdpic_sh2a_plt_entry_be, FDPIC_SH2A_PLT_ENTRY_SIZE, - { 0, MINUS_ONE, 12, TRUE }, + { 0, MINUS_ONE, 12, true }, FDPIC_SH2A_PLT_LAZY_OFFSET, NULL }; @@ -1974,7 +1973,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_short_plt_le = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, fdpic_sh2a_plt_entry_le, FDPIC_SH2A_PLT_ENTRY_SIZE, - { 0, MINUS_ONE, 12, TRUE }, + { 0, MINUS_ONE, 12, true }, FDPIC_SH2A_PLT_LAZY_OFFSET, NULL }; @@ -1987,7 +1986,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_plts[2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, fdpic_sh_plt_entry_be, FDPIC_PLT_ENTRY_SIZE, - { 12, MINUS_ONE, 16, FALSE }, + { 12, MINUS_ONE, 16, false }, FDPIC_PLT_LAZY_OFFSET, &fdpic_sh2a_short_plt_be }, @@ -1998,7 +1997,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_plts[2] = { { MINUS_ONE, MINUS_ONE, MINUS_ONE }, fdpic_sh_plt_entry_le, FDPIC_PLT_ENTRY_SIZE, - { 12, MINUS_ONE, 16, FALSE }, + { 12, MINUS_ONE, 16, false }, FDPIC_PLT_LAZY_OFFSET, &fdpic_sh2a_short_plt_le }, @@ -2008,7 +2007,7 @@ static const struct elf_sh_plt_info fdpic_sh2a_plts[2] = { the object is position-independent. */ static const struct elf_sh_plt_info * -get_plt_info (bfd *abfd, bfd_boolean pic_p) +get_plt_info (bfd *abfd, bool pic_p) { if (fdpic_object_p (abfd)) { @@ -2029,7 +2028,7 @@ get_plt_info (bfd *abfd, bfd_boolean pic_p) not data. */ inline static void -install_plt_field (bfd *output_bfd, bfd_boolean code_p ATTRIBUTE_UNUSED, +install_plt_field (bfd *output_bfd, bool code_p ATTRIBUTE_UNUSED, unsigned long value, bfd_byte *addr) { bfd_put_32 (output_bfd, value, addr); @@ -2146,7 +2145,7 @@ struct sh_elf_obj_tdata /* Override the generic function because we need to store sh_elf_obj_tdata as the specific tdata. */ -static bfd_boolean +static bool sh_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct sh_elf_obj_tdata), @@ -2178,7 +2177,7 @@ struct elf_sh_link_hash_table const struct elf_sh_plt_info *plt_info; /* True if the target system uses FDPIC. */ - bfd_boolean fdpic_p; + bool fdpic_p; }; /* Traverse an sh ELF linker hash table. */ @@ -2186,7 +2185,7 @@ struct elf_sh_link_hash_table #define sh_elf_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* Get the sh ELF linker hash table from a link_info structure. */ @@ -2253,14 +2252,14 @@ sh_elf_link_hash_table_create (bfd *abfd) if (fdpic_object_p (abfd)) { - ret->root.dt_pltgot_required = TRUE; - ret->fdpic_p = TRUE; + ret->root.dt_pltgot_required = true; + ret->fdpic_p = true; } return &ret->root.root; } -static bfd_boolean +static bool sh_elf_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, asection *p) { @@ -2268,7 +2267,7 @@ sh_elf_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, /* Non-FDPIC binaries do not need dynamic symbols for sections. */ if (!htab->fdpic_p) - return TRUE; + return true; /* We need dynamic symbols for every section, since segments can relocate independently. */ @@ -2279,29 +2278,29 @@ sh_elf_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, /* If sh_type is yet undecided, assume it could be SHT_PROGBITS/SHT_NOBITS. */ case SHT_NULL: - return FALSE; + return false; /* There shouldn't be section relative relocations against any other section. */ default: - return TRUE; + return true; } } /* Create .got, .gotplt, and .rela.got sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool create_got_section (bfd *dynobj, struct bfd_link_info *info) { struct elf_sh_link_hash_table *htab; if (! _bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; htab->sfuncdesc = bfd_make_section_anyway_with_flags (dynobj, ".got.funcdesc", (SEC_ALLOC | SEC_LOAD @@ -2310,7 +2309,7 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) | SEC_LINKER_CREATED)); if (htab->sfuncdesc == NULL || !bfd_set_section_alignment (htab->sfuncdesc, 2)) - return FALSE; + return false; htab->srelfuncdesc = bfd_make_section_anyway_with_flags (dynobj, ".rela.got.funcdesc", @@ -2321,7 +2320,7 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) | SEC_READONLY)); if (htab->srelfuncdesc == NULL || !bfd_set_section_alignment (htab->srelfuncdesc, 2)) - return FALSE; + return false; /* Also create .rofixup. */ htab->srofixup = bfd_make_section_anyway_with_flags (dynobj, ".rofixup", @@ -2332,14 +2331,14 @@ create_got_section (bfd *dynobj, struct bfd_link_info *info) | SEC_READONLY)); if (htab->srofixup == NULL || !bfd_set_section_alignment (htab->srofixup, 2)) - return FALSE; + return false; - return TRUE; + return true; } /* Create dynamic sections when linking against a dynamic object. */ -static bfd_boolean +static bool sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_sh_link_hash_table *htab; @@ -2360,15 +2359,15 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) default: bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->root.dynamic_sections_created) - return TRUE; + return true; /* We need to create .plt, .rel[a].plt, .got, .got.plt, .dynbss, and .rel[a].bss sections. */ @@ -2387,7 +2386,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->root.splt = s; if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; if (bed->want_plt_sym) { @@ -2398,9 +2397,9 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (! (_bfd_generic_link_add_one_symbol (info, abfd, "_PROCEDURE_LINKAGE_TABLE_", BSF_GLOBAL, s, - (bfd_vma) 0, (const char *) NULL, FALSE, + (bfd_vma) 0, (const char *) NULL, false, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; @@ -2409,7 +2408,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = bfd_make_section_anyway_with_flags (abfd, @@ -2419,11 +2418,11 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->root.srelplt = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; if (htab->root.sgot == NULL && !create_got_section (abfd, info)) - return FALSE; + return false; if (bed->want_dynbss) { @@ -2437,7 +2436,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) SEC_ALLOC | SEC_LINKER_CREATED); htab->root.sdynbss = s; if (s == NULL) - return FALSE; + return false; /* The .rel[a].bss section holds copy relocs. This section is not normally needed. We need to create it here, though, so that the @@ -2459,17 +2458,17 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) htab->root.srelbss = s; if (s == NULL || !bfd_set_section_alignment (s, ptralign)) - return FALSE; + return false; } } if (htab->root.target_os == is_vxworks) { if (!elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2)) - return FALSE; + return false; } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -2478,7 +2477,7 @@ sh_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2487,7 +2486,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info, htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Make sure we know what is going on here. */ BFD_ASSERT (htab->root.dynobj != NULL @@ -2517,7 +2516,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -2533,7 +2532,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->root.u.def.value = def->root.u.def.value; if (info->nocopyreloc) h->non_got_ref = def->non_got_ref; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2544,18 +2543,18 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (0 && info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -2563,7 +2562,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (0 && !_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -2599,7 +2598,7 @@ sh_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -2608,12 +2607,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; eh = (struct elf_sh_link_hash_entry *) h; if ((h->got.refcount > 0 @@ -2638,7 +2637,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (bfd_link_pic (info) @@ -2716,7 +2715,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; enum got_type got_type = sh_elf_hash_entry (h)->got_type; /* Make sure this symbol is output as a dynamic symbol. @@ -2725,7 +2724,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->root.sgot; @@ -2818,7 +2817,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) } if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -2871,7 +2870,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -2894,7 +2893,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -2919,14 +2918,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) htab->srofixup->size -= 4 * (p->count - p->pc_count); } - return TRUE; + return true; } /* This function is called after all the input files have been read, and the input sections have been assigned to output sections. It's a convenient place to determine the PLT style. */ -static bfd_boolean +static bool sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { sh_elf_hash_table (info)->plt_info = get_plt_info (output_bfd, @@ -2935,25 +2934,25 @@ sh_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) if (sh_elf_hash_table (info)->fdpic_p && !bfd_link_relocatable (info) && !bfd_elf_stack_segment_size (output_bfd, info, "__stacksize", DEFAULT_STACK_SIZE)) - return FALSE; - return TRUE; + return false; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_sh_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->root.dynobj; BFD_ASSERT (dynobj != NULL); @@ -3061,7 +3060,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, local_funcdesc = (union gotref *) bfd_zalloc (ibfd, size); if (local_funcdesc == NULL) - return FALSE; + return false; sh_elf_local_funcdesc (ibfd) = local_funcdesc; local_funcdesc += (local_got - elf_local_got_refcounts (ibfd)); @@ -3136,7 +3135,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -3155,7 +3154,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->root.srelplt && s != htab->srelplt2) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3193,7 +3192,7 @@ sh_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_maybe_vxworks_add_dynamic_tags (output_bfd, info, @@ -3263,7 +3262,7 @@ sh_elf_osec_to_segment (bfd *output_bfd, asection *osec) return (p != NULL) ? p - elf_tdata (output_bfd)->phdr : -1; } -static bfd_boolean +static bool sh_elf_osec_readonly_p (bfd *output_bfd, asection *osec) { unsigned seg = sh_elf_osec_to_segment (output_bfd, osec); @@ -3274,7 +3273,7 @@ sh_elf_osec_readonly_p (bfd *output_bfd, asection *osec) /* Generate the initial contents of a local function descriptor, along with any relocations or fixups required. */ -static bfd_boolean +static bool sh_elf_initialize_funcdesc (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3342,7 +3341,7 @@ sh_elf_initialize_funcdesc (bfd *output_bfd, bfd_put_32 (output_bfd, addr, htab->sfuncdesc->contents + offset); bfd_put_32 (output_bfd, seg, htab->sfuncdesc->contents + offset + 4); - return TRUE; + return true; } /* Install a 20-bit movi20 field starting at ADDR, which occurs in OUTPUT_BFD. @@ -3393,14 +3392,14 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, asection *splt = NULL; asection *sreloc = NULL; asection *srelgot = NULL; - bfd_boolean is_vxworks_tls; + bool is_vxworks_tls; unsigned isec_segment, got_segment, plt_segment, check_segment[2]; - bfd_boolean fdpic_p = FALSE; + bool fdpic_p = false; if (!is_sh_elf (input_bfd)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } htab = sh_elf_hash_table (info); @@ -3451,7 +3450,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_vma off; enum got_type got_type; const char *symname = NULL; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; r_symndx = ELF32_R_SYM (rel->r_info); @@ -3481,7 +3480,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, && r_type <= (int) R_SH_LAST_INVALID_RELOC_6)) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = get_howto_table (output_bfd) + r_type; @@ -3491,7 +3490,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (! howto->partial_inplace) addend = rel->r_addend; - resolved_to_zero = FALSE; + resolved_to_zero = false; h = NULL; sym = NULL; sec = NULL; @@ -3568,7 +3567,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, "%s relocation against SEC_MERGE section"), input_bfd, input_section, (uint64_t) rel->r_offset, howto->name); - return FALSE; + return false; } addend = bfd_get_32 (input_bfd, contents + rel->r_offset); @@ -3594,9 +3593,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) { - bfd_boolean dyn; + bool dyn; - dyn = htab ? htab->root.dynamic_sections_created : FALSE; + dyn = htab ? htab->root.dynamic_sections_created : false; sec = h->root.u.def.section; /* In these cases, we don't need the relocation value. We check specially because in some obscure cases @@ -3677,7 +3676,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (uint64_t) rel->r_offset, howto->name, h->root.root.string); - return FALSE; + return false; } } else if (h->root.type == bfd_link_hash_undefweak) @@ -3756,7 +3755,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, input_section->owner, (uint64_t) rel->r_offset); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } relocation -= 4; goto final_link_relocate; @@ -3766,7 +3765,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, default: bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; case R_SH_DIR16: case R_SH_DIR8: @@ -3786,7 +3785,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, input_section->owner, (uint64_t) rel->r_offset, howto->name, (uint64_t) relocation); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } goto final_link_relocate; @@ -3803,7 +3802,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (uint64_t) rel->r_offset, howto->name, (uint64_t) relocation); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } goto final_link_relocate; @@ -3819,7 +3818,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (uint64_t) rel->r_offset, (int64_t) relocation); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } goto final_link_relocate; @@ -3835,7 +3834,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (uint64_t) rel->r_offset, (int64_t) relocation); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } goto final_link_relocate; @@ -3854,7 +3853,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip, relocate; + bool skip, relocate; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -3863,21 +3862,21 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (sreloc == NULL) { sreloc = _bfd_elf_get_dynamic_reloc_section - (input_bfd, input_section, /*rela?*/ TRUE); + (input_bfd, input_section, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -3965,7 +3964,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, input_section, (uint64_t) rel->r_offset, symname); - return FALSE; + return false; } offset = _bfd_elf_section_offset (output_bfd, info, @@ -4026,7 +4025,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -4321,7 +4320,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { if (!sh_elf_initialize_funcdesc (output_bfd, info, h, offset, NULL, 0)) - return FALSE; + return false; sh_elf_hash_entry (h)->funcdesc.offset |= 1; } } @@ -4337,7 +4336,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (!sh_elf_initialize_funcdesc (output_bfd, info, NULL, offset, sec, sym->st_value)) - return FALSE; + return false; local_funcdesc[r_symndx].offset |= 1; } } @@ -4360,7 +4359,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, input_section, (uint64_t) rel->r_offset, symname); - return FALSE; + return false; } offset = _bfd_elf_section_offset (output_bfd, info, @@ -4384,7 +4383,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (info, _("cannot emit dynamic relocations in read-only section"), symname, input_bfd, reloc_section, reloc_offset); - return FALSE; + return false; } offset = _bfd_elf_section_offset (output_bfd, info, @@ -4461,7 +4460,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, "%s relocation against external symbol \"%s\""), input_bfd, input_section, (uint64_t) rel->r_offset, howto->name, h->root.root.string); - return FALSE; + return false; } else { @@ -4477,7 +4476,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { if (!sh_elf_initialize_funcdesc (output_bfd, info, h, offset, NULL, 0)) - return FALSE; + return false; sh_elf_hash_entry (h)->funcdesc.offset |= 1; } } @@ -4493,7 +4492,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (!sh_elf_initialize_funcdesc (output_bfd, info, NULL, offset, sec, sym->st_value)) - return FALSE; + return false; local_funcdesc[r_symndx].offset |= 1; } } @@ -4578,7 +4577,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB(%pA): offset in relocation for GD->LE translation is too small: %#" PRIx64), input_bfd, input_section, (uint64_t) offset); - return FALSE; + return false; } /* Size of GD instructions is 16 or 18. */ @@ -4667,7 +4666,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB(%pA): offset in relocation for IE->LE translation is too small: %#" PRIx64), input_bfd, input_section, (uint64_t) offset); - return FALSE; + return false; } /* Size of IE instructions is 10 or 12. */ @@ -4816,7 +4815,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB(%pA): offset in relocation for GD->IE translation is too small: %#" PRIx64), input_bfd, input_section, (uint64_t) offset); - return FALSE; + return false; } /* Size of GD instructions is 16 or 18. */ @@ -4884,7 +4883,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB(%pA): offset in relocation for LD->LE translation is too small: %#" PRIx64), input_bfd, input_section, (uint64_t) offset); - return FALSE; + return false; } /* Size of LD instructions is 16 or 18. */ @@ -4973,9 +4972,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (sreloc == NULL) { sreloc = _bfd_elf_get_dynamic_reloc_section - (input_bfd, input_section, /*rela?*/ TRUE); + (input_bfd, input_section, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } if (h == NULL || h->dynindx == -1) @@ -5012,7 +5011,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%X%C: relocation to \"%s\" references a different segment\n"), input_bfd, input_section, rel->r_offset, symname); - return FALSE; + return false; } else info->callbacks->einfo @@ -5042,7 +5041,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, name = (bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name)); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -5055,7 +5054,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* This is a version of bfd_generic_get_relocated_section_contents @@ -5066,7 +5065,7 @@ sh_elf_get_relocated_section_contents (bfd *output_bfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { Elf_Internal_Shdr *symtab_hdr; @@ -5099,7 +5098,7 @@ sh_elf_get_relocated_section_contents (bfd *output_bfd, internal_relocs = (_bfd_elf_link_read_relocs (input_bfd, input_section, NULL, - (Elf_Internal_Rela *) NULL, FALSE)); + (Elf_Internal_Rela *) NULL, false)); if (internal_relocs == NULL) goto error_return; @@ -5273,7 +5272,7 @@ sh_elf_optimized_tls_reloc (struct bfd_link_info *info, int r_type, Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -5289,7 +5288,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, sreloc = NULL; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_sh_elf (abfd)); @@ -5298,7 +5297,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) @@ -5380,7 +5379,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, if (htab->root.dynobj == NULL) htab->root.dynobj = abfd; if (!create_got_section (htab->root.dynobj, info)) - return FALSE; + return false; break; default: @@ -5394,14 +5393,14 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, Reconstruct it for later use during GC. */ case R_SH_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_SH_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_SH_TLS_IE_32: @@ -5454,7 +5453,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; sh_elf_local_got_type (abfd) = (char *) (local_got_refcounts + symtab_hdr->sh_info); @@ -5489,7 +5488,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, /* xgettext:c-format */ (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h->root.root.string); - return FALSE; + return false; } } @@ -5515,7 +5514,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, _bfd_error_handler (_("%pB: Function descriptor relocation with non-zero addend"), abfd); - return FALSE; + return false; } if (h == NULL) @@ -5531,7 +5530,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, size = symtab_hdr->sh_info * sizeof (union gotref); local_funcdesc = (union gotref *) bfd_zalloc (abfd, size); if (local_funcdesc == NULL) - return FALSE; + return false; sh_elf_local_funcdesc (abfd) = local_funcdesc; } local_funcdesc[r_symndx].refcount += 1; @@ -5658,10 +5657,10 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->root.dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, htab->root.dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -5678,7 +5677,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -5694,7 +5693,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, size_t amt = sizeof (*p); p = bfd_alloc (htab->root.dynobj, amt); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -5722,7 +5721,7 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, _bfd_error_handler (_("%pB: TLS local exec code cannot be linked into shared objects"), abfd); - return FALSE; + return false; } break; @@ -5736,26 +5735,26 @@ sh_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, } } - return TRUE; + return true; } #ifndef sh_elf_set_mach_from_flags static unsigned int sh_ef_bfd_table[] = { EF_SH_BFD_TABLE }; -static bfd_boolean +static bool sh_elf_set_mach_from_flags (bfd *abfd) { flagword flags = elf_elfheader (abfd)->e_flags & EF_SH_MACH_MASK; if (flags >= ARRAY_SIZE (sh_ef_bfd_table)) - return FALSE; + return false; if (sh_ef_bfd_table[flags] == 0) - return FALSE; + return false; bfd_default_set_arch_mach (abfd, bfd_arch_sh, sh_ef_bfd_table[flags]); - return TRUE; + return true; } @@ -5783,14 +5782,14 @@ sh_elf_get_flags_from_mach (unsigned long mach) #ifndef sh_elf_copy_private_data /* Copy backend specific data from one object module to another */ -static bfd_boolean +static bool sh_elf_copy_private_data (bfd * ibfd, bfd * obfd) { if (! is_sh_elf (ibfd) || ! is_sh_elf (obfd)) - return TRUE; + return true; if (! _bfd_elf_copy_private_bfd_data (ibfd, obfd)) - return FALSE; + return false; return sh_elf_set_mach_from_flags (obfd); } @@ -5817,14 +5816,14 @@ sh_find_elf_flags (unsigned int arch_set) DSP while the other uses FPU - or there is no known architecture that fits the requirements then an error is emitted. */ -static bfd_boolean +static bool sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; unsigned int old_arch, new_arch, merged_arch; if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; old_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (obfd)); new_arch = sh_get_arch_up_from_bfd_mach (bfd_get_mach (ibfd)); @@ -5841,7 +5840,7 @@ sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info) SH_ARCH_SET_HAS_DSP (new_arch) ? "dsp" : "floating point", SH_ARCH_SET_HAS_DSP (new_arch) ? "floating point" : "dsp"); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else if (!SH_VALID_ARCH_SET (merged_arch)) { @@ -5852,34 +5851,34 @@ sh_merge_bfd_arch (bfd *ibfd, struct bfd_link_info *info) bfd_printable_name (obfd), bfd_printable_name (ibfd)); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_default_set_arch_mach (obfd, bfd_arch_sh, sh_get_bfd_mach_from_arch_set (merged_arch)); - return TRUE; + return true; } /* This routine initialises the elf flags when required and calls sh_merge_bfd_arch() to check dsp/fpu compatibility. */ -static bfd_boolean +static bool sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; if (! is_sh_elf (ibfd) || ! is_sh_elf (obfd)) - return TRUE; + return true; if (! elf_flags_init (obfd)) { /* This happens when ld starts out with a 'blank' output file. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; sh_elf_set_mach_from_flags (obfd); if (elf_elfheader (obfd)->e_flags & EF_SH_FDPIC) @@ -5892,7 +5891,7 @@ sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info) "with instructions used in previous modules"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } elf_elfheader (obfd)->e_flags &= ~EF_SH_MACH_MASK; @@ -5904,10 +5903,10 @@ sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: attempt to mix FDPIC and non-FDPIC objects"), ibfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } #endif /* not sh_elf_merge_private_data */ @@ -5915,11 +5914,11 @@ sh_elf_merge_private_data (bfd *ibfd, struct bfd_link_info *info) as the specific tdata. We set also the machine architecture from flags here. */ -static bfd_boolean +static bool sh_elf_object_p (bfd *abfd) { if (! sh_elf_set_mach_from_flags (abfd)) - return FALSE; + return false; return (((elf_elfheader (abfd)->e_flags & EF_SH_FDPIC) != 0) == fdpic_object_p (abfd)); @@ -5928,7 +5927,7 @@ sh_elf_object_p (bfd *abfd) /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym) @@ -5937,7 +5936,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (h->plt.offset != (bfd_vma) -1) { @@ -6005,7 +6004,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, BFD_ASSERT (r == bfd_reloc_ok); } else - install_plt_field (output_bfd, FALSE, got_offset, + install_plt_field (output_bfd, false, got_offset, (splt->contents + h->plt.offset + plt_info->symbol_fields.got_entry)); @@ -6014,7 +6013,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, { BFD_ASSERT (!plt_info->symbol_fields.got20); - install_plt_field (output_bfd, FALSE, + install_plt_field (output_bfd, false, (sgotplt->output_section->vma + sgotplt->output_offset + got_offset), @@ -6053,7 +6052,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, + plt_info->symbol_fields.plt)); } else - install_plt_field (output_bfd, TRUE, + install_plt_field (output_bfd, true, splt->output_section->vma + splt->output_offset, (splt->contents + h->plt.offset @@ -6069,7 +6068,7 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, got_offset = plt_index * 8; if (plt_info->symbol_fields.reloc_offset != MINUS_ONE) - install_plt_field (output_bfd, FALSE, + install_plt_field (output_bfd, false, plt_index * sizeof (Elf32_External_Rela), (splt->contents + h->plt.offset @@ -6228,12 +6227,12 @@ sh_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, || (htab->root.target_os != is_vxworks && h == htab->root.hgot)) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct elf_sh_link_hash_table *htab; @@ -6242,7 +6241,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) htab = sh_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; sgotplt = htab->root.sgotplt; sdyn = bfd_get_linker_section (htab->root.dynobj, ".dynamic"); @@ -6306,7 +6305,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) htab->plt_info->plt0_entry_size); for (i = 0; i < ARRAY_SIZE (htab->plt_info->plt0_got_fields); i++) if (htab->plt_info->plt0_got_fields[i] != MINUS_ONE) - install_plt_field (output_bfd, FALSE, + install_plt_field (output_bfd, false, (sgotplt->output_section->vma + sgotplt->output_offset + (i * 4)), @@ -6396,7 +6395,7 @@ sh_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) BFD_ASSERT (htab->root.srelgot->reloc_count * sizeof (Elf32_External_Rela) == htab->root.srelgot->size); - return TRUE; + return true; } static enum elf_reloc_type_class @@ -6420,7 +6419,7 @@ sh_elf_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, #if !defined SH_TARGET_ALREADY_DEFINED /* Support for Linux core dump NOTE sections. */ -static bfd_boolean +static bool elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -6429,7 +6428,7 @@ elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 168: /* Linux/SH */ /* pr_cursig */ @@ -6450,13 +6449,13 @@ elf32_shlin_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* Linux/SH elf_prpsinfo */ elf_tdata (abfd)->core->program @@ -6477,7 +6476,7 @@ elf32_shlin_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } #endif /* not SH_TARGET_ALREADY_DEFINED */ @@ -6498,7 +6497,7 @@ sh_elf_plt_sym_val (bfd_vma i, const asection *plt, /* Decide whether to attempt to turn absptr or lsda encodings in shared libraries into pcrel within the given input section. */ -static bfd_boolean +static bool sh_elf_use_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, asection *eh_frame_section ATTRIBUTE_UNUSED) @@ -6507,9 +6506,9 @@ sh_elf_use_relative_eh_frame (bfd *input_bfd ATTRIBUTE_UNUSED, /* We can't use PC-relative encodings in FDPIC binaries, in general. */ if (htab->fdpic_p) - return FALSE; + return false; - return TRUE; + return true; } /* Adjust the contents of an eh_frame_hdr section before they're output. */ @@ -6618,7 +6617,7 @@ sh_elf_encode_eh_address (bfd *abfd, #define elf_backend_got_header_size 12 #define elf_backend_dtrel_excludes_plt 1 -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #if !defined SH_TARGET_ALREADY_DEFINED diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c index 547c7b92a6..33eee5446b 100644 --- a/bfd/elf32-sparc.c +++ b/bfd/elf32-sparc.c @@ -30,13 +30,13 @@ /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 260: /* Solaris prpsinfo_t. */ elf_tdata (abfd)->core->program @@ -53,7 +53,7 @@ elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) break; } - return TRUE; + return true; } /* Functions for dealing with the e_flags field. @@ -66,25 +66,25 @@ elf32_sparc_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; - bfd_boolean error; + bool error; unsigned long ibfd_mach; /* FIXME: This should not be static. */ static unsigned long previous_ibfd_e_flags = (unsigned long) -1; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; - error = FALSE; + error = false; ibfd_mach = bfd_get_mach (ibfd); if (bfd_mach_sparc_64bit_p (ibfd_mach)) { - error = TRUE; + error = true; _bfd_error_handler (_("%pB: compiled for a 64 bit system and target is 32 bit"), ibfd); } @@ -100,14 +100,14 @@ elf32_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { _bfd_error_handler (_("%pB: linking little endian files with big endian files"), ibfd); - error = TRUE; + error = true; } previous_ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA; if (error) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } return _bfd_sparc_elf_merge_private_bfd_data (ibfd, info); @@ -160,7 +160,7 @@ sparc_final_write_processing (bfd *abfd) } } -static bfd_boolean +static bool elf32_sparc_final_write_processing (bfd *abfd) { sparc_final_write_processing (abfd); @@ -271,7 +271,7 @@ elf32_sparc_reloc_type_class (const struct bfd_link_info *info, #define elf_backend_want_dynrelro 1 #define elf_backend_rela_normal 1 -#define elf_backend_linux_prpsinfo32_ugid16 TRUE +#define elf_backend_linux_prpsinfo32_ugid16 true #include "elf32-target.h" @@ -293,7 +293,7 @@ elf32_sparc_reloc_type_class (const struct bfd_link_info *info, #undef elf_backend_strtab_flags #define elf_backend_strtab_flags SHF_STRINGS -static bfd_boolean +static bool elf32_sparc_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED, @@ -301,7 +301,7 @@ elf32_sparc_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSE { /* PR 19938: FIXME: Need to add code for setting the sh_info and sh_link fields of Solaris specific section types. */ - return FALSE; + return false; } #undef elf_backend_copy_special_section_fields @@ -312,7 +312,7 @@ elf32_sparc_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSE /* A final_write_processing hook that does both the SPARC- and VxWorks- specific handling. */ -static bfd_boolean +static bool elf32_sparc_vxworks_final_write_processing (bfd *abfd) { sparc_final_write_processing (abfd); diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index 1058df1328..5bffc1d8ad 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -40,60 +40,60 @@ static bfd_reloc_status_type spu_elf_rel9 (bfd *, arelent *, asymbol *, array, so it must be declared in the order of that type. */ static reloc_howto_type elf_howto_table[] = { - HOWTO (R_SPU_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, + HOWTO (R_SPU_NONE, 0, 3, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_NONE", - FALSE, 0, 0x00000000, FALSE), - HOWTO (R_SPU_ADDR10, 4, 2, 10, FALSE, 14, complain_overflow_bitfield, + false, 0, 0x00000000, false), + HOWTO (R_SPU_ADDR10, 4, 2, 10, false, 14, complain_overflow_bitfield, bfd_elf_generic_reloc, "SPU_ADDR10", - FALSE, 0, 0x00ffc000, FALSE), - HOWTO (R_SPU_ADDR16, 2, 2, 16, FALSE, 7, complain_overflow_bitfield, + false, 0, 0x00ffc000, false), + HOWTO (R_SPU_ADDR16, 2, 2, 16, false, 7, complain_overflow_bitfield, bfd_elf_generic_reloc, "SPU_ADDR16", - FALSE, 0, 0x007fff80, FALSE), - HOWTO (R_SPU_ADDR16_HI, 16, 2, 16, FALSE, 7, complain_overflow_bitfield, + false, 0, 0x007fff80, false), + HOWTO (R_SPU_ADDR16_HI, 16, 2, 16, false, 7, complain_overflow_bitfield, bfd_elf_generic_reloc, "SPU_ADDR16_HI", - FALSE, 0, 0x007fff80, FALSE), - HOWTO (R_SPU_ADDR16_LO, 0, 2, 16, FALSE, 7, complain_overflow_dont, + false, 0, 0x007fff80, false), + HOWTO (R_SPU_ADDR16_LO, 0, 2, 16, false, 7, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_ADDR16_LO", - FALSE, 0, 0x007fff80, FALSE), - HOWTO (R_SPU_ADDR18, 0, 2, 18, FALSE, 7, complain_overflow_bitfield, + false, 0, 0x007fff80, false), + HOWTO (R_SPU_ADDR18, 0, 2, 18, false, 7, complain_overflow_bitfield, bfd_elf_generic_reloc, "SPU_ADDR18", - FALSE, 0, 0x01ffff80, FALSE), - HOWTO (R_SPU_ADDR32, 0, 2, 32, FALSE, 0, complain_overflow_dont, + false, 0, 0x01ffff80, false), + HOWTO (R_SPU_ADDR32, 0, 2, 32, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_ADDR32", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_SPU_REL16, 2, 2, 16, TRUE, 7, complain_overflow_bitfield, + false, 0, 0xffffffff, false), + HOWTO (R_SPU_REL16, 2, 2, 16, true, 7, complain_overflow_bitfield, bfd_elf_generic_reloc, "SPU_REL16", - FALSE, 0, 0x007fff80, TRUE), - HOWTO (R_SPU_ADDR7, 0, 2, 7, FALSE, 14, complain_overflow_dont, + false, 0, 0x007fff80, true), + HOWTO (R_SPU_ADDR7, 0, 2, 7, false, 14, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_ADDR7", - FALSE, 0, 0x001fc000, FALSE), - HOWTO (R_SPU_REL9, 2, 2, 9, TRUE, 0, complain_overflow_signed, + false, 0, 0x001fc000, false), + HOWTO (R_SPU_REL9, 2, 2, 9, true, 0, complain_overflow_signed, spu_elf_rel9, "SPU_REL9", - FALSE, 0, 0x0180007f, TRUE), - HOWTO (R_SPU_REL9I, 2, 2, 9, TRUE, 0, complain_overflow_signed, + false, 0, 0x0180007f, true), + HOWTO (R_SPU_REL9I, 2, 2, 9, true, 0, complain_overflow_signed, spu_elf_rel9, "SPU_REL9I", - FALSE, 0, 0x0000c07f, TRUE), - HOWTO (R_SPU_ADDR10I, 0, 2, 10, FALSE, 14, complain_overflow_signed, + false, 0, 0x0000c07f, true), + HOWTO (R_SPU_ADDR10I, 0, 2, 10, false, 14, complain_overflow_signed, bfd_elf_generic_reloc, "SPU_ADDR10I", - FALSE, 0, 0x00ffc000, FALSE), - HOWTO (R_SPU_ADDR16I, 0, 2, 16, FALSE, 7, complain_overflow_signed, + false, 0, 0x00ffc000, false), + HOWTO (R_SPU_ADDR16I, 0, 2, 16, false, 7, complain_overflow_signed, bfd_elf_generic_reloc, "SPU_ADDR16I", - FALSE, 0, 0x007fff80, FALSE), - HOWTO (R_SPU_REL32, 0, 2, 32, TRUE, 0, complain_overflow_dont, + false, 0, 0x007fff80, false), + HOWTO (R_SPU_REL32, 0, 2, 32, true, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_REL32", - FALSE, 0, 0xffffffff, TRUE), - HOWTO (R_SPU_ADDR16X, 0, 2, 16, FALSE, 7, complain_overflow_bitfield, + false, 0, 0xffffffff, true), + HOWTO (R_SPU_ADDR16X, 0, 2, 16, false, 7, complain_overflow_bitfield, bfd_elf_generic_reloc, "SPU_ADDR16X", - FALSE, 0, 0x007fff80, FALSE), - HOWTO (R_SPU_PPU32, 0, 2, 32, FALSE, 0, complain_overflow_dont, + false, 0, 0x007fff80, false), + HOWTO (R_SPU_PPU32, 0, 2, 32, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_PPU32", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_SPU_PPU64, 0, 4, 64, FALSE, 0, complain_overflow_dont, + false, 0, 0xffffffff, false), + HOWTO (R_SPU_PPU64, 0, 4, 64, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_PPU64", - FALSE, 0, -1, FALSE), - HOWTO (R_SPU_ADD_PIC, 0, 0, 0, FALSE, 0, complain_overflow_dont, + false, 0, -1, false), + HOWTO (R_SPU_ADD_PIC, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "SPU_ADD_PIC", - FALSE, 0, 0x00000000, FALSE), + false, 0, 0x00000000, false), }; static struct bfd_elf_special_section const spu_elf_special_sections[] = { @@ -148,7 +148,7 @@ spu_elf_bfd_to_reloc_type (bfd_reloc_code_real_type code) } } -static bfd_boolean +static bool spu_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -163,10 +163,10 @@ spu_elf_info_to_howto (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_howto_table[(int) r_type]; - return TRUE; + return true; } static reloc_howto_type * @@ -244,7 +244,7 @@ spu_elf_rel9 (bfd *abfd, arelent *reloc_entry, asymbol *symbol, return bfd_reloc_ok; } -static bfd_boolean +static bool spu_elf_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -253,7 +253,7 @@ spu_elf_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, sizeof (*sdata)); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -262,7 +262,7 @@ spu_elf_new_section_hook (bfd *abfd, asection *sec) /* Set up overlay info for executables. */ -static bfd_boolean +static bool spu_elf_object_p (bfd *abfd) { if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) @@ -296,7 +296,7 @@ spu_elf_object_p (bfd *abfd) } } } - return TRUE; + return true; } /* Specially mark defined symbols named _EAR_* with BSF_KEEP so that @@ -495,7 +495,7 @@ spu_elf_setup (struct bfd_link_info *info, struct spu_elf_params *params) to (hash, NULL) for global symbols, and (NULL, sym) for locals. Set *SYMSECP to the symbol's section. *LOCSYMSP caches local syms. */ -static bfd_boolean +static bool get_sym_h (struct elf_link_hash_entry **hp, Elf_Internal_Sym **symp, asection **symsecp, @@ -543,7 +543,7 @@ get_sym_h (struct elf_link_hash_entry **hp, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (locsyms == NULL) - return FALSE; + return false; *locsymsp = locsyms; } sym = locsyms + r_symndx; @@ -558,13 +558,13 @@ get_sym_h (struct elf_link_hash_entry **hp, *symsecp = bfd_section_from_elf_index (ibfd, sym->st_shndx); } - return TRUE; + return true; } /* Create the note section if not already present. This is done early so that the linker maps the sections to the right place in the output. */ -bfd_boolean +bool spu_elf_create_sections (struct bfd_link_info *info) { struct spu_link_hash_table *htab = spu_hash_table (info); @@ -590,7 +590,7 @@ spu_elf_create_sections (struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (ibfd, SPU_PTNOTE_SPUNAME, flags); if (s == NULL || !bfd_set_section_alignment (s, 4)) - return FALSE; + return false; /* Because we didn't set SEC_LINKER_CREATED we need to set the proper section type. */ elf_section_type (s) = SHT_NOTE; @@ -600,11 +600,11 @@ spu_elf_create_sections (struct bfd_link_info *info) size += (name_len + 3) & -4; if (!bfd_set_section_size (s, size)) - return FALSE; + return false; data = bfd_zalloc (ibfd, size); if (data == NULL) - return FALSE; + return false; bfd_put_32 (ibfd, sizeof (SPU_PLUGIN_NAME), data + 0); bfd_put_32 (ibfd, name_len, data + 4); @@ -627,11 +627,11 @@ spu_elf_create_sections (struct bfd_link_info *info) | SEC_IN_MEMORY | SEC_LINKER_CREATED); s = bfd_make_section_anyway_with_flags (ibfd, ".fixup", flags); if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; htab->sfixup = s; } - return TRUE; + return true; } /* qsort predicate to sort sections by vma. */ @@ -831,7 +831,7 @@ spu_elf_find_overlays (struct bfd_link_info *info) struct elf_link_hash_entry *h; name = entry_names[i][htab->params->ovly_flavour]; - h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE); + h = elf_link_hash_lookup (&htab->elf, name, true, false, false); if (h == NULL) return 0; @@ -869,7 +869,7 @@ spu_elf_find_overlays (struct bfd_link_info *info) brhz 00100010 0.. brhnz 00100011 0.. */ -static bfd_boolean +static bool is_branch (const unsigned char *insn) { return (insn[0] & 0xec) == 0x20 && (insn[1] & 0x80) == 0; @@ -885,7 +885,7 @@ is_branch (const unsigned char *insn) bihz 00100101 010 bihnz 00100101 011 */ -static bfd_boolean +static bool is_indirect_branch (const unsigned char *insn) { return (insn[0] & 0xef) == 0x25 && (insn[1] & 0x80) == 0; @@ -895,7 +895,7 @@ is_indirect_branch (const unsigned char *insn) hbra 0001000.. hbrr 0001001.. */ -static bfd_boolean +static bool is_hint (const unsigned char *insn) { return (insn[0] & 0xfc) == 0x10; @@ -903,22 +903,22 @@ is_hint (const unsigned char *insn) /* True if INPUT_SECTION might need overlay stubs. */ -static bfd_boolean +static bool maybe_needs_stubs (asection *input_section) { /* No stubs for debug sections and suchlike. */ if ((input_section->flags & SEC_ALLOC) == 0) - return FALSE; + return false; /* No stubs for link-once sections that will be discarded. */ if (input_section->output_section == bfd_abs_section_ptr) - return FALSE; + return false; /* Don't create stubs for .eh_frame references. */ if (strcmp (input_section->name, ".eh_frame") == 0) - return FALSE; + return false; - return TRUE; + return true; } enum _stub_type @@ -952,7 +952,7 @@ needs_ovl_stub (struct elf_link_hash_entry *h, struct spu_link_hash_table *htab = spu_hash_table (info); enum elf_spu_reloc_type r_type; unsigned int sym_type; - bfd_boolean branch, hint, call; + bool branch, hint, call; enum _stub_type ret = no_stub; bfd_byte insn[4]; @@ -981,9 +981,9 @@ needs_ovl_stub (struct elf_link_hash_entry *h, sym_type = ELF_ST_TYPE (sym->st_info); r_type = ELF32_R_TYPE (irela->r_info); - branch = FALSE; - hint = FALSE; - call = FALSE; + branch = false; + hint = false; + call = false; if (r_type == R_SPU_REL16 || r_type == R_SPU_ADDR16) { if (contents == NULL) @@ -1072,7 +1072,7 @@ needs_ovl_stub (struct elf_link_hash_entry *h, return ret; } -static bfd_boolean +static bool count_stub (struct spu_link_hash_table *htab, bfd *ibfd, asection *isec, @@ -1102,7 +1102,7 @@ count_stub (struct spu_link_hash_table *htab, * sizeof (*elf_local_got_ents (ibfd))); elf_local_got_ents (ibfd) = bfd_zmalloc (amt); if (elf_local_got_ents (ibfd) == NULL) - return FALSE; + return false; } head = elf_local_got_ents (ibfd) + ELF32_R_SYM (irela->r_info); } @@ -1110,7 +1110,7 @@ count_stub (struct spu_link_hash_table *htab, if (htab->params->ovly_flavour == ovly_soft_icache) { htab->stub_count[ovl] += 1; - return TRUE; + return true; } addend = 0; @@ -1150,7 +1150,7 @@ count_stub (struct spu_link_hash_table *htab, { g = bfd_malloc (sizeof *g); if (g == NULL) - return FALSE; + return false; g->ovl = ovl; g->addend = addend; g->stub_addr = (bfd_vma) -1; @@ -1160,7 +1160,7 @@ count_stub (struct spu_link_hash_table *htab, htab->stub_count[ovl] += 1; } - return TRUE; + return true; } /* Support two sizes of overlay stubs, a slower more compact stub of two @@ -1203,7 +1203,7 @@ ovl_stub_size_log2 (struct spu_elf_params *params) .quad xor_pattern */ -static bfd_boolean +static bool build_stub (struct bfd_link_info *info, bfd *ibfd, asection *isec, @@ -1237,7 +1237,7 @@ build_stub (struct bfd_link_info *info, { g = bfd_malloc (sizeof *g); if (g == NULL) - return FALSE; + return false; g->ovl = ovl; g->br_addr = 0; if (irela != NULL) @@ -1256,10 +1256,10 @@ build_stub (struct bfd_link_info *info, abort (); if (g->ovl == 0 && ovl != 0) - return TRUE; + return true; if (g->stub_addr != (bfd_vma) -1) - return TRUE; + return true; } sec = htab->stub_sec[ovl]; @@ -1273,7 +1273,7 @@ build_stub (struct bfd_link_info *info, if (((dest | to | from) & 3) != 0) { htab->stub_err = 1; - return FALSE; + return false; } dest_ovl = spu_elf_section_data (dest_sec->output_section)->u.o.ovl_index; @@ -1447,7 +1447,7 @@ build_stub (struct bfd_link_info *info, len += 1 + 8; name = bfd_malloc (len + 1); if (name == NULL) - return FALSE; + return false; sprintf (name, "%08x.ovl_call.", g->ovl); if (h != NULL) @@ -1459,10 +1459,10 @@ build_stub (struct bfd_link_info *info, if (add != 0) sprintf (name + len - 9, "+%x", add); - h = elf_link_hash_lookup (&htab->elf, name, TRUE, TRUE, FALSE); + h = elf_link_hash_lookup (&htab->elf, name, true, true, false); free (name); if (h == NULL) - return FALSE; + return false; if (h->root.type == bfd_link_hash_new) { h->root.type = bfd_link_hash_defined; @@ -1478,13 +1478,13 @@ build_stub (struct bfd_link_info *info, } } - return TRUE; + return true; } /* Called via elf_link_hash_traverse to allocate stubs for any _SPUEAR_ symbols. */ -static bfd_boolean +static bool allocate_spuear_stubs (struct elf_link_hash_entry *h, void *inf) { /* Symbols starting with _SPUEAR_ need a stub because they may be @@ -1506,10 +1506,10 @@ allocate_spuear_stubs (struct elf_link_hash_entry *h, void *inf) return count_stub (htab, NULL, NULL, nonovl_stub, h, NULL); } - return TRUE; + return true; } -static bfd_boolean +static bool build_spuear_stubs (struct elf_link_hash_entry *h, void *inf) { /* Symbols starting with _SPUEAR_ need a stub because they may be @@ -1532,13 +1532,13 @@ build_spuear_stubs (struct elf_link_hash_entry *h, void *inf) h->root.u.def.value, sym_sec); } - return TRUE; + return true; } /* Size or build stubs. */ -static bfd_boolean -process_stubs (struct bfd_link_info *info, bfd_boolean build) +static bool +process_stubs (struct bfd_link_info *info, bool build) { struct spu_link_hash_table *htab = spu_hash_table (info); bfd *ibfd; @@ -1601,7 +1601,7 @@ process_stubs (struct bfd_link_info *info, bfd_boolean build) error_ret_free_local: if (symtab_hdr->contents != (unsigned char *) local_syms) free (local_syms); - return FALSE; + return false; } /* Determine the reloc target section. */ @@ -1659,7 +1659,7 @@ process_stubs (struct bfd_link_info *info, bfd_boolean build) } } - return TRUE; + return true; } /* Allocate space for overlay call and return stubs. @@ -1675,7 +1675,7 @@ spu_elf_size_stubs (struct bfd_link_info *info) unsigned int i; asection *stub; - if (!process_stubs (info, FALSE)) + if (!process_stubs (info, false)) return 0; htab = spu_hash_table (info); @@ -1861,7 +1861,7 @@ ovl_mgr_stat (struct bfd *abfd ATTRIBUTE_UNUSED, return 0; } -bfd_boolean +bool spu_elf_open_builtin_lib (bfd **ovl_bfd, const struct _ovl_stream *stream) { *ovl_bfd = bfd_openr_iovec ("builtin ovl_mgr", @@ -1890,7 +1890,7 @@ define_ovtab_symbol (struct spu_link_hash_table *htab, const char *name) { struct elf_link_hash_entry *h; - h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE); + h = elf_link_hash_lookup (&htab->elf, name, true, false, false); if (h == NULL) return NULL; @@ -1927,7 +1927,7 @@ define_ovtab_symbol (struct spu_link_hash_table *htab, const char *name) /* Fill in all stubs and the overlay tables. */ -static bfd_boolean +static bool spu_elf_build_stubs (struct bfd_link_info *info) { struct spu_link_hash_table *htab = spu_hash_table (info); @@ -1953,7 +1953,7 @@ spu_elf_build_stubs (struct bfd_link_info *info) _bfd_error_handler (_("%s in overlay section"), h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } } @@ -1967,13 +1967,13 @@ spu_elf_build_stubs (struct bfd_link_info *info) htab->stub_sec[i]->contents = bfd_zalloc (htab->stub_sec[i]->owner, htab->stub_sec[i]->size); if (htab->stub_sec[i]->contents == NULL) - return FALSE; + return false; htab->stub_sec[i]->rawsize = htab->stub_sec[i]->size; htab->stub_sec[i]->size = 0; } /* Fill in all the stubs. */ - process_stubs (info, TRUE); + process_stubs (info, true); if (!htab->stub_err) elf_link_hash_traverse (&htab->elf, build_spuear_stubs, info); @@ -1981,7 +1981,7 @@ spu_elf_build_stubs (struct bfd_link_info *info) { _bfd_error_handler (_("overlay stub relocation overflow")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } for (i = 0; i <= htab->num_overlays; i++) @@ -1990,18 +1990,18 @@ spu_elf_build_stubs (struct bfd_link_info *info) { _bfd_error_handler (_("stubs don't match calculated size")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } htab->stub_sec[i]->rawsize = 0; } } if (htab->ovtab == NULL || htab->ovtab->size == 0) - return TRUE; + return true; htab->ovtab->contents = bfd_zalloc (htab->ovtab->owner, htab->ovtab->size); if (htab->ovtab->contents == NULL) - return FALSE; + return false; p = htab->ovtab->contents; if (htab->params->ovly_flavour == ovly_soft_icache) @@ -2010,90 +2010,90 @@ spu_elf_build_stubs (struct bfd_link_info *info) h = define_ovtab_symbol (htab, "__icache_tag_array"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 0; h->size = 16 << htab->num_lines_log2; off = h->size; h = define_ovtab_symbol (htab, "__icache_tag_array_size"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 16 << htab->num_lines_log2; h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_rewrite_to"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = off; h->size = 16 << htab->num_lines_log2; off += h->size; h = define_ovtab_symbol (htab, "__icache_rewrite_to_size"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 16 << htab->num_lines_log2; h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_rewrite_from"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = off; h->size = 16 << (htab->fromelem_size_log2 + htab->num_lines_log2); off += h->size; h = define_ovtab_symbol (htab, "__icache_rewrite_from_size"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 16 << (htab->fromelem_size_log2 + htab->num_lines_log2); h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_log2_fromelemsize"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = htab->fromelem_size_log2; h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_base"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = htab->ovl_sec[0]->vma; h->root.u.def.section = bfd_abs_section_ptr; h->size = htab->num_buf << htab->line_size_log2; h = define_ovtab_symbol (htab, "__icache_linesize"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 1 << htab->line_size_log2; h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_log2_linesize"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = htab->line_size_log2; h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_neg_log2_linesize"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = -htab->line_size_log2; h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_cachesize"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 1 << (htab->num_lines_log2 + htab->line_size_log2); h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_log2_cachesize"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = htab->num_lines_log2 + htab->line_size_log2; h->root.u.def.section = bfd_abs_section_ptr; h = define_ovtab_symbol (htab, "__icache_neg_log2_cachesize"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = -(htab->num_lines_log2 + htab->line_size_log2); h->root.u.def.section = bfd_abs_section_ptr; @@ -2102,11 +2102,11 @@ spu_elf_build_stubs (struct bfd_link_info *info) htab->init->contents = bfd_zalloc (htab->init->owner, htab->init->size); if (htab->init->contents == NULL) - return FALSE; + return false; h = define_ovtab_symbol (htab, "__icache_fileoff"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 0; h->root.u.def.section = htab->init; h->size = 8; @@ -2137,37 +2137,37 @@ spu_elf_build_stubs (struct bfd_link_info *info) h = define_ovtab_symbol (htab, "_ovly_table"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = 16; h->size = htab->num_overlays * 16; h = define_ovtab_symbol (htab, "_ovly_table_end"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = htab->num_overlays * 16 + 16; h->size = 0; h = define_ovtab_symbol (htab, "_ovly_buf_table"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = htab->num_overlays * 16 + 16; h->size = htab->num_buf * 4; h = define_ovtab_symbol (htab, "_ovly_buf_table_end"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = htab->num_overlays * 16 + 16 + htab->num_buf * 4; h->size = 0; } h = define_ovtab_symbol (htab, "_EAR_"); if (h == NULL) - return FALSE; + return false; h->root.u.def.section = htab->toe; h->root.u.def.value = 0; h->size = 16; - return TRUE; + return true; } /* Check that all loadable section VMAs lie in the range @@ -2392,8 +2392,8 @@ alloc_stack_info (asection *sec, int max_fun) static struct function_info * maybe_insert_function (asection *sec, void *sym_h, - bfd_boolean global, - bfd_boolean is_func) + bool global, + bool is_func) { struct _spu_elf_section_data *sec_data = spu_elf_section_data (sec); struct spu_elf_stack_info *sinfo = sec_data->u.i.stack_info; @@ -2433,11 +2433,11 @@ maybe_insert_function (asection *sec, /* Prefer globals over local syms. */ if (global && !sinfo->fun[i].global) { - sinfo->fun[i].global = TRUE; + sinfo->fun[i].global = true; sinfo->fun[i].u.h = sym_h; } if (is_func) - sinfo->fun[i].is_func = TRUE; + sinfo->fun[i].is_func = true; return &sinfo->fun[i]; } /* Ignore a zero-size symbol inside an existing function. */ @@ -2515,25 +2515,25 @@ func_name (struct function_info *fun) /* Read the instruction at OFF in SEC. Return true iff the instruction is a nop, lnop, or stop 0 (all zero insn). */ -static bfd_boolean +static bool is_nop (asection *sec, bfd_vma off) { unsigned char insn[4]; if (off + 4 > sec->size || !bfd_get_section_contents (sec->owner, sec, insn, off, 4)) - return FALSE; + return false; if ((insn[0] & 0xbf) == 0 && (insn[1] & 0xe0) == 0x20) - return TRUE; + return true; if (insn[0] == 0 && insn[1] == 0 && insn[2] == 0 && insn[3] == 0) - return TRUE; - return FALSE; + return true; + return false; } /* Extend the range of FUN to cover nop padding up to LIMIT. Return TRUE iff some instruction other than a NOP was found. */ -static bfd_boolean +static bool insns_at_end (struct function_info *fun, bfd_vma limit) { bfd_vma off = (fun->hi + 3) & -4; @@ -2543,25 +2543,25 @@ insns_at_end (struct function_info *fun, bfd_vma limit) if (off < limit) { fun->hi = off; - return TRUE; + return true; } fun->hi = limit; - return FALSE; + return false; } /* Check and fix overlapping function ranges. Return TRUE iff there are gaps in the current info we have about functions in SEC. */ -static bfd_boolean +static bool check_function_ranges (asection *sec, struct bfd_link_info *info) { struct _spu_elf_section_data *sec_data = spu_elf_section_data (sec); struct spu_elf_stack_info *sinfo = sec_data->u.i.stack_info; int i; - bfd_boolean gaps = FALSE; + bool gaps = false; if (sinfo == NULL) - return FALSE; + return false; for (i = 1; i < sinfo->num_fun; i++) if (sinfo->fun[i - 1].hi > sinfo->fun[i].lo) @@ -2575,14 +2575,14 @@ check_function_ranges (asection *sec, struct bfd_link_info *info) sinfo->fun[i - 1].hi = sinfo->fun[i].lo; } else if (insns_at_end (&sinfo->fun[i - 1], sinfo->fun[i].lo)) - gaps = TRUE; + gaps = true; if (sinfo->num_fun == 0) - gaps = TRUE; + gaps = true; else { if (sinfo->fun[0].lo != 0) - gaps = TRUE; + gaps = true; if (sinfo->fun[sinfo->num_fun - 1].hi > sec->size) { const char *f1 = func_name (&sinfo->fun[sinfo->num_fun - 1]); @@ -2591,7 +2591,7 @@ check_function_ranges (asection *sec, struct bfd_link_info *info) sinfo->fun[sinfo->num_fun - 1].hi = sec->size; } else if (insns_at_end (&sinfo->fun[sinfo->num_fun - 1], sec->size)) - gaps = TRUE; + gaps = true; } return gaps; } @@ -2629,7 +2629,7 @@ find_function (asection *sec, bfd_vma offset, struct bfd_link_info *info) if CALLEE was new. If this function return FALSE, CALLEE should be freed. */ -static bfd_boolean +static bool insert_callee (struct function_info *caller, struct call_info *callee) { struct call_info **pp, *p; @@ -2643,39 +2643,39 @@ insert_callee (struct function_info *caller, struct call_info *callee) if (!p->is_tail) { p->fun->start = NULL; - p->fun->is_func = TRUE; + p->fun->is_func = true; } p->count += callee->count; /* Reorder list so most recent call is first. */ *pp = p->next; p->next = caller->call_list; caller->call_list = p; - return FALSE; + return false; } callee->next = caller->call_list; caller->call_list = callee; - return TRUE; + return true; } /* Copy CALL and insert the copy into CALLER. */ -static bfd_boolean +static bool copy_callee (struct function_info *caller, const struct call_info *call) { struct call_info *callee; callee = bfd_malloc (sizeof (*callee)); if (callee == NULL) - return FALSE; + return false; *callee = *call; if (!insert_callee (caller, callee)) free (callee); - return TRUE; + return true; } /* We're only interested in code sections. Testing SEC_IN_MEMORY excludes overlay stub sections. */ -static bfd_boolean +static bool interesting_section (asection *s) { return (s->output_section != bfd_abs_section_ptr @@ -2690,7 +2690,7 @@ interesting_section (asection *s) look at branches, which may be tail calls or go to hot/cold section part of same function. */ -static bfd_boolean +static bool mark_functions_via_relocs (asection *sec, struct bfd_link_info *info, int call_tree) @@ -2699,16 +2699,16 @@ mark_functions_via_relocs (asection *sec, Elf_Internal_Shdr *symtab_hdr; void *psyms; unsigned int priority = 0; - static bfd_boolean warned; + static bool warned; if (!interesting_section (sec) || sec->reloc_count == 0) - return TRUE; + return true; internal_relocs = _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, info->keep_memory); if (internal_relocs == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (sec->owner)->symtab_hdr; psyms = &symtab_hdr->contents; @@ -2722,7 +2722,7 @@ mark_functions_via_relocs (asection *sec, Elf_Internal_Sym *sym; struct elf_link_hash_entry *h; bfd_vma val; - bfd_boolean nonbranch, is_call; + bool nonbranch, is_call; struct function_info *caller; struct call_info *callee; @@ -2731,20 +2731,20 @@ mark_functions_via_relocs (asection *sec, r_indx = ELF32_R_SYM (irela->r_info); if (!get_sym_h (&h, &sym, &sym_sec, psyms, r_indx, sec->owner)) - return FALSE; + return false; if (sym_sec == NULL || sym_sec->output_section == bfd_abs_section_ptr) continue; - is_call = FALSE; + is_call = false; if (!nonbranch) { unsigned char insn[4]; if (!bfd_get_section_contents (sec->owner, sec, insn, irela->r_offset, 4)) - return FALSE; + return false; if (is_branch (insn)) { is_call = (insn[0] & 0xfd) == 0x31; @@ -2764,13 +2764,13 @@ mark_functions_via_relocs (asection *sec, " %pB(%pA), analysis incomplete\n"), sec->owner, sec, irela->r_offset, sym_sec->owner, sym_sec); - warned = TRUE; + warned = true; continue; } } else { - nonbranch = TRUE; + nonbranch = true; if (is_hint (insn)) continue; } @@ -2816,18 +2816,18 @@ mark_functions_via_relocs (asection *sec, { Elf_Internal_Sym *fake = bfd_zmalloc (sizeof (*fake)); if (fake == NULL) - return FALSE; + return false; fake->st_value = val; fake->st_shndx = _bfd_elf_section_from_bfd_section (sym_sec->owner, sym_sec); sym = fake; } if (sym) - fun = maybe_insert_function (sym_sec, sym, FALSE, is_call); + fun = maybe_insert_function (sym_sec, sym, false, is_call); else - fun = maybe_insert_function (sym_sec, h, TRUE, is_call); + fun = maybe_insert_function (sym_sec, h, true, is_call); if (fun == NULL) - return FALSE; + return false; if (irela->r_addend != 0 && fun->u.sym != sym) free (sym); @@ -2836,17 +2836,17 @@ mark_functions_via_relocs (asection *sec, caller = find_function (sec, irela->r_offset, info); if (caller == NULL) - return FALSE; + return false; callee = bfd_malloc (sizeof *callee); if (callee == NULL) - return FALSE; + return false; callee->fun = find_function (sym_sec, val, info); if (callee->fun == NULL) - return FALSE; + return false; callee->is_tail = !is_call; - callee->is_pasted = FALSE; - callee->broken_cycle = FALSE; + callee->is_pasted = false; + callee->broken_cycle = false; callee->priority = priority; callee->count = nonbranch? 0 : 1; if (callee->fun->last_caller != sec) @@ -2868,7 +2868,7 @@ mark_functions_via_relocs (asection *sec, if (sec->owner != sym_sec->owner) { callee->fun->start = NULL; - callee->fun->is_func = TRUE; + callee->fun->is_func = true; } else if (callee->fun->start == NULL) { @@ -2892,19 +2892,19 @@ mark_functions_via_relocs (asection *sec, if (caller_start != callee_start) { callee->fun->start = NULL; - callee->fun->is_func = TRUE; + callee->fun->is_func = true; } } } } - return TRUE; + return true; } /* Handle something like .init or .fini, which has a piece of a function. These sections are pasted together to form a single function. */ -static bfd_boolean +static bool pasted_function (asection *sec) { struct bfd_link_order *l; @@ -2915,14 +2915,14 @@ pasted_function (asection *sec) fake = bfd_zmalloc (sizeof (*fake)); if (fake == NULL) - return FALSE; + return false; fake->st_value = 0; fake->st_size = sec->size; fake->st_shndx = _bfd_elf_section_from_bfd_section (sec->owner, sec); - fun = maybe_insert_function (sec, fake, FALSE, FALSE); + fun = maybe_insert_function (sec, fake, false, false); if (!fun) - return FALSE; + return false; /* Find a function immediately preceding this section. */ fun_start = NULL; @@ -2934,18 +2934,18 @@ pasted_function (asection *sec) { struct call_info *callee = bfd_malloc (sizeof *callee); if (callee == NULL) - return FALSE; + return false; fun->start = fun_start; callee->fun = fun; - callee->is_tail = TRUE; - callee->is_pasted = TRUE; - callee->broken_cycle = FALSE; + callee->is_tail = true; + callee->is_pasted = true; + callee->broken_cycle = false; callee->priority = 0; callee->count = 1; if (!insert_callee (fun_start, callee)) free (callee); - return TRUE; + return true; } break; } @@ -2958,19 +2958,19 @@ pasted_function (asection *sec) /* Don't return an error if we did not find a function preceding this section. The section may have incorrect flags. */ - return TRUE; + return true; } /* Map address ranges in code sections to functions. */ -static bfd_boolean +static bool discover_functions (struct bfd_link_info *info) { bfd *ibfd; int bfd_idx; Elf_Internal_Sym ***psym_arr; asection ***sec_arr; - bfd_boolean gaps = FALSE; + bool gaps = false; bfd_idx = 0; for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) @@ -2978,10 +2978,10 @@ discover_functions (struct bfd_link_info *info) psym_arr = bfd_zmalloc (bfd_idx * sizeof (*psym_arr)); if (psym_arr == NULL) - return FALSE; + return false; sec_arr = bfd_zmalloc (bfd_idx * sizeof (*sec_arr)); if (sec_arr == NULL) - return FALSE; + return false; for (ibfd = info->input_bfds, bfd_idx = 0; ibfd != NULL; @@ -3006,7 +3006,7 @@ discover_functions (struct bfd_link_info *info) for (sec = ibfd->sections; sec != NULL && !gaps; sec = sec->next) if (interesting_section (sec)) { - gaps = TRUE; + gaps = true; break; } continue; @@ -3020,16 +3020,16 @@ discover_functions (struct bfd_link_info *info) NULL, NULL, NULL); symtab_hdr->contents = (void *) syms; if (syms == NULL) - return FALSE; + return false; /* Select defined function symbols that are going to be output. */ psyms = bfd_malloc ((symcount + 1) * sizeof (*psyms)); if (psyms == NULL) - return FALSE; + return false; psym_arr[bfd_idx] = psyms; psecs = bfd_malloc (symcount * sizeof (*psecs)); if (psecs == NULL) - return FALSE; + return false; sec_arr[bfd_idx] = psecs; for (psy = psyms, p = psecs, sy = syms; sy < syms + symcount; ++p, ++sy) if (ELF_ST_TYPE (sy->st_info) == STT_NOTYPE @@ -3060,7 +3060,7 @@ discover_functions (struct bfd_link_info *info) break; if (!alloc_stack_info (s, psy2 - psy)) - return FALSE; + return false; psy = psy2; } @@ -3074,8 +3074,8 @@ discover_functions (struct bfd_link_info *info) if (ELF_ST_TYPE (sy->st_info) == STT_FUNC) { asection *s = psecs[sy - syms]; - if (!maybe_insert_function (s, sy, FALSE, TRUE)) - return FALSE; + if (!maybe_insert_function (s, sy, false, true)) + return false; } } @@ -3098,8 +3098,8 @@ discover_functions (struct bfd_link_info *info) continue; for (sec = ibfd->sections; sec != NULL; sec = sec->next) - if (!mark_functions_via_relocs (sec, info, FALSE)) - return FALSE; + if (!mark_functions_via_relocs (sec, info, false)) + return false; } for (ibfd = info->input_bfds, bfd_idx = 0; @@ -3119,7 +3119,7 @@ discover_functions (struct bfd_link_info *info) symtab_hdr = &elf_tdata (ibfd)->symtab_hdr; syms = (Elf_Internal_Sym *) symtab_hdr->contents; - gaps = FALSE; + gaps = false; for (sec = ibfd->sections; sec != NULL && !gaps; sec = sec->next) if (interesting_section (sec)) gaps |= check_function_ranges (sec, info); @@ -3137,8 +3137,8 @@ discover_functions (struct bfd_link_info *info) if (ELF_ST_TYPE (sy->st_info) != STT_FUNC && ELF_ST_BIND (sy->st_info) == STB_GLOBAL) { - if (!maybe_insert_function (s, sy, FALSE, FALSE)) - return FALSE; + if (!maybe_insert_function (s, sy, false, false)) + return false; } } } @@ -3179,7 +3179,7 @@ discover_functions (struct bfd_link_info *info) /* No symbols in this section. Must be .init or .fini or something similar. */ else if (!pasted_function (sec)) - return FALSE; + return false; } } } @@ -3198,17 +3198,17 @@ discover_functions (struct bfd_link_info *info) free (psym_arr); free (sec_arr); - return TRUE; + return true; } /* Iterate over all function_info we have collected, calling DOIT on each node if ROOT_ONLY is false. Only call DOIT on root nodes if ROOT_ONLY. */ -static bfd_boolean -for_each_node (bfd_boolean (*doit) (struct function_info *, - struct bfd_link_info *, - void *), +static bool +for_each_node (bool (*doit) (struct function_info *, + struct bfd_link_info *, + void *), struct bfd_link_info *info, void *param, int root_only) @@ -3235,17 +3235,17 @@ for_each_node (bfd_boolean (*doit) (struct function_info *, for (i = 0; i < sinfo->num_fun; ++i) if (!root_only || !sinfo->fun[i].non_root) if (!doit (&sinfo->fun[i], info, param)) - return FALSE; + return false; } } } - return TRUE; + return true; } /* Transfer call info attached to struct function_info entries for all of a given function's sections to the first entry. */ -static bfd_boolean +static bool transfer_calls (struct function_info *fun, struct bfd_link_info *info ATTRIBUTE_UNUSED, void *param ATTRIBUTE_UNUSED) @@ -3266,12 +3266,12 @@ transfer_calls (struct function_info *fun, } fun->call_list = NULL; } - return TRUE; + return true; } /* Mark nodes in the call graph that are called by some other node. */ -static bfd_boolean +static bool mark_non_root (struct function_info *fun, struct bfd_link_info *info ATTRIBUTE_UNUSED, void *param ATTRIBUTE_UNUSED) @@ -3279,19 +3279,19 @@ mark_non_root (struct function_info *fun, struct call_info *call; if (fun->visit1) - return TRUE; - fun->visit1 = TRUE; + return true; + fun->visit1 = true; for (call = fun->call_list; call; call = call->next) { - call->fun->non_root = TRUE; + call->fun->non_root = true; mark_non_root (call->fun, 0, 0); } - return TRUE; + return true; } /* Remove cycles from the call graph. Set depth of nodes. */ -static bfd_boolean +static bool remove_cycles (struct function_info *fun, struct bfd_link_info *info, void *param) @@ -3301,8 +3301,8 @@ remove_cycles (struct function_info *fun, unsigned int max_depth = depth; fun->depth = depth; - fun->visit2 = TRUE; - fun->marking = TRUE; + fun->visit2 = true; + fun->marking = true; callp = &fun->call_list; while ((call = *callp) != NULL) @@ -3311,7 +3311,7 @@ remove_cycles (struct function_info *fun, if (!call->fun->visit2) { if (!remove_cycles (call->fun, info, &call->max_depth)) - return FALSE; + return false; if (max_depth < call->max_depth) max_depth = call->max_depth; } @@ -3331,13 +3331,13 @@ remove_cycles (struct function_info *fun, f1, f2); } - call->broken_cycle = TRUE; + call->broken_cycle = true; } callp = &call->next; } - fun->marking = FALSE; + fun->marking = false; *(unsigned int *) param = max_depth; - return TRUE; + return true; } /* Check that we actually visited all nodes in remove_cycles. If we @@ -3345,21 +3345,21 @@ remove_cycles (struct function_info *fun, any root node. Arbitrarily choose a node in the cycle as a new root and break the cycle. */ -static bfd_boolean +static bool mark_detached_root (struct function_info *fun, struct bfd_link_info *info, void *param) { if (fun->visit2) - return TRUE; - fun->non_root = FALSE; + return true; + fun->non_root = false; *(unsigned int *) param = 0; return remove_cycles (fun, info, param); } /* Populate call_list for each function. */ -static bfd_boolean +static bool build_call_tree (struct bfd_link_info *info) { bfd *ibfd; @@ -3374,27 +3374,27 @@ build_call_tree (struct bfd_link_info *info) continue; for (sec = ibfd->sections; sec != NULL; sec = sec->next) - if (!mark_functions_via_relocs (sec, info, TRUE)) - return FALSE; + if (!mark_functions_via_relocs (sec, info, true)) + return false; } /* Transfer call info from hot/cold section part of function to main entry. */ if (!spu_hash_table (info)->params->auto_overlay - && !for_each_node (transfer_calls, info, 0, FALSE)) - return FALSE; + && !for_each_node (transfer_calls, info, 0, false)) + return false; /* Find the call graph root(s). */ - if (!for_each_node (mark_non_root, info, 0, FALSE)) - return FALSE; + if (!for_each_node (mark_non_root, info, 0, false)) + return false; /* Remove cycles from the call graph. We start from the root node(s) so that we break cycles in a reasonable place. */ depth = 0; - if (!for_each_node (remove_cycles, info, &depth, TRUE)) - return FALSE; + if (!for_each_node (remove_cycles, info, &depth, true)) + return false; - return for_each_node (mark_detached_root, info, &depth, FALSE); + return for_each_node (mark_detached_root, info, &depth, false); } /* qsort predicate to sort calls by priority, max_depth then count. */ @@ -3438,7 +3438,7 @@ struct _mos_param { Sort the call graph so that the deepest nodes will be visited first. */ -static bfd_boolean +static bool mark_overlay_section (struct function_info *fun, struct bfd_link_info *info, void *param) @@ -3449,9 +3449,9 @@ mark_overlay_section (struct function_info *fun, struct spu_link_hash_table *htab = spu_hash_table (info); if (fun->visit4) - return TRUE; + return true; - fun->visit4 = TRUE; + fun->visit4 = true; if (!fun->sec->linker_mark && (htab->params->ovly_flavour != ovly_soft_icache || htab->params->non_ia_text @@ -3480,7 +3480,7 @@ mark_overlay_section (struct function_info *fun, { name = bfd_malloc (sizeof (".rodata")); if (name == NULL) - return FALSE; + return false; memcpy (name, ".rodata", sizeof (".rodata")); } else if (strncmp (fun->sec->name, ".text.", 6) == 0) @@ -3488,7 +3488,7 @@ mark_overlay_section (struct function_info *fun, size_t len = strlen (fun->sec->name); name = bfd_malloc (len + 3); if (name == NULL) - return FALSE; + return false; memcpy (name, ".rodata", sizeof (".rodata")); memcpy (name + 7, fun->sec->name + 5, len - 4); } @@ -3497,7 +3497,7 @@ mark_overlay_section (struct function_info *fun, size_t len = strlen (fun->sec->name) + 1; name = bfd_malloc (len); if (name == NULL) - return FALSE; + return false; memcpy (name, fun->sec->name, len); name[14] = 'r'; } @@ -3549,7 +3549,7 @@ mark_overlay_section (struct function_info *fun, { struct call_info **calls = bfd_malloc (count * sizeof (*calls)); if (calls == NULL) - return FALSE; + return false; for (count = 0, call = fun->call_list; call != NULL; call = call->next) calls[count++] = call; @@ -3576,7 +3576,7 @@ mark_overlay_section (struct function_info *fun, } if (!call->broken_cycle && !mark_overlay_section (call->fun, info, param)) - return FALSE; + return false; } /* Don't put entry code into an overlay. The overlay manager needs @@ -3589,7 +3589,7 @@ mark_overlay_section (struct function_info *fun, if (fun->rodata != NULL) fun->rodata->linker_mark = 0; } - return TRUE; + return true; } /* If non-zero then unmark functions called from those within sections @@ -3605,7 +3605,7 @@ struct _uos_param { /* Undo some of mark_overlay_section's work. */ -static bfd_boolean +static bool unmark_overlay_section (struct function_info *fun, struct bfd_link_info *info, void *param) @@ -3615,9 +3615,9 @@ unmark_overlay_section (struct function_info *fun, unsigned int excluded = 0; if (fun->visit5) - return TRUE; + return true; - fun->visit5 = TRUE; + fun->visit5 = true; excluded = 0; if (fun->sec == uos_param->exclude_input_section @@ -3637,11 +3637,11 @@ unmark_overlay_section (struct function_info *fun, for (call = fun->call_list; call != NULL; call = call->next) if (!call->broken_cycle && !unmark_overlay_section (call->fun, info, param)) - return FALSE; + return false; if (RECURSE_UNMARK) uos_param->clearing -= excluded; - return TRUE; + return true; } struct _cl_param { @@ -3653,7 +3653,7 @@ struct _cl_param { for consideration as non-overlay sections. The array consist of pairs of sections, (text,rodata), for functions in the call graph. */ -static bfd_boolean +static bool collect_lib_sections (struct function_info *fun, struct bfd_link_info *info, void *param) @@ -3663,11 +3663,11 @@ collect_lib_sections (struct function_info *fun, unsigned int size; if (fun->visit6) - return TRUE; + return true; - fun->visit6 = TRUE; + fun->visit6 = true; if (!fun->sec->linker_mark || !fun->sec->gc_mark || fun->sec->segment_mark) - return TRUE; + return true; size = fun->sec->size; if (fun->rodata) @@ -3690,7 +3690,7 @@ collect_lib_sections (struct function_info *fun, if (!call->broken_cycle) collect_lib_sections (call->fun, info, param); - return TRUE; + return true; } /* qsort predicate to sort sections by call count. */ @@ -3762,7 +3762,7 @@ auto_ovl_lib_functions (struct bfd_link_info *info, unsigned int lib_size) collect_lib_param.lib_size = lib_size; collect_lib_param.lib_sections = lib_sections; if (!for_each_node (collect_lib_sections, info, &collect_lib_param, - TRUE)) + true)) return (unsigned int) -1; lib_count = (collect_lib_param.lib_sections - lib_sections) / 2; @@ -3868,28 +3868,28 @@ auto_ovl_lib_functions (struct bfd_link_info *info, unsigned int lib_size) from the parent section. The idea being to group sections to minimise calls between different overlays. */ -static bfd_boolean +static bool collect_overlays (struct function_info *fun, struct bfd_link_info *info, void *param) { struct call_info *call; - bfd_boolean added_fun; + bool added_fun; asection ***ovly_sections = param; if (fun->visit7) - return TRUE; + return true; - fun->visit7 = TRUE; + fun->visit7 = true; for (call = fun->call_list; call != NULL; call = call->next) if (!call->is_pasted && !call->broken_cycle) { if (!collect_overlays (call->fun, info, ovly_sections)) - return FALSE; + return false; break; } - added_fun = FALSE; + added_fun = false; if (fun->sec->linker_mark && fun->sec->gc_mark) { fun->sec->gc_mark = 0; @@ -3901,7 +3901,7 @@ collect_overlays (struct function_info *fun, } else *(*ovly_sections)++ = NULL; - added_fun = TRUE; + added_fun = true; /* Pasted sections must stay with the first section. We don't put pasted sections in the array, just the first section. @@ -3930,7 +3930,7 @@ collect_overlays (struct function_info *fun, for (call = fun->call_list; call != NULL; call = call->next) if (!call->broken_cycle && !collect_overlays (call->fun, info, ovly_sections)) - return FALSE; + return false; if (added_fun) { @@ -3943,22 +3943,22 @@ collect_overlays (struct function_info *fun, int i; for (i = 0; i < sinfo->num_fun; ++i) if (!collect_overlays (&sinfo->fun[i], info, ovly_sections)) - return FALSE; + return false; } } - return TRUE; + return true; } struct _sum_stack_param { size_t cum_stack; size_t overall_stack; - bfd_boolean emit_stack_syms; + bool emit_stack_syms; }; /* Descend the call graph for FUN, accumulating total stack required. */ -static bfd_boolean +static bool sum_stack (struct function_info *fun, struct bfd_link_info *info, void *param) @@ -3967,25 +3967,25 @@ sum_stack (struct function_info *fun, struct function_info *max; size_t stack, cum_stack; const char *f1; - bfd_boolean has_call; + bool has_call; struct _sum_stack_param *sum_stack_param = param; struct spu_link_hash_table *htab; cum_stack = fun->stack; sum_stack_param->cum_stack = cum_stack; if (fun->visit3) - return TRUE; + return true; - has_call = FALSE; + has_call = false; max = NULL; for (call = fun->call_list; call; call = call->next) { if (call->broken_cycle) continue; if (!call->is_pasted) - has_call = TRUE; + has_call = true; if (!sum_stack (call->fun, info, sum_stack_param)) - return FALSE; + return false; stack = sum_stack_param->cum_stack; /* Include caller stack for normal calls, don't do so for tail calls. fun->stack here is local stack usage for @@ -4003,7 +4003,7 @@ sum_stack (struct function_info *fun, stack = fun->stack; /* Now fun->stack holds cumulative stack. */ fun->stack = cum_stack; - fun->visit3 = TRUE; + fun->visit3 = true; if (!fun->non_root && sum_stack_param->overall_stack < cum_stack) @@ -4011,7 +4011,7 @@ sum_stack (struct function_info *fun, htab = spu_hash_table (info); if (htab->params->auto_overlay) - return TRUE; + return true; f1 = func_name (fun); if (htab->params->stack_analysis) @@ -4042,14 +4042,14 @@ sum_stack (struct function_info *fun, struct elf_link_hash_entry *h; if (name == NULL) - return FALSE; + return false; if (fun->global || ELF_ST_BIND (fun->u.sym->st_info) == STB_GLOBAL) sprintf (name, "__stack_%s", f1); else sprintf (name, "__stack_%x_%s", fun->sec->id & 0xffffffff, f1); - h = elf_link_hash_lookup (&htab->elf, name, TRUE, TRUE, FALSE); + h = elf_link_hash_lookup (&htab->elf, name, true, true, false); free (name); if (h != NULL && (h->root.type == bfd_link_hash_new @@ -4069,7 +4069,7 @@ sum_stack (struct function_info *fun, } } - return TRUE; + return true; } /* SEC is part of a pasted function. Return the call_info for the @@ -4235,7 +4235,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info) sum_stack_param.emit_stack_syms = 0; sum_stack_param.overall_stack = 0; - if (!for_each_node (sum_stack, info, &sum_stack_param, TRUE)) + if (!for_each_node (sum_stack, info, &sum_stack_param, true)) goto err_exit; reserved = (sum_stack_param.overall_stack + htab->params->extra_stack_space); @@ -4257,7 +4257,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info) if (htab->params->ovly_flavour == ovly_soft_icache) ovly_mgr_entry = "__icache_br_handler"; h = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry, - FALSE, FALSE, FALSE); + false, false, false); if (h != NULL && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) @@ -4275,7 +4275,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info) /* Mark overlay sections, and find max overlay section size. */ mos_param.max_overlay_size = 0; - if (!for_each_node (mark_overlay_section, info, &mos_param, TRUE)) + if (!for_each_node (mark_overlay_section, info, &mos_param, true)) goto err_exit; /* We can't put the overlay manager or interrupt routines in @@ -4283,7 +4283,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info) uos_param.clearing = 0; if ((uos_param.exclude_input_section || uos_param.exclude_output_section) - && !for_each_node (unmark_overlay_section, info, &uos_param, TRUE)) + && !for_each_node (unmark_overlay_section, info, &uos_param, true)) goto err_exit; bfd_count = 0; @@ -4327,7 +4327,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info) section name, ensure that file names are unique. */ if (bfd_count > 1) { - bfd_boolean ok = TRUE; + bool ok = true; qsort (bfd_arr, bfd_count, sizeof (*bfd_arr), sort_bfds); for (i = 1; i < bfd_count; ++i) @@ -4344,7 +4344,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info) else info->callbacks->einfo (_("%s duplicated\n"), bfd_get_filename (bfd_arr[i])); - ok = FALSE; + ok = false; } } if (!ok) @@ -4417,7 +4417,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info) if (ovly_sections == NULL) goto err_exit; ovly_p = ovly_sections; - if (!for_each_node (collect_overlays, info, &ovly_p, TRUE)) + if (!for_each_node (collect_overlays, info, &ovly_p, true)) goto err_exit; count = (size_t) (ovly_p - ovly_sections) / 2; ovly_map = bfd_malloc (count * sizeof (*ovly_map)); @@ -4694,17 +4694,17 @@ spu_elf_auto_overlay (struct bfd_link_info *info) /* Provide an estimate of total stack required. */ -static bfd_boolean +static bool spu_elf_stack_analysis (struct bfd_link_info *info) { struct spu_link_hash_table *htab; struct _sum_stack_param sum_stack_param; if (!discover_functions (info)) - return FALSE; + return false; if (!build_call_tree (info)) - return FALSE; + return false; htab = spu_hash_table (info); if (htab->params->stack_analysis) @@ -4716,18 +4716,18 @@ spu_elf_stack_analysis (struct bfd_link_info *info) sum_stack_param.emit_stack_syms = htab->params->emit_stack_syms; sum_stack_param.overall_stack = 0; - if (!for_each_node (sum_stack, info, &sum_stack_param, TRUE)) - return FALSE; + if (!for_each_node (sum_stack, info, &sum_stack_param, true)) + return false; if (htab->params->stack_analysis) info->callbacks->info (_("Maximum stack required is 0x%v\n"), (bfd_vma) sum_stack_param.overall_stack); - return TRUE; + return true; } /* Perform a final link. */ -static bfd_boolean +static bool spu_elf_final_link (bfd *output_bfd, struct bfd_link_info *info) { struct spu_link_hash_table *htab = spu_hash_table (info); @@ -4837,10 +4837,10 @@ spu_elf_relocate_section (bfd *output_bfd, Elf_Internal_Rela *rel, *relend; struct spu_link_hash_table *htab; asection *ea; - int ret = TRUE; - bfd_boolean emit_these_relocs = FALSE; - bfd_boolean is_ea_sym; - bfd_boolean stubs; + int ret = true; + bool emit_these_relocs = false; + bool is_ea_sym; + bool stubs; unsigned int iovl = 0; htab = spu_hash_table (info); @@ -4865,13 +4865,13 @@ spu_elf_relocate_section (bfd *output_bfd, bfd_vma relocation; bfd_vma addend; bfd_reloc_status_type r; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; enum _stub_type stub_type; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); howto = elf_howto_table + r_type; - unresolved_reloc = FALSE; + unresolved_reloc = false; h = NULL; sym = NULL; sec = NULL; @@ -4885,7 +4885,7 @@ spu_elf_relocate_section (bfd *output_bfd, else { if (sym_hashes == NULL) - return FALSE; + return false; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; @@ -4909,7 +4909,7 @@ spu_elf_relocate_section (bfd *output_bfd, relocation value for this symbol. output_section is typically NULL for symbols satisfied by a shared library. */ - unresolved_reloc = TRUE; + unresolved_reloc = true; else relocation = (h->root.u.def.value + sec->output_section->vma @@ -4923,7 +4923,7 @@ spu_elf_relocate_section (bfd *output_bfd, else if (!bfd_link_relocatable (info) && !(r_type == R_SPU_PPU32 || r_type == R_SPU_PPU64)) { - bfd_boolean err; + bool err; err = (info->unresolved_syms_in_objects == RM_DIAGNOSE && !info->warn_unresolved_syms) @@ -5035,11 +5035,11 @@ spu_elf_relocate_section (bfd *output_bfd, + elf_section_data (ea)->this_hdr.sh_offset); rel->r_info = ELF32_R_INFO (0, r_type); } - emit_these_relocs = TRUE; + emit_these_relocs = true; continue; } else if (is_ea_sym) - unresolved_reloc = TRUE; + unresolved_reloc = true; if (unresolved_reloc && _bfd_elf_section_offset (output_bfd, info, input_section, @@ -5054,7 +5054,7 @@ spu_elf_relocate_section (bfd *output_bfd, (uint64_t) rel->r_offset, howto->name, sym_name); - ret = FALSE; + ret = false; } r = _bfd_final_link_relocate (howto, @@ -5077,7 +5077,7 @@ spu_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, sym_name, input_bfd, input_section, rel->r_offset, TRUE); + (info, sym_name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -5097,7 +5097,7 @@ spu_elf_relocate_section (bfd *output_bfd, /* fall through */ common_error: - ret = FALSE; + ret = false; (*info->callbacks->warning) (info, msg, sym_name, input_bfd, input_section, rel->r_offset); break; @@ -5132,11 +5132,11 @@ spu_elf_relocate_section (bfd *output_bfd, return ret; } -static bfd_boolean +static bool spu_elf_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Adjust _SPUEAR_ syms to point at their overlay stubs. */ @@ -5186,11 +5186,11 @@ spu_elf_plugin (int val) /* Set ELF header e_type for plugins. */ -static bfd_boolean +static bool spu_elf_init_file_header (bfd *abfd, struct bfd_link_info *info) { if (!_bfd_elf_init_file_header (abfd, info)) - return FALSE; + return false; if (spu_plugin) { @@ -5198,7 +5198,7 @@ spu_elf_init_file_header (bfd *abfd, struct bfd_link_info *info) i_ehdrp->e_type = ET_DYN; } - return TRUE; + return true; } /* We may add an extra PT_LOAD segment for .toe. We also need extra @@ -5229,7 +5229,7 @@ spu_elf_additional_program_headers (bfd *abfd, struct bfd_link_info *info) /* Remove .toe section from other PT_LOAD segments and put it in a segment of its own. Put overlays in separate segments too. */ -static bfd_boolean +static bool spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) { asection *toe, *s; @@ -5238,7 +5238,7 @@ spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) unsigned int i; if (info == NULL) - return TRUE; + return true; toe = bfd_get_section_by_name (abfd, ".toe"); for (m = elf_seg_map (abfd); m != NULL; m = m->next) @@ -5256,7 +5256,7 @@ spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) amt += (m->count - (i + 2)) * sizeof (m->sections[0]); m2 = bfd_zalloc (abfd, amt); if (m2 == NULL) - return FALSE; + return false; m2->count = m->count - (i + 1); memcpy (m2->sections, m->sections + i + 1, m2->count * sizeof (m->sections[0])); @@ -5271,7 +5271,7 @@ spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) amt = sizeof (struct elf_segment_map); m2 = bfd_zalloc (abfd, amt); if (m2 == NULL) - return FALSE; + return false; m2->p_type = PT_LOAD; m2->count = 1; m2->sections[0] = s; @@ -5329,24 +5329,24 @@ spu_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) *p = m_overlay; } - return TRUE; + return true; } /* Tweak the section type of .note.spu_name. */ -static bfd_boolean +static bool spu_elf_fake_sections (bfd *obfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) { if (strcmp (sec->name, SPU_PTNOTE_SPUNAME) == 0) hdr->sh_type = SHT_NOTE; - return TRUE; + return true; } /* Tweak phdrs before writing them out. */ -static bfd_boolean +static bool spu_elf_modify_headers (bfd *abfd, struct bfd_link_info *info) { if (info != NULL) @@ -5442,7 +5442,7 @@ spu_elf_modify_headers (bfd *abfd, struct bfd_link_info *info) return _bfd_elf_modify_headers (abfd, info); } -bfd_boolean +bool spu_elf_size_sections (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct spu_link_hash_table *htab = spu_hash_table (info); @@ -5478,7 +5478,7 @@ spu_elf_size_sections (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) _bfd_elf_link_read_relocs (ibfd, isec, NULL, NULL, info->keep_memory); if (internal_relocs == NULL) - return FALSE; + return false; /* 1 quadword can contain up to 4 R_SPU_ADDR32 relocations. They are stored in a single word by @@ -5501,12 +5501,12 @@ spu_elf_size_sections (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) /* We always have a NULL fixup as a sentinel */ size = (fixup_count + 1) * FIXUP_RECORD_SIZE; if (!bfd_set_section_size (sfixup, size)) - return FALSE; + return false; sfixup->contents = (bfd_byte *) bfd_zalloc (info->input_bfds, size); if (sfixup->contents == NULL) - return FALSE; + return false; } - return TRUE; + return true; } #define TARGET_BIG_SYM spu_elf32_vec diff --git a/bfd/elf32-spu.h b/bfd/elf32-spu.h index 023c5e5f6f..321f46d47c 100644 --- a/bfd/elf32-spu.h +++ b/bfd/elf32-spu.h @@ -115,10 +115,9 @@ struct _ovl_stream extern void spu_elf_setup (struct bfd_link_info *, struct spu_elf_params *); extern void spu_elf_plugin (int); -extern bfd_boolean spu_elf_open_builtin_lib (bfd **, - const struct _ovl_stream *); -extern bfd_boolean spu_elf_create_sections (struct bfd_link_info *); -extern bfd_boolean spu_elf_size_sections (bfd *, struct bfd_link_info *); +extern bool spu_elf_open_builtin_lib (bfd **, const struct _ovl_stream *); +extern bool spu_elf_create_sections (struct bfd_link_info *); +extern bool spu_elf_size_sections (bfd *, struct bfd_link_info *); extern int spu_elf_find_overlays (struct bfd_link_info *); extern int spu_elf_size_stubs (struct bfd_link_info *); extern void spu_elf_place_overlay_data (struct bfd_link_info *); diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index 8d7364dece..5754f3cb86 100644 --- a/bfd/elf32-tic6x.c +++ b/bfd/elf32-tic6x.c @@ -111,7 +111,7 @@ struct elf32_tic6x_obj_tdata /* Whether to use RELA relocations when generating relocations. This is a per-object flag to allow the assembler to generate REL relocations for use in linker testcases. */ - bfd_boolean use_rela_p; + bool use_rela_p; }; #define elf32_tic6x_tdata(abfd) \ @@ -140,405 +140,405 @@ static reloc_howto_type elf32_tic6x_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_PCR_S21, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 7, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S21", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0fffff80, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_PCR_S12, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0fff0000, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_PCR_S10, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 13, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S10", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fe000, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_PCR_S7, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S7", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007f0000, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_ABS_S16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS_S16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS_L16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS_L16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS_H16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS_H16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_U15_B, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_U15_B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_U15_H, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_U15_H", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_U15_W, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_U15_W", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_S16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_S16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_L16_B, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_L16_B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_L16_H, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_L16_H", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_L16_W, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_L16_W", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_H16_B, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_H16_B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_H16_H, /* type */ 17, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_H16_H", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_H16_W, /* type */ 18, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_H16_W", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_GOT_U15_W, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_GOT_U15_W",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_GOT_L16_W, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_GOT_L16_W",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_GOT_H16_W, /* type */ 18, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_GOT_H16_W",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_DSBT_INDEX, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_DSBT_INDEX", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_PREL31, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 31, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PREL31", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x7fffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_COPY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_JUMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_JUMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_EHTYPE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_EHTYPE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_PCR_H16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_H16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_PCR_L16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_L16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fff80, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (31), EMPTY_HOWTO (32), EMPTY_HOWTO (33), @@ -765,41 +765,41 @@ static reloc_howto_type elf32_tic6x_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ALIGN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_FPHEAD, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_FPHEAD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_NOCMP, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_NOCMP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; static reloc_howto_type elf32_tic6x_howto_table_rel[] = @@ -808,224 +808,224 @@ static reloc_howto_type elf32_tic6x_howto_table_rel[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_NONE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000000ff, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_PCR_S21, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 7, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S21", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0fffff80, /* src_mask */ 0x0fffff80, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_PCR_S12, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S12", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0fff0000, /* src_mask */ 0x0fff0000, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_PCR_S10, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 13, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S10", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fe000, /* src_mask */ 0x007fe000, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_PCR_S7, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PCR_S7", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007f0000, /* src_mask */ 0x007f0000, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_ABS_S16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS_S16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff80, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_ABS_L16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ABS_L16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff80, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_C6000_ABS_H16), HOWTO (R_C6000_SBR_U15_B, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_U15_B", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff00, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_U15_H, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_U15_H", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff00, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_U15_W, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_U15_W", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff00, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_S16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_S16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff80, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_L16_B, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_L16_B", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff80, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_L16_H, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_L16_H", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff80, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_L16_W, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_L16_W", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff80, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_C6000_SBR_H16_B), EMPTY_HOWTO (R_C6000_SBR_H16_H), EMPTY_HOWTO (R_C6000_SBR_H16_W), @@ -1033,94 +1033,94 @@ static reloc_howto_type elf32_tic6x_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_GOT_U15_W",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff00, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_SBR_GOT_L16_W, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 7, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_SBR_GOT_L16_W",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fff80, /* src_mask */ 0x007fff80, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_C6000_SBR_GOT_H16_W), HOWTO (R_C6000_DSBT_INDEX, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 15, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_unsigned,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_DSBT_INDEX", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0x007fff00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_PREL31, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 31, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_PREL31", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0x7fffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_C6000_COPY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_COPY", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_JUMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_JUMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_EHTYPE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_EHTYPE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_C6000_PCR_H16), EMPTY_HOWTO (R_C6000_PCR_L16), EMPTY_HOWTO (31), @@ -1349,41 +1349,41 @@ static reloc_howto_type elf32_tic6x_howto_table_rel[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_ALIGN", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_FPHEAD, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_FPHEAD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_C6000_NOCMP, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_C6000_NOCMP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; /* Map BFD relocations to ELF relocations. */ @@ -1485,7 +1485,7 @@ elf32_tic6x_reloc_name_lookup (bfd *abfd, const char *r_name) return NULL; } -static bfd_boolean +static bool elf32_tic6x_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { @@ -1498,7 +1498,7 @@ elf32_tic6x_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_reloc->howto = &elf32_tic6x_howto_table[r_type]; @@ -1508,13 +1508,13 @@ elf32_tic6x_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool elf32_tic6x_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { @@ -1527,7 +1527,7 @@ elf32_tic6x_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_reloc->howto = &elf32_tic6x_howto_table_rel[r_type]; @@ -1537,14 +1537,14 @@ elf32_tic6x_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } void -elf32_tic6x_set_use_rela_p (bfd *abfd, bfd_boolean use_rela_p) +elf32_tic6x_set_use_rela_p (bfd *abfd, bool use_rela_p) { elf32_tic6x_tdata (abfd)->use_rela_p = use_rela_p; } @@ -1576,7 +1576,7 @@ elf32_tic6x_link_hash_table_create (bfd *abfd) return &ret->elf.root; } -static bfd_boolean +static bool elf32_tic6x_final_link (bfd *abfd, struct bfd_link_info *info) { if (bfd_link_pic (info)) @@ -1596,9 +1596,9 @@ elf32_tic6x_final_link (bfd *abfd, struct bfd_link_info *info) } /* Invoke the regular ELF backend linker to do all the work. */ if (!bfd_elf_final_link (abfd, info)) - return FALSE; + return false; - return TRUE; + return true; } /* Called to pass PARAMS to the backend. We store them in the hash table @@ -1614,7 +1614,7 @@ elf32_tic6x_setup (struct bfd_link_info *info, /* Determine if we're dealing with a DSBT object. */ -static bfd_boolean +static bool elf32_tic6x_using_dsbt (bfd *abfd) { return bfd_elf_get_obj_attr_int (abfd, OBJ_ATTR_PROC, @@ -1625,7 +1625,7 @@ elf32_tic6x_using_dsbt (bfd *abfd) sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool elf32_tic6x_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { struct elf32_tic6x_link_hash_table *htab; @@ -1633,10 +1633,10 @@ elf32_tic6x_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) htab = elf32_tic6x_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (!_bfd_elf_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; /* Create .dsbt */ flags = (SEC_ALLOC | SEC_LOAD @@ -1646,20 +1646,20 @@ elf32_tic6x_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) if (htab->dsbt == NULL || !bfd_set_section_alignment (htab->dsbt, 2) || !bfd_set_section_alignment (htab->elf.splt, 5)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool elf32_tic6x_mkobject (bfd *abfd) { - bfd_boolean ret; + bool ret; ret = bfd_elf_allocate_object (abfd, sizeof (struct elf32_tic6x_obj_tdata), TIC6X_ELF_DATA); if (ret) - elf32_tic6x_set_use_rela_p (abfd, TRUE); + elf32_tic6x_set_use_rela_p (abfd, true); return ret; } @@ -1709,7 +1709,7 @@ elf32_tic6x_make_got_dynreloc (bfd *output_bfd, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf32_tic6x_finish_dynamic_symbol (bfd * output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -1881,28 +1881,28 @@ elf32_tic6x_finish_dynamic_symbol (bfd * output_bfd, || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Unwinding tables are not referenced directly. This pass marks them as required if the corresponding code section is marked. */ -static bfd_boolean +static bool elf32_tic6x_gc_mark_extra_sections (struct bfd_link_info *info, elf_gc_mark_hook_fn gc_mark_hook) { bfd *sub; Elf_Internal_Shdr **elf_shdrp; - bfd_boolean again; + bool again; _bfd_elf_gc_mark_extra_sections (info, gc_mark_hook); /* Marking EH data may cause additional code sections to be marked, requiring multiple passes. */ - again = TRUE; + again = true; while (again) { - again = FALSE; + again = false; for (sub = info->input_bfds; sub != NULL; sub = sub->link.next) { asection *o; @@ -1922,20 +1922,20 @@ elf32_tic6x_gc_mark_extra_sections (struct bfd_link_info *info, && !o->gc_mark && elf_shdrp[hdr->sh_link]->bfd_section->gc_mark) { - again = TRUE; + again = true; if (!_bfd_elf_gc_mark (info, o, gc_mark_hook)) - return FALSE; + return false; } } } } - return TRUE; + return true; } /* Return TRUE if this is an unwinding table index. */ -static bfd_boolean +static bool is_tic6x_elf_unwind_section_name (const char *name) { return (startswith (name, ELF_STRING_C6000_unwind) @@ -1946,7 +1946,7 @@ is_tic6x_elf_unwind_section_name (const char *name) /* Set the type and flags for an unwinding index table. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool elf32_tic6x_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) { @@ -1960,7 +1960,7 @@ elf32_tic6x_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, hdr->sh_flags |= SHF_LINK_ORDER; } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -1969,7 +1969,7 @@ elf32_tic6x_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf32_tic6x_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2005,7 +2005,7 @@ elf32_tic6x_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } /* If this is a weak symbol, and there is a real definition, the @@ -2018,7 +2018,7 @@ elf32_tic6x_adjust_dynamic_symbol (struct bfd_link_info *info, h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; h->non_got_ref = def->non_got_ref; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2029,23 +2029,23 @@ elf32_tic6x_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } htab = elf32_tic6x_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -2079,10 +2079,10 @@ elf32_tic6x_adjust_dynamic_symbol (struct bfd_link_info *info, return _bfd_elf_adjust_dynamic_copy (info, h, s); } -static bfd_boolean +static bool elf32_tic6x_new_section_hook (bfd *abfd, asection *sec) { - bfd_boolean ret; + bool ret; /* Allocate target specific section data. */ if (!sec->used_by_bfd) @@ -2092,7 +2092,7 @@ elf32_tic6x_new_section_hook (bfd *abfd, asection *sec) sdata = (_tic6x_elf_section_data *) bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -2106,7 +2106,7 @@ elf32_tic6x_new_section_hook (bfd *abfd, asection *sec) than RELA relocation. RELOCS is the first relocation in the section and ABFD is the bfd that contains SEC. */ -static bfd_boolean +static bool elf32_tic6x_rel_relocation_p (bfd *abfd, asection *sec, const Elf_Internal_Rela *relocs, const Elf_Internal_Rela *rel) @@ -2118,7 +2118,7 @@ elf32_tic6x_rel_relocation_p (bfd *abfd, asection *sec, fact that the INPUT_SECTION's REL_HDR is read before RELA_HDR. */ rel_hdr = elf_section_data (sec)->rel.hdr; if (rel_hdr == NULL) - return FALSE; + return false; bed = get_elf_backend_data (abfd); return ((size_t) (rel - relocs) < NUM_SHDR_ENTRIES (rel_hdr) * bed->s->int_rels_per_ext_rel); @@ -2126,7 +2126,7 @@ elf32_tic6x_rel_relocation_p (bfd *abfd, asection *sec, /* We need dynamic symbols for every section, since segments can relocate independently. */ -static bfd_boolean +static bool elf32_tic6x_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, asection *p) @@ -2138,12 +2138,12 @@ elf32_tic6x_link_omit_section_dynsym (bfd *output_bfd ATTRIBUTE_UNUSED, /* If sh_type is yet undecided, assume it could be SHT_PROGBITS/SHT_NOBITS. */ case SHT_NULL: - return FALSE; + return false; /* There shouldn't be section relative relocations against any other section. */ default: - return TRUE; + return true; } } @@ -2163,7 +2163,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, bfd_vma *local_got_offsets; Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; - bfd_boolean ok = TRUE; + bool ok = true; htab = elf32_tic6x_hash_table (info); symtab_hdr = & elf_symtab_hdr (input_bfd); @@ -2182,11 +2182,11 @@ elf32_tic6x_relocate_section (bfd *output_bfd, asection *sec; struct elf_link_hash_entry *h; bfd_vma off, off2, relocation; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_reloc_status_type r; struct bfd_link_hash_entry *sbh; - bfd_boolean is_rel; - bfd_boolean res; + bool is_rel; + bool res; r_type = ELF32_R_TYPE (rel->r_info); r_symndx = ELF32_R_SYM (rel->r_info); @@ -2202,13 +2202,13 @@ elf32_tic6x_relocate_section (bfd *output_bfd, if (!res || (howto = bfd_reloc.howto) == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { @@ -2218,7 +2218,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2294,7 +2294,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, relocation += (input_section->output_section->vma + input_section->output_offset + rel->r_offset) & 0x1f; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_C6000_PCR_H16: @@ -2333,24 +2333,24 @@ elf32_tic6x_relocate_section (bfd *output_bfd, || h->root.type != bfd_link_hash_undefweak)) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; asection *sreloc; - unresolved_reloc = FALSE; + unresolved_reloc = false; sreloc = elf_section_data (input_section)->sreloc; BFD_ASSERT (sreloc != NULL && sreloc->contents != NULL); - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2376,7 +2376,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -2414,7 +2414,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, case R_C6000_SBR_H16_H: case R_C6000_SBR_H16_W: sbh = bfd_link_hash_lookup (info->hash, "__c6xabi_DSBT_BASE", - FALSE, FALSE, TRUE); + false, false, true); if (sbh != NULL && (sbh->type == bfd_link_hash_defined || sbh->type == bfd_link_hash_defweak)) @@ -2434,7 +2434,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: SB-relative relocation but " "__c6xabi_DSBT_BASE not defined"), input_bfd); - ok = FALSE; + ok = false; continue; } break; @@ -2450,7 +2450,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; dyn = htab->elf.dynamic_sections_created; @@ -2492,7 +2492,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2560,7 +2560,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, : _("[whose name is lost]")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } break; @@ -2583,7 +2583,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, r_type); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; continue; } @@ -2622,7 +2622,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -2642,7 +2642,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) (info, name, input_bfd, input_section, - rel->r_offset, TRUE); + rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -2678,7 +2678,7 @@ elf32_tic6x_relocate_section (bfd *output_bfd, calculate needed space in the global offset table, procedure linkage table, and dynamic reloc sections. */ -static bfd_boolean +static bool elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -2690,7 +2690,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sreloc; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = elf32_tic6x_hash_table (info); symtab_hdr = &elf_symtab_hdr (abfd); @@ -2702,7 +2702,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, && ! htab->elf.dynamic_sections_created) { if (! _bfd_elf_link_create_dynamic_sections (abfd, info)) - return FALSE; + return false; } sreloc = NULL; @@ -2723,7 +2723,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx < symtab_hdr->sh_info) @@ -2732,7 +2732,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; h = NULL; } else @@ -2788,7 +2788,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, + sizeof (bfd_vma) + sizeof(char)); local_got_refcounts = bfd_zalloc (abfd, size); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; } local_got_refcounts[r_symndx] += 1; @@ -2799,7 +2799,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } break; @@ -2855,10 +2855,10 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, htab->elf.dynobj = abfd; sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->elf.dynobj, 2, abfd, /*rela? */ TRUE); + (sec, htab->elf.dynobj, 2, abfd, /*rela? */ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -2889,7 +2889,7 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, size_t amt = sizeof *p; p = bfd_alloc (htab->elf.dynobj, amt); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -2922,8 +2922,8 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, "__c6xabi_DSBT_BASE", BSF_GLOBAL, bfd_und_section_ptr, 0, - NULL, FALSE, FALSE, &bh)) - return FALSE; + NULL, false, false, &bh)) + return false; ((struct elf_link_hash_entry *) bh)->non_elf = 0; } if (h != NULL && bfd_link_executable (info)) @@ -2939,10 +2939,10 @@ elf32_tic6x_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } -static bfd_boolean +static bool elf32_tic6x_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -2961,7 +2961,7 @@ elf32_tic6x_add_symbol_hook (bfd *abfd, break; } - return TRUE; + return true; } static void @@ -2995,7 +2995,7 @@ elf32_tic6x_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED return 1; } -static bfd_boolean +static bool elf32_tic6x_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) @@ -3003,16 +3003,16 @@ elf32_tic6x_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, if (strcmp (bfd_section_name (sec), ".scommon") == 0) { *retval = SHN_TIC6X_SCOMMON; - return TRUE; + return true; } - return FALSE; + return false; } /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -3020,7 +3020,7 @@ elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = elf32_tic6x_hash_table (info); @@ -3032,7 +3032,7 @@ elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->dynindx == -1 && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (bfd_link_pic (info) @@ -3088,7 +3088,7 @@ elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->elf.sgot; @@ -3103,7 +3103,7 @@ elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* Discard relocs on undefined weak syms with non-default visibility. */ @@ -3138,7 +3138,7 @@ elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -3154,18 +3154,18 @@ elf32_tic6x_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) sreloc->size += p->count * sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct elf32_tic6x_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = elf32_tic6x_hash_table (info); @@ -3255,10 +3255,10 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { - bfd_boolean strip_section = TRUE; + bool strip_section = true; if ((s->flags & SEC_LINKER_CREATED) == 0) continue; @@ -3278,7 +3278,7 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) It's too late to tell BFD to get rid of the symbols. */ if (htab->elf.hplt != NULL) - strip_section = FALSE; + strip_section = false; /* Round up the size of the PLT section to a multiple of 32. */ if (s == htab->elf.splt && s->size > 0) @@ -3288,7 +3288,7 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { if (s->size != 0 && s != htab->elf.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -3326,7 +3326,7 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) of garbage. */ s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } if (htab->elf.dynamic_sections_created) @@ -3340,35 +3340,35 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) _bfd_elf_add_dynamic_entry (info, TAG, VAL) if (!_bfd_elf_add_dynamic_tags (output_bfd, info, relocs)) - return FALSE; + return false; if (!add_dynamic_entry (DT_C6000_DSBT_BASE, 0) || !add_dynamic_entry (DT_C6000_DSBT_SIZE, htab->params.dsbt_size) || !add_dynamic_entry (DT_C6000_DSBT_INDEX, htab->params.dsbt_index)) - return FALSE; + return false; } #undef add_dynamic_entry - return TRUE; + return true; } /* This function is called after all the input files have been read, and the input sections have been assigned to output sections. */ -static bfd_boolean +static bool elf32_tic6x_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { if (elf32_tic6x_using_dsbt (output_bfd) && !bfd_link_relocatable (info) && !bfd_elf_stack_segment_size (output_bfd, info, "__stacksize", DEFAULT_STACK_SIZE)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool elf32_tic6x_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -3454,7 +3454,7 @@ elf32_tic6x_finish_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* Return address for Ith PLT stub in section PLT, for relocation REL @@ -3488,7 +3488,7 @@ elf32_tic6x_obj_attrs_order (int num) return num; } -static bfd_boolean +static bool elf32_tic6x_obj_attrs_handle_unknown (bfd *abfd, int tag) { if ((tag & 127) < 64) @@ -3498,7 +3498,7 @@ elf32_tic6x_obj_attrs_handle_unknown (bfd *abfd, int tag) (_("%pB: error: unknown mandatory EABI object attribute %d"), abfd, tag); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -3506,7 +3506,7 @@ elf32_tic6x_obj_attrs_handle_unknown (bfd *abfd, int tag) /* xgettext:c-format */ (_("%pB: warning: unknown EABI object attribute %d"), abfd, tag); - return TRUE; + return true; } } @@ -3583,11 +3583,11 @@ elf32_tic6x_array_alignment_to_tag (int align) /* Merge attributes from IBFD and OBFD, returning TRUE if the merge succeeded, FALSE otherwise. */ -static bfd_boolean +static bool elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; - bfd_boolean result = TRUE; + bool result = true; obj_attribute *in_attr; obj_attribute *out_attr; int i; @@ -3595,7 +3595,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; if (!elf_known_obj_attributes_proc (obfd)[0].i) { @@ -3608,7 +3608,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) initialized. */ out_attr[0].i = 1; - return TRUE; + return true; } in_attr = elf_known_obj_attributes_proc (ibfd); @@ -3624,7 +3624,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("error: %pB requires more stack alignment than %pB preserves"), ibfd, obfd); - result = FALSE; + result = false; } if (in_attr[Tag_ABI_stack_align_preserved].i < out_attr[Tag_ABI_stack_align_needed].i) @@ -3633,7 +3633,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("error: %pB requires more stack alignment than %pB preserves"), obfd, ibfd); - result = FALSE; + result = false; } array_align_in = elf32_tic6x_tag_to_array_alignment @@ -3643,7 +3643,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: unknown Tag_ABI_array_object_alignment value in %pB"), ibfd); - result = FALSE; + result = false; } array_align_out = elf32_tic6x_tag_to_array_alignment (out_attr[Tag_ABI_array_object_alignment].i); @@ -3652,7 +3652,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: unknown Tag_ABI_array_object_alignment value in %pB"), obfd); - result = FALSE; + result = false; } array_expect_in = elf32_tic6x_tag_to_array_alignment (in_attr[Tag_ABI_array_object_align_expected].i); @@ -3661,7 +3661,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: unknown Tag_ABI_array_object_align_expected value in %pB"), ibfd); - result = FALSE; + result = false; } array_expect_out = elf32_tic6x_tag_to_array_alignment (out_attr[Tag_ABI_array_object_align_expected].i); @@ -3670,7 +3670,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("error: unknown Tag_ABI_array_object_align_expected value in %pB"), obfd); - result = FALSE; + result = false; } if (array_align_out < array_expect_in) @@ -3679,7 +3679,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("error: %pB requires more array alignment than %pB preserves"), ibfd, obfd); - result = FALSE; + result = false; } if (array_align_in < array_expect_out) { @@ -3687,7 +3687,7 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("error: %pB requires more array alignment than %pB preserves"), obfd, ibfd); - result = FALSE; + result = false; } for (i = LEAST_KNOWN_OBJ_ATTRIBUTE; i < NUM_KNOWN_OBJ_ATTRIBUTES; i++) @@ -3785,26 +3785,26 @@ elf32_tic6x_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge Tag_ABI_compatibility attributes and any common GNU ones. */ if (!_bfd_elf_merge_object_attributes (ibfd, info)) - return FALSE; + return false; result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd); return result; } -static bfd_boolean +static bool elf32_tic6x_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (! is_tic6x_elf (ibfd) || ! is_tic6x_elf (info->output_bfd)) - return TRUE; + return true; if (!elf32_tic6x_merge_attributes (ibfd, info)) - return FALSE; + return false; - return TRUE; + return true; } /* Add a new unwind edit to the list described by HEAD, TAIL. If TINDEX is zero, @@ -3902,11 +3902,11 @@ elf32_tic6x_insert_cantunwind_after (asection *text_sec, asection *exidx_sec) (in elf32_tic6x_write_section). */ -bfd_boolean +bool elf32_tic6x_fix_exidx_coverage (asection **text_section_order, unsigned int num_text_sections, struct bfd_link_info *info, - bfd_boolean merge_exidx_entries) + bool merge_exidx_entries) { bfd *inp; unsigned int last_second_word = 0, i; @@ -4061,7 +4061,7 @@ elf32_tic6x_fix_exidx_coverage (asection **text_section_order, if (last_exidx_sec && last_unwind_type != 0) elf32_tic6x_insert_cantunwind_after (last_text_sec, last_exidx_sec); - return TRUE; + return true; } /* Add ADDEND to lower 31 bits of VAL, leaving other bits unmodified. */ @@ -4099,7 +4099,7 @@ elf32_tic6x_copy_exidx_entry (bfd *output_bfd, bfd_byte *to, bfd_byte *from, /* Do the actual mangling of exception index tables. */ -static bfd_boolean +static bool elf32_tic6x_write_section (bfd *output_bfd, struct bfd_link_info *link_info, asection *sec, @@ -4111,16 +4111,16 @@ elf32_tic6x_write_section (bfd *output_bfd, bfd_vma offset = sec->output_section->vma + sec->output_offset; if (globals == NULL) - return FALSE; + return false; /* If this section has not been allocated an _tic6x_elf_section_data structure then we cannot record anything. */ tic6x_data = get_tic6x_elf_section_data (sec); if (tic6x_data == NULL) - return FALSE; + return false; if (tic6x_data->elf.this_hdr.sh_type != SHT_C6000_UNWIND) - return FALSE; + return false; tic6x_unwind_table_edit *edit_node = tic6x_data->u.exidx.unwind_edit_list; @@ -4207,7 +4207,7 @@ elf32_tic6x_write_section (bfd *output_bfd, edited_contents, (file_ptr) sec->output_offset, sec->size); - return TRUE; + return true; } #define elf32_bed elf32_tic6x_bed diff --git a/bfd/elf32-tic6x.h b/bfd/elf32-tic6x.h index 4c8e434bec..c28923320a 100644 --- a/bfd/elf32-tic6x.h +++ b/bfd/elf32-tic6x.h @@ -26,7 +26,7 @@ extern int elf32_tic6x_merge_arch_attributes (int, int); /* This function is provided for use from the assembler. */ -extern void elf32_tic6x_set_use_rela_p (bfd *, bfd_boolean); +extern void elf32_tic6x_set_use_rela_p (bfd *, bool); struct elf32_tic6x_params { @@ -38,10 +38,10 @@ extern void elf32_tic6x_setup (struct bfd_link_info *, struct elf32_tic6x_params *); /* C6x unwind section editing support. */ -extern bfd_boolean elf32_tic6x_fix_exidx_coverage (struct bfd_section **, - unsigned int, - struct bfd_link_info *, - bfd_boolean); +extern bool elf32_tic6x_fix_exidx_coverage (struct bfd_section **, + unsigned int, + struct bfd_link_info *, + bool); #ifdef __cplusplus } #endif diff --git a/bfd/elf32-tilegx.c b/bfd/elf32-tilegx.c index f6bd46e717..d6da01a773 100644 --- a/bfd/elf32-tilegx.c +++ b/bfd/elf32-tilegx.c @@ -28,14 +28,14 @@ /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; size_t size; if (note->descsz != TILEGX_PRSTATUS_SIZEOF) - return FALSE; + return false; /* pr_cursig */ elf_tdata (abfd)->core->signal = @@ -54,11 +54,11 @@ tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz != TILEGX_PRPSINFO_SIZEOF) - return FALSE; + return false; elf_tdata (abfd)->core->program = _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_FNAME, 16); @@ -77,7 +77,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } diff --git a/bfd/elf32-tilepro.c b/bfd/elf32-tilepro.c index 10a5532871..cf288b3052 100644 --- a/bfd/elf32-tilepro.c +++ b/bfd/elf32-tilepro.c @@ -36,135 +36,135 @@ static reloc_howto_type tilepro_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_TILEPRO_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_TILEPRO_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_TILEPRO_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit pc-relative relocation. */ HOWTO (R_TILEPRO_32_PCREL,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit pc-relative relocation. */ HOWTO (R_TILEPRO_16_PCREL,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An 8 bit pc-relative relocation. */ HOWTO (R_TILEPRO_8_PCREL, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_8_PCREL",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit relocation without overflow. */ HOWTO (R_TILEPRO_LO16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The high order 16 bits of an address. */ HOWTO (R_TILEPRO_HI16, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The high order 16 bits of an address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ @@ -172,123 +172,123 @@ static reloc_howto_type tilepro_elf_howto_table [] = 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_HA16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_TILEPRO_COPY, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_GLOB_DAT, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_JMP_SLOT, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_RELATIVE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_BROFF_X1, /* type */ TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_BROFF_X1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_JOFFLONG_X1, /* type */ TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 29, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_JOFFLONG_X1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_JOFFLONG_X1_PLT, /* type */ TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 29, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_JOFFLONG_X1_PLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ #define TILEPRO_IMM_HOWTO(name, size, bitsize) \ - HOWTO (name, 0, size, bitsize, FALSE, 0, \ + HOWTO (name, 0, size, bitsize, false, 0, \ complain_overflow_signed, bfd_elf_generic_reloc, \ - #name, FALSE, 0, -1, FALSE) + #name, false, 0, -1, false) #define TILEPRO_UIMM_HOWTO(name, size, bitsize) \ - HOWTO (name, 0, size, bitsize, FALSE, 0, \ + HOWTO (name, 0, size, bitsize, false, 0, \ complain_overflow_unsigned, bfd_elf_generic_reloc, \ - #name, FALSE, 0, -1, FALSE) + #name, false, 0, -1, false) TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_X0, 0, 8), TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_Y0, 0, 8), @@ -300,9 +300,9 @@ static reloc_howto_type tilepro_elf_howto_table [] = TILEPRO_IMM_HOWTO(R_TILEPRO_IMM16_X1, 1, 16), #define TILEPRO_IMM16_HOWTO(name, rshift) \ - HOWTO (name, rshift, 1, 16, FALSE, 0, \ + HOWTO (name, rshift, 1, 16, false, 0, \ complain_overflow_dont, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, FALSE) + #name, false, 0, 0xffff, false) TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_LO, 0), TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_LO, 0), @@ -317,34 +317,34 @@ static reloc_howto_type tilepro_elf_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X0_PCREL",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_IMM16_X1_PCREL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X1_PCREL",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ #define TILEPRO_IMM16_HOWTO_PCREL(name, rshift) \ - HOWTO (name, rshift, 1, 16, TRUE, 0, \ + HOWTO (name, rshift, 1, 16, true, 0, \ complain_overflow_dont, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, TRUE) + #name, false, 0, 0xffff, true) TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X0_LO_PCREL, 0), TILEPRO_IMM16_HOWTO_PCREL (R_TILEPRO_IMM16_X1_LO_PCREL, 0), @@ -385,15 +385,15 @@ static reloc_howto_type tilepro_elf_howto_table [] = TILEPRO_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 29, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_TLS_GD_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_X0_TLS_GD_ADD, 0, 8), TILEPRO_IMM_HOWTO(R_TILEPRO_IMM8_X1_TLS_GD_ADD, 0, 8), @@ -407,29 +407,29 @@ static reloc_howto_type tilepro_elf_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X0_TLS_GD",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_TILEPRO_IMM16_X1_TLS_GD,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X1_TLS_GD",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_GD_LO, 0), TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_GD_LO, 0), @@ -444,29 +444,29 @@ static reloc_howto_type tilepro_elf_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X0_TLS_IE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_IMM16_X1_TLS_IE,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X1_TLS_IE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_IE_LO, 0), TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_IE_LO, 0), @@ -476,43 +476,43 @@ static reloc_howto_type tilepro_elf_howto_table [] = TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_IE_HA, 16), /* These are common with the Solaris TLS implementation. */ - HOWTO(R_TILEPRO_TLS_DTPMOD32, 0, 0, 0, FALSE, 0, complain_overflow_dont, + HOWTO(R_TILEPRO_TLS_DTPMOD32, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPMOD32", - FALSE, 0, 0, TRUE), - HOWTO(R_TILEPRO_TLS_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + false, 0, 0, true), + HOWTO(R_TILEPRO_TLS_DTPOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_TILEPRO_TLS_DTPOFF32", - FALSE, 0, 0xFFFFFFFF, TRUE), - HOWTO(R_TILEPRO_TLS_TPOFF32, 0, 0, 0, FALSE, 0, complain_overflow_dont, + false, 0, 0xFFFFFFFF, true), + HOWTO(R_TILEPRO_TLS_TPOFF32, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_TILEPRO_TLS_TPOFF32", - FALSE, 0, 0, TRUE), + false, 0, 0, true), HOWTO (R_TILEPRO_IMM16_X0_TLS_LE,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X0_TLS_LE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEPRO_IMM16_X1_TLS_LE,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEPRO_IMM16_X1_TLS_LE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X0_TLS_LE_LO, 0), TILEPRO_IMM16_HOWTO (R_TILEPRO_IMM16_X1_TLS_LE_LO, 0), @@ -529,30 +529,30 @@ static reloc_howto_type tilepro_elf_howto_table2 [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_TILEPRO_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_TILEPRO_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_TILEPRO_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -716,7 +716,7 @@ struct _bfd_tilepro_elf_obj_tdata /* Allocate TILEPro ELF private object data. */ -static bfd_boolean +static bool tilepro_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, @@ -772,7 +772,7 @@ tilepro_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an TILEPro ELF reloc. */ -static bfd_boolean +static bool tilepro_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -792,9 +792,9 @@ tilepro_info_to_howto_rela (bfd * abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } typedef tilepro_bundle_bits (*tilepro_create_func)(int); @@ -907,14 +907,14 @@ static const tilepro_create_func reloc_to_create_func[] = /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool tilepro_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; size_t size; if (note->descsz != TILEPRO_PRSTATUS_SIZEOF) - return FALSE; + return false; /* pr_cursig */ elf_tdata (abfd)->core->signal = @@ -933,11 +933,11 @@ tilepro_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool tilepro_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz != TILEPRO_PRPSINFO_SIZEOF) - return FALSE; + return false; elf_tdata (abfd)->core->program = _bfd_elfcore_strndup (abfd, @@ -960,7 +960,7 @@ tilepro_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } @@ -1105,7 +1105,7 @@ tilepro_plt_entry_build (asection *splt, asection *sgotplt, bfd_vma offset, bfd_signed_vma dist_got0 = dist_got_entry - got_offset; /* Check whether we can use the short plt entry with 16-bit offset. */ - bfd_boolean short_plt_entry = + bool short_plt_entry = (dist_got_entry <= 0x7fff && dist_got0 >= -0x8000); /* Copy the plt entry template. */ @@ -1196,7 +1196,7 @@ tilepro_elf_link_hash_table_create (bfd *abfd) /* Create the .got section. */ -static bfd_boolean +static bool tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -1207,7 +1207,7 @@ tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ if (htab->sgot != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; @@ -1218,13 +1218,13 @@ tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->srelgot = s; s = s_got = bfd_make_section_with_flags (abfd, ".got", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgot = s; /* The first bit of the global offset table is the header. */ @@ -1235,7 +1235,7 @@ tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_with_flags (abfd, ".got.plt", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgotplt = s; /* Reserve room for the header. */ @@ -1252,22 +1252,22 @@ tilepro_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; } - return TRUE; + return true; } /* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool tilepro_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { if (!tilepro_elf_create_got_section (dynobj, info)) - return FALSE; + return false; return _bfd_elf_create_dynamic_sections (dynobj, info); } @@ -1390,7 +1390,7 @@ tilepro_elf_tls_transition (struct bfd_link_info *info, int r_type, allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -1403,7 +1403,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, int num_relocs; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = tilepro_elf_hash_table (info); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -1434,7 +1434,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx < symtab_hdr->sh_info) @@ -1523,7 +1523,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; _bfd_tilepro_elf_local_got_tls_type (abfd) = (char *) (local_got_refcounts + symtab_hdr->sh_info); @@ -1547,7 +1547,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h ? h->root.root.string : ""); - return FALSE; + return false; } } @@ -1564,7 +1564,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (htab->sgot == NULL) { if (!tilepro_elf_create_got_section (htab->dynobj, info)) - return FALSE; + return false; } break; @@ -1577,9 +1577,9 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (! _bfd_generic_link_add_one_symbol (info, abfd, "__tls_get_addr", 0, bfd_und_section_ptr, 0, - NULL, FALSE, FALSE, + NULL, false, false, &bh)) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; } else @@ -1708,10 +1708,10 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, htab->dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -1731,7 +1731,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -1748,7 +1748,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -1765,12 +1765,12 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_TILEPRO_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; case R_TILEPRO_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; default: @@ -1778,7 +1778,7 @@ tilepro_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } @@ -1817,8 +1817,8 @@ tilepro_elf_gc_mark_hook (asection *sec, if (! _bfd_generic_link_add_one_symbol (info, sec->owner, "__tls_get_addr", 0, bfd_und_section_ptr, - 0, NULL, FALSE, - FALSE, &bh)) + 0, NULL, false, + false, &bh)) return NULL; h = (struct elf_link_hash_entry *) bh; BFD_ASSERT (h != NULL); @@ -1838,7 +1838,7 @@ tilepro_elf_gc_mark_hook (asection *sec, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1876,7 +1876,7 @@ tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -1890,7 +1890,7 @@ tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1901,18 +1901,18 @@ tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -1920,7 +1920,7 @@ tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -1959,7 +1959,7 @@ tilepro_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -1967,7 +1967,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = tilepro_elf_hash_table (info); @@ -1982,7 +1982,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -2040,7 +2040,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) else if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = tilepro_elf_hash_entry(h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -2049,7 +2049,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->sgot; @@ -2073,7 +2073,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -2113,7 +2113,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -2136,7 +2136,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -2157,13 +2157,13 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) sreloc->size += p->count * TILEPRO_ELF_RELA_BYTES; } - return TRUE; + return true; } /* Return true if the dynamic symbol for a given section should be omitted when creating a shared library. */ -static bfd_boolean +static bool tilepro_elf_omit_section_dynsym (bfd *output_bfd, struct bfd_link_info *info, asection *p) @@ -2172,7 +2172,7 @@ tilepro_elf_omit_section_dynsym (bfd *output_bfd, against the _GLOBAL_OFFSET_TABLE_ symbol emitted in PIC mode can be turned into relocations against the .got symbol. */ if (strcmp (p->name, ".got") == 0) - return FALSE; + return false; return _bfd_elf_omit_section_dynsym_default (output_bfd, info, p); } @@ -2181,7 +2181,7 @@ tilepro_elf_omit_section_dynsym (bfd *output_bfd, #define ELF32_DYNAMIC_INTERPRETER "/lib/ld.so.1" -static bfd_boolean +static bool tilepro_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -2299,7 +2299,7 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd, struct elf_link_hash_entry *got; got = elf_link_hash_lookup (elf_hash_table (info), "_GLOBAL_OFFSET_TABLE_", - FALSE, FALSE, FALSE); + false, false, false); /* Don't allocate .got.plt section if there are no GOT nor PLT entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */ @@ -2370,10 +2370,10 @@ tilepro_elf_size_dynamic_sections (bfd *output_bfd, at the beginning, and we don't want garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } - return _bfd_elf_add_dynamic_tags (output_bfd, info, TRUE); + return _bfd_elf_add_dynamic_tags (output_bfd, info, true); } /* Return the base VMA address which should be subtracted from real addresses @@ -2548,7 +2548,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, for (; rel < relend; rel++) { int r_type, tls_type; - bfd_boolean is_tls_iele, is_tls_le; + bool is_tls_iele, is_tls_le; reloc_howto_type *howto; unsigned long r_symndx; struct elf_link_hash_entry *h; @@ -2559,9 +2559,9 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_reloc_status_type r; const char *name; bfd_vma off; - bfd_boolean is_plt = FALSE; - bfd_boolean resolved_to_zero; - bfd_boolean unresolved_reloc; + bool is_plt = false; + bool resolved_to_zero; + bool unresolved_reloc; r_type = ELF32_R_TYPE (rel->r_info); if (r_type == R_TILEPRO_GNU_VTINHERIT @@ -2578,7 +2578,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -2587,8 +2587,8 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2664,8 +2664,8 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* GD -> GD */ h = (struct elf_link_hash_entry *) - bfd_link_hash_lookup (info->hash, "__tls_get_addr", FALSE, - FALSE, TRUE); + bfd_link_hash_lookup (info->hash, "__tls_get_addr", false, + false, true); BFD_ASSERT (h != NULL); r_type = R_TILEPRO_JOFFLONG_X1_PLT; howto = tilepro_elf_howto_table + r_type; @@ -2755,7 +2755,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -2789,7 +2789,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2848,7 +2848,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, relocation = (htab->splt->output_section->vma + htab->splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_TILEPRO_32_PCREL: @@ -2921,7 +2921,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, || h->root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate = FALSE; + bool skip, relocate = false; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -2929,15 +2929,15 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, BFD_ASSERT (sreloc != NULL); - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2952,7 +2952,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, FIXME: Add code tracking needed dynamic relocs as e.g. i386 has. */ if (h->dynindx == -1) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; break; } @@ -2992,7 +2992,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -3021,7 +3021,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (_("%pB: probably compiled without -fPIC?"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -3049,17 +3049,17 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (!bfd_link_executable (info)) { Elf_Internal_Rela outrel; - bfd_boolean skip; + bool skip; BFD_ASSERT (sreloc != NULL); - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE; + skip = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); if (skip) @@ -3143,14 +3143,14 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { Elf_Internal_Rela outrel; int indx = 0; - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; if (htab->srelgot == NULL) abort (); if (h != NULL) { - bfd_boolean dyn; + bool dyn; dyn = htab->dynamic_sections_created; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, @@ -3169,7 +3169,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) - need_relocs = TRUE; + need_relocs = true; switch (r_type) { @@ -3254,7 +3254,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, abort (); relocation = off - got_base; - unresolved_reloc = FALSE; + unresolved_reloc = false; howto = tilepro_elf_howto_table + r_type; break; @@ -3365,7 +3365,7 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -3391,13 +3391,13 @@ tilepro_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool tilepro_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3532,12 +3532,12 @@ tilepro_elf_finish_dynamic_symbol (bfd *output_bfd, || (h == htab->hgot || h == htab->hplt)) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool tilepro_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bfd *dynobj, asection *sdyn, asection *splt ATTRIBUTE_UNUSED) @@ -3576,10 +3576,10 @@ tilepro_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); } - return TRUE; + return true; } -static bfd_boolean +static bool tilepro_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3596,7 +3596,7 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd, if (elf_hash_table (info)->dynamic_sections_created) { asection *splt; - bfd_boolean ret; + bool ret; splt = htab->splt; BFD_ASSERT (splt != NULL && sdyn != NULL); @@ -3625,7 +3625,7 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd, { _bfd_error_handler (_("discarded output section: `%pA'"), htab->sgotplt); - return FALSE; + return false; } if (htab->sgotplt->size > 0) @@ -3658,7 +3658,7 @@ tilepro_elf_finish_dynamic_sections (bfd *output_bfd, = GOT_ENTRY_SIZE; } - return TRUE; + return true; } diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index dc83bbc903..a74d713c22 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -43,13 +43,13 @@ static reloc_howto_type v850_elf_howto_table[]; allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool v850_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { - bfd_boolean ret = TRUE; + bool ret = true; Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry **sym_hashes; const Elf_Internal_Rela *rel; @@ -59,7 +59,7 @@ v850_elf_check_relocs (bfd *abfd, const char *common = NULL; if (bfd_link_relocatable (info)) - return TRUE; + return true; #ifdef DEBUG _bfd_error_handler ("v850_elf_check_relocs called for section %pA in %pB", @@ -96,14 +96,14 @@ v850_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_V850_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_V850_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_V850_SDA_16_16_SPLIT_OFFSET: @@ -176,7 +176,7 @@ v850_elf_check_relocs (bfd *abfd, bfd_set_error (bfd_error_bad_value); h->other |= V850_OTHER_ERROR; - ret = FALSE; + ret = false; } } @@ -218,11 +218,11 @@ v850_elf_check_relocs (bfd *abfd, typedef struct hi16s_location { - bfd_vma addend; - bfd_byte * address; - unsigned long counter; - bfd_boolean found; - struct hi16s_location * next; + bfd_vma addend; + bfd_byte *address; + unsigned long counter; + bool found; + struct hi16s_location *next; } hi16s_location; @@ -246,7 +246,7 @@ remember_hi16s_reloc (bfd *abfd, bfd_vma addend, bfd_byte *address) entry->addend = addend; entry->address = address; entry->counter = hi16s_counter ++; - entry->found = FALSE; + entry->found = false; entry->next = previous_hi16s; previous_hi16s = entry; @@ -262,7 +262,7 @@ remember_hi16s_reloc (bfd *abfd, bfd_vma addend, bfd_byte *address) } static bfd_byte * -find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) +find_remembered_hi16s_reloc (bfd_vma addend, bool *already_found) { hi16s_location *match = NULL; hi16s_location *entry; @@ -289,7 +289,7 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) * already_found = match->found; /* Note that this entry has now been used. */ - match->found = TRUE; + match->found = true; return addr; } @@ -436,7 +436,7 @@ find_remembered_hi16s_reloc (bfd_vma addend, bfd_boolean *already_found) ------------ 0x00006fff which is wrong (assuming that fred is at 0xffff). */ -static bfd_boolean +static bool v850_elf_perform_lo16_relocation (bfd *abfd, unsigned long *insn, unsigned long addend) { @@ -447,7 +447,7 @@ v850_elf_perform_lo16_relocation (bfd *abfd, unsigned long *insn, || (OVERFLOWS (addend, *insn) && ((! BIT15_SET (*insn)) || (BIT15_SET (addend))))) { - bfd_boolean already_updated; + bool already_updated; bfd_byte *hi16s_address = find_remembered_hi16s_reloc (addend, & already_updated); @@ -464,7 +464,7 @@ v850_elf_perform_lo16_relocation (bfd *abfd, unsigned long *insn, else { _bfd_error_handler (_("failed to find previous HI16 reloc")); - return FALSE; + return false; } } #undef OVERFLOWS @@ -473,7 +473,7 @@ v850_elf_perform_lo16_relocation (bfd *abfd, unsigned long *insn, /* Do not complain if value has top bit set, as this has been anticipated. */ *insn = (*insn + addend) & 0xffff; - return TRUE; + return true; } /* FIXME: The code here probably ought to be removed and the code in reloc.c @@ -897,345 +897,345 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_V850_NONE", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A PC relative 9 bit branch. */ HOWTO (R_V850_9_PCREL, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 9, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_9_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x00ffffff, /* Src_mask. */ 0x00ffffff, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A PC relative 22 bit branch. */ HOWTO (R_V850_22_PCREL, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 22, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_22_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x07ffff80, /* Src_mask. */ 0x07ffff80, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* High 16 bits of symbol value. */ HOWTO (R_V850_HI16_S, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_HI16_S", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* High 16 bits of symbol value. */ HOWTO (R_V850_HI16, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_HI16", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* Low 16 bits of symbol value. */ HOWTO (R_V850_LO16, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_LO16", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* Simple 32bit reloc. */ HOWTO (R_V850_ABS32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_ABS32", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Src_mask. */ 0xffffffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* Simple 16bit reloc. */ HOWTO (R_V850_16, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_V850_16", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* Simple 8bit reloc. */ HOWTO (R_V850_8, /* Type. */ 0, /* Rightshift. */ 0, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ bfd_elf_generic_reloc, /* Special_function. */ "R_V850_8", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xff, /* Src_mask. */ 0xff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 16 bit offset from the short data area pointer. */ HOWTO (R_V850_SDA_16_16_OFFSET, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_SDA_16_16_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 15 bit offset from the short data area pointer. */ HOWTO (R_V850_SDA_15_16_OFFSET, /* Type. */ 1, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 1, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_SDA_15_16_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfffe, /* Src_mask. */ 0xfffe, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 16 bit offset from the zero data area pointer. */ HOWTO (R_V850_ZDA_16_16_OFFSET, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_ZDA_16_16_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 15 bit offset from the zero data area pointer. */ HOWTO (R_V850_ZDA_15_16_OFFSET, /* Type. */ 1, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 1, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_ZDA_15_16_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfffe, /* Src_mask. */ 0xfffe, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 6 bit offset from the tiny data area pointer. */ HOWTO (R_V850_TDA_6_8_OFFSET, /* Type. */ 2, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 1, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_TDA_6_8_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x7e, /* Src_mask. */ 0x7e, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 8 bit offset from the tiny data area pointer. */ HOWTO (R_V850_TDA_7_8_OFFSET, /* Type. */ 1, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_TDA_7_8_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x7f, /* Src_mask. */ 0x7f, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 7 bit offset from the tiny data area pointer. */ HOWTO (R_V850_TDA_7_7_OFFSET, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 7, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_TDA_7_7_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x7f, /* Src_mask. */ 0x7f, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 16 bit offset from the tiny data area pointer! */ HOWTO (R_V850_TDA_16_16_OFFSET, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_TDA_16_16_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xfff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 5 bit offset from the tiny data area pointer. */ HOWTO (R_V850_TDA_4_5_OFFSET, /* Type. */ 1, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 5, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_TDA_4_5_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x0f, /* Src_mask. */ 0x0f, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 4 bit offset from the tiny data area pointer. */ HOWTO (R_V850_TDA_4_4_OFFSET, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 4, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_TDA_4_4_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x0f, /* Src_mask. */ 0x0f, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 16 bit offset from the short data area pointer. */ HOWTO (R_V850_SDA_16_16_SPLIT_OFFSET, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_SDA_16_16_SPLIT_OFFSET",/* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfffe0020, /* Src_mask. */ 0xfffe0020, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 16 bit offset from the zero data area pointer. */ HOWTO (R_V850_ZDA_16_16_SPLIT_OFFSET, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_ZDA_16_16_SPLIT_OFFSET",/* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfffe0020, /* Src_mask. */ 0xfffe0020, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 6 bit offset from the call table base pointer. */ HOWTO (R_V850_CALLT_6_7_OFFSET, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 7, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_CALLT_6_7_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x3f, /* Src_mask. */ 0x3f, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* 16 bit offset from the call table base pointer. */ HOWTO (R_V850_CALLT_16_16_OFFSET, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_CALLT_16_16_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* GNU extension to record C++ vtable hierarchy */ @@ -1243,30 +1243,30 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ NULL, /* Special_function. */ "R_V850_GNU_VTINHERIT", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_V850_GNU_VTENTRY, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ _bfd_elf_rel_vtable_reloc_fn, /* Special_function. */ "R_V850_GNU_VTENTRY", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* Indicates a .longcall pseudo-op. The compiler will generate a .longcall pseudo-op when it finds a function call which can be relaxed. */ @@ -1274,15 +1274,15 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ v850_elf_ignore_reloc, /* Special_function. */ "R_V850_LONGCALL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* Indicates a .longjump pseudo-op. The compiler will generate a .longjump pseudo-op when it finds a branch which can be relaxed. */ @@ -1290,194 +1290,194 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ v850_elf_ignore_reloc, /* Special_function. */ "R_V850_LONGJUMP", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ HOWTO (R_V850_ALIGN, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_unsigned, /* Complain_on_overflow. */ v850_elf_ignore_reloc, /* Special_function. */ "R_V850_ALIGN", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* Simple pc-relative 32bit reloc. */ HOWTO (R_V850_REL32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_REL32", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Src_mask. */ 0xffffffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* An ld.bu version of R_V850_LO16. */ HOWTO (R_V850_LO16_SPLIT_OFFSET, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_LO16_SPLIT_OFFSET", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfffe0020, /* Src_mask. */ 0xfffe0020, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* A unsigned PC relative 16 bit loop. */ HOWTO (R_V850_16_PCREL, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_16_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xfffe, /* Src_mask. */ 0xfffe, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A PC relative 17 bit branch. */ HOWTO (R_V850_17_PCREL, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 17, /* Bitsize. */ - TRUE, /* PC_relative. */ + true, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_17_PCREL", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0x0010fffe, /* Src_mask. */ 0x0010fffe, /* Dst_mask. */ - TRUE), /* PCrel_offset. */ + true), /* PCrel_offset. */ /* A 23bit offset ld/st. */ HOWTO (R_V850_23, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 23, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ v850_elf_reloc, /* special_function. */ "R_V850_23", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffff07f0, /* src_mask. */ 0xffff07f0, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* A PC relative 32 bit branch. */ HOWTO (R_V850_32_PCREL, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 1, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ v850_elf_reloc, /* special_function. */ "R_V850_32_PCREL", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xfffffffe, /* src_mask. */ 0xfffffffe, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ /* A absolute 32 bit branch. */ HOWTO (R_V850_32_ABS, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 1, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ v850_elf_reloc, /* special_function. */ "R_V850_32_ABS", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xfffffffe, /* src_mask. */ 0xfffffffe, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* High 16 bits of symbol value. */ HOWTO (R_V850_HI16, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont, /* Complain_on_overflow. */ v850_elf_reloc, /* Special_function. */ "R_V850_HI16", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffff, /* Src_mask. */ 0xffff, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ + false), /* PCrel_offset. */ /* Low 16 bits of symbol value. */ HOWTO (R_V850_16_S1, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 1, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ v850_elf_reloc, /* special_function. */ "R_V850_16_S1", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xfffe, /* src_mask. */ 0xfffe, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* Low 16 bits of symbol value. */ HOWTO (R_V850_LO16_S1, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 1, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ v850_elf_reloc, /* special_function. */ "R_V850_LO16_S1", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xfffe, /* src_mask. */ 0xfffe, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* 16 bit offset from the call table base pointer. */ HOWTO (R_V850_CALLT_15_16_OFFSET, /* type. */ 1, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 1, /* bitpos. */ complain_overflow_dont, /* complain_on_overflow. */ v850_elf_reloc, /* special_function. */ "R_V850_CALLT_15_16_OFFSET", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xfffe, /* src_mask. */ 0xfffe, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* Like R_V850_32 PCREL, but referring to the GOT table entry for the symbol. */ @@ -1485,15 +1485,15 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ v850_elf_reloc, /* special_function. */ "R_V850_32_GOTPCREL", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ /* Like R_V850_SDA_, but referring to the GOT table entry for the symbol. */ @@ -1501,29 +1501,29 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_16_GOT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffff, /* src_mask. */ 0xffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_V850_32_GOT, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_32_GOT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* Like R_V850_22_PCREL, but referring to the procedure linkage table entry for the symbol. */ @@ -1531,29 +1531,29 @@ static reloc_howto_type v850_elf_howto_table[] = 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 22, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 7, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_22_PLT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0x07ffff80, /* src_mask. */ 0x07ffff80, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_V850_32_PLT, /* type. */ 1, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - TRUE, /* pc_relative. */ + true, /* pc_relative. */ 1, /* bitpos. */ complain_overflow_signed, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_32_PLT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ /* This is used only by the dynamic linker. The symbol should exist both in the object being run and in some shared library. The @@ -1564,15 +1564,15 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long). */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_COPY", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* Like R_M32R_24, but used when setting global offset table entries. */ @@ -1580,30 +1580,30 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_GLOB_DAT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* Marks a procedure linkage table entry for a symbol. */ HOWTO (R_V850_JMP_SLOT, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_JMP_SLOT", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ /* Used only by the dynamic linker. When the object is run, this longword is set to the load address of the object, plus the @@ -1612,71 +1612,71 @@ static reloc_howto_type v850_elf_howto_table[] = 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_RELATIVE", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_V850_16_GOTOFF, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_16_GOTOFF", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffff, /* src_mask. */ 0xffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_V850_32_GOTOFF, /* type. */ 0, /* rightshift. */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_bitfield, /* complain_on_overflow. */ bfd_elf_generic_reloc, /* special_function. */ "R_V850_32_GOTOFF", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0xffffffff, /* src_mask. */ 0xffffffff, /* dst_mask. */ - FALSE), /* pcrel_offset. */ + false), /* pcrel_offset. */ HOWTO (R_V850_CODE, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ v850_elf_ignore_reloc, /* special_function. */ "R_V850_CODE", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ HOWTO (R_V850_DATA, /* type. */ 0, /* rightshift. */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize. */ - FALSE, /* pc_relative. */ + false, /* pc_relative. */ 0, /* bitpos. */ complain_overflow_unsigned, /* complain_on_overflow. */ v850_elf_ignore_reloc, /* special_function. */ "R_V850_DATA", /* name. */ - FALSE, /* partial_inplace. */ + false, /* partial_inplace. */ 0, /* src_mask. */ 0, /* dst_mask. */ - TRUE), /* pcrel_offset. */ + true), /* pcrel_offset. */ }; @@ -1748,7 +1748,7 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] = #define V800_RELOC(name,sz,bit,shift,complain,pcrel,resolver) \ HOWTO (name, shift, sz, bit, pcrel, 0, complain_overflow_ ## complain, \ - bfd_elf_ ## resolver ## _reloc, #name, FALSE, 0, ~0, FALSE) + bfd_elf_ ## resolver ## _reloc, #name, false, 0, ~0, false) #define V800_EMPTY(name) EMPTY_HOWTO (name - R_V810_NONE) @@ -1761,92 +1761,92 @@ static const struct v850_elf_reloc_map v850_elf_reloc_map[] = static reloc_howto_type v800_elf_howto_table[] = { - V800_RELOC (R_V810_NONE, 0, 0, 0, dont, FALSE, generic), /* Type = 0x30 */ - V800_RELOC (R_V810_BYTE, 0, 8, 0, dont, FALSE, generic), - V800_RELOC (R_V810_HWORD, 1, 16, 0, dont, FALSE, generic), - V800_RELOC (R_V810_WORD, 2, 32, 0, dont, FALSE, generic), - V800_RELOC (R_V810_WLO, 1, 16, 0, dont, FALSE, generic), - V800_RELOC (R_V810_WHI, 1, 16, 0, dont, FALSE, generic), - V800_RELOC (R_V810_WHI1, 1, 16, 0, dont, FALSE, generic), - V800_RELOC (R_V810_GPBYTE, 0, 8, 0, dont, FALSE, v850), - V800_RELOC (R_V810_GPHWORD, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_GPWORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V810_GPWLO, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_GPWHI, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_GPWHI1, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V850_HWLO, 1, 16, 0, dont, FALSE, generic), + V800_RELOC (R_V810_NONE, 0, 0, 0, dont, false, generic), /* Type = 0x30 */ + V800_RELOC (R_V810_BYTE, 0, 8, 0, dont, false, generic), + V800_RELOC (R_V810_HWORD, 1, 16, 0, dont, false, generic), + V800_RELOC (R_V810_WORD, 2, 32, 0, dont, false, generic), + V800_RELOC (R_V810_WLO, 1, 16, 0, dont, false, generic), + V800_RELOC (R_V810_WHI, 1, 16, 0, dont, false, generic), + V800_RELOC (R_V810_WHI1, 1, 16, 0, dont, false, generic), + V800_RELOC (R_V810_GPBYTE, 0, 8, 0, dont, false, v850), + V800_RELOC (R_V810_GPHWORD, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_GPWORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V810_GPWLO, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_GPWHI, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_GPWHI1, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V850_HWLO, 1, 16, 0, dont, false, generic), V800_EMPTY (R_V810_reserved1), - V800_RELOC (R_V850_EP7BIT, 0, 7, 0, unsigned, FALSE, v850), - V800_RELOC (R_V850_EPHBYTE, 0, 8, 1, unsigned, FALSE, v850), - V800_RELOC (R_V850_EPWBYTE, 0, 8, 2, unsigned, FALSE, v850), - V800_RELOC (R_V850_REGHWLO, 1, 16, 0, dont, FALSE, v850), + V800_RELOC (R_V850_EP7BIT, 0, 7, 0, unsigned, false, v850), + V800_RELOC (R_V850_EPHBYTE, 0, 8, 1, unsigned, false, v850), + V800_RELOC (R_V850_EPWBYTE, 0, 8, 2, unsigned, false, v850), + V800_RELOC (R_V850_REGHWLO, 1, 16, 0, dont, false, v850), V800_EMPTY (R_V810_reserved2), - V800_RELOC (R_V850_GPHWLO, 1, 16, 0, dont, FALSE, v850), + V800_RELOC (R_V850_GPHWLO, 1, 16, 0, dont, false, v850), V800_EMPTY (R_V810_reserved3), - V800_RELOC (R_V850_PCR22, 2, 22, 0, signed, TRUE, generic), - V800_RELOC (R_V850_BLO, 2, 24, 0, dont, FALSE, v850), - V800_RELOC (R_V850_EP4BIT, 0, 4, 0, unsigned, FALSE, v850), - V800_RELOC (R_V850_EP5BIT, 0, 5, 0, unsigned, FALSE, v850), - V800_RELOC (R_V850_REGBLO, 2, 24, 0, dont, FALSE, v850), - V800_RELOC (R_V850_GPBLO, 2, 24, 0, dont, FALSE, v850), - V800_RELOC (R_V810_WLO_1, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_GPWLO_1, 1, 16, 0, signed, FALSE, v850), - V800_RELOC (R_V850_BLO_1, 2, 16, 0, signed, FALSE, v850), - V800_RELOC (R_V850_HWLO_1, 1, 16, 0, signed, FALSE, v850), + V800_RELOC (R_V850_PCR22, 2, 22, 0, signed, true, generic), + V800_RELOC (R_V850_BLO, 2, 24, 0, dont, false, v850), + V800_RELOC (R_V850_EP4BIT, 0, 4, 0, unsigned, false, v850), + V800_RELOC (R_V850_EP5BIT, 0, 5, 0, unsigned, false, v850), + V800_RELOC (R_V850_REGBLO, 2, 24, 0, dont, false, v850), + V800_RELOC (R_V850_GPBLO, 2, 24, 0, dont, false, v850), + V800_RELOC (R_V810_WLO_1, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_GPWLO_1, 1, 16, 0, signed, false, v850), + V800_RELOC (R_V850_BLO_1, 2, 16, 0, signed, false, v850), + V800_RELOC (R_V850_HWLO_1, 1, 16, 0, signed, false, v850), V800_EMPTY (R_V810_reserved4), - V800_RELOC (R_V850_GPBLO_1, 2, 16, 1, signed, FALSE, v850), - V800_RELOC (R_V850_GPHWLO_1, 1, 16, 1, signed, FALSE, v850), + V800_RELOC (R_V850_GPBLO_1, 2, 16, 1, signed, false, v850), + V800_RELOC (R_V850_GPHWLO_1, 1, 16, 1, signed, false, v850), V800_EMPTY (R_V810_reserved5), - V800_RELOC (R_V850_EPBLO, 2, 16, 1, signed, FALSE, v850), - V800_RELOC (R_V850_EPHWLO, 1, 16, 1, signed, FALSE, v850), + V800_RELOC (R_V850_EPBLO, 2, 16, 1, signed, false, v850), + V800_RELOC (R_V850_EPHWLO, 1, 16, 1, signed, false, v850), V800_EMPTY (R_V810_reserved6), - V800_RELOC (R_V850_EPWLO_N, 1, 16, 1, signed, FALSE, v850), - V800_RELOC (R_V850_PC32, 2, 32, 1, signed, TRUE, v850), - V800_RELOC (R_V850_W23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_GPW23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_EPW23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_B23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_GPB23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_EPB23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_PC16U, 1, 16, 1, unsigned, TRUE, generic), - V800_RELOC (R_V850_PC17, 2, 17, 1, signed, TRUE, generic), - V800_RELOC (R_V850_DW8, 2, 8, 2, signed, FALSE, v850), - V800_RELOC (R_V850_GPDW8, 2, 8, 2, signed, FALSE, v850), - V800_RELOC (R_V850_EPDW8, 2, 8, 2, signed, FALSE, v850), - V800_RELOC (R_V850_PC9, 1, 9, 3, signed, TRUE, v850), - V800_RELOC (R_V810_REGBYTE, 0, 8, 0, dont, FALSE, v850), - V800_RELOC (R_V810_REGHWORD, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_REGWORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V810_REGWLO, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_REGWHI, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_REGWHI1, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V850_REGW23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_REGB23BIT, 2, 23, 1, signed, FALSE, v850), - V800_RELOC (R_V850_REGDW8, 2, 8, 2, signed, FALSE, v850), - V800_RELOC (R_V810_EPBYTE, 0, 8, 0, dont, FALSE, v850), - V800_RELOC (R_V810_EPHWORD, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_EPWORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V850_WLO23, 2, 32, 1, dont, FALSE, v850), - V800_RELOC (R_V850_WORD_E, 2, 32, 1, dont, FALSE, v850), - V800_RELOC (R_V850_REGWORD_E, 2, 32, 1, dont, FALSE, v850), - V800_RELOC (R_V850_WORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V850_GPWORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V850_REGWORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V850_EPWORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V810_TPBYTE, 0, 8, 0, dont, FALSE, v850), - V800_RELOC (R_V810_TPHWORD, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_TPWORD, 2, 32, 0, dont, FALSE, v850), - V800_RELOC (R_V810_TPWLO, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_TPWHI, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V810_TPWHI1, 1, 16, 0, dont, FALSE, v850), - V800_RELOC (R_V850_TPHWLO, 1, 16, 1, dont, FALSE, v850), - V800_RELOC (R_V850_TPBLO, 2, 24, 0, dont, FALSE, v850), - V800_RELOC (R_V810_TPWLO_1, 1, 16, 0, signed, FALSE, v850), - V800_RELOC (R_V850_TPBLO_1, 2, 16, 0, signed, FALSE, v850), - V800_RELOC (R_V850_TPHWLO_1, 1, 16, 0, signed, FALSE, v850), - V800_RELOC (R_V850_TP23BIT, 2, 23, 0, signed, FALSE, v850), - V800_RELOC (R_V850_TPW23BIT, 2, 23, 0, signed, FALSE, v850), - V800_RELOC (R_V850_TPDW8, 2, 8, 0, signed, FALSE, v850) + V800_RELOC (R_V850_EPWLO_N, 1, 16, 1, signed, false, v850), + V800_RELOC (R_V850_PC32, 2, 32, 1, signed, true, v850), + V800_RELOC (R_V850_W23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_GPW23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_EPW23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_B23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_GPB23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_EPB23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_PC16U, 1, 16, 1, unsigned, true, generic), + V800_RELOC (R_V850_PC17, 2, 17, 1, signed, true, generic), + V800_RELOC (R_V850_DW8, 2, 8, 2, signed, false, v850), + V800_RELOC (R_V850_GPDW8, 2, 8, 2, signed, false, v850), + V800_RELOC (R_V850_EPDW8, 2, 8, 2, signed, false, v850), + V800_RELOC (R_V850_PC9, 1, 9, 3, signed, true, v850), + V800_RELOC (R_V810_REGBYTE, 0, 8, 0, dont, false, v850), + V800_RELOC (R_V810_REGHWORD, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_REGWORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V810_REGWLO, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_REGWHI, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_REGWHI1, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V850_REGW23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_REGB23BIT, 2, 23, 1, signed, false, v850), + V800_RELOC (R_V850_REGDW8, 2, 8, 2, signed, false, v850), + V800_RELOC (R_V810_EPBYTE, 0, 8, 0, dont, false, v850), + V800_RELOC (R_V810_EPHWORD, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_EPWORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V850_WLO23, 2, 32, 1, dont, false, v850), + V800_RELOC (R_V850_WORD_E, 2, 32, 1, dont, false, v850), + V800_RELOC (R_V850_REGWORD_E, 2, 32, 1, dont, false, v850), + V800_RELOC (R_V850_WORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V850_GPWORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V850_REGWORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V850_EPWORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V810_TPBYTE, 0, 8, 0, dont, false, v850), + V800_RELOC (R_V810_TPHWORD, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_TPWORD, 2, 32, 0, dont, false, v850), + V800_RELOC (R_V810_TPWLO, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_TPWHI, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V810_TPWHI1, 1, 16, 0, dont, false, v850), + V800_RELOC (R_V850_TPHWLO, 1, 16, 1, dont, false, v850), + V800_RELOC (R_V850_TPBLO, 2, 24, 0, dont, false, v850), + V800_RELOC (R_V810_TPWLO_1, 1, 16, 0, signed, false, v850), + V800_RELOC (R_V850_TPBLO_1, 2, 16, 0, signed, false, v850), + V800_RELOC (R_V850_TPHWLO_1, 1, 16, 0, signed, false, v850), + V800_RELOC (R_V850_TP23BIT, 2, 23, 0, signed, false, v850), + V800_RELOC (R_V850_TPW23BIT, 2, 23, 0, signed, false, v850), + V800_RELOC (R_V850_TPDW8, 2, 8, 0, signed, false, v850) }; /* Map a bfd relocation into the appropriate howto structure. */ @@ -1888,7 +1888,7 @@ v850_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an V850 ELF reloc. */ -static bfd_boolean +static bool v850_elf_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -1902,15 +1902,15 @@ v850_elf_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &v850_elf_howto_table[r_type]; - return TRUE; + return true; } /* Set the howto pointer for a V850 ELF reloc (type RELA). */ -static bfd_boolean +static bool v850_elf_info_to_howto_rela (bfd *abfd, arelent * cache_ptr, Elf_Internal_Rela *dst) @@ -1924,20 +1924,20 @@ v850_elf_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &v850_elf_howto_table[r_type]; - return TRUE; + return true; } -static bfd_boolean +static bool v850_elf_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { return ( (name[0] == '.' && (name[1] == 'L' || name[1] == '.')) || (name[0] == '_' && name[1] == '.' && name[2] == 'L' && name[3] == '_')); } -static bfd_boolean +static bool v850_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) { return v850_elf_is_local_label_name (abfd, sym->name); @@ -2064,7 +2064,7 @@ v850_elf_final_link_relocate (reloc_howto_type *howto, return bfd_reloc_undefined; /* Get the value of __gp. */ - h = bfd_link_hash_lookup (info->hash, "__gp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "__gp", false, false, true); if (h == NULL || h->type != bfd_link_hash_defined) return bfd_reloc_gp_not_found; @@ -2089,7 +2089,7 @@ v850_elf_final_link_relocate (reloc_howto_type *howto, struct bfd_link_hash_entry * h; /* Get the value of __ep. */ - h = bfd_link_hash_lookup (info->hash, "__ep", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "__ep", false, false, true); if (h == NULL || h->type != bfd_link_hash_defined) return bfd_reloc_ep_not_found; @@ -2108,7 +2108,7 @@ v850_elf_final_link_relocate (reloc_howto_type *howto, struct bfd_link_hash_entry * h; /* Get the value of __ctbp. */ - h = bfd_link_hash_lookup (info->hash, "__ctbp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "__ctbp", false, false, true); if (h == NULL || h->type != bfd_link_hash_defined) return bfd_reloc_ctbp_not_found; @@ -2130,7 +2130,7 @@ v850_elf_final_link_relocate (reloc_howto_type *howto, return bfd_reloc_undefined; /* Get the value of __ctbp. */ - h = bfd_link_hash_lookup (info->hash, "__ctbp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "__ctbp", false, false, true); if (h == NULL || h->type != bfd_link_hash_defined) return bfd_reloc_ctbp_not_found; @@ -2228,7 +2228,7 @@ v850_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; /* Note - this check is delayed until now as it is possible and valid to have a file without any symbols but with relocs that @@ -2239,7 +2239,7 @@ v850_elf_relocate_section (bfd *output_bfd, (info, "no hash table available", NULL, input_bfd, input_section, (bfd_vma) 0); - return FALSE; + return false; } RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, @@ -2287,7 +2287,7 @@ v850_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -2326,7 +2326,7 @@ v850_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } static asection * @@ -2400,7 +2400,7 @@ v850_elf_make_note_section (bfd * abfd) /* Create the note section if not already present. This is done early so that the linker maps the sections to the right place in the output. */ -bfd_boolean +bool v850_elf_create_sections (struct bfd_link_info * info) { bfd * ibfd; @@ -2408,27 +2408,27 @@ v850_elf_create_sections (struct bfd_link_info * info) /* If we already have a note section, do not make another. */ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) if (bfd_get_section_by_name (ibfd, V850_NOTE_SECNAME) != NULL) - return TRUE; + return true; return v850_elf_make_note_section (info->input_bfds) != NULL; } -bfd_boolean +bool v850_elf_set_note (bfd * abfd, enum v850_notes note, unsigned int val) { asection * notes = bfd_get_section_by_name (abfd, V850_NOTE_SECNAME); if (val > 2) /* At the moment, no known note has a value over 2. */ - return FALSE; + return false; if (notes == NULL) notes = v850_elf_make_note_section (abfd); if (notes == NULL) - return FALSE; + return false; v850_set_note (abfd, notes, note, val); - return TRUE; + return true; } /* Copy a v850 note section from one object module to another. */ @@ -2468,7 +2468,7 @@ v850_elf_copy_notes (bfd *ibfd, bfd *obfd) /* Copy backend specific data from one object module to another. */ -static bfd_boolean +static bool v850_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { v850_elf_copy_notes (ibfd, obfd); @@ -2476,18 +2476,18 @@ v850_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) } #define bfd_elf32_bfd_copy_private_bfd_data v850_elf_copy_private_bfd_data -static bfd_boolean +static bool v850_elf_merge_notes (bfd * ibfd, bfd *obfd) { asection * onotes; asection * inotes; - bfd_boolean result = TRUE; + bool result = true; /* If the output bfd does not have a note section, then skip the merge. The normal input to output section copying will take care of everythng for us. */ if ((onotes = bfd_get_section_by_name (obfd, V850_NOTE_SECNAME)) == NULL) - return TRUE; + return true; if ((inotes = bfd_get_section_by_name (ibfd, V850_NOTE_SECNAME)) != NULL) { @@ -2534,7 +2534,7 @@ v850_elf_merge_notes (bfd * ibfd, bfd *obfd) /* xgettext:c-format */ (_("error: %pB needs 8-byte alignment but %pB is set for 4-byte alignment"), ibfd, obfd); - result = FALSE; + result = false; } else /* ibfd uses 4-byte alignment, obfd uses 8-byte alignment. @@ -2550,7 +2550,7 @@ v850_elf_merge_notes (bfd * ibfd, bfd *obfd) /* xgettext:c-format */ (_("error: %pB uses 64-bit doubles but " "%pB uses 32-bit doubles"), ibfd, obfd); - result = FALSE; + result = false; } else /* ibfd uses 32-bit doubles, obfd uses 64-bit doubles. @@ -2565,7 +2565,7 @@ v850_elf_merge_notes (bfd * ibfd, bfd *obfd) /* xgettext:c-format */ (_("error: %pB uses FPU-3.0 but %pB only supports FPU-2.0"), ibfd, obfd); - result = FALSE; + result = false; } else /* ibfd uses FPU-2.0, obfd uses FPU-3.0. Leave obfd as it is. */ @@ -2685,7 +2685,7 @@ v850_elf_print_notes (bfd * abfd, FILE * file) /* Set the right machine number and architecture. */ -static bfd_boolean +static bool v850_elf_object_p (bfd *abfd) { enum bfd_architecture arch; @@ -2715,7 +2715,7 @@ v850_elf_object_p (bfd *abfd) break; default: - return FALSE; + return false; } return bfd_default_set_arch_mach (abfd, arch, mach); @@ -2723,7 +2723,7 @@ v850_elf_object_p (bfd *abfd) /* Store the machine number in the flags field. */ -static bfd_boolean +static bool v850_elf_final_write_processing (bfd *abfd) { unsigned long val; @@ -2759,31 +2759,31 @@ v850_elf_final_write_processing (bfd *abfd) /* Function to keep V850 specific file flags. */ -static bfd_boolean +static bool v850_elf_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool v850_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword out_flags; flagword in_flags; - bfd_boolean result = TRUE; + bool result = true; if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; result &= v850_elf_merge_notes (ibfd, obfd); @@ -2799,9 +2799,9 @@ v850_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) unitialised values, which surprise surprise, correspond to the default values. */ if (bfd_get_arch_info (ibfd)->the_default) - return TRUE; + return true; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -2884,7 +2884,7 @@ v850_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Display the flags field. */ -static bfd_boolean +static bool v850_elf_print_private_bfd_data (bfd *abfd, void * ptr) { FILE * file = (FILE *) ptr; @@ -2923,7 +2923,7 @@ v850_elf_print_private_bfd_data (bfd *abfd, void * ptr) v850_elf_print_notes (abfd, file); - return TRUE; + return true; } /* V850 ELF uses four common sections. One is the usual one, and the @@ -2960,7 +2960,7 @@ static asection v850_elf_zcom_section = /* Given a BFD section, try to locate the corresponding ELF section index. */ -static bfd_boolean +static bool v850_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) @@ -2972,9 +2972,9 @@ v850_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, else if (strcmp (bfd_section_name (sec), ".zcommon") == 0) *retval = SHN_V850_ZCOMMON; else - return FALSE; + return false; - return TRUE; + return true; } /* Handle the special V850 section numbers that a symbol may use. */ @@ -3034,7 +3034,7 @@ v850_elf_symbol_processing (bfd *abfd, asymbol *asym) /* Hook called by the linker routine which adds symbols from an object file. We must handle the special v850 section numbers here. */ -static bfd_boolean +static bool v850_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -3091,7 +3091,7 @@ v850_elf_add_symbol_hook (bfd *abfd, break; } - return TRUE; + return true; } static int @@ -3124,7 +3124,7 @@ v850_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, return 1; } -static bfd_boolean +static bool v850_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -3137,7 +3137,7 @@ v850_elf_section_from_shdr (bfd *abfd, sections by their name, instead. */ if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; flags = 0; switch (hdr->sh_type) @@ -3159,7 +3159,7 @@ v850_elf_section_from_shdr (bfd *abfd, /* Set the correct type for a V850 ELF section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool v850_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr, asection *sec) @@ -3181,12 +3181,12 @@ v850_elf_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, hdr->sh_entsize = SIZEOF_V850_NOTE; } - return TRUE; + return true; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool v850_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, @@ -3396,7 +3396,7 @@ v850_elf_relax_delete_bytes (bfd *abfd, ++ shndx; } - return TRUE; + return true; } #define NOP_OPCODE (0x0000) @@ -3419,11 +3419,11 @@ v850_elf_relax_delete_bytes (bfd *abfd, #define JMP_R_MASK 0xFFE0 #define JMP_R1(insn) ((insn) & 0x1f) -static bfd_boolean +static bool v850_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -3435,14 +3435,14 @@ v850_elf_relax_section (bfd *abfd, bfd_vma addr = 0; bfd_vma toaddr; int align_pad_size = 0; - bfd_boolean result = TRUE; + bool result = true; - *again = FALSE; + *again = false; if (bfd_link_relocatable (link_info) || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0) - return TRUE; + return true; symtab_hdr = & elf_tdata (abfd)->symtab_hdr; @@ -4084,7 +4084,7 @@ v850_elf_relax_section (bfd *abfd, return result; error_return: - result = FALSE; + result = false; goto finish; } @@ -4230,7 +4230,7 @@ v800_elf_reloc_name_lookup (bfd * abfd, const char * r_name) /* Set the howto pointer in CACHE_PTR for a V800 ELF reloc. */ -static bfd_boolean +static bool v800_elf_info_to_howto (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -4249,11 +4249,11 @@ v800_elf_info_to_howto (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = v800_elf_howto_table + (r_type - R_V810_NONE); - return TRUE; + return true; } #undef TARGET_LITTLE_SYM diff --git a/bfd/elf32-v850.h b/bfd/elf32-v850.h index deb55b65ab..34fa76eb79 100644 --- a/bfd/elf32-v850.h +++ b/bfd/elf32-v850.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -extern bfd_boolean v850_elf_create_sections +extern bool v850_elf_create_sections (struct bfd_link_info *); -extern bfd_boolean v850_elf_set_note +extern bool v850_elf_set_note (bfd *, unsigned int, unsigned int); diff --git a/bfd/elf32-vax.c b/bfd/elf32-vax.c index b6f4ab91b0..406c02ac7c 100644 --- a/bfd/elf32-vax.c +++ b/bfd/elf32-vax.c @@ -27,143 +27,142 @@ #include "elf/vax.h" static reloc_howto_type *reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean rtype_to_howto (bfd *, arelent *, Elf_Internal_Rela *); +static bool rtype_to_howto (bfd *, arelent *, Elf_Internal_Rela *); static struct bfd_hash_entry *elf_vax_link_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); static struct bfd_link_hash_table *elf_vax_link_hash_table_create (bfd *); -static bfd_boolean elf_vax_check_relocs (bfd *, struct bfd_link_info *, - asection *, const Elf_Internal_Rela *); -static bfd_boolean elf_vax_adjust_dynamic_symbol (struct bfd_link_info *, - struct elf_link_hash_entry *); -static bfd_boolean elf_vax_size_dynamic_sections (bfd *, struct bfd_link_info *); +static bool elf_vax_check_relocs (bfd *, struct bfd_link_info *, + asection *, const Elf_Internal_Rela *); +static bool elf_vax_adjust_dynamic_symbol (struct bfd_link_info *, + struct elf_link_hash_entry *); +static bool elf_vax_size_dynamic_sections (bfd *, struct bfd_link_info *); static int elf_vax_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **); -static bfd_boolean elf_vax_finish_dynamic_symbol (bfd *, struct bfd_link_info *, - struct elf_link_hash_entry *, - Elf_Internal_Sym *); -static bfd_boolean elf_vax_finish_dynamic_sections (bfd *, - struct bfd_link_info *); +static bool elf_vax_finish_dynamic_symbol (bfd *, struct bfd_link_info *, + struct elf_link_hash_entry *, + Elf_Internal_Sym *); +static bool elf_vax_finish_dynamic_sections (bfd *, struct bfd_link_info *); static bfd_vma elf_vax_plt_sym_val (bfd_vma, const asection *, const arelent *); -static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword); -static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *); +static bool elf32_vax_set_private_flags (bfd *, flagword); +static bool elf32_vax_print_private_bfd_data (bfd *, void *); static reloc_howto_type howto_table[] = { HOWTO (R_VAX_NONE, /* type */ 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_VAX_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_VAX_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_VAX_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_VAX_PC32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_PC32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_VAX_PC16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_PC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_VAX_PC8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_PC8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000000ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_VAX_GOT32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_GOT32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), @@ -175,15 +174,15 @@ static reloc_howto_type howto_table[] = { 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_PLT32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ EMPTY_HOWTO (-1), EMPTY_HOWTO (-1), @@ -195,90 +194,90 @@ static reloc_howto_type howto_table[] = { 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_VAX_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_VAX_JMP_SLOT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_VAX_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VAX_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO (R_VAX_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_VAX_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_VAX_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_VAX_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; -static bfd_boolean +static bool rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int r_type; @@ -290,10 +289,10 @@ rtype_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &howto_table[r_type]; - return TRUE; + return true; } #define elf_info_to_howto rtype_to_howto @@ -417,20 +416,20 @@ struct elf_vax_link_hash_entry /* Declare this now that the above structures are defined. */ -static bfd_boolean elf_vax_discard_copies (struct elf_vax_link_hash_entry *, - void *); +static bool elf_vax_discard_copies (struct elf_vax_link_hash_entry *, + void *); /* Declare this now that the above structures are defined. */ -static bfd_boolean elf_vax_instantiate_got_entries (struct elf_link_hash_entry *, - void *); +static bool elf_vax_instantiate_got_entries (struct elf_link_hash_entry *, + void *); /* Traverse an VAX ELF linker hash table. */ #define elf_vax_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ ((table), \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* Create an entry in an VAX ELF linker hash table. */ @@ -489,17 +488,17 @@ elf_vax_link_hash_table_create (bfd *abfd) } /* Keep vax-specific flags in the ELF header */ -static bfd_boolean +static bool elf32_vax_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf32_vax_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -507,21 +506,21 @@ elf32_vax_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; if (!elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; } - return TRUE; + return true; } /* Display the flags field */ -static bfd_boolean +static bool elf32_vax_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -547,13 +546,13 @@ elf32_vax_print_private_bfd_data (bfd *abfd, void * ptr) fputc ('\n', file); - return TRUE; + return true; } /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -565,7 +564,7 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, asection *sreloc; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -610,7 +609,7 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, /* Create the .got section. */ elf_hash_table (info)->dynobj = dynobj = abfd; if (!_bfd_elf_create_got_section (dynobj, info)) - return FALSE; + return false; } if (h != NULL) @@ -728,10 +727,10 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 2, abfd, /*rela?*/ TRUE); + (sec, dynobj, 2, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; if (sec->flags & SEC_READONLY) info->flags |= DF_TEXTREL; @@ -765,7 +764,7 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, p = ((struct elf_vax_pcrel_relocs_copied *) bfd_alloc (dynobj, (bfd_size_type) sizeof *p)); if (p == NULL) - return FALSE; + return false; p->next = eh->pcrel_relocs_copied; eh->pcrel_relocs_copied = p; p->section = sreloc; @@ -782,14 +781,14 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, Reconstruct it for later use during GC. */ case R_VAX_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_VAX_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; default: @@ -797,7 +796,7 @@ elf_vax_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -827,7 +826,7 @@ elf_vax_gc_mark_hook (asection *sec, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -862,7 +861,7 @@ elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, linkage table, and we can just do a PCxx reloc instead. */ h->plt.offset = (bfd_vma) -1; h->needs_plt = 0; - return TRUE; + return true; } s = elf_hash_table (info)->splt; @@ -905,7 +904,7 @@ elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (s != NULL); s->size += sizeof (Elf32_External_Rela); - return TRUE; + return true; } /* Reinitialize the plt offset now that it is not used as a reference @@ -921,7 +920,7 @@ elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -932,12 +931,12 @@ elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT relocation, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* We must allocate the symbol in our .dynbss section, which will become part of the .bss section of the executable. There will be @@ -973,19 +972,19 @@ elf_vax_adjust_dynamic_symbol (struct bfd_link_info *info, and PLT (.GOT) reference counts back to -1 so normal PC32 relocation will be done. */ -static bfd_boolean +static bool elf_vax_discard_got_entries (struct elf_link_hash_entry *h, void *infoptr ATTRIBUTE_UNUSED) { h->got.refcount = -1; h->plt.refcount = -1; - return TRUE; + return true; } /* Discard unused dynamic data if this is a static link. */ -static bfd_boolean +static bool elf_vax_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -1019,17 +1018,17 @@ elf_vax_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, elf_vax_discard_got_entries, info); - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -1065,7 +1064,7 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -1087,7 +1086,7 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) if (s->size != 0) { if (strcmp (name, ".rela.plt") != 0) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -1122,7 +1121,7 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) /* Allocate memory for the section contents. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -1134,7 +1133,7 @@ elf_vax_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) in regular objects. We allocated space for them in the check_relocs routine, but we won't fill them in in the relocate_section routine. */ -static bfd_boolean +static bool elf_vax_discard_copies (struct elf_vax_link_hash_entry *h, void * ignore ATTRIBUTE_UNUSED) { @@ -1142,12 +1141,12 @@ elf_vax_discard_copies (struct elf_vax_link_hash_entry *h, /* We only discard relocs for symbols defined in a regular object. */ if (!h->root.def_regular) - return TRUE; + return true; for (s = h->pcrel_relocs_copied; s != NULL; s = s->next) s->section->size -= s->count * sizeof (Elf32_External_Rela); - return TRUE; + return true; } /* This function is called via elf_link_hash_traverse. It looks for @@ -1157,7 +1156,7 @@ elf_vax_discard_copies (struct elf_vax_link_hash_entry *h, be done. Otherwise space in the .got and .rela.got will be reserved for the symbol. */ -static bfd_boolean +static bool elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, void * infoptr) { struct bfd_link_info *info = (struct bfd_link_info *) infoptr; @@ -1167,7 +1166,7 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, void * infoptr) /* We don't care about non-GOT (and non-PLT) entries. */ if (h->got.refcount <= 0 && h->plt.refcount <= 0) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; BFD_ASSERT (dynobj != NULL); @@ -1186,7 +1185,7 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, void * infoptr) if (h->dynindx == -1) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* Allocate space in the .got and .rela.got sections. */ @@ -1194,7 +1193,7 @@ elf_vax_instantiate_got_entries (struct elf_link_hash_entry *h, void * infoptr) srelgot->size += sizeof (Elf32_External_Rela); } - return TRUE; + return true; } /* Relocate an VAX ELF section. */ @@ -1245,7 +1244,7 @@ elf_vax_relocate_section (bfd *output_bfd, if (r_type < 0 || r_type >= (int) R_VAX_max) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = howto_table + r_type; @@ -1261,8 +1260,8 @@ elf_vax_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc; - bfd_boolean warned, ignored; + bool unresolved_reloc; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1417,7 +1416,7 @@ elf_vax_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip, relocate; + bool skip, relocate; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -1425,21 +1424,21 @@ elf_vax_relocate_section (bfd *output_bfd, if (sreloc == NULL) { sreloc = _bfd_elf_get_dynamic_reloc_section - (input_bfd, input_section, /*rela?*/ TRUE); + (input_bfd, input_section, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -1459,7 +1458,7 @@ elf_vax_relocate_section (bfd *output_bfd, { if (r_type == R_VAX_32) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF32_R_INFO (0, R_VAX_RELATIVE); BFD_ASSERT (bfd_get_signed_32 (input_bfd, &contents[rel->r_offset]) == 0); @@ -1474,7 +1473,7 @@ elf_vax_relocate_section (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -1576,7 +1575,7 @@ elf_vax_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -1589,13 +1588,13 @@ elf_vax_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_vax_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym) @@ -1727,12 +1726,12 @@ elf_vax_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; @@ -1820,7 +1819,7 @@ elf_vax_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) if (elf_section_data (sgot->output_section) != NULL) elf_section_data (sgot->output_section)->this_hdr.sh_entsize = 4; - return TRUE; + return true; } static enum elf_reloc_type_class diff --git a/bfd/elf32-visium.c b/bfd/elf32-visium.c index e8b2585460..fd45dad435 100644 --- a/bfd/elf32-visium.c +++ b/bfd/elf32-visium.c @@ -36,60 +36,60 @@ static reloc_howto_type visium_elf_howto_table[] = { 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VISIUM_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation. */ HOWTO (R_VISIUM_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VISIUM_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_VISIUM_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VISIUM_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_VISIUM_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VISIUM_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit PC relative relocation. */ @@ -97,45 +97,45 @@ static reloc_howto_type visium_elf_howto_table[] = { 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VISIUM_8_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit PC relative relocation. */ HOWTO (R_VISIUM_16_PCREL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VISIUM_16_PCREL", /* name */ - FALSE, /* partial inplace */ + false, /* partial inplace */ 0x0000, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32-bit PC relative relocation. */ HOWTO (R_VISIUM_32_PCREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_VISIUM_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16-bit PC word relative offset, relative to start of instruction and always in the second half of the instruction. */ @@ -143,105 +143,105 @@ static reloc_howto_type visium_elf_howto_table[] = { 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ visium_elf_howto_parity_reloc, /* special_function */ "R_VISIUM_PC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The high 16 bits of symbol value. */ HOWTO (R_VISIUM_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ visium_elf_howto_parity_reloc, /* special_function */ "R_VISIUM_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The low 16 bits of symbol value. */ HOWTO (R_VISIUM_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ visium_elf_howto_parity_reloc, /* special_function */ "R_VISIUM_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit immediate value. */ HOWTO (R_VISIUM_IM16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ visium_elf_howto_parity_reloc, /* special_function */ "R_VISIUM_IM16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000000, /* src_mask */ 0x000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The high 16 bits of symbol value, pc relative. */ HOWTO (R_VISIUM_HI16_PCREL, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ visium_elf_howto_parity_reloc, /* special_function */ "R_VISIUM_HI16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The low 16 bits of symbol value, pc relative. */ HOWTO (R_VISIUM_LO16_PCREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ visium_elf_howto_parity_reloc, /* special_function */ "R_VISIUM_LO16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit immediate value, pc relative. */ HOWTO (R_VISIUM_IM16_PCREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ visium_elf_howto_parity_reloc, /* special_function */ "R_VISIUM_IM16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000000, /* src_mask */ 0x000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; @@ -251,15 +251,15 @@ static reloc_howto_type visium_elf_vtinherit_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_VISIUM_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ static reloc_howto_type visium_elf_vtentry_howto = @@ -267,15 +267,15 @@ static reloc_howto_type visium_elf_vtentry_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_VISIUM_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Return the parity bit for INSN shifted to its final position. */ @@ -458,7 +458,7 @@ visium_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for a VISIUM ELF reloc. */ -static bfd_boolean +static bool visium_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -481,19 +481,19 @@ visium_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &visium_elf_howto_table[r_type]; break; } - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. Since we don't do .gots or .plts, we just need to consider the virtual table relocs for gc. */ -static bfd_boolean +static bool visium_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -503,7 +503,7 @@ visium_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -531,19 +531,19 @@ visium_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, Reconstruct it for later use during GC. */ case R_VISIUM_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_VISIUM_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } /* Relocate a VISIUM ELF section. */ @@ -603,8 +603,8 @@ visium_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc; - bfd_boolean warned, ignored; + bool unresolved_reloc; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -673,7 +673,7 @@ visium_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -699,7 +699,7 @@ visium_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* This function is called during section gc to discover the section a @@ -722,55 +722,55 @@ visium_elf_gc_mark_hook (asection *sec, struct bfd_link_info *info, return _bfd_elf_gc_mark_hook (sec, info, rel, h, sym); } -static bfd_boolean +static bool visium_elf_init_file_header (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Ehdr *i_ehdrp; if (!_bfd_elf_init_file_header (abfd, info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_ident[EI_ABIVERSION] = 1; - return TRUE; + return true; } /* Function to set the ELF flag bits. */ -static bfd_boolean +static bool visium_elf_set_private_flags (bfd *abfd, flagword flags) { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Copy backend specific data from one object module to another. */ -static bfd_boolean +static bool visium_elf_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; BFD_ASSERT (!elf_flags_init (obfd) || elf_elfheader (obfd)->e_flags == elf_elfheader (ibfd)->e_flags); elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; /* Copy object attributes. */ _bfd_elf_copy_obj_attributes (ibfd, obfd); - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool visium_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -792,7 +792,7 @@ visium_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) { /* First call, no flags set. */ - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } else @@ -826,10 +826,10 @@ visium_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd, new_opt_with, opt_arch, old_opt_with, opt_arch); } - return TRUE; + return true; } -static bfd_boolean +static bool visium_elf_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = (FILE *) ptr; @@ -851,7 +851,7 @@ visium_elf_print_private_bfd_data (bfd *abfd, void *ptr) fprintf (file, " -mtune=mcm24"); fputc ('\n', file); - return TRUE; + return true; } #define ELF_ARCH bfd_arch_visium diff --git a/bfd/elf32-wasm32.c b/bfd/elf32-wasm32.c index 2a7af97fcc..641b529395 100644 --- a/bfd/elf32-wasm32.c +++ b/bfd/elf32-wasm32.c @@ -31,30 +31,30 @@ static reloc_howto_type elf32_wasm32_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_WASM32_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit absolute */ HOWTO (R_WASM32_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_WASM32_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* Look up the relocation CODE. */ @@ -116,7 +116,7 @@ elf32_wasm32_rtype_to_howto (bfd *abfd, unsigned r_type) /* Translate the ELF-internal relocation RELA into CACHE_PTR. */ -static bfd_boolean +static bool elf32_wasm32_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) diff --git a/bfd/elf32-xc16x.c b/bfd/elf32-xc16x.c index 55e2782506..98a8a1325d 100644 --- a/bfd/elf32-xc16x.c +++ b/bfd/elf32-xc16x.c @@ -34,59 +34,59 @@ static reloc_howto_type xc16x_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_XC16X_ABS_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 8, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_ABS_8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_XC16X_ABS_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_ABS_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_XC16X_ABS_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_ABS_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A PC relative 8 bit relocation. */ @@ -94,30 +94,30 @@ static reloc_howto_type xc16x_elf_howto_table [] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 8, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_8_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x00ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Relocation regarding page number. */ HOWTO (R_XC16X_PAG, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_PAG", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocation regarding page number. */ @@ -125,15 +125,15 @@ static reloc_howto_type xc16x_elf_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_POF", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocation regarding segment number. */ @@ -141,30 +141,30 @@ static reloc_howto_type xc16x_elf_howto_table [] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_SEG", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocation regarding segment offset. */ HOWTO (R_XC16X_SOF, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XC16X_SOF", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE) /* pcrel_offset */ + false) /* pcrel_offset */ }; @@ -232,7 +232,7 @@ elf32_xc16x_rtype_to_howto (bfd *abfd ATTRIBUTE_UNUSED, unsigned r_type) /* For a particular operand this function is called to finalise the type of relocation. */ -static bfd_boolean +static bool elf32_xc16x_info_to_howto (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { @@ -244,12 +244,12 @@ elf32_xc16x_info_to_howto (bfd *abfd, arelent *bfd_reloc, if (xc16x_elf_howto_table[i].type == r) { bfd_reloc->howto = &xc16x_elf_howto_table[i]; - return TRUE; + return true; } /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } static bfd_reloc_status_type @@ -383,7 +383,7 @@ elf32_xc16x_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -412,11 +412,11 @@ elf32_xc16x_relocate_section (bfd *output_bfd, info, sec, h == NULL); } - return TRUE; + return true; } -static bfd_boolean +static bool elf32_xc16x_final_write_processing (bfd *abfd) { unsigned long val; @@ -459,12 +459,12 @@ elf32_xc16x_mach (flagword flags) } -static bfd_boolean +static bool elf32_xc16x_object_p (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_xc16x, elf32_xc16x_mach (elf_elfheader (abfd)->e_flags)); - return TRUE; + return true; } diff --git a/bfd/elf32-xgate.c b/bfd/elf32-xgate.c index 0322e7ccb1..5156eb3302 100644 --- a/bfd/elf32-xgate.c +++ b/bfd/elf32-xgate.c @@ -44,60 +44,60 @@ static reloc_howto_type elf_xgate_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit absolute relocation. */ HOWTO (R_XGATE_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit PC-rel relocation. */ HOWTO (R_XGATE_PCREL_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_PCREL_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_XGATE_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont /*bitfield */, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. This one is never used for the code relocation. It's used by gas for -gstabs generation. */ @@ -105,240 +105,240 @@ static reloc_howto_type elf_xgate_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit PC-rel relocation. */ HOWTO (R_XGATE_PCREL_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_PCREL_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_XGATE_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_XGATE_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_XGATE_GNU_VTENTRY, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_XGATE_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24 bit relocation. */ HOWTO (R_XGATE_24, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_IMM8_LO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16-bit low relocation. */ HOWTO (R_XGATE_LO16, /* type */ 8, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_IMM8_HI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A page relocation. */ HOWTO (R_XGATE_GPAGE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ xgate_elf_special_reloc,/* special_function */ "R_XGATE_GPAGE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 9 bit absolute relocation. */ HOWTO (R_XGATE_PCREL_9, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_PCREL_9", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 8 bit absolute relocation (upper address). */ HOWTO (R_XGATE_PCREL_10, /* type */ 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_PCREL_10", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 8 bit absolute relocation. */ HOWTO (R_XGATE_IMM8_LO, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_IMM8_LO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation (upper address). */ HOWTO (R_XGATE_IMM8_HI, /* type */ 8, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_IMM8_HI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 3 bit absolute relocation. */ HOWTO (R_XGATE_IMM3, /* type */ 8, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_IMM3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 4 bit absolute relocation. */ HOWTO (R_XGATE_IMM4, /* type */ 8, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_IMM4", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 5 bit absolute relocation. */ HOWTO (R_XGATE_IMM5, /* type */ 8, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XGATE_IMM5", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00ff, /* src_mask */ 0x00ff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Mark beginning of a jump instruction (any form). */ HOWTO (R_XGATE_RL_JUMP, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ xgate_elf_ignore_reloc, /* special_function */ "R_XGATE_RL_JUMP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Mark beginning of Gcc relaxation group instruction. */ HOWTO (R_XGATE_RL_GROUP, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ xgate_elf_ignore_reloc, /* special_function */ "R_XGATE_RL_GROUP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* Map BFD reloc types to XGATE ELF reloc types. */ @@ -404,7 +404,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for an XGATE ELF reloc. */ -static bfd_boolean +static bool xgate_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -418,10 +418,10 @@ xgate_info_to_howto_rel (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_xgate_howto_table[r_type]; - return TRUE; + return true; } /* Specific sections: @@ -480,7 +480,7 @@ xgate_elf_special_reloc (bfd *abfd ATTRIBUTE_UNUSED, abort (); } -static bfd_boolean +static bool _bfd_xgate_elf_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = (FILE *) ptr; @@ -508,7 +508,7 @@ _bfd_xgate_elf_print_private_bfd_data (bfd *abfd, void *ptr) fprintf (file, _("error reading cpu type from elf private data")); fputc ('\n', file); - return TRUE; + return true; } #define ELF_ARCH bfd_arch_xgate diff --git a/bfd/elf32-xstormy16.c b/bfd/elf32-xstormy16.c index 005e454425..f995b55a28 100644 --- a/bfd/elf32-xstormy16.c +++ b/bfd/elf32-xstormy16.c @@ -75,195 +75,195 @@ static reloc_howto_type xstormy16_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_XSTORMY16_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_XSTORMY16_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_XSTORMY16_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit pc-relative relocation. */ HOWTO (R_XSTORMY16_PC32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_PC32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit pc-relative relocation. */ HOWTO (R_XSTORMY16_PC16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_PC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An 8 bit pc-relative relocation. */ HOWTO (R_XSTORMY16_PC8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_PC8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 12-bit pc-relative relocation suitable for the branch instructions. */ HOWTO (R_XSTORMY16_REL_12, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 1, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_REL_12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0ffe, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 24-bit absolute relocation suitable for the jump instructions. */ HOWTO (R_XSTORMY16_24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ xstormy16_elf_24_reloc, /* special_function */ "R_XSTORMY16_24", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffff00ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit absolute relocation to a function pointer. */ HOWTO (R_XSTORMY16_FPTR16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_FPTR16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low order 16 bit value of a high memory address. */ HOWTO (R_XSTORMY16_LO16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High order 16 bit value of a high memory address. */ HOWTO (R_XSTORMY16_HI16, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 12 bit absolute relocation. */ HOWTO (R_XSTORMY16_12, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_XSTORMY16_12", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0000, /* src_mask */ 0x0fff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; static reloc_howto_type xstormy16_elf_howto_table2 [] = @@ -273,30 +273,30 @@ static reloc_howto_type xstormy16_elf_howto_table2 [] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_XSTORMY16_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_XSTORMY16_GNU_VTENTRY, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_XSTORMY16_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -375,7 +375,7 @@ xstormy16_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Set the howto pointer for an XSTORMY16 ELF reloc. */ -static bfd_boolean +static bool xstormy16_info_to_howto_rela (bfd * abfd, arelent * cache_ptr, Elf_Internal_Rela * dst) @@ -395,9 +395,9 @@ xstormy16_info_to_howto_rela (bfd * abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* We support 16-bit pointers to code above 64k by generating a thunk @@ -406,7 +406,7 @@ xstormy16_info_to_howto_rela (bfd * abfd, -relax switch is given, as otherwise we have no idea where the sections will fall in the address space. */ -static bfd_boolean +static bool xstormy16_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -420,7 +420,7 @@ xstormy16_elf_check_relocs (bfd *abfd, bfd *dynobj; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata(abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -472,7 +472,7 @@ xstormy16_elf_check_relocs (bfd *abfd, elf_hash_table (info)->splt = splt; if (splt == NULL || !bfd_set_section_alignment (splt, 1)) - return FALSE; + return false; } if (h != NULL) @@ -487,7 +487,7 @@ xstormy16_elf_check_relocs (bfd *abfd, size = symtab_hdr->sh_info * sizeof (bfd_vma); local_plt_offsets = bfd_alloc (abfd, size); if (local_plt_offsets == NULL) - return FALSE; + return false; elf_local_got_offsets (abfd) = local_plt_offsets; for (i = 0; i < symtab_hdr->sh_info; i++) @@ -507,19 +507,19 @@ xstormy16_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_XSTORMY16_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_XSTORMY16_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } /* A subroutine of xstormy16_elf_relax_section. If the global symbol H @@ -528,10 +528,10 @@ xstormy16_elf_check_relocs (bfd *abfd, struct relax_plt_data { asection *splt; - bfd_boolean *again; + bool *again; }; -static bfd_boolean +static bool xstormy16_relax_plt_check (struct elf_link_hash_entry *h, void * xdata) { struct relax_plt_data *data = (struct relax_plt_data *) xdata; @@ -552,17 +552,17 @@ xstormy16_relax_plt_check (struct elf_link_hash_entry *h, void * xdata) { h->plt.offset = -1; data->splt->size -= 4; - *data->again = TRUE; + *data->again = true; } } - return TRUE; + return true; } /* A subroutine of xstormy16_elf_relax_section. If the global symbol H previously had a plt entry, give it a new entry offset. */ -static bfd_boolean +static bool xstormy16_relax_plt_realloc (struct elf_link_hash_entry *h, void * xdata) { bfd_vma *entry = (bfd_vma *) xdata; @@ -573,33 +573,33 @@ xstormy16_relax_plt_realloc (struct elf_link_hash_entry *h, void * xdata) *entry += 4; } - return TRUE; + return true; } -static bfd_boolean +static bool xstormy16_elf_relax_section (bfd *dynobj, asection *splt, struct bfd_link_info *info, - bfd_boolean *again) + bool *again) { struct relax_plt_data relax_plt_data; bfd *ibfd; /* Assume nothing changes. */ - *again = FALSE; + *again = false; if (bfd_link_relocatable (info) || !is_elf_hash_table (info->hash)) - return TRUE; + return true; /* We only relax the .plt section at the moment. */ if (dynobj != elf_hash_table (info)->dynobj || strcmp (splt->name, ".plt") != 0) - return TRUE; + return true; /* Quick check for an empty plt. */ if (splt->size == 0) - return TRUE; + return true; /* Map across all global symbols; see which ones happen to fall in the low 64k. */ @@ -629,7 +629,7 @@ xstormy16_elf_relax_section (bfd *dynobj, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; } for (idx = 0; idx < symtab_hdr->sh_info; ++idx) @@ -658,7 +658,7 @@ xstormy16_elf_relax_section (bfd *dynobj, { local_plt_offsets[idx] = -1; splt->size -= 4; - *again = TRUE; + *again = true; } } @@ -702,10 +702,10 @@ xstormy16_elf_relax_section (bfd *dynobj, } } - return TRUE; + return true; } -static bfd_boolean +static bool xstormy16_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -713,20 +713,20 @@ xstormy16_elf_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, asection *splt; if (bfd_link_relocatable (info)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) - return TRUE; + return true; splt = elf_hash_table (info)->splt; BFD_ASSERT (splt != NULL); splt->contents = bfd_zalloc (dynobj, splt->size); if (splt->contents == NULL) - return FALSE; + return false; - return TRUE; + return true; } /* Relocate an XSTORMY16 ELF section. @@ -813,7 +813,7 @@ xstormy16_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -923,7 +923,7 @@ xstormy16_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -949,12 +949,12 @@ xstormy16_elf_relocate_section (bfd * output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* This must exist if dynobj is ever set. */ -static bfd_boolean +static bool xstormy16_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -977,7 +977,7 @@ xstormy16_elf_finish_dynamic_sections (bfd *abfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given diff --git a/bfd/elf32-xtensa.c b/bfd/elf32-xtensa.c index 16a148bf42..21894d171a 100644 --- a/bfd/elf32-xtensa.c +++ b/bfd/elf32-xtensa.c @@ -55,20 +55,20 @@ /* Local helper functions. */ -static bfd_boolean add_extra_plt_sections (struct bfd_link_info *, int); +static bool add_extra_plt_sections (struct bfd_link_info *, int); static char *vsprint_msg (const char *, const char *, int, ...) ATTRIBUTE_PRINTF(2,4); static bfd_reloc_status_type bfd_elf_xtensa_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -static bfd_boolean do_fix_for_relocatable_link +static bool do_fix_for_relocatable_link (Elf_Internal_Rela *, bfd *, asection *, bfd_byte *); static void do_fix_for_final_link (Elf_Internal_Rela *, bfd *, asection *, bfd_byte *, bfd_vma *); /* Local functions to handle Xtensa configurability. */ -static bfd_boolean is_indirect_call_opcode (xtensa_opcode); -static bfd_boolean is_direct_call_opcode (xtensa_opcode); -static bfd_boolean is_windowed_call_opcode (xtensa_opcode); +static bool is_indirect_call_opcode (xtensa_opcode); +static bool is_direct_call_opcode (xtensa_opcode); +static bool is_windowed_call_opcode (xtensa_opcode); static xtensa_opcode get_const16_opcode (void); static xtensa_opcode get_l32r_opcode (void); static bfd_vma l32r_offset (bfd_vma, bfd_vma); @@ -76,21 +76,21 @@ static int get_relocation_opnd (xtensa_opcode, int); static int get_relocation_slot (int); static xtensa_opcode get_relocation_opcode (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *); -static bfd_boolean is_l32r_relocation +static bool is_l32r_relocation (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *); -static bfd_boolean is_alt_relocation (int); -static bfd_boolean is_operand_relocation (int); +static bool is_alt_relocation (int); +static bool is_operand_relocation (int); static bfd_size_type insn_decode_len (bfd_byte *, bfd_size_type, bfd_size_type); static int insn_num_slots (bfd_byte *, bfd_size_type, bfd_size_type); static xtensa_opcode insn_decode_opcode (bfd_byte *, bfd_size_type, bfd_size_type, int); -static bfd_boolean check_branch_target_aligned +static bool check_branch_target_aligned (bfd_byte *, bfd_size_type, bfd_vma, bfd_vma); -static bfd_boolean check_loop_aligned +static bool check_loop_aligned (bfd_byte *, bfd_size_type, bfd_vma, bfd_vma); -static bfd_boolean check_branch_target_aligned_address (bfd_vma, int); +static bool check_branch_target_aligned_address (bfd_vma, int); static bfd_size_type get_asm_simplify_size (bfd_byte *, bfd_size_type, bfd_size_type); @@ -101,15 +101,15 @@ static bfd_reloc_status_type elf_xtensa_do_asm_simplify static bfd_reloc_status_type contract_asm_expansion (bfd_byte *, bfd_vma, Elf_Internal_Rela *, char **); static xtensa_opcode swap_callx_for_call_opcode (xtensa_opcode); -static xtensa_opcode get_expanded_call_opcode (bfd_byte *, int, bfd_boolean *); +static xtensa_opcode get_expanded_call_opcode (bfd_byte *, int, bool *); /* Access to internal relocations, section contents and symbols. */ static Elf_Internal_Rela *retrieve_internal_relocs - (bfd *, asection *, bfd_boolean); + (bfd *, asection *, bool); static void pin_internal_relocs (asection *, Elf_Internal_Rela *); static void release_internal_relocs (asection *, Elf_Internal_Rela *); -static bfd_byte *retrieve_contents (bfd *, asection *, bfd_boolean); +static bfd_byte *retrieve_contents (bfd *, asection *, bool); static void pin_contents (asection *, bfd_byte *); static void release_contents (asection *, bfd_byte *); static Elf_Internal_Sym *retrieve_local_syms (bfd *); @@ -122,12 +122,12 @@ static asection *get_elf_r_symndx_section (bfd *, unsigned long); static struct elf_link_hash_entry *get_elf_r_symndx_hash_entry (bfd *, unsigned long); static bfd_vma get_elf_r_symndx_offset (bfd *, unsigned long); -static bfd_boolean is_reloc_sym_weak (bfd *, Elf_Internal_Rela *); -static bfd_boolean pcrel_reloc_fits (xtensa_opcode, int, bfd_vma, bfd_vma); -static bfd_boolean xtensa_is_property_section (asection *); -static bfd_boolean xtensa_is_insntable_section (asection *); -static bfd_boolean xtensa_is_littable_section (asection *); -static bfd_boolean xtensa_is_proptable_section (asection *); +static bool is_reloc_sym_weak (bfd *, Elf_Internal_Rela *); +static bool pcrel_reloc_fits (xtensa_opcode, int, bfd_vma, bfd_vma); +static bool xtensa_is_property_section (asection *); +static bool xtensa_is_insntable_section (asection *); +static bool xtensa_is_littable_section (asection *); +static bool xtensa_is_proptable_section (asection *); static int internal_reloc_compare (const void *, const void *); static int internal_reloc_matches (const void *, const void *); static asection *xtensa_get_property_section (asection *, const char *); @@ -137,7 +137,7 @@ static flagword xtensa_get_property_predef_flags (asection *); typedef void (*deps_callback_t) (asection *, bfd_vma, asection *, bfd_vma, void *); -extern bfd_boolean xtensa_callback_required_dependence +extern bool xtensa_callback_required_dependence (bfd *, asection *, struct bfd_link_info *, deps_callback_t, void *); @@ -168,7 +168,7 @@ xtensa_isa xtensa_default_isa; symbols from other input files. The per-section list of "fix" records needs to be checked when resolving relocations. */ -static bfd_boolean relaxing_section = FALSE; +static bool relaxing_section = false; /* When this is true, during final links, literals that cannot be coalesced and their relocations may be moved to other sections. */ @@ -178,7 +178,7 @@ int elf32xtensa_no_literal_movement = 1; /* Place property records for a section into individual property section with xt.prop. prefix. */ -bfd_boolean elf32xtensa_separate_props = FALSE; +bool elf32xtensa_separate_props = false; /* Xtensa ABI. It affects PLT entry code. */ @@ -191,174 +191,174 @@ int elf32xtensa_abi = XTHAL_ABI_UNDEFINED; static reloc_howto_type elf_howto_table[] = { - HOWTO (R_XTENSA_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, + HOWTO (R_XTENSA_NONE, 0, 3, 0, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_NONE", - FALSE, 0, 0, FALSE), - HOWTO (R_XTENSA_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + false, 0, 0, false), + HOWTO (R_XTENSA_32, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_xtensa_reloc, "R_XTENSA_32", - TRUE, 0xffffffff, 0xffffffff, FALSE), + true, 0xffffffff, 0xffffffff, false), /* Replace a 32-bit value with a value from the runtime linker (only used by linker-generated stub functions). The r_addend value is special: 1 means to substitute a pointer to the runtime linker's dynamic resolver function; 2 means to substitute the link map for the shared object. */ - HOWTO (R_XTENSA_RTLD, 0, 2, 32, FALSE, 0, complain_overflow_dont, - NULL, "R_XTENSA_RTLD", FALSE, 0, 0, FALSE), + HOWTO (R_XTENSA_RTLD, 0, 2, 32, false, 0, complain_overflow_dont, + NULL, "R_XTENSA_RTLD", false, 0, 0, false), - HOWTO (R_XTENSA_GLOB_DAT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + HOWTO (R_XTENSA_GLOB_DAT, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_XTENSA_GLOB_DAT", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_XTENSA_JMP_SLOT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + false, 0, 0xffffffff, false), + HOWTO (R_XTENSA_JMP_SLOT, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_XTENSA_JMP_SLOT", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_XTENSA_RELATIVE, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + false, 0, 0xffffffff, false), + HOWTO (R_XTENSA_RELATIVE, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_XTENSA_RELATIVE", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_XTENSA_PLT, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, + false, 0, 0xffffffff, false), + HOWTO (R_XTENSA_PLT, 0, 2, 32, false, 0, complain_overflow_bitfield, bfd_elf_xtensa_reloc, "R_XTENSA_PLT", - FALSE, 0, 0xffffffff, FALSE), + false, 0, 0xffffffff, false), EMPTY_HOWTO (7), /* Old relocations for backward compatibility. */ - HOWTO (R_XTENSA_OP0, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_OP0", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_OP1, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_OP1", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_OP2, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_OP2", FALSE, 0, 0, TRUE), + HOWTO (R_XTENSA_OP0, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_OP0", false, 0, 0, true), + HOWTO (R_XTENSA_OP1, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_OP1", false, 0, 0, true), + HOWTO (R_XTENSA_OP2, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_OP2", false, 0, 0, true), /* Assembly auto-expansion. */ - HOWTO (R_XTENSA_ASM_EXPAND, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_ASM_EXPAND", FALSE, 0, 0, TRUE), + HOWTO (R_XTENSA_ASM_EXPAND, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_ASM_EXPAND", false, 0, 0, true), /* Relax assembly auto-expansion. */ - HOWTO (R_XTENSA_ASM_SIMPLIFY, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_ASM_SIMPLIFY", FALSE, 0, 0, TRUE), + HOWTO (R_XTENSA_ASM_SIMPLIFY, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_ASM_SIMPLIFY", false, 0, 0, true), EMPTY_HOWTO (13), - HOWTO (R_XTENSA_32_PCREL, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, + HOWTO (R_XTENSA_32_PCREL, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_xtensa_reloc, "R_XTENSA_32_PCREL", - FALSE, 0, 0xffffffff, TRUE), + false, 0, 0xffffffff, true), /* GNU extension to record C++ vtable hierarchy. */ - HOWTO (R_XTENSA_GNU_VTINHERIT, 0, 2, 0, FALSE, 0, complain_overflow_dont, + HOWTO (R_XTENSA_GNU_VTINHERIT, 0, 2, 0, false, 0, complain_overflow_dont, NULL, "R_XTENSA_GNU_VTINHERIT", - FALSE, 0, 0, FALSE), + false, 0, 0, false), /* GNU extension to record C++ vtable member usage. */ - HOWTO (R_XTENSA_GNU_VTENTRY, 0, 2, 0, FALSE, 0, complain_overflow_dont, + HOWTO (R_XTENSA_GNU_VTENTRY, 0, 2, 0, false, 0, complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn, "R_XTENSA_GNU_VTENTRY", - FALSE, 0, 0, FALSE), + false, 0, 0, false), /* Relocations for supporting difference of symbols. */ - HOWTO (R_XTENSA_DIFF8, 0, 0, 8, FALSE, 0, complain_overflow_signed, - bfd_elf_xtensa_reloc, "R_XTENSA_DIFF8", FALSE, 0, 0xff, FALSE), - HOWTO (R_XTENSA_DIFF16, 0, 1, 16, FALSE, 0, complain_overflow_signed, - bfd_elf_xtensa_reloc, "R_XTENSA_DIFF16", FALSE, 0, 0xffff, FALSE), - HOWTO (R_XTENSA_DIFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed, - bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", FALSE, 0, 0xffffffff, FALSE), + HOWTO (R_XTENSA_DIFF8, 0, 0, 8, false, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF8", false, 0, 0xff, false), + HOWTO (R_XTENSA_DIFF16, 0, 1, 16, false, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF16", false, 0, 0xffff, false), + HOWTO (R_XTENSA_DIFF32, 0, 2, 32, false, 0, complain_overflow_signed, + bfd_elf_xtensa_reloc, "R_XTENSA_DIFF32", false, 0, 0xffffffff, false), /* General immediate operand relocations. */ - HOWTO (R_XTENSA_SLOT0_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT1_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT2_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT3_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT4_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT5_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT6_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT7_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT8_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT9_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT10_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT11_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT12_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT13_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_OP", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT14_OP, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_OP", FALSE, 0, 0, TRUE), + HOWTO (R_XTENSA_SLOT0_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT1_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT2_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT3_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT4_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT5_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT6_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT7_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT8_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT9_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT10_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT11_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT12_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT13_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_OP", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT14_OP, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_OP", false, 0, 0, true), /* "Alternate" relocations. The meaning of these is opcode-specific. */ - HOWTO (R_XTENSA_SLOT0_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT1_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT2_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT3_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT4_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT5_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT6_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT7_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT8_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT9_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT10_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT11_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT12_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT13_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_ALT", FALSE, 0, 0, TRUE), - HOWTO (R_XTENSA_SLOT14_ALT, 0, 0, 0, TRUE, 0, complain_overflow_dont, - bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_ALT", FALSE, 0, 0, TRUE), + HOWTO (R_XTENSA_SLOT0_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT0_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT1_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT1_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT2_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT2_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT3_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT3_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT4_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT4_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT5_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT5_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT6_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT6_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT7_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT7_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT8_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT8_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT9_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT9_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT10_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT10_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT11_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT11_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT12_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT12_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT13_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT13_ALT", false, 0, 0, true), + HOWTO (R_XTENSA_SLOT14_ALT, 0, 0, 0, true, 0, complain_overflow_dont, + bfd_elf_xtensa_reloc, "R_XTENSA_SLOT14_ALT", false, 0, 0, true), /* TLS relocations. */ - HOWTO (R_XTENSA_TLSDESC_FN, 0, 2, 32, FALSE, 0, complain_overflow_dont, + HOWTO (R_XTENSA_TLSDESC_FN, 0, 2, 32, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_TLSDESC_FN", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_XTENSA_TLSDESC_ARG, 0, 2, 32, FALSE, 0, complain_overflow_dont, + false, 0, 0xffffffff, false), + HOWTO (R_XTENSA_TLSDESC_ARG, 0, 2, 32, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_TLSDESC_ARG", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_XTENSA_TLS_DTPOFF, 0, 2, 32, FALSE, 0, complain_overflow_dont, + false, 0, 0xffffffff, false), + HOWTO (R_XTENSA_TLS_DTPOFF, 0, 2, 32, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_TLS_DTPOFF", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_XTENSA_TLS_TPOFF, 0, 2, 32, FALSE, 0, complain_overflow_dont, + false, 0, 0xffffffff, false), + HOWTO (R_XTENSA_TLS_TPOFF, 0, 2, 32, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_TLS_TPOFF", - FALSE, 0, 0xffffffff, FALSE), - HOWTO (R_XTENSA_TLS_FUNC, 0, 0, 0, FALSE, 0, complain_overflow_dont, + false, 0, 0xffffffff, false), + HOWTO (R_XTENSA_TLS_FUNC, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_TLS_FUNC", - FALSE, 0, 0, FALSE), - HOWTO (R_XTENSA_TLS_ARG, 0, 0, 0, FALSE, 0, complain_overflow_dont, + false, 0, 0, false), + HOWTO (R_XTENSA_TLS_ARG, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_TLS_ARG", - FALSE, 0, 0, FALSE), - HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, FALSE, 0, complain_overflow_dont, + false, 0, 0, false), + HOWTO (R_XTENSA_TLS_CALL, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_xtensa_reloc, "R_XTENSA_TLS_CALL", - FALSE, 0, 0, FALSE), - - HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, - bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", FALSE, 0, 0xff, FALSE), - HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", FALSE, 0, 0xffff, FALSE), - HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", FALSE, 0, 0xffffffff, FALSE), - - HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, - bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", FALSE, 0, 0xff, FALSE), - HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", FALSE, 0, 0xffff, FALSE), - HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", FALSE, 0, 0xffffffff, FALSE), + false, 0, 0, false), + + HOWTO (R_XTENSA_PDIFF8, 0, 0, 8, false, 0, complain_overflow_bitfield, + bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF8", false, 0, 0xff, false), + HOWTO (R_XTENSA_PDIFF16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF16", false, 0, 0xffff, false), + HOWTO (R_XTENSA_PDIFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_xtensa_reloc, "R_XTENSA_PDIFF32", false, 0, 0xffffffff, false), + + HOWTO (R_XTENSA_NDIFF8, 0, 0, 8, false, 0, complain_overflow_bitfield, + bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF8", false, 0, 0xff, false), + HOWTO (R_XTENSA_NDIFF16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF16", false, 0, 0xffff, false), + HOWTO (R_XTENSA_NDIFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_xtensa_reloc, "R_XTENSA_NDIFF32", false, 0, 0xffffffff, false), }; #if DEBUG_GEN_RELOC @@ -543,7 +543,7 @@ elf_xtensa_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Given an ELF "rela" relocation, find the corresponding howto and record it in the BFD internal arelent representation of the relocation. */ -static bfd_boolean +static bool elf_xtensa_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -556,10 +556,10 @@ elf_xtensa_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_howto_table[r_type]; - return TRUE; + return true; } @@ -674,7 +674,7 @@ struct elf_xtensa_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == XTENSA_ELF_DATA) -static bfd_boolean +static bool elf_xtensa_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_xtensa_obj_tdata), @@ -763,11 +763,11 @@ elf_xtensa_link_hash_table_create (bfd *abfd) /* Create a hash entry for "_TLS_MODULE_BASE_" to speed up checking for it later. */ tlsbase = elf_link_hash_lookup (&ret->elf, "_TLS_MODULE_BASE_", - TRUE, FALSE, FALSE); + true, false, false); tlsbase->root.type = bfd_link_hash_new; tlsbase->root.u.undef.abfd = NULL; tlsbase->non_elf = 0; - ret->elf.dt_pltgot_required = TRUE; + ret->elf.dt_pltgot_required = true; ret->tlsbase = elf_xtensa_hash_entry (tlsbase); ret->tlsbase->tls_type = GOT_UNKNOWN; @@ -801,7 +801,7 @@ elf_xtensa_copy_indirect_symbol (struct bfd_link_info *info, _bfd_elf_link_hash_copy_indirect (info, dir, ind); } -static inline bfd_boolean +static inline bool elf_xtensa_dynamic_symbol_p (struct elf_link_hash_entry *h, struct bfd_link_info *info) { @@ -872,7 +872,7 @@ xtensa_read_table_entries (bfd *abfd, asection *section, property_table_entry **table_p, const char *sec_name, - bfd_boolean output_addr) + bool output_addr) { asection *table_section; bfd_size_type table_size = 0; @@ -909,7 +909,7 @@ xtensa_read_table_entries (bfd *abfd, table_entry_size -= 4; num_records = table_size / table_entry_size; - table_data = retrieve_contents (abfd, table_section, TRUE); + table_data = retrieve_contents (abfd, table_section, true); blocks = (property_table_entry *) bfd_malloc (num_records * sizeof (property_table_entry)); block_count = 0; @@ -919,7 +919,7 @@ xtensa_read_table_entries (bfd *abfd, else section_addr = section->vma; - internal_relocs = retrieve_internal_relocs (abfd, table_section, TRUE); + internal_relocs = retrieve_internal_relocs (abfd, table_section, true); if (internal_relocs && !table_section->reloc_done) { qsort (internal_relocs, table_section->reloc_count, @@ -1034,22 +1034,22 @@ elf_xtensa_find_property_entry (property_table_entry *property_table, } -static bfd_boolean +static bool elf_xtensa_in_literal_pool (property_table_entry *lit_table, int lit_table_size, bfd_vma addr) { if (elf_xtensa_find_property_entry (lit_table, lit_table_size, addr)) - return TRUE; + return true; - return FALSE; + return false; } /* Look through the relocs for a section during the first phase, and calculate needed space in the dynamic reloc sections. */ -static bfd_boolean +static bool elf_xtensa_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1062,13 +1062,13 @@ elf_xtensa_check_relocs (bfd *abfd, const Elf_Internal_Rela *rel_end; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_xtensa_elf (abfd)); htab = elf_xtensa_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; sym_hashes = elf_sym_hashes (abfd); @@ -1081,9 +1081,9 @@ elf_xtensa_check_relocs (bfd *abfd, struct elf_link_hash_entry *h = NULL; struct elf_xtensa_link_hash_entry *eh; int tls_type, old_tls_type; - bfd_boolean is_got = FALSE; - bfd_boolean is_plt = FALSE; - bfd_boolean is_tlsfunc = FALSE; + bool is_got = false; + bool is_plt = false; + bool is_tlsfunc = false; r_symndx = ELF32_R_SYM (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); @@ -1093,7 +1093,7 @@ elf_xtensa_check_relocs (bfd *abfd, /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx >= symtab_hdr->sh_info) @@ -1111,8 +1111,8 @@ elf_xtensa_check_relocs (bfd *abfd, if (bfd_link_pic (info)) { tls_type = GOT_TLS_GD; - is_got = TRUE; - is_tlsfunc = TRUE; + is_got = true; + is_tlsfunc = true; } else tls_type = GOT_TLS_IE; @@ -1122,13 +1122,13 @@ elf_xtensa_check_relocs (bfd *abfd, if (bfd_link_pic (info)) { tls_type = GOT_TLS_GD; - is_got = TRUE; + is_got = true; } else { tls_type = GOT_TLS_IE; if (h && elf_xtensa_hash_entry (h) != htab->tlsbase) - is_got = TRUE; + is_got = true; } break; @@ -1144,31 +1144,31 @@ elf_xtensa_check_relocs (bfd *abfd, if (bfd_link_pic (info)) info->flags |= DF_STATIC_TLS; if (bfd_link_pic (info) || h) - is_got = TRUE; + is_got = true; break; case R_XTENSA_32: tls_type = GOT_NORMAL; - is_got = TRUE; + is_got = true; break; case R_XTENSA_PLT: tls_type = GOT_NORMAL; - is_plt = TRUE; + is_plt = true; break; case R_XTENSA_GNU_VTINHERIT: /* This relocation describes the C++ object vtable hierarchy. Reconstruct it for later use during GC. */ if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; continue; case R_XTENSA_GNU_VTENTRY: /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; continue; default: @@ -1196,7 +1196,7 @@ elf_xtensa_check_relocs (bfd *abfd, if (elf_hash_table (info)->dynamic_sections_created) { if (! add_extra_plt_sections (info, htab->plt_reloc_count)) - return FALSE; + return false; } } else if (is_got) @@ -1222,17 +1222,17 @@ elf_xtensa_check_relocs (bfd *abfd, mem = bfd_zalloc (abfd, size * sizeof (bfd_signed_vma)); if (mem == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = (bfd_signed_vma *) mem; mem = bfd_zalloc (abfd, size); if (mem == NULL) - return FALSE; + return false; elf_xtensa_local_got_tls_type (abfd) = (char *) mem; mem = bfd_zalloc (abfd, size * sizeof (bfd_signed_vma)); if (mem == NULL) - return FALSE; + return false; elf_xtensa_local_tlsfunc_refcounts (abfd) = (bfd_signed_vma *) mem; } @@ -1266,7 +1266,7 @@ elf_xtensa_check_relocs (bfd *abfd, (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h ? h->root.root.string : ""); - return FALSE; + return false; } } @@ -1279,7 +1279,7 @@ elf_xtensa_check_relocs (bfd *abfd, } } - return TRUE; + return true; } @@ -1311,7 +1311,7 @@ elf_xtensa_make_sym_local (struct bfd_link_info *info, static void elf_xtensa_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h, - bfd_boolean force_local) + bool force_local) { /* For a shared link, move the plt refcount to the got refcount to leave space for RELATIVE relocs. */ @@ -1358,7 +1358,7 @@ elf_xtensa_gc_mark_hook (asection *sec, /* Create all the dynamic sections. */ -static bfd_boolean +static bool elf_xtensa_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { struct elf_xtensa_link_hash_table *htab; @@ -1366,16 +1366,16 @@ elf_xtensa_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) htab = elf_xtensa_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* First do all the standard stuff. */ if (! _bfd_elf_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; /* Create any extra PLT sections in case check_relocs has already been called on all the non-dynamic input files. */ if (! add_extra_plt_sections (info, htab->plt_reloc_count)) - return FALSE; + return false; noalloc_flags = (SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED | SEC_READONLY); @@ -1384,27 +1384,27 @@ elf_xtensa_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) /* Mark the ".got.plt" section READONLY. */ if (htab->elf.sgotplt == NULL || !bfd_set_section_flags (htab->elf.sgotplt, flags)) - return FALSE; + return false; /* Create ".got.loc" (literal tables for use by dynamic linker). */ htab->sgotloc = bfd_make_section_anyway_with_flags (dynobj, ".got.loc", flags); if (htab->sgotloc == NULL || !bfd_set_section_alignment (htab->sgotloc, 2)) - return FALSE; + return false; /* Create ".xt.lit.plt" (literal table for ".got.plt*"). */ htab->spltlittbl = bfd_make_section_anyway_with_flags (dynobj, ".xt.lit.plt", noalloc_flags); if (htab->spltlittbl == NULL || !bfd_set_section_alignment (htab->spltlittbl, 2)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool add_extra_plt_sections (struct bfd_link_info *info, int count) { bfd *dynobj = elf_hash_table (info)->dynobj; @@ -1430,17 +1430,17 @@ add_extra_plt_sections (struct bfd_link_info *info, int count) s = bfd_make_section_anyway_with_flags (dynobj, sname, flags | SEC_CODE); if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; sname = (char *) bfd_malloc (14); sprintf (sname, ".got.plt.%u", chunk); s = bfd_make_section_anyway_with_flags (dynobj, sname, flags); if (s == NULL || !bfd_set_section_alignment (s, 2)) - return FALSE; + return false; } - return TRUE; + return true; } @@ -1450,7 +1450,7 @@ add_extra_plt_sections (struct bfd_link_info *info, int count) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_xtensa_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h) { @@ -1463,18 +1463,18 @@ elf_xtensa_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object. The reference must go through the GOT, so there's no need for COPY relocs, .dynbss, etc. */ - return TRUE; + return true; } -static bfd_boolean +static bool elf_xtensa_allocate_dynrelocs (struct elf_link_hash_entry *h, void *arg) { struct bfd_link_info *info; @@ -1482,12 +1482,12 @@ elf_xtensa_allocate_dynrelocs (struct elf_link_hash_entry *h, void *arg) struct elf_xtensa_link_hash_entry *eh = elf_xtensa_hash_entry (h); if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) arg; htab = elf_xtensa_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* If we saw any use of an IE model for this symbol, we can then optimize away GOT entries for any TLSDESC_FN relocs. */ @@ -1502,7 +1502,7 @@ elf_xtensa_allocate_dynrelocs (struct elf_link_hash_entry *h, void *arg) if (! elf_xtensa_dynamic_symbol_p (h, info) && h->root.type == bfd_link_hash_undefweak) - return TRUE; + return true; if (h->plt.refcount > 0) htab->elf.srelplt->size += (h->plt.refcount * sizeof (Elf32_External_Rela)); @@ -1510,7 +1510,7 @@ elf_xtensa_allocate_dynrelocs (struct elf_link_hash_entry *h, void *arg) if (h->got.refcount > 0) htab->elf.srelgot->size += (h->got.refcount * sizeof (Elf32_External_Rela)); - return TRUE; + return true; } @@ -1559,14 +1559,14 @@ elf_xtensa_allocate_local_got_size (struct bfd_link_info *info) /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_xtensa_link_hash_table *htab; bfd *dynobj, *abfd; asection *s, *srelplt, *splt, *sgotplt, *srelgot, *spltlittbl, *sgotloc; - bfd_boolean relplt, relgot; + bool relplt, relgot; int plt_entries, plt_chunks, chunk; plt_entries = 0; @@ -1574,7 +1574,7 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, htab = elf_xtensa_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; if (dynobj == NULL) @@ -1678,8 +1678,8 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, } /* Allocate memory for dynamic sections. */ - relplt = FALSE; - relgot = FALSE; + relplt = false; + relgot = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -1696,9 +1696,9 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (s->size != 0) { if (strcmp (name, ".rela.plt") == 0) - relplt = TRUE; + relplt = true; else if (strcmp (name, ".rela.got") == 0) - relgot = TRUE; + relgot = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -1735,7 +1735,7 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } } @@ -1771,18 +1771,18 @@ elf_xtensa_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (!_bfd_elf_add_dynamic_tags (output_bfd, info, relplt || relgot)) - return FALSE; + return false; if (!add_dynamic_entry (DT_XTENSA_GOT_LOC_OFF, 0) || !add_dynamic_entry (DT_XTENSA_GOT_LOC_SZ, 0)) - return FALSE; + return false; } #undef add_dynamic_entry - return TRUE; + return true; } -static bfd_boolean +static bool elf_xtensa_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -1791,7 +1791,7 @@ elf_xtensa_always_size_sections (bfd *output_bfd, htab = elf_xtensa_hash_table (info); if (htab == NULL) - return FALSE; + return false; tls_sec = htab->elf.tls_sec; @@ -1804,15 +1804,15 @@ elf_xtensa_always_size_sections (bfd *output_bfd, tlsbase->type = STT_TLS; if (!(_bfd_generic_link_add_one_symbol (info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL, - tls_sec, 0, NULL, FALSE, + tls_sec, 0, NULL, false, bed->collect, &bh))) - return FALSE; + return false; tlsbase->def_regular = 1; tlsbase->other = STV_HIDDEN; - (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE); + (*bed->elf_backend_hide_symbol) (info, tlsbase, true); } - return TRUE; + return true; } @@ -1860,7 +1860,7 @@ elf_xtensa_do_reloc (reloc_howto_type *howto, bfd_vma relocation, bfd_byte *contents, bfd_vma address, - bfd_boolean is_weak_undef, + bool is_weak_undef, char **error_message) { xtensa_format fmt; @@ -2110,7 +2110,7 @@ vsprint_msg (const char *origmsg, const char *fmt, int arglen, ...) static bfd_size_type alloc_size = 0; static char *message = NULL; bfd_size_type orig_len, len = 0; - bfd_boolean is_append; + bool is_append; va_list ap; va_start (ap, arglen); @@ -2158,7 +2158,7 @@ bfd_elf_xtensa_reloc (bfd *abfd, bfd_vma output_base = 0; reloc_howto_type *howto = reloc_entry->howto; asection *reloc_target_output_section; - bfd_boolean is_weak_undef; + bool is_weak_undef; if (!xtensa_default_isa) xtensa_default_isa = xtensa_isa_init (0, 0); @@ -2308,14 +2308,14 @@ elf_xtensa_create_plt_entry (struct bfd_link_info *info, } -static bfd_boolean get_indirect_call_dest_reg (xtensa_opcode, unsigned *); +static bool get_indirect_call_dest_reg (xtensa_opcode, unsigned *); -static bfd_boolean +static bool replace_tls_insn (Elf_Internal_Rela *rel, bfd *abfd, asection *input_section, bfd_byte *contents, - bfd_boolean is_ld_model, + bool is_ld_model, char **error_message) { static xtensa_insnbuf ibuff = NULL; @@ -2342,7 +2342,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, if (fmt == XTENSA_UNDEFINED) { *error_message = "cannot decode instruction format"; - return FALSE; + return false; } BFD_ASSERT (xtensa_format_num_slots (isa, fmt) == 1); @@ -2352,7 +2352,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, if (old_op == XTENSA_UNDEFINED) { *error_message = "cannot decode instruction opcode"; - return FALSE; + return false; } r_type = ELF32_R_TYPE (rel->r_info); @@ -2365,7 +2365,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, sbuff, &dest_reg) != 0) { *error_message = "cannot extract L32R destination for TLS access"; - return FALSE; + return false; } break; @@ -2375,7 +2375,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, sbuff, &src_reg) != 0) { *error_message = "cannot extract CALLXn operands for TLS access"; - return FALSE; + return false; } break; @@ -2405,7 +2405,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, sbuff, 1) != 0) { *error_message = "cannot encode OR for TLS access"; - return FALSE; + return false; } } else @@ -2413,7 +2413,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, if (xtensa_opcode_encode (isa, fmt, 0, sbuff, new_op) != 0) { *error_message = "cannot encode NOP for TLS access"; - return FALSE; + return false; } } break; @@ -2427,7 +2427,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, sbuff, dest_reg + 2) != 0) { *error_message = "cannot encode RUR.THREADPTR for TLS access"; - return FALSE; + return false; } break; } @@ -2444,13 +2444,13 @@ replace_tls_insn (Elf_Internal_Rela *rel, sbuff, dest_reg) != 0) { *error_message = "cannot encode RUR.THREADPTR for TLS access"; - return FALSE; + return false; } break; case R_XTENSA_TLS_ARG: /* Nothing to do. Keep the original L32R instruction. */ - return TRUE; + return true; case R_XTENSA_TLS_CALL: /* Add the CALLX's src register (holding the THREADPTR value) @@ -2467,7 +2467,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, sbuff, src_reg) != 0) { *error_message = "cannot encode ADD for TLS access"; - return FALSE; + return false; } break; } @@ -2477,7 +2477,7 @@ replace_tls_insn (Elf_Internal_Rela *rel, xtensa_insnbuf_to_chars (isa, ibuff, contents + rel->r_offset, input_size - rel->r_offset); - return TRUE; + return true; } @@ -2521,12 +2521,12 @@ elf_xtensa_relocate_section (bfd *output_bfd, if (!is_xtensa_elf (input_bfd)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } htab = elf_xtensa_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; sym_hashes = elf_sym_hashes (input_bfd); @@ -2536,9 +2536,9 @@ elf_xtensa_relocate_section (bfd *output_bfd, { ltblsize = xtensa_read_table_entries (input_bfd, input_section, &lit_table, XTENSA_LIT_SEC_NAME, - TRUE); + true); if (ltblsize < 0) - return FALSE; + return false; } input_size = bfd_get_section_limit (input_bfd, input_section); @@ -2557,10 +2557,10 @@ elf_xtensa_relocate_section (bfd *output_bfd, asection *sec; bfd_vma relocation; bfd_reloc_status_type r; - bfd_boolean is_weak_undef; - bfd_boolean unresolved_reloc; - bfd_boolean warned; - bfd_boolean dynamic_symbol; + bool is_weak_undef; + bool unresolved_reloc; + bool warned; + bool dynamic_symbol; r_type = ELF32_R_TYPE (rel->r_info); if (r_type == (int) R_XTENSA_GNU_VTINHERIT @@ -2570,7 +2570,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, if (r_type < 0 || r_type >= (int) R_XTENSA_max) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = &elf_howto_table[r_type]; @@ -2579,9 +2579,9 @@ elf_xtensa_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - is_weak_undef = FALSE; - unresolved_reloc = FALSE; - warned = FALSE; + is_weak_undef = false; + unresolved_reloc = false; + warned = false; if (howto->partial_inplace && !bfd_link_relocatable (info)) { @@ -2602,7 +2602,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, } else { - bfd_boolean ignored; + bool ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2612,7 +2612,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, if (relocation == 0 && !unresolved_reloc && h->root.type == bfd_link_hash_undefweak) - is_weak_undef = TRUE; + is_weak_undef = true; sym_type = h->type; } @@ -2639,7 +2639,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, /* Check if this references a section in another input file. */ if (!do_fix_for_relocatable_link (rel, input_bfd, input_section, contents)) - return FALSE; + return false; } dest_addr = sym_sec->output_section->vma + sym_sec->output_offset @@ -2685,7 +2685,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, { r = elf_xtensa_do_reloc (howto, input_bfd, input_section, rel->r_addend, contents, - rel->r_offset, FALSE, + rel->r_offset, false, &error_message); rel->r_addend = 0; } @@ -2703,7 +2703,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, { r = elf_xtensa_do_reloc (howto, input_bfd, input_section, dest_addr, contents, - rel->r_offset, FALSE, + rel->r_offset, false, &error_message); } } @@ -2736,7 +2736,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, input_bfd, input_section, (uint64_t) rel->r_offset, (uint64_t) input_size); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (h != NULL) @@ -2843,7 +2843,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, elf_xtensa_create_plt_entry (info, output_bfd, srel->reloc_count); } - unresolved_reloc = FALSE; + unresolved_reloc = false; } else if (!is_weak_undef) { @@ -2952,7 +2952,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, outrel.r_info = ELF32_R_INFO (indx, r_type); relocation = 0; - unresolved_reloc = FALSE; + unresolved_reloc = false; BFD_ASSERT (srel); loc = (srel->contents @@ -2978,7 +2978,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, /* Check if optimizing to IE or LE model. */ if ((tls_type & GOT_TLS_IE) != 0) { - bfd_boolean is_ld_model = + bool is_ld_model = (h && elf_xtensa_hash_entry (h) == htab->tlsbase); if (! replace_tls_insn (rel, input_bfd, input_section, contents, is_ld_model, &error_message)) @@ -3028,7 +3028,7 @@ elf_xtensa_relocate_section (bfd *output_bfd, (uint64_t) rel->r_offset, howto->name, name); - return FALSE; + return false; } /* TLS optimizations may have changed r_type; update "howto". */ @@ -3060,16 +3060,16 @@ elf_xtensa_relocate_section (bfd *output_bfd, } free (lit_table); - input_section->reloc_done = TRUE; + input_section->reloc_done = true; - return TRUE; + return true; } /* Finish up dynamic symbol handling. There's not much to do here since the PLT and GOT entries are all set up by relocate_section. */ -static bfd_boolean +static bool elf_xtensa_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h, @@ -3093,7 +3093,7 @@ elf_xtensa_finish_dynamic_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, || h == elf_hash_table (info)->hgot) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } @@ -3162,15 +3162,15 @@ elf_xtensa_combine_prop_entries (bfd *output_bfd, for (n = 0; n < num; n++) { - bfd_boolean remove_entry = FALSE; + bool remove_entry = false; if (table[n].size == 0) - remove_entry = TRUE; + remove_entry = true; else if (n > 0 && (table[n-1].address + table[n-1].size == table[n].address)) { table[n-1].size += table[n].size; - remove_entry = TRUE; + remove_entry = true; } if (remove_entry) @@ -3214,7 +3214,7 @@ elf_xtensa_combine_prop_entries (bfd *output_bfd, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_xtensa_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3225,11 +3225,11 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd, int num_xtlit_entries = 0; if (! elf_hash_table (info)->dynamic_sections_created) - return TRUE; + return true; htab = elf_xtensa_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table (info)->dynobj; sdyn = bfd_get_linker_section (dynobj, ".dynamic"); @@ -3333,7 +3333,7 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd, spltlittbl->contents, spltlittbl->output_offset, spltlittbl->size)) - return FALSE; + return false; /* Clear SEC_HAS_CONTENTS so the contents won't be output again. */ spltlittbl->flags &= ~SEC_HAS_CONTENTS; } @@ -3356,7 +3356,7 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd, num_xtlit_entries = elf_xtensa_combine_prop_entries (output_bfd, sxtlit, sgotloc); if (num_xtlit_entries < 0) - return FALSE; + return false; } dyncon = (Elf32_External_Dyn *) sdyn->contents; @@ -3399,7 +3399,7 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd, bfd_elf32_swap_dyn_out (output_bfd, &dyn, dyncon); } - return TRUE; + return true; } @@ -3408,7 +3408,7 @@ elf_xtensa_finish_dynamic_sections (bfd *output_bfd, /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf_xtensa_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -3417,12 +3417,12 @@ elf_xtensa_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Check if we have the same endianness. */ if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; /* Don't even pretend to support mixed-format linking. */ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return FALSE; + return false; out_flag = elf_elfheader (obfd)->e_flags; in_flag = elf_elfheader (ibfd)->e_flags; @@ -3436,12 +3436,12 @@ elf_xtensa_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("%pB: incompatible machine type; output is 0x%x; input is 0x%x"), ibfd, out_mach, in_mach); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } if (! elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flag; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -3449,7 +3449,7 @@ elf_xtensa_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); - return TRUE; + return true; } if ((out_flag & EF_XTENSA_XT_INSN) != (in_flag & EF_XTENSA_XT_INSN)) @@ -3458,24 +3458,24 @@ elf_xtensa_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if ((out_flag & EF_XTENSA_XT_LIT) != (in_flag & EF_XTENSA_XT_LIT)) elf_elfheader (obfd)->e_flags &= (~ EF_XTENSA_XT_LIT); - return TRUE; + return true; } -static bfd_boolean +static bool elf_xtensa_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags |= flags; - elf_flags_init (abfd) = TRUE; + elf_flags_init (abfd) = true; - return TRUE; + return true; } -static bfd_boolean +static bool elf_xtensa_print_private_bfd_data (bfd *abfd, void *farg) { FILE *f = (FILE *) farg; @@ -3499,7 +3499,7 @@ elf_xtensa_print_private_bfd_data (bfd *abfd, void *farg) /* Set the right machine number for an Xtensa ELF file. */ -static bfd_boolean +static bool elf_xtensa_object_p (bfd *abfd) { int mach; @@ -3511,11 +3511,11 @@ elf_xtensa_object_p (bfd *abfd) mach = bfd_mach_xtensa; break; default: - return FALSE; + return false; } (void) bfd_default_set_arch_mach (abfd, bfd_arch_xtensa, mach); - return TRUE; + return true; } @@ -3523,7 +3523,7 @@ elf_xtensa_object_p (bfd *abfd) file. This gets the Xtensa architecture right based on the machine number. */ -static bfd_boolean +static bool elf_xtensa_final_write_processing (bfd *abfd) { int mach; @@ -3561,7 +3561,7 @@ elf_xtensa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, } -static bfd_boolean +static bool elf_xtensa_discard_info_for_section (bfd *abfd, struct elf_reloc_cookie *cookie, struct bfd_link_info *info, @@ -3574,7 +3574,7 @@ elf_xtensa_discard_info_for_section (bfd *abfd, if (sec->output_section && bfd_is_abs_section (sec->output_section)) - return FALSE; + return false; if (xtensa_is_proptable_section (sec)) entry_size = 12; @@ -3582,17 +3582,17 @@ elf_xtensa_discard_info_for_section (bfd *abfd, entry_size = 8; if (sec->size == 0 || sec->size % entry_size != 0) - return FALSE; + return false; contents = retrieve_contents (abfd, sec, info->keep_memory); if (!contents) - return FALSE; + return false; cookie->rels = retrieve_internal_relocs (abfd, sec, info->keep_memory); if (!cookie->rels) { release_contents (sec, contents); - return FALSE; + return false; } /* Sort the relocations. They should already be in order when @@ -3691,20 +3691,20 @@ elf_xtensa_discard_info_for_section (bfd *abfd, } -static bfd_boolean +static bool elf_xtensa_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, struct bfd_link_info *info) { asection *sec; - bfd_boolean changed = FALSE; + bool changed = false; for (sec = abfd->sections; sec != NULL; sec = sec->next) { if (xtensa_is_property_section (sec)) { if (elf_xtensa_discard_info_for_section (abfd, cookie, info, sec)) - changed = TRUE; + changed = true; } } @@ -3712,7 +3712,7 @@ elf_xtensa_discard_info (bfd *abfd, } -static bfd_boolean +static bool elf_xtensa_ignore_discarded_relocs (asection *sec) { return xtensa_is_property_section (sec); @@ -3734,7 +3734,7 @@ elf_xtensa_action_discarded (asection *sec) /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf_xtensa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -3759,13 +3759,13 @@ elf_xtensa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) } -static bfd_boolean +static bool elf_xtensa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 128: /* GNU/Linux elf_prpsinfo */ elf_tdata (abfd)->core->program @@ -3786,7 +3786,7 @@ elf_xtensa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } @@ -3818,7 +3818,7 @@ init_call_opcodes (void) } -static bfd_boolean +static bool is_indirect_call_opcode (xtensa_opcode opcode) { init_call_opcodes (); @@ -3829,7 +3829,7 @@ is_indirect_call_opcode (xtensa_opcode opcode) } -static bfd_boolean +static bool is_direct_call_opcode (xtensa_opcode opcode) { init_call_opcodes (); @@ -3840,7 +3840,7 @@ is_direct_call_opcode (xtensa_opcode opcode) } -static bfd_boolean +static bool is_windowed_call_opcode (xtensa_opcode opcode) { init_call_opcodes (); @@ -3853,7 +3853,7 @@ is_windowed_call_opcode (xtensa_opcode opcode) } -static bfd_boolean +static bool get_indirect_call_dest_reg (xtensa_opcode opcode, unsigned *pdst) { unsigned dst = (unsigned) -1; @@ -3869,22 +3869,22 @@ get_indirect_call_dest_reg (xtensa_opcode opcode, unsigned *pdst) dst = 12; if (dst == (unsigned) -1) - return FALSE; + return false; *pdst = dst; - return TRUE; + return true; } static xtensa_opcode get_const16_opcode (void) { - static bfd_boolean done_lookup = FALSE; + static bool done_lookup = false; static xtensa_opcode const16_opcode = XTENSA_UNDEFINED; if (!done_lookup) { const16_opcode = xtensa_opcode_lookup (xtensa_default_isa, "const16"); - done_lookup = TRUE; + done_lookup = true; } return const16_opcode; } @@ -3894,12 +3894,12 @@ static xtensa_opcode get_l32r_opcode (void) { static xtensa_opcode l32r_opcode = XTENSA_UNDEFINED; - static bfd_boolean done_lookup = FALSE; + static bool done_lookup = false; if (!done_lookup) { l32r_opcode = xtensa_opcode_lookup (xtensa_default_isa, "l32r"); - done_lookup = TRUE; + done_lookup = true; } return l32r_opcode; } @@ -3922,11 +3922,11 @@ static xtensa_opcode get_rsr_lend_opcode (void) { static xtensa_opcode rsr_lend_opcode = XTENSA_UNDEFINED; - static bfd_boolean done_lookup = FALSE; + static bool done_lookup = false; if (!done_lookup) { rsr_lend_opcode = xtensa_opcode_lookup (xtensa_default_isa, "rsr.lend"); - done_lookup = TRUE; + done_lookup = true; } return rsr_lend_opcode; } @@ -3935,11 +3935,11 @@ static xtensa_opcode get_wsr_lbeg_opcode (void) { static xtensa_opcode wsr_lbeg_opcode = XTENSA_UNDEFINED; - static bfd_boolean done_lookup = FALSE; + static bool done_lookup = false; if (!done_lookup) { wsr_lbeg_opcode = xtensa_opcode_lookup (xtensa_default_isa, "wsr.lbeg"); - done_lookup = TRUE; + done_lookup = true; } return wsr_lbeg_opcode; } @@ -4048,7 +4048,7 @@ get_relocation_opcode (bfd *abfd, } -bfd_boolean +bool is_l32r_relocation (bfd *abfd, asection *sec, bfd_byte *contents, @@ -4056,7 +4056,7 @@ is_l32r_relocation (bfd *abfd, { xtensa_opcode opcode; if (!is_operand_relocation (ELF32_R_TYPE (irel->r_info))) - return FALSE; + return false; opcode = get_relocation_opcode (abfd, sec, contents, irel); return (opcode == get_l32r_opcode ()); } @@ -4085,7 +4085,7 @@ get_asm_simplify_size (bfd_byte *contents, } -bfd_boolean +bool is_alt_relocation (int r_type) { return (r_type >= R_XTENSA_SLOT0_ALT @@ -4093,7 +4093,7 @@ is_alt_relocation (int r_type) } -bfd_boolean +bool is_operand_relocation (int r_type) { switch (r_type) @@ -4101,17 +4101,17 @@ is_operand_relocation (int r_type) case R_XTENSA_OP0: case R_XTENSA_OP1: case R_XTENSA_OP2: - return TRUE; + return true; default: if (r_type >= R_XTENSA_SLOT0_OP && r_type <= R_XTENSA_SLOT14_OP) - return TRUE; + return true; if (r_type >= R_XTENSA_SLOT0_ALT && r_type <= R_XTENSA_SLOT14_ALT) - return TRUE; + return true; break; } - return FALSE; + return false; } @@ -4208,7 +4208,7 @@ insn_decode_opcode (bfd_byte *contents, /* The offset is the offset in the contents. The address is the address of that offset. */ -static bfd_boolean +static bool check_branch_target_aligned (bfd_byte *contents, bfd_size_type content_length, bfd_vma offset, @@ -4216,12 +4216,12 @@ check_branch_target_aligned (bfd_byte *contents, { bfd_size_type insn_len = insn_decode_len (contents, content_length, offset); if (insn_len == 0) - return FALSE; + return false; return check_branch_target_aligned_address (address, insn_len); } -static bfd_boolean +static bool check_loop_aligned (bfd_byte *contents, bfd_size_type content_length, bfd_vma offset, @@ -4234,16 +4234,16 @@ check_loop_aligned (bfd_byte *contents, if (opcode == XTENSA_UNDEFINED || xtensa_opcode_is_loop (xtensa_default_isa, opcode) != 1) { - BFD_ASSERT (FALSE); - return FALSE; + BFD_ASSERT (false); + return false; } loop_len = insn_decode_len (contents, content_length, offset); insn_len = insn_decode_len (contents, content_length, offset + loop_len); if (loop_len == 0 || insn_len == 0) { - BFD_ASSERT (FALSE); - return FALSE; + BFD_ASSERT (false); + return false; } /* If this is relaxed loop, analyze first instruction of the actual loop @@ -4264,7 +4264,7 @@ check_loop_aligned (bfd_byte *contents, } -static bfd_boolean +static bool check_branch_target_aligned_address (bfd_vma addr, int len) { if (len == 8) @@ -4396,7 +4396,7 @@ can_narrow_instruction (xtensa_insnbuf slotbuf, for (opi = 0; opi < (sizeof (narrowable)/sizeof (struct string_pair)); opi++) { - bfd_boolean is_or = (strcmp ("or", narrowable[opi].wide) == 0); + bool is_or = (strcmp ("or", narrowable[opi].wide) == 0); if (opcode == xtensa_opcode_lookup (isa, narrowable[opi].wide)) { @@ -4479,7 +4479,7 @@ can_narrow_instruction (xtensa_insnbuf slotbuf, the action in-place directly into the contents and return TRUE. Otherwise, the return value is FALSE and the contents are not modified. */ -static bfd_boolean +static bool narrow_instruction (bfd_byte *contents, bfd_size_type content_length, bfd_size_type offset) @@ -4502,7 +4502,7 @@ narrow_instruction (bfd_byte *contents, BFD_ASSERT (offset < content_length); if (content_length < 2) - return FALSE; + return false; /* We will hand-code a few of these for a little while. These have all been specified in the assembler aleady. */ @@ -4510,27 +4510,27 @@ narrow_instruction (bfd_byte *contents, content_length - offset); fmt = xtensa_format_decode (isa, insnbuf); if (xtensa_format_num_slots (isa, fmt) != 1) - return FALSE; + return false; if (xtensa_format_get_slot (isa, fmt, 0, insnbuf, slotbuf) != 0) - return FALSE; + return false; opcode = xtensa_opcode_decode (isa, fmt, 0, slotbuf); if (opcode == XTENSA_UNDEFINED) - return FALSE; + return false; insn_len = xtensa_format_length (isa, fmt); if (insn_len > content_length) - return FALSE; + return false; o_insnbuf = can_narrow_instruction (slotbuf, fmt, opcode); if (o_insnbuf) { xtensa_insnbuf_to_chars (isa, o_insnbuf, contents + offset, content_length - offset); - return TRUE; + return true; } - return FALSE; + return false; } @@ -4560,9 +4560,9 @@ can_widen_instruction (xtensa_insnbuf slotbuf, for (opi = 0; opi < (sizeof (widenable)/sizeof (struct string_pair)); opi++) { - bfd_boolean is_or = (strcmp ("or", widenable[opi].wide) == 0); - bfd_boolean is_branch = (strcmp ("beqz", widenable[opi].wide) == 0 - || strcmp ("bnez", widenable[opi].wide) == 0); + bool is_or = (strcmp ("or", widenable[opi].wide) == 0); + bool is_branch = (strcmp ("beqz", widenable[opi].wide) == 0 + || strcmp ("bnez", widenable[opi].wide) == 0); if (opcode == xtensa_opcode_lookup (isa, widenable[opi].narrow)) { @@ -4648,7 +4648,7 @@ can_widen_instruction (xtensa_insnbuf slotbuf, the action in-place directly into the contents and return TRUE. Otherwise, the return value is FALSE and the contents are not modified. */ -static bfd_boolean +static bool widen_instruction (bfd_byte *contents, bfd_size_type content_length, bfd_size_type offset) @@ -4671,7 +4671,7 @@ widen_instruction (bfd_byte *contents, BFD_ASSERT (offset < content_length); if (content_length < 2) - return FALSE; + return false; /* We will hand-code a few of these for a little while. These have all been specified in the assembler aleady. */ @@ -4679,26 +4679,26 @@ widen_instruction (bfd_byte *contents, content_length - offset); fmt = xtensa_format_decode (isa, insnbuf); if (xtensa_format_num_slots (isa, fmt) != 1) - return FALSE; + return false; if (xtensa_format_get_slot (isa, fmt, 0, insnbuf, slotbuf) != 0) - return FALSE; + return false; opcode = xtensa_opcode_decode (isa, fmt, 0, slotbuf); if (opcode == XTENSA_UNDEFINED) - return FALSE; + return false; insn_len = xtensa_format_length (isa, fmt); if (insn_len > content_length) - return FALSE; + return false; o_insnbuf = can_widen_instruction (slotbuf, fmt, opcode); if (o_insnbuf) { xtensa_insnbuf_to_chars (isa, o_insnbuf, contents + offset, content_length - offset); - return TRUE; + return true; } - return FALSE; + return false; } @@ -4812,7 +4812,7 @@ swap_callx_for_call_opcode (xtensa_opcode opcode) #define CALLN_SOURCE_OPERAND 0 static xtensa_opcode -get_expanded_call_opcode (bfd_byte *buf, int bufsize, bfd_boolean *p_uses_l32r) +get_expanded_call_opcode (bfd_byte *buf, int bufsize, bool *p_uses_l32r) { static xtensa_insnbuf insnbuf = NULL; static xtensa_insnbuf slotbuf = NULL; @@ -4841,7 +4841,7 @@ get_expanded_call_opcode (bfd_byte *buf, int bufsize, bfd_boolean *p_uses_l32r) if (opcode == get_l32r_opcode ()) { if (p_uses_l32r) - *p_uses_l32r = TRUE; + *p_uses_l32r = true; if (xtensa_operand_get_field (isa, opcode, L32R_TARGET_REG_OPERAND, fmt, 0, slotbuf, ®no) || xtensa_operand_decode (isa, opcode, L32R_TARGET_REG_OPERAND, @@ -4851,7 +4851,7 @@ get_expanded_call_opcode (bfd_byte *buf, int bufsize, bfd_boolean *p_uses_l32r) else if (opcode == get_const16_opcode ()) { if (p_uses_l32r) - *p_uses_l32r = FALSE; + *p_uses_l32r = false; if (xtensa_operand_get_field (isa, opcode, CONST16_TARGET_REG_OPERAND, fmt, 0, slotbuf, ®no) || xtensa_operand_decode (isa, opcode, CONST16_TARGET_REG_OPERAND, @@ -4940,7 +4940,7 @@ struct r_reloc_struct struct to zero. The r_reloc_is_const function should be used to detect this case. */ -static bfd_boolean +static bool r_reloc_is_const (const r_reloc *r_rel) { return (r_rel->abfd == NULL); @@ -4976,19 +4976,19 @@ r_reloc_get_section (const r_reloc *r_rel) } -static bfd_boolean +static bool r_reloc_is_defined (const r_reloc *r_rel) { asection *sec; if (r_rel == NULL) - return FALSE; + return false; sec = r_reloc_get_section (r_rel); if (sec == bfd_abs_section_ptr || sec == bfd_com_section_ptr || sec == bfd_und_section_ptr) - return FALSE; - return TRUE; + return false; + return true; } @@ -5077,8 +5077,8 @@ struct source_reloc_struct r_reloc r_rel; xtensa_opcode opcode; int opnd; - bfd_boolean is_null; - bfd_boolean is_abs_literal; + bool is_null; + bool is_abs_literal; }; @@ -5088,13 +5088,13 @@ init_source_reloc (source_reloc *reloc, const r_reloc *r_rel, xtensa_opcode opcode, int opnd, - bfd_boolean is_abs_literal) + bool is_abs_literal) { reloc->source_sec = source_sec; reloc->r_rel = *r_rel; reloc->opcode = opcode; reloc->opnd = opnd; - reloc->is_null = FALSE; + reloc->is_null = false; reloc->is_abs_literal = is_abs_literal; } @@ -5167,7 +5167,7 @@ struct literal_value_struct { r_reloc r_rel; unsigned long value; - bfd_boolean is_abs_literal; + bool is_abs_literal; }; struct value_map_struct @@ -5182,7 +5182,7 @@ struct value_map_hash_table_struct unsigned bucket_count; value_map **buckets; unsigned count; - bfd_boolean has_last_loc; + bool has_last_loc; r_reloc last_loc; }; @@ -5191,7 +5191,7 @@ static void init_literal_value (literal_value *lit, const r_reloc *r_rel, unsigned long value, - bfd_boolean is_abs_literal) + bool is_abs_literal) { lit->r_rel = *r_rel; lit->value = value; @@ -5199,31 +5199,31 @@ init_literal_value (literal_value *lit, } -static bfd_boolean +static bool literal_value_equal (const literal_value *src1, const literal_value *src2, - bfd_boolean final_static_link) + bool final_static_link) { struct elf_link_hash_entry *h1, *h2; if (r_reloc_is_const (&src1->r_rel) != r_reloc_is_const (&src2->r_rel)) - return FALSE; + return false; if (r_reloc_is_const (&src1->r_rel)) return (src1->value == src2->value); if (ELF32_R_TYPE (src1->r_rel.rela.r_info) != ELF32_R_TYPE (src2->r_rel.rela.r_info)) - return FALSE; + return false; if (src1->r_rel.target_offset != src2->r_rel.target_offset) - return FALSE; + return false; if (src1->r_rel.virtual_offset != src2->r_rel.virtual_offset) - return FALSE; + return false; if (src1->value != src2->value) - return FALSE; + return false; /* Now check for the same section (if defined) or the same elf_hash (if undefined or weak). */ @@ -5236,19 +5236,19 @@ literal_value_equal (const literal_value *src1, { if (r_reloc_get_section (&src1->r_rel) != r_reloc_get_section (&src2->r_rel)) - return FALSE; + return false; } else { /* Require that the hash entries (i.e., symbols) be identical. */ if (h1 != h2 || h1 == 0) - return FALSE; + return false; } if (src1->is_abs_literal != src2->is_abs_literal) - return FALSE; + return false; - return TRUE; + return true; } @@ -5271,7 +5271,7 @@ value_map_hash_table_init (void) free (values); return NULL; } - values->has_last_loc = FALSE; + values->has_last_loc = false; return values; } @@ -5322,7 +5322,7 @@ literal_value_hash (const literal_value *src) static value_map * value_map_get_cached_value (value_map_hash_table *map, const literal_value *val, - bfd_boolean final_static_link) + bool final_static_link) { value_map *map_e; value_map *bucket; @@ -5347,7 +5347,7 @@ static value_map * add_value_map (value_map_hash_table *map, const literal_value *val, const r_reloc *loc, - bfd_boolean final_static_link) + bool final_static_link) { value_map **bucket_p; unsigned idx; @@ -5652,7 +5652,7 @@ static int removed_by_actions (text_action_list *action_list, text_action **p_start_action, bfd_vma offset, - bfd_boolean before_fill) + bool before_fill) { text_action *r; int removed = 0; @@ -5689,7 +5689,7 @@ offset_with_removed_text (text_action_list *action_list, bfd_vma offset) { text_action *r = action_first (action_list); - return offset - removed_by_actions (action_list, &r, offset, FALSE); + return offset - removed_by_actions (action_list, &r, offset, false); } @@ -5704,7 +5704,7 @@ struct map_action_fn_context_struct { int removed; removal_by_action_map map; - bfd_boolean eq_complete; + bool eq_complete; }; static int @@ -5721,7 +5721,7 @@ map_action_fn (splay_tree_node node, void *p) else { ++ctx->map.n_entries; - ctx->eq_complete = FALSE; + ctx->eq_complete = false; ientry->offset = r->offset; ientry->eq_removed_before_fill = ctx->removed; } @@ -5731,7 +5731,7 @@ map_action_fn (splay_tree_node node, void *p) if (r->action != ta_fill || r->removed_bytes >= 0) { ientry->eq_removed = ctx->removed; - ctx->eq_complete = TRUE; + ctx->eq_complete = true; } else ientry->eq_removed = ctx->removed + r->removed_bytes; @@ -5751,7 +5751,7 @@ map_removal_by_action (text_action_list *action_list) ctx.map.n_entries = 0; ctx.map.entry = bfd_malloc (action_list_count (action_list) * sizeof (removal_by_action_entry)); - ctx.eq_complete = FALSE; + ctx.eq_complete = false; splay_tree_foreach (action_list->tree, map_action_fn, &ctx); action_list->map = ctx.map; @@ -5759,7 +5759,7 @@ map_removal_by_action (text_action_list *action_list) static int removed_by_actions_map (text_action_list *action_list, bfd_vma offset, - bfd_boolean before_fill) + bool before_fill) { unsigned a, b; @@ -5801,7 +5801,7 @@ removed_by_actions_map (text_action_list *action_list, bfd_vma offset, static bfd_vma offset_with_removed_text_map (text_action_list *action_list, bfd_vma offset) { - int removed = removed_by_actions_map (action_list, offset, FALSE); + int removed = removed_by_actions_map (action_list, offset, false); return offset - removed; } @@ -6059,8 +6059,8 @@ typedef struct reloc_bfd_fix_struct reloc_bfd_fix; struct xtensa_relax_info_struct { - bfd_boolean is_relaxable_literal_section; - bfd_boolean is_relaxable_asm_section; + bool is_relaxable_literal_section; + bool is_relaxable_asm_section; int visited; /* Number of times visited. */ source_reloc *src_relocs; /* Array[src_count]. */ @@ -6091,7 +6091,7 @@ struct elf_xtensa_section_data }; -static bfd_boolean +static bool elf_xtensa_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -6101,7 +6101,7 @@ elf_xtensa_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -6128,8 +6128,8 @@ init_xtensa_relax_info (asection *sec) { xtensa_relax_info *relax_info = get_xtensa_relax_info (sec); - relax_info->is_relaxable_literal_section = FALSE; - relax_info->is_relaxable_asm_section = FALSE; + relax_info->is_relaxable_literal_section = false; + relax_info->is_relaxable_asm_section = false; relax_info->visited = 0; relax_info->src_relocs = NULL; @@ -6171,7 +6171,7 @@ struct reloc_bfd_fix_struct asection *target_sec; bfd_vma target_offset; - bfd_boolean translated; + bool translated; reloc_bfd_fix *next; }; @@ -6183,7 +6183,7 @@ reloc_bfd_fix_init (asection *src_sec, unsigned src_type, asection *target_sec, bfd_vma target_offset, - bfd_boolean translated) + bool translated) { reloc_bfd_fix *fix; @@ -6314,7 +6314,7 @@ free_section_cache (section_cache_t *sec_cache) } -static bfd_boolean +static bool section_cache_section (section_cache_t *sec_cache, asection *sec, struct bfd_link_info *link_info) @@ -6327,9 +6327,9 @@ section_cache_section (section_cache_t *sec_cache, bfd_size_type sec_size; if (sec == NULL) - return FALSE; + return false; if (sec == sec_cache->sec) - return TRUE; + return true; abfd = sec->owner; sec_size = bfd_get_section_limit (abfd, sec); @@ -6345,7 +6345,7 @@ section_cache_section (section_cache_t *sec_cache, /* Get the entry table. */ ptblsize = xtensa_read_table_entries (abfd, sec, &prop_table, - XTENSA_PROP_SEC_NAME, FALSE); + XTENSA_PROP_SEC_NAME, false); if (ptblsize < 0) goto err; @@ -6361,13 +6361,13 @@ section_cache_section (section_cache_t *sec_cache, sec_cache->pte_count = ptblsize; sec_cache->ptbl = prop_table; - return TRUE; + return true; err: release_contents (sec, contents); release_internal_relocs (sec, internal_relocs); free (prop_table); - return FALSE; + return false; } @@ -6405,7 +6405,7 @@ struct ebb_struct unsigned end_ptbl_idx; unsigned end_reloc_idx; - bfd_boolean ends_section; /* Is this the last ebb in a section? */ + bool ends_section; /* Is this the last ebb in a section? */ /* The unreachable property table at the end of this set of blocks; NULL if the end is not an unreachable block. */ @@ -6440,7 +6440,7 @@ struct proposed_action_struct text_action_t action; bfd_vma offset; int removed_bytes; - bfd_boolean do_action; /* If false, then we will not perform the action. */ + bool do_action; /* If false, then we will not perform the action. */ }; @@ -6452,14 +6452,14 @@ typedef struct ebb_constraint_struct ebb_constraint; struct ebb_constraint_struct { ebb_t ebb; - bfd_boolean start_movable; + bool start_movable; /* Bytes of extra space at the beginning if movable. */ int start_extra_space; enum ebb_target_enum start_align; - bfd_boolean end_movable; + bool end_movable; /* Bytes of extra space at the end if movable. */ int end_extra_space; @@ -6522,23 +6522,23 @@ init_ebb (ebb_t *ebb, a block that cannot be transformed. Then we push it backwards searching for similar conditions. */ -static bfd_boolean extend_ebb_bounds_forward (ebb_t *); -static bfd_boolean extend_ebb_bounds_backward (ebb_t *); +static bool extend_ebb_bounds_forward (ebb_t *); +static bool extend_ebb_bounds_backward (ebb_t *); static bfd_size_type insn_block_decodable_len (bfd_byte *, bfd_size_type, bfd_vma, bfd_size_type); -static bfd_boolean +static bool extend_ebb_bounds (ebb_t *ebb) { if (!extend_ebb_bounds_forward (ebb)) - return FALSE; + return false; if (!extend_ebb_bounds_backward (ebb)) - return FALSE; - return TRUE; + return false; + return true; } -static bfd_boolean +static bool extend_ebb_bounds_forward (ebb_t *ebb) { property_table_entry *the_entry, *new_entry; @@ -6567,12 +6567,12 @@ extend_ebb_bounds_forward (ebb_t *ebb) "possible configuration mismatch"), ebb->sec->owner, ebb->sec, (uint64_t) (ebb->end_offset + insn_block_len)); - return FALSE; + return false; } ebb->end_offset += insn_block_len; if (ebb->end_offset == ebb->sec->size) - ebb->ends_section = TRUE; + ebb->ends_section = true; /* Update the reloc counter. */ while (ebb->end_reloc_idx + 1 < ebb->reloc_count @@ -6583,7 +6583,7 @@ extend_ebb_bounds_forward (ebb_t *ebb) } if (ebb->end_ptbl_idx + 1 == ebb->pte_count) - return TRUE; + return true; new_entry = &ebb->ptbl[ebb->end_ptbl_idx + 1]; if (((new_entry->flags & XTENSA_PROP_INSN) == 0) @@ -6602,7 +6602,7 @@ extend_ebb_bounds_forward (ebb_t *ebb) if (ebb->end_ptbl_idx + 1 == ebb->pte_count) { if (ebb->end_offset == ebb->content_length) - ebb->ends_section = TRUE; + ebb->ends_section = true; } else { @@ -6613,11 +6613,11 @@ extend_ebb_bounds_forward (ebb_t *ebb) } /* Any other ending requires exact alignment. */ - return TRUE; + return true; } -static bfd_boolean +static bool extend_ebb_bounds_backward (ebb_t *ebb) { property_table_entry *the_entry, *new_entry; @@ -6646,7 +6646,7 @@ extend_ebb_bounds_backward (ebb_t *ebb) "possible configuration mismatch"), ebb->sec->owner, ebb->sec, (uint64_t) (ebb->end_offset + insn_block_len)); - return FALSE; + return false; } ebb->start_offset -= insn_block_len; @@ -6659,20 +6659,20 @@ extend_ebb_bounds_backward (ebb_t *ebb) } if (ebb->start_ptbl_idx == 0) - return TRUE; + return true; new_entry = &ebb->ptbl[ebb->start_ptbl_idx - 1]; if ((new_entry->flags & XTENSA_PROP_INSN) == 0 || ((new_entry->flags & XTENSA_PROP_NO_TRANSFORM) != 0) || ((new_entry->flags & XTENSA_PROP_ALIGN) != 0)) - return TRUE; + return true; if (new_entry->address + new_entry->size != the_entry->address) - return TRUE; + return true; the_entry = new_entry; ebb->start_ptbl_idx--; } - return TRUE; + return true; } @@ -6704,7 +6704,7 @@ ebb_propose_action (ebb_constraint *c, text_action_t action, bfd_vma offset, int removed_bytes, - bfd_boolean do_action) + bool do_action) { proposed_action *act; @@ -6746,7 +6746,7 @@ ebb_propose_action (ebb_constraint *c, standard BFD functions to take care of this for us. */ static Elf_Internal_Rela * -retrieve_internal_relocs (bfd *abfd, asection *sec, bfd_boolean keep_memory) +retrieve_internal_relocs (bfd *abfd, asection *sec, bool keep_memory) { Elf_Internal_Rela *internal_relocs; @@ -6777,7 +6777,7 @@ release_internal_relocs (asection *sec, Elf_Internal_Rela *internal_relocs) static bfd_byte * -retrieve_contents (bfd *abfd, asection *sec, bfd_boolean keep_memory) +retrieve_contents (bfd *abfd, asection *sec, bool keep_memory) { bfd_byte *contents; bfd_size_type sec_size; @@ -6840,77 +6840,77 @@ retrieve_local_syms (bfd *input_bfd) /* Code for link-time relaxation. */ /* Initialization for relaxation: */ -static bfd_boolean analyze_relocations (struct bfd_link_info *); -static bfd_boolean find_relaxable_sections - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *); -static bfd_boolean collect_source_relocs +static bool analyze_relocations (struct bfd_link_info *); +static bool find_relaxable_sections + (bfd *, asection *, struct bfd_link_info *, bool *); +static bool collect_source_relocs (bfd *, asection *, struct bfd_link_info *); -static bfd_boolean is_resolvable_asm_expansion +static bool is_resolvable_asm_expansion (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, struct bfd_link_info *, - bfd_boolean *); + bool *); static Elf_Internal_Rela *find_associated_l32r_irel (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Rela *); -static bfd_boolean compute_text_actions +static bool compute_text_actions (bfd *, asection *, struct bfd_link_info *); -static bfd_boolean compute_ebb_proposed_actions (ebb_constraint *); -static bfd_boolean compute_ebb_actions (ebb_constraint *); +static bool compute_ebb_proposed_actions (ebb_constraint *); +static bool compute_ebb_actions (ebb_constraint *); typedef struct reloc_range_list_struct reloc_range_list; -static bfd_boolean check_section_ebb_pcrels_fit +static bool check_section_ebb_pcrels_fit (bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, reloc_range_list *, const ebb_constraint *, const xtensa_opcode *); -static bfd_boolean check_section_ebb_reduces (const ebb_constraint *); +static bool check_section_ebb_reduces (const ebb_constraint *); static void text_action_add_proposed (text_action_list *, const ebb_constraint *, asection *); /* First pass: */ -static bfd_boolean compute_removed_literals +static bool compute_removed_literals (bfd *, asection *, struct bfd_link_info *, value_map_hash_table *); static Elf_Internal_Rela *get_irel_at_offset (asection *, Elf_Internal_Rela *, bfd_vma); -static bfd_boolean is_removable_literal +static bool is_removable_literal (const source_reloc *, int, const source_reloc *, int, asection *, property_table_entry *, int); -static bfd_boolean remove_dead_literal +static bool remove_dead_literal (bfd *, asection *, struct bfd_link_info *, Elf_Internal_Rela *, Elf_Internal_Rela *, source_reloc *, property_table_entry *, int); -static bfd_boolean identify_literal_placement +static bool identify_literal_placement (bfd *, asection *, bfd_byte *, struct bfd_link_info *, - value_map_hash_table *, bfd_boolean *, Elf_Internal_Rela *, int, + value_map_hash_table *, bool *, Elf_Internal_Rela *, int, source_reloc *, property_table_entry *, int, section_cache_t *, - bfd_boolean); -static bfd_boolean relocations_reach (source_reloc *, int, const r_reloc *); -static bfd_boolean coalesce_shared_literal + bool); +static bool relocations_reach (source_reloc *, int, const r_reloc *); +static bool coalesce_shared_literal (asection *, source_reloc *, property_table_entry *, int, value_map *); -static bfd_boolean move_shared_literal +static bool move_shared_literal (asection *, struct bfd_link_info *, source_reloc *, property_table_entry *, int, const r_reloc *, const literal_value *, section_cache_t *); /* Second pass: */ -static bfd_boolean relax_section (bfd *, asection *, struct bfd_link_info *); -static bfd_boolean translate_section_fixes (asection *); -static bfd_boolean translate_reloc_bfd_fix (reloc_bfd_fix *); +static bool relax_section (bfd *, asection *, struct bfd_link_info *); +static bool translate_section_fixes (asection *); +static bool translate_reloc_bfd_fix (reloc_bfd_fix *); static asection *translate_reloc (const r_reloc *, r_reloc *, asection *); static void shrink_dynamic_reloc_sections (struct bfd_link_info *, bfd *, asection *, Elf_Internal_Rela *); -static bfd_boolean move_literal +static bool move_literal (bfd *, struct bfd_link_info *, asection *, bfd_vma, bfd_byte *, xtensa_relax_info *, Elf_Internal_Rela **, const literal_value *); -static bfd_boolean relax_property_section +static bool relax_property_section (bfd *, asection *, struct bfd_link_info *); /* Third pass: */ -static bfd_boolean relax_section_symbols (bfd *, asection *); +static bool relax_section_symbols (bfd *, asection *); -static bfd_boolean +static bool elf_xtensa_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { static value_map_hash_table *values = NULL; - static bfd_boolean relocations_analyzed = FALSE; + static bool relocations_analyzed = false; xtensa_relax_info *relax_info; if (!relocations_analyzed) @@ -6918,17 +6918,17 @@ elf_xtensa_relax_section (bfd *abfd, /* Do some overall initialization for relaxation. */ values = value_map_hash_table_init (); if (values == NULL) - return FALSE; - relaxing_section = TRUE; + return false; + relaxing_section = true; if (!analyze_relocations (link_info)) - return FALSE; - relocations_analyzed = TRUE; + return false; + relocations_analyzed = true; } - *again = FALSE; + *again = false; /* Don't mess with linker-created sections. */ if ((sec->flags & SEC_LINKER_CREATED) != 0) - return TRUE; + return true; relax_info = get_xtensa_relax_info (sec); BFD_ASSERT (relax_info != NULL); @@ -6940,8 +6940,8 @@ elf_xtensa_relax_section (bfd *abfd, analyze_relocations, but it is important for this step that the sections be examined in link order. */ if (!compute_removed_literals (abfd, sec, link_info, values)) - return FALSE; - *again = TRUE; + return false; + *again = true; break; case 1: @@ -6949,18 +6949,18 @@ elf_xtensa_relax_section (bfd *abfd, value_map_hash_table_delete (values); values = NULL; if (!relax_section (abfd, sec, link_info)) - return FALSE; - *again = TRUE; + return false; + *again = true; break; case 2: if (!relax_section_symbols (abfd, sec)) - return FALSE; + return false; break; } relax_info->visited++; - return TRUE; + return true; } @@ -6978,12 +6978,12 @@ elf_xtensa_relax_section (bfd *abfd, the L32R associated with the longcall while optionally preserving branch target alignments. */ -static bfd_boolean +static bool analyze_relocations (struct bfd_link_info *link_info) { bfd *abfd; asection *sec; - bfd_boolean is_relaxable = FALSE; + bool is_relaxable = false; /* Initialize the per-section relaxation info. */ for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link.next) @@ -6997,12 +6997,12 @@ analyze_relocations (struct bfd_link_info *link_info) for (sec = abfd->sections; sec != NULL; sec = sec->next) { if (!find_relaxable_sections (abfd, sec, link_info, &is_relaxable)) - return FALSE; + return false; } /* Bail out if there are no relaxable sections. */ if (!is_relaxable) - return TRUE; + return true; /* Allocate space for source_relocs. */ for (abfd = link_info->input_bfds; abfd != NULL; abfd = abfd->link.next) @@ -7026,7 +7026,7 @@ analyze_relocations (struct bfd_link_info *link_info) for (sec = abfd->sections; sec != NULL; sec = sec->next) { if (!collect_source_relocs (abfd, sec, link_info)) - return FALSE; + return false; } /* Compute the text actions. */ @@ -7034,10 +7034,10 @@ analyze_relocations (struct bfd_link_info *link_info) for (sec = abfd->sections; sec != NULL; sec = sec->next) { if (!compute_text_actions (abfd, sec, link_info)) - return FALSE; + return false; } - return TRUE; + return true; } @@ -7051,18 +7051,18 @@ analyze_relocations (struct bfd_link_info *link_info) know how much space to allocate for source_relocs against each relaxable literal section. */ -static bfd_boolean +static bool find_relaxable_sections (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *is_relaxable_p) + bool *is_relaxable_p) { Elf_Internal_Rela *internal_relocs; bfd_byte *contents; - bfd_boolean ok = TRUE; + bool ok = true; unsigned i; xtensa_relax_info *source_relax_info; - bfd_boolean is_l32r_reloc; + bool is_l32r_reloc; internal_relocs = retrieve_internal_relocs (abfd, sec, link_info->keep_memory); @@ -7072,7 +7072,7 @@ find_relaxable_sections (bfd *abfd, contents = retrieve_contents (abfd, sec, link_info->keep_memory); if (contents == NULL && sec->size != 0) { - ok = FALSE; + ok = false; goto error_return; } @@ -7092,13 +7092,13 @@ find_relaxable_sections (bfd *abfd, && !source_relax_info->is_relaxable_asm_section && ELF32_R_TYPE (irel->r_info) == R_XTENSA_ASM_EXPAND) { - bfd_boolean is_reachable = FALSE; + bool is_reachable = false; if (is_resolvable_asm_expansion (abfd, sec, contents, irel, link_info, &is_reachable) && is_reachable) { - source_relax_info->is_relaxable_asm_section = TRUE; - *is_relaxable_p = TRUE; + source_relax_info->is_relaxable_asm_section = true; + *is_relaxable_p = true; } } @@ -7113,7 +7113,7 @@ find_relaxable_sections (bfd *abfd, /* Count PC-relative operand relocations against the target section. Note: The conditions tested here must match the conditions under which init_source_reloc is called in collect_source_relocs(). */ - is_l32r_reloc = FALSE; + is_l32r_reloc = false; if (is_operand_relocation (ELF32_R_TYPE (irel->r_info))) { xtensa_opcode opcode = @@ -7130,8 +7130,8 @@ find_relaxable_sections (bfd *abfd, if (is_l32r_reloc && r_reloc_is_defined (&r_rel)) { /* Mark the target section as relaxable. */ - target_relax_info->is_relaxable_literal_section = TRUE; - *is_relaxable_p = TRUE; + target_relax_info->is_relaxable_literal_section = true; + *is_relaxable_p = true; } } @@ -7146,14 +7146,14 @@ find_relaxable_sections (bfd *abfd, get rid of ASM_EXPAND relocs by either converting them to ASM_SIMPLIFY or by removing them. */ -static bfd_boolean +static bool collect_source_relocs (bfd *abfd, asection *sec, struct bfd_link_info *link_info) { Elf_Internal_Rela *internal_relocs; bfd_byte *contents; - bfd_boolean ok = TRUE; + bool ok = true; unsigned i; bfd_size_type sec_size; @@ -7166,7 +7166,7 @@ collect_source_relocs (bfd *abfd, contents = retrieve_contents (abfd, sec, link_info->keep_memory); if (contents == NULL && sec_size != 0) { - ok = FALSE; + ok = false; goto error_return; } @@ -7189,7 +7189,7 @@ collect_source_relocs (bfd *abfd, { xtensa_opcode opcode = XTENSA_UNDEFINED; int opnd = -1; - bfd_boolean is_abs_literal = FALSE; + bool is_abs_literal = false; if (is_alt_relocation (ELF32_R_TYPE (irel->r_info))) { @@ -7200,7 +7200,7 @@ collect_source_relocs (bfd *abfd, opcode = get_relocation_opcode (abfd, sec, contents, irel); if (opcode == get_l32r_opcode ()) { - is_abs_literal = TRUE; + is_abs_literal = true; opnd = 1; } else @@ -7232,7 +7232,7 @@ collect_source_relocs (bfd *abfd, for (i = 0; i < sec->reloc_count; i++) { Elf_Internal_Rela *irel = &internal_relocs[i]; - bfd_boolean is_reachable; + bool is_reachable; if (!is_resolvable_asm_expansion (abfd, sec, contents, irel, link_info, &is_reachable)) @@ -7272,7 +7272,7 @@ collect_source_relocs (bfd *abfd, target_relax_info->src_next, sec, l32r_irel); BFD_ASSERT (s_reloc); - s_reloc->is_null = TRUE; + s_reloc->is_null = true; } /* Convert this reloc to ASM_SIMPLIFY. */ @@ -7305,13 +7305,13 @@ collect_source_relocs (bfd *abfd, the call is within the range of a direct call, given the current VMA for this section and the target section. */ -bfd_boolean +bool is_resolvable_asm_expansion (bfd *abfd, asection *sec, bfd_byte *contents, Elf_Internal_Rela *irel, struct bfd_link_info *link_info, - bfd_boolean *is_reachable_p) + bool *is_reachable_p) { asection *target_sec; asection *s; @@ -7324,32 +7324,32 @@ is_resolvable_asm_expansion (bfd *abfd, xtensa_opcode opcode, direct_call_opcode; bfd_vma self_address; bfd_vma dest_address; - bfd_boolean uses_l32r; + bool uses_l32r; bfd_size_type sec_size; - *is_reachable_p = FALSE; + *is_reachable_p = false; if (contents == NULL) - return FALSE; + return false; if (ELF32_R_TYPE (irel->r_info) != R_XTENSA_ASM_EXPAND) - return FALSE; + return false; sec_size = bfd_get_section_limit (abfd, sec); opcode = get_expanded_call_opcode (contents + irel->r_offset, sec_size - irel->r_offset, &uses_l32r); /* Optimization of longcalls that use CONST16 is not yet implemented. */ if (!uses_l32r) - return FALSE; + return false; direct_call_opcode = swap_callx_for_call_opcode (opcode); if (direct_call_opcode == XTENSA_UNDEFINED) - return FALSE; + return false; /* Check and see that the target resolves. */ r_reloc_init (&r_rel, abfd, irel, contents, sec_size); if (!r_reloc_is_defined (&r_rel)) - return FALSE; + return false; target_sec = r_reloc_get_section (&r_rel); target_offset = r_rel.target_offset; @@ -7359,7 +7359,7 @@ is_resolvable_asm_expansion (bfd *abfd, non-PIC calls on systems that use shared libraries, but the linker shouldn't crash regardless. */ if (!target_sec->output_section) - return FALSE; + return false; /* For relocatable sections, we can only simplify when the output section of the target is the same as the output section of the @@ -7367,7 +7367,7 @@ is_resolvable_asm_expansion (bfd *abfd, if (bfd_link_relocatable (link_info) && (target_sec->output_section != sec->output_section || is_reloc_sym_weak (abfd, irel))) - return FALSE; + return false; if (target_sec->output_section != sec->output_section) { @@ -7462,9 +7462,9 @@ is_resolvable_asm_expansion (bfd *abfd, if ((self_address >> CALL_SEGMENT_BITS) != (dest_address >> CALL_SEGMENT_BITS)) - return FALSE; + return false; - return TRUE; + return true; } @@ -7513,7 +7513,7 @@ build_reloc_opcodes (bfd *abfd, struct reloc_range_struct { bfd_vma addr; - bfd_boolean add; /* TRUE if start of a range, FALSE otherwise. */ + bool add; /* TRUE if start of a range, FALSE otherwise. */ /* Original irel index in the array of relocations for a section. */ unsigned irel_index; }; @@ -7532,7 +7532,7 @@ struct reloc_range_list_entry_struct struct reloc_range_list_struct { /* The rest of the structure is only meaningful when ok is TRUE. */ - bfd_boolean ok; + bool ok; unsigned n_range; /* Number of range markers. */ reloc_range *range; /* Sorted range markers. */ @@ -7573,7 +7573,7 @@ build_reloc_ranges (bfd *abfd, asection *sec, bfd_malloc (sec->reloc_count * sizeof (*reloc)); memset (list, 0, sizeof (*list)); - list->ok = TRUE; + list->ok = true; for (i = 0; i < sec->reloc_count; i++) { @@ -7631,14 +7631,14 @@ build_reloc_ranges (bfd *abfd, asection *sec, if (opcode == XTENSA_UNDEFINED) { - list->ok = FALSE; + list->ok = false; break; } opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); if (opnum == XTENSA_UNDEFINED) { - list->ok = FALSE; + list->ok = false; break; } @@ -7737,7 +7737,7 @@ static void free_reloc_range_list (reloc_range_list *list) The actual changes are performed by relax_section() in the second pass. */ -bfd_boolean +bool compute_text_actions (bfd *abfd, asection *sec, struct bfd_link_info *link_info) @@ -7746,7 +7746,7 @@ compute_text_actions (bfd *abfd, xtensa_relax_info *relax_info; bfd_byte *contents; Elf_Internal_Rela *internal_relocs; - bfd_boolean ok = TRUE; + bool ok = true; unsigned i; property_table_entry *prop_table = 0; int ptblsize = 0; @@ -7772,15 +7772,15 @@ compute_text_actions (bfd *abfd, contents = retrieve_contents (abfd, sec, link_info->keep_memory); if (contents == NULL && sec_size != 0) { - ok = FALSE; + ok = false; goto error_return; } ptblsize = xtensa_read_table_entries (abfd, sec, &prop_table, - XTENSA_PROP_SEC_NAME, FALSE); + XTENSA_PROP_SEC_NAME, false); if (ptblsize < 0) { - ok = FALSE; + ok = false; goto error_return; } @@ -7904,7 +7904,7 @@ compute_text_actions (bfd *abfd, /* Do not widen an instruction if it is preceeded by a loop opcode. It might cause misalignment. */ -static bfd_boolean +static bool prev_instr_is_a_loop (bfd_byte *contents, bfd_size_type content_length, bfd_size_type offset) @@ -7912,7 +7912,7 @@ prev_instr_is_a_loop (bfd_byte *contents, xtensa_opcode prev_opcode; if (offset < 3) - return FALSE; + return false; prev_opcode = insn_decode_opcode (contents, content_length, offset-3, 0); return (xtensa_opcode_is_loop (xtensa_default_isa, prev_opcode) == 1); } @@ -7920,7 +7920,7 @@ prev_instr_is_a_loop (bfd_byte *contents, /* Find all of the possible actions for an extended basic block. */ -bfd_boolean +bool compute_ebb_proposed_actions (ebb_constraint *ebb_table) { const ebb_t *ebb = &ebb_table->ebb; @@ -7961,7 +7961,7 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) enum ebb_target_enum align_type = EBB_DESIRE_TGT_ALIGN; BFD_ASSERT (offset != end_offset); if (offset == end_offset) - return FALSE; + return false; insn_len = insn_decode_len (ebb->contents, ebb->content_length, offset); @@ -7972,7 +7972,7 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) align_type = EBB_REQUIRE_TGT_ALIGN; ebb_propose_action (ebb_table, align_type, 0, - ta_none, offset, 0, TRUE); + ta_none, offset, 0, true); } while (offset != end_offset) @@ -8001,7 +8001,7 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) goto decode_error; ebb_propose_action (ebb_table, EBB_NO_ALIGN, 0, - ta_convert_longcall, offset, 0, TRUE); + ta_convert_longcall, offset, 0, true); offset += simplify_size; continue; @@ -8035,7 +8035,7 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) { /* Add an instruction narrow action. */ ebb_propose_action (ebb_table, EBB_NO_ALIGN, 0, - ta_narrow_insn, offset, 0, FALSE); + ta_narrow_insn, offset, 0, false); } else if ((entry->flags & XTENSA_PROP_NO_TRANSFORM) == 0 && can_widen_instruction (slotbuf, fmt, opcode) != 0 @@ -8044,13 +8044,13 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) { /* Add an instruction widen action. */ ebb_propose_action (ebb_table, EBB_NO_ALIGN, 0, - ta_widen_insn, offset, 0, FALSE); + ta_widen_insn, offset, 0, false); } else if (xtensa_opcode_is_loop (xtensa_default_isa, opcode) == 1) { /* Check for branch targets. */ ebb_propose_action (ebb_table, EBB_REQUIRE_LOOP_ALIGN, 0, - ta_none, offset, 0, TRUE); + ta_none, offset, 0, true); } offset += insn_len; @@ -8060,10 +8060,10 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) if (ebb->ends_unreachable) { ebb_propose_action (ebb_table, EBB_NO_ALIGN, 0, - ta_fill, ebb->end_offset, 0, TRUE); + ta_fill, ebb->end_offset, 0, true); } - return TRUE; + return true; decode_error: _bfd_error_handler @@ -8071,7 +8071,7 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) (_("%pB(%pA+%#" PRIx64 "): could not decode instruction; " "possible configuration mismatch"), ebb->sec->owner, ebb->sec, (uint64_t) offset); - return FALSE; + return false; } @@ -8092,7 +8092,7 @@ compute_ebb_proposed_actions (ebb_constraint *ebb_table) narrow all wide instructions, and remove all no-ops unless the end of the EBB prevents it. */ -bfd_boolean +bool compute_ebb_actions (ebb_constraint *ebb_table) { unsigned i = 0; @@ -8111,7 +8111,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) If so, use it. */ for (seg_idx_end = 0; seg_idx_end < ebb_table->action_count; seg_idx_end++) { - bfd_boolean requires_text_end_align = FALSE; + bool requires_text_end_align = false; unsigned longcall_count = 0; unsigned longcall_convert_count = 0; unsigned narrowable_count = 0; @@ -8144,7 +8144,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) seg_idx_end = i; if (seg_idx_end == ebb_table->action_count && !ebb->ends_unreachable) - requires_text_end_align = TRUE; + requires_text_end_align = true; if (elf32xtensa_size_opt && !requires_text_end_align && action->align_type != EBB_REQUIRE_LOOP_ALIGN @@ -8196,7 +8196,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) if (longcall_convert_count != 0) { action->action = ta_remove_longcall; - action->do_action = TRUE; + action->do_action = true; action->removed_bytes += 3; longcall_convert_count--; } @@ -8204,7 +8204,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) case ta_narrow_insn: if (narrowable_convert_count != 0) { - action->do_action = TRUE; + action->do_action = true; action->removed_bytes += 1; narrowable_convert_count--; } @@ -8212,7 +8212,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) case ta_widen_insn: if (widenable_convert_count != 0) { - action->do_action = TRUE; + action->do_action = true; action->removed_bytes -= 1; widenable_convert_count--; } @@ -8236,7 +8236,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) if (action->do_action && action->action == ta_convert_longcall) { - bfd_boolean bad_alignment = FALSE; + bool bad_alignment = false; removed_bytes += 3; for (j = i + 1; j < ebb_table->action_count; j++) { @@ -8249,7 +8249,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) ebb_table->ebb.content_length, offset, offset - removed_bytes)) { - bad_alignment = TRUE; + bad_alignment = true; break; } } @@ -8260,7 +8260,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) offset, offset - removed_bytes)) { - bad_alignment = TRUE; + bad_alignment = true; break; } } @@ -8269,9 +8269,9 @@ compute_ebb_actions (ebb_constraint *ebb_table) && ebb_table->ebb.sec->alignment_power == 2) { /* Narrow an instruction and we are done. */ - new_action->do_action = TRUE; + new_action->do_action = true; new_action->removed_bytes += 1; - bad_alignment = FALSE; + bad_alignment = false; break; } if (new_action->action == ta_widen_insn @@ -8279,9 +8279,9 @@ compute_ebb_actions (ebb_constraint *ebb_table) && ebb_table->ebb.sec->alignment_power == 2) { /* Narrow an instruction and we are done. */ - new_action->do_action = FALSE; + new_action->do_action = false; new_action->removed_bytes += 1; - bad_alignment = FALSE; + bad_alignment = false; break; } if (new_action->do_action) @@ -8291,7 +8291,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) { action->removed_bytes += 3; action->action = ta_remove_longcall; - action->do_action = TRUE; + action->do_action = true; } } removed_bytes = old_removed_bytes; @@ -8326,7 +8326,7 @@ compute_ebb_actions (ebb_constraint *ebb_table) action->removed_bytes = extra_space - br; } - return TRUE; + return true; } @@ -8507,7 +8507,7 @@ free_xlate_map (xlate_map_t *map) relocations in a section will fit if a proposed set of actions are performed. */ -static bfd_boolean +static bool check_section_ebb_pcrels_fit (bfd *abfd, asection *sec, bfd_byte *contents, @@ -8520,7 +8520,7 @@ check_section_ebb_pcrels_fit (bfd *abfd, unsigned n = sec->reloc_count; Elf_Internal_Rela *irel; xlate_map_t *xmap = NULL; - bfd_boolean ok = TRUE; + bool ok = true; xtensa_relax_info *relax_info; reloc_range_list_entry *entry = NULL; @@ -8537,7 +8537,7 @@ check_section_ebb_pcrels_fit (bfd *abfd, { if (!relevant_relocs->ok) { - ok = FALSE; + ok = false; n = 0; } else @@ -8663,21 +8663,21 @@ check_section_ebb_pcrels_fit (bfd *abfd, opcode = get_relocation_opcode (abfd, sec, contents, irel); if (opcode == XTENSA_UNDEFINED) { - ok = FALSE; + ok = false; break; } opnum = get_relocation_opnd (opcode, ELF32_R_TYPE (irel->r_info)); if (opnum == XTENSA_UNDEFINED) { - ok = FALSE; + ok = false; break; } } if (!pcrel_reloc_fits (opcode, opnum, self_offset, target_offset)) { - ok = FALSE; + ok = false; break; } } @@ -8689,7 +8689,7 @@ check_section_ebb_pcrels_fit (bfd *abfd, } -static bfd_boolean +static bool check_section_ebb_reduces (const ebb_constraint *constraint) { int removed = 0; @@ -8702,9 +8702,9 @@ check_section_ebb_reduces (const ebb_constraint *constraint) removed += action->removed_bytes; } if (removed < 0) - return FALSE; + return false; - return TRUE; + return true; } @@ -8777,7 +8777,7 @@ xtensa_compute_fill_extra_space (property_table_entry *entry) add an entry to the per-section list of removed literals. The actual changes are deferred until the next pass. */ -static bfd_boolean +static bool compute_removed_literals (bfd *abfd, asection *sec, struct bfd_link_info *link_info, @@ -8787,11 +8787,11 @@ compute_removed_literals (bfd *abfd, bfd_byte *contents; Elf_Internal_Rela *internal_relocs; source_reloc *src_relocs, *rel; - bfd_boolean ok = TRUE; + bool ok = true; property_table_entry *prop_table = NULL; int ptblsize; int i, prev_i; - bfd_boolean last_loc_is_prev = FALSE; + bool last_loc_is_prev = false; bfd_vma last_target_offset = 0; section_cache_t target_sec_cache; bfd_size_type sec_size; @@ -8811,7 +8811,7 @@ compute_removed_literals (bfd *abfd, contents = retrieve_contents (abfd, sec, link_info->keep_memory); if (contents == NULL && sec_size != 0) { - ok = FALSE; + ok = false; goto error_return; } @@ -8823,10 +8823,10 @@ compute_removed_literals (bfd *abfd, internal_reloc_compare); ptblsize = xtensa_read_table_entries (abfd, sec, &prop_table, - XTENSA_PROP_SEC_NAME, FALSE); + XTENSA_PROP_SEC_NAME, false); if (ptblsize < 0) { - ok = FALSE; + ok = false; goto error_return; } @@ -8858,7 +8858,7 @@ compute_removed_literals (bfd *abfd, if (last_loc_is_prev && last_target_offset + 4 != rel->r_rel.target_offset) - last_loc_is_prev = FALSE; + last_loc_is_prev = false; /* Check if the relocation was from an L32R that is being removed because a CALLX was converted to a direct CALL, and check if @@ -8869,7 +8869,7 @@ compute_removed_literals (bfd *abfd, if (!remove_dead_literal (abfd, sec, link_info, internal_relocs, irel, rel, prop_table, ptblsize)) { - ok = FALSE; + ok = false; goto error_return; } last_target_offset = rel->r_rel.target_offset; @@ -8883,7 +8883,7 @@ compute_removed_literals (bfd *abfd, prop_table, ptblsize, &target_sec_cache, rel->is_abs_literal)) { - ok = FALSE; + ok = false; goto error_return; } last_target_offset = rel->r_rel.target_offset; @@ -8944,7 +8944,7 @@ get_irel_at_offset (asection *sec, } -bfd_boolean +bool is_removable_literal (const source_reloc *rel, int i, const source_reloc *src_relocs, @@ -8957,30 +8957,30 @@ is_removable_literal (const source_reloc *rel, property_table_entry *entry; if (!rel->is_null) - return FALSE; + return false; entry = elf_xtensa_find_property_entry (prop_table, ptblsize, sec->vma + rel->r_rel.target_offset); if (entry && (entry->flags & XTENSA_PROP_NO_TRANSFORM)) - return FALSE; + return false; for (++i; i < src_count; ++i) { curr_rel = &src_relocs[i]; /* If all others have the same target offset.... */ if (curr_rel->r_rel.target_offset != rel->r_rel.target_offset) - return TRUE; + return true; if (!curr_rel->is_null && !xtensa_is_property_section (curr_rel->source_sec) && !(curr_rel->source_sec->flags & SEC_DEBUGGING)) - return FALSE; + return false; } - return TRUE; + return true; } -bfd_boolean +bool remove_dead_literal (bfd *abfd, asection *sec, struct bfd_link_info *link_info, @@ -8995,7 +8995,7 @@ remove_dead_literal (bfd *abfd, relax_info = get_xtensa_relax_info (sec); if (!relax_info) - return FALSE; + return false; entry = elf_xtensa_find_property_entry (prop_table, ptblsize, sec->vma + rel->r_rel.target_offset); @@ -9047,37 +9047,37 @@ remove_dead_literal (bfd *abfd, } /* Do not modify "last_loc_is_prev". */ - return TRUE; + return true; } -bfd_boolean +bool identify_literal_placement (bfd *abfd, asection *sec, bfd_byte *contents, struct bfd_link_info *link_info, value_map_hash_table *values, - bfd_boolean *last_loc_is_prev_p, + bool *last_loc_is_prev_p, Elf_Internal_Rela *irel, int remaining_src_rels, source_reloc *rel, property_table_entry *prop_table, int ptblsize, section_cache_t *target_sec_cache, - bfd_boolean is_abs_literal) + bool is_abs_literal) { literal_value val; value_map *val_map; xtensa_relax_info *relax_info; - bfd_boolean literal_placed = FALSE; + bool literal_placed = false; r_reloc r_rel; unsigned long value; - bfd_boolean final_static_link; + bool final_static_link; bfd_size_type sec_size; relax_info = get_xtensa_relax_info (sec); if (!relax_info) - return FALSE; + return false; sec_size = bfd_get_section_limit (abfd, sec); @@ -9115,7 +9115,7 @@ identify_literal_placement (bfd *abfd, && coalesce_shared_literal (sec, rel, prop_table, ptblsize, val_map)) { /* No change to last_loc_is_prev. */ - literal_placed = TRUE; + literal_placed = true; } /* For relocatable links, do not try to move literals. To do it @@ -9138,7 +9138,7 @@ identify_literal_placement (bfd *abfd, &try_loc, &val, target_sec_cache)) { values->last_loc.virtual_offset += 4; - literal_placed = TRUE; + literal_placed = true; if (!val_map) val_map = add_value_map (values, &val, &try_loc, final_static_link); @@ -9151,16 +9151,16 @@ identify_literal_placement (bfd *abfd, if (!literal_placed) { /* Nothing worked, leave the literal alone but update the last loc. */ - values->has_last_loc = TRUE; + values->has_last_loc = true; values->last_loc = rel->r_rel; if (!val_map) val_map = add_value_map (values, &val, &rel->r_rel, final_static_link); else val_map->loc = rel->r_rel; - *last_loc_is_prev_p = TRUE; + *last_loc_is_prev_p = true; } - return TRUE; + return true; } @@ -9175,7 +9175,7 @@ identify_literal_placement (bfd *abfd, is sorted by target offset so we know all the entries for the same literal will be contiguous. */ -static bfd_boolean +static bool relocations_reach (source_reloc *reloc, int remaining_relocs, const r_reloc *r_rel) @@ -9185,7 +9185,7 @@ relocations_reach (source_reloc *reloc, int i; if (!r_reloc_is_defined (r_rel)) - return FALSE; + return false; sec = r_reloc_get_section (r_rel); from_offset = reloc[0].r_rel.target_offset; @@ -9203,7 +9203,7 @@ relocations_reach (source_reloc *reloc, in order to coalesce. */ if (r_reloc_get_section (&reloc[i].r_rel)->output_section != sec->output_section) - return FALSE; + return false; /* Absolute literals in the same output section can always be combined. */ @@ -9223,18 +9223,18 @@ relocations_reach (source_reloc *reloc, if (!pcrel_reloc_fits (reloc[i].opcode, reloc[i].opnd, source_address, dest_address)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Move a literal to another literal location because it is the same as the other literal value. */ -static bfd_boolean +static bool coalesce_shared_literal (asection *sec, source_reloc *rel, property_table_entry *prop_table, @@ -9249,12 +9249,12 @@ coalesce_shared_literal (asection *sec, relax_info = get_xtensa_relax_info (sec); if (!relax_info) - return FALSE; + return false; entry = elf_xtensa_find_property_entry (prop_table, ptblsize, sec->vma + rel->r_rel.target_offset); if (entry && (entry->flags & XTENSA_PROP_NO_TRANSFORM)) - return TRUE; + return true; /* Mark that the literal will be coalesced. */ add_removed_literal (&relax_info->removed_list, &rel->r_rel, &val_map->loc); @@ -9291,7 +9291,7 @@ coalesce_shared_literal (asection *sec, ta_fill, sec, entry_sec_offset, removed_diff); } - return TRUE; + return true; } @@ -9299,7 +9299,7 @@ coalesce_shared_literal (asection *sec, total amount of space used because of alignments so we need to do this carefully. Also, it may make a branch go out of range. */ -static bfd_boolean +static bool move_shared_literal (asection *sec, struct bfd_link_info *link_info, source_reloc *rel, @@ -9316,16 +9316,16 @@ move_shared_literal (asection *sec, asection *target_sec; ebb_t *ebb; ebb_constraint ebb_table; - bfd_boolean relocs_fit; + bool relocs_fit; /* If this routine always returns FALSE, the literals that cannot be coalesced will not be moved. */ if (elf32xtensa_no_literal_movement) - return FALSE; + return false; relax_info = get_xtensa_relax_info (sec); if (!relax_info) - return FALSE; + return false; target_sec = r_reloc_get_section (target_loc); target_relax_info = get_xtensa_relax_info (target_sec); @@ -9333,23 +9333,23 @@ move_shared_literal (asection *sec, /* Literals to undefined sections may not be moved because they must report an error. */ if (bfd_is_und_section (target_sec)) - return FALSE; + return false; src_entry = elf_xtensa_find_property_entry (prop_table, ptblsize, sec->vma + rel->r_rel.target_offset); if (!section_cache_section (target_sec_cache, target_sec, link_info)) - return FALSE; + return false; target_entry = elf_xtensa_find_property_entry (target_sec_cache->ptbl, target_sec_cache->pte_count, target_sec->vma + target_loc->target_offset); if (!target_entry) - return FALSE; + return false; /* Make sure that we have not broken any branches. */ - relocs_fit = FALSE; + relocs_fit = false; init_ebb_constraint (&ebb_table); ebb = &ebb_table.ebb; @@ -9362,7 +9362,7 @@ move_shared_literal (asection *sec, destination. */ ebb_propose_action (&ebb_table, EBB_NO_ALIGN, 0, ta_fill, target_loc->target_offset, - -4 - (1 << target_sec->alignment_power), TRUE); + -4 - (1 << target_sec->alignment_power), true); /* Check all of the PC-relative relocations to make sure they still fit. */ relocs_fit = check_section_ebb_pcrels_fit (target_sec->owner, target_sec, @@ -9371,7 +9371,7 @@ move_shared_literal (asection *sec, &ebb_table, NULL); if (!relocs_fit) - return FALSE; + return false; text_action_add_literal (&target_relax_info->action_list, ta_add_literal, target_loc, lit_value, -4); @@ -9443,7 +9443,7 @@ move_shared_literal (asection *sec, ta_fill, sec, entry_sec_offset, removed_diff); } - return TRUE; + return true; } @@ -9463,16 +9463,16 @@ action_remove_bytes_fn (splay_tree_node node, void *p) is a relaxable section, delete the unwanted literals and fix the section size. */ -bfd_boolean +bool relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) { Elf_Internal_Rela *internal_relocs; xtensa_relax_info *relax_info; bfd_byte *contents; - bfd_boolean ok = TRUE; + bool ok = true; unsigned i; - bfd_boolean rv = FALSE; - bfd_boolean virtual_action; + bool rv = false; + bool virtual_action; bfd_size_type sec_size; sec_size = bfd_get_section_limit (abfd, sec); @@ -9492,12 +9492,12 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) internal_relocs = retrieve_internal_relocs (abfd, sec, link_info->keep_memory); if (!internal_relocs && !action_list_count (&relax_info->action_list)) - return TRUE; + return true; contents = retrieve_contents (abfd, sec, link_info->keep_memory); if (contents == NULL && sec_size != 0) { - ok = FALSE; + ok = false; goto error_return; } @@ -9785,7 +9785,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) new_reloc.target_offset + new_reloc.virtual_offset; fix = reloc_bfd_fix_init (sec, source_offset, r_type, target_sec, - addend_displacement, TRUE); + addend_displacement, true); add_fix (sec, fix); } } @@ -9827,7 +9827,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) for (action = action_first (&relax_info->action_list); action; action = action_next (&relax_info->action_list, action)) { - virtual_action = FALSE; + virtual_action = false; if (action->offset > orig_dot) { orig_dot += orig_dot_copied; @@ -9869,7 +9869,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) orig_dot_copied = copy_size; dup_dot += copy_size; } - virtual_action = TRUE; + virtual_action = true; } else BFD_ASSERT (action->virtual_offset <= orig_dot_vo); @@ -10005,7 +10005,7 @@ relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) } -static bfd_boolean +static bool translate_section_fixes (asection *sec) { xtensa_relax_info *relax_info; @@ -10013,20 +10013,20 @@ translate_section_fixes (asection *sec) relax_info = get_xtensa_relax_info (sec); if (!relax_info) - return TRUE; + return true; for (r = relax_info->fix_list; r != NULL; r = r->next) if (!translate_reloc_bfd_fix (r)) - return FALSE; + return false; - return TRUE; + return true; } /* Translate a fix given the mapping in the relax info for the target section. If it has already been translated, no work is required. */ -static bfd_boolean +static bool translate_reloc_bfd_fix (reloc_bfd_fix *fix) { reloc_bfd_fix new_fix; @@ -10036,7 +10036,7 @@ translate_reloc_bfd_fix (reloc_bfd_fix *fix) bfd_vma new_offset, target_offset; if (fix->translated) - return TRUE; + return true; sec = fix->target_sec; target_offset = fix->target_offset; @@ -10044,8 +10044,8 @@ translate_reloc_bfd_fix (reloc_bfd_fix *fix) relax_info = get_xtensa_relax_info (sec); if (!relax_info) { - fix->translated = TRUE; - return TRUE; + fix->translated = true; + return true; } new_fix = *fix; @@ -10054,8 +10054,8 @@ translate_reloc_bfd_fix (reloc_bfd_fix *fix) if (!relax_info->is_relaxable_literal_section && !relax_info->is_relaxable_asm_section) { - fix->translated = TRUE; - return TRUE; + fix->translated = true; + return true; } /* If the literal has been moved and this relocation was on an @@ -10063,7 +10063,7 @@ translate_reloc_bfd_fix (reloc_bfd_fix *fix) location. Otherwise, the relocation should move within the section. */ - removed = FALSE; + removed = false; if (is_operand_relocation (fix->src_type)) { /* Check if the original relocation is against a literal being @@ -10093,9 +10093,9 @@ translate_reloc_bfd_fix (reloc_bfd_fix *fix) target_offset = removed->to.target_offset; new_fix.target_sec = new_sec; new_fix.target_offset = target_offset; - new_fix.translated = TRUE; + new_fix.translated = true; *fix = new_fix; - return TRUE; + return true; } } target_offset = removed->to.target_offset; @@ -10108,9 +10108,9 @@ translate_reloc_bfd_fix (reloc_bfd_fix *fix) new_fix.target_offset = new_offset; new_fix.target_offset = new_offset; - new_fix.translated = TRUE; + new_fix.translated = true; *fix = new_fix; - return TRUE; + return true; } @@ -10134,7 +10134,7 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) target_offset = orig_rel->target_offset; - removed = FALSE; + removed = false; if (is_operand_relocation (ELF32_R_TYPE (orig_rel->rela.r_info))) { /* Check if the original relocation is against a literal being @@ -10177,9 +10177,9 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) if (base_offset <= target_offset) { int base_removed = removed_by_actions_map (&relax_info->action_list, - base_offset, FALSE); + base_offset, false); int addend_removed = removed_by_actions_map (&relax_info->action_list, - target_offset, FALSE) - + target_offset, false) - base_removed; new_rel->target_offset = target_offset - base_removed - addend_removed; @@ -10189,9 +10189,9 @@ translate_reloc (const r_reloc *orig_rel, r_reloc *new_rel, asection *sec) { /* Handle a negative addend. The base offset comes first. */ int tgt_removed = removed_by_actions_map (&relax_info->action_list, - target_offset, FALSE); + target_offset, false); int addend_removed = removed_by_actions_map (&relax_info->action_list, - base_offset, FALSE) - + base_offset, false) - tgt_removed; new_rel->target_offset = target_offset - tgt_removed; @@ -10223,7 +10223,7 @@ shrink_dynamic_reloc_sections (struct bfd_link_info *info, unsigned long r_symndx; int r_type; struct elf_link_hash_entry *h; - bfd_boolean dynamic_symbol; + bool dynamic_symbol; htab = elf_xtensa_hash_table (info); if (htab == NULL) @@ -10249,12 +10249,12 @@ shrink_dynamic_reloc_sections (struct bfd_link_info *info, && (!h || h->root.type != bfd_link_hash_undefweak)))) { asection *srel; - bfd_boolean is_plt = FALSE; + bool is_plt = false; if (dynamic_symbol && r_type == R_XTENSA_PLT) { srel = htab->elf.srelplt; - is_plt = TRUE; + is_plt = true; } else srel = htab->elf.srelgot; @@ -10315,7 +10315,7 @@ shrink_dynamic_reloc_sections (struct bfd_link_info *info, appropriate address. Contents and internal relocations for the section must be pinned after calling this routine. */ -static bfd_boolean +static bool move_literal (bfd *abfd, struct bfd_link_info *link_info, asection *sec, @@ -10356,7 +10356,7 @@ move_literal (bfd *abfd, fix = reloc_bfd_fix_init (sec, offset, r_type, r_reloc_get_section (r_rel), r_rel->target_offset + r_rel->virtual_offset, - FALSE); + false); /* We also need to mark that relocations are needed here. */ sec->flags |= SEC_RELOC; @@ -10391,7 +10391,7 @@ move_literal (bfd *abfd, new_relocs = (Elf_Internal_Rela *) bfd_zmalloc (sizeof (Elf_Internal_Rela) * (new_relocs_count)); if (!new_relocs) - return FALSE; + return false; /* We could handle this more quickly by finding the split point. */ if (insert_at != 0) @@ -10437,7 +10437,7 @@ move_literal (bfd *abfd, relax_info->relocs_count = sec->reloc_count; } } - return TRUE; + return true; } @@ -10446,7 +10446,7 @@ move_literal (bfd *abfd, algorithm does NOT allow for relocations into the middle of the property sections. */ -static bfd_boolean +static bool relax_property_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info) @@ -10454,8 +10454,8 @@ relax_property_section (bfd *abfd, Elf_Internal_Rela *internal_relocs; bfd_byte *contents; unsigned i; - bfd_boolean ok = TRUE; - bfd_boolean is_full_prop_section; + bool ok = true; + bool is_full_prop_section; size_t last_zfill_target_offset = 0; asection *last_zfill_target_sec = NULL; bfd_size_type sec_size; @@ -10467,7 +10467,7 @@ relax_property_section (bfd *abfd, contents = retrieve_contents (abfd, sec, link_info->keep_memory); if (contents == NULL && sec_size != 0) { - ok = FALSE; + ok = false; goto error_return; } @@ -10520,7 +10520,7 @@ relax_property_section (bfd *abfd, long old_size, new_size; int removed_by_old_offset = removed_by_actions_map (&target_relax_info->action_list, - old_offset, FALSE); + old_offset, false); new_offset = old_offset - removed_by_old_offset; /* Assert that we are not out of bounds. */ @@ -10547,7 +10547,7 @@ relax_property_section (bfd *abfd, include any fill inserted by relaxation. */ removed_by_old_offset = removed_by_actions_map (&target_relax_info->action_list, - old_offset, TRUE); + old_offset, true); new_offset = old_offset - removed_by_old_offset; /* If it is not unreachable and we have not yet @@ -10567,7 +10567,7 @@ relax_property_section (bfd *abfd, { int removed_by_old_offset_size = removed_by_actions_map (&target_relax_info->action_list, - old_offset + old_size, TRUE); + old_offset + old_size, true); new_size -= removed_by_old_offset_size - removed_by_old_offset; } @@ -10619,7 +10619,7 @@ relax_property_section (bfd *abfd, { Elf_Internal_Rela *offset_rel, *extra_rel; bfd_vma bytes_to_remove, size, actual_offset; - bfd_boolean remove_this_rel; + bool remove_this_rel; flagword flags; /* Find the first relocation for the entry at the current offset. @@ -10688,7 +10688,7 @@ relax_property_section (bfd *abfd, else next_rel = NULL; - remove_this_rel = FALSE; + remove_this_rel = false; bytes_to_remove = 0; actual_offset = offset - removed_bytes; size = bfd_get_32 (abfd, &contents[actual_offset + 4]); @@ -10705,7 +10705,7 @@ relax_property_section (bfd *abfd, /* Always remove entries with zero size and no alignment. */ bytes_to_remove = entry_size; if (offset_rel) - remove_this_rel = TRUE; + remove_this_rel = true; } else if (offset_rel && ELF32_R_TYPE (offset_rel->r_info) == R_XTENSA_32) @@ -10738,7 +10738,7 @@ relax_property_section (bfd *abfd, bfd_put_32 (abfd, old_size + size, &contents[last_irel->r_offset + 4]); bytes_to_remove = entry_size; - remove_this_rel = TRUE; + remove_this_rel = true; } else last_irel = offset_rel; @@ -10796,7 +10796,7 @@ relax_property_section (bfd *abfd, /* Change symbol values to account for removed literals. */ -bfd_boolean +bool relax_section_symbols (bfd *abfd, asection *sec) { xtensa_relax_info *relax_info; @@ -10810,7 +10810,7 @@ relax_section_symbols (bfd *abfd, asection *sec) if (!relax_info->is_relaxable_literal_section && !relax_info->is_relaxable_asm_section) - return TRUE; + return true; sec_shndx = _bfd_elf_section_from_bfd_section (abfd, sec); @@ -10829,13 +10829,13 @@ relax_section_symbols (bfd *abfd, asection *sec) { bfd_vma orig_addr = isym->st_value; int removed = removed_by_actions_map (&relax_info->action_list, - orig_addr, FALSE); + orig_addr, false); isym->st_value -= removed; if (ELF32_ST_TYPE (isym->st_info) == STT_FUNC) isym->st_size -= removed_by_actions_map (&relax_info->action_list, - orig_addr + isym->st_size, FALSE) - + orig_addr + isym->st_size, false) - removed; } } @@ -10856,25 +10856,25 @@ relax_section_symbols (bfd *abfd, asection *sec) { bfd_vma orig_addr = sym_hash->root.u.def.value; int removed = removed_by_actions_map (&relax_info->action_list, - orig_addr, FALSE); + orig_addr, false); sym_hash->root.u.def.value -= removed; if (sym_hash->type == STT_FUNC) sym_hash->size -= removed_by_actions_map (&relax_info->action_list, - orig_addr + sym_hash->size, FALSE) - + orig_addr + sym_hash->size, false) - removed; } } - return TRUE; + return true; } /* "Fix" handling functions, called while performing relocations. */ -static bfd_boolean +static bool do_fix_for_relocatable_link (Elf_Internal_Rela *rel, bfd *input_bfd, asection *input_section, @@ -10887,11 +10887,11 @@ do_fix_for_relocatable_link (Elf_Internal_Rela *rel, reloc_bfd_fix *fix; if (r_type == R_XTENSA_NONE) - return TRUE; + return true; fix = get_bfd_fix (input_section, rel->r_offset, r_type); if (!fix) - return TRUE; + return true; r_reloc_init (&r_rel, input_bfd, rel, contents, bfd_get_section_limit (input_bfd, input_section)); @@ -10907,7 +10907,7 @@ do_fix_for_relocatable_link (Elf_Internal_Rela *rel, (_("%pB(%pA+%#" PRIx64 "): unexpected fix for %s relocation"), input_bfd, input_section, (uint64_t) rel->r_offset, elf_howto_table[r_type].name); - return FALSE; + return false; } /* Leave it be. Resolution will happen in a later stage. */ } @@ -10917,7 +10917,7 @@ do_fix_for_relocatable_link (Elf_Internal_Rela *rel, rel->r_addend += ((sec->output_offset + fix->target_offset) - (old_sec->output_offset + old_offset)); } - return TRUE; + return true; } @@ -11101,7 +11101,7 @@ get_elf_r_symndx_offset (bfd *abfd, unsigned long r_symndx) } -static bfd_boolean +static bool is_reloc_sym_weak (bfd *abfd, Elf_Internal_Rela *rel) { unsigned long r_symndx = ELF32_R_SYM (rel->r_info); @@ -11109,12 +11109,12 @@ is_reloc_sym_weak (bfd *abfd, Elf_Internal_Rela *rel) h = get_elf_r_symndx_hash_entry (abfd, r_symndx); if (h && h->root.type == bfd_link_hash_defweak) - return TRUE; - return FALSE; + return true; + return false; } -static bfd_boolean +static bool pcrel_reloc_fits (xtensa_opcode opc, int opnd, bfd_vma self_address, @@ -11124,53 +11124,53 @@ pcrel_reloc_fits (xtensa_opcode opc, uint32 valp = dest_address; if (xtensa_operand_do_reloc (isa, opc, opnd, &valp, self_address) || xtensa_operand_encode (isa, opc, opnd, &valp)) - return FALSE; - return TRUE; + return false; + return true; } -static bfd_boolean +static bool xtensa_is_property_section (asection *sec) { if (xtensa_is_insntable_section (sec) || xtensa_is_littable_section (sec) || xtensa_is_proptable_section (sec)) - return TRUE; + return true; - return FALSE; + return false; } -static bfd_boolean +static bool xtensa_is_insntable_section (asection *sec) { if (startswith (sec->name, XTENSA_INSN_SEC_NAME) || startswith (sec->name, ".gnu.linkonce.x.")) - return TRUE; + return true; - return FALSE; + return false; } -static bfd_boolean +static bool xtensa_is_littable_section (asection *sec) { if (startswith (sec->name, XTENSA_LIT_SEC_NAME) || startswith (sec->name, ".gnu.linkonce.p.")) - return TRUE; + return true; - return FALSE; + return false; } -static bfd_boolean +static bool xtensa_is_proptable_section (asection *sec) { if (startswith (sec->name, XTENSA_PROP_SEC_NAME) || startswith (sec->name, ".gnu.linkonce.prop.")) - return TRUE; + return true; - return FALSE; + return false; } @@ -11211,7 +11211,7 @@ internal_reloc_matches (const void *ap, const void *bp) /* Predicate function used to look up a section in a particular group. */ -static bfd_boolean +static bool match_section_group (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *inf) { const char *gname = inf; @@ -11247,7 +11247,7 @@ static int linkonce_len = sizeof (".gnu.linkonce.") - 1; static char * xtensa_property_section_name (asection *sec, const char *base_name, - bfd_boolean separate_sections) + bool separate_sections) { const char *suffix, *group_name; char *prop_sec_name; @@ -11297,7 +11297,7 @@ xtensa_property_section_name (asection *sec, const char *base_name, static asection * xtensa_get_separate_property_section (asection *sec, const char *base_name, - bfd_boolean separate_section) + bool separate_section) { char *prop_sec_name; asection *prop_sec; @@ -11317,11 +11317,11 @@ xtensa_get_property_section (asection *sec, const char *base_name) asection *prop_sec; /* Try individual property section first. */ - prop_sec = xtensa_get_separate_property_section (sec, base_name, TRUE); + prop_sec = xtensa_get_separate_property_section (sec, base_name, true); /* Refer to a common property section if individual is not present. */ if (!prop_sec) - prop_sec = xtensa_get_separate_property_section (sec, base_name, FALSE); + prop_sec = xtensa_get_separate_property_section (sec, base_name, false); return prop_sec; } @@ -11378,7 +11378,7 @@ xtensa_get_property_predef_flags (asection *sec) /* Other functions called directly by the linker. */ -bfd_boolean +bool xtensa_callback_required_dependence (bfd *abfd, asection *sec, struct bfd_link_info *link_info, @@ -11388,7 +11388,7 @@ xtensa_callback_required_dependence (bfd *abfd, Elf_Internal_Rela *internal_relocs; bfd_byte *contents; unsigned i; - bfd_boolean ok = TRUE; + bool ok = true; bfd_size_type sec_size; sec_size = bfd_get_section_limit (abfd, sec); @@ -11437,7 +11437,7 @@ xtensa_callback_required_dependence (bfd *abfd, contents = retrieve_contents (abfd, sec, link_info->keep_memory); if (contents == NULL && sec_size != 0) { - ok = FALSE; + ok = false; goto error_return; } diff --git a/bfd/elf32-z80.c b/bfd/elf32-z80.c index 80f4ab5214..1820d99165 100644 --- a/bfd/elf32-z80.c +++ b/bfd/elf32-z80.c @@ -52,15 +52,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit relocation */ BFD_HOWTO (BFD_RELOC_8, @@ -68,15 +68,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_imm8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit index register displacement relocation */ BFD_HOWTO (BFD_RELOC_Z80_DISP8, @@ -84,15 +84,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_off", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 8 bit PC-rel relocation */ BFD_HOWTO (BFD_RELOC_8_PCREL, @@ -100,15 +100,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_jr", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An 16 bit absolute relocation */ BFD_HOWTO (BFD_RELOC_16, @@ -116,15 +116,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_imm16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 24 bit absolute relocation emitted by ADL mode operands */ BFD_HOWTO (BFD_RELOC_24, @@ -132,30 +132,30 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 5, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_imm24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ BFD_HOWTO (BFD_RELOC_32, R_Z80_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_imm32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* First (lowest) 8 bits of multibyte relocation */ BFD_HOWTO (BFD_RELOC_Z80_BYTE0, @@ -163,15 +163,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_byte0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Second 8 bits of multibyte relocation */ BFD_HOWTO (BFD_RELOC_Z80_BYTE1, @@ -179,15 +179,15 @@ bfd_howto_type elf_z80_howto_table[] = 8, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_byte1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Third 8 bits of multibyte relocation */ BFD_HOWTO (BFD_RELOC_Z80_BYTE2, @@ -195,15 +195,15 @@ bfd_howto_type elf_z80_howto_table[] = 16, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_byte2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Fourth (highest) 8 bits of multibyte relocation */ BFD_HOWTO (BFD_RELOC_Z80_BYTE3, @@ -211,15 +211,15 @@ bfd_howto_type elf_z80_howto_table[] = 24, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_byte3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 16 bit absolute relocation of lower word of multibyte value */ BFD_HOWTO (BFD_RELOC_Z80_WORD0, @@ -227,15 +227,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_word0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 16 bit absolute relocation of higher word of multibyte value */ BFD_HOWTO (BFD_RELOC_Z80_WORD1, @@ -243,15 +243,15 @@ bfd_howto_type elf_z80_howto_table[] = 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "r_word1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 16 bit big endian absolute relocation */ BFD_HOWTO (BFD_RELOC_Z80_16_BE, @@ -259,15 +259,15 @@ bfd_howto_type elf_z80_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ z80_elf_16_be_reloc, /* special_function */ "r_imm16be", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; static reloc_howto_type * @@ -335,7 +335,7 @@ z80_rtype_to_howto (bfd *abfd, unsigned r_type) /* Set the howto pointer for an z80 ELF reloc. */ -static bfd_boolean +static bool z80_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int r_type = ELF32_R_TYPE (dst->r_info); @@ -343,10 +343,10 @@ z80_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) if (howto != NULL) { cache_ptr->howto = howto; - return TRUE; + return true; } bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } static bfd_reloc_status_type @@ -362,7 +362,7 @@ z80_elf_final_link_relocate (unsigned long r_type, asection *sym_sec ATTRIBUTE_UNUSED, int is_local ATTRIBUTE_UNUSED) { - bfd_boolean r; + bool r; reloc_howto_type *howto; switch (r_type) @@ -425,7 +425,7 @@ z80_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc, warned, ignored; + bool unresolved_reloc, warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -455,14 +455,14 @@ z80_elf_relocate_section (bfd *output_bfd, info, sec, h == NULL); } - return TRUE; + return true; } /* The final processing done just before writing out a Z80 ELF object file. This gets the Z80 architecture right based on the machine number. */ -static bfd_boolean +static bool z80_elf_final_write_processing (bfd *abfd) { unsigned long val = bfd_get_mach (abfd); @@ -504,7 +504,7 @@ z80_elf_final_write_processing (bfd *abfd) } /* Set the right machine number. */ -static bfd_boolean +static bool z80_elf_object_p (bfd *abfd) { unsigned int mach; @@ -550,7 +550,7 @@ z80_elf_object_p (bfd *abfd) return bfd_default_set_arch_mach (abfd, bfd_arch_z80, mach); } -static bfd_boolean +static bool z80_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, const char * name) { diff --git a/bfd/elf64-alpha.c b/bfd/elf64-alpha.c index 0f67af4438..1f68f822f7 100644 --- a/bfd/elf64-alpha.c +++ b/bfd/elf64-alpha.c @@ -84,9 +84,9 @@ /* Set by ld emulation. Putting this into the link_info or hash structure is simply working too hard. */ #ifdef USE_SECUREPLT -bfd_boolean elf64_alpha_use_secureplt = TRUE; +bool elf64_alpha_use_secureplt = true; #else -bfd_boolean elf64_alpha_use_secureplt = FALSE; +bool elf64_alpha_use_secureplt = false; #endif #define OLD_PLT_HEADER_SIZE 32 @@ -210,7 +210,7 @@ struct alpha_elf_link_hash_table #define alpha_elf_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* Get the Alpha ELF linker hash table from a link_info structure. */ @@ -230,7 +230,7 @@ struct alpha_elf_link_hash_table equality wrt PLT entries -- we don't create a PLT entry if a symbol's address is ever taken. */ -static inline bfd_boolean +static inline bool alpha_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, struct bfd_link_info *info) { @@ -351,14 +351,14 @@ struct alpha_elf_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == ALPHA_ELF_DATA) -static bfd_boolean +static bool elf64_alpha_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct alpha_elf_obj_tdata), ALPHA_ELF_DATA); } -static bfd_boolean +static bool elf64_alpha_object_p (bfd *abfd) { /* Set the right machine number for an Alpha ELF file. */ @@ -490,45 +490,45 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ elf64_alpha_reloc_nil, /* special_function */ "NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32 bit reference to a symbol. */ HOWTO (R_ALPHA_REFLONG, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "REFLONG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 64 bit reference to a symbol. */ HOWTO (R_ALPHA_REFQUAD, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "REFQUAD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit GP relative offset. This is just like REFLONG except that when the value is used the value of the gp register will be @@ -537,30 +537,30 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "GPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Used for an instruction that refers to memory off the GP register. */ HOWTO (R_ALPHA_LITERAL, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "ELF_LITERAL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This reloc only appears immediately following an ELF_LITERAL reloc. It identifies a use of the literal. The symbol index is special: @@ -573,15 +573,15 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ elf64_alpha_reloc_nil, /* special_function */ "LITUSE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Load the gp register. This is always used for a ldah instruction which loads the upper 16 bits of the gp register. The symbol @@ -603,90 +603,90 @@ static reloc_howto_type elf64_alpha_howto_table[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ elf64_alpha_reloc_gpdisp, /* special_function */ "GPDISP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 21 bit branch. */ HOWTO (R_ALPHA_BRADDR, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "BRADDR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A hint for a jump to a register. */ HOWTO (R_ALPHA_HINT, /* type */ 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 14, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "HINT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3fff, /* src_mask */ 0x3fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit PC relative offset. */ HOWTO (R_ALPHA_SREL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "SREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32 bit PC relative offset. */ HOWTO (R_ALPHA_SREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "SREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 64 bit PC relative offset. */ HOWTO (R_ALPHA_SREL64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "SREL64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Skip 12 - 16; deprecated ECOFF relocs. */ SKIP_HOWTO (12), @@ -700,45 +700,45 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "GPRELHIGH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The low 16 bits of the displacement from GP to the target. */ HOWTO (R_ALPHA_GPRELLOW, 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "GPRELLOW", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16-bit displacement from the GP to the target. */ HOWTO (R_ALPHA_GPREL16, 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "GPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Skip 20 - 23; deprecated ECOFF relocs. */ SKIP_HOWTO (20), @@ -756,120 +756,120 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, 0, 0, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "COPY", - FALSE, + false, 0, 0, - TRUE), + true), /* A dynamic relocation for a .got entry. */ HOWTO (R_ALPHA_GLOB_DAT, 0, 0, 0, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "GLOB_DAT", - FALSE, + false, 0, 0, - TRUE), + true), /* A dynamic relocation for a .plt entry. */ HOWTO (R_ALPHA_JMP_SLOT, 0, 0, 0, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "JMP_SLOT", - FALSE, + false, 0, 0, - TRUE), + true), /* A dynamic relocation to add the base of the DSO to a 64-bit field. */ HOWTO (R_ALPHA_RELATIVE, 0, 0, 0, - FALSE, + false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "RELATIVE", - FALSE, + false, 0, 0, - TRUE), + true), /* A 21 bit branch that adjusts for gp loads. */ HOWTO (R_ALPHA_BRSGP, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "BRSGP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Creates a tls_index for the symbol in the got. */ HOWTO (R_ALPHA_TLSGD, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "TLSGD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Creates a tls_index for the (current) module in the got. */ HOWTO (R_ALPHA_TLSLDM, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "TLSLDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A dynamic relocation for a DTP module entry. */ HOWTO (R_ALPHA_DTPMOD64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "DTPMOD64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Creates a 64-bit offset in the got for the displacement from DTP to the target. */ @@ -877,75 +877,75 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "GOTDTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A dynamic relocation for a displacement from DTP to the target. */ HOWTO (R_ALPHA_DTPREL64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "DTPREL64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The high 16 bits of the displacement from DTP to the target. */ HOWTO (R_ALPHA_DTPRELHI, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "DTPRELHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The low 16 bits of the displacement from DTP to the target. */ HOWTO (R_ALPHA_DTPRELLO, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "DTPRELLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16-bit displacement from DTP to the target. */ HOWTO (R_ALPHA_DTPREL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "DTPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Creates a 64-bit offset in the got for the displacement from TP to the target. */ @@ -953,75 +953,75 @@ static reloc_howto_type elf64_alpha_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "GOTTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A dynamic relocation for a displacement from TP to the target. */ HOWTO (R_ALPHA_TPREL64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "TPREL64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The high 16 bits of the displacement from TP to the target. */ HOWTO (R_ALPHA_TPRELHI, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "TPRELHI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The low 16 bits of the displacement from TP to the target. */ HOWTO (R_ALPHA_TPRELLO, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "TPRELLO", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16-bit displacement from TP to the target. */ HOWTO (R_ALPHA_TPREL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "TPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* A mapping from BFD reloc types to Alpha ELF reloc types. */ @@ -1102,7 +1102,7 @@ elf64_alpha_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Given an Alpha ELF reloc type, fill in an arelent structure. */ -static bfd_boolean +static bool elf64_alpha_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -1114,10 +1114,10 @@ elf64_alpha_info_to_howto (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf64_alpha_howto_table[r_type]; - return TRUE; + return true; } /* These two relocations create a two-word entry in the got. */ @@ -1139,7 +1139,7 @@ elf64_alpha_info_to_howto (bfd *abfd, arelent *cache_ptr, is called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool elf64_alpha_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -1156,41 +1156,41 @@ elf64_alpha_section_from_shdr (bfd *abfd, { case SHT_ALPHA_DEBUG: if (strcmp (name, ".mdebug") != 0) - return FALSE; + return false; break; default: - return FALSE; + return false; } if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; newsect = hdr->bfd_section; if (hdr->sh_type == SHT_ALPHA_DEBUG) { if (!bfd_set_section_flags (newsect, bfd_section_flags (newsect) | SEC_DEBUGGING)) - return FALSE; + return false; } - return TRUE; + return true; } /* Convert Alpha specific section flags to bfd internal section flags. */ -static bfd_boolean +static bool elf64_alpha_section_flags (const Elf_Internal_Shdr *hdr) { if (hdr->sh_flags & SHF_ALPHA_GPREL) hdr->bfd_section->flags |= SEC_SMALL_DATA; - return TRUE; + return true; } /* Set the correct type for an Alpha ELF section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool elf64_alpha_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) { register const char *name; @@ -1214,13 +1214,13 @@ elf64_alpha_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) || strcmp (name, ".lit8") == 0) hdr->sh_flags |= SHF_ALPHA_GPREL; - return TRUE; + return true; } /* Hook called by the linker routine which adds symbols from an object file. We use it to put .comm items in .sbss, and not .bss. */ -static bfd_boolean +static bool elf64_alpha_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep ATTRIBUTE_UNUSED, @@ -1244,19 +1244,19 @@ elf64_alpha_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, | SEC_SMALL_DATA | SEC_LINKER_CREATED)); if (scomm == NULL) - return FALSE; + return false; } *secp = scomm; *valp = sym->st_size; } - return TRUE; + return true; } /* Create the .got section. */ -static bfd_boolean +static bool elf64_alpha_create_got_section (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -1264,14 +1264,14 @@ elf64_alpha_create_got_section (bfd *abfd, asection *s; if (! is_alpha_elf (abfd)) - return FALSE; + return false; flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); s = bfd_make_section_anyway_with_flags (abfd, ".got", flags); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; alpha_elf_tdata (abfd)->got = s; @@ -1280,12 +1280,12 @@ elf64_alpha_create_got_section (bfd *abfd, we've collected each object's info. */ alpha_elf_tdata (abfd)->gotobj = abfd; - return TRUE; + return true; } /* Create all the dynamic sections. */ -static bfd_boolean +static bool elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { asection *s; @@ -1293,7 +1293,7 @@ elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) struct elf_link_hash_entry *h; if (! is_alpha_elf (abfd)) - return FALSE; + return false; /* We need to create .plt, .rela.plt, .got, and .rela.got sections. */ @@ -1303,7 +1303,7 @@ elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags); elf_hash_table (info)->splt = s; if (s == NULL || ! bfd_set_section_alignment (s, 4)) - return FALSE; + return false; /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the .plt section. */ @@ -1311,14 +1311,14 @@ elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) "_PROCEDURE_LINKAGE_TABLE_"); elf_hash_table (info)->hplt = h; if (h == NULL) - return FALSE; + return false; flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED | SEC_READONLY); s = bfd_make_section_anyway_with_flags (abfd, ".rela.plt", flags); elf_hash_table (info)->srelplt = s; if (s == NULL || ! bfd_set_section_alignment (s, 3)) - return FALSE; + return false; if (elf64_alpha_use_secureplt) { @@ -1326,7 +1326,7 @@ elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags); elf_hash_table (info)->sgotplt = s; if (s == NULL || ! bfd_set_section_alignment (s, 3)) - return FALSE; + return false; } /* We may or may not have created a .got section for this object, but @@ -1335,7 +1335,7 @@ elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (alpha_elf_tdata(abfd)->gotobj == NULL) { if (!elf64_alpha_create_got_section (abfd, info)) - return FALSE; + return false; } flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY @@ -1344,7 +1344,7 @@ elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) elf_hash_table (info)->srelgot = s; if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the dynobj's .got section. We don't do this in the linker script @@ -1354,15 +1354,15 @@ elf64_alpha_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; - return TRUE; + return true; } /* Read ECOFF debugging information from a .mdebug section into a ecoff_debug_info structure. */ -static bfd_boolean +static bool elf64_alpha_read_ecoff_info (bfd *abfd, asection *section, struct ecoff_debug_info *debug) { @@ -1421,7 +1421,7 @@ elf64_alpha_read_ecoff_info (bfd *abfd, asection *section, debug->fdr = NULL; - return TRUE; + return true; error_return: free (ext_hdr); @@ -1436,18 +1436,18 @@ elf64_alpha_read_ecoff_info (bfd *abfd, asection *section, free (debug->external_fdr); free (debug->external_rfd); free (debug->external_ext); - return FALSE; + return false; } /* Alpha ELF local labels start with '$'. */ -static bfd_boolean +static bool elf64_alpha_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { return name[0] == '$'; } -static bfd_boolean +static bool elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, bfd_vma offset, const char **filename_ptr, @@ -1463,7 +1463,7 @@ elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, dwarf_debug_sections, &elf_tdata (abfd)->dwarf2_find_line_info) == 1) - return TRUE; + return true; msec = bfd_get_section_by_name (abfd, ".mdebug"); if (msec != NULL) @@ -1493,13 +1493,13 @@ elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, if (fi == NULL) { msec->flags = origflags; - return FALSE; + return false; } if (!elf64_alpha_read_ecoff_info (abfd, msec, &fi->d)) { msec->flags = origflags; - return FALSE; + return false; } /* Swap in the FDR information. */ @@ -1508,7 +1508,7 @@ elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, if (fi->d.fdr == NULL) { msec->flags = origflags; - return FALSE; + return false; } external_fdr_size = swap->external_fdr_size; fdr_ptr = fi->d.fdr; @@ -1533,7 +1533,7 @@ elf64_alpha_find_nearest_line (bfd *abfd, asymbol **symbols, line_ptr)) { msec->flags = origflags; - return TRUE; + return true; } msec->flags = origflags; @@ -1554,35 +1554,35 @@ struct extsym_info struct bfd_link_info *info; struct ecoff_debug_info *debug; const struct ecoff_debug_swap *swap; - bfd_boolean failed; + bool failed; }; -static bfd_boolean +static bool elf64_alpha_output_extsym (struct alpha_elf_link_hash_entry *h, void * data) { struct extsym_info *einfo = (struct extsym_info *) data; - bfd_boolean strip; + bool strip; asection *sec, *output_section; if (h->root.indx == -2) - strip = FALSE; + strip = false; else if ((h->root.def_dynamic || h->root.ref_dynamic || h->root.root.type == bfd_link_hash_new) && !h->root.def_regular && !h->root.ref_regular) - strip = TRUE; + strip = true; else if (einfo->info->strip == strip_all || (einfo->info->strip == strip_some && bfd_hash_lookup (einfo->info->keep_hash, h->root.root.root.string, - FALSE, FALSE) == NULL)) - strip = TRUE; + false, false) == NULL)) + strip = true; else - strip = FALSE; + strip = false; if (strip) - return TRUE; + return true; if (h->esym.ifd == -2) { @@ -1662,11 +1662,11 @@ elf64_alpha_output_extsym (struct alpha_elf_link_hash_entry *h, void * data) h->root.root.root.string, &h->esym)) { - einfo->failed = TRUE; - return FALSE; + einfo->failed = true; + return false; } - return TRUE; + return true; } /* Search for and possibly create a got entry. */ @@ -1747,7 +1747,7 @@ get_got_entry (bfd *abfd, struct alpha_elf_link_hash_entry *h, return gotent; } -static bfd_boolean +static bool elf64_alpha_want_plt (struct alpha_elf_link_hash_entry *ah) { return ((ah->root.type == STT_FUNC @@ -1762,7 +1762,7 @@ elf64_alpha_want_plt (struct alpha_elf_link_hash_entry *ah) as is. On the other hand, elf-eh-frame.c processing requires .eh_frame relocs to be sorted. */ -static bfd_boolean +static bool elf64_alpha_sort_relocs_p (asection *sec) { return (sec->flags & SEC_CODE) == 0; @@ -1771,7 +1771,7 @@ elf64_alpha_sort_relocs_p (asection *sec) /* Handle dynamic relocations when doing an Alpha ELF link. */ -static bfd_boolean +static bool elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -1782,7 +1782,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel, *relend; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_alpha_elf (abfd)); @@ -1806,7 +1806,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, unsigned long r_symndx, r_type; struct alpha_elf_link_hash_entry *h; unsigned int gotent_flags; - bfd_boolean maybe_dynamic; + bool maybe_dynamic; unsigned int need; bfd_vma addend; @@ -1830,13 +1830,13 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, locally or externally defined, as not all of the input files have yet been processed. Do something with what we know, as this may help reduce memory usage and processing time later. */ - maybe_dynamic = FALSE; + maybe_dynamic = false; if (h && ((bfd_link_pic (info) && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE)) || !h->root.def_regular || h->root.root.type == bfd_link_hash_defweak)) - maybe_dynamic = TRUE; + maybe_dynamic = true; need = 0; gotent_flags = 0; @@ -1881,7 +1881,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, reloc to the STN_UNDEF (0) symbol so that they all match. */ r_symndx = STN_UNDEF; h = 0; - maybe_dynamic = FALSE; + maybe_dynamic = false; /* FALLTHRU */ case R_ALPHA_TLSGD: @@ -1912,7 +1912,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, if (alpha_elf_tdata(abfd)->gotobj == NULL) { if (!elf64_alpha_create_got_section (abfd, info)) - return FALSE; + return false; } } @@ -1922,7 +1922,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, gotent = get_got_entry (abfd, h, r_type, r_symndx, addend); if (!gotent) - return FALSE; + return false; if (gotent_flags) { @@ -1951,10 +1951,10 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, dynobj, 3, abfd, /*rela?*/ TRUE); + (sec, dynobj, 3, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } if (h) @@ -1976,7 +1976,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, size_t amt = sizeof (struct alpha_elf_reloc_entry); rent = (struct alpha_elf_reloc_entry *) bfd_alloc (abfd, amt); if (!rent) - return FALSE; + return false; rent->srel = sreloc; rent->sec = sec; @@ -2006,7 +2006,7 @@ elf64_alpha_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -2036,7 +2036,7 @@ elf64_alpha_gc_mark_hook (asection *sec, struct bfd_link_info *info, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf64_alpha_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2054,20 +2054,20 @@ elf64_alpha_adjust_dynamic_symbol (struct bfd_link_info *info, of STT_FUNC. */ if (alpha_elf_dynamic_symbol_p (h, info) && elf64_alpha_want_plt (ah)) { - h->needs_plt = TRUE; + h->needs_plt = true; s = elf_hash_table(info)->splt; if (!s && !elf64_alpha_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; /* We need one plt entry per got subsection. Delay allocation of the actual plt entries until size_plt_section, called from size_dynamic_sections or during relaxation. */ - return TRUE; + return true; } else - h->needs_plt = FALSE; + h->needs_plt = false; /* If this is a weak symbol, and there is a real definition, the processor independent code will have arranged for us to see the @@ -2078,7 +2078,7 @@ elf64_alpha_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2086,7 +2086,7 @@ elf64_alpha_adjust_dynamic_symbol (struct bfd_link_info *info, symbols even in regular objects, does not need the hackery of a .dynbss section and COPY dynamic relocations. */ - return TRUE; + return true; } /* Record STO_ALPHA_NOPV and STO_ALPHA_STD_GPLOAD. */ @@ -2094,8 +2094,8 @@ elf64_alpha_adjust_dynamic_symbol (struct bfd_link_info *info, static void elf64_alpha_merge_symbol_attribute (struct elf_link_hash_entry *h, unsigned int st_other, - bfd_boolean definition, - bfd_boolean dynamic) + bool definition, + bool dynamic) { if (!dynamic && definition) h->other = ((h->other & ELF_ST_VISIBILITY (-1)) @@ -2185,7 +2185,7 @@ elf64_alpha_copy_indirect_symbol (struct bfd_link_info *info, /* Is it possible to merge two object file's .got tables? */ -static bfd_boolean +static bool elf64_alpha_can_merge_gots (bfd *a, bfd *b) { int total = alpha_elf_tdata (a)->total_got_size; @@ -2193,11 +2193,11 @@ elf64_alpha_can_merge_gots (bfd *a, bfd *b) /* Trivial quick fallout test. */ if (total + alpha_elf_tdata (b)->total_got_size <= MAX_GOT_SIZE) - return TRUE; + return true; /* By their nature, local .got entries cannot be merged. */ if ((total += alpha_elf_tdata (b)->local_got_size) > MAX_GOT_SIZE) - return FALSE; + return false; /* Failing the common trivial comparison, we must effectively perform the merge. Not actually performing the merge means that @@ -2234,13 +2234,13 @@ elf64_alpha_can_merge_gots (bfd *a, bfd *b) total += alpha_got_entry_size (be->reloc_type); if (total > MAX_GOT_SIZE) - return FALSE; + return false; global_found:; } } } - return TRUE; + return true; } /* Actually merge two .got tables. */ @@ -2343,7 +2343,7 @@ elf64_alpha_merge_gots (bfd *a, bfd *b) /* Calculate the offsets for the got entries. */ -static bfd_boolean +static bool elf64_alpha_calc_got_offsets_for_symbol (struct alpha_elf_link_hash_entry *h, void * arg ATTRIBUTE_UNUSED) { @@ -2361,7 +2361,7 @@ elf64_alpha_calc_got_offsets_for_symbol (struct alpha_elf_link_hash_entry *h, *plge += alpha_got_entry_size (gotent->reloc_type); } - return TRUE; + return true; } static void @@ -2415,16 +2415,16 @@ elf64_alpha_calc_got_offsets (struct bfd_link_info *info) /* Constructs the gots. */ -static bfd_boolean +static bool elf64_alpha_size_got_sections (struct bfd_link_info *info, - bfd_boolean may_merge) + bool may_merge) { bfd *i, *got_list, *cur_got_obj = NULL; struct alpha_elf_link_hash_table * htab; htab = alpha_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; got_list = htab->got_list; /* On the first time through, pretend we have an existing got list @@ -2452,7 +2452,7 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: .got subsegment exceeds 64K (size %d)"), i, alpha_elf_tdata (this_got)->total_got_size); - return FALSE; + return false; } if (got_list == NULL) @@ -2464,14 +2464,14 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info, /* Strange degenerate case of no got references. */ if (got_list == NULL) - return TRUE; + return true; htab->got_list = got_list; } cur_got_obj = got_list; if (cur_got_obj == NULL) - return FALSE; + return false; if (may_merge) { @@ -2498,20 +2498,20 @@ elf64_alpha_size_got_sections (struct bfd_link_info *info, everything therein. */ elf64_alpha_calc_got_offsets (info); - return TRUE; + return true; } -static bfd_boolean +static bool elf64_alpha_size_plt_section_1 (struct alpha_elf_link_hash_entry *h, void * data) { asection *splt = (asection *) data; struct alpha_elf_got_entry *gotent; - bfd_boolean saw_one = FALSE; + bool saw_one = false; /* If we didn't need an entry before, we still don't. */ if (!h->root.needs_plt) - return TRUE; + return true; /* For each LITERAL got entry still in use, allocate a plt entry. */ for (gotent = h->got_entries; gotent ; gotent = gotent->next) @@ -2522,14 +2522,14 @@ elf64_alpha_size_plt_section_1 (struct alpha_elf_link_hash_entry *h, splt->size = PLT_HEADER_SIZE; gotent->plt_offset = splt->size; splt->size += PLT_ENTRY_SIZE; - saw_one = TRUE; + saw_one = true; } /* If there weren't any, there's no longer a need for the PLT entry. */ if (!saw_one) - h->root.needs_plt = FALSE; + h->root.needs_plt = false; - return TRUE; + return true; } /* Called from relax_section to rebuild the PLT in light of potential changes @@ -2577,7 +2577,7 @@ elf64_alpha_size_plt_section (struct bfd_link_info *info) } } -static bfd_boolean +static bool elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2585,14 +2585,14 @@ elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct alpha_elf_link_hash_table * htab; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = alpha_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; - if (!elf64_alpha_size_got_sections (info, TRUE)) - return FALSE; + if (!elf64_alpha_size_got_sections (info, true)) + return false; /* Allocate space for all of the .got subsections. */ i = htab->got_list; @@ -2603,11 +2603,11 @@ elf64_alpha_always_size_sections (bfd *output_bfd ATTRIBUTE_UNUSED, { s->contents = (bfd_byte *) bfd_zalloc (i, s->size); if (s->contents == NULL) - return FALSE; + return false; } } - return TRUE; + return true; } /* The number of dynamic relocations required by a static relocation. */ @@ -2645,11 +2645,11 @@ alpha_dynamic_entries_for_reloc (int r_type, int dynamic, int shared, int pie) /* Work out the sizes of the dynamic relocation entries. */ -static bfd_boolean +static bool elf64_alpha_calc_dynrel_sizes (struct alpha_elf_link_hash_entry *h, struct bfd_link_info *info) { - bfd_boolean dynamic; + bool dynamic; struct alpha_elf_reloc_entry *relent; unsigned long entries; @@ -2677,7 +2677,7 @@ elf64_alpha_calc_dynrel_sizes (struct alpha_elf_link_hash_entry *h, relocations. Avoid the loop which may want to add RELATIVE relocs based on bfd_link_pic (info). */ if (h->root.root.type == bfd_link_hash_undefweak && !dynamic) - return TRUE; + return true; for (relent = h->reloc_entries; relent; relent = relent->next) { @@ -2700,24 +2700,24 @@ elf64_alpha_calc_dynrel_sizes (struct alpha_elf_link_hash_entry *h, } } - return TRUE; + return true; } /* Subroutine of elf64_alpha_size_rela_got_section for doing the global symbols. */ -static bfd_boolean +static bool elf64_alpha_size_rela_got_1 (struct alpha_elf_link_hash_entry *h, struct bfd_link_info *info) { - bfd_boolean dynamic; + bool dynamic; struct alpha_elf_got_entry *gotent; unsigned long entries; /* If we're using a plt for this symbol, then all of its relocations for its got entries go into .rela.plt. */ if (h->root.needs_plt) - return TRUE; + return true; /* If the symbol is dynamic, we'll need all the relocations in their natural form. If this is a shared object, and it has been forced @@ -2728,7 +2728,7 @@ elf64_alpha_size_rela_got_1 (struct alpha_elf_link_hash_entry *h, relocations. Avoid the loop which may want to add RELATIVE relocs based on bfd_link_pic (info). */ if (h->root.root.type == bfd_link_hash_undefweak && !dynamic) - return TRUE; + return true; entries = 0; for (gotent = h->got_entries; gotent ; gotent = gotent->next) @@ -2744,7 +2744,7 @@ elf64_alpha_size_rela_got_1 (struct alpha_elf_link_hash_entry *h, srel->size += sizeof (Elf64_External_Rela) * entries; } - return TRUE; + return true; } /* Set the sizes of the dynamic relocation sections. */ @@ -2804,18 +2804,18 @@ elf64_alpha_size_rela_got_section (struct bfd_link_info *info) /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { bfd *dynobj; asection *s; - bfd_boolean relplt, relocs; + bool relplt, relocs; struct alpha_elf_link_hash_table * htab; htab = alpha_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = elf_hash_table(info)->dynobj; BFD_ASSERT(dynobj != NULL); @@ -2846,8 +2846,8 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relplt = FALSE; - relocs = FALSE; + relplt = false; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -2864,9 +2864,9 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (s->size != 0) { if (strcmp (name, ".rela.plt") == 0) - relplt = TRUE; + relplt = true; else - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -2898,7 +2898,7 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } } @@ -2914,16 +2914,16 @@ elf64_alpha_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (!_bfd_elf_add_dynamic_tags (output_bfd, info, relocs || relplt)) - return FALSE; + return false; if (relplt && elf64_alpha_use_secureplt && !add_dynamic_entry (DT_ALPHA_PLTRO, 1)) - return FALSE; + return false; } #undef add_dynamic_entry - return TRUE; + return true; } /* These functions do relaxation for Alpha ELF. @@ -2953,8 +2953,8 @@ struct alpha_relax_info struct alpha_elf_link_hash_entry *h; struct alpha_elf_got_entry **first_gotent; struct alpha_elf_got_entry *gotent; - bfd_boolean changed_contents; - bfd_boolean changed_relocs; + bool changed_contents; + bool changed_relocs; unsigned char other; }; @@ -2973,7 +2973,7 @@ elf64_alpha_find_reloc_at_ofs (Elf_Internal_Rela *rel, return NULL; } -static bfd_boolean +static bool elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval, Elf_Internal_Rela *irel, unsigned long r_type) { @@ -2991,18 +2991,18 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval, (_("%pB: %pA+%#" PRIx64 ": warning: " "%s relocation against unexpected insn"), info->abfd, info->sec, (uint64_t) irel->r_offset, howto->name); - return TRUE; + return true; } /* Can't relax dynamic symbols. */ if (info->h != NULL && alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info)) - return TRUE; + return true; /* Can't use local-exec relocations in shared libraries. */ if (r_type == R_ALPHA_GOTTPREL && bfd_link_dll (info->link_info)) - return TRUE; + return true; if (r_type == R_ALPHA_LITERAL) { @@ -3021,7 +3021,7 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval, { /* We may only create GPREL relocs during the second pass. */ if (info->link_info->relax_pass == 0) - return TRUE; + return true; disp = symval - info->gp; insn = (OP_LDA << 26) | (insn & 0x03ff0000); @@ -3049,15 +3049,15 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval, break; default: BFD_ASSERT (0); - return FALSE; + return false; } } if (disp < -0x8000 || disp >= 0x8000) - return TRUE; + return true; bfd_put_32 (info->abfd, (bfd_vma) insn, info->contents + irel->r_offset); - info->changed_contents = TRUE; + info->changed_contents = true; /* Reduce the use count on this got entry by one, possibly eliminating it. */ @@ -3071,7 +3071,7 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval, /* Smash the existing GOT relocation for its 16-bit immediate pair. */ irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), r_type); - info->changed_relocs = TRUE; + info->changed_relocs = true; /* ??? Search forward through this basic block looking for insns that use the target register. Stop after an insn modifying the @@ -3086,7 +3086,7 @@ elf64_alpha_relax_got_load (struct alpha_relax_info *info, bfd_vma symval, This would mean that we'd have to _add_ relocations, the pain of which gives one pause. */ - return TRUE; + return true; } static bfd_vma @@ -3159,19 +3159,19 @@ elf64_alpha_relax_opt_call (struct alpha_relax_info *info, bfd_vma symval) return symval + 8; } -static bfd_boolean +static bool elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, bfd_vma symval, Elf_Internal_Rela *irel) { Elf_Internal_Rela *urel, *erel, *irelend = info->relend; int flags; bfd_signed_vma disp; - bfd_boolean fits16; - bfd_boolean fits32; - bfd_boolean lit_reused = FALSE; - bfd_boolean all_optimized = TRUE; - bfd_boolean changed_contents; - bfd_boolean changed_relocs; + bool fits16; + bool fits32; + bool lit_reused = false; + bool all_optimized = true; + bool changed_contents; + bool changed_relocs; bfd_byte *contents = info->contents; bfd *abfd = info->abfd; bfd_vma sec_output_vma; @@ -3186,12 +3186,12 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, (_("%pB: %pA+%#" PRIx64 ": warning: " "%s relocation against unexpected insn"), abfd, info->sec, (uint64_t) irel->r_offset, "LITERAL"); - return TRUE; + return true; } /* Can't relax dynamic symbols. */ if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info)) - return TRUE; + return true; changed_contents = info->changed_contents; changed_relocs = info->changed_relocs; @@ -3226,14 +3226,14 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, default: /* This type is really just a placeholder to note that all uses cannot be optimized, but to still allow some. */ - all_optimized = FALSE; + all_optimized = false; break; case LITUSE_ALPHA_BASE: /* We may only create GPREL relocs during the second pass. */ if (relax_pass == 0) { - all_optimized = FALSE; + all_optimized = false; break; } @@ -3255,7 +3255,7 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, register from the literal insn. Leave the offset alone. */ insn = (insn & 0xffe0ffff) | (lit_insn & 0x001f0000); bfd_put_32 (abfd, (bfd_vma) insn, contents + urel_r_offset); - changed_contents = TRUE; + changed_contents = true; nrel = *urel; nrel.r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), @@ -3267,7 +3267,7 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, if (urel < --erel) *urel-- = *erel; *erel = nrel; - changed_relocs = TRUE; + changed_relocs = true; } /* If all mem+byte, we can optimize 32-bit mem displacements. */ @@ -3279,18 +3279,18 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, R_ALPHA_GPRELHIGH); lit_insn = (OP_LDAH << 26) | (lit_insn & 0x03ff0000); bfd_put_32 (abfd, (bfd_vma) lit_insn, contents + irel->r_offset); - lit_reused = TRUE; - changed_contents = TRUE; + lit_reused = true; + changed_contents = true; /* Since all relocs must be optimized, don't bother swapping this relocation to the end. */ urel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_ALPHA_GPRELLOW); urel->r_addend = irel->r_addend; - changed_relocs = TRUE; + changed_relocs = true; } else - all_optimized = FALSE; + all_optimized = false; break; case LITUSE_ALPHA_BYTOFF: @@ -3302,7 +3302,7 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, insn &= ~ (unsigned) 0x001ff000; insn |= ((symval & 7) << 13) | 0x1000; bfd_put_32 (abfd, (bfd_vma) insn, contents + urel_r_offset); - changed_contents = TRUE; + changed_contents = true; nrel = *urel; nrel.r_info = ELF64_R_INFO (0, R_ALPHA_NONE); @@ -3313,7 +3313,7 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, if (urel < --erel) *urel-- = *erel; *erel = nrel; - changed_relocs = TRUE; + changed_relocs = true; break; case LITUSE_ALPHA_JSR: @@ -3332,7 +3332,7 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, insn |= 31 << 16; bfd_put_32 (abfd, (bfd_vma) insn, contents + urel_r_offset); - changed_contents = TRUE; + changed_contents = true; break; } @@ -3351,7 +3351,7 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, else insn = (OP_BR << 26) | (insn & 0x03e00000); bfd_put_32 (abfd, (bfd_vma) insn, contents + urel_r_offset); - changed_contents = TRUE; + changed_contents = true; nrel = *urel; nrel.r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), @@ -3361,7 +3361,7 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, if (optdest) nrel.r_addend += optdest - symval; else - all_optimized = FALSE; + all_optimized = false; /* Kill any HINT reloc that might exist for this insn. */ xrel = (elf64_alpha_find_reloc_at_ofs @@ -3376,10 +3376,10 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, *urel-- = *erel; *erel = nrel; - info->changed_relocs = TRUE; + info->changed_relocs = true; } else - all_optimized = FALSE; + all_optimized = false; /* Even if the target is not in range for a direct branch, if we share a GP, we can eliminate the gp reload. */ @@ -3407,8 +3407,8 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, bfd_put_32 (abfd, (bfd_vma) INSN_UNOP, p_lda); gpdisp->r_info = ELF64_R_INFO (0, R_ALPHA_NONE); - changed_contents = TRUE; - changed_relocs = TRUE; + changed_contents = true; + changed_relocs = true; } } } @@ -3439,10 +3439,10 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, if (!lit_reused) { irel->r_info = ELF64_R_INFO (0, R_ALPHA_NONE); - changed_relocs = TRUE; + changed_relocs = true; bfd_put_32 (abfd, (bfd_vma) INSN_UNOP, contents + irel->r_offset); - changed_contents = TRUE; + changed_contents = true; } } @@ -3450,18 +3450,18 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info, info->changed_relocs = changed_relocs; if (all_optimized || relax_pass == 0) - return TRUE; + return true; return elf64_alpha_relax_got_load (info, symval, irel, R_ALPHA_LITERAL); } -static bfd_boolean +static bool elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, - Elf_Internal_Rela *irel, bfd_boolean is_gd) + Elf_Internal_Rela *irel, bool is_gd) { bfd_byte *pos[5]; unsigned int insn, tlsgd_reg; Elf_Internal_Rela *gpdisp, *hint; - bfd_boolean dynamic, use_gottprel; + bool dynamic, use_gottprel; unsigned long new_symndx; dynamic = (info->h != NULL @@ -3480,23 +3480,23 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, /* Otherwise we must be building an executable to do anything. */ else if (bfd_link_pic (info->link_info)) - return TRUE; + return true; /* The TLSGD/TLSLDM relocation must be followed by a LITERAL and the matching LITUSE_TLS relocations. */ if (irel + 2 >= info->relend) - return TRUE; + return true; if (ELF64_R_TYPE (irel[1].r_info) != R_ALPHA_LITERAL || ELF64_R_TYPE (irel[2].r_info) != R_ALPHA_LITUSE || irel[2].r_addend != (is_gd ? LITUSE_ALPHA_TLSGD : LITUSE_ALPHA_TLSLDM)) - return TRUE; + return true; /* There must be a GPDISP relocation positioned immediately after the LITUSE relocation. */ gpdisp = elf64_alpha_find_reloc_at_ofs (info->relocs, info->relend, irel[2].r_offset + 4, R_ALPHA_GPDISP); if (!gpdisp) - return TRUE; + return true; pos[0] = info->contents + irel[0].r_offset; pos[1] = info->contents + irel[1].r_offset; @@ -3521,7 +3521,7 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, pos[1] = tmp; } if (pos[1] >= pos[2] || pos[2] >= pos[3]) - return TRUE; + return true; /* Reduce the use count on the LITERAL relocation. Do this before we smash the symndx when we adjust the relocations below. */ @@ -3575,7 +3575,7 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, as appropriate. */ - use_gottprel = FALSE; + use_gottprel = false; new_symndx = is_gd ? ELF64_R_SYM (irel->r_info) : STN_UNDEF; /* Some compilers warn about a Boolean-looking expression being @@ -3621,7 +3621,7 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, /* FALLTHRU */ default: - use_gottprel = TRUE; + use_gottprel = true; insn = (OP_LDQ << 26) | (tlsgd_reg << 21) | (29 << 16); bfd_put_32 (info->abfd, (bfd_vma) insn, pos[0]); @@ -3648,8 +3648,8 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, if (hint) hint->r_info = ELF64_R_INFO (0, R_ALPHA_NONE); - info->changed_contents = TRUE; - info->changed_relocs = TRUE; + info->changed_contents = true; + info->changed_relocs = true; /* Reduce the use count on the TLSGD/TLSLDM relocation. */ if (--info->gotent->use_count == 0) @@ -3683,7 +3683,7 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, tprel_gotent = (struct alpha_elf_got_entry *) bfd_alloc (info->abfd, sizeof (struct alpha_elf_got_entry)); if (!tprel_gotent) - return FALSE; + return false; tprel_gotent->next = *info->first_gotent; *info->first_gotent = tprel_gotent; @@ -3700,12 +3700,12 @@ elf64_alpha_relax_tls_get_addr (struct alpha_relax_info *info, bfd_vma symval, } } - return TRUE; + return true; } -static bfd_boolean +static bool elf64_alpha_relax_section (bfd *abfd, asection *sec, - struct bfd_link_info *link_info, bfd_boolean *again) + struct bfd_link_info *link_info, bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -3718,16 +3718,16 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec, htab = alpha_elf_hash_table (link_info); if (htab == NULL) - return FALSE; + return false; /* There's nothing to change, yet. */ - *again = FALSE; + *again = false; if (bfd_link_relocatable (link_info) || ((sec->flags & (SEC_CODE | SEC_RELOC | SEC_ALLOC)) != (SEC_CODE | SEC_RELOC | SEC_ALLOC)) || sec->reloc_count == 0) - return TRUE; + return true; BFD_ASSERT (is_alpha_elf (abfd)); relax_pass = link_info->relax_pass; @@ -3759,7 +3759,7 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec, (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, link_info->keep_memory)); if (internal_relocs == NULL) - return FALSE; + return false; memset(&info, 0, sizeof (info)); info.abfd = abfd; @@ -3991,7 +3991,7 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec, *again = info.changed_contents || info.changed_relocs; - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -4000,7 +4000,7 @@ elf64_alpha_relax_section (bfd *abfd, asection *sec, free (info.contents); if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Emit a dynamic relocation for (DYNINDX, RTYPE, ADDEND) at (SEC, OFFSET) @@ -4050,7 +4050,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED, Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; struct elf_link_hash_entry **sym_hashes; - bfd_boolean ret_val = TRUE; + bool ret_val = true; symtab_hdr_sh_info = elf_symtab_hdr (input_bfd).sh_info; sym_hashes = elf_sym_hashes (input_bfd); @@ -4071,7 +4071,7 @@ elf64_alpha_relocate_section_r (bfd *output_bfd ATTRIBUTE_UNUSED, (_("%pB: unsupported relocation type %#x"), input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret_val = FALSE; + ret_val = false; continue; } @@ -4133,7 +4133,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd *dynobj, *gotobj; bfd_vma gp, tp_base, dtp_base; struct alpha_elf_got_entry **local_got_entries; - bfd_boolean ret_val; + bool ret_val; BFD_ASSERT (is_alpha_elf (input_bfd)); @@ -4145,7 +4145,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* This is a final link. */ - ret_val = TRUE; + ret_val = true; symtab_hdr = &elf_symtab_hdr (input_bfd); @@ -4206,9 +4206,9 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, asection *sec = NULL; bfd_vma value; bfd_vma addend; - bfd_boolean dynamic_symbol_p; - bfd_boolean unresolved_reloc = FALSE; - bfd_boolean undef_weak_ref = FALSE; + bool dynamic_symbol_p; + bool unresolved_reloc = false; + bool undef_weak_ref = false; unsigned long r_type; r_type = ELF64_R_TYPE(rel->r_info); @@ -4219,7 +4219,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (_("%pB: unsupported relocation type %#x"), input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret_val = FALSE; + ret_val = false; continue; } @@ -4285,11 +4285,11 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } - dynamic_symbol_p = FALSE; + dynamic_symbol_p = false; } else { - bfd_boolean warned, ignored; + bool warned, ignored; struct elf_link_hash_entry *hh; struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); @@ -4304,7 +4304,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (value == 0 && ! unresolved_reloc && hh->root.type == bfd_link_hash_undefweak) - undef_weak_ref = TRUE; + undef_weak_ref = true; h = (struct alpha_elf_link_hash_entry *) hh; dynamic_symbol_p = alpha_elf_dynamic_symbol_p (&h->root, info); @@ -4384,7 +4384,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: gp-relative relocation against dynamic symbol %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } BFD_ASSERT(gp != 0); value -= gp; @@ -4397,7 +4397,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: gp-relative relocation against dynamic symbol %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } BFD_ASSERT(gp != 0); value -= gp; @@ -4424,7 +4424,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: pc-relative relocation against dynamic symbol %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } /* The regular PC-relative stuff measures from the start of the instruction rather than the end. */ @@ -4453,7 +4453,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: change in gp: BRSGP %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } /* The symbol should be marked either NOPV or STD_GPLOAD. */ @@ -4484,7 +4484,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: !samegp reloc against symbol without .prologue: %s"), input_bfd, name); - ret_val = FALSE; + ret_val = false; break; } @@ -4543,7 +4543,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (_("%pB: unhandled dynamic relocation against %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } dynindx = 0; dyntype = R_ALPHA_RELATIVE; @@ -4568,7 +4568,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: pc-relative relocation against dynamic symbol %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } else if (bfd_link_pic (info) && undef_weak_ref) @@ -4577,7 +4577,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: pc-relative relocation against undefined weak symbol %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } @@ -4643,7 +4643,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: dtp-relative relocation against dynamic symbol %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); value -= dtp_base; @@ -4660,7 +4660,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: TLS local exec code cannot be linked into shared objects"), input_bfd); - ret_val = FALSE; + ret_val = false; } else if (dynamic_symbol_p) { @@ -4668,7 +4668,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: tp-relative relocation against dynamic symbol %s"), input_bfd, h->root.root.root.string); - ret_val = FALSE; + ret_val = false; } BFD_ASSERT (elf_hash_table (info)->tls_sec != NULL); value -= tp_base; @@ -4747,7 +4747,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, name = (bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name)); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -4769,7 +4769,7 @@ elf64_alpha_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf64_alpha_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym) @@ -4912,12 +4912,12 @@ elf64_alpha_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, || h == elf_hash_table (info)->hplt) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf64_alpha_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -5034,14 +5034,14 @@ elf64_alpha_finish_dynamic_sections (bfd *output_bfd, } } - return TRUE; + return true; } /* We need to use a special link routine to handle the .mdebug section. We need to merge all instances of these sections together, not write them all out sequentially. */ -static bfd_boolean +static bool elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) { asection *o; @@ -5056,7 +5056,7 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) htab = alpha_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Go through the sections and collect the mdebug information. */ mdebug_sec = NULL; @@ -5101,7 +5101,7 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) mdebug_handle = bfd_ecoff_debug_init (abfd, &debug, swap, info); if (mdebug_handle == NULL) - return FALSE; + return false; if (1) { @@ -5140,7 +5140,7 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_ecoff_debug_one_external (abfd, &debug, swap, name[i], &esym)) - return FALSE; + return false; } } @@ -5181,12 +5181,12 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) ecoff_debug_info structure, so we do that now. */ if (!elf64_alpha_read_ecoff_info (input_bfd, input_section, &input_debug)) - return FALSE; + return false; if (! (bfd_ecoff_debug_accumulate (mdebug_handle, abfd, &debug, swap, input_bfd, &input_debug, input_swap, info))) - return FALSE; + return false; /* Loop through the external symbols. For each one with interesting information, try to find the symbol in @@ -5211,7 +5211,7 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) continue; name = input_debug.ssext + ext.asym.iss; - h = alpha_elf_link_hash_lookup (htab, name, FALSE, FALSE, TRUE); + h = alpha_elf_link_hash_lookup (htab, name, false, false, true); if (h == NULL || h->esym.ifd != -2) continue; @@ -5248,12 +5248,12 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) einfo.info = info; einfo.debug = &debug; einfo.swap = swap; - einfo.failed = FALSE; + einfo.failed = false; elf_link_hash_traverse (elf_hash_table (info), elf64_alpha_output_extsym, &einfo); if (einfo.failed) - return FALSE; + return false; /* Set the size of the .mdebug section. */ o->size = bfd_ecoff_debug_size (abfd, &debug, swap); @@ -5268,7 +5268,7 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) /* Invoke the regular ELF backend linker to do all the work. */ if (! bfd_elf_final_link (abfd, info)) - return FALSE; + return false; /* Now write out the computed sections. */ @@ -5290,7 +5290,7 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) sgot->contents, (file_ptr) sgot->output_offset, sgot->size)) - return FALSE; + return false; } } @@ -5300,12 +5300,12 @@ elf64_alpha_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_ecoff_write_accumulated_debug (mdebug_handle, abfd, &debug, swap, info, mdebug_sec->filepos)) - return FALSE; + return false; bfd_ecoff_debug_free (mdebug_handle, abfd, &debug, swap, info); } - return TRUE; + return true; } static enum elf_reloc_type_class @@ -5517,13 +5517,13 @@ static const struct elf_size_info alpha_elf_size_info = "FreeBSD" label in the ELF header. So we put this label on all executables and (for simplicity) also all other object files. */ -static bfd_boolean +static bool elf64_alpha_fbsd_init_file_header (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Ehdr * i_ehdrp; /* ELF file header, internal form. */ if (!_bfd_elf_init_file_header (abfd, info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); @@ -5533,7 +5533,7 @@ elf64_alpha_fbsd_init_file_header (bfd *abfd, struct bfd_link_info *info) /* The ABI label supported by FreeBSD <= 4.0 is quite nonstandard. */ memcpy (&i_ehdrp->e_ident[EI_ABIVERSION], "FreeBSD", 8); #endif - return TRUE; + return true; } #undef elf_backend_init_file_header diff --git a/bfd/elf64-bpf.c b/bfd/elf64-bpf.c index 98bcd3c9f7..28c1543c0b 100644 --- a/bfd/elf64-bpf.c +++ b/bfd/elf64-bpf.c @@ -42,204 +42,204 @@ static reloc_howto_type bpf_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64-immediate in LDDW instruction. */ HOWTO (R_BPF_INSN_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 32, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_INSN_64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32-immediate in many instructions. */ HOWTO (R_BPF_INSN_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 32, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_INSN_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16-bit offsets in instructions. */ HOWTO (R_BPF_INSN_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_INSN_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16-bit PC-relative address in jump instructions. */ HOWTO (R_BPF_INSN_DISP16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 16, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_INSN_DISP16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_BPF_DATA_8_PCREL, 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_8_PCREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_BPF_DATA_16_PCREL, 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_BPF_DATA_32_PCREL, 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_BPF_DATA_8, 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_DATA_8", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xff, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_BPF_DATA_16, 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_DATA_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32-bit PC-relative address in call instructions. */ HOWTO (R_BPF_INSN_DISP32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 32, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_INSN_DISP32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32-bit data. */ HOWTO (R_BPF_DATA_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_DATA_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 64-bit data. */ HOWTO (R_BPF_DATA_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_DATA_64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_BPF_DATA_64_PCREL, 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bpf_elf_generic_reloc, /* special_function */ "R_BPF_64_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; #undef AHOW @@ -312,7 +312,7 @@ bpf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, const char *r_name) /* Set the howto pointer for a bpf reloc. */ -static bfd_boolean +static bool bpf_info_to_howto (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { @@ -325,11 +325,11 @@ bpf_info_to_howto (bfd *abfd, arelent *bfd_reloc, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } bfd_reloc->howto = &bpf_elf_howto_table [r_type]; - return TRUE; + return true; } /* Relocate an eBPF ELF section. @@ -417,9 +417,9 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean unresolved_reloc ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool unresolved_reloc ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -545,7 +545,7 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -572,20 +572,20 @@ bpf_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf64_bpf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { /* Check if we have the same endianness. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; - return TRUE; + return true; } /* A generic howto special function for installing BPF relocations. diff --git a/bfd/elf64-gen.c b/bfd/elf64-gen.c index 6b289c1032..342737d1b2 100644 --- a/bfd/elf64-gen.c +++ b/bfd/elf64-gen.c @@ -31,32 +31,32 @@ static reloc_howto_type dummy = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "UNKNOWN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ -static bfd_boolean +static bool elf_generic_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED) { bfd_reloc->howto = &dummy; - return TRUE; + return true; } -static bfd_boolean +static bool elf_generic_info_to_howto_rel (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc ATTRIBUTE_UNUSED) { bfd_reloc->howto = &dummy; - return TRUE; + return true; } static void @@ -72,20 +72,20 @@ check_for_relocs (bfd * abfd, asection * o, void * failed) abfd, ehdrp->e_machine); bfd_set_error (bfd_error_wrong_format); - * (bfd_boolean *) failed = TRUE; + * (bool *) failed = true; } } -static bfd_boolean +static bool elf64_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean failed = FALSE; + bool failed = false; /* Check if there are any relocations. */ bfd_map_over_sections (abfd, check_for_relocs, & failed); if (failed) - return FALSE; + return false; return bfd_elf_link_add_symbols (abfd, info); } diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 58fc0144ba..7d9ebf8ffe 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -165,83 +165,83 @@ static struct bfd_link_hash_table *elf64_hppa_hash_table_create hash tables and shared functions. */ #include "elf-hppa.h" -static bfd_boolean elf64_hppa_object_p +static bool elf64_hppa_object_p (bfd *); -static bfd_boolean elf64_hppa_create_dynamic_sections +static bool elf64_hppa_create_dynamic_sections (bfd *, struct bfd_link_info *); -static bfd_boolean elf64_hppa_adjust_dynamic_symbol +static bool elf64_hppa_adjust_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -static bfd_boolean elf64_hppa_mark_milli_and_exported_functions +static bool elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *, void *); -static bfd_boolean elf64_hppa_size_dynamic_sections +static bool elf64_hppa_size_dynamic_sections (bfd *, struct bfd_link_info *); static int elf64_hppa_link_output_symbol_hook (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); -static bfd_boolean elf64_hppa_finish_dynamic_symbol +static bool elf64_hppa_finish_dynamic_symbol (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *); -static bfd_boolean elf64_hppa_finish_dynamic_sections +static bool elf64_hppa_finish_dynamic_sections (bfd *, struct bfd_link_info *); -static bfd_boolean elf64_hppa_check_relocs +static bool elf64_hppa_check_relocs (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); -static bfd_boolean elf64_hppa_dynamic_symbol_p +static bool elf64_hppa_dynamic_symbol_p (struct elf_link_hash_entry *, struct bfd_link_info *); -static bfd_boolean elf64_hppa_mark_exported_functions +static bool elf64_hppa_mark_exported_functions (struct elf_link_hash_entry *, void *); -static bfd_boolean elf64_hppa_finalize_opd +static bool elf64_hppa_finalize_opd (struct elf_link_hash_entry *, void *); -static bfd_boolean elf64_hppa_finalize_dlt +static bool elf64_hppa_finalize_dlt (struct elf_link_hash_entry *, void *); -static bfd_boolean allocate_global_data_dlt +static bool allocate_global_data_dlt (struct elf_link_hash_entry *, void *); -static bfd_boolean allocate_global_data_plt +static bool allocate_global_data_plt (struct elf_link_hash_entry *, void *); -static bfd_boolean allocate_global_data_stub +static bool allocate_global_data_stub (struct elf_link_hash_entry *, void *); -static bfd_boolean allocate_global_data_opd +static bool allocate_global_data_opd (struct elf_link_hash_entry *, void *); -static bfd_boolean get_reloc_section +static bool get_reloc_section (bfd *, struct elf64_hppa_link_hash_table *, asection *); -static bfd_boolean count_dyn_reloc +static bool count_dyn_reloc (bfd *, struct elf64_hppa_link_hash_entry *, int, asection *, int, bfd_vma, bfd_vma); -static bfd_boolean allocate_dynrel_entries +static bool allocate_dynrel_entries (struct elf_link_hash_entry *, void *); -static bfd_boolean elf64_hppa_finalize_dynreloc +static bool elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *, void *); -static bfd_boolean get_opd +static bool get_opd (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); -static bfd_boolean get_plt +static bool get_plt (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); -static bfd_boolean get_dlt +static bool get_dlt (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); -static bfd_boolean get_stub +static bool get_stub (bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *); static int elf64_hppa_elf_get_symbol_type @@ -303,7 +303,7 @@ elf64_hppa_hash_table_create (bfd *abfd) return NULL; } - htab->root.dt_pltgot_required = TRUE; + htab->root.dt_pltgot_required = true; htab->text_segment_base = (bfd_vma) -1; htab->data_segment_base = (bfd_vma) -1; @@ -313,7 +313,7 @@ elf64_hppa_hash_table_create (bfd *abfd) /* Return nonzero if ABFD represents a PA2.0 ELF64 file. Additionally we set the default architecture and machine. */ -static bfd_boolean +static bool elf64_hppa_object_p (bfd *abfd) { Elf_Internal_Ehdr * i_ehdrp; @@ -326,7 +326,7 @@ elf64_hppa_object_p (bfd *abfd) but the kernel produces corefiles with OSABI=SysV. */ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_GNU && i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ - return FALSE; + return false; } else { @@ -334,7 +334,7 @@ elf64_hppa_object_p (bfd *abfd) but the kernel produces corefiles with OSABI=SysV. */ if (i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_HPUX && i_ehdrp->e_ident[EI_OSABI] != ELFOSABI_NONE) /* aka SYSV */ - return FALSE; + return false; } flags = i_ehdrp->e_flags; @@ -353,12 +353,12 @@ elf64_hppa_object_p (bfd *abfd) return bfd_default_set_arch_mach (abfd, bfd_arch_hppa, 25); } /* Don't be fussy. */ - return TRUE; + return true; } /* Given section type (hdr->sh_type), return a boolean indicating whether or not the section is an elf64-hppa specific section. */ -static bfd_boolean +static bool elf64_hppa_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -368,20 +368,20 @@ elf64_hppa_section_from_shdr (bfd *abfd, { case SHT_PARISC_EXT: if (strcmp (name, ".PARISC.archext") != 0) - return FALSE; + return false; break; case SHT_PARISC_UNWIND: if (strcmp (name, ".PARISC.unwind") != 0) - return FALSE; + return false; break; case SHT_PARISC_DOC: case SHT_PARISC_ANNOT: default: - return FALSE; + return false; } if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; return ((hdr->sh_flags & SHF_PARISC_SHORT) == 0 || bfd_set_section_flags (hdr->bfd_section, @@ -391,7 +391,7 @@ elf64_hppa_section_from_shdr (bfd *abfd, /* SEC is a section containing relocs for an input BFD when linking; return a suitable section for holding relocs in the output BFD for a link. */ -static bfd_boolean +static bool get_reloc_section (bfd *abfd, struct elf64_hppa_link_hash_table *hppa_info, asection *sec) @@ -404,7 +404,7 @@ get_reloc_section (bfd *abfd, (abfd, elf_elfheader(abfd)->e_shstrndx, _bfd_elf_single_rel_hdr(sec)->sh_name)); if (srel_name == NULL) - return FALSE; + return false; dynobj = hppa_info->root.dynobj; if (!dynobj) @@ -422,11 +422,11 @@ get_reloc_section (bfd *abfd, | SEC_READONLY)); if (srel == NULL || !bfd_set_section_alignment (srel, 3)) - return FALSE; + return false; } hppa_info->other_rel_sec = srel; - return TRUE; + return true; } /* Add a new entry to the list of dynamic relocations against DYN_H. @@ -435,7 +435,7 @@ get_reloc_section (bfd *abfd, particular symbol so that we can create FPTR relocations in the output file. */ -static bfd_boolean +static bool count_dyn_reloc (bfd *abfd, struct elf64_hppa_link_hash_entry *hh, int type, @@ -449,7 +449,7 @@ count_dyn_reloc (bfd *abfd, rent = (struct elf64_hppa_dyn_reloc_entry *) bfd_alloc (abfd, (bfd_size_type) sizeof (*rent)); if (!rent) - return FALSE; + return false; rent->next = hh->reloc_entries; rent->type = type; @@ -459,7 +459,7 @@ count_dyn_reloc (bfd *abfd, rent->addend = addend; hh->reloc_entries = rent; - return TRUE; + return true; } /* Return a pointer to the local DLT, PLT and OPD reference counts @@ -490,7 +490,7 @@ hppa64_elf_local_refcounts (bfd *abfd) /* Scan the RELOCS and record the type of dynamic entries that each referenced symbol needs. */ -static bfd_boolean +static bool elf64_hppa_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -503,19 +503,19 @@ elf64_hppa_check_relocs (bfd *abfd, unsigned int sec_symndx; if (bfd_link_relocatable (info)) - return TRUE; + return true; /* If this is the first dynamic object found in the link, create the special sections required for dynamic linking. */ if (! elf_hash_table (info)->dynamic_sections_created) { if (! _bfd_elf_link_create_dynamic_sections (abfd, info)) - return FALSE; + return false; } hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; /* If necessary, build a new table holding section symbols indices @@ -545,7 +545,7 @@ elf64_hppa_check_relocs (bfd *abfd, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (local_syms == NULL) - return FALSE; + return false; } /* Record the highest section index referenced by the local symbols. */ @@ -601,7 +601,7 @@ elf64_hppa_check_relocs (bfd *abfd, /* If we did not find a section symbol for this section, then something went terribly wrong above. */ if (sec_symndx == SHN_BAD) - return FALSE; + return false; if (sec_symndx < SHN_LORESERVE) sec_symndx = hppa_info->section_syms[sec_symndx]; @@ -626,7 +626,7 @@ elf64_hppa_check_relocs (bfd *abfd, unsigned long r_symndx = ELF64_R_SYM (rel->r_info); struct elf64_hppa_link_hash_entry *hh; int need_entry; - bfd_boolean maybe_dynamic; + bool maybe_dynamic; int dynrel_type = R_PARISC_NONE; static reloc_howto_type *howto; @@ -651,13 +651,13 @@ elf64_hppa_check_relocs (bfd *abfd, locally or externally defined, as not all of the input files have yet been processed. Do something with what we know, as this may help reduce memory usage and processing time later. */ - maybe_dynamic = FALSE; + maybe_dynamic = false; if (hh && ((bfd_link_pic (info) && (!info->symbolic || info->unresolved_syms_in_shared_libs == RM_IGNORE)) || !hh->eh.def_regular || hh->eh.root.type == bfd_link_hash_defweak)) - maybe_dynamic = TRUE; + maybe_dynamic = true; howto = elf_hppa_howto_table + ELF64_R_TYPE (rel->r_info); need_entry = 0; @@ -795,7 +795,7 @@ elf64_hppa_check_relocs (bfd *abfd, /* This is a DLT entry for a local symbol. */ local_dlt_refcounts = hppa64_elf_local_refcounts (abfd); if (local_dlt_refcounts == NULL) - return FALSE; + return false; local_dlt_refcounts[r_symndx] += 1; } } @@ -820,7 +820,7 @@ elf64_hppa_check_relocs (bfd *abfd, /* This is a PLT entry for a local symbol. */ local_dlt_refcounts = hppa64_elf_local_refcounts (abfd); if (local_dlt_refcounts == NULL) - return FALSE; + return false; local_plt_refcounts = local_dlt_refcounts + symtab_hdr->sh_info; local_plt_refcounts[r_symndx] += 1; } @@ -854,7 +854,7 @@ elf64_hppa_check_relocs (bfd *abfd, /* This is a OPD for a local symbol. */ local_dlt_refcounts = hppa64_elf_local_refcounts (abfd); if (local_dlt_refcounts == NULL) - return FALSE; + return false; local_opd_refcounts = (local_dlt_refcounts + 2 * symtab_hdr->sh_info); local_opd_refcounts[r_symndx] += 1; @@ -882,14 +882,14 @@ elf64_hppa_check_relocs (bfd *abfd, if (bfd_link_pic (info) && dynrel_type == R_PARISC_FPTR64 && ! (bfd_elf_link_record_local_dynamic_symbol (info, abfd, sec_symndx))) - return FALSE; + return false; } } - return TRUE; + return true; err_out: - return FALSE; + return false; } struct elf64_hppa_allocate_data @@ -900,7 +900,7 @@ struct elf64_hppa_allocate_data /* Should we do dynamic things to this symbol? */ -static bfd_boolean +static bool elf64_hppa_dynamic_symbol_p (struct elf_link_hash_entry *eh, struct bfd_link_info *info) { @@ -911,18 +911,18 @@ elf64_hppa_dynamic_symbol_p (struct elf_link_hash_entry *eh, { /* ??? Why is this here and not elsewhere is_local_label_name. */ if (eh->root.root.string[0] == '$' && eh->root.root.string[1] == '$') - return FALSE; + return false; - return TRUE; + return true; } else - return FALSE; + return false; } /* Mark all functions exported by this file so that we can later allocate entries in .opd for them. */ -static bfd_boolean +static bool elf64_hppa_mark_exported_functions (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); @@ -931,7 +931,7 @@ elf64_hppa_mark_exported_functions (struct elf_link_hash_entry *eh, void *data) hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; if (eh && (eh->root.type == bfd_link_hash_defined @@ -941,7 +941,7 @@ elf64_hppa_mark_exported_functions (struct elf_link_hash_entry *eh, void *data) { if (! hppa_info->opd_sec && ! get_opd (hppa_info->root.dynobj, info, hppa_info)) - return FALSE; + return false; hh->want_opd = 1; @@ -950,12 +950,12 @@ elf64_hppa_mark_exported_functions (struct elf_link_hash_entry *eh, void *data) eh->needs_plt = 1; } - return TRUE; + return true; } /* Allocate space for a DLT entry. */ -static bfd_boolean +static bool allocate_global_data_dlt (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); @@ -974,19 +974,19 @@ allocate_global_data_dlt (struct elf_link_hash_entry *eh, void *data) if (! (bfd_elf_link_record_local_dynamic_symbol (x->info, owner, hh->sym_indx))) - return FALSE; + return false; } } hh->dlt_offset = x->ofs; x->ofs += DLT_ENTRY_SIZE; } - return TRUE; + return true; } /* Allocate space for a DLT.PLT entry. */ -static bfd_boolean +static bool allocate_global_data_plt (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); @@ -1006,7 +1006,7 @@ allocate_global_data_plt (struct elf_link_hash_entry *eh, void *data) hppa_info = hppa_link_hash_table (x->info); if (hppa_info == NULL) - return FALSE; + return false; hppa_info->gp_offset = hh->plt_offset; } @@ -1014,12 +1014,12 @@ allocate_global_data_plt (struct elf_link_hash_entry *eh, void *data) else hh->want_plt = 0; - return TRUE; + return true; } /* Allocate space for a STUB entry. */ -static bfd_boolean +static bool allocate_global_data_stub (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); @@ -1036,12 +1036,12 @@ allocate_global_data_stub (struct elf_link_hash_entry *eh, void *data) } else hh->want_stub = 0; - return TRUE; + return true; } /* Allocate space for a FPTR entry. */ -static bfd_boolean +static bool allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); @@ -1078,7 +1078,7 @@ allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data) if (!bfd_elf_link_record_local_dynamic_symbol (x->info, owner, hh->sym_indx)) - return FALSE; + return false; } /* This may not be necessary or desirable anymore now that @@ -1094,7 +1094,7 @@ allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data) new_name = concat (".", eh->root.root.string, NULL); nh = elf_link_hash_lookup (elf_hash_table (x->info), - new_name, TRUE, TRUE, TRUE); + new_name, true, true, true); free (new_name); nh->root.type = eh->root.type; @@ -1102,7 +1102,7 @@ allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data) nh->root.u.def.section = eh->root.u.def.section; if (! bfd_elf_link_record_dynamic_symbol (x->info, nh)) - return FALSE; + return false; } hh->opd_offset = x->ofs; x->ofs += OPD_ENTRY_SIZE; @@ -1112,24 +1112,24 @@ allocate_global_data_opd (struct elf_link_hash_entry *eh, void *data) else hh->want_opd = 0; } - return TRUE; + return true; } /* HP requires the EI_OSABI field to be filled in. The assignment to EI_ABIVERSION may not be strictly necessary. */ -static bfd_boolean +static bool elf64_hppa_init_file_header (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Ehdr *i_ehdrp; if (!_bfd_elf_init_file_header (abfd, info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi; i_ehdrp->e_ident[EI_ABIVERSION] = 1; - return TRUE; + return true; } /* Create function descriptor section (.opd). This section is called .opd @@ -1137,7 +1137,7 @@ elf64_hppa_init_file_header (bfd *abfd, struct bfd_link_info *info) refers to the fact that these descriptors are used when taking the address of a procedure, thus ensuring a unique address for each procedure. */ -static bfd_boolean +static bool get_opd (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf64_hppa_link_hash_table *hppa_info) @@ -1162,18 +1162,18 @@ get_opd (bfd *abfd, || !bfd_set_section_alignment (opd, 3)) { BFD_ASSERT (0); - return FALSE; + return false; } hppa_info->opd_sec = opd; } - return TRUE; + return true; } /* Create the PLT section. */ -static bfd_boolean +static bool get_plt (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf64_hppa_link_hash_table *hppa_info) @@ -1198,18 +1198,18 @@ get_plt (bfd *abfd, || !bfd_set_section_alignment (plt, 3)) { BFD_ASSERT (0); - return FALSE; + return false; } hppa_info->root.splt = plt; } - return TRUE; + return true; } /* Create the DLT section. */ -static bfd_boolean +static bool get_dlt (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf64_hppa_link_hash_table *hppa_info) @@ -1234,18 +1234,18 @@ get_dlt (bfd *abfd, || !bfd_set_section_alignment (dlt, 3)) { BFD_ASSERT (0); - return FALSE; + return false; } hppa_info->dlt_sec = dlt; } - return TRUE; + return true; } /* Create the stubs section. */ -static bfd_boolean +static bool get_stub (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf64_hppa_link_hash_table *hppa_info) @@ -1270,13 +1270,13 @@ get_stub (bfd *abfd, || !bfd_set_section_alignment (stub, 3)) { BFD_ASSERT (0); - return FALSE; + return false; } hppa_info->stub_sec = stub; } - return TRUE; + return true; } /* Create sections necessary for dynamic linking. This is only a rough @@ -1317,7 +1317,7 @@ get_stub (bfd *abfd, .rela.opd: EPLT relocations for symbols exported from shared libraries. */ -static bfd_boolean +static bool elf64_hppa_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { @@ -1326,19 +1326,19 @@ elf64_hppa_create_dynamic_sections (bfd *abfd, hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; if (! get_stub (abfd, info, hppa_info)) - return FALSE; + return false; if (! get_dlt (abfd, info, hppa_info)) - return FALSE; + return false; if (! get_plt (abfd, info, hppa_info)) - return FALSE; + return false; if (! get_opd (abfd, info, hppa_info)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".rela.dlt", (SEC_ALLOC | SEC_LOAD @@ -1348,7 +1348,7 @@ elf64_hppa_create_dynamic_sections (bfd *abfd, | SEC_LINKER_CREATED)); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; hppa_info->dlt_rel_sec = s; s = bfd_make_section_anyway_with_flags (abfd, ".rela.plt", @@ -1359,7 +1359,7 @@ elf64_hppa_create_dynamic_sections (bfd *abfd, | SEC_LINKER_CREATED)); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; hppa_info->root.srelplt = s; s = bfd_make_section_anyway_with_flags (abfd, ".rela.data", @@ -1370,7 +1370,7 @@ elf64_hppa_create_dynamic_sections (bfd *abfd, | SEC_LINKER_CREATED)); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; hppa_info->other_rel_sec = s; s = bfd_make_section_anyway_with_flags (abfd, ".rela.opd", @@ -1381,27 +1381,27 @@ elf64_hppa_create_dynamic_sections (bfd *abfd, | SEC_LINKER_CREATED)); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; hppa_info->opd_rel_sec = s; - return TRUE; + return true; } /* Allocate dynamic relocations for those symbols that turned out to be dynamic. */ -static bfd_boolean +static bool allocate_dynrel_entries (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); struct elf64_hppa_allocate_data *x = (struct elf64_hppa_allocate_data *)data; struct elf64_hppa_link_hash_table *hppa_info; struct elf64_hppa_dyn_reloc_entry *rent; - bfd_boolean dynamic_symbol, shared; + bool dynamic_symbol, shared; hppa_info = hppa_link_hash_table (x->info); if (hppa_info == NULL) - return FALSE; + return false; dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, x->info); shared = bfd_link_pic (x->info); @@ -1409,7 +1409,7 @@ allocate_dynrel_entries (struct elf_link_hash_entry *eh, void *data) /* We may need to allocate relocations for a non-dynamic symbol when creating a shared library. */ if (!dynamic_symbol && !shared) - return TRUE; + return true; /* Take care of the normal data relocations. */ @@ -1428,7 +1428,7 @@ allocate_dynrel_entries (struct elf_link_hash_entry *eh, void *data) if (eh->dynindx == -1 && eh->type != STT_PARISC_MILLI) if (!bfd_elf_link_record_local_dynamic_symbol (x->info, rent->sec->owner, hh->sym_indx)) - return FALSE; + return false; } /* Take care of the GOT and PLT relocations. */ @@ -1457,13 +1457,13 @@ allocate_dynrel_entries (struct elf_link_hash_entry *eh, void *data) hppa_info->root.srelplt->size += t; } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a regular object. */ -static bfd_boolean +static bool elf64_hppa_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *eh) { @@ -1479,7 +1479,7 @@ elf64_hppa_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, BFD_ASSERT (def->root.type == bfd_link_hash_defined); eh->root.u.def.section = def->root.u.def.section; eh->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* If this is a reference to a symbol defined by a dynamic object which @@ -1489,7 +1489,7 @@ elf64_hppa_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, But PA64 code is canonically PIC, so as a rule we can avoid this sort of hackery. */ - return TRUE; + return true; } /* This function is called via elf_link_hash_traverse to mark millicode @@ -1497,7 +1497,7 @@ elf64_hppa_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, from the dynamic symbol table. If the symbol is not a millicode symbol, elf64_hppa_mark_exported_functions is called. */ -static bfd_boolean +static bool elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh, void *data) { @@ -1511,7 +1511,7 @@ elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh, _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, eh->dynstr_index); } - return TRUE; + return true; } return elf64_hppa_mark_exported_functions (eh, data); @@ -1520,7 +1520,7 @@ elf64_hppa_mark_milli_and_exported_functions (struct elf_link_hash_entry *eh, /* Set the final sizes of the dynamic sections and allocate memory for the contents of our special sections. */ -static bfd_boolean +static bool elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct elf64_hppa_link_hash_table *hppa_info; @@ -1528,11 +1528,11 @@ elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) bfd *dynobj; bfd *ibfd; asection *sec; - bfd_boolean relocs; + bool relocs; hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; dynobj = hppa_info->root.dynobj; BFD_ASSERT (dynobj != NULL); @@ -1736,7 +1736,7 @@ elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) allocate_dynrel_entries, &data); /* The sizes of all the sections are set. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (sec = dynobj->sections; sec != NULL; sec = sec->next) { const char *name; @@ -1767,7 +1767,7 @@ elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) /* Remember whether there are any reloc sections other than .rela.plt. */ if (strcmp (name, ".rela.plt") != 0) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -1808,7 +1808,7 @@ elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size); if (sec->contents == NULL) - return FALSE; + return false; } } @@ -1821,7 +1821,7 @@ elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) _bfd_elf_add_dynamic_entry (info, TAG, VAL) if (!add_dynamic_entry (DT_HP_DLD_FLAGS, 0)) - return FALSE; + return false; /* Add some entries to the .dynamic section. We fill in the values later, in elf64_hppa_finish_dynamic_sections, but we @@ -1832,13 +1832,13 @@ elf64_hppa_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { if (!add_dynamic_entry (DT_HP_DLD_HOOK, 0) || !add_dynamic_entry (DT_HP_LOAD_MAP, 0)) - return FALSE; + return false; } /* Force DT_FLAGS to always be set. Required by HPUX 11.00 patch PHSS_26559. */ if (!add_dynamic_entry (DT_FLAGS, (info)->flags)) - return FALSE; + return false; } #undef add_dynamic_entry @@ -1888,7 +1888,7 @@ elf64_hppa_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf64_hppa_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *eh, @@ -1900,7 +1900,7 @@ elf64_hppa_finish_dynamic_symbol (bfd *output_bfd, hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; stub = hppa_info->stub_sec; splt = hppa_info->root.splt; @@ -2032,7 +2032,7 @@ elf64_hppa_finish_dynamic_symbol (bfd *output_bfd, /* xgettext:c-format */ (_("stub entry for %s cannot load .plt, dp offset = %" PRId64), hh->eh.root.root.string, (int64_t) value); - return FALSE; + return false; } bfd_put_32 (stub->owner, (bfd_vma) insn, @@ -2055,13 +2055,13 @@ elf64_hppa_finish_dynamic_symbol (bfd *output_bfd, stub->contents + hh->stub_offset + 8); } - return TRUE; + return true; } /* The .opd section contains FPTRs for each function this file exports. Initialize the FPTR entries. */ -static bfd_boolean +static bool elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); @@ -2072,7 +2072,7 @@ elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data) hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; sopd = hppa_info->opd_sec; sopdrel = hppa_info->opd_rel_sec; @@ -2158,7 +2158,7 @@ elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data) new_name = concat (".", eh->root.root.string, NULL); nh = elf_link_hash_lookup (elf_hash_table (info), - new_name, TRUE, TRUE, FALSE); + new_name, true, true, false); /* All we really want from the new symbol is its dynamic symbol index. */ @@ -2174,14 +2174,14 @@ elf64_hppa_finalize_opd (struct elf_link_hash_entry *eh, void *data) loc += sopdrel->reloc_count++ * sizeof (Elf64_External_Rela); bfd_elf64_swap_reloca_out (info->output_bfd, &rel, loc); } - return TRUE; + return true; } /* The .dlt section contains addresses for items referenced through the dlt. Note that we can have a DLTIND relocation for a local symbol, thus we can not depend on finish_dynamic_symbol to initialize the .dlt. */ -static bfd_boolean +static bool elf64_hppa_finalize_dlt (struct elf_link_hash_entry *eh, void *data) { struct elf64_hppa_link_hash_entry *hh = hppa_elf_hash_entry (eh); @@ -2191,7 +2191,7 @@ elf64_hppa_finalize_dlt (struct elf_link_hash_entry *eh, void *data) hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; sdlt = hppa_info->dlt_sec; sdltrel = hppa_info->dlt_rel_sec; @@ -2269,13 +2269,13 @@ elf64_hppa_finalize_dlt (struct elf_link_hash_entry *eh, void *data) loc += sdltrel->reloc_count++ * sizeof (Elf64_External_Rela); bfd_elf64_swap_reloca_out (info->output_bfd, &rel, loc); } - return TRUE; + return true; } /* Finalize the dynamic relocations. Specifically the FPTR relocations for dynamic functions used to initialize static data. */ -static bfd_boolean +static bool elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh, void *data) { @@ -2287,7 +2287,7 @@ elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh, dynamic_symbol = elf64_hppa_dynamic_symbol_p (eh, info); if (!dynamic_symbol && !bfd_link_pic (info)) - return TRUE; + return true; if (hh->reloc_entries) { @@ -2296,7 +2296,7 @@ elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh, hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; /* We may need to do a relocation against a local symbol, in which case we have to look up it's dynamic symbol index off @@ -2387,7 +2387,7 @@ elf64_hppa_finalize_dynreloc (struct elf_link_hash_entry *eh, } } - return TRUE; + return true; } /* Used to decide how to sort relocs in an optimal manner for the @@ -2414,7 +2414,7 @@ elf64_hppa_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf64_hppa_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -2424,7 +2424,7 @@ elf64_hppa_finish_dynamic_sections (bfd *output_bfd, hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; /* Finalize the contents of the .opd section. */ elf_link_hash_traverse (elf_hash_table (info), @@ -2473,7 +2473,7 @@ elf64_hppa_finish_dynamic_sections (bfd *output_bfd, to is find the start of the .data section. */ s = bfd_get_section_by_name (output_bfd, ".data"); if (!s) - return FALSE; + return false; dyn.d_un.d_ptr = s->vma; bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon); break; @@ -2525,12 +2525,12 @@ elf64_hppa_finish_dynamic_sections (bfd *output_bfd, } } - return TRUE; + return true; } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf64_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -2539,7 +2539,7 @@ elf64_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 760: /* Linux/hppa */ /* pr_cursig */ @@ -2560,7 +2560,7 @@ elf64_hppa_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf64_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { char * command; @@ -2569,7 +2569,7 @@ elf64_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 136: /* Linux/hppa elf_prpsinfo. */ elf_tdata (abfd)->core->program @@ -2587,7 +2587,7 @@ elf64_hppa_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) if (0 < n && command[n - 1] == ' ') command[n - 1] = '\0'; - return TRUE; + return true; } /* Return the number of additional phdrs we will need. @@ -2616,12 +2616,12 @@ elf64_hppa_additional_program_headers (bfd *abfd, return 0; } -static bfd_boolean +static bool elf64_hppa_allow_non_load_phdr (bfd *abfd ATTRIBUTE_UNUSED, const Elf_Internal_Phdr *phdr ATTRIBUTE_UNUSED, unsigned int count ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Allocate and initialize any program headers required by this @@ -2637,7 +2637,7 @@ elf64_hppa_allow_non_load_phdr (bfd *abfd ATTRIBUTE_UNUSED, to guess whether or not we are building a shared library based on the existence of a .interp section. */ -static bfd_boolean +static bool elf64_hppa_modify_segment_map (bfd *abfd, struct bfd_link_info *info) { struct elf_segment_map *m; @@ -2648,7 +2648,7 @@ elf64_hppa_modify_segment_map (bfd *abfd, struct bfd_link_info *info) m = ((struct elf_segment_map *) bfd_zalloc (abfd, (bfd_size_type) sizeof *m)); if (m == NULL) - return FALSE; + return false; m->p_type = PT_PHDR; m->p_flags = PF_R | PF_X; @@ -2678,7 +2678,7 @@ elf64_hppa_modify_segment_map (bfd *abfd, struct bfd_link_info *info) } } - return TRUE; + return true; } /* Called when writing out an object file to decide the type of a @@ -2695,7 +2695,7 @@ elf64_hppa_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, /* Support HP specific sections for core files. */ -static bfd_boolean +static bool elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int sec_index, const char *typename) { @@ -2704,15 +2704,15 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int sec_index, asection *sect; if (!_bfd_elf_make_section_from_phdr (abfd, hdr, sec_index, typename)) - return FALSE; + return false; sect = bfd_make_section_anyway (abfd, ".kernel"); if (sect == NULL) - return FALSE; + return false; sect->size = hdr->p_filesz; sect->filepos = hdr->p_offset; sect->flags = SEC_HAS_CONTENTS | SEC_READONLY; - return TRUE; + return true; } if (hdr->p_type == PT_HP_CORE_PROC) @@ -2720,14 +2720,14 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int sec_index, int sig; if (bfd_seek (abfd, hdr->p_offset, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bread (&sig, 4, abfd) != 4) - return FALSE; + return false; elf_tdata (abfd)->core->signal = sig; if (!_bfd_elf_make_section_from_phdr (abfd, hdr, sec_index, typename)) - return FALSE; + return false; /* GDB uses the ".reg" section to read register contents. */ return _bfd_elfcore_make_pseudosection (abfd, ".reg", hdr->p_filesz, @@ -2746,7 +2746,7 @@ elf64_hppa_section_from_phdr (bfd *abfd, Elf_Internal_Phdr *hdr, int sec_index, file. HP's libraries define symbols with HP specific section indices, which we have to handle. */ -static bfd_boolean +static bool elf_hppa_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -2772,10 +2772,10 @@ elf_hppa_add_symbol_hook (bfd *abfd, break; } - return TRUE; + return true; } -static bfd_boolean +static bool elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h, void *data) { @@ -2803,10 +2803,10 @@ elf_hppa_unmark_useless_dynamic_symbols (struct elf_link_hash_entry *h, h->pointer_equality_needed = 1; } - return TRUE; + return true; } -static bfd_boolean +static bool elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h, void *data) { @@ -2835,10 +2835,10 @@ elf_hppa_remark_useless_dynamic_symbols (struct elf_link_hash_entry *h, h->pointer_equality_needed = 0; } - return TRUE; + return true; } -static bfd_boolean +static bool elf_hppa_is_dynamic_loader_symbol (const char *name) { return (! strcmp (name, "__CPU_REVISION") @@ -2890,14 +2890,14 @@ elf_hppa_record_segment_addrs (bfd *abfd, We use this hook to (possibly) provide a value for __gp, then we fall back to the generic ELF final link routine. */ -static bfd_boolean +static bool elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) { struct stat buf; struct elf64_hppa_link_hash_table *hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; if (! bfd_link_relocatable (info)) { @@ -2908,8 +2908,8 @@ elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) by one of the objects being linked. First try to find the symbol in the hash table. If that fails, just compute the value __gp should have had. */ - gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE, - FALSE, FALSE); + gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false, + false, false); if (gp) { @@ -2978,7 +2978,7 @@ elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) /* Invoke the regular ELF backend linker to do all the work. */ if (!bfd_elf_final_link (abfd, info)) - return FALSE; + return false; elf_link_hash_traverse (elf_hash_table (info), elf_hppa_remark_useless_dynamic_symbols, @@ -2987,14 +2987,14 @@ elf_hppa_final_link (bfd *abfd, struct bfd_link_info *info) /* If we're producing a final executable, sort the contents of the unwind section. */ if (bfd_link_relocatable (info)) - return TRUE; + return true; /* Do not attempt to sort non-regular files. This is here especially for configure scripts and kernel builds which run tests with "ld [...] -o /dev/null". */ if (stat (bfd_get_filename (abfd), &buf) != 0 || !S_ISREG(buf.st_mode)) - return TRUE; + return true; return elf_hppa_sort_unwind (abfd); } @@ -3752,7 +3752,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, hppa_info = hppa_link_hash_table (info); if (hppa_info == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; @@ -3773,7 +3773,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, if (r_type < 0 || r_type >= (int) R_PARISC_UNIMPLEMENTED) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (r_type == (unsigned int) R_PARISC_GNU_VTENTRY || r_type == (unsigned int) R_PARISC_GNU_VTINHERIT) @@ -3799,7 +3799,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, /* It seems this can happen with erroneous or unsupported input (mixing a.out and elf in an archive, for example.) */ if (sym_hashes == NULL) - return FALSE; + return false; eh = sym_hashes[r_symndx - symtab_hdr->sh_info]; @@ -3833,7 +3833,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, continue; else if (!bfd_link_relocatable (info)) { - bfd_boolean err; + bool err; err = (info->unresolved_syms_in_objects == RM_DIAGNOSE && !info->warn_unresolved_syms) @@ -3855,7 +3855,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, && eh->type == STT_PARISC_MILLI) info->callbacks->undefined_symbol (info, eh_name (eh), input_bfd, - input_section, rel->r_offset, FALSE); + input_section, rel->r_offset, false); } } @@ -3889,7 +3889,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (sym_name == NULL) - return FALSE; + return false; if (*sym_name == '\0') sym_name = bfd_section_name (sym_sec); } @@ -3902,7 +3902,7 @@ elf64_hppa_relocate_section (bfd *output_bfd, } } } - return TRUE; + return true; } static const struct bfd_elf_special_section elf64_hppa_special_sections[] = @@ -4021,7 +4021,7 @@ const struct elf_size_info hppa64_elf_size_info = #define elf_backend_plt_readonly 0 #define elf_backend_want_plt_sym 0 #define elf_backend_got_header_size 0 -#define elf_backend_type_change_ok TRUE +#define elf_backend_type_change_ok true #define elf_backend_get_symbol_type elf64_hppa_elf_get_symbol_type #define elf_backend_reloc_type_class elf64_hppa_reloc_type_class #define elf_backend_rela_normal 1 diff --git a/bfd/elf64-ia64-vms.c b/bfd/elf64-ia64-vms.c index 617ecfe5d0..3353f51154 100644 --- a/bfd/elf64-ia64-vms.c +++ b/bfd/elf64-ia64-vms.c @@ -216,22 +216,22 @@ typedef struct static struct elf64_ia64_dyn_sym_info * get_dyn_sym_info (struct elf64_ia64_link_hash_table *, struct elf_link_hash_entry *, - bfd *, const Elf_Internal_Rela *, bfd_boolean); -static bfd_boolean elf64_ia64_dynamic_symbol_p + bfd *, const Elf_Internal_Rela *, bool); +static bool elf64_ia64_dynamic_symbol_p (struct elf_link_hash_entry *); -static bfd_boolean elf64_ia64_choose_gp - (bfd *, struct bfd_link_info *, bfd_boolean); +static bool elf64_ia64_choose_gp + (bfd *, struct bfd_link_info *, bool); static void elf64_ia64_dyn_sym_traverse (struct elf64_ia64_link_hash_table *, - bfd_boolean (*) (struct elf64_ia64_dyn_sym_info *, void *), + bool (*) (struct elf64_ia64_dyn_sym_info *, void *), void *); -static bfd_boolean allocate_global_data_got +static bool allocate_global_data_got (struct elf64_ia64_dyn_sym_info *, void *); -static bfd_boolean allocate_global_fptr_got +static bool allocate_global_fptr_got (struct elf64_ia64_dyn_sym_info *, void *); -static bfd_boolean allocate_local_got +static bool allocate_local_got (struct elf64_ia64_dyn_sym_info *, void *); -static bfd_boolean allocate_dynrel_entries +static bool allocate_dynrel_entries (struct elf64_ia64_dyn_sym_info *, void *); static asection *get_pltoff (bfd *, struct elf64_ia64_link_hash_table *); @@ -241,7 +241,7 @@ static asection *get_got /* Given a ELF reloc, return the matching HOWTO structure. */ -static bfd_boolean +static bool elf64_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) @@ -255,10 +255,10 @@ elf64_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } @@ -330,10 +330,10 @@ elf64_ia64_update_short_info (asection *sec, bfd_vma offset, the other relaxations are done. */ -static bfd_boolean +static bool elf64_ia64_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { struct one_fixup { @@ -350,15 +350,15 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, Elf_Internal_Sym *isymbuf = NULL; struct elf64_ia64_link_hash_table *ia64_info; struct one_fixup *fixups = NULL; - bfd_boolean changed_contents = FALSE; - bfd_boolean changed_relocs = FALSE; - bfd_boolean skip_relax_pass_0 = TRUE; - bfd_boolean skip_relax_pass_1 = TRUE; + bool changed_contents = false; + bool changed_relocs = false; + bool skip_relax_pass_0 = true; + bool skip_relax_pass_1 = true; bfd_vma gp = 0; /* Assume we're not going to change any sizes, and we'll only need one pass. */ - *again = FALSE; + *again = false; if (bfd_link_relocatable (link_info)) (*link_info->callbacks->einfo) @@ -366,7 +366,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, /* Don't even try to relax for non-ELF outputs. */ if (!is_elf_hash_table (link_info->hash)) - return FALSE; + return false; /* Nothing to do if there are no relocations or there is no need for the current pass. */ @@ -374,11 +374,11 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, || sec->reloc_count == 0 || (link_info->relax_pass == 0 && sec->skip_relax_pass_0) || (link_info->relax_pass == 1 && sec->skip_relax_pass_1)) - return TRUE; + return true; ia64_info = elf64_ia64_hash_table (link_info); if (ia64_info == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -387,7 +387,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, link_info->keep_memory)); if (internal_relocs == NULL) - return FALSE; + return false; irelend = internal_relocs + sec->reloc_count; @@ -407,7 +407,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, asection *tsec; struct one_fixup *f; bfd_size_type amt; - bfd_boolean is_branch; + bool is_branch; struct elf64_ia64_dyn_sym_info *dyn_i; switch (r_type) @@ -419,8 +419,8 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, /* In pass 1, all br relaxations are done. We can skip it. */ if (link_info->relax_pass == 1) continue; - skip_relax_pass_0 = FALSE; - is_branch = TRUE; + skip_relax_pass_0 = false; + is_branch = true; break; case R_IA64_PCREL60B: @@ -428,10 +428,10 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, will increase the code size. Defer it to pass 1. */ if (link_info->relax_pass == 0) { - skip_relax_pass_1 = FALSE; + skip_relax_pass_1 = false; continue; } - is_branch = TRUE; + is_branch = true; break; case R_IA64_GPREL22: @@ -443,10 +443,10 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, increase the code size. Defer it to pass 1. */ if (link_info->relax_pass == 0) { - skip_relax_pass_1 = FALSE; + skip_relax_pass_1 = false; continue; } - is_branch = FALSE; + is_branch = false; break; default: @@ -484,7 +484,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, tsec = bfd_section_from_elf_index (abfd, isym->st_shndx); toff = isym->st_value; - dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, false); } else { @@ -499,7 +499,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; - dyn_i = get_dyn_sym_info (ia64_info, h, abfd, irel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, abfd, irel, false); /* For branches to dynamic symbols, we're interested instead in a branch to the PLT entry. */ @@ -686,8 +686,8 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, != bfd_reloc_ok) goto error_return; - changed_contents = TRUE; - changed_relocs = TRUE; + changed_contents = true; + changed_relocs = true; } else { @@ -698,7 +698,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, gp = _bfd_get_gp_value (obfd); if (gp == 0) { - if (!elf64_ia64_choose_gp (obfd, link_info, FALSE)) + if (!elf64_ia64_choose_gp (obfd, link_info, false)) goto error_return; gp = _bfd_get_gp_value (obfd); } @@ -721,7 +721,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, irel->r_info = ELF64_R_INFO (ELF64_R_SYM (irel->r_info), R_IA64_GPREL22); - changed_relocs = TRUE; + changed_relocs = true; elf64_ia64_update_short_info (tsec->output_section, tsec->output_offset + toff, @@ -731,8 +731,8 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, { ia64_elf_relax_ldxmov (contents, roff); irel->r_info = ELF64_R_INFO (0, R_IA64_NONE); - changed_contents = TRUE; - changed_relocs = TRUE; + changed_contents = true; + changed_relocs = true; } } } @@ -790,7 +790,7 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, } *again = changed_contents || changed_relocs; - return TRUE; + return true; error_return: if ((unsigned char *) isymbuf != symtab_hdr->contents) @@ -799,14 +799,14 @@ elf64_ia64_relax_section (bfd *abfd, asection *sec, free (contents); if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } #undef skip_relax_pass_0 #undef skip_relax_pass_1 /* Return TRUE if NAME is an unwind table section name. */ -static inline bfd_boolean +static inline bool is_unwind_section_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { return ((startswith (name, ELF_STRING_ia64_unwind) @@ -820,19 +820,19 @@ is_unwind_section_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) /* ??? There is no bfd internal flag equivalent to the SHF_IA_64_NORECOV flag. */ -static bfd_boolean +static bool elf64_ia64_section_flags (const Elf_Internal_Shdr *hdr) { if (hdr->sh_flags & SHF_IA_64_SHORT) hdr->bfd_section->flags |= SEC_SMALL_DATA; - return TRUE; + return true; } /* Set the correct type for an IA-64 ELF section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool elf64_ia64_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) { @@ -853,13 +853,13 @@ elf64_ia64_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, if (sec->flags & SEC_SMALL_DATA) hdr->sh_flags |= SHF_IA_64_SHORT; - return TRUE; + return true; } /* Hook called by the linker routine which adds symbols from an object file. We use it to put .comm items in .sbss, and not .bss. */ -static bfd_boolean +static bool elf64_ia64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -885,20 +885,20 @@ elf64_ia64_add_symbol_hook (bfd *abfd, | SEC_SMALL_DATA | SEC_LINKER_CREATED)); if (scomm == NULL) - return FALSE; + return false; } *secp = scomm; *valp = sym->st_size; } - return TRUE; + return true; } /* According to the Tahoe assembler spec, all labels starting with a '.' are local. */ -static bfd_boolean +static bool elf64_ia64_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { @@ -907,7 +907,7 @@ elf64_ia64_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, /* Should we do dynamic things to this symbol? */ -static bfd_boolean +static bool elf64_ia64_dynamic_symbol_p (struct elf_link_hash_entry *h) { return h != NULL && h->def_dynamic; @@ -944,7 +944,7 @@ elf64_ia64_new_elf_hash_entry (struct bfd_hash_entry *entry, static void elf64_ia64_hash_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *xh, - bfd_boolean force_local) + bool force_local) { struct elf64_ia64_link_hash_entry *h; struct elf64_ia64_dyn_sym_info *dyn_i; @@ -989,7 +989,7 @@ elf64_ia64_local_htab_eq (const void *ptr1, const void *ptr2) /* Free the global elf64_ia64_dyn_sym_info array. */ -static bfd_boolean +static bool elf64_ia64_global_dyn_info_free (void **xentry, void * unused ATTRIBUTE_UNUSED) { @@ -1005,7 +1005,7 @@ elf64_ia64_global_dyn_info_free (void **xentry, entry->sorted_count = 0; entry->size = 0; - return TRUE; + return true; } /* Free the local elf64_ia64_dyn_sym_info array. */ @@ -1023,7 +1023,7 @@ elf64_ia64_local_dyn_info_free (void **slot, entry->sorted_count = 0; entry->size = 0; - return TRUE; + return true; } /* Destroy IA-64 linker hash table. */ @@ -1085,11 +1085,11 @@ elf64_ia64_hash_table_create (bfd *abfd) struct elf64_ia64_dyn_sym_traverse_data { - bfd_boolean (*func) (struct elf64_ia64_dyn_sym_info *, void *); + bool (*func) (struct elf64_ia64_dyn_sym_info *, void *); void * data; }; -static bfd_boolean +static bool elf64_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry, void * xdata) { @@ -1107,8 +1107,8 @@ elf64_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry, count != 0; count--, dyn_i++) if (! (*data->func) (dyn_i, data->data)) - return FALSE; - return TRUE; + return false; + return true; } static int @@ -1125,13 +1125,13 @@ elf64_ia64_local_dyn_sym_thunk (void **slot, void * xdata) count != 0; count--, dyn_i++) if (! (*data->func) (dyn_i, data->data)) - return FALSE; - return TRUE; + return false; + return true; } static void elf64_ia64_dyn_sym_traverse (struct elf64_ia64_link_hash_table *ia64_info, - bfd_boolean (*func) (struct elf64_ia64_dyn_sym_info *, void *), + bool (*func) (struct elf64_ia64_dyn_sym_info *, void *), void * data) { struct elf64_ia64_dyn_sym_traverse_data xdata; @@ -1147,7 +1147,7 @@ elf64_ia64_dyn_sym_traverse (struct elf64_ia64_link_hash_table *ia64_info, #define NOTE_NAME "IPF/VMS" -static bfd_boolean +static bool create_ia64_vms_notes (bfd *abfd, struct bfd_link_info *info, unsigned int time_hi, unsigned int time_lo) { @@ -1166,7 +1166,7 @@ create_ia64_vms_notes (bfd *abfd, struct bfd_link_info *info, ia64_info = elf64_ia64_hash_table (info); - module_name = vms_get_module_name (bfd_get_filename (abfd), TRUE); + module_name = vms_get_module_name (bfd_get_filename (abfd), true); module_name_len = strlen (module_name) + 1; bfd_putl32 (time_lo, cur_time + 0); @@ -1202,7 +1202,7 @@ create_ia64_vms_notes (bfd *abfd, struct bfd_link_info *info, orig_dyn_size = (sizeof (*orig_dyn) + sizeof (IMG_ID) - 1 + 7) & ~7; orig_dyn = bfd_zalloc (abfd, orig_dyn_size); if (orig_dyn == NULL) - return FALSE; + return false; bfd_putl32 (1, orig_dyn->major_id); bfd_putl32 (3, orig_dyn->minor_id); memcpy (orig_dyn->manipulation_date, cur_time, sizeof (cur_time)); @@ -1228,7 +1228,7 @@ create_ia64_vms_notes (bfd *abfd, struct bfd_link_info *info, /* Malloc a temporary buffer large enough for most notes */ note_contents = (unsigned char *) bfd_zalloc (abfd, note_size); if (note_contents == NULL) - return FALSE; + return false; noteptr = note_contents; /* Fill notes. */ @@ -1252,10 +1252,10 @@ create_ia64_vms_notes (bfd *abfd, struct bfd_link_info *info, free (module_name); - return TRUE; + return true; } -static bfd_boolean +static bool elf64_ia64_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { @@ -1266,10 +1266,10 @@ elf64_ia64_create_dynamic_sections (bfd *abfd, ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; if (elf_hash_table (info)->dynamic_sections_created) - return TRUE; + return true; abfd = elf_hash_table (info)->dynobj; bed = get_elf_backend_data (abfd); @@ -1280,19 +1280,19 @@ elf64_ia64_create_dynamic_sections (bfd *abfd, flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".plt", flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; ia64_info->root.splt = s; if (!get_got (abfd, ia64_info)) - return FALSE; + return false; if (!get_pltoff (abfd, ia64_info)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".vmsdynstr", (SEC_ALLOC @@ -1301,7 +1301,7 @@ elf64_ia64_create_dynamic_sections (bfd *abfd, | SEC_LINKER_CREATED)); if (s == NULL || !bfd_set_section_alignment (s, 0)) - return FALSE; + return false; /* Create a fixup section. */ s = bfd_make_section_anyway_with_flags (abfd, ".fixups", @@ -1311,7 +1311,7 @@ elf64_ia64_create_dynamic_sections (bfd *abfd, | SEC_LINKER_CREATED)); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; ia64_info->fixups_sec = s; /* Create the transfer fixup section. */ @@ -1322,7 +1322,7 @@ elf64_ia64_create_dynamic_sections (bfd *abfd, | SEC_LINKER_CREATED)); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; s->size = sizeof (struct elf64_vms_transfer); ia64_info->transfer_sec = s; @@ -1334,18 +1334,18 @@ elf64_ia64_create_dynamic_sections (bfd *abfd, | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, 3)) - return FALSE; + return false; ia64_info->note_sec = s; - elf_hash_table (info)->dynamic_sections_created = TRUE; - return TRUE; + elf_hash_table (info)->dynamic_sections_created = true; + return true; } /* Find and/or create a hash entry for local symbol. */ static struct elf64_ia64_local_hash_entry * get_local_sym_hash (struct elf64_ia64_link_hash_table *ia64_info, bfd *abfd, const Elf_Internal_Rela *rel, - bfd_boolean create) + bool create) { struct elf64_ia64_local_hash_entry e, *ret; asection *sec = abfd->sections; @@ -1575,7 +1575,7 @@ sort_dyn_sym_info (struct elf64_ia64_dyn_sym_info *info, static struct elf64_ia64_dyn_sym_info * get_dyn_sym_info (struct elf64_ia64_link_hash_table *ia64_info, struct elf_link_hash_entry *h, bfd *abfd, - const Elf_Internal_Rela *rel, bfd_boolean create) + const Elf_Internal_Rela *rel, bool create) { struct elf64_ia64_dyn_sym_info **info_p, *info, *dyn_i, key; unsigned int *count_p, *sorted_count_p, *size_p; @@ -1835,7 +1835,7 @@ get_pltoff (bfd *abfd, struct elf64_ia64_link_hash_table *ia64_info) static asection * get_reloc_section (bfd *abfd, struct elf64_ia64_link_hash_table *ia64_info, - asection *sec, bfd_boolean create) + asection *sec, bool create) { const char *srel_name; asection *srel; @@ -1873,7 +1873,7 @@ get_reloc_section (bfd *abfd, return srel; } -static bfd_boolean +static bool count_dyn_reloc (bfd *abfd, struct elf64_ia64_dyn_sym_info *dyn_i, asection *srel, int type) { @@ -1888,7 +1888,7 @@ count_dyn_reloc (bfd *abfd, struct elf64_ia64_dyn_sym_info *dyn_i, rent = ((struct elf64_ia64_dyn_reloc_entry *) bfd_alloc (abfd, (bfd_size_type) sizeof (*rent))); if (!rent) - return FALSE; + return false; rent->next = dyn_i->reloc_entries; rent->srel = srel; @@ -1898,10 +1898,10 @@ count_dyn_reloc (bfd *abfd, struct elf64_ia64_dyn_sym_info *dyn_i, } rent->count++; - return TRUE; + return true; } -static bfd_boolean +static bool elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) @@ -1924,15 +1924,15 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, int need_entry; struct elf_link_hash_entry *h; unsigned long r_symndx; - bfd_boolean maybe_dynamic; + bool maybe_dynamic; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; got = fptr = srel = pltoff = NULL; @@ -2077,8 +2077,8 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, abfd, 0, (bfd_vma) 0); } - if (get_dyn_sym_info (ia64_info, h, abfd, rel, TRUE) == NULL) - return FALSE; + if (get_dyn_sym_info (ia64_info, h, abfd, rel, true) == NULL) + return false; } /* Now, we only do lookup without insertion, which is very fast @@ -2217,7 +2217,7 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, if (!need_entry) continue; - dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, false); /* Record whether or not this is a local symbol. */ dyn_i->h = h; @@ -2229,7 +2229,7 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { got = get_got (abfd, ia64_info); if (!got) - return FALSE; + return false; } if (need_entry & NEED_GOT) dyn_i->want_got = 1; @@ -2243,7 +2243,7 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { fptr = get_fptr (abfd, info, ia64_info); if (!fptr) - return FALSE; + return false; } dyn_i->want_fptr = 1; } @@ -2266,7 +2266,7 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { pltoff = get_pltoff (abfd, ia64_info); if (!pltoff) - return FALSE; + return false; } dyn_i->want_pltoff = 1; @@ -2275,22 +2275,22 @@ elf64_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { if (!srel) { - srel = get_reloc_section (abfd, ia64_info, sec, TRUE); + srel = get_reloc_section (abfd, ia64_info, sec, true); if (!srel) - return FALSE; + return false; } if (!count_dyn_reloc (abfd, dyn_i, srel, dynrel_type)) - return FALSE; + return false; } } - return TRUE; + return true; } /* For cleanliness, and potentially faster dynamic loading, allocate external GOT entries first. */ -static bfd_boolean +static bool allocate_global_data_got (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2304,12 +2304,12 @@ allocate_global_data_got (struct elf64_ia64_dyn_sym_info *dyn_i, dyn_i->got_offset = x->ofs; x->ofs += 8; } - return TRUE; + return true; } /* Next, allocate all the GOT entries used by LTOFF_FPTR relocs. */ -static bfd_boolean +static bool allocate_global_fptr_got (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2322,12 +2322,12 @@ allocate_global_fptr_got (struct elf64_ia64_dyn_sym_info *dyn_i, dyn_i->got_offset = x->ofs; x->ofs += 8; } - return TRUE; + return true; } /* Lastly, allocate all the GOT entries for local data. */ -static bfd_boolean +static bool allocate_local_got (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2339,13 +2339,13 @@ allocate_local_got (struct elf64_ia64_dyn_sym_info *dyn_i, dyn_i->got_offset = x->ofs; x->ofs += 8; } - return TRUE; + return true; } /* Allocate function descriptors. We can do these for every function in a main executable that is not exported. */ -static bfd_boolean +static bool allocate_fptr (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) { struct elf64_ia64_allocate_data *x = (struct elf64_ia64_allocate_data *) data; @@ -2368,12 +2368,12 @@ allocate_fptr (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) else dyn_i->want_fptr = 0; } - return TRUE; + return true; } /* Allocate all the minimal PLT entries. */ -static bfd_boolean +static bool allocate_plt_entries (struct elf64_ia64_dyn_sym_info *dyn_i, void * data ATTRIBUTE_UNUSED) { @@ -2397,12 +2397,12 @@ allocate_plt_entries (struct elf64_ia64_dyn_sym_info *dyn_i, dyn_i->want_plt2 = 0; } } - return TRUE; + return true; } /* Allocate all the full PLT entries. */ -static bfd_boolean +static bool allocate_plt2_entries (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2421,7 +2421,7 @@ allocate_plt2_entries (struct elf64_ia64_dyn_sym_info *dyn_i, h = (struct elf_link_hash_entry *) h->root.u.i.link; dyn_i->h->plt.offset = ofs; } - return TRUE; + return true; } /* Allocate all the PLTOFF entries requested by relocations and @@ -2429,7 +2429,7 @@ allocate_plt2_entries (struct elf64_ia64_dyn_sym_info *dyn_i, because the latter are not necessarily addressable by the GP. ??? Relaxation might be able to determine that they are. */ -static bfd_boolean +static bool allocate_pltoff_entries (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2440,25 +2440,25 @@ allocate_pltoff_entries (struct elf64_ia64_dyn_sym_info *dyn_i, dyn_i->pltoff_offset = x->ofs; x->ofs += 16; } - return TRUE; + return true; } /* Allocate dynamic relocations for those symbols that turned out to be dynamic. */ -static bfd_boolean +static bool allocate_dynrel_entries (struct elf64_ia64_dyn_sym_info *dyn_i, void * data) { struct elf64_ia64_allocate_data *x = (struct elf64_ia64_allocate_data *)data; struct elf64_ia64_link_hash_table *ia64_info; struct elf64_ia64_dyn_reloc_entry *rent; - bfd_boolean dynamic_symbol, shared, resolved_zero; + bool dynamic_symbol, shared, resolved_zero; struct elf64_ia64_link_hash_entry *h_ia64; ia64_info = elf64_ia64_hash_table (x->info); if (ia64_info == NULL) - return FALSE; + return false; /* Note that this can't be used in relation to FPTR relocs below. */ dynamic_symbol = elf64_ia64_dynamic_symbol_p (dyn_i->h); @@ -2563,10 +2563,10 @@ allocate_dynrel_entries (struct elf64_ia64_dyn_sym_info *dyn_i, sizeof (Elf64_External_VMS_IMAGE_FIXUP); } - return TRUE; + return true; } -static bfd_boolean +static bool elf64_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h) { @@ -2582,7 +2582,7 @@ elf64_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* If this is a reference to a symbol defined by a dynamic object which @@ -2592,10 +2592,10 @@ elf64_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, But IA-64 code is canonically PIC, so as a rule we can avoid this sort of hackery. */ - return TRUE; + return true; } -static bfd_boolean +static bool elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2609,7 +2609,7 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, dynobj = hash_table->dynobj; ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; BFD_ASSERT(dynobj != NULL); data.info = info; @@ -2676,7 +2676,7 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, Allocate memory for them. */ for (sec = dynobj->sections; sec != NULL; sec = sec->next) { - bfd_boolean strip; + bool strip; if (!(sec->flags & SEC_LINKER_CREATED)) continue; @@ -2692,7 +2692,7 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, strip = (sec->size == 0); if (sec == ia64_info->root.sgot) - strip = FALSE; + strip = false; else if (sec == ia64_info->root.srelgot) { if (strip) @@ -2744,7 +2744,7 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, name = bfd_section_name (sec); if (strcmp (name, ".got.plt") == 0) - strip = FALSE; + strip = false; else if (startswith (name, ".rel")) { if (!strip) @@ -2765,7 +2765,7 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size); if (sec->contents == NULL && sec->size != 0) - return FALSE; + return false; } } @@ -2795,31 +2795,31 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, vms_get_time (&time_hi, &time_lo); if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_IDENT, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_LINKTIME, (((bfd_uint64_t)time_hi) << 32) + time_lo)) - return FALSE; + return false; /* Strtab. */ strdyn_off = dynsec->size; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_STRTAB_OFFSET, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_STRSZ, 0)) - return FALSE; + return false; /* PLTGOT */ if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_PLTGOT_SEG, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_PLTGOT_OFFSET, 0)) - return FALSE; + return false; /* Misc. */ if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_FPMODE, 0x9800000)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_LNKFLAGS, VMS_LF_IMGSTA | VMS_LF_MAIN)) - return FALSE; + return false; /* Add entries for shared libraries. */ for (abfd = info->input_bfds; abfd; abfd = abfd->link.next) @@ -2836,27 +2836,27 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_NEEDED_IDENT, elf_ia64_vms_ident (abfd))) - return FALSE; + return false; - soname = vms_get_module_name (bfd_get_filename (abfd), TRUE); + soname = vms_get_module_name (bfd_get_filename (abfd), true); if (soname == NULL) - return FALSE; + return false; strindex = dynstrsec->size; soname_len = strlen (soname) + 1; newcontents = (bfd_byte *) bfd_realloc (dynstrsec->contents, strindex + soname_len); if (newcontents == NULL) - return FALSE; + return false; memcpy (newcontents + strindex, soname, soname_len); dynstrsec->size += soname_len; dynstrsec->contents = newcontents; if (!_bfd_elf_add_dynamic_entry (info, DT_NEEDED, strindex)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_FIXUP_NEEDED, shl_num)) - return FALSE; + return false; shl_num++; /* The fixups_off was in fact containing the size of the fixup @@ -2867,27 +2867,27 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_FIXUP_RELA_CNT, fixups_shl_off / sizeof (Elf64_External_VMS_IMAGE_FIXUP))) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_FIXUP_RELA_OFF, fixups_off)) - return FALSE; + return false; fixups_off += fixups_shl_off; } /* Unwind. */ if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_UNWINDSZ, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_UNWIND_CODSEG, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_UNWIND_INFOSEG, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_UNWIND_OFFSET, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_IA_64_VMS_UNWIND_SEG, 0)) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_NULL, 0xdead)) - return FALSE; + return false; /* Fix the strtab entries. */ bed = get_elf_backend_data (hash_table->dynobj); @@ -2913,12 +2913,12 @@ elf64_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Note section. */ if (!create_ia64_vms_notes (output_bfd, info, time_hi, time_lo)) - return FALSE; + return false; } /* ??? Perhaps force __gp local. */ - return TRUE; + return true; } static void @@ -2970,7 +2970,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, { struct elf64_ia64_link_hash_table *ia64_info; asection *got_sec; - bfd_boolean done; + bool done; bfd_vma got_offset; ia64_info = elf64_ia64_hash_table (info); @@ -2989,7 +2989,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, break; default: done = dyn_i->got_done; - dyn_i->got_done = TRUE; + dyn_i->got_done = true; got_offset = dyn_i->got_offset; break; } @@ -3030,7 +3030,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, dyn_r_type = R_IA64_VMS_FIX64; break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); break; } elf64_ia64_install_fixup @@ -3088,7 +3088,7 @@ set_fptr_entry (bfd *abfd, struct bfd_link_info *info, static bfd_vma set_pltoff_entry (bfd *abfd, struct bfd_link_info *info, struct elf64_ia64_dyn_sym_info *dyn_i, - bfd_vma value, bfd_boolean is_plt) + bfd_vma value, bool is_plt) { struct elf64_ia64_link_hash_table *ia64_info; asection *pltoff_sec; @@ -3150,8 +3150,8 @@ elf64_ia64_unwind_entry_compare (const void * a, const void * b) } /* Make sure we've got ourselves a nice fat __gp value. */ -static bfd_boolean -elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) +static bool +elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bool final) { bfd_vma min_vma = (bfd_vma) -1, max_vma = 0; bfd_vma min_short_vma = min_vma, max_short_vma = 0; @@ -3162,7 +3162,7 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; /* Find the min and max vma of all sections marked short. Also collect min and max vma of any type, for use in selecting a nice gp. */ @@ -3211,8 +3211,8 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) } /* See if the user wants to force a value. */ - gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE, - FALSE, FALSE); + gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false, + false, false); if (gp && (gp->root.type == bfd_link_hash_defined @@ -3282,7 +3282,7 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) /* xgettext:c-format */ (_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"), abfd, (uint64_t) (max_short_vma - min_short_vma)); - return FALSE; + return false; } else if ((gp_val > min_short_vma && gp_val - min_short_vma > 0x200000) @@ -3291,16 +3291,16 @@ elf64_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) { _bfd_error_handler (_("%pB: __gp does not cover short data segment"), abfd); - return FALSE; + return false; } } _bfd_set_gp_value (abfd, gp_val); - return TRUE; + return true; } -static bfd_boolean +static bool elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info) { struct elf64_ia64_link_hash_table *ia64_info; @@ -3308,7 +3308,7 @@ elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info) ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; /* Make sure we've got ourselves a nice fat __gp value. */ if (!bfd_link_relocatable (info)) @@ -3319,12 +3319,12 @@ elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info) /* We assume after gp is set, section size will only decrease. We need to adjust gp for it. */ _bfd_set_gp_value (abfd, 0); - if (! elf64_ia64_choose_gp (abfd, info, TRUE)) - return FALSE; + if (! elf64_ia64_choose_gp (abfd, info, true)) + return false; gp_val = _bfd_get_gp_value (abfd); - gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE, - FALSE, FALSE); + gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false, + false, false); if (gp) { gp->root.type = bfd_link_hash_defined; @@ -3346,13 +3346,13 @@ elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info) unwind_output_sec->contents = bfd_malloc (unwind_output_sec->size); if (unwind_output_sec->contents == NULL) - return FALSE; + return false; } } /* Invoke the regular ELF backend linker to do all the work. */ if (!bfd_elf_final_link (abfd, info)) - return FALSE; + return false; if (unwind_output_sec) { @@ -3365,10 +3365,10 @@ elf64_ia64_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_set_section_contents (abfd, unwind_output_sec, unwind_output_sec->contents, (bfd_vma) 0, unwind_output_sec->size)) - return FALSE; + return false; } - return TRUE; + return true; } static int @@ -3385,13 +3385,13 @@ elf64_ia64_relocate_section (bfd *output_bfd, Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; - bfd_boolean ret_val = TRUE; /* for non-fatal errors */ + bool ret_val = true; /* for non-fatal errors */ bfd_vma gp_val; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; /* Infect various flags from the input section to the output section. */ if (bfd_link_relocatable (info)) @@ -3421,8 +3421,8 @@ elf64_ia64_relocate_section (bfd *output_bfd, bfd_vma value; asection *sym_sec; bfd_byte *hit_addr; - bfd_boolean dynamic_symbol_p; - bfd_boolean undef_weak_ref; + bool dynamic_symbol_p; + bool undef_weak_ref; r_type = ELF64_R_TYPE (rel->r_info); if (r_type > R_IA64_MAX_RELOC_CODE) @@ -3431,21 +3431,21 @@ elf64_ia64_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret_val = FALSE; + ret_val = false; continue; } howto = ia64_elf_lookup_howto (r_type); if (howto == NULL) { - ret_val = FALSE; + ret_val = false; continue; } r_symndx = ELF64_R_SYM (rel->r_info); h = NULL; sym = NULL; sym_sec = NULL; - undef_weak_ref = FALSE; + undef_weak_ref = false; if (r_symndx < symtab_hdr->sh_info) { @@ -3462,7 +3462,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, { struct elf64_ia64_local_hash_entry *loc_h; - loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, FALSE); + loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, false); if (loc_h && ! loc_h->sec_merge_done) { struct elf64_ia64_dyn_sym_info *dynent; @@ -3501,8 +3501,8 @@ elf64_ia64_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc; - bfd_boolean warned, ignored; + bool unresolved_reloc; + bool warned, ignored; struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, @@ -3511,7 +3511,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, unresolved_reloc, warned, ignored); if (h->root.type == bfd_link_hash_undefweak) - undef_weak_ref = TRUE; + undef_weak_ref = true; else if (warned) continue; } @@ -3566,7 +3566,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, h ? h->root.root.string : bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sym_sec)); - ret_val = FALSE; + ret_val = false; continue; default: @@ -3596,7 +3596,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, dyn_r_type = R_IA64_VMS_FIX64; break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); break; } elf64_ia64_install_fixup @@ -3629,7 +3629,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, h ? h->root.root.string : bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sym_sec)); - ret_val = FALSE; + ret_val = false; continue; } value -= gp_val; @@ -3639,7 +3639,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, case R_IA64_LTOFF22: case R_IA64_LTOFF22X: case R_IA64_LTOFF64I: - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); value = set_got_entry (input_bfd, info, dyn_i, rel->r_addend, value, R_IA64_DIR64LSB); value -= gp_val; @@ -3650,8 +3650,8 @@ elf64_ia64_relocate_section (bfd *output_bfd, case R_IA64_PLTOFF64I: case R_IA64_PLTOFF64MSB: case R_IA64_PLTOFF64LSB: - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); - value = set_pltoff_entry (output_bfd, info, dyn_i, value, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); + value = set_pltoff_entry (output_bfd, info, dyn_i, value, false); value -= gp_val; r = ia64_elf_install_value (hit_addr, value, r_type); break; @@ -3661,7 +3661,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, case R_IA64_FPTR32LSB: case R_IA64_FPTR64MSB: case R_IA64_FPTR64LSB: - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); if (dyn_i->want_fptr) { if (!undef_weak_ref) @@ -3685,7 +3685,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: linking non-pic code in a position independent executable"), input_bfd); - ret_val = FALSE; + ret_val = false; continue; } } @@ -3711,7 +3711,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, case R_IA64_LTOFF_FPTR32LSB: case R_IA64_LTOFF_FPTR64MSB: case R_IA64_LTOFF_FPTR64LSB: - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); if (dyn_i->want_fptr) { BFD_ASSERT (h == NULL || !h->def_dynamic); @@ -3744,7 +3744,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, /* We should have created a PLT entry for any dynamic symbol. */ dyn_i = NULL; if (h) - dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, false); if (dyn_i && dyn_i->want_plt2) { @@ -3798,7 +3798,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, symtab_hdr, sym, sym_sec)); - ret_val = FALSE; + ret_val = false; continue; } goto finish_pcrel; @@ -3904,7 +3904,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, don't try to continue. */ (*info->callbacks->undefined_symbol) (info, "__gp", input_bfd, input_section, rel->r_offset, 1); - return FALSE; + return false; case bfd_reloc_notsupported: { @@ -3918,7 +3918,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, (*info->callbacks->warning) (info, _("unsupported reloc"), name, input_bfd, input_section, rel->r_offset); - ret_val = FALSE; + ret_val = false; } break; @@ -3989,7 +3989,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, break; } - ret_val = FALSE; + ret_val = false; } break; } @@ -3998,7 +3998,7 @@ elf64_ia64_relocate_section (bfd *output_bfd, return ret_val; } -static bfd_boolean +static bool elf64_ia64_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -4009,9 +4009,9 @@ elf64_ia64_finish_dynamic_symbol (bfd *output_bfd, ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; - dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, false); /* Fill in the PLT data, if required. */ if (dyn_i && dyn_i->want_plt) @@ -4024,7 +4024,7 @@ elf64_ia64_finish_dynamic_symbol (bfd *output_bfd, plt_sec = ia64_info->root.splt; plt_addr = 0; /* Not used as overriden by FIXUPs. */ - pltoff_addr = set_pltoff_entry (output_bfd, info, dyn_i, plt_addr, TRUE); + pltoff_addr = set_pltoff_entry (output_bfd, info, dyn_i, plt_addr, true); /* Initialize the FULL PLT entry, if needed. */ if (dyn_i->want_plt2) @@ -4055,10 +4055,10 @@ elf64_ia64_finish_dynamic_symbol (bfd *output_bfd, || h == ia64_info->root.hplt) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } -static bfd_boolean +static bool elf64_ia64_finish_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { @@ -4067,7 +4067,7 @@ elf64_ia64_finish_dynamic_sections (bfd *abfd, ia64_info = elf64_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; dynobj = ia64_info->root.dynobj; @@ -4178,8 +4178,8 @@ elf64_ia64_finish_dynamic_sections (bfd *abfd, + tfr_sec->output_offset + 6 * 8, tfr->tfradr3); - tfr3 = elf_link_hash_lookup (elf_hash_table (info), "ELF$TFRADR", FALSE, - FALSE, FALSE); + tfr3 = elf_link_hash_lookup (elf_hash_table (info), "ELF$TFRADR", false, + false, false); if (tfr3 && (tfr3->root.type == bfd_link_hash_defined @@ -4200,48 +4200,48 @@ elf64_ia64_finish_dynamic_sections (bfd *abfd, handle lib$initialize. */ } - return TRUE; + return true; } /* ELF file flag handling: */ /* Function to keep IA-64 specific file flags. */ -static bfd_boolean +static bool elf64_ia64_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword out_flags; flagword in_flags; - bfd_boolean ok = TRUE; + bool ok = true; /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; /* Don't even pretend to support mixed-format linking. */ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return FALSE; + return false; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; if (! elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -4251,12 +4251,12 @@ elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) bfd_get_mach (ibfd)); } - return TRUE; + return true; } /* Check flag compatibility. */ if (in_flags == out_flags) - return TRUE; + return true; /* Output has EF_IA_64_REDUCEDFP set only if all inputs have it set. */ if (!(in_flags & EF_IA_64_REDUCEDFP) && (out_flags & EF_IA_64_REDUCEDFP)) @@ -4269,7 +4269,7 @@ elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_BE) != (out_flags & EF_IA_64_BE)) { @@ -4278,7 +4278,7 @@ elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_ABI64) != (out_flags & EF_IA_64_ABI64)) { @@ -4287,7 +4287,7 @@ elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_CONS_GP) != (out_flags & EF_IA_64_CONS_GP)) { @@ -4296,7 +4296,7 @@ elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_NOFUNCDESC_CONS_GP) != (out_flags & EF_IA_64_NOFUNCDESC_CONS_GP)) @@ -4306,13 +4306,13 @@ elf64_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } return ok; } -static bfd_boolean +static bool elf64_ia64_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -4331,7 +4331,7 @@ elf64_ia64_print_private_bfd_data (bfd *abfd, void * ptr) (flags & EF_IA_64_ABI64) ? "ABI64" : "ABI32"); _bfd_elf_print_private_bfd_data (abfd, ptr); - return TRUE; + return true; } static enum elf_reloc_type_class @@ -4363,7 +4363,7 @@ static const struct bfd_elf_special_section elf64_ia64_special_sections[] = { NULL, 0, 0, 0, 0 } }; -static bfd_boolean +static bool elf64_ia64_object_p (bfd *abfd) { asection *sec; @@ -4374,7 +4374,7 @@ elf64_ia64_object_p (bfd *abfd) size_t amt; if (abfd->flags & DYNAMIC) - return TRUE; + return true; /* Flags for fake group section. */ flags = (SEC_LINKER_CREATED | SEC_GROUP | SEC_LINK_ONCE @@ -4394,7 +4394,7 @@ elf64_ia64_object_p (bfd *abfd) amt = strlen (name) + sizeof (".gnu.linkonce.ia64unwi."); unwi_name = bfd_alloc (abfd, amt); if (!unwi_name) - return FALSE; + return false; strcpy (stpcpy (unwi_name, ".gnu.linkonce.ia64unwi."), name); unwi = bfd_get_section_by_name (abfd, unwi_name); @@ -4402,7 +4402,7 @@ elf64_ia64_object_p (bfd *abfd) amt = strlen (name) + sizeof (".gnu.linkonce.ia64unw."); unw_name = bfd_alloc (abfd, amt); if (!unw_name) - return FALSE; + return false; strcpy (stpcpy (unw_name, ".gnu.linkonce.ia64unw."), name); unw = bfd_get_section_by_name (abfd, unw_name); @@ -4412,7 +4412,7 @@ elf64_ia64_object_p (bfd *abfd) group = bfd_make_section_anyway_with_flags (abfd, name, flags); if (group == NULL) - return FALSE; + return false; /* Move the fake group section to the beginning. */ bfd_section_list_remove (abfd, group); @@ -4453,14 +4453,14 @@ elf64_ia64_object_p (bfd *abfd) elf_section_data (group)->this_hdr.sh_type = SHT_GROUP; } } - return TRUE; + return true; } /* Handle an IA-64 specific section when reading an object file. This is called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool elf64_vms_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -4482,15 +4482,15 @@ elf64_vms_section_from_shdr (bfd *abfd, case SHT_IA_64_EXT: if (strcmp (name, ELF_STRING_ia64_archext) != 0) - return FALSE; + return false; break; default: - return FALSE; + return false; } if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; if (secflags != 0) { @@ -4498,13 +4498,13 @@ elf64_vms_section_from_shdr (bfd *abfd, if (!bfd_set_section_flags (newsect, bfd_section_flags (newsect) | secflags)) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool elf64_vms_object_p (bfd *abfd) { Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd); @@ -4516,7 +4516,7 @@ elf64_vms_object_p (bfd *abfd) char name[16]; if (!elf64_ia64_object_p (abfd)) - return FALSE; + return false; /* Many VMS compilers do not generate sections for the corresponding segment. This is boring as binutils tools won't be able to disassemble @@ -4590,14 +4590,14 @@ elf64_vms_object_p (bfd *abfd) size_t name_len = strlen (name) + 1; nname = bfd_alloc (abfd, name_len); if (nname == NULL) - return FALSE; + return false; memcpy (nname, name, name_len); } /* Create and fill new section. */ nsec = bfd_make_section_anyway_with_flags (abfd, nname, flags); if (nsec == NULL) - return FALSE; + return false; nsec->vma = base_vma; nsec->size = next_vma - base_vma; nsec->filepos = i_phdr->p_offset + (base_vma - i_phdr->p_vaddr); @@ -4605,24 +4605,24 @@ elf64_vms_object_p (bfd *abfd) base_vma = next_vma; } } - return TRUE; + return true; } -static bfd_boolean +static bool elf64_vms_init_file_header (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Ehdr *i_ehdrp; if (!_bfd_elf_init_file_header (abfd, info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_OPENVMS; i_ehdrp->e_ident[EI_ABIVERSION] = 2; - return TRUE; + return true; } -static bfd_boolean +static bool elf64_vms_section_processing (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr) { @@ -4652,13 +4652,13 @@ elf64_vms_section_processing (bfd *abfd ATTRIBUTE_UNUSED, hdr->sh_type = SHT_IA_64_VMS_DEBUG_STR; } - return TRUE; + return true; } /* The final processing done just before writing out a VMS IA-64 ELF object file. */ -static bfd_boolean +static bool elf64_vms_final_write_processing (bfd *abfd) { Elf_Internal_Shdr *hdr; @@ -4692,29 +4692,29 @@ elf64_vms_final_write_processing (bfd *abfd) flags |= EF_IA_64_ABI64; elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; + elf_flags_init (abfd) = true; } return _bfd_elf_final_write_processing (abfd); } -static bfd_boolean +static bool elf64_vms_write_shdrs_and_ehdr (bfd *abfd) { unsigned char needed_count[8]; if (!bfd_elf64_write_shdrs_and_ehdr (abfd)) - return FALSE; + return false; bfd_putl64 (elf_ia64_vms_tdata (abfd)->needed_count, needed_count); if (bfd_seek (abfd, sizeof (Elf64_External_Ehdr), SEEK_SET) != 0 || bfd_bwrite (needed_count, 8, abfd) != 8) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool elf64_vms_close_and_cleanup (bfd *abfd) { if (bfd_get_format (abfd) == bfd_object) @@ -4738,7 +4738,7 @@ elf64_vms_close_and_cleanup (bfd *abfd) /* Add symbols from an ELF object file to the linker hash table. */ -static bfd_boolean +static bool elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Shdr *hdr; @@ -4746,7 +4746,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) bfd_size_type extsymcount; bfd_size_type extsymoff; struct elf_link_hash_entry **sym_hash; - bfd_boolean dynamic; + bool dynamic; Elf_Internal_Sym *isymbuf = NULL; Elf_Internal_Sym *isym; Elf_Internal_Sym *isymend; @@ -4758,10 +4758,10 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) bed = get_elf_backend_data (abfd); if ((abfd->flags & DYNAMIC) == 0) - dynamic = FALSE; + dynamic = false; else { - dynamic = TRUE; + dynamic = true; /* You can't use -r against a dynamic object. Also, there's no hope of using a dynamic object which does not exactly match @@ -4920,10 +4920,10 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) flagword flags; const char *name; struct elf_link_hash_entry *h; - bfd_boolean definition; - bfd_boolean size_change_ok; - bfd_boolean type_change_ok; - bfd_boolean common; + bool definition; + bool size_change_ok; + bool type_change_ok; + bool common; unsigned int old_alignment; bfd *old_bfd; @@ -5014,21 +5014,21 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (bfd_is_und_section (sec) || bfd_is_com_section (sec)) - definition = FALSE; + definition = false; else - definition = TRUE; + definition = true; - size_change_ok = FALSE; + size_change_ok = false; type_change_ok = bed->type_change_ok; old_alignment = 0; old_bfd = NULL; new_sec = sec; if (! bfd_is_und_section (sec)) - h = elf_link_hash_lookup (htab, name, TRUE, FALSE, FALSE); + h = elf_link_hash_lookup (htab, name, true, false, false); else h = ((struct elf_link_hash_entry *) bfd_wrapped_link_hash_lookup - (abfd, info, name, TRUE, FALSE, FALSE)); + (abfd, info, name, true, false, false)); if (h == NULL) goto error_free_sym; @@ -5067,7 +5067,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } if (! (_bfd_generic_link_add_one_symbol - (info, abfd, name, flags, sec, value, NULL, FALSE, bed->collect, + (info, abfd, name, flags, sec, value, NULL, false, bed->collect, (struct bfd_link_hash_entry **) sym_hash))) goto error_free_vers; @@ -5266,7 +5266,7 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) for (o = abfd->sections; o != NULL; o = o->next) { Elf_Internal_Rela *internal_relocs; - bfd_boolean ok; + bool ok; if ((o->flags & SEC_RELOC) == 0 || o->reloc_count == 0 @@ -5290,16 +5290,16 @@ elf64_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) } } - return TRUE; + return true; error_free_vers: error_free_sym: free (isymbuf); error_return: - return FALSE; + return false; } -static bfd_boolean +static bool elf64_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { int pass; @@ -5310,7 +5310,7 @@ elf64_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) if (info->output_bfd->xvec != abfd->xvec) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } /* The archive_pass field in the archive itself is used to @@ -5357,7 +5357,7 @@ elf64_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) element = bfd_get_elt_at_index (abfd, symidx); if (element == NULL) - return FALSE; + return false; if (element->archive_pass == -1 || element->archive_pass == pass) { @@ -5372,13 +5372,13 @@ elf64_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) if (element == NULL || !bfd_check_format (element, bfd_object)) { orig_element->archive_pass = -1; - return FALSE; + return false; } } else if (! bfd_check_format (element, bfd_object)) { element->archive_pass = -1; - return FALSE; + return false; } /* Unlike the generic linker, we know that this element provides @@ -5388,15 +5388,15 @@ elf64_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) h->root.string, &element)) continue; if (! elf64_vms_link_add_object_symbols (element, info)) - return FALSE; + return false; orig_element->archive_pass = pass; } - return TRUE; + return true; } -static bfd_boolean +static bool elf64_vms_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -5409,11 +5409,11 @@ elf64_vms_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) break; default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } -static bfd_boolean +static bool elf64_ia64_vms_mkobject (bfd *abfd) { return bfd_elf_allocate_object diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index e1a00448fb..876e4f867c 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -80,15 +80,15 @@ static void mips_elf64_be_swap_reloca_out (bfd *, const Elf_Internal_Rela *, bfd_byte *); static reloc_howto_type *bfd_elf64_bfd_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean mips_elf64_info_to_howto_rela +static bool mips_elf64_info_to_howto_rela (bfd *, arelent *, Elf_Internal_Rela *); static long mips_elf64_get_dynamic_reloc_upper_bound (bfd *); -static bfd_boolean mips_elf64_slurp_one_reloc_table +static bool mips_elf64_slurp_one_reloc_table (bfd *, asection *, Elf_Internal_Shdr *, bfd_size_type, arelent *, - asymbol **, bfd_boolean); -static bfd_boolean mips_elf64_slurp_reloc_table - (bfd *, asection *, asymbol **, bfd_boolean); + asymbol **, bool); +static bool mips_elf64_slurp_reloc_table + (bfd *, asection *, asymbol **, bool); static void mips_elf64_write_relocs (bfd *, asection *, void *); static void mips_elf64_write_rel @@ -105,17 +105,17 @@ static bfd_reloc_status_type mips_elf64_shift6_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type mips16_gprel_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -static bfd_boolean mips_elf64_assign_gp +static bool mips_elf64_assign_gp (bfd *, bfd_vma *); static bfd_reloc_status_type mips_elf64_final_gp - (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); -static bfd_boolean mips_elf64_object_p + (bfd *, asymbol *, bool, char **, bfd_vma *); +static bool mips_elf64_object_p (bfd *); static irix_compat_t elf64_mips_irix_compat (bfd *); -static bfd_boolean elf64_mips_grok_prstatus +static bool elf64_mips_grok_prstatus (bfd *, Elf_Internal_Note *); -static bfd_boolean elf64_mips_grok_psinfo +static bool elf64_mips_grok_psinfo (bfd *, Elf_Internal_Note *); extern const bfd_target mips_elf64_be_vec; @@ -137,67 +137,67 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit relocation. */ HOWTO (R_MIPS_16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation. */ HOWTO (R_MIPS_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit symbol relative relocation. */ HOWTO (R_MIPS_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 26 bit jump address. */ HOWTO (R_MIPS_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -205,10 +205,10 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = bits must match the PC + 4. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03ffffff, /* src_mask */ 0x03ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for NewABI REL. However, the native IRIX6 tools use them, so we try our best. */ @@ -218,75 +218,75 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf64_gprel16_reloc, /* special_function */ "R_MIPS_GPREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf64_literal_reloc, /* special_function */ "R_MIPS_LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit PC relative reference. Note that the ABI document has a typo and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. @@ -295,45 +295,45 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit GP relative reference. */ HOWTO (R_MIPS_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mips_elf64_gprel32_reloc, /* special_function */ "R_MIPS_GPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (13), EMPTY_HOWTO (14), @@ -344,135 +344,135 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SHIFT5", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000007c0, /* src_mask */ 0x000007c0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit shift field. */ HOWTO (R_MIPS_SHIFT6, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mips_elf64_shift6_reloc, /* special_function */ "R_MIPS_SHIFT6", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000007c4, /* src_mask */ 0x000007c4, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit relocation. */ HOWTO (R_MIPS_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement in the global offset table. */ HOWTO (R_MIPS_GOT_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_PAGE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_OFST", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. */ HOWTO (R_MIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SUB", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction. */ /* FIXME: Not handled correctly. */ @@ -480,15 +480,15 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_A", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction, and change all relocations to refer to the old instruction at the address. */ @@ -497,15 +497,15 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_B", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Delete a 32 bit instruction. */ /* FIXME: Not handled correctly. */ @@ -513,15 +513,15 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_DELETE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The MIPS ELF64 ABI Draft wants us to support these for REL relocations. We don't, because @@ -537,59 +537,59 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement, used by an associated event location section. */ HOWTO (R_MIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SCN_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_REL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* These two are obsolete. */ EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE), @@ -601,15 +601,15 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_RELGOT", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -617,15 +617,15 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS relocations. */ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32), @@ -635,104 +635,104 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPMOD64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_TLS_DTPREL64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS general dynamic variable reference. */ HOWTO (R_MIPS_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS IE dynamic relocations. */ EMPTY_HOWTO (R_MIPS_TLS_TPREL32), @@ -741,60 +741,60 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation with no addend. */ HOWTO (R_MIPS_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (52), EMPTY_HOWTO (53), @@ -809,85 +809,85 @@ static reloc_howto_type mips_elf64_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC21_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x001fffff, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC26_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC26_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03ffffff, /* src_mask */ 0x03ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC18_S3, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC18_S3", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0003ffff, /* src_mask */ 0x0003ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC19_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC19_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0007ffff, /* src_mask */ 0x0007ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCHI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCLO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; @@ -900,67 +900,67 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit relocation. */ HOWTO (R_MIPS_16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation. */ HOWTO (R_MIPS_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit symbol relative relocation. */ HOWTO (R_MIPS_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 26 bit jump address. */ HOWTO (R_MIPS_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -968,85 +968,85 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = bits must match the PC + 4. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x03ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MIPS_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf64_gprel16_reloc, /* special_function */ "R_MIPS_GPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf64_literal_reloc, /* special_function */ "R_MIPS_LITERAL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit PC relative reference. Note that the ABI document has a typo and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. @@ -1055,45 +1055,45 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit GP relative reference. */ HOWTO (R_MIPS_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mips_elf64_gprel32_reloc, /* special_function */ "R_MIPS_GPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (13), EMPTY_HOWTO (14), @@ -1104,135 +1104,135 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SHIFT5", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000007c0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit shift field. */ HOWTO (R_MIPS_SHIFT6, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mips_elf64_shift6_reloc, /* special_function */ "R_MIPS_SHIFT6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000007c4, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit relocation. */ HOWTO (R_MIPS_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement in the global offset table. */ HOWTO (R_MIPS_GOT_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_DISP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_PAGE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_OFST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. */ HOWTO (R_MIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SUB", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction. */ /* FIXME: Not handled correctly. */ @@ -1240,15 +1240,15 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_A", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction, and change all relocations to refer to the old instruction at the address. */ @@ -1257,15 +1257,15 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Delete a 32 bit instruction. */ /* FIXME: Not handled correctly. */ @@ -1273,104 +1273,104 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_DELETE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the higher value of a 64 bit addend. */ HOWTO (R_MIPS_HIGHER, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HIGHER", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the highest value of a 64 bit addend. */ HOWTO (R_MIPS_HIGHEST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HIGHEST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement, used by an associated event location section. */ HOWTO (R_MIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SCN_DISP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_REL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* These two are obsolete. */ EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE), @@ -1382,15 +1382,15 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_RELGOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -1398,15 +1398,15 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS relocations. */ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD32), @@ -1416,104 +1416,104 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPMOD64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_TLS_DTPREL64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS general dynamic variable reference. */ HOWTO (R_MIPS_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_LDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GOTTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS IE dynamic relocations. */ EMPTY_HOWTO (R_MIPS_TLS_TPREL32), @@ -1522,60 +1522,60 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation with no addend. */ HOWTO (R_MIPS_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (52), EMPTY_HOWTO (53), @@ -1590,85 +1590,85 @@ static reloc_howto_type mips_elf64_howto_table_rela[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC21_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC26_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC26_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x03ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC18_S3, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC18_S3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0003ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC19_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC19_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCHI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCLO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; @@ -1679,7 +1679,7 @@ static reloc_howto_type mips16_elf64_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -1687,205 +1687,205 @@ static reloc_howto_type mips16_elf64_howto_table_rel[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The reloc used for the mips16 gprel instruction. */ HOWTO (R_MIPS16_GPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips16_gprel_reloc, /* special_function */ "R_MIPS16_GPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 reference to the global offset table. */ HOWTO (R_MIPS16_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS16_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 call through the global offset table. */ HOWTO (R_MIPS16_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 high 16 bits of symbol value. */ HOWTO (R_MIPS16_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS16_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 low 16 bits of symbol value. */ HOWTO (R_MIPS16_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS16_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS general dynamic variable reference. */ HOWTO (R_MIPS16_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic variable reference. */ HOWTO (R_MIPS16_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 16-bit PC-relative branch offset. */ HOWTO (R_MIPS16_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_PC16_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; static reloc_howto_type mips16_elf64_howto_table_rela[] = @@ -1895,7 +1895,7 @@ static reloc_howto_type mips16_elf64_howto_table_rela[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -1903,205 +1903,205 @@ static reloc_howto_type mips16_elf64_howto_table_rela[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The reloc used for the mips16 gprel instruction. */ HOWTO (R_MIPS16_GPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips16_gprel_reloc, /* special_function */ "R_MIPS16_GPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 reference to the global offset table. */ HOWTO (R_MIPS16_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS16_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 call through the global offset table. */ HOWTO (R_MIPS16_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_CALL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 high 16 bits of symbol value. */ HOWTO (R_MIPS16_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS16_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 low 16 bits of symbol value. */ HOWTO (R_MIPS16_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS16_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS general dynamic variable reference. */ HOWTO (R_MIPS16_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic variable reference. */ HOWTO (R_MIPS16_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_LDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GOTTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 16-bit PC-relative branch offset. */ HOWTO (R_MIPS16_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_PC16_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; static reloc_howto_type micromips_elf64_howto_table_rel[] = @@ -2115,7 +2115,7 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -2123,143 +2123,143 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_26_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MICROMIPS_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MICROMIPS_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MICROMIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MICROMIPS_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MICROMIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MICROMIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MICROMIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MICROMIPS_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This is for microMIPS branches. */ HOWTO (R_MICROMIPS_PC7_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC7_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000007f, /* src_mask */ 0x0000007f, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC10_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC10_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC16_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MICROMIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (143), EMPTY_HOWTO (144), @@ -2269,90 +2269,90 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_DISP",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_PAGE",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_OFST",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_HI16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. Used in the N32 ABI. */ HOWTO (R_MICROMIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SUB", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* We don't support these for REL relocations, because it means building the addend from a R_MICROMIPS_HIGHEST/R_MICROMIPS_HIGHER/ @@ -2366,45 +2366,45 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_HI16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement. */ HOWTO (R_MICROMIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SCN_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -2412,15 +2412,15 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. Note that the high 16 bits of symbol values must be zero. This is used for relaxation. */ @@ -2428,15 +2428,15 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HI0_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (158), EMPTY_HOWTO (159), @@ -2448,75 +2448,75 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MICROMIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (167), EMPTY_HOWTO (168), @@ -2526,30 +2526,30 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (171), @@ -2558,29 +2558,29 @@ static reloc_howto_type micromips_elf64_howto_table_rel[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL7_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000007f, /* src_mask */ 0x0000007f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC23_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 23, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC23_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fffff, /* src_mask */ 0x007fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; static reloc_howto_type micromips_elf64_howto_table_rela[] = @@ -2594,7 +2594,7 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -2602,143 +2602,143 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_26_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MICROMIPS_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MICROMIPS_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MICROMIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MICROMIPS_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MICROMIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MICROMIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_LITERAL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MICROMIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MICROMIPS_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This is for microMIPS branches. */ HOWTO (R_MICROMIPS_PC7_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC7_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000007f, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC10_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC10_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000003ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC16_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MICROMIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (143), EMPTY_HOWTO (144), @@ -2748,165 +2748,165 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_DISP",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_PAGE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_OFST",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_HI16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_LO16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. Used in the N32 ABI. */ HOWTO (R_MICROMIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SUB", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the higher value of a 64 bit addend. */ HOWTO (R_MICROMIPS_HIGHER, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HIGHER", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the highest value of a 64 bit addend. */ HOWTO (R_MICROMIPS_HIGHEST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HIGHEST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_HI16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_LO16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement. */ HOWTO (R_MICROMIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SCN_DISP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -2914,15 +2914,15 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. Note that the high 16 bits of symbol values must be zero. This is used for relaxation. */ @@ -2930,15 +2930,15 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HI0_LO16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (158), EMPTY_HOWTO (159), @@ -2950,75 +2950,75 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MICROMIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_LDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GOTTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (167), EMPTY_HOWTO (168), @@ -3028,30 +3028,30 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (171), @@ -3060,29 +3060,29 @@ static reloc_howto_type micromips_elf64_howto_table_rela[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL7_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000007f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC23_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 23, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC23_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* GNU extension to record C++ vtable hierarchy */ @@ -3091,15 +3091,15 @@ static reloc_howto_type elf_mips_gnu_vtinherit_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MIPS_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ static reloc_howto_type elf_mips_gnu_vtentry_howto = @@ -3107,15 +3107,15 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_MIPS_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* 16 bit offset for pc-relative branches. */ static reloc_howto_type elf_mips_gnu_rel16_s2 = @@ -3123,15 +3123,15 @@ static reloc_howto_type elf_mips_gnu_rel16_s2 = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GNU_REL16_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* 16 bit offset for pc-relative branches. */ static reloc_howto_type elf_mips_gnu_rela16_s2 = @@ -3139,15 +3139,15 @@ static reloc_howto_type elf_mips_gnu_rela16_s2 = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GNU_REL16_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* 32 bit pc-relative. Used for compact EH tables. */ static reloc_howto_type elf_mips_gnu_pcrel32 = @@ -3155,15 +3155,15 @@ static reloc_howto_type elf_mips_gnu_pcrel32 = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* Originally a VxWorks extension, but now used for other systems too. */ @@ -3172,15 +3172,15 @@ static reloc_howto_type elf_mips_copy_howto = 0, /* rightshift */ 0, /* this one is variable size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Originally a VxWorks extension, but now used for other systems too. */ static reloc_howto_type elf_mips_jump_slot_howto = @@ -3188,15 +3188,15 @@ static reloc_howto_type elf_mips_jump_slot_howto = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JUMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Used in EH tables. */ static reloc_howto_type elf_mips_eh_howto = @@ -3204,15 +3204,15 @@ static reloc_howto_type elf_mips_eh_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_EH", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Swap in a MIPS 64-bit Rel reloc. */ @@ -3371,7 +3371,7 @@ mips_elf64_be_swap_reloca_out (bfd *abfd, const Elf_Internal_Rela *src, /* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a dangerous relocation. */ -static bfd_boolean +static bool mips_elf64_assign_gp (bfd *output_bfd, bfd_vma *pgp) { unsigned int count; @@ -3381,7 +3381,7 @@ mips_elf64_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* If we've already figured out what GP will be, just return it. */ *pgp = _bfd_get_gp_value (output_bfd); if (*pgp) - return TRUE; + return true; count = bfd_get_symcount (output_bfd); sym = bfd_get_outsymbols (output_bfd); @@ -3411,10 +3411,10 @@ mips_elf64_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* Only get the error once. */ *pgp = 4; _bfd_set_gp_value (output_bfd, *pgp); - return FALSE; + return false; } - return TRUE; + return true; } /* We have to figure out the gp value, so that we can adjust the @@ -3424,7 +3424,7 @@ mips_elf64_assign_gp (bfd *output_bfd, bfd_vma *pgp) external symbol if we are producing relocatable output. */ static bfd_reloc_status_type -mips_elf64_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable, +mips_elf64_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable, char **error_message, bfd_vma *pgp) { if (bfd_is_und_section (symbol->section) @@ -3464,7 +3464,7 @@ mips_elf64_gprel16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; @@ -3479,10 +3479,10 @@ mips_elf64_gprel16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -3503,7 +3503,7 @@ mips_elf64_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; @@ -3519,10 +3519,10 @@ mips_elf64_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, /* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */ if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -3544,7 +3544,7 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; bfd_vma relocation; @@ -3561,10 +3561,10 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -3634,7 +3634,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_byte *location; bfd_vma gp; @@ -3650,10 +3650,10 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -3663,7 +3663,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, return ret; location = (bfd_byte *) data + reloc_entry->address; - _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, false, location); ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section, relocatable, @@ -3905,7 +3905,7 @@ bfd_elf64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */ static reloc_howto_type * -mips_elf64_rtype_to_howto (bfd *abfd, unsigned int r_type, bfd_boolean rela_p) +mips_elf64_rtype_to_howto (bfd *abfd, unsigned int r_type, bool rela_p) { reloc_howto_type *howto = NULL; @@ -3964,7 +3964,7 @@ mips_elf64_rtype_to_howto (bfd *abfd, unsigned int r_type, bfd_boolean rela_p) /* Prevent relocation handling by bfd for MIPS ELF64. */ -static bfd_boolean +static bool mips_elf64_info_to_howto_rela (bfd *abfd, arelent *cache_ptr ATTRIBUTE_UNUSED, Elf_Internal_Rela *dst) @@ -3974,7 +3974,7 @@ mips_elf64_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Since each entry in an SHT_REL or SHT_RELA section can represent up @@ -3995,12 +3995,12 @@ mips_elf64_get_dynamic_reloc_upper_bound (bfd *abfd) however that would also remove them from `objdump -r' output, breaking a long-established tradition and likely confusing people. */ -static bfd_boolean +static bool mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, Elf_Internal_Shdr *rel_hdr, bfd_size_type reloc_count, arelent *relents, asymbol **symbols, - bfd_boolean dynamic) + bool dynamic) { void *allocated; bfd_byte *native_relocs; @@ -4008,13 +4008,13 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, arelent *relent; bfd_vma i; int entsize; - bfd_boolean rela_p; + bool rela_p; if (bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0) - return FALSE; + return false; allocated = _bfd_malloc_and_read (abfd, rel_hdr->sh_size, rel_hdr->sh_size); if (allocated == NULL) - return FALSE; + return false; native_relocs = allocated; @@ -4023,9 +4023,9 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, || entsize == sizeof (Elf64_Mips_External_Rela)); if (entsize == sizeof (Elf64_Mips_External_Rel)) - rela_p = FALSE; + rela_p = false; else - rela_p = TRUE; + rela_p = true; if (dynamic) symcount = bfd_get_dynamic_symcount (abfd); @@ -4037,7 +4037,7 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, i++, native_relocs += entsize) { Elf64_Mips_Internal_Rela rela; - bfd_boolean used_sym, used_ssym; + bool used_sym, used_ssym; int ir; if (entsize == sizeof (Elf64_Mips_External_Rela)) @@ -4051,8 +4051,8 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, /* Each entry represents exactly three actual relocations. */ - used_sym = FALSE; - used_ssym = FALSE; + used_sym = false; + used_ssym = false; for (ir = 0; ir < 3; ir++) { enum elf_mips_reloc_type type; @@ -4111,7 +4111,7 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, relent->sym_ptr_ptr = s->section->symbol_ptr_ptr; } - used_sym = TRUE; + used_sym = true; } else if (! used_ssym) { @@ -4135,7 +4135,7 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, break; } - used_ssym = TRUE; + used_ssym = true; } else relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; @@ -4163,11 +4163,11 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, } free (allocated); - return TRUE; + return true; error_return: free (allocated); - return FALSE; + return false; } /* Read the relocations. On Irix 6, there can be two reloc sections @@ -4175,9 +4175,9 @@ mips_elf64_slurp_one_reloc_table (bfd *abfd, asection *asect, elfcode.h as well, with changes as small as accounting for 3 internal relocs per external reloc. */ -static bfd_boolean +static bool mips_elf64_slurp_reloc_table (bfd *abfd, asection *asect, - asymbol **symbols, bfd_boolean dynamic) + asymbol **symbols, bool dynamic) { struct bfd_elf_section_data * const d = elf_section_data (asect); Elf_Internal_Shdr *rel_hdr; @@ -4188,13 +4188,13 @@ mips_elf64_slurp_reloc_table (bfd *abfd, asection *asect, bfd_size_type amt; if (asect->relocation != NULL) - return TRUE; + return true; if (! dynamic) { if ((asect->flags & SEC_RELOC) == 0 || asect->reloc_count == 0) - return TRUE; + return true; rel_hdr = d->rel.hdr; reloc_count = rel_hdr ? NUM_SHDR_ENTRIES (rel_hdr) : 0; @@ -4213,7 +4213,7 @@ mips_elf64_slurp_reloc_table (bfd *abfd, asection *asect, dynamic symbol table, and in that case bfd_section_from_shdr in elf.c does not update the RELOC_COUNT. */ if (asect->size == 0) - return TRUE; + return true; rel_hdr = &d->this_hdr; reloc_count = NUM_SHDR_ENTRIES (rel_hdr); @@ -4225,23 +4225,23 @@ mips_elf64_slurp_reloc_table (bfd *abfd, asection *asect, amt = (reloc_count + reloc_count2) * 3 * sizeof (arelent); relents = bfd_alloc (abfd, amt); if (relents == NULL) - return FALSE; + return false; if (rel_hdr != NULL && ! mips_elf64_slurp_one_reloc_table (abfd, asect, rel_hdr, reloc_count, relents, symbols, dynamic)) - return FALSE; + return false; if (rel_hdr2 != NULL && ! mips_elf64_slurp_one_reloc_table (abfd, asect, rel_hdr2, reloc_count2, relents + reloc_count * 3, symbols, dynamic)) - return FALSE; + return false; asect->relocation = relents; - return TRUE; + return true; } /* Write out the relocations. */ @@ -4249,7 +4249,7 @@ mips_elf64_slurp_reloc_table (bfd *abfd, asection *asect, static void mips_elf64_write_relocs (bfd *abfd, asection *sec, void *data) { - bfd_boolean *failedp = data; + bool *failedp = data; int count; Elf_Internal_Shdr *rel_hdr; unsigned int idx; @@ -4314,7 +4314,7 @@ mips_elf64_write_rel (bfd *abfd, asection *sec, Elf_Internal_Shdr *rel_hdr, int *count, void *data) { - bfd_boolean *failedp = data; + bool *failedp = data; Elf64_Mips_External_Rel *ext_rel; unsigned int idx; asymbol *last_sym = 0; @@ -4324,7 +4324,7 @@ mips_elf64_write_rel (bfd *abfd, asection *sec, rel_hdr->contents = bfd_alloc (abfd, rel_hdr->sh_size); if (rel_hdr->contents == NULL) { - *failedp = TRUE; + *failedp = true; return; } @@ -4358,7 +4358,7 @@ mips_elf64_write_rel (bfd *abfd, asection *sec, n = _bfd_elf_symbol_from_bfd_symbol (abfd, &sym); if (n < 0) { - *failedp = TRUE; + *failedp = true; return; } last_sym_idx = n; @@ -4371,7 +4371,7 @@ mips_elf64_write_rel (bfd *abfd, asection *sec, && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec && ! _bfd_elf_validate_reloc (abfd, ptr)) { - *failedp = TRUE; + *failedp = true; return; } @@ -4413,7 +4413,7 @@ mips_elf64_write_rela (bfd *abfd, asection *sec, Elf_Internal_Shdr *rela_hdr, int *count, void *data) { - bfd_boolean *failedp = data; + bool *failedp = data; Elf64_Mips_External_Rela *ext_rela; unsigned int idx; asymbol *last_sym = 0; @@ -4423,7 +4423,7 @@ mips_elf64_write_rela (bfd *abfd, asection *sec, rela_hdr->contents = bfd_alloc (abfd, rela_hdr->sh_size); if (rela_hdr->contents == NULL) { - *failedp = TRUE; + *failedp = true; return; } @@ -4457,7 +4457,7 @@ mips_elf64_write_rela (bfd *abfd, asection *sec, n = _bfd_elf_symbol_from_bfd_symbol (abfd, &sym); if (n < 0) { - *failedp = TRUE; + *failedp = true; return; } last_sym_idx = n; @@ -4471,7 +4471,7 @@ mips_elf64_write_rela (bfd *abfd, asection *sec, && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec && ! _bfd_elf_validate_reloc (abfd, ptr)) { - *failedp = TRUE; + *failedp = true; return; } @@ -4510,7 +4510,7 @@ mips_elf64_write_rela (bfd *abfd, asection *sec, /* Set the right machine number for a MIPS ELF file. */ -static bfd_boolean +static bool mips_elf64_object_p (bfd *abfd) { unsigned long mach; @@ -4519,11 +4519,11 @@ mips_elf64_object_p (bfd *abfd) sorted correctly such that local symbols precede global symbols, and the sh_info field in the symbol table is not always right. */ if (elf64_mips_irix_compat (abfd) != ict_none) - elf_bad_symtab (abfd) = TRUE; + elf_bad_symtab (abfd) = true; mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags); bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); - return TRUE; + return true; } /* Depending on the target vector we generate some version of Irix @@ -4539,7 +4539,7 @@ elf64_mips_irix_compat (bfd *abfd) } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -4548,7 +4548,7 @@ elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 480: /* Linux/MIPS - N64 kernel */ /* pr_cursig */ @@ -4569,13 +4569,13 @@ elf64_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf64_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 136: /* Linux/MIPS - N64 kernel elf_prpsinfo */ elf_tdata (abfd)->core->pid @@ -4598,7 +4598,7 @@ elf64_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Write Linux core PRSTATUS note into core file. */ @@ -4723,9 +4723,9 @@ const struct elf_size_info mips_elf64_size_info = #define ELF_TARGET_ID MIPS_ELF_DATA #define ELF_MACHINE_CODE EM_MIPS -#define elf_backend_collect TRUE -#define elf_backend_type_change_ok TRUE -#define elf_backend_can_gc_sections TRUE +#define elf_backend_collect true +#define elf_backend_type_change_ok true +#define elf_backend_can_gc_sections true #define elf_backend_gc_mark_extra_sections \ _bfd_mips_elf_gc_mark_extra_sections #define elf_info_to_howto mips_elf64_info_to_howto_rela @@ -4789,7 +4789,7 @@ const struct elf_size_info mips_elf64_size_info = #define elf_backend_plt_readonly 1 #define elf_backend_plt_sym_val _bfd_mips_elf_plt_sym_val -#define elf_backend_sign_extend_vma TRUE +#define elf_backend_sign_extend_vma true #define elf_backend_write_section _bfd_mips_elf_write_section #define elf_backend_sort_relocs_p _bfd_mips_elf_sort_relocs_p diff --git a/bfd/elf64-mmix.c b/bfd/elf64-mmix.c index 0762b6dea9..c72e18261e 100644 --- a/bfd/elf64-mmix.c +++ b/bfd/elf64-mmix.c @@ -79,8 +79,8 @@ struct _mmix_elf_section_data linked due to a specific cause. FIXME: a way to access the linker info or output section, then stuff the limiter guard there. */ - bfd_boolean has_warned_bpo; - bfd_boolean has_warned_pushj; + bool has_warned_bpo; + bool has_warned_pushj; }; #define mmix_elf_section_data(sec) \ @@ -125,7 +125,7 @@ struct bpo_reloc_request /* Set when the value is computed. Better than coding "guard values" into the other members. Is FALSE only for BPO relocs in a GC:ed section. */ - bfd_boolean valid; + bool valid; }; /* We attach this as mmix_elf_section_data (sec)->bpo in the linker-allocated @@ -166,7 +166,7 @@ struct bpo_greg_section_info }; -extern bfd_boolean mmix_elf_final_link (bfd *, struct bfd_link_info *); +extern bool mmix_elf_final_link (bfd *, struct bfd_link_info *); extern void mmix_elf_symbol_processing (bfd *, asymbol *); @@ -194,195 +194,195 @@ static reloc_howto_type elf_mmix_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_MMIX_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 16 bit absolute relocation. */ HOWTO (R_MMIX_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 24 bit absolute relocation. */ HOWTO (R_MMIX_24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 32 bit absolute relocation. */ HOWTO (R_MMIX_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit relocation. */ HOWTO (R_MMIX_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit PC-relative relocation. */ HOWTO (R_MMIX_PC_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_PC_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An 16 bit PC-relative relocation. */ HOWTO (R_MMIX_PC_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_PC_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An 24 bit PC-relative relocation. */ HOWTO (R_MMIX_PC_24, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 24, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_PC_24", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0xffffff, /* src_mask */ 0xffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 32 bit absolute PC-relative relocation. */ HOWTO (R_MMIX_PC_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_PC_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 64 bit PC-relative relocation. */ HOWTO (R_MMIX_PC_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_MMIX_PC_64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy. */ HOWTO (R_MMIX_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MMIX_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage. */ HOWTO (R_MMIX_GNU_VTENTRY, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_MMIX_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The GETA relocation is supposed to get any address that could possibly be reached by the GETA instruction. It can silently expand @@ -392,57 +392,57 @@ static reloc_howto_type elf_mmix_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_GETA", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_GETA_1, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_GETA_1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_GETA_2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_GETA_2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_GETA_3, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_GETA_3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The conditional branches are supposed to reach any (code) address. It can silently expand to a 64-bit operand, but will emit an error if @@ -452,71 +452,71 @@ static reloc_howto_type elf_mmix_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_CBRANCH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_CBRANCH_J, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_CBRANCH_J", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_CBRANCH_1, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_CBRANCH_1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_CBRANCH_2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_CBRANCH_2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_CBRANCH_3, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_CBRANCH_3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* The PUSHJ instruction can reach any (code) address, as long as it's the beginning of a function (no usable restriction). It can silently @@ -528,57 +528,57 @@ static reloc_howto_type elf_mmix_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_PUSHJ", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_PUSHJ_1, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_PUSHJ_1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_PUSHJ_2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_PUSHJ_2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_PUSHJ_3, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_PUSHJ_3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A JMP is supposed to reach any (code) address. By itself, it can reach +-64M; the expansion can reach all 64 bits. Note that the 64M @@ -588,57 +588,57 @@ static reloc_howto_type elf_mmix_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_JMP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x1ffffff, /* src_mask */ 0x1ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_JMP_1, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_JMP_1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x1ffffff, /* src_mask */ 0x1ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_JMP_2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_JMP_2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x1ffffff, /* src_mask */ 0x1ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MMIX_JMP_3, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_JMP_3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x1ffffff, /* src_mask */ 0x1ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* When we don't emit link-time-relaxable code from the assembler, or when relaxation has done all it can do, these relocs are used. For @@ -647,30 +647,30 @@ static reloc_howto_type elf_mmix_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_ADDR19", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* For JMP. */ HOWTO (R_MMIX_ADDR27, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_ADDR27", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x1ffffff, /* src_mask */ 0x1ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A general register or the value 0..255. If a value, then the instruction (offset -3) needs adjusting. */ @@ -678,30 +678,30 @@ static reloc_howto_type elf_mmix_howto_table[] = 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_REG_OR_BYTE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A general register. */ HOWTO (R_MMIX_REG, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_REG", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A register plus an index, corresponding to the relocation expression. The sizes must correspond to the valid range of the expression, while @@ -710,15 +710,15 @@ static reloc_howto_type elf_mmix_howto_table[] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_BASE_PLUS_OFFSET", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A "magic" relocation for a LOCAL expression, asserting that the expression is less than the number of global registers. No actual @@ -729,29 +729,29 @@ static reloc_howto_type elf_mmix_howto_table[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_LOCAL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MMIX_PUSHJ_STUBBABLE, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mmix_elf_reloc, /* special_function */ "R_MMIX_PUSHJ_STUBBABLE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ~0x0100ffff, /* src_mask */ 0x0100ffff, /* dst_mask */ - TRUE) /* pcrel_offset */ + true) /* pcrel_offset */ }; @@ -825,7 +825,7 @@ bfd_elf64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -static bfd_boolean +static bool mmix_elf_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -835,7 +835,7 @@ mmix_elf_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -987,7 +987,7 @@ mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto, " ELF or mmo," " or assemble using" " \"-no-expand\" (for gcc, \"-Wa,-no-expand\""); - mmix_elf_section_data (isec)->has_warned_pushj = TRUE; + mmix_elf_section_data (isec)->has_warned_pushj = true; return bfd_reloc_dangerous; } @@ -1171,7 +1171,7 @@ mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto, " ELF or mmo," " or compile using the gcc-option" " \"-mno-base-addresses\"."); - mmix_elf_section_data (isec)->has_warned_bpo = TRUE; + mmix_elf_section_data (isec)->has_warned_bpo = true; return bfd_reloc_dangerous; } @@ -1250,7 +1250,7 @@ mmix_elf_perform_relocation (asection *isec, reloc_howto_type *howto, /* Set the howto pointer for an MMIX ELF reloc (type RELA). */ -static bfd_boolean +static bool mmix_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -1264,10 +1264,10 @@ mmix_info_to_howto_rela (bfd *abfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_mmix_howto_table[r_type]; - return TRUE; + return true; } /* Any MMIX-specific relocation gets here at assembly time or when linking @@ -1389,7 +1389,7 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, bfd_reloc_status_type r; const char *name = NULL; int r_type; - bfd_boolean undefined_signalled = FALSE; + bool undefined_signalled = false; r_type = ELF64_R_TYPE (rel->r_info); @@ -1418,7 +1418,7 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } else { - bfd_boolean unresolved_reloc, ignored; + bool unresolved_reloc, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -1476,7 +1476,7 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, + mmix_elf_section_data (input_section) ->pjs.stub_offset, NULL, NULL, NULL) != bfd_reloc_ok) - return FALSE; + return false; /* Put a JMP insn at the stub; it goes with the R_MMIX_JMP reloc. */ @@ -1533,8 +1533,8 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, /* We may have sent this message above. */ if (! undefined_signalled) info->callbacks->undefined_symbol - (info, name, input_bfd, input_section, rel->r_offset, TRUE); - undefined_signalled = TRUE; + (info, name, input_bfd, input_section, rel->r_offset, true); + undefined_signalled = true; break; case bfd_reloc_outofrange: @@ -1560,7 +1560,7 @@ mmix_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, } } - return TRUE; + return true; } /* Perform a single relocation. By default we use the standard BFD @@ -1815,7 +1815,7 @@ mmix_elf_sort_relocs (const void * p1, const void * p2) /* Subset of mmix_elf_check_relocs, common to ELF and mmo linking. */ -static bfd_boolean +static bool mmix_elf_check_common_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1875,12 +1875,12 @@ mmix_elf_check_common_relocs (bfd *abfd, GREG allocations, and that works. */ if (allocated_gregs_section == NULL || !bfd_set_section_alignment (allocated_gregs_section, 3)) - return FALSE; + return false; gregdata = (struct bpo_greg_section_info *) bfd_zalloc (bpo_greg_owner, sizeof (struct bpo_greg_section_info)); if (gregdata == NULL) - return FALSE; + return false; mmix_elf_section_data (allocated_gregs_section)->bpo.greg = gregdata; } @@ -1898,7 +1898,7 @@ mmix_elf_check_common_relocs (bfd *abfd, sizeof (struct bpo_reloc_section_info) * (sec->reloc_count + 1)); if (bpodata == NULL) - return FALSE; + return false; mmix_elf_section_data (sec)->bpo.reloc = bpodata; bpodata->first_base_plus_offset_reloc = bpodata->bpo_index @@ -1934,18 +1934,18 @@ mmix_elf_check_common_relocs (bfd *abfd, * sizeof (mmix_elf_section_data (sec) ->pjs.stub_size[0])); if (mmix_elf_section_data (sec)->pjs.stub_size == NULL) - return FALSE; + return false; for (i = 0; i < mmix_elf_section_data (sec)->pjs.n_pushj_relocs; i++) mmix_elf_section_data (sec)->pjs.stub_size[i] = MAX_PUSHJ_STUB_SIZE; } - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool mmix_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1966,10 +1966,10 @@ mmix_elf_check_relocs (bfd *abfd, /* Do the common part. */ if (!mmix_elf_check_common_relocs (abfd, info, sec, relocs)) - return FALSE; + return false; if (bfd_link_relocatable (info)) - return TRUE; + return true; rel_end = relocs + sec->reloc_count; for (rel = relocs; rel < rel_end; rel++) @@ -1994,25 +1994,25 @@ mmix_elf_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_MMIX_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_MMIX_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; } } - return TRUE; + return true; } /* Wrapper for mmix_elf_check_common_relocs, called when linking to mmo. Copied from elf_link_add_object_symbols. */ -bfd_boolean +bool _bfd_mmix_check_all_relocs (bfd *abfd, struct bfd_link_info *info) { asection *o; @@ -2020,7 +2020,7 @@ _bfd_mmix_check_all_relocs (bfd *abfd, struct bfd_link_info *info) for (o = abfd->sections; o != NULL; o = o->next) { Elf_Internal_Rela *internal_relocs; - bfd_boolean ok; + bool ok; if ((o->flags & SEC_RELOC) == 0 || o->reloc_count == 0 @@ -2034,7 +2034,7 @@ _bfd_mmix_check_all_relocs (bfd *abfd, struct bfd_link_info *info) (Elf_Internal_Rela *) NULL, info->keep_memory); if (internal_relocs == NULL) - return FALSE; + return false; ok = mmix_elf_check_common_relocs (abfd, info, o, internal_relocs); @@ -2042,10 +2042,10 @@ _bfd_mmix_check_all_relocs (bfd *abfd, struct bfd_link_info *info) free (internal_relocs); if (! ok) - return FALSE; + return false; } - return TRUE; + return true; } /* Change symbols relative to the reg contents section to instead be to @@ -2104,7 +2104,7 @@ mmix_elf_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym) /* Given a BFD section, try to locate the corresponding ELF section index. */ -static bfd_boolean +static bool mmix_elf_section_from_bfd_section (bfd * abfd ATTRIBUTE_UNUSED, asection * sec, int * retval) @@ -2112,9 +2112,9 @@ mmix_elf_section_from_bfd_section (bfd * abfd ATTRIBUTE_UNUSED, if (strcmp (bfd_section_name (sec), MMIX_REG_SECTION_NAME) == 0) *retval = SHN_REGISTER; else - return FALSE; + return false; - return TRUE; + return true; } /* Hook called by the linker routine which adds symbols from an object @@ -2124,7 +2124,7 @@ mmix_elf_section_from_bfd_section (bfd * abfd ATTRIBUTE_UNUSED, symbols, since otherwise having two with the same value would cause them to be "merged", but with the contents serialized. */ -static bfd_boolean +static bool mmix_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -2144,9 +2144,9 @@ mmix_elf_add_symbol_hook (bfd *abfd, /* See if we have another one. */ struct bfd_link_hash_entry *h = bfd_link_hash_lookup (info->hash, *namep, - FALSE, - FALSE, - FALSE); + false, + false, + false); if (h != NULL && h->type != bfd_link_hash_undefined) { @@ -2159,16 +2159,16 @@ mmix_elf_add_symbol_hook (bfd *abfd, abfd, *namep, *namep + strlen (MMIX_LOC_SECTION_START_SYMBOL_PREFIX)); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } - return TRUE; + return true; } /* We consider symbols matching "L.*:[0-9]+" to be local symbols. */ -static bfd_boolean +static bool mmix_elf_is_local_label_name (bfd *abfd, const char *name) { const char *colpos; @@ -2176,19 +2176,19 @@ mmix_elf_is_local_label_name (bfd *abfd, const char *name) /* Also include the default local-label definition. */ if (_bfd_elf_is_local_label_name (abfd, name)) - return TRUE; + return true; if (*name != 'L') - return FALSE; + return false; /* If there's no ":", or more than one, it's not a local symbol. */ colpos = strchr (name, ':'); if (colpos == NULL || strchr (colpos + 1, ':') != NULL) - return FALSE; + return false; /* Check that there are remaining characters and that they are digits. */ if (colpos[1] == 0) - return FALSE; + return false; digits = strspn (colpos + 1, "0123456789"); return digits != 0 && colpos[1 + digits] == 0; @@ -2196,7 +2196,7 @@ mmix_elf_is_local_label_name (bfd *abfd, const char *name) /* We get rid of the register section here. */ -bfd_boolean +bool mmix_elf_final_link (bfd *abfd, struct bfd_link_info *info) { /* We never output a register section, though we create one for @@ -2220,7 +2220,7 @@ mmix_elf_final_link (bfd *abfd, struct bfd_link_info *info) } if (! bfd_elf_final_link (abfd, info)) - return FALSE; + return false; /* Since this section is marked SEC_LINKER_CREATED, it isn't output by the regular linker machinery. We do it here, like other targets with @@ -2235,9 +2235,9 @@ mmix_elf_final_link (bfd *abfd, struct bfd_link_info *info) greg_section->contents, (file_ptr) greg_section->output_offset, greg_section->size)) - return FALSE; + return false; } - return TRUE; + return true; } /* We need to include the maximum size of PUSHJ-stubs in the initial @@ -2270,7 +2270,7 @@ mmix_set_relaxable_size (bfd *abfd ATTRIBUTE_UNUSED, /* Initialize stuff for the linker-generated GREGs to match R_MMIX_BASE_PLUS_OFFSET relocs seen by the linker. */ -bfd_boolean +bool _bfd_mmix_before_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2292,19 +2292,19 @@ _bfd_mmix_before_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, If there is no such object, there was no R_MMIX_BASE_PLUS_OFFSET. */ bpo_greg_owner = (bfd *) info->base_file; if (bpo_greg_owner == NULL) - return TRUE; + return true; bpo_gregs_section = bfd_get_section_by_name (bpo_greg_owner, MMIX_LD_ALLOCATED_REG_CONTENTS_SECTION_NAME); if (bpo_gregs_section == NULL) - return TRUE; + return true; /* We use the target-data handle in the ELF section data. */ gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg; if (gregdata == NULL) - return FALSE; + return false; n_gregs = gregdata->n_bpo_relocs; gregdata->n_allocated_bpo_gregs = n_gregs; @@ -2317,7 +2317,7 @@ _bfd_mmix_before_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, gregs_size = n_gregs * 8; if (!bfd_set_section_size (bpo_gregs_section, gregs_size)) - return FALSE; + return false; /* Allocate and set up the GREG arrays. They're filled in at relaxation time. Note that we must use the max number ever noted for the array, @@ -2333,7 +2333,7 @@ _bfd_mmix_before_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, gregdata->n_max_bpo_relocs * sizeof (size_t)); if (bpo_reloc_indexes == NULL) - return FALSE; + return false; /* The default order is an identity mapping. */ for (i = 0; i < gregdata->n_max_bpo_relocs; i++) @@ -2342,13 +2342,13 @@ _bfd_mmix_before_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, gregdata->reloc_request[i].bpo_reloc_no = i; } - return TRUE; + return true; } /* Fill in contents in the linker allocated gregs. Everything is calculated at this point; we just move the contents into place here. */ -bfd_boolean +bool _bfd_mmix_after_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info) { @@ -2365,7 +2365,7 @@ _bfd_mmix_after_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, object, there was no R_MMIX_BASE_PLUS_OFFSET. */ bpo_greg_owner = (bfd *) link_info->base_file; if (bpo_greg_owner == NULL) - return TRUE; + return true; bpo_gregs_section = bfd_get_section_by_name (bpo_greg_owner, @@ -2375,20 +2375,20 @@ _bfd_mmix_after_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, without any R_MMIX_BASE_PLUS_OFFSET seen, there will be no such section. */ if (bpo_gregs_section == NULL) - return TRUE; + return true; /* We use the target-data handle in the ELF section data. */ gregdata = mmix_elf_section_data (bpo_gregs_section)->bpo.greg; if (gregdata == NULL) - return FALSE; + return false; n_gregs = gregdata->n_allocated_bpo_gregs; bpo_gregs_section->contents = contents = bfd_alloc (bpo_greg_owner, bpo_gregs_section->size); if (contents == NULL) - return FALSE; + return false; /* Sanity check: If these numbers mismatch, some relocation has not been accounted for and the rest of gregdata is probably inconsistent. @@ -2403,7 +2403,7 @@ _bfd_mmix_after_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, " please report this bug"), (unsigned long) gregdata->n_remaining_bpo_relocs_this_relaxation_round, (unsigned long) gregdata->n_bpo_relocs); - return FALSE; + return false; } for (lastreg = 255, i = 0, j = 0; j < n_gregs; i++) @@ -2415,7 +2415,7 @@ _bfd_mmix_after_linker_allocation (bfd *abfd ATTRIBUTE_UNUSED, j++; } - return TRUE; + return true; } /* Sort valid relocs to come before non-valid relocs, then on increasing @@ -2511,11 +2511,11 @@ mmix_dump_bpo_gregs (struct bfd_link_info *link_info, Symbol- and reloc-reading infrastructure copied from elf-m10200.c. */ -static bfd_boolean +static bool mmix_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; @@ -2535,7 +2535,7 @@ mmix_elf_relax_section (bfd *abfd, mmix_elf_section_data (sec)->pjs.stubs_size_sum = 0; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything if this section does not have relocs, or if this is not a code section. */ @@ -2547,7 +2547,7 @@ mmix_elf_relax_section (bfd *abfd, then nothing to do. */ || (bpodata == NULL && mmix_elf_section_data (sec)->pjs.n_pushj_relocs == 0)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -2761,7 +2761,7 @@ mmix_elf_relax_section (bfd *abfd, gregdata->reloc_request[gregdata->bpo_reloc_indexes[bpono]].value = symval + irel->r_addend; - gregdata->reloc_request[gregdata->bpo_reloc_indexes[bpono++]].valid = TRUE; + gregdata->reloc_request[gregdata->bpo_reloc_indexes[bpono++]].valid = true; gregdata->n_remaining_bpo_relocs_this_relaxation_round--; } @@ -2795,7 +2795,7 @@ mmix_elf_relax_section (bfd *abfd, { gregdata->bpo_reloc_indexes[gregdata->reloc_request[i].bpo_reloc_no] = i; - *again = TRUE; + *again = true; } /* Allocate register numbers (indexing from 0). Stop at the first @@ -2821,7 +2821,7 @@ mmix_elf_relax_section (bfd *abfd, if (gregdata->n_allocated_bpo_gregs != regindex + 1) { gregdata->n_allocated_bpo_gregs = regindex + 1; - *again = TRUE; + *again = true; } bpo_gregs_section->size = (regindex + 1) * 8; @@ -2850,17 +2850,17 @@ mmix_elf_relax_section (bfd *abfd, if (sec->size > size + mmix_elf_section_data (sec)->pjs.stubs_size_sum) { sec->size = size + mmix_elf_section_data (sec)->pjs.stubs_size_sum; - *again = TRUE; + *again = true; } - return TRUE; + return true; error_return: if ((unsigned char *) isymbuf != symtab_hdr->contents) free (isymbuf); if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } #define ELF_ARCH bfd_arch_mmix diff --git a/bfd/elf64-nfp.c b/bfd/elf64-nfp.c index c1425612b3..b596df9f95 100644 --- a/bfd/elf64-nfp.c +++ b/bfd/elf64-nfp.c @@ -46,122 +46,122 @@ static reloc_howto_type elf_nfp_howto_table[] = 0, /* Rightshift. */ 3, /* Size. */ 0, /* Bitsize. */ - FALSE, /* PC_relative. */ + false, /* PC_relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ elf64_nfp_reloc, /* Special_function. */ "R_NFP_NOTYPE", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Src_mask. */ 0, /* Dst_mask. */ - FALSE), /* PCrel_offset. */ - HOWTO (R_NFP_W32LE, 0, 3, 0, FALSE, 0, + false), /* PCrel_offset. */ + HOWTO (R_NFP_W32LE, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W32LE", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_SRC8_A, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_SRC8_A, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SRC8_A", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_SRC8_B, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_SRC8_B, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SRC8_B", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_IMMED8_I, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_IMMED8_I, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_IMMED8_I", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_SC, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_SC, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SC", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_IMMED_LO16_I_A, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_IMMED_LO16_I_A, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_IMMED_LO16_I_A", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_IMMED_LO16_I_B, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_IMMED_LO16_I_B, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_IMMED_LO16_I_B", - TRUE, 0, 0, FALSE), - HOWTO (R_NFP_SRC7_B, 0, 3, 0, FALSE, 0, + true, 0, 0, false), + HOWTO (R_NFP_SRC7_B, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SRC7_B", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_SRC7_A, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_SRC7_A, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SRC7_A", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_SRC8_I_B, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_SRC8_I_B, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SRC8_I_B", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_SRC8_I_A, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_SRC8_I_A, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SRC8_I_A", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_IMMED_HI16_I_A, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_IMMED_HI16_I_A, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_IMMED_HI16_I_A", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_IMMED_HI16_I_B, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_IMMED_HI16_I_B, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_IMMED_HI16_I_B", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W64LE, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W64LE, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W64LE", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_SH_INFO, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_SH_INFO, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_SH_INFO", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W32BE, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W32BE, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W32BE", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W64BE, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W64BE, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W64BE", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W32_29_24, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W32_29_24, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W32_29_24", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W32LE_AND, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W32LE_AND, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W32LE_AND", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W32BE_AND, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W32BE_AND, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W32BE_AND", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W32LE_OR, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W32LE_OR, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W32LE_OR", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W32BE_OR, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W32BE_OR, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W32BE_OR", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W64LE_AND, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W64LE_AND, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W64LE_AND", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W64BE_AND, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W64BE_AND, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W64BE_AND", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W64LE_OR, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W64LE_OR, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W64LE_OR", - FALSE, 0, 0, FALSE), - HOWTO (R_NFP_W64BE_OR, 0, 3, 0, FALSE, 0, + false, 0, 0, false), + HOWTO (R_NFP_W64BE_OR, 0, 3, 0, false, 0, complain_overflow_dont, elf64_nfp_reloc, "R_NFP_W64BE_OR", - FALSE, 0, 0, FALSE) + false, 0, 0, false) }; -static bfd_boolean +static bool elf64_nfp_object_p (bfd * abfd) { /* If the e_machine value is one of the unofficial ones, we convert @@ -188,16 +188,16 @@ elf64_nfp_object_p (bfd * abfd) case E_NFP_MACH_3200: case E_NFP_MACH_6000: if (!bfd_default_set_arch_mach (abfd, bfd_arch_nfp, e_mach)) - return FALSE; + return false; default: break; } } - return TRUE; + return true; } -static bfd_boolean +static bool elf64_nfp_section_from_shdr (bfd * abfd, Elf_Internal_Shdr * hdr, const char *name, int shindex) @@ -209,7 +209,7 @@ elf64_nfp_section_from_shdr (bfd * abfd, case SHT_NFP_UDEBUG: return _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex); default: - return FALSE; + return false; } } @@ -225,7 +225,7 @@ elf64_nfp_reloc (bfd * abfd ATTRIBUTE_UNUSED, return bfd_reloc_ok; } -static bfd_boolean +static bool elf64_nfp_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, arelent * cache_ptr, Elf_Internal_Rela * dst) { @@ -238,10 +238,10 @@ elf64_nfp_info_to_howto (bfd * abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_nfp_howto_table[r_type]; - return TRUE; + return true; } static reloc_howto_type * diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c index b8af65ee3a..bc8dc4df1a 100644 --- a/bfd/elf64-ppc.c +++ b/bfd/elf64-ppc.c @@ -26,7 +26,7 @@ http://www.linuxbase.org/spec/ELF/ppc64/spec/book1.html */ /* Don't generate unused section symbols. */ -#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS FALSE +#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS false #include "sysdep.h" #include @@ -62,7 +62,7 @@ static bfd_reloc_status_type ppc64_elf_prefix_reloc static bfd_reloc_status_type ppc64_elf_unhandled_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_vma opd_entry_value - (asection *, bfd_vma, asection **, bfd_vma *, bfd_boolean); + (asection *, bfd_vma, asection **, bfd_vma *, bool); #define TARGET_LITTLE_SYM powerpc_elf64_le_vec #define TARGET_LITTLE_NAME "elf64-powerpcle" @@ -308,101 +308,101 @@ set_abiversion (bfd *abfd, int ver) complain, special_func) \ HOWTO (type, rightshift, size, bitsize, pc_relative, 0, \ complain_overflow_ ## complain, special_func, \ - #type, FALSE, 0, mask, pc_relative) + #type, false, 0, mask, pc_relative) static reloc_howto_type *ppc64_elf_howto_table[(int) R_PPC64_max]; static reloc_howto_type ppc64_elf_howto_raw[] = { /* This reloc does nothing. */ - HOW (R_PPC64_NONE, 3, 0, 0, 0, FALSE, dont, + HOW (R_PPC64_NONE, 3, 0, 0, 0, false, dont, bfd_elf_generic_reloc), /* A standard 32 bit relocation. */ - HOW (R_PPC64_ADDR32, 2, 32, 0xffffffff, 0, FALSE, bitfield, + HOW (R_PPC64_ADDR32, 2, 32, 0xffffffff, 0, false, bitfield, bfd_elf_generic_reloc), /* An absolute 26 bit branch; the lower two bits must be zero. FIXME: we don't check that, we just clear them. */ - HOW (R_PPC64_ADDR24, 2, 26, 0x03fffffc, 0, FALSE, bitfield, + HOW (R_PPC64_ADDR24, 2, 26, 0x03fffffc, 0, false, bitfield, bfd_elf_generic_reloc), /* A standard 16 bit relocation. */ - HOW (R_PPC64_ADDR16, 1, 16, 0xffff, 0, FALSE, bitfield, + HOW (R_PPC64_ADDR16, 1, 16, 0xffff, 0, false, bitfield, bfd_elf_generic_reloc), /* A 16 bit relocation without overflow. */ - HOW (R_PPC64_ADDR16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_ADDR16_LO, 1, 16, 0xffff, 0, false, dont, bfd_elf_generic_reloc), /* Bits 16-31 of an address. */ - HOW (R_PPC64_ADDR16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_ADDR16_HI, 1, 16, 0xffff, 16, false, signed, bfd_elf_generic_reloc), /* Bits 16-31 of an address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ - HOW (R_PPC64_ADDR16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_ADDR16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_ha_reloc), /* An absolute 16 bit branch; the lower two bits must be zero. FIXME: we don't check that, we just clear them. */ - HOW (R_PPC64_ADDR14, 2, 16, 0x0000fffc, 0, FALSE, signed, + HOW (R_PPC64_ADDR14, 2, 16, 0x0000fffc, 0, false, signed, ppc64_elf_branch_reloc), /* An absolute 16 bit branch, for which bit 10 should be set to indicate that the branch is expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC64_ADDR14_BRTAKEN, 2, 16, 0x0000fffc, 0, FALSE, signed, + HOW (R_PPC64_ADDR14_BRTAKEN, 2, 16, 0x0000fffc, 0, false, signed, ppc64_elf_brtaken_reloc), /* An absolute 16 bit branch, for which bit 10 should be set to indicate that the branch is not expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC64_ADDR14_BRNTAKEN, 2, 16, 0x0000fffc, 0, FALSE, signed, + HOW (R_PPC64_ADDR14_BRNTAKEN, 2, 16, 0x0000fffc, 0, false, signed, ppc64_elf_brtaken_reloc), /* A relative 26 bit branch; the lower two bits must be zero. */ - HOW (R_PPC64_REL24, 2, 26, 0x03fffffc, 0, TRUE, signed, + HOW (R_PPC64_REL24, 2, 26, 0x03fffffc, 0, true, signed, ppc64_elf_branch_reloc), /* A variant of R_PPC64_REL24, used when r2 is not the toc pointer. */ - HOW (R_PPC64_REL24_NOTOC, 2, 26, 0x03fffffc, 0, TRUE, signed, + HOW (R_PPC64_REL24_NOTOC, 2, 26, 0x03fffffc, 0, true, signed, ppc64_elf_branch_reloc), /* A relative 16 bit branch; the lower two bits must be zero. */ - HOW (R_PPC64_REL14, 2, 16, 0x0000fffc, 0, TRUE, signed, + HOW (R_PPC64_REL14, 2, 16, 0x0000fffc, 0, true, signed, ppc64_elf_branch_reloc), /* A relative 16 bit branch. Bit 10 should be set to indicate that the branch is expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC64_REL14_BRTAKEN, 2, 16, 0x0000fffc, 0, TRUE, signed, + HOW (R_PPC64_REL14_BRTAKEN, 2, 16, 0x0000fffc, 0, true, signed, ppc64_elf_brtaken_reloc), /* A relative 16 bit branch. Bit 10 should be set to indicate that the branch is not expected to be taken. The lower two bits must be zero. */ - HOW (R_PPC64_REL14_BRNTAKEN, 2, 16, 0x0000fffc, 0, TRUE, signed, + HOW (R_PPC64_REL14_BRNTAKEN, 2, 16, 0x0000fffc, 0, true, signed, ppc64_elf_brtaken_reloc), /* Like R_PPC64_ADDR16, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC64_GOT16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC64_GOT16, 1, 16, 0xffff, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR16_LO, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC64_GOT16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_GOT16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR16_HI, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC64_GOT16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR16_HA, but referring to the GOT table entry for the symbol. */ - HOW (R_PPC64_GOT16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* This is used only by the dynamic linker. The symbol should exist @@ -410,148 +410,148 @@ static reloc_howto_type ppc64_elf_howto_raw[] = dynamic linker copies the data addressed by the symbol from the shared library into the object, because the object being run has to have the data at some particular address. */ - HOW (R_PPC64_COPY, 0, 0, 0, 0, FALSE, dont, + HOW (R_PPC64_COPY, 0, 0, 0, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR64, but used when setting global offset table entries. */ - HOW (R_PPC64_GLOB_DAT, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_GLOB_DAT, 4, 64, 0xffffffffffffffffULL, 0, false, dont, ppc64_elf_unhandled_reloc), /* Created by the link editor. Marks a procedure linkage table entry for a symbol. */ - HOW (R_PPC64_JMP_SLOT, 0, 0, 0, 0, FALSE, dont, + HOW (R_PPC64_JMP_SLOT, 0, 0, 0, 0, false, dont, ppc64_elf_unhandled_reloc), /* Used only by the dynamic linker. When the object is run, this doubleword64 is set to the load address of the object, plus the addend. */ - HOW (R_PPC64_RELATIVE, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_RELATIVE, 4, 64, 0xffffffffffffffffULL, 0, false, dont, bfd_elf_generic_reloc), /* Like R_PPC64_ADDR32, but may be unaligned. */ - HOW (R_PPC64_UADDR32, 2, 32, 0xffffffff, 0, FALSE, bitfield, + HOW (R_PPC64_UADDR32, 2, 32, 0xffffffff, 0, false, bitfield, bfd_elf_generic_reloc), /* Like R_PPC64_ADDR16, but may be unaligned. */ - HOW (R_PPC64_UADDR16, 1, 16, 0xffff, 0, FALSE, bitfield, + HOW (R_PPC64_UADDR16, 1, 16, 0xffff, 0, false, bitfield, bfd_elf_generic_reloc), /* 32-bit PC relative. */ - HOW (R_PPC64_REL32, 2, 32, 0xffffffff, 0, TRUE, signed, + HOW (R_PPC64_REL32, 2, 32, 0xffffffff, 0, true, signed, bfd_elf_generic_reloc), /* 32-bit relocation to the symbol's procedure linkage table. */ - HOW (R_PPC64_PLT32, 2, 32, 0xffffffff, 0, FALSE, bitfield, + HOW (R_PPC64_PLT32, 2, 32, 0xffffffff, 0, false, bitfield, ppc64_elf_unhandled_reloc), /* 32-bit PC relative relocation to the symbol's procedure linkage table. FIXME: R_PPC64_PLTREL32 not supported. */ - HOW (R_PPC64_PLTREL32, 2, 32, 0xffffffff, 0, TRUE, signed, + HOW (R_PPC64_PLTREL32, 2, 32, 0xffffffff, 0, true, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR16_LO, but referring to the PLT table entry for the symbol. */ - HOW (R_PPC64_PLT16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_PLT16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR16_HI, but referring to the PLT table entry for the symbol. */ - HOW (R_PPC64_PLT16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_PLT16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR16_HA, but referring to the PLT table entry for the symbol. */ - HOW (R_PPC64_PLT16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_PLT16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* 16-bit section relative relocation. */ - HOW (R_PPC64_SECTOFF, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC64_SECTOFF, 1, 16, 0xffff, 0, false, signed, ppc64_elf_sectoff_reloc), /* Like R_PPC64_SECTOFF, but no overflow warning. */ - HOW (R_PPC64_SECTOFF_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_SECTOFF_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_sectoff_reloc), /* 16-bit upper half section relative relocation. */ - HOW (R_PPC64_SECTOFF_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_SECTOFF_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_sectoff_reloc), /* 16-bit upper half adjusted section relative relocation. */ - HOW (R_PPC64_SECTOFF_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_SECTOFF_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_sectoff_ha_reloc), /* Like R_PPC64_REL24 without touching the two least significant bits. */ - HOW (R_PPC64_REL30, 2, 30, 0xfffffffc, 2, TRUE, dont, + HOW (R_PPC64_REL30, 2, 30, 0xfffffffc, 2, true, dont, bfd_elf_generic_reloc), /* Relocs in the 64-bit PowerPC ELF ABI, not in the 32-bit ABI. */ /* A standard 64-bit relocation. */ - HOW (R_PPC64_ADDR64, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_ADDR64, 4, 64, 0xffffffffffffffffULL, 0, false, dont, bfd_elf_generic_reloc), /* The bits 32-47 of an address. */ - HOW (R_PPC64_ADDR16_HIGHER, 1, 16, 0xffff, 32, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHER, 1, 16, 0xffff, 32, false, dont, bfd_elf_generic_reloc), /* The bits 32-47 of an address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ - HOW (R_PPC64_ADDR16_HIGHERA, 1, 16, 0xffff, 32, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHERA, 1, 16, 0xffff, 32, false, dont, ppc64_elf_ha_reloc), /* The bits 48-63 of an address. */ - HOW (R_PPC64_ADDR16_HIGHEST, 1, 16, 0xffff, 48, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHEST, 1, 16, 0xffff, 48, false, dont, bfd_elf_generic_reloc), /* The bits 48-63 of an address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ - HOW (R_PPC64_ADDR16_HIGHESTA, 1, 16, 0xffff, 48, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHESTA, 1, 16, 0xffff, 48, false, dont, ppc64_elf_ha_reloc), /* Like ADDR64, but may be unaligned. */ - HOW (R_PPC64_UADDR64, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_UADDR64, 4, 64, 0xffffffffffffffffULL, 0, false, dont, bfd_elf_generic_reloc), /* 64-bit relative relocation. */ - HOW (R_PPC64_REL64, 4, 64, 0xffffffffffffffffULL, 0, TRUE, dont, + HOW (R_PPC64_REL64, 4, 64, 0xffffffffffffffffULL, 0, true, dont, bfd_elf_generic_reloc), /* 64-bit relocation to the symbol's procedure linkage table. */ - HOW (R_PPC64_PLT64, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_PLT64, 4, 64, 0xffffffffffffffffULL, 0, false, dont, ppc64_elf_unhandled_reloc), /* 64-bit PC relative relocation to the symbol's procedure linkage table. */ /* FIXME: R_PPC64_PLTREL64 not supported. */ - HOW (R_PPC64_PLTREL64, 4, 64, 0xffffffffffffffffULL, 0, TRUE, dont, + HOW (R_PPC64_PLTREL64, 4, 64, 0xffffffffffffffffULL, 0, true, dont, ppc64_elf_unhandled_reloc), /* 16 bit TOC-relative relocation. */ /* R_PPC64_TOC16 47 half16* S + A - .TOC. */ - HOW (R_PPC64_TOC16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC64_TOC16, 1, 16, 0xffff, 0, false, signed, ppc64_elf_toc_reloc), /* 16 bit TOC-relative relocation without overflow. */ /* R_PPC64_TOC16_LO 48 half16 #lo (S + A - .TOC.) */ - HOW (R_PPC64_TOC16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_TOC16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_toc_reloc), /* 16 bit TOC-relative relocation, high 16 bits. */ /* R_PPC64_TOC16_HI 49 half16 #hi (S + A - .TOC.) */ - HOW (R_PPC64_TOC16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_TOC16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_toc_reloc), /* 16 bit TOC-relative relocation, high 16 bits, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ /* R_PPC64_TOC16_HA 50 half16 #ha (S + A - .TOC.) */ - HOW (R_PPC64_TOC16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_TOC16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_toc_ha_reloc), /* 64-bit relocation; insert value of TOC base (.TOC.). */ /* R_PPC64_TOC 51 doubleword64 .TOC. */ - HOW (R_PPC64_TOC, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_TOC, 4, 64, 0xffffffffffffffffULL, 0, false, dont, ppc64_elf_toc64_reloc), /* Like R_PPC64_GOT16, but also informs the link editor that the @@ -563,428 +563,428 @@ static reloc_howto_type ppc64_elf_howto_raw[] = The link editor may also skip all of this and just (c) emit a R_PPC64_GLOB_DAT to tie the symbol to the GOT entry. */ /* FIXME: R_PPC64_PLTGOT16 not implemented. */ - HOW (R_PPC64_PLTGOT16, 1, 16, 0xffff, 0, FALSE,signed, + HOW (R_PPC64_PLTGOT16, 1, 16, 0xffff, 0, false,signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_PLTGOT16, but without overflow. */ /* FIXME: R_PPC64_PLTGOT16_LO not implemented. */ - HOW (R_PPC64_PLTGOT16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_PLTGOT16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_PLT_GOT16, but using bits 16-31 of the address. */ /* FIXME: R_PPC64_PLTGOT16_HI not implemented. */ - HOW (R_PPC64_PLTGOT16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_PLTGOT16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_PLT_GOT16, but using bits 16-31 of the address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ /* FIXME: R_PPC64_PLTGOT16_HA not implemented. */ - HOW (R_PPC64_PLTGOT16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_PLTGOT16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_ADDR16, but for instructions with a DS field. */ - HOW (R_PPC64_ADDR16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_ADDR16_DS, 1, 16, 0xfffc, 0, false, signed, bfd_elf_generic_reloc), /* Like R_PPC64_ADDR16_LO, but for instructions with a DS field. */ - HOW (R_PPC64_ADDR16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_ADDR16_LO_DS, 1, 16, 0xfffc, 0, false, dont, bfd_elf_generic_reloc), /* Like R_PPC64_GOT16, but for instructions with a DS field. */ - HOW (R_PPC64_GOT16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_GOT16_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_GOT16_LO, but for instructions with a DS field. */ - HOW (R_PPC64_GOT16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_GOT16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_PLT16_LO, but for instructions with a DS field. */ - HOW (R_PPC64_PLT16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_PLT16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_SECTOFF, but for instructions with a DS field. */ - HOW (R_PPC64_SECTOFF_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_SECTOFF_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_sectoff_reloc), /* Like R_PPC64_SECTOFF_LO, but for instructions with a DS field. */ - HOW (R_PPC64_SECTOFF_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_SECTOFF_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_sectoff_reloc), /* Like R_PPC64_TOC16, but for instructions with a DS field. */ - HOW (R_PPC64_TOC16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_TOC16_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_toc_reloc), /* Like R_PPC64_TOC16_LO, but for instructions with a DS field. */ - HOW (R_PPC64_TOC16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_TOC16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_toc_reloc), /* Like R_PPC64_PLTGOT16, but for instructions with a DS field. */ /* FIXME: R_PPC64_PLTGOT16_DS not implemented. */ - HOW (R_PPC64_PLTGOT16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_PLTGOT16_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like R_PPC64_PLTGOT16_LO, but for instructions with a DS field. */ /* FIXME: R_PPC64_PLTGOT16_LO not implemented. */ - HOW (R_PPC64_PLTGOT16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_PLTGOT16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_unhandled_reloc), /* Marker relocs for TLS. */ - HOW (R_PPC64_TLS, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_TLS, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_TLSGD, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_TLSGD, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_TLSLD, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_TLSLD, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), /* Marker reloc for optimizing r2 save in prologue rather than on each plt call stub. */ - HOW (R_PPC64_TOCSAVE, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_TOCSAVE, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), /* Marker relocs on inline plt call instructions. */ - HOW (R_PPC64_PLTSEQ, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_PLTSEQ, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_PLTCALL, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_PLTCALL, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), /* Computes the load module index of the load module that contains the definition of its TLS sym. */ - HOW (R_PPC64_DTPMOD64, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_DTPMOD64, 4, 64, 0xffffffffffffffffULL, 0, false, dont, ppc64_elf_unhandled_reloc), /* Computes a dtv-relative displacement, the difference between the value of sym+add and the base address of the thread-local storage block that contains the definition of sym, minus 0x8000. */ - HOW (R_PPC64_DTPREL64, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_DTPREL64, 4, 64, 0xffffffffffffffffULL, 0, false, dont, ppc64_elf_unhandled_reloc), /* A 16 bit dtprel reloc. */ - HOW (R_PPC64_DTPREL16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC64_DTPREL16, 1, 16, 0xffff, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like DTPREL16, but no overflow. */ - HOW (R_PPC64_DTPREL16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_DTPREL16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like DTPREL16_LO, but next higher group of 16 bits. */ - HOW (R_PPC64_DTPREL16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_DTPREL16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like DTPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC64_DTPREL16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_DTPREL16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like DTPREL16_HI, but next higher group of 16 bits. */ - HOW (R_PPC64_DTPREL16_HIGHER, 1, 16, 0xffff, 32, FALSE, dont, + HOW (R_PPC64_DTPREL16_HIGHER, 1, 16, 0xffff, 32, false, dont, ppc64_elf_unhandled_reloc), /* Like DTPREL16_HIGHER, but adjust for low 16 bits. */ - HOW (R_PPC64_DTPREL16_HIGHERA, 1, 16, 0xffff, 32, FALSE, dont, + HOW (R_PPC64_DTPREL16_HIGHERA, 1, 16, 0xffff, 32, false, dont, ppc64_elf_unhandled_reloc), /* Like DTPREL16_HIGHER, but next higher group of 16 bits. */ - HOW (R_PPC64_DTPREL16_HIGHEST, 1, 16, 0xffff, 48, FALSE, dont, + HOW (R_PPC64_DTPREL16_HIGHEST, 1, 16, 0xffff, 48, false, dont, ppc64_elf_unhandled_reloc), /* Like DTPREL16_HIGHEST, but adjust for low 16 bits. */ - HOW (R_PPC64_DTPREL16_HIGHESTA, 1, 16, 0xffff, 48, FALSE, dont, + HOW (R_PPC64_DTPREL16_HIGHESTA, 1, 16, 0xffff, 48, false, dont, ppc64_elf_unhandled_reloc), /* Like DTPREL16, but for insns with a DS field. */ - HOW (R_PPC64_DTPREL16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_DTPREL16_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like DTPREL16_DS, but no overflow. */ - HOW (R_PPC64_DTPREL16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_DTPREL16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_unhandled_reloc), /* Computes a tp-relative displacement, the difference between the value of sym+add and the value of the thread pointer (r13). */ - HOW (R_PPC64_TPREL64, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_TPREL64, 4, 64, 0xffffffffffffffffULL, 0, false, dont, ppc64_elf_unhandled_reloc), /* A 16 bit tprel reloc. */ - HOW (R_PPC64_TPREL16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC64_TPREL16, 1, 16, 0xffff, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like TPREL16, but no overflow. */ - HOW (R_PPC64_TPREL16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_TPREL16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like TPREL16_LO, but next higher group of 16 bits. */ - HOW (R_PPC64_TPREL16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_TPREL16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like TPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC64_TPREL16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_TPREL16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like TPREL16_HI, but next higher group of 16 bits. */ - HOW (R_PPC64_TPREL16_HIGHER, 1, 16, 0xffff, 32, FALSE, dont, + HOW (R_PPC64_TPREL16_HIGHER, 1, 16, 0xffff, 32, false, dont, ppc64_elf_unhandled_reloc), /* Like TPREL16_HIGHER, but adjust for low 16 bits. */ - HOW (R_PPC64_TPREL16_HIGHERA, 1, 16, 0xffff, 32, FALSE, dont, + HOW (R_PPC64_TPREL16_HIGHERA, 1, 16, 0xffff, 32, false, dont, ppc64_elf_unhandled_reloc), /* Like TPREL16_HIGHER, but next higher group of 16 bits. */ - HOW (R_PPC64_TPREL16_HIGHEST, 1, 16, 0xffff, 48, FALSE, dont, + HOW (R_PPC64_TPREL16_HIGHEST, 1, 16, 0xffff, 48, false, dont, ppc64_elf_unhandled_reloc), /* Like TPREL16_HIGHEST, but adjust for low 16 bits. */ - HOW (R_PPC64_TPREL16_HIGHESTA, 1, 16, 0xffff, 48, FALSE, dont, + HOW (R_PPC64_TPREL16_HIGHESTA, 1, 16, 0xffff, 48, false, dont, ppc64_elf_unhandled_reloc), /* Like TPREL16, but for insns with a DS field. */ - HOW (R_PPC64_TPREL16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_TPREL16_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like TPREL16_DS, but no overflow. */ - HOW (R_PPC64_TPREL16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_TPREL16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_unhandled_reloc), /* Allocates two contiguous entries in the GOT to hold a tls_index structure, with values (sym+add)@dtpmod and (sym+add)@dtprel, and computes the offset to the first entry relative to the TOC base (r2). */ - HOW (R_PPC64_GOT_TLSGD16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC64_GOT_TLSGD16, 1, 16, 0xffff, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_TLSGD16, but no overflow. */ - HOW (R_PPC64_GOT_TLSGD16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_GOT_TLSGD16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like GOT_TLSGD16_LO, but next higher group of 16 bits. */ - HOW (R_PPC64_GOT_TLSGD16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_TLSGD16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_TLSGD16_HI, but adjust for low 16 bits. */ - HOW (R_PPC64_GOT_TLSGD16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_TLSGD16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Allocates two contiguous entries in the GOT to hold a tls_index structure, with values (sym+add)@dtpmod and zero, and computes the offset to the first entry relative to the TOC base (r2). */ - HOW (R_PPC64_GOT_TLSLD16, 1, 16, 0xffff, 0, FALSE, signed, + HOW (R_PPC64_GOT_TLSLD16, 1, 16, 0xffff, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_TLSLD16, but no overflow. */ - HOW (R_PPC64_GOT_TLSLD16_LO, 1, 16, 0xffff, 0, FALSE, dont, + HOW (R_PPC64_GOT_TLSLD16_LO, 1, 16, 0xffff, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like GOT_TLSLD16_LO, but next higher group of 16 bits. */ - HOW (R_PPC64_GOT_TLSLD16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_TLSLD16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_TLSLD16_HI, but adjust for low 16 bits. */ - HOW (R_PPC64_GOT_TLSLD16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_TLSLD16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Allocates an entry in the GOT with value (sym+add)@dtprel, and computes the offset to the entry relative to the TOC base (r2). */ - HOW (R_PPC64_GOT_DTPREL16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_GOT_DTPREL16_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_DTPREL16_DS, but no overflow. */ - HOW (R_PPC64_GOT_DTPREL16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_GOT_DTPREL16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like GOT_DTPREL16_LO_DS, but next higher group of 16 bits. */ - HOW (R_PPC64_GOT_DTPREL16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_DTPREL16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_DTPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC64_GOT_DTPREL16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_DTPREL16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Allocates an entry in the GOT with value (sym+add)@tprel, and computes the offset to the entry relative to the TOC base (r2). */ - HOW (R_PPC64_GOT_TPREL16_DS, 1, 16, 0xfffc, 0, FALSE, signed, + HOW (R_PPC64_GOT_TPREL16_DS, 1, 16, 0xfffc, 0, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_TPREL16_DS, but no overflow. */ - HOW (R_PPC64_GOT_TPREL16_LO_DS, 1, 16, 0xfffc, 0, FALSE, dont, + HOW (R_PPC64_GOT_TPREL16_LO_DS, 1, 16, 0xfffc, 0, false, dont, ppc64_elf_unhandled_reloc), /* Like GOT_TPREL16_LO_DS, but next higher group of 16 bits. */ - HOW (R_PPC64_GOT_TPREL16_HI, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_TPREL16_HI, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), /* Like GOT_TPREL16_HI, but adjust for low 16 bits. */ - HOW (R_PPC64_GOT_TPREL16_HA, 1, 16, 0xffff, 16, FALSE, signed, + HOW (R_PPC64_GOT_TPREL16_HA, 1, 16, 0xffff, 16, false, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_JMP_IREL, 0, 0, 0, 0, FALSE, dont, + HOW (R_PPC64_JMP_IREL, 0, 0, 0, 0, false, dont, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_IRELATIVE, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_IRELATIVE, 4, 64, 0xffffffffffffffffULL, 0, false, dont, bfd_elf_generic_reloc), /* A 16 bit relative relocation. */ - HOW (R_PPC64_REL16, 1, 16, 0xffff, 0, TRUE, signed, + HOW (R_PPC64_REL16, 1, 16, 0xffff, 0, true, signed, bfd_elf_generic_reloc), /* A 16 bit relative relocation without overflow. */ - HOW (R_PPC64_REL16_LO, 1, 16, 0xffff, 0, TRUE, dont, + HOW (R_PPC64_REL16_LO, 1, 16, 0xffff, 0, true, dont, bfd_elf_generic_reloc), /* The high order 16 bits of a relative address. */ - HOW (R_PPC64_REL16_HI, 1, 16, 0xffff, 16, TRUE, signed, + HOW (R_PPC64_REL16_HI, 1, 16, 0xffff, 16, true, signed, bfd_elf_generic_reloc), /* The high order 16 bits of a relative address, plus 1 if the contents of the low 16 bits, treated as a signed number, is negative. */ - HOW (R_PPC64_REL16_HA, 1, 16, 0xffff, 16, TRUE, signed, + HOW (R_PPC64_REL16_HA, 1, 16, 0xffff, 16, true, signed, ppc64_elf_ha_reloc), - HOW (R_PPC64_REL16_HIGH, 1, 16, 0xffff, 16, TRUE, dont, + HOW (R_PPC64_REL16_HIGH, 1, 16, 0xffff, 16, true, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_REL16_HIGHA, 1, 16, 0xffff, 16, TRUE, dont, + HOW (R_PPC64_REL16_HIGHA, 1, 16, 0xffff, 16, true, dont, ppc64_elf_ha_reloc), - HOW (R_PPC64_REL16_HIGHER, 1, 16, 0xffff, 32, TRUE, dont, + HOW (R_PPC64_REL16_HIGHER, 1, 16, 0xffff, 32, true, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_REL16_HIGHERA, 1, 16, 0xffff, 32, TRUE, dont, + HOW (R_PPC64_REL16_HIGHERA, 1, 16, 0xffff, 32, true, dont, ppc64_elf_ha_reloc), - HOW (R_PPC64_REL16_HIGHEST, 1, 16, 0xffff, 48, TRUE, dont, + HOW (R_PPC64_REL16_HIGHEST, 1, 16, 0xffff, 48, true, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_REL16_HIGHESTA, 1, 16, 0xffff, 48, TRUE, dont, + HOW (R_PPC64_REL16_HIGHESTA, 1, 16, 0xffff, 48, true, dont, ppc64_elf_ha_reloc), /* Like R_PPC64_REL16_HA but for split field in addpcis. */ - HOW (R_PPC64_REL16DX_HA, 2, 16, 0x1fffc1, 16, TRUE, signed, + HOW (R_PPC64_REL16DX_HA, 2, 16, 0x1fffc1, 16, true, signed, ppc64_elf_ha_reloc), /* A split-field reloc for addpcis, non-relative (gas internal use only). */ - HOW (R_PPC64_16DX_HA, 2, 16, 0x1fffc1, 16, FALSE, signed, + HOW (R_PPC64_16DX_HA, 2, 16, 0x1fffc1, 16, false, signed, ppc64_elf_ha_reloc), /* Like R_PPC64_ADDR16_HI, but no overflow. */ - HOW (R_PPC64_ADDR16_HIGH, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGH, 1, 16, 0xffff, 16, false, dont, bfd_elf_generic_reloc), /* Like R_PPC64_ADDR16_HA, but no overflow. */ - HOW (R_PPC64_ADDR16_HIGHA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHA, 1, 16, 0xffff, 16, false, dont, ppc64_elf_ha_reloc), /* Like R_PPC64_DTPREL16_HI, but no overflow. */ - HOW (R_PPC64_DTPREL16_HIGH, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC64_DTPREL16_HIGH, 1, 16, 0xffff, 16, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_DTPREL16_HA, but no overflow. */ - HOW (R_PPC64_DTPREL16_HIGHA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC64_DTPREL16_HIGHA, 1, 16, 0xffff, 16, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_TPREL16_HI, but no overflow. */ - HOW (R_PPC64_TPREL16_HIGH, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC64_TPREL16_HIGH, 1, 16, 0xffff, 16, false, dont, ppc64_elf_unhandled_reloc), /* Like R_PPC64_TPREL16_HA, but no overflow. */ - HOW (R_PPC64_TPREL16_HIGHA, 1, 16, 0xffff, 16, FALSE, dont, + HOW (R_PPC64_TPREL16_HIGHA, 1, 16, 0xffff, 16, false, dont, ppc64_elf_unhandled_reloc), /* Marker reloc on ELFv2 large-model function entry. */ - HOW (R_PPC64_ENTRY, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_ENTRY, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), /* Like ADDR64, but use local entry point of function. */ - HOW (R_PPC64_ADDR64_LOCAL, 4, 64, 0xffffffffffffffffULL, 0, FALSE, dont, + HOW (R_PPC64_ADDR64_LOCAL, 4, 64, 0xffffffffffffffffULL, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_PLTSEQ_NOTOC, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_PLTSEQ_NOTOC, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_PLTCALL_NOTOC, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_PLTCALL_NOTOC, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_PCREL_OPT, 2, 32, 0, 0, FALSE, dont, + HOW (R_PPC64_PCREL_OPT, 2, 32, 0, 0, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_D34, 4, 34, 0x3ffff0000ffffULL, 0, FALSE, signed, + HOW (R_PPC64_D34, 4, 34, 0x3ffff0000ffffULL, 0, false, signed, ppc64_elf_prefix_reloc), - HOW (R_PPC64_D34_LO, 4, 34, 0x3ffff0000ffffULL, 0, FALSE, dont, + HOW (R_PPC64_D34_LO, 4, 34, 0x3ffff0000ffffULL, 0, false, dont, ppc64_elf_prefix_reloc), - HOW (R_PPC64_D34_HI30, 4, 34, 0x3ffff0000ffffULL, 34, FALSE, dont, + HOW (R_PPC64_D34_HI30, 4, 34, 0x3ffff0000ffffULL, 34, false, dont, ppc64_elf_prefix_reloc), - HOW (R_PPC64_D34_HA30, 4, 34, 0x3ffff0000ffffULL, 34, FALSE, dont, + HOW (R_PPC64_D34_HA30, 4, 34, 0x3ffff0000ffffULL, 34, false, dont, ppc64_elf_prefix_reloc), - HOW (R_PPC64_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_prefix_reloc), - HOW (R_PPC64_GOT_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_GOT_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_PLT_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_PLT_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_PLT_PCREL34_NOTOC, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_PLT_PCREL34_NOTOC, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_TPREL34, 4, 34, 0x3ffff0000ffffULL, 0, FALSE, signed, + HOW (R_PPC64_TPREL34, 4, 34, 0x3ffff0000ffffULL, 0, false, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_DTPREL34, 4, 34, 0x3ffff0000ffffULL, 0, FALSE, signed, + HOW (R_PPC64_DTPREL34, 4, 34, 0x3ffff0000ffffULL, 0, false, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_GOT_TLSGD_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_GOT_TLSGD_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_GOT_TLSLD_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_GOT_TLSLD_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_GOT_TPREL_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_GOT_TPREL_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_GOT_DTPREL_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_GOT_DTPREL_PCREL34, 4, 34, 0x3ffff0000ffffULL, 0, true, signed, ppc64_elf_unhandled_reloc), - HOW (R_PPC64_ADDR16_HIGHER34, 1, 16, 0xffff, 34, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHER34, 1, 16, 0xffff, 34, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_ADDR16_HIGHERA34, 1, 16, 0xffff, 34, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHERA34, 1, 16, 0xffff, 34, false, dont, ppc64_elf_ha_reloc), - HOW (R_PPC64_ADDR16_HIGHEST34, 1, 16, 0xffff, 50, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHEST34, 1, 16, 0xffff, 50, false, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_ADDR16_HIGHESTA34, 1, 16, 0xffff, 50, FALSE, dont, + HOW (R_PPC64_ADDR16_HIGHESTA34, 1, 16, 0xffff, 50, false, dont, ppc64_elf_ha_reloc), - HOW (R_PPC64_REL16_HIGHER34, 1, 16, 0xffff, 34, TRUE, dont, + HOW (R_PPC64_REL16_HIGHER34, 1, 16, 0xffff, 34, true, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_REL16_HIGHERA34, 1, 16, 0xffff, 34, TRUE, dont, + HOW (R_PPC64_REL16_HIGHERA34, 1, 16, 0xffff, 34, true, dont, ppc64_elf_ha_reloc), - HOW (R_PPC64_REL16_HIGHEST34, 1, 16, 0xffff, 50, TRUE, dont, + HOW (R_PPC64_REL16_HIGHEST34, 1, 16, 0xffff, 50, true, dont, bfd_elf_generic_reloc), - HOW (R_PPC64_REL16_HIGHESTA34, 1, 16, 0xffff, 50, TRUE, dont, + HOW (R_PPC64_REL16_HIGHESTA34, 1, 16, 0xffff, 50, true, dont, ppc64_elf_ha_reloc), - HOW (R_PPC64_D28, 4, 28, 0xfff0000ffffULL, 0, FALSE, signed, + HOW (R_PPC64_D28, 4, 28, 0xfff0000ffffULL, 0, false, signed, ppc64_elf_prefix_reloc), - HOW (R_PPC64_PCREL28, 4, 28, 0xfff0000ffffULL, 0, TRUE, signed, + HOW (R_PPC64_PCREL28, 4, 28, 0xfff0000ffffULL, 0, true, signed, ppc64_elf_prefix_reloc), /* GNU extension to record C++ vtable hierarchy. */ - HOW (R_PPC64_GNU_VTINHERIT, 0, 0, 0, 0, FALSE, dont, + HOW (R_PPC64_GNU_VTINHERIT, 0, 0, 0, 0, false, dont, NULL), /* GNU extension to record C++ vtable member usage. */ - HOW (R_PPC64_GNU_VTENTRY, 0, 0, 0, 0, FALSE, dont, + HOW (R_PPC64_GNU_VTENTRY, 0, 0, 0, 0, false, dont, NULL), }; @@ -1356,7 +1356,7 @@ ppc64_elf_reloc_name_lookup (bfd *abfd, const char *r_name) /* Set the howto pointer for a PowerPC ELF reloc. */ -static bfd_boolean +static bool ppc64_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -1373,7 +1373,7 @@ ppc64_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = ppc64_elf_howto_table[type]; if (cache_ptr->howto == NULL || cache_ptr->howto->name == NULL) @@ -1382,10 +1382,10 @@ ppc64_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Handle the R_PPC64_ADDR16_HA and similar relocs. */ @@ -1456,7 +1456,7 @@ ppc64_elf_branch_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, { bfd_vma dest = opd_entry_value (symbol->section, symbol->value + reloc_entry->addend, - NULL, NULL, FALSE); + NULL, NULL, false); if (dest != (bfd_vma) -1) reloc_entry->addend = dest - (symbol->value + symbol->section->output_section->vma @@ -1498,7 +1498,7 @@ ppc64_elf_brtaken_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, enum elf_ppc64_reloc_type r_type; bfd_size_type octets; /* Assume 'at' branch hints. */ - bfd_boolean is_isa_v2 = TRUE; + bool is_isa_v2 = true; /* If this is a relocatable link (output_bfd test tells us), just call the generic function. Any adjustment will be done at final @@ -1826,7 +1826,7 @@ struct ppc64_elf_obj_tdata /* Override the generic function because we store some extras. */ -static bfd_boolean +static bool ppc64_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct ppc64_elf_obj_tdata), @@ -1836,11 +1836,11 @@ ppc64_elf_mkobject (bfd *abfd) /* Fix bad default arch selected for a 64 bit input bfd when the default is 32 bit. Also select arch based on apuinfo. */ -static bfd_boolean +static bool ppc64_elf_object_p (bfd *abfd) { if (!abfd->arch_info->the_default) - return TRUE; + return true; if (abfd->arch_info->bits_per_word == 32) { @@ -1858,13 +1858,13 @@ ppc64_elf_object_p (bfd *abfd) /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { size_t offset, size; if (note->descsz != 504) - return FALSE; + return false; /* pr_cursig */ elf_tdata (abfd)->core->signal = bfd_get_16 (abfd, note->descdata + 12); @@ -1881,11 +1881,11 @@ ppc64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz != 136) - return FALSE; + return false; elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24); @@ -1894,7 +1894,7 @@ ppc64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) elf_tdata (abfd)->core->command = _bfd_elfcore_strndup (abfd, note->descdata + 56, 80); - return TRUE; + return true; } static char * @@ -2020,7 +2020,7 @@ struct _ppc64_elf_section_data #define ppc64_elf_section_data(sec) \ ((struct _ppc64_elf_section_data *) elf_section_data (sec)) -static bfd_boolean +static bool ppc64_elf_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -2030,14 +2030,14 @@ ppc64_elf_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } return _bfd_elf_new_section_hook (abfd, sec); } -static bfd_boolean +static bool ppc64_elf_section_flags (const Elf_Internal_Shdr *hdr) { const char *name = hdr->bfd_section->name; @@ -2046,7 +2046,7 @@ ppc64_elf_section_flags (const Elf_Internal_Shdr *hdr) || strncmp (name, ".sdata", 6) == 0) hdr->bfd_section->flags |= SEC_SMALL_DATA; - return TRUE; + return true; } static struct _opd_sec_data * @@ -2060,7 +2060,7 @@ get_opd_info (asection * sec) } /* Parameters for the qsort hook. */ -static bfd_boolean synthetic_relocatable; +static bool synthetic_relocatable; static const asection *synthetic_opd; /* qsort comparison function for ppc64_elf_get_synthetic_symtab. */ @@ -2196,7 +2196,7 @@ sym_exists_at (asymbol **syms, size_t lo, size_t hi, unsigned int id, return NULL; } -static bfd_boolean +static bool section_covers_vma (bfd *abfd ATTRIBUTE_UNUSED, asection *section, void *ptr) { bfd_vma vma = *(bfd_vma *) ptr; @@ -2220,7 +2220,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, char *names; size_t symcount, codesecsym, codesecsymend, secsymend, opdsymend; asection *opd = NULL; - bfd_boolean relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0; + bool relocatable = (abfd->flags & (EXEC_P | DYNAMIC)) == 0; asymbol **syms; int abi = abiversion (abfd); @@ -2336,7 +2336,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, if (relocatable) { - bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_relocs) (bfd *, asection *, asymbol **, bool); arelent *r; size_t size; size_t relcount; @@ -2349,7 +2349,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, if (relcount == 0) goto done; - if (!(*slurp_relocs) (abfd, opd, static_syms, FALSE)) + if (!(*slurp_relocs) (abfd, opd, static_syms, false)) { count = -1; goto done; @@ -2435,7 +2435,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, } else { - bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_relocs) (bfd *, asection *, asymbol **, bool); bfd_byte *contents = NULL; size_t size; size_t plt_count = 0; @@ -2541,7 +2541,7 @@ ppc64_elf_get_synthetic_symtab (bfd *abfd, if (relplt != NULL) { slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table; - if (!(*slurp_relocs) (abfd, relplt, dyn_syms, TRUE)) + if (!(*slurp_relocs) (abfd, relplt, dyn_syms, true)) goto free_contents_and_exit_err; plt_count = relplt->size / sizeof (Elf64_External_Rela); @@ -3529,7 +3529,7 @@ ppc64_elf_link_hash_table_create (bfd *abfd) /* Create sections for linker generated code. */ -static bfd_boolean +static bool create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) { struct ppc_link_hash_table *htab; @@ -3546,18 +3546,18 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) flags); if (htab->sfpr == NULL || !bfd_set_section_alignment (htab->sfpr, 2)) - return FALSE; + return false; } if (bfd_link_relocatable (info)) - return TRUE; + return true; /* Create .glink for lazy dynamic linking support. */ htab->glink = bfd_make_section_anyway_with_flags (dynobj, ".glink", flags); if (htab->glink == NULL || !bfd_set_section_alignment (htab->glink, 3)) - return FALSE; + return false; /* The part of .glink used by global entry stubs, separate so that it can be aligned appropriately without affecting htab->glink. */ @@ -3565,7 +3565,7 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) flags); if (htab->global_entry == NULL || !bfd_set_section_alignment (htab->global_entry, 2)) - return FALSE; + return false; if (!info->no_ld_generated_unwind_info) { @@ -3576,14 +3576,14 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) flags); if (htab->glink_eh_frame == NULL || !bfd_set_section_alignment (htab->glink_eh_frame, 2)) - return FALSE; + return false; } flags = SEC_ALLOC | SEC_LINKER_CREATED; htab->elf.iplt = bfd_make_section_anyway_with_flags (dynobj, ".iplt", flags); if (htab->elf.iplt == NULL || !bfd_set_section_alignment (htab->elf.iplt, 3)) - return FALSE; + return false; flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -3591,7 +3591,7 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) = bfd_make_section_anyway_with_flags (dynobj, ".rela.iplt", flags); if (htab->elf.irelplt == NULL || !bfd_set_section_alignment (htab->elf.irelplt, 3)) - return FALSE; + return false; /* Create branch lookup table for plt_branch stubs. */ flags = (SEC_ALLOC | SEC_LOAD @@ -3600,7 +3600,7 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) flags); if (htab->brlt == NULL || !bfd_set_section_alignment (htab->brlt, 3)) - return FALSE; + return false; /* Local plt entries, put in .branch_lt but a separate section for convenience. */ @@ -3608,10 +3608,10 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) flags); if (htab->pltlocal == NULL || !bfd_set_section_alignment (htab->pltlocal, 3)) - return FALSE; + return false; if (!bfd_link_pic (info)) - return TRUE; + return true; flags = (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -3619,20 +3619,20 @@ create_linkage_sections (bfd *dynobj, struct bfd_link_info *info) = bfd_make_section_anyway_with_flags (dynobj, ".rela.branch_lt", flags); if (htab->relbrlt == NULL || !bfd_set_section_alignment (htab->relbrlt, 3)) - return FALSE; + return false; htab->relpltlocal = bfd_make_section_anyway_with_flags (dynobj, ".rela.branch_lt", flags); if (htab->relpltlocal == NULL || !bfd_set_section_alignment (htab->relpltlocal, 3)) - return FALSE; + return false; - return TRUE; + return true; } /* Satisfy the ELF linker by filling in some fields in our fake bfd. */ -bfd_boolean +bool ppc64_elf_init_stub_bfd (struct bfd_link_info *info, struct ppc64_elf_params *params) { @@ -3706,9 +3706,9 @@ ppc_stub_name (const asection *input_section, occurs. This function selects the correct entry to use. */ static struct ppc_stub_hash_entry * -select_alt_stub (struct ppc_stub_hash_entry *entry, bfd_boolean notoc) +select_alt_stub (struct ppc_stub_hash_entry *entry, bool notoc) { - bfd_boolean have_notoc; + bool have_notoc; have_notoc = (entry->stub_type == ppc_stub_plt_call_notoc || entry->stub_type == ppc_stub_plt_branch_notoc @@ -3764,7 +3764,7 @@ ppc_get_stub_entry (const asection *input_section, return NULL; stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table, - stub_name, FALSE, FALSE); + stub_name, false, false); if (h != NULL) h->u.stub_cache = stub_entry; @@ -3773,7 +3773,7 @@ ppc_get_stub_entry (const asection *input_section, if (stub_entry != NULL && htab->params->power10_stubs == -1) { - bfd_boolean notoc = ELF64_R_TYPE (rel->r_info) == R_PPC64_REL24_NOTOC; + bool notoc = ELF64_R_TYPE (rel->r_info) == R_PPC64_REL24_NOTOC; stub_entry = select_alt_stub (stub_entry, notoc); } @@ -3820,7 +3820,7 @@ ppc_add_stub (const char *stub_name, /* Enter this entry into the linker stub hash table. */ stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table, stub_name, - TRUE, FALSE); + true, false); if (stub_entry == NULL) { /* xgettext:c-format */ @@ -3837,7 +3837,7 @@ ppc_add_stub (const char *stub_name, /* Create .got and .rela.got sections in ABFD, and .got in dynobj if not already done. */ -static bfd_boolean +static bool create_got_section (bfd *abfd, struct bfd_link_info *info) { asection *got, *relgot; @@ -3845,13 +3845,13 @@ create_got_section (bfd *abfd, struct bfd_link_info *info) struct ppc_link_hash_table *htab = ppc_hash_table (info); if (!is_ppc64_elf (abfd)) - return FALSE; + return false; if (htab == NULL) - return FALSE; + return false; if (!htab->elf.sgot && !_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -3859,17 +3859,17 @@ create_got_section (bfd *abfd, struct bfd_link_info *info) got = bfd_make_section_anyway_with_flags (abfd, ".got", flags); if (!got || !bfd_set_section_alignment (got, 3)) - return FALSE; + return false; relgot = bfd_make_section_anyway_with_flags (abfd, ".rela.got", flags | SEC_READONLY); if (!relgot || !bfd_set_section_alignment (relgot, 3)) - return FALSE; + return false; ppc64_elf_tdata (abfd)->got = got; ppc64_elf_tdata (abfd)->relgot = relgot; - return TRUE; + return true; } /* Follow indirect and warning symbol links. */ @@ -4057,7 +4057,7 @@ lookup_fdh (struct ppc_link_hash_entry *fh, struct ppc_link_hash_table *htab) const char *fd_name = fh->elf.root.root.string + 1; fdh = ppc_elf_hash_entry (elf_link_hash_lookup (&htab->elf, fd_name, - FALSE, FALSE, FALSE)); + false, false, false)); if (fdh == NULL) return fdh; @@ -4089,7 +4089,7 @@ make_fdh (struct bfd_link_info *info, if (!_bfd_generic_link_add_one_symbol (info, abfd, fh->elf.root.root.string + 1, flags, bfd_und_section_ptr, 0, - NULL, FALSE, FALSE, &bh)) + NULL, false, false, &bh)) return NULL; fdh = (struct ppc_link_hash_entry *) bh; @@ -4105,7 +4105,7 @@ make_fdh (struct bfd_link_info *info, /* Fix function descriptor symbols defined in .opd sections to be function type. */ -static bfd_boolean +static bool ppc64_elf_add_symbol_hook (bfd *ibfd, struct bfd_link_info *info, Elf_Internal_Sym *isym, @@ -4128,7 +4128,7 @@ ppc64_elf_add_symbol_hook (bfd *ibfd, if (!bfd_link_relocatable (info) && (*sec)->reloc_count != 0 && opd_entry_value (*sec, *value, &code_sec, NULL, - FALSE) != (bfd_vma) -1 + false) != (bfd_vma) -1 && discarded_section (code_sec)) { *sec = bfd_und_section_ptr; @@ -4153,11 +4153,11 @@ ppc64_elf_add_symbol_hook (bfd *ibfd, _bfd_error_handler (_("symbol '%s' has invalid st_other" " for ABI version 1"), *name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } - return TRUE; + return true; } /* Merge non-visibility st_other attributes: local entry point. */ @@ -4165,8 +4165,8 @@ ppc64_elf_add_symbol_hook (bfd *ibfd, static void ppc64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, unsigned int st_other, - bfd_boolean definition, - bfd_boolean dynamic) + bool definition, + bool dynamic) { if (definition && (!dynamic || !h->def_regular)) h->other = ((st_other & ~ELF_ST_VISIBILITY (-1)) @@ -4176,19 +4176,19 @@ ppc64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, /* Hook called on merging a symbol. We use this to clear "fake" since we now have a real symbol. */ -static bfd_boolean +static bool ppc64_elf_merge_symbol (struct elf_link_hash_entry *h, const Elf_Internal_Sym *isym, asection **psec ATTRIBUTE_UNUSED, - bfd_boolean newdef ATTRIBUTE_UNUSED, - bfd_boolean olddef ATTRIBUTE_UNUSED, + bool newdef ATTRIBUTE_UNUSED, + bool olddef ATTRIBUTE_UNUSED, bfd *oldbfd ATTRIBUTE_UNUSED, const asection *oldsec ATTRIBUTE_UNUSED) { ppc_elf_hash_entry (h)->fake = 0; if ((STO_PPC64_LOCAL_MASK & isym->st_other) != 0) ppc_elf_hash_entry (h)->non_zero_localentry = 1; - return TRUE; + return true; } /* This function makes an old ABI object reference to ".bar" cause the @@ -4240,7 +4240,7 @@ ppc64_elf_archive_symbol_lookup (bfd *abfd, most restrictive visibility of the function descriptor and the function entry symbol is used. */ -static bfd_boolean +static bool add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info) { struct ppc_link_hash_table *htab; @@ -4250,14 +4250,14 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info) eh = (struct ppc_link_hash_entry *) eh->elf.root.u.i.link; if (eh->elf.root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (eh->elf.root.root.string[0] != '.') abort (); htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; fdh = lookup_fdh (eh, htab); if (fdh == NULL @@ -4271,7 +4271,7 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info) elsewhere. */ fdh = make_fdh (info, eh); if (fdh == NULL) - return FALSE; + return false; } if (fdh != NULL) @@ -4303,17 +4303,17 @@ add_symbol_adjust (struct ppc_link_hash_entry *eh, struct bfd_link_info *info) || eh->elf.def_regular)) { if (!bfd_elf_link_record_dynamic_symbol (info, &fdh->elf)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Set up opd section info and abiversion for IBFD, and process list of dot-symbols we made in link_hash_newfunc. */ -static bfd_boolean +static bool ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) { struct ppc_link_hash_table *htab; @@ -4333,7 +4333,7 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB .opd not allowed in ABI version %d"), ibfd, abiversion (ibfd)); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -4353,7 +4353,7 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) htab = ppc_hash_table (info); if (htab == NULL) - return TRUE; + return true; if (opd != NULL && opd->size != 0 && (ibfd->flags & DYNAMIC) == 0 @@ -4377,12 +4377,12 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) amt = OPD_NDX (opd->size) * sizeof (*opd_sym_map); opd_sym_map = bfd_zalloc (ibfd, amt); if (opd_sym_map == NULL) - return FALSE; + return false; ppc64_elf_section_data (opd)->u.opd.func_sec = opd_sym_map; relocs = _bfd_elf_link_read_relocs (ibfd, opd, NULL, NULL, info->keep_memory); if (relocs == NULL) - return FALSE; + return false; symtab_hdr = &elf_symtab_hdr (ibfd); rel_end = relocs + opd->reloc_count - 1; for (rel = relocs; rel < rel_end; rel++) @@ -4403,7 +4403,7 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) { if (elf_section_data (opd)->relocs != relocs) free (relocs); - return FALSE; + return false; } s = bfd_section_from_elf_index (ibfd, isym->st_shndx); @@ -4428,17 +4428,17 @@ ppc64_elf_before_check_relocs (bfd *ibfd, struct bfd_link_info *info) { htab->need_func_desc_adj = 1; if (!add_symbol_adjust (eh, info)) - return FALSE; + return false; } p = &eh->u.next_dot_sym; } - return TRUE; + return true; } /* Undo hash table changes when an --as-needed input file is determined not to be needed. */ -static bfd_boolean +static bool ppc64_elf_notice_as_needed (bfd *ibfd, struct bfd_link_info *info, enum notice_asneeded_action act) @@ -4448,7 +4448,7 @@ ppc64_elf_notice_as_needed (bfd *ibfd, struct ppc_link_hash_table *htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; htab->dot_syms = NULL; } @@ -4507,12 +4507,12 @@ update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, size_t amt = sizeof (*ent); ent = bfd_alloc (abfd, amt); if (ent == NULL) - return FALSE; + return false; ent->next = local_got_ents[r_symndx]; ent->addend = r_addend; ent->owner = abfd; ent->tls_type = tls_type; - ent->is_indirect = FALSE; + ent->is_indirect = false; ent->got.refcount = 0; local_got_ents[r_symndx] = ent; } @@ -4526,7 +4526,7 @@ update_local_sym_info (bfd *abfd, Elf_Internal_Shdr *symtab_hdr, return local_plt + r_symndx; } -static bfd_boolean +static bool update_plt_info (bfd *abfd, struct plt_entry **plist, bfd_vma addend) { struct plt_entry *ent; @@ -4539,17 +4539,17 @@ update_plt_info (bfd *abfd, struct plt_entry **plist, bfd_vma addend) size_t amt = sizeof (*ent); ent = bfd_alloc (abfd, amt); if (ent == NULL) - return FALSE; + return false; ent->next = *plist; ent->addend = addend; ent->plt.refcount = 0; *plist = ent; } ent->plt.refcount += 1; - return TRUE; + return true; } -static bfd_boolean +static bool is_branch_reloc (enum elf_ppc64_reloc_type r_type) { return (r_type == R_PPC64_REL24 @@ -4567,7 +4567,7 @@ is_branch_reloc (enum elf_ppc64_reloc_type r_type) /* Relocs on inline plt call sequence insns prior to the call. */ -static bfd_boolean +static bool is_plt_seq_reloc (enum elf_ppc64_reloc_type r_type) { return (r_type == R_PPC64_PLT16_HA @@ -4584,7 +4584,7 @@ is_plt_seq_reloc (enum elf_ppc64_reloc_type r_type) calculate needed space in the global offset table, procedure linkage table, and dynamic reloc sections. */ -static bfd_boolean +static bool ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -4595,21 +4595,21 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel_end; asection *sreloc; struct elf_link_hash_entry *tga, *dottga; - bfd_boolean is_opd; + bool is_opd; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_ppc64_elf (abfd)); htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; tga = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", - FALSE, FALSE, TRUE); + false, false, true); dottga = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr", - FALSE, FALSE, TRUE); + false, false, true); symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); sreloc = NULL; @@ -4702,7 +4702,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { @@ -4710,7 +4710,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, rel->r_addend, NON_GOT | PLT_IFUNC); if (ifunc == NULL) - return FALSE; + return false; } } @@ -4727,7 +4727,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (!update_local_sym_info (abfd, symtab_hdr, r_symndx, rel->r_addend, NON_GOT | TLS_TLS | TLS_MARK)) - return FALSE; + return false; sec->has_tls_reloc = 1; break; @@ -4790,7 +4790,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (ppc64_elf_tdata (abfd)->got == NULL && !create_got_section (abfd, info)) - return FALSE; + return false; if (h != NULL) { @@ -4808,12 +4808,12 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, size_t amt = sizeof (*ent); ent = bfd_alloc (abfd, amt); if (ent == NULL) - return FALSE; + return false; ent->next = eh->elf.got.glist; ent->addend = rel->r_addend; ent->owner = abfd; ent->tls_type = tls_type; - ent->is_indirect = FALSE; + ent->is_indirect = false; ent->got.refcount = 0; eh->elf.got.glist = ent; } @@ -4824,7 +4824,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* This is a global offset table entry for a local symbol. */ if (!update_local_sym_info (abfd, symtab_hdr, r_symndx, rel->r_addend, tls_type)) - return FALSE; + return false; break; case R_PPC64_PLT16_HA: @@ -4851,7 +4851,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, rel->r_addend, NON_GOT | PLT_KEEP); if (!update_plt_info (abfd, plt_list, rel->r_addend)) - return FALSE; + return false; break; /* The following relocations don't need to propagate the @@ -4907,7 +4907,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, abfd, sec, rel->r_offset, ppc64_elf_howto_table[r_type]->name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } break; @@ -4941,14 +4941,14 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, Reconstruct it for later use during GC. */ case R_PPC64_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_PPC64_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_PPC64_REL14: @@ -4973,7 +4973,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; dest = bfd_section_from_elf_index (abfd, isym->st_shndx); } @@ -5019,7 +5019,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, refers to is in a shared lib. */ if (plt_list && !update_plt_info (abfd, plt_list, rel->r_addend)) - return FALSE; + return false; break; case R_PPC64_ADDR14: @@ -5059,7 +5059,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, else if (!update_local_sym_info (abfd, symtab_hdr, r_symndx, rel->r_addend, tls_type)) - return FALSE; + return false; ppc64_sec = ppc64_elf_section_data (sec); if (ppc64_sec->sec_type != sec_toc) @@ -5070,11 +5070,11 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, amt = sec->size * sizeof (unsigned) / 8 + sizeof (unsigned); ppc64_sec->u.toc.symndx = bfd_zalloc (abfd, amt); if (ppc64_sec->u.toc.symndx == NULL) - return FALSE; + return false; amt = sec->size * sizeof (bfd_vma) / 8; ppc64_sec->u.toc.add = bfd_zalloc (abfd, amt); if (ppc64_sec->u.toc.add == NULL) - return FALSE; + return false; BFD_ASSERT (ppc64_sec->sec_type == sec_normal); ppc64_sec->sec_type = sec_toc; } @@ -5146,7 +5146,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* We may need a .plt entry if this reloc refers to a function in a shared lib. */ if (!update_plt_info (abfd, &h->plt.plist, 0)) - return FALSE; + return false; h->pointer_equality_needed = 1; } /* Fall through. */ @@ -5206,10 +5206,10 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (sreloc == NULL) { sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->elf.dynobj, 3, abfd, /*rela?*/ TRUE); + (sec, htab->elf.dynobj, 3, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -5225,7 +5225,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { p = bfd_alloc (htab->elf.dynobj, sizeof *p); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -5243,7 +5243,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, easily. Oh well. */ struct ppc_dyn_relocs *p; struct ppc_dyn_relocs **head; - bfd_boolean is_ifunc; + bool is_ifunc; asection *s; void *vpp; Elf_Internal_Sym *isym; @@ -5251,7 +5251,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -5267,7 +5267,7 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { p = bfd_alloc (htab->elf.dynobj, sizeof *p); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -5284,26 +5284,26 @@ ppc64_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool ppc64_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; unsigned long iflags, oflags; if ((ibfd->flags & BFD_LINKER_CREATED) != 0) - return TRUE; + return true; if (!is_ppc64_elf (ibfd) || !is_ppc64_elf (obfd)) - return TRUE; + return true; if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; iflags = elf_elfheader (ibfd)->e_flags; oflags = elf_elfheader (obfd)->e_flags; @@ -5314,7 +5314,7 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB uses unknown e_flags 0x%lx"), ibfd, iflags); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else if (iflags != oflags && iflags != 0) { @@ -5323,17 +5323,17 @@ ppc64_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("%pB: ABI version %ld is not compatible with ABI version %ld output"), ibfd, iflags, oflags); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (!_bfd_elf_ppc_merge_fp_attributes (ibfd, info)) - return FALSE; + return false; /* Merge Tag_compatibility attributes and any common GNU ones. */ return _bfd_elf_merge_object_attributes (ibfd, info); } -static bfd_boolean +static bool ppc64_elf_print_private_bfd_data (bfd *abfd, void *ptr) { /* Print normal ELF private data. */ @@ -5352,7 +5352,7 @@ ppc64_elf_print_private_bfd_data (bfd *abfd, void *ptr) fputc ('\n', file); } - return TRUE; + return true; } /* OFFSET in OPD_SEC specifies a function descriptor. Return the address @@ -5364,7 +5364,7 @@ opd_entry_value (asection *opd_sec, bfd_vma offset, asection **code_sec, bfd_vma *code_off, - bfd_boolean in_code_sec) + bool in_code_sec) { bfd *opd_bfd = opd_sec->owner; Elf_Internal_Rela *relocs; @@ -5422,7 +5422,7 @@ opd_entry_value (asection *opd_sec, relocs = ppc64_elf_tdata (opd_bfd)->opd.relocs; if (relocs == NULL) - relocs = _bfd_elf_link_read_relocs (opd_bfd, opd_sec, NULL, NULL, TRUE); + relocs = _bfd_elf_link_read_relocs (opd_bfd, opd_sec, NULL, NULL, true); /* PR 17512: file: df8e1fd6. */ if (relocs == NULL) return (bfd_vma) -1; @@ -5561,7 +5561,7 @@ ppc64_elf_maybe_function_sym (const asymbol *sym, asection *sec, } if (opd_entry_value (sym->section, symval, - &sec, code_off, TRUE) == (bfd_vma) -1) + &sec, code_off, true) == (bfd_vma) -1) return 0; /* An old ABI binary with dot-syms has a size of 24 on the .opd symbol. This size has nothing to do with the code size of the @@ -5593,7 +5593,7 @@ ppc64_elf_maybe_function_sym (const asymbol *sym, asection *sec, object with st_other localentry bits of zero, ie. its local entry point coincides with its global entry point. */ -static bfd_boolean +static bool is_elfv2_localentry0 (struct elf_link_hash_entry *h) { return (h != NULL @@ -5607,7 +5607,7 @@ is_elfv2_localentry0 (struct elf_link_hash_entry *h) /* Return true if symbol is defined in a regular object file. */ -static bfd_boolean +static bool is_static_defined (struct elf_link_hash_entry *h) { return ((h->root.type == bfd_link_hash_defined @@ -5662,7 +5662,7 @@ defined_sym_val (struct elf_link_hash_entry *h) /* Return true if H matches __tls_get_addr or one of its variants. */ -static bfd_boolean +static bool is_tls_get_addr (struct elf_link_hash_entry *h, struct ppc_link_hash_table *htab) { @@ -5672,11 +5672,11 @@ is_tls_get_addr (struct elf_link_hash_entry *h, || h == elf_hash_entry (htab->tga_desc)); } -static bfd_boolean func_desc_adjust (struct elf_link_hash_entry *, void *); +static bool func_desc_adjust (struct elf_link_hash_entry *, void *); /* Garbage collect sections, after first dealing with dot-symbols. */ -static bfd_boolean +static bool ppc64_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) { struct ppc_link_hash_table *htab = ppc_hash_table (info); @@ -5706,7 +5706,7 @@ ppc64_elf_gc_keep (struct bfd_link_info *info) asection *sec; eh = ppc_elf_hash_entry (elf_link_hash_lookup (&htab->elf, sym->name, - FALSE, FALSE, TRUE)); + false, false, true)); if (eh == NULL) continue; if (eh->elf.root.type != bfd_link_hash_defined @@ -5722,7 +5722,7 @@ ppc64_elf_gc_keep (struct bfd_link_info *info) else if (get_opd_info (eh->elf.root.u.def.section) != NULL && opd_entry_value (eh->elf.root.u.def.section, eh->elf.root.u.def.value, - &sec, NULL, FALSE) != (bfd_vma) -1) + &sec, NULL, false) != (bfd_vma) -1) sec->flags |= SEC_KEEP; sec = eh->elf.root.u.def.section; @@ -5734,7 +5734,7 @@ ppc64_elf_gc_keep (struct bfd_link_info *info) building shared libraries, we must assume that any visible symbol is referenced. */ -static bfd_boolean +static bool ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info = (struct bfd_link_info *) inf; @@ -5783,11 +5783,11 @@ ppc64_elf_gc_mark_dynamic_ref (struct elf_link_hash_entry *h, void *inf) else if (get_opd_info (eh->elf.root.u.def.section) != NULL && opd_entry_value (eh->elf.root.u.def.section, eh->elf.root.u.def.value, - &code_sec, NULL, FALSE) != (bfd_vma) -1) + &code_sec, NULL, false) != (bfd_vma) -1) code_sec->flags |= SEC_KEEP; } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -5851,7 +5851,7 @@ ppc64_elf_gc_mark_hook (asection *sec, else if (get_opd_info (eh->elf.root.u.def.section) != NULL && opd_entry_value (eh->elf.root.u.def.section, eh->elf.root.u.def.value, - &rsec, NULL, FALSE) != (bfd_vma) -1) + &rsec, NULL, false) != (bfd_vma) -1) eh->elf.root.u.def.section->gc_mark = 1; else rsec = h->root.u.def.section; @@ -5898,7 +5898,7 @@ struct sfpr_def_parms If STUB_SEC is non-null, define alias symbols in STUB_SEC instead. */ -static bfd_boolean +static bool sfpr_define (struct bfd_link_info *info, const struct sfpr_def_parms *parm, asection *stub_sec) @@ -5906,11 +5906,11 @@ sfpr_define (struct bfd_link_info *info, struct ppc_link_hash_table *htab = ppc_hash_table (info); unsigned int i; size_t len = strlen (parm->name); - bfd_boolean writing = FALSE; + bool writing = false; char sym[16]; if (htab == NULL) - return FALSE; + return false; memcpy (sym, parm->name, len); sym[len + 2] = 0; @@ -5922,7 +5922,7 @@ sfpr_define (struct bfd_link_info *info, sym[len + 0] = i / 10 + '0'; sym[len + 1] = i % 10 + '0'; h = ppc_elf_hash_entry (elf_link_hash_lookup (&htab->elf, sym, - writing, TRUE, TRUE)); + writing, true, true)); if (stub_sec != NULL) { if (h != NULL @@ -5932,9 +5932,9 @@ sfpr_define (struct bfd_link_info *info, struct elf_link_hash_entry *s; char buf[32]; sprintf (buf, "%08x.%s", stub_sec->id & 0xffffffff, sym); - s = elf_link_hash_lookup (&htab->elf, buf, TRUE, TRUE, FALSE); + s = elf_link_hash_lookup (&htab->elf, buf, true, true, false); if (s == NULL) - return FALSE; + return false; if (s->root.type == bfd_link_hash_new) { s->root.type = bfd_link_hash_defined; @@ -5962,14 +5962,14 @@ sfpr_define (struct bfd_link_info *info, h->elf.type = STT_FUNC; h->elf.def_regular = 1; h->elf.non_elf = 0; - _bfd_elf_link_hash_hide_symbol (info, &h->elf, TRUE); - writing = TRUE; + _bfd_elf_link_hash_hide_symbol (info, &h->elf, true); + writing = true; if (htab->sfpr->contents == NULL) { htab->sfpr->contents = bfd_alloc (htab->elf.dynobj, SFPR_MAX); if (htab->sfpr->contents == NULL) - return FALSE; + return false; } } } @@ -5984,7 +5984,7 @@ sfpr_define (struct bfd_link_info *info, } } - return TRUE; + return true; } static bfd_byte * @@ -6231,30 +6231,30 @@ tls_get_addr_epilogue (bfd *obfd, bfd_byte *p, struct ppc_link_hash_table *htab) information on function code symbol entries to their corresponding function descriptor symbol entries. */ -static bfd_boolean +static bool func_desc_adjust (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; struct ppc_link_hash_table *htab; struct ppc_link_hash_entry *fh; struct ppc_link_hash_entry *fdh; - bfd_boolean force_local; + bool force_local; fh = ppc_elf_hash_entry (h); if (fh->elf.root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (!fh->is_func) - return TRUE; + return true; if (fh->elf.root.root.string[0] != '.' || fh->elf.root.root.string[1] == '\0') - return TRUE; + return true; info = inf; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Find the corresponding function descriptor symbol. */ fdh = lookup_fdh (fh, htab); @@ -6271,7 +6271,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) && opd_entry_value (fdh->elf.root.u.def.section, fdh->elf.root.u.def.value, &fh->elf.root.u.def.section, - &fh->elf.root.u.def.value, FALSE) != (bfd_vma) -1) + &fh->elf.root.u.def.value, false) != (bfd_vma) -1) { fh->elf.root.type = fdh->elf.root.type; fh->elf.forced_local = 1; @@ -6287,7 +6287,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) if (ent->plt.refcount > 0) break; if (ent == NULL) - return TRUE; + return true; } /* Create a descriptor as undefined if necessary. */ @@ -6298,7 +6298,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) { fdh = make_fdh (info, fh); if (fdh == NULL) - return FALSE; + return false; } /* We can't support overriding of symbols on a fake descriptor. */ @@ -6306,7 +6306,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) && fdh->fake && (fh->elf.root.type == bfd_link_hash_defined || fh->elf.root.type == bfd_link_hash_defweak)) - _bfd_elf_link_hash_hide_symbol (info, &fdh->elf, TRUE); + _bfd_elf_link_hash_hide_symbol (info, &fdh->elf, true); /* Transfer dynamic linking information to the function descriptor. */ if (fdh != NULL) @@ -6324,7 +6324,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) if (!fdh->elf.forced_local && fh->elf.dynindx != -1) if (!bfd_elf_link_record_dynamic_symbol (info, &fdh->elf)) - return FALSE; + return false; } /* Now that the info is on the function descriptor, clear the @@ -6340,7 +6340,7 @@ func_desc_adjust (struct elf_link_hash_entry *h, void *inf) || fdh->elf.forced_local); _bfd_elf_link_hash_hide_symbol (info, &fh->elf, force_local); - return TRUE; + return true; } static const struct sfpr_def_parms save_res_funcs[] = @@ -6365,14 +6365,14 @@ static const struct sfpr_def_parms save_res_funcs[] = information gathered so far on function code symbol entries, to their corresponding function descriptor symbol entries. */ -static bfd_boolean +static bool ppc64_elf_edit (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct ppc_link_hash_table *htab; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Call back into the linker, which then runs the edit functions. */ htab->params->edit (); @@ -6385,17 +6385,17 @@ ppc64_elf_edit (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) htab->sfpr->size = 0; for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++) if (!sfpr_define (info, &save_res_funcs[i], NULL)) - return FALSE; + return false; if (htab->sfpr->size == 0) htab->sfpr->flags |= SEC_EXCLUDE; } if (bfd_link_relocatable (info)) - return TRUE; + return true; if (htab->elf.hgot != NULL) { - _bfd_elf_link_hash_hide_symbol (info, htab->elf.hgot, TRUE); + _bfd_elf_link_hash_hide_symbol (info, htab->elf.hgot, true); /* Make .TOC. defined so as to prevent it being made dynamic. The wrong value here is fixed later in ppc64_elf_set_toc. */ if (!htab->elf.hgot->def_regular @@ -6418,59 +6418,59 @@ ppc64_elf_edit (bfd *obfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) htab->need_func_desc_adj = 0; } - return TRUE; + return true; } /* Return true if we have dynamic relocs against H or any of its weak aliases, that apply to read-only sections. Cannot be used after size_dynamic_sections. */ -static bfd_boolean +static bool alias_readonly_dynrelocs (struct elf_link_hash_entry *h) { struct ppc_link_hash_entry *eh = ppc_elf_hash_entry (h); do { if (_bfd_elf_readonly_dynrelocs (&eh->elf)) - return TRUE; + return true; eh = ppc_elf_hash_entry (eh->elf.u.alias); } while (eh != NULL && &eh->elf != h); - return FALSE; + return false; } /* Return whether EH has pc-relative dynamic relocs. */ -static bfd_boolean +static bool pc_dynrelocs (struct ppc_link_hash_entry *eh) { struct elf_dyn_relocs *p; for (p = eh->elf.dyn_relocs; p != NULL; p = p->next) if (p->pc_count != 0) - return TRUE; - return FALSE; + return true; + return false; } /* Return true if a global entry stub will be created for H. Valid for ELFv2 before plt entries have been allocated. */ -static bfd_boolean +static bool global_entry_stub (struct elf_link_hash_entry *h) { struct plt_entry *pent; if (!h->pointer_equality_needed || h->def_regular) - return FALSE; + return false; for (pent = h->plt.plist; pent != NULL; pent = pent->next) if (pent->plt.refcount > 0 && pent->addend == 0) - return TRUE; + return true; - return FALSE; + return false; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -6479,7 +6479,7 @@ global_entry_stub (struct elf_link_hash_entry *h) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -6488,16 +6488,16 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Deal with function syms. */ if (h->type == STT_FUNC || h->type == STT_GNU_IFUNC || h->needs_plt) { - bfd_boolean local = (ppc_elf_hash_entry (h)->save_res - || SYMBOL_CALLS_LOCAL (info, h) - || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)); + bool local = (ppc_elf_hash_entry (h)->save_res + || SYMBOL_CALLS_LOCAL (info, h) + || UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)); /* Discard dyn_relocs when non-pic if we've decided that a function symbol is local and not an ifunc. We keep dynamic relocs for ifuncs when local rather than always emitting a @@ -6555,7 +6555,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, } /* ELFv2 function symbols can't have copy relocs. */ - return TRUE; + return true; } else if (!h->needs_plt && !_bfd_elf_readonly_dynrelocs (h)) @@ -6564,7 +6564,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, ifunc then we don't need a plt entry. */ h->plt.plist = NULL; h->pointer_equality_needed = 0; - return TRUE; + return true; } } else @@ -6582,7 +6582,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (def->root.u.def.section == htab->elf.sdynbss || def->root.u.def.section == htab->elf.sdynrelro) h->dyn_relocs = NULL; - return TRUE; + return true; } /* If we are creating a shared library, we must presume that the @@ -6590,12 +6590,12 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (!bfd_link_executable (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* Don't generate a copy reloc for symbols defined in the executable. */ if (!h->def_dynamic || !h->ref_regular || h->def_regular @@ -6614,7 +6614,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, definition for the variable. Text relocations are preferable to an incorrect program. */ || h->protected_def) - return TRUE; + return true; if (h->type == STT_FUNC || h->type == STT_GNU_IFUNC) @@ -6626,7 +6626,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, That's wrong for copying a descriptor. */ if (ppc_elf_hash_entry (h)->oh == NULL || !(h->size == 24 || h->size == 16)) - return TRUE; + return true; /* We should never get here, but unfortunately there are old versions of gcc (circa gcc-3.2) that improperly for the @@ -6680,7 +6680,7 @@ ppc64_elf_adjust_dynamic_symbol (struct bfd_link_info *info, static void ppc64_elf_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h, - bfd_boolean force_local) + bool force_local) { struct ppc_link_hash_entry *eh; _bfd_elf_link_hash_hide_symbol (info, h, force_local); @@ -6711,8 +6711,8 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info, p = eh->elf.root.root.string - 1; save = *p; *(char *) p = '.'; - fh = ppc_elf_hash_entry (elf_link_hash_lookup (htab, p, FALSE, - FALSE, FALSE)); + fh = ppc_elf_hash_entry (elf_link_hash_lookup (htab, p, false, + false, false)); *(char *) p = save; /* Unfortunately, if it so happens that the string we were @@ -6725,8 +6725,8 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info, while (q >= eh->elf.root.root.string && *q == *p) --q, --p; if (q < eh->elf.root.root.string && *p == '.') - fh = ppc_elf_hash_entry (elf_link_hash_lookup (htab, p, FALSE, - FALSE, FALSE)); + fh = ppc_elf_hash_entry (elf_link_hash_lookup (htab, p, false, + false, false)); } if (fh != NULL) { @@ -6739,7 +6739,7 @@ ppc64_elf_hide_symbol (struct bfd_link_info *info, } } -static bfd_boolean +static bool get_sym_h (struct elf_link_hash_entry **hp, Elf_Internal_Sym **symp, asection **symsecp, @@ -6789,7 +6789,7 @@ get_sym_h (struct elf_link_hash_entry **hp, symtab_hdr->sh_info, 0, NULL, NULL, NULL); if (locsyms == NULL) - return FALSE; + return false; *locsymsp = locsyms; } sym = locsyms + r_symndx; @@ -6821,7 +6821,7 @@ get_sym_h (struct elf_link_hash_entry **hp, *tls_maskp = tls_mask; } } - return TRUE; + return true; } /* Returns TLS_MASKP for the given REL symbol. Function return is 0 on @@ -6931,7 +6931,7 @@ tocsave_find (struct ppc_link_hash_table *htab, /* Adjust all global syms defined in opd sections. In gcc generated code for the old ABI, these will already have been done. */ -static bfd_boolean +static bool adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED) { struct ppc_link_hash_entry *eh; @@ -6939,15 +6939,15 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED) struct _opd_sec_data *opd; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type != bfd_link_hash_defined && h->root.type != bfd_link_hash_defweak) - return TRUE; + return true; eh = ppc_elf_hash_entry (h); if (eh->adjust_done) - return TRUE; + return true; sym_sec = eh->elf.root.u.def.section; opd = get_opd_info (sym_sec); @@ -6974,14 +6974,14 @@ adjust_opd_syms (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED) eh->elf.root.u.def.value += adjust; eh->adjust_done = 1; } - return TRUE; + return true; } /* Handles decrementing dynamic reloc counts for the reloc specified by R_INFO in section SEC. If LOCAL_SYMS is NULL, then H and SYM have already been determined. */ -static bfd_boolean +static bool dec_dynrel_count (bfd_vma r_info, asection *sec, struct bfd_link_info *info, @@ -6998,7 +6998,7 @@ dec_dynrel_count (bfd_vma r_info, switch (r_type) { default: - return TRUE; + return true; case R_PPC64_TOC16: case R_PPC64_TOC16_DS: @@ -7007,7 +7007,7 @@ dec_dynrel_count (bfd_vma r_info, case R_PPC64_TOC16_HA: case R_PPC64_TOC16_LO_DS: if (h == NULL) - return TRUE; + return true; break; case R_PPC64_TPREL16: @@ -7070,7 +7070,7 @@ dec_dynrel_count (bfd_vma r_info, r_symndx = ELF64_R_SYM (r_info); if (!get_sym_h (&h, &sym, &sym_sec, NULL, local_syms, r_symndx, ibfd)) - return FALSE; + return false; } if ((h != NULL @@ -7087,7 +7087,7 @@ dec_dynrel_count (bfd_vma r_info, : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC))) ; else - return TRUE; + return true; if (h != NULL) { @@ -7100,7 +7100,7 @@ dec_dynrel_count (bfd_vma r_info, changed by elf_gc_sweep_symbol, confusing the test above. Don't report a dynreloc miscount. */ if (*pp == NULL && info->gc_sections) - return TRUE; + return true; while ((p = *pp) != NULL) { @@ -7111,7 +7111,7 @@ dec_dynrel_count (bfd_vma r_info, p->count -= 1; if (p->count == 0) *pp = p->next; - return TRUE; + return true; } pp = &p->next; } @@ -7121,7 +7121,7 @@ dec_dynrel_count (bfd_vma r_info, struct ppc_dyn_relocs *p; struct ppc_dyn_relocs **pp; void *vpp; - bfd_boolean is_ifunc; + bool is_ifunc; if (local_syms == NULL) sym_sec = bfd_section_from_elf_index (sec->owner, sym->st_shndx); @@ -7132,7 +7132,7 @@ dec_dynrel_count (bfd_vma r_info, pp = (struct ppc_dyn_relocs **) vpp; if (*pp == NULL && info->gc_sections) - return TRUE; + return true; is_ifunc = ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC; while ((p = *pp) != NULL) @@ -7142,7 +7142,7 @@ dec_dynrel_count (bfd_vma r_info, p->count -= 1; if (p->count == 0) *pp = p->next; - return TRUE; + return true; } pp = &p->next; } @@ -7152,7 +7152,7 @@ dec_dynrel_count (bfd_vma r_info, _bfd_error_handler (_("dynreloc miscount for %pB, section %pA"), sec->owner, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Remove unused Official Procedure Descriptor entries. Currently we @@ -7161,17 +7161,17 @@ dec_dynrel_count (bfd_vma r_info, would be possible to remove many more entries for statically linked applications. */ -bfd_boolean +bool ppc64_elf_edit_opd (struct bfd_link_info *info) { bfd *ibfd; - bfd_boolean some_edited = FALSE; + bool some_edited = false; asection *need_pad = NULL; struct ppc_link_hash_table *htab; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) { @@ -7180,7 +7180,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Sym *local_syms; struct _opd_sec_data *opd; - bfd_boolean need_edit, add_aux_fields, broken; + bool need_edit, add_aux_fields, broken; bfd_size_type cnt_16b = 0; if (!is_ppc64_elf (ibfd)) @@ -7207,12 +7207,12 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, info->keep_memory); if (relstart == NULL) - return FALSE; + return false; /* First run through the relocs to check they are sane, and to determine whether we need to edit this opd section. */ - need_edit = FALSE; - broken = FALSE; + need_edit = false; + broken = false; need_pad = sec; relend = relstart + sec->reloc_count; for (rel = relstart; rel < relend; ) @@ -7239,7 +7239,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) broken_opd: _bfd_error_handler (_("%pB: .opd is not a regular array of opd entries"), ibfd); - broken = TRUE; + broken = true; break; } @@ -7250,7 +7250,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB: unexpected reloc type %u in .opd section"), ibfd, r_type); - broken = TRUE; + broken = true; break; } @@ -7272,7 +7272,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB: undefined sym `%s' in .opd section"), ibfd, sym_name); - broken = TRUE; + broken = true; break; } @@ -7285,7 +7285,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) which we test for via the output_section. */ if (sym_sec->owner != ibfd || sym_sec->output_section == bfd_abs_section_ptr) - need_edit = TRUE; + need_edit = true; rel += 2; if (rel + 1 == relend @@ -7335,7 +7335,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) opd = &ppc64_elf_section_data (sec)->u.opd; opd->adjust = bfd_zalloc (sec->owner, amt); if (opd->adjust == NULL) - return FALSE; + return false; /* This seems a waste of time as input .opd sections are all zeros as generated by gcc, but I suppose there's no reason @@ -7352,7 +7352,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) free (local_syms); if (elf_section_data (sec)->relocs != relstart) free (relstart); - return FALSE; + return false; } sec->contents = loc; sec->flags |= (SEC_IN_MEMORY | SEC_HAS_CONTENTS); @@ -7365,7 +7365,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) { new_contents = bfd_malloc (sec->size + cnt_16b * 8); if (new_contents == NULL) - return FALSE; + return false; need_pad = NULL; } wptr = new_contents; @@ -7380,7 +7380,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) Elf_Internal_Sym *sym; long opd_ent_size; Elf_Internal_Rela *next_rel; - bfd_boolean skip; + bool skip; r_symndx = ELF64_R_SYM (rel->r_info); if (!get_sym_h (&h, &sym, &sym_sec, NULL, &local_syms, @@ -7511,7 +7511,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) elf_bfd_final_link if we are emitting relocs. */ rel_hdr = _bfd_elf_single_rel_hdr (sec); rel_hdr->sh_size = sec->reloc_count * rel_hdr->sh_entsize; - some_edited = TRUE; + some_edited = true; } else if (elf_section_data (sec)->relocs != relstart) free (relstart); @@ -7541,11 +7541,11 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) p = bfd_malloc (need_pad->size + 8); if (p == NULL) - return FALSE; + return false; if (!bfd_get_section_contents (need_pad->owner, need_pad, p, 0, need_pad->size)) - return FALSE; + return false; need_pad->contents = p; need_pad->flags |= (SEC_IN_MEMORY | SEC_HAS_CONTENTS); @@ -7554,7 +7554,7 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) { p = bfd_realloc (need_pad->contents, need_pad->size + 8); if (p == NULL) - return FALSE; + return false; need_pad->contents = p; } @@ -7563,13 +7563,13 @@ ppc64_elf_edit_opd (struct bfd_link_info *info) need_pad->size += 8; } - return TRUE; + return true; } /* Analyze inline PLT call relocations to see whether calls to locally defined functions can be converted to direct calls. */ -bfd_boolean +bool ppc64_elf_inline_plt (struct bfd_link_info *info) { struct ppc_link_hash_table *htab; @@ -7579,7 +7579,7 @@ ppc64_elf_inline_plt (struct bfd_link_info *info) htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* A bl insn can reach -0x2000000 to 0x1fffffc. The limit is reduced somewhat to cater for possible stubs that might be added @@ -7614,7 +7614,7 @@ ppc64_elf_inline_plt (struct bfd_link_info *info) if (high_vma - low_vma < limit) { htab->can_convert_all_inline_plt = 1; - return TRUE; + return true; } /* Otherwise, go looking through relocs for cases where a direct @@ -7651,7 +7651,7 @@ ppc64_elf_inline_plt (struct bfd_link_info *info) relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, info->keep_memory); if (relstart == NULL) - return FALSE; + return false; relend = relstart + sec->reloc_count; for (rel = relstart; rel < relend; rel++) @@ -7676,7 +7676,7 @@ ppc64_elf_inline_plt (struct bfd_link_info *info) free (relstart); if (symtab_hdr->contents != (bfd_byte *) local_syms) free (local_syms); - return FALSE; + return false; } if (sym_sec != NULL && sym_sec->output_section != NULL) @@ -7714,14 +7714,14 @@ ppc64_elf_inline_plt (struct bfd_link_info *info) } } - return TRUE; + return true; } /* Set htab->tls_get_addr and various other info specific to TLS. This needs to run before dynamic symbols are processed in bfd_elf_size_dynamic_sections. */ -bfd_boolean +bool ppc64_elf_tls_setup (struct bfd_link_info *info) { struct ppc_link_hash_table *htab; @@ -7729,7 +7729,7 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (abiversion (info->output_bfd) == 1) htab->opd_abi = 1; @@ -7770,29 +7770,29 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) } if (htab->params->plt_localentry0 && elf_link_hash_lookup (&htab->elf, "GLIBC_2.26", - FALSE, FALSE, FALSE) == NULL) + false, false, false) == NULL) _bfd_error_handler (_("warning: --plt-localentry is especially dangerous without " "ld.so support to detect ABI violations")); tga = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr", - FALSE, FALSE, TRUE); + false, false, true); htab->tls_get_addr = ppc_elf_hash_entry (tga); /* Move dynamic linking info to the function descriptor sym. */ if (tga != NULL) func_desc_adjust (tga, info); tga_fd = elf_link_hash_lookup (&htab->elf, "__tls_get_addr", - FALSE, FALSE, TRUE); + false, false, true); htab->tls_get_addr_fd = ppc_elf_hash_entry (tga_fd); desc = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr_desc", - FALSE, FALSE, TRUE); + false, false, true); htab->tga_desc = ppc_elf_hash_entry (desc); if (desc != NULL) func_desc_adjust (desc, info); desc_fd = elf_link_hash_lookup (&htab->elf, "__tls_get_addr_desc", - FALSE, FALSE, TRUE); + false, false, true); htab->tga_desc_fd = ppc_elf_hash_entry (desc_fd); if (htab->params->tls_get_addr_opt) @@ -7800,11 +7800,11 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) struct elf_link_hash_entry *opt, *opt_fd; opt = elf_link_hash_lookup (&htab->elf, ".__tls_get_addr_opt", - FALSE, FALSE, TRUE); + false, false, true); if (opt != NULL) func_desc_adjust (opt, info); opt_fd = elf_link_hash_lookup (&htab->elf, "__tls_get_addr_opt", - FALSE, FALSE, TRUE); + false, false, true); if (opt_fd != NULL && (opt_fd->root.type == bfd_link_hash_defined || opt_fd->root.type == bfd_link_hash_defweak)) @@ -7864,7 +7864,7 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, opt_fd->dynstr_index); if (!bfd_elf_link_record_dynamic_symbol (info, opt_fd)) - return FALSE; + return false; } if (tga_fd != NULL) { @@ -7923,13 +7923,13 @@ ppc64_elf_tls_setup (struct bfd_link_info *info) && htab->params->no_tls_get_addr_regsave == -1) htab->params->no_tls_get_addr_regsave = 0; - return TRUE; + return true; } /* Return TRUE iff REL is a branch reloc with a global symbol matching any of HASH1, HASH2, HASH3, or HASH4. */ -static bfd_boolean +static bool branch_reloc_hash_match (bfd *ibfd, Elf_Internal_Rela *rel, struct ppc_link_hash_entry *hash1, @@ -7952,9 +7952,9 @@ branch_reloc_hash_match (bfd *ibfd, || h == elf_hash_entry (hash2) || h == elf_hash_entry (hash3) || h == elf_hash_entry (hash4)) - return TRUE; + return true; } - return FALSE; + return false; } /* Run through all the TLS relocs looking for optimization @@ -7964,7 +7964,7 @@ branch_reloc_hash_match (bfd *ibfd, to know the tp offset, and we need to optimize before allocating dynamic relocations. */ -bfd_boolean +bool ppc64_elf_tls_optimize (struct bfd_link_info *info) { bfd *ibfd; @@ -7974,11 +7974,11 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) int pass; if (!bfd_link_executable (info)) - return TRUE; + return true; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; htab->do_tls_opt = 1; @@ -8000,7 +8000,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) if (sec->has_tls_reloc && !bfd_is_abs_section (sec->output_section)) { Elf_Internal_Rela *relstart, *rel, *relend; - bfd_boolean found_tls_get_addr_arg = 0; + bool found_tls_get_addr_arg = 0; /* Read the relocations. */ relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, @@ -8008,7 +8008,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) if (relstart == NULL) { free (toc_ref); - return FALSE; + return false; } relend = relstart + sec->reloc_count; @@ -8022,10 +8022,10 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) unsigned char *tls_mask; unsigned int tls_set, tls_clear, tls_type = 0; bfd_vma value; - bfd_boolean ok_tprel, is_local; + bool ok_tprel, is_local; long toc_ref_index = 0; int expecting_tls_get_addr = 0; - bfd_boolean ret = FALSE; + bool ret = false; r_symndx = ELF64_R_SYM (rel->r_info); if (!get_sym_h (&h, &sym, &sym_sec, &tls_mask, &locsyms, @@ -8059,13 +8059,13 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) STT_TLS. So no need for .opd local sym adjust. */ value = sym->st_value; - ok_tprel = FALSE; + ok_tprel = false; is_local = SYMBOL_REFERENCES_LOCAL (info, h); if (is_local) { if (h != NULL && h->root.type == bfd_link_hash_undefweak) - ok_tprel = TRUE; + ok_tprel = true; else if (sym_sec != NULL && sym_sec->output_section != NULL) { @@ -8099,7 +8099,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) info->callbacks->minfo (_("%H __tls_get_addr lost arg, " "TLS optimization disabled\n"), ibfd, sec, rel->r_offset); - ret = TRUE; + ret = true; goto err_free_rel; } @@ -8370,7 +8370,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) info->callbacks->minfo (_("%H arg lost __tls_get_addr, " "TLS optimization disabled\n"), ibfd, sec, rel->r_offset); - ret = TRUE; + ret = true; goto err_free_rel; } @@ -8459,13 +8459,13 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) we'll lose one or two dyn relocs. */ if (!dec_dynrel_count (rel->r_info, sec, info, NULL, h, sym)) - return FALSE; + return false; if (tls_set == (TLS_EXPLICIT | TLS_GD)) { if (!dec_dynrel_count ((rel + 1)->r_info, sec, info, NULL, h, sym)) - return FALSE; + return false; } } @@ -8488,7 +8488,7 @@ ppc64_elf_tls_optimize (struct bfd_link_info *info) } free (toc_ref); - return TRUE; + return true; } /* Called via elf_link_hash_traverse from ppc64_elf_edit_toc to adjust @@ -8501,12 +8501,12 @@ struct adjust_toc_info { asection *toc; unsigned long *skip; - bfd_boolean global_toc_syms; + bool global_toc_syms; }; enum toc_skip_enum { ref_from_discarded = 1, can_optimize = 2 }; -static bfd_boolean +static bool adjust_toc_syms (struct elf_link_hash_entry *h, void *inf) { struct ppc_link_hash_entry *eh; @@ -8515,11 +8515,11 @@ adjust_toc_syms (struct elf_link_hash_entry *h, void *inf) if (h->root.type != bfd_link_hash_defined && h->root.type != bfd_link_hash_defweak) - return TRUE; + return true; eh = ppc_elf_hash_entry (h); if (eh->adjust_done) - return TRUE; + return true; if (eh->elf.root.u.def.section == toc_inf->toc) { @@ -8542,15 +8542,15 @@ adjust_toc_syms (struct elf_link_hash_entry *h, void *inf) eh->adjust_done = 1; } else if (strcmp (eh->elf.root.u.def.section->name, ".toc") == 0) - toc_inf->global_toc_syms = TRUE; + toc_inf->global_toc_syms = true; - return TRUE; + return true; } /* Return TRUE iff INSN with a relocation of R_TYPE is one we expect on a _LO variety toc/got reloc. */ -static bfd_boolean +static bool ok_lo_toc_insn (unsigned int insn, enum elf_ppc64_reloc_type r_type) { return ((insn & (0x3fu << 26)) == 12u << 26 /* addic */ @@ -8600,7 +8600,7 @@ ok_lo_toc_insn (unsigned int insn, enum elf_ppc64_reloc_type r_type) the pld can be replaced with pla: *PINSN1 is that pla insn, while *PINSN2 is the second instruction. */ -static bfd_boolean +static bool xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) { uint64_t insn1 = *pinsn1; @@ -8611,29 +8611,29 @@ xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) { /* Check that regs match. */ if (((insn2 >> 16) & 31) != ((insn1 >> 21) & 31)) - return FALSE; + return false; /* P8LS or PMLS form, non-pcrel. */ if ((insn2 & (-1ULL << 50) & ~(1ULL << 56)) != (1ULL << 58)) - return FALSE; + return false; *pinsn1 = (insn2 & ~(31 << 16) & ~0x3ffff0000ffffULL) | (1ULL << 52); *pinsn2 = PNOP; off = ((insn2 >> 16) & 0x3ffff0000ULL) | (insn2 & 0xffff); *poff = (off ^ 0x200000000ULL) - 0x200000000ULL; - return TRUE; + return true; } insn2 >>= 32; /* Check that regs match. */ if (((insn2 >> 16) & 31) != ((insn1 >> 21) & 31)) - return FALSE; + return false; switch ((insn2 >> 26) & 63) { default: - return FALSE; + return false; case 32: /* lwz */ case 34: /* lbz */ @@ -8655,7 +8655,7 @@ xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) case 58: /* lwa, ld */ if ((insn2 & 1) != 0) - return FALSE; + return false; insn1 = ((1ULL << 58) | (1ULL << 52) | (insn2 & 2 ? 41ULL << 26 : 57ULL << 26) | (insn2 & (31ULL << 21))); @@ -8664,7 +8664,7 @@ xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) case 57: /* lxsd, lxssp */ if ((insn2 & 3) < 2) - return FALSE; + return false; insn1 = ((1ULL << 58) | (1ULL << 52) | ((40ULL | (insn2 & 3)) << 26) | (insn2 & (31ULL << 21))); @@ -8673,7 +8673,7 @@ xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) case 61: /* stxsd, stxssp, lxv, stxv */ if ((insn2 & 3) == 0) - return FALSE; + return false; else if ((insn2 & 3) >= 2) { insn1 = ((1ULL << 58) | (1ULL << 52) @@ -8698,7 +8698,7 @@ xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) case 6: /* lxvp, stxvp */ if ((insn2 & 0xe) != 0) - return FALSE; + return false; insn1 = ((1ULL << 58) | (1ULL << 52) | ((insn2 & 1) == 0 ? 58ULL << 26 : 62ULL << 26) | (insn2 & (31ULL << 21))); @@ -8707,7 +8707,7 @@ xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) case 62: /* std, stq */ if ((insn2 & 1) != 0) - return FALSE; + return false; insn1 = ((1ULL << 58) | (1ULL << 52) | ((insn2 & 2) == 0 ? 61ULL << 26 : 60ULL << 26) | (insn2 & (31ULL << 21))); @@ -8718,13 +8718,13 @@ xlate_pcrel_opt (uint64_t *pinsn1, uint64_t *pinsn2, bfd_signed_vma *poff) *pinsn1 = insn1; *pinsn2 = (uint64_t) NOP << 32; *poff = (off ^ 0x8000) - 0x8000; - return TRUE; + return true; } /* Examine all relocs referencing .toc sections in order to remove unused .toc entries. */ -bfd_boolean +bool ppc64_elf_edit_toc (struct bfd_link_info *info) { bfd *ibfd; @@ -8732,7 +8732,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) struct ppc_link_hash_table *htab = ppc_hash_table (info); htab->do_toc_opt = 1; - toc_inf.global_toc_syms = TRUE; + toc_inf.global_toc_syms = true; for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) { asection *toc, *sec; @@ -8769,7 +8769,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) || (sec->flags & SEC_DEBUGGING) != 0) continue; - relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, FALSE); + relstart = _bfd_elf_link_read_relocs (ibfd, sec, NULL, NULL, false); if (relstart == NULL) goto error_ret; @@ -8934,7 +8934,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) if (elf_section_data (toc)->relocs != toc_relocs) free (toc_relocs); free (skip); - return FALSE; + return false; } /* Now check all kept sections that might reference the toc. @@ -9095,7 +9095,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) bfd_byte *contents, *src; unsigned long off; Elf_Internal_Sym *sym; - bfd_boolean local_toc_syms = FALSE; + bool local_toc_syms = false; /* Shuffle the toc contents, and at the same time convert the skip array from booleans into offsets. */ @@ -9171,7 +9171,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) { val = sym->st_value; if (val != 0) - local_toc_syms = TRUE; + local_toc_syms = true; } val += rel->r_addend; @@ -9261,7 +9261,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) { toc_inf.toc = toc; toc_inf.skip = skip; - toc_inf.global_toc_syms = FALSE; + toc_inf.global_toc_syms = false; elf_link_hash_traverse (elf_hash_table (info), adjust_toc_syms, &toc_inf); } @@ -9356,7 +9356,7 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) if (sec != NULL && elf_section_data (sec)->relocs != relstart) free (relstart); - return FALSE; + return false; } for (rel = relstart; rel < relstart + sec->reloc_count; ++rel) @@ -9553,13 +9553,13 @@ ppc64_elf_edit_toc (struct bfd_link_info *info) } } - return TRUE; + return true; } /* Return true iff input section I references the TOC using instructions limited to +/-32k offsets. */ -bfd_boolean +bool ppc64_elf_has_small_toc_reloc (asection *i) { return (is_ppc64_elf (i->owner) @@ -9618,14 +9618,14 @@ merge_got_entries (struct got_entry **pent) && ent2->tls_type == ent->tls_type && elf_gp (ent2->owner) == elf_gp (ent->owner)) { - ent2->is_indirect = TRUE; + ent2->is_indirect = true; ent2->got.ent = ent; } } /* If H is undefined, make it dynamic if that makes sense. */ -static bfd_boolean +static bool ensure_undef_dynamic (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -9639,14 +9639,14 @@ ensure_undef_dynamic (struct bfd_link_info *info, && !h->forced_local && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) return bfd_elf_link_record_dynamic_symbol (info, h); - return TRUE; + return true; } /* Choose whether to use htab->iplt or htab->pltlocal rather than the usual htab->elf.splt section for a PLT entry. */ static inline -bfd_boolean use_local_plt (struct bfd_link_info *info, +bool use_local_plt (struct bfd_link_info *info, struct elf_link_hash_entry *h) { return (h == NULL @@ -9657,7 +9657,7 @@ bfd_boolean use_local_plt (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -9667,12 +9667,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct got_entry **pgent, *gent; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; eh = ppc_elf_hash_entry (h); /* Run through the TLS GD got entries first if we're changing them @@ -9728,7 +9728,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* Ensure we catch all the cases where this symbol should be made dynamic. */ if (!ensure_undef_dynamic (info, h)) - return FALSE; + return false; if (!is_ppc64_elf (gent->owner)) abort (); @@ -9788,7 +9788,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* Ensure we catch all the cases where this symbol should be made dynamic. */ if (!ensure_undef_dynamic (info, h)) - return FALSE; + return false; } } @@ -9803,7 +9803,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* Ensure we catch all the cases where this symbol should be made dynamic. */ if (!ensure_undef_dynamic (info, h)) - return FALSE; + return false; /* But if that didn't work out, discard dynamic relocs. */ if (h->dynindx == -1) @@ -9839,7 +9839,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) & (TLS_TLS | PLT_KEEP)) == PLT_KEEP)) { struct plt_entry *pent; - bfd_boolean doneone = FALSE; + bool doneone = false; for (pent = h->plt.plist; pent != NULL; pent = pent->next) if (pent->plt.refcount > 0) { @@ -9892,7 +9892,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) } if (s != NULL) s->size += sizeof (Elf64_External_Rela); - doneone = TRUE; + doneone = true; } else pent->plt.offset = (bfd_vma) -1; @@ -9908,7 +9908,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->needs_plt = 0; } - return TRUE; + return true; } #define PPC_LO(v) ((v) & 0xffff) @@ -9922,7 +9922,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) to set up space for global entry stubs. These are put in glink, after the branch table. */ -static bfd_boolean +static bool size_global_entry_stubs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -9931,18 +9931,18 @@ size_global_entry_stubs (struct elf_link_hash_entry *h, void *inf) asection *s, *plt; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (!h->pointer_equality_needed) - return TRUE; + return true; if (h->def_regular) - return TRUE; + return true; info = inf; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; s = htab->global_entry; plt = htab->elf.splt; @@ -9989,25 +9989,25 @@ size_global_entry_stubs (struct elf_link_hash_entry *h, void *inf) s->size = stub_off + stub_size; break; } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool ppc64_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct ppc_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; struct got_entry *first_tlsld; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; if (dynobj == NULL) @@ -10175,7 +10175,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, { if (!htab->do_multi_toc && first_tlsld != NULL) { - ent->is_indirect = TRUE; + ent->is_indirect = true; ent->got.ent = first_tlsld; } else @@ -10199,7 +10199,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -10231,7 +10231,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, if (s->size != 0) { if (s != htab->elf.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -10275,7 +10275,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, the GOT and .dynrelro. */ s->contents = bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) @@ -10292,7 +10292,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, { s->contents = bfd_zalloc (ibfd, s->size); if (s->contents == NULL) - return FALSE; + return false; } } s = ppc64_elf_tdata (ibfd)->relgot; @@ -10304,8 +10304,8 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, { s->contents = bfd_zalloc (ibfd, s->size); if (s->contents == NULL) - return FALSE; - relocs = TRUE; + return false; + relocs = true; s->reloc_count = 0; } } @@ -10313,7 +10313,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, if (htab->elf.dynamic_sections_created) { - bfd_boolean tls_opt; + bool tls_opt; /* Add some entries to the .dynamic section. We fill in the values later, in ppc64_elf_finish_dynamic_sections, but we @@ -10326,7 +10326,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, if (bfd_link_executable (info)) { if (!add_dynamic_entry (DT_DEBUG, 0)) - return FALSE; + return false; } if (htab->elf.splt != NULL && htab->elf.splt->size != 0) @@ -10336,14 +10336,14 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, || !add_dynamic_entry (DT_PLTREL, DT_RELA) || !add_dynamic_entry (DT_JMPREL, 0) || !add_dynamic_entry (DT_PPC64_GLINK, 0)) - return FALSE; + return false; } if (NO_OPD_RELOCS && abiversion (output_bfd) <= 1) { if (!add_dynamic_entry (DT_PPC64_OPD, 0) || !add_dynamic_entry (DT_PPC64_OPDSZ, 0)) - return FALSE; + return false; } tls_opt = (htab->params->tls_get_addr_opt @@ -10354,7 +10354,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, if (tls_opt || !htab->opd_abi) { if (!add_dynamic_entry (DT_PPC64_OPT, tls_opt ? PPC64_OPT_TLS : 0)) - return FALSE; + return false; } if (relocs) @@ -10362,7 +10362,7 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, if (!add_dynamic_entry (DT_RELA, 0) || !add_dynamic_entry (DT_RELASZ, 0) || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela))) - return FALSE; + return false; /* If any dynamic relocs apply to a read-only section, then we need a DT_TEXTREL entry. */ @@ -10373,24 +10373,24 @@ ppc64_elf_size_dynamic_sections (bfd *output_bfd, if ((info->flags & DF_TEXTREL) != 0) { if (!add_dynamic_entry (DT_TEXTREL, 0)) - return FALSE; + return false; } } } #undef add_dynamic_entry - return TRUE; + return true; } /* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */ -static bfd_boolean +static bool ppc64_elf_hash_symbol (struct elf_link_hash_entry *h) { if (h->plt.plist != NULL && !h->def_regular && !h->pointer_equality_needed) - return FALSE; + return false; return _bfd_elf_hash_symbol (h); } @@ -10496,7 +10496,7 @@ ppc_type_of_stub (asection *input_sec, . add/ldx %r12,%r11,%r12 */ static bfd_byte * -build_offset (bfd *abfd, bfd_byte *p, bfd_vma off, bfd_boolean load) +build_offset (bfd *abfd, bfd_byte *p, bfd_vma off, bool load) { bfd_put_32 (abfd, MFLR_R12, p); p += 4; @@ -10676,7 +10676,7 @@ emit_relocs_for_offset (struct bfd_link_info *info, Elf_Internal_Rela *r, static bfd_byte * build_power10_offset (bfd *abfd, bfd_byte *p, bfd_vma off, int odd, - bfd_boolean load) + bool load) { uint64_t insn; if (off - odd + (1ULL << 33) < 1ULL << 34) @@ -10984,13 +10984,13 @@ build_plt_stub (struct ppc_link_hash_table *htab, bfd_byte *p, bfd_vma offset, Elf_Internal_Rela *r) { bfd *obfd = htab->params->stub_bfd; - bfd_boolean plt_load_toc = htab->opd_abi; - bfd_boolean plt_static_chain = htab->params->plt_static_chain; - bfd_boolean plt_thread_safe = (htab->params->plt_thread_safe - && htab->elf.dynamic_sections_created - && stub_entry->h != NULL - && stub_entry->h->elf.dynindx != -1); - bfd_boolean use_fake_dep = plt_thread_safe; + bool plt_load_toc = htab->opd_abi; + bool plt_static_chain = htab->params->plt_static_chain; + bool plt_thread_safe = (htab->params->plt_thread_safe + && htab->elf.dynamic_sections_created + && stub_entry->h != NULL + && stub_entry->h->elf.dynindx != -1); + bool use_fake_dep = plt_thread_safe; bfd_vma cmp_branch_off = 0; if (!ALWAYS_USE_FAKE_DEP @@ -11337,7 +11337,7 @@ get_relocs (asection *sec, int count) forms, to the equivalent relocs against the global symbol given by STUB_ENTRY->H. */ -static bfd_boolean +static bool use_global_in_relocs (struct ppc_link_hash_table *htab, struct ppc_stub_hash_entry *stub_entry, Elf_Internal_Rela *r, unsigned int num_rel) @@ -11361,7 +11361,7 @@ use_global_in_relocs (struct ppc_link_hash_table *htab, hsize = (htab->stub_globals + 1) * sizeof (*hashes); hashes = bfd_zalloc (htab->params->stub_bfd, hsize); if (hashes == NULL) - return FALSE; + return false; elf_sym_hashes (htab->params->stub_bfd) = hashes; htab->stub_globals = 1; } @@ -11387,7 +11387,7 @@ use_global_in_relocs (struct ppc_link_hash_table *htab, r->r_addend -= symval; --r; } - return TRUE; + return true; } static bfd_vma @@ -11425,7 +11425,7 @@ get_r2off (struct bfd_link_info *info, return r2off; } -static bfd_boolean +static bool ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct ppc_stub_hash_entry *stub_entry; @@ -11440,7 +11440,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) asection *plt; int num_rel; int odd; - bfd_boolean is_tga; + bool is_tga; /* Massage our args to the form they really have. */ stub_entry = (struct ppc_stub_hash_entry *) gen_entry; @@ -11467,7 +11467,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; BFD_ASSERT (stub_entry->stub_offset >= stub_entry->group->stub_sec->size); loc = stub_entry->group->stub_sec->contents + stub_entry->stub_offset; @@ -11497,8 +11497,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (r2off == (bfd_vma) -1) { - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } bfd_put_32 (obfd, STD_R2_0R1 + STK_TOC (htab), p); p += 4; @@ -11522,21 +11522,21 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) _bfd_error_handler (_("long branch stub `%s' offset overflow"), stub_entry->root.string); - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } if (info->emitrelocations) { r = get_relocs (stub_entry->group->stub_sec, 1); if (r == NULL) - return FALSE; + return false; r->r_offset = p - 4 - stub_entry->group->stub_sec->contents; r->r_info = ELF64_R_INFO (0, R_PPC64_REL24); r->r_addend = targ; if (stub_entry->h != NULL && !use_global_in_relocs (htab, stub_entry, r, 1)) - return FALSE; + return false; } break; @@ -11544,13 +11544,13 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) case ppc_stub_plt_branch_r2off: br_entry = ppc_branch_hash_lookup (&htab->branch_hash_table, stub_entry->root.string + 9, - FALSE, FALSE); + false, false); if (br_entry == NULL) { _bfd_error_handler (_("can't find branch stub `%s'"), stub_entry->root.string); - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } targ = (stub_entry->target_value @@ -11587,7 +11587,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { r = get_relocs (htab->brlt, 1); if (r == NULL) - return FALSE; + return false; /* brlt, being SEC_LINKER_CREATED does not go through the normal reloc processing. Symbols and offsets are not translated from input file to output file form, so @@ -11614,15 +11614,15 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) (_("%P: linkage table error against `%pT'\n"), stub_entry->root.string); bfd_set_error (bfd_error_bad_value); - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } if (info->emitrelocations) { r = get_relocs (stub_entry->group->stub_sec, 1 + (PPC_HA (off) != 0)); if (r == NULL) - return FALSE; + return false; r[0].r_offset = loc - stub_entry->group->stub_sec->contents; if (bfd_big_endian (info->output_bfd)) r[0].r_offset += 2; @@ -11658,8 +11658,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) if (r2off == (bfd_vma) -1) { - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } bfd_put_32 (obfd, STD_R2_0R1 + STK_TOC (htab), p); @@ -11747,7 +11747,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) num_rel = 0; if (htab->params->power10_stubs != 0) { - bfd_boolean load = stub_entry->stub_type >= ppc_stub_plt_call_notoc; + bool load = stub_entry->stub_type >= ppc_stub_plt_call_notoc; p = build_power10_offset (obfd, p, off, odd, load); } else @@ -11817,7 +11817,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) } r = get_relocs (stub_entry->group->stub_sec, num_rel); if (r == NULL) - return FALSE; + return false; if (htab->params->power10_stubs != 0) r = emit_relocs_for_power10_offset (info, r, roff, targ, off, odd); else @@ -11832,7 +11832,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) r->r_addend = targ; if (stub_entry->h != NULL && !use_global_in_relocs (htab, stub_entry, r, num_rel)) - return FALSE; + return false; } } break; @@ -11881,8 +11881,8 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) ? stub_entry->h->elf.root.root.string : ""); bfd_set_error (bfd_error_bad_value); - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } r = NULL; @@ -11895,7 +11895,7 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) && PPC_HA (off + 16) == PPC_HA (off)) : 1))); if (r == NULL) - return FALSE; + return false; r[0].r_offset = loc - stub_entry->group->stub_sec->contents; if (bfd_big_endian (info->output_bfd)) r[0].r_offset += 2; @@ -11918,11 +11918,11 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) break; case ppc_stub_save_res: - return TRUE; + return true; default: BFD_FAIL (); - return FALSE; + return false; } stub_entry->group->stub_sec->size = stub_entry->stub_offset + (p - loc); @@ -11949,13 +11949,13 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) len2 = strlen (stub_entry->root.string); name = bfd_malloc (len1 + len2 + 2); if (name == NULL) - return FALSE; + return false; memcpy (name, stub_entry->root.string, 9); memcpy (name + 9, stub_str[stub_entry->stub_type - 1], len1); memcpy (name + len1 + 9, stub_entry->root.string + 8, len2 - 8 + 1); - h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE); + h = elf_link_hash_lookup (&htab->elf, name, true, false, false); if (h == NULL) - return FALSE; + return false; if (h->root.type == bfd_link_hash_new) { h->root.type = bfd_link_hash_defined; @@ -11970,14 +11970,14 @@ ppc_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) } } - return TRUE; + return true; } /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes, and select plt_branch stubs where long_branch stubs won't do. */ -static bfd_boolean +static bool ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct ppc_stub_hash_entry *stub_entry; @@ -11993,7 +11993,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Fail if the target section could not be assigned to an output section. The user should fix his linker script. */ @@ -12026,7 +12026,7 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) functions. Instead, emit copies of the functions. */ stub_entry->group->needs_save_res = 1; stub_entry->stub_type = ppc_stub_save_res; - return TRUE; + return true; } switch (stub_entry->stub_type) @@ -12054,8 +12054,8 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) r2off = get_r2off (info, stub_entry); if (r2off == (bfd_vma) -1) { - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } size = 8; if (PPC_HA (r2off) != 0) @@ -12077,13 +12077,13 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) br_entry = ppc_branch_hash_lookup (&htab->branch_hash_table, stub_entry->root.string + 9, - TRUE, FALSE); + true, false); if (br_entry == NULL) { _bfd_error_handler (_("can't build branch stub `%s'"), stub_entry->root.string); - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } if (br_entry->iter != htab->stub_iteration) @@ -12372,11 +12372,11 @@ ppc_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) default: BFD_FAIL (); - return FALSE; + return false; } stub_entry->group->stub_sec->size += size; - return TRUE; + return true; } /* Set up various things so that we can make a list of input sections @@ -12422,19 +12422,19 @@ ppc64_elf_start_multitoc_partition (struct bfd_link_info *info) and linker generated GOT section. Group input bfds such that the toc within a group is less than 64k in size. */ -bfd_boolean +bool ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec) { struct ppc_link_hash_table *htab = ppc_hash_table (info); bfd_vma addr, off, limit; if (htab == NULL) - return FALSE; + return false; if (!htab->second_toc_pass) { /* Keep track of the first .toc or .got section for this input bfd. */ - bfd_boolean new_bfd = htab->toc_bfd != isec->owner; + bool new_bfd = htab->toc_bfd != isec->owner; if (new_bfd) { @@ -12468,17 +12468,17 @@ ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec) if (new_bfd && elf_gp (isec->owner) != 0 && elf_gp (isec->owner) != off) - return FALSE; + return false; elf_gp (isec->owner) = off; - return TRUE; + return true; } /* During the second pass toc_first_sec points to the start of a toc group, and toc_curr is used to track the old elf_gp. We use toc_bfd to ensure we only look at each bfd once. */ if (htab->toc_bfd == isec->owner) - return TRUE; + return true; htab->toc_bfd = isec->owner; if (htab->toc_first_sec == NULL @@ -12492,55 +12492,55 @@ ppc64_elf_next_toc_section (struct bfd_link_info *info, asection *isec) off = addr - elf_gp (info->output_bfd) + TOC_BASE_OFF; elf_gp (isec->owner) = off; - return TRUE; + return true; } /* Called via elf_link_hash_traverse to merge GOT entries for global symbol H. */ -static bfd_boolean +static bool merge_global_got (struct elf_link_hash_entry *h, void *inf ATTRIBUTE_UNUSED) { if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; merge_got_entries (&h->got.glist); - return TRUE; + return true; } /* Called via elf_link_hash_traverse to allocate GOT entries for global symbol H. */ -static bfd_boolean +static bool reallocate_got (struct elf_link_hash_entry *h, void *inf) { struct got_entry *gent; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; for (gent = h->got.glist; gent != NULL; gent = gent->next) if (!gent->is_indirect) allocate_got (h, (struct bfd_link_info *) inf, gent); - return TRUE; + return true; } /* Called on the first multitoc pass after the last call to ppc64_elf_next_toc_section. This function removes duplicate GOT entries. */ -bfd_boolean +bool ppc64_elf_layout_multitoc (struct bfd_link_info *info) { struct ppc_link_hash_table *htab = ppc_hash_table (info); struct bfd *ibfd, *ibfd2; - bfd_boolean done_something; + bool done_something; htab->multi_toc_needed = htab->toc_curr != elf_gp (info->output_bfd); if (!htab->do_multi_toc) - return FALSE; + return false; /* Merge global sym got entries within a toc group. */ elf_link_hash_traverse (&htab->elf, merge_global_got, info); @@ -12567,7 +12567,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info) && ent2->got.offset != (bfd_vma) -1 && elf_gp (ibfd2) == elf_gp (ibfd)) { - ent2->is_indirect = TRUE; + ent2->is_indirect = true; ent2->got.ent = ent; } } @@ -12705,7 +12705,7 @@ ppc64_elf_layout_multitoc (struct bfd_link_info *info) on input sections. */ htab->toc_bfd = NULL; htab->toc_first_sec = NULL; - htab->second_toc_pass = TRUE; + htab->second_toc_pass = true; return done_something; } @@ -12846,7 +12846,7 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec) } dest = opd_entry_value (sym_sec, sym_value, - &sym_sec, NULL, FALSE); + &sym_sec, NULL, false); if (dest == (bfd_vma) -1) continue; } @@ -12945,13 +12945,13 @@ toc_adjusting_stub_needed (struct bfd_link_info *info, asection *isec) Build lists of input sections to determine groupings between which we may insert linker stubs. */ -bfd_boolean +bool ppc64_elf_next_input_section (struct bfd_link_info *info, asection *isec) { struct ppc_link_hash_table *htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; if ((isec->output_section->flags & SEC_CODE) != 0 && isec->output_section->id < htab->sec_info_arr_size) @@ -12975,7 +12975,7 @@ ppc64_elf_next_input_section (struct bfd_link_info *info, asection *isec) || isec->call_check_done)) { if (toc_adjusting_stub_needed (info, isec) < 0) - return FALSE; + return false; } /* Make all sections use the TOC assigned for this object file. This will be wrong for pasted sections; We fix that in @@ -12985,13 +12985,13 @@ ppc64_elf_next_input_section (struct bfd_link_info *info, asection *isec) } htab->sec_info[isec->id].toc_off = htab->toc_curr; - return TRUE; + return true; } /* Check that all .init and .fini sections use the same toc, if they have toc relocs. */ -static bfd_boolean +static bool check_pasted_section (struct bfd_link_info *info, const char *name) { asection *o = bfd_get_section_by_name (info->output_bfd, name); @@ -13008,7 +13008,7 @@ check_pasted_section (struct bfd_link_info *info, const char *name) if (toc_off == 0) toc_off = htab->sec_info[i->id].toc_off; else if (toc_off != htab->sec_info[i->id].toc_off) - return FALSE; + return false; } if (toc_off == 0) @@ -13024,10 +13024,10 @@ check_pasted_section (struct bfd_link_info *info, const char *name) for (i = o->map_head.s; i != NULL; i = i->map_head.s) htab->sec_info[i->id].toc_off = toc_off; } - return TRUE; + return true; } -bfd_boolean +bool ppc64_elf_check_init_fini (struct bfd_link_info *info) { return (check_pasted_section (info, ".init") @@ -13041,20 +13041,20 @@ ppc64_elf_check_init_fini (struct bfd_link_info *info) _init and _fini functions into multiple parts. Putting a stub in the middle of a function is not a good idea. */ -static bfd_boolean +static bool group_sections (struct bfd_link_info *info, bfd_size_type stub_group_size, - bfd_boolean stubs_always_before_branch) + bool stubs_always_before_branch) { struct ppc_link_hash_table *htab; asection *osec; - bfd_boolean suppress_size_errors; + bool suppress_size_errors; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; - suppress_size_errors = FALSE; + suppress_size_errors = false; if (stub_group_size == 1) { /* Default values. */ @@ -13062,7 +13062,7 @@ group_sections (struct bfd_link_info *info, stub_group_size = 0x1e00000; else stub_group_size = 0x1c00000; - suppress_size_errors = TRUE; + suppress_size_errors = true; } for (osec = info->output_bfd->sections; osec != NULL; osec = osec->next) @@ -13078,7 +13078,7 @@ group_sections (struct bfd_link_info *info, asection *curr; asection *prev; bfd_size_type total; - bfd_boolean big_sec; + bool big_sec; bfd_vma curr_toc; struct map_stub *group; bfd_size_type group_size; @@ -13116,7 +13116,7 @@ group_sections (struct bfd_link_info *info, than 2097152 bytes, or nearly 75000 plt call stubs. */ group = bfd_alloc (curr->owner, sizeof (*group)); if (group == NULL) - return FALSE; + return false; group->link_sec = curr; group->stub_sec = NULL; group->needs_save_res = 0; @@ -13157,7 +13157,7 @@ group_sections (struct bfd_link_info *info, tail = prev; } } - return TRUE; + return true; } static const unsigned char glink_eh_frame_cie[] = @@ -13201,15 +13201,15 @@ maybe_strip_output (struct bfd_link_info *info, asection *isec) PC-relative calls to a target that is unreachable with a "bl" instruction. */ -bfd_boolean +bool ppc64_elf_size_stubs (struct bfd_link_info *info) { bfd_size_type stub_group_size; - bfd_boolean stubs_always_before_branch; + bool stubs_always_before_branch; struct ppc_link_hash_table *htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (htab->params->power10_stubs == -1 && !htab->has_power10_relocs) htab->params->power10_stubs = 0; @@ -13252,7 +13252,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) { struct elf_link_hash_entry *h; h = elf_link_hash_lookup (&htab->elf, thread_starter[i], - FALSE, FALSE, TRUE); + false, false, true); htab->params->plt_thread_safe = h != NULL && h->ref_regular; if (htab->params->plt_thread_safe) break; @@ -13265,7 +13265,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) stub_group_size = htab->params->group_size; if (!group_sections (info, stub_group_size, stubs_always_before_branch)) - return FALSE; + return false; htab->tga_group = NULL; if (!htab->params->no_tls_get_addr_regsave @@ -13284,12 +13284,12 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) code_sec = sym_sec; opd = get_opd_info (sym_sec); if (opd != NULL) - opd_entry_value (sym_sec, sym_value, &code_sec, NULL, FALSE); + opd_entry_value (sym_sec, sym_value, &code_sec, NULL, false); htab->tga_group = htab->sec_info[code_sec->id].u.group; stub_sec = (*htab->params->add_stub_section) (".tga_desc.stub", htab->tga_group->link_sec); if (stub_sec == NULL) - return FALSE; + return false; htab->tga_group->stub_sec = stub_sec; htab->tga_desc_fd->elf.root.type = bfd_link_hash_defined; @@ -13298,7 +13298,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) htab->tga_desc_fd->elf.type = STT_FUNC; htab->tga_desc_fd->elf.def_regular = 1; htab->tga_desc_fd->elf.non_elf = 0; - _bfd_elf_link_hash_hide_symbol (info, &htab->tga_desc_fd->elf, TRUE); + _bfd_elf_link_hash_hide_symbol (info, &htab->tga_desc_fd->elf, true); } #define STUB_SHRINK_ITER 20 @@ -13374,7 +13374,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) bfd_vma sym_value, code_value; bfd_vma destination; unsigned long local_off; - bfd_boolean ok_dest; + bool ok_dest; struct ppc_link_hash_entry *hash; struct ppc_link_hash_entry *fdh; struct elf_link_hash_entry *h; @@ -13408,7 +13408,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) goto error_ret_free_internal; hash = ppc_elf_hash_entry (h); - ok_dest = FALSE; + ok_dest = false; fdh = NULL; sym_value = 0; if (hash == NULL) @@ -13416,14 +13416,14 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) sym_value = sym->st_value; if (sym_sec != NULL && sym_sec->output_section != NULL) - ok_dest = TRUE; + ok_dest = true; } else if (hash->elf.root.type == bfd_link_hash_defined || hash->elf.root.type == bfd_link_hash_defweak) { sym_value = hash->elf.root.u.def.value; if (sym_sec->output_section != NULL) - ok_dest = TRUE; + ok_dest = true; } else if (hash->elf.root.type == bfd_link_hash_undefweak || hash->elf.root.type == bfd_link_hash_undefined) @@ -13441,7 +13441,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) sym_sec = fdh->elf.root.u.def.section; sym_value = fdh->elf.root.u.def.value; if (sym_sec->output_section != NULL) - ok_dest = TRUE; + ok_dest = true; } else fdh = NULL; @@ -13482,7 +13482,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) sym_value += adjust; } dest = opd_entry_value (sym_sec, sym_value, - &code_sec, &code_value, FALSE); + &code_sec, &code_value, false); if (dest != (bfd_vma) -1) { destination = dest; @@ -13585,7 +13585,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) goto error_ret_free_internal; stub_entry = ppc_stub_hash_lookup (&htab->stub_hash_table, - stub_name, FALSE, FALSE); + stub_name, false, false); if (stub_entry != NULL) { enum ppc_stub_type old_type; @@ -13602,7 +13602,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) /* For --power10-stubs=auto, don't merge _notoc and other varieties of stubs. (The _both variety won't be created.) */ - bfd_boolean notoc = r_type == R_PPC64_REL24_NOTOC; + bool notoc = r_type == R_PPC64_REL24_NOTOC; struct ppc_stub_hash_entry *alt_stub = select_alt_stub (stub_entry, notoc); @@ -13702,7 +13702,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) if (symtab_hdr->contents != (unsigned char *) local_syms) free (local_syms); - return FALSE; + return false; } stub_entry->stub_type = stub_type; @@ -13857,7 +13857,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) indexed in .eh_frame_hdr. */ p = bfd_zalloc (htab->glink_eh_frame->owner, htab->glink_eh_frame->size); if (p == NULL) - return FALSE; + return false; htab->glink_eh_frame->contents = p; last_fde = p; align = 4; @@ -13937,7 +13937,7 @@ ppc64_elf_size_stubs (struct bfd_link_info *info) if (htab->glink_eh_frame != NULL) maybe_strip_output (info, htab->glink_eh_frame); - return TRUE; + return true; } /* Called after we have determined section placement. If sections @@ -13959,7 +13959,7 @@ ppc64_elf_set_toc (struct bfd_link_info *info, bfd *obfd) h = htab->hgot; else { - h = elf_link_hash_lookup (htab, ".TOC.", FALSE, FALSE, TRUE); + h = elf_link_hash_lookup (htab, ".TOC.", false, false, true); if (is_elf_hash_table (htab)) htab->hgot = h; } @@ -14043,7 +14043,7 @@ ppc64_elf_set_toc (struct bfd_link_info *info, bfd *obfd) struct bfd_link_hash_entry *bh = NULL; _bfd_generic_link_add_one_symbol (info, obfd, ".TOC.", BSF_GLOBAL, s, TOC_BASE_OFF - adjust, - NULL, FALSE, FALSE, &bh); + NULL, false, false, &bh); } } return TOCstart; @@ -14052,7 +14052,7 @@ ppc64_elf_set_toc (struct bfd_link_info *info, bfd *obfd) /* Called via elf_link_hash_traverse from ppc64_elf_build_stubs to write out any global entry stubs, and PLT relocations. */ -static bfd_boolean +static bool build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -14061,12 +14061,12 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) asection *s; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = inf; htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; for (ent = h->plt.plist; ent != NULL; ent = ent->next) if (ent->plt.offset != (bfd_vma) -1) @@ -14087,7 +14087,7 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) { plt = htab->elf.iplt; relplt = htab->elf.irelplt; - htab->elf.ifunc_resolvers = TRUE; + htab->elf.ifunc_resolvers = true; if (htab->opd_abi) rela.r_info = ELF64_R_INFO (0, R_PPC64_JMP_IREL); else @@ -14141,20 +14141,20 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) + ((ent->plt.offset - PLT_INITIAL_ENTRY_SIZE (htab)) / PLT_ENTRY_SIZE (htab) * sizeof (Elf64_External_Rela))); if (h->type == STT_GNU_IFUNC && is_static_defined (h)) - htab->elf.ifunc_resolvers = TRUE; + htab->elf.ifunc_resolvers = true; bfd_elf64_swap_reloca_out (info->output_bfd, &rela, loc); } } if (!h->pointer_equality_needed) - return TRUE; + return true; if (h->def_regular) - return TRUE; + return true; s = htab->global_entry; if (s == NULL || s->size == 0) - return TRUE; + return true; for (ent = h->plt.plist; ent != NULL; ent = ent->next) if (ent->plt.offset != (bfd_vma) -1 @@ -14182,7 +14182,7 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) (_("%P: linkage table error against `%pT'\n"), h->root.root.string); bfd_set_error (bfd_error_bad_value); - htab->stub_error = TRUE; + htab->stub_error = true; } htab->stub_count[ppc_stub_global_entry - 1] += 1; @@ -14192,12 +14192,12 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) char *name = bfd_malloc (sizeof "12345678.global_entry." + len); if (name == NULL) - return FALSE; + return false; sprintf (name, "%08x.global_entry.%s", s->id, h->root.root.string); - h = elf_link_hash_lookup (&htab->elf, name, TRUE, FALSE, FALSE); + h = elf_link_hash_lookup (&htab->elf, name, true, false, false); if (h == NULL) - return FALSE; + return false; if (h->root.type == bfd_link_hash_new) { h->root.type = bfd_link_hash_defined; @@ -14224,12 +14224,12 @@ build_global_entry_stubs_and_plt (struct elf_link_hash_entry *h, void *inf) bfd_put_32 (s->owner, BCTR, p); break; } - return TRUE; + return true; } /* Write PLT relocs for locals. */ -static bfd_boolean +static bool write_plt_relocs_for_local_syms (struct bfd_link_info *info) { struct ppc_link_hash_table *htab = ppc_hash_table (info); @@ -14271,7 +14271,7 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info) { if (symtab_hdr->contents != (unsigned char *) local_syms) free (local_syms); - return FALSE; + return false; } val = sym->st_value + ent->addend; @@ -14280,7 +14280,7 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info) if (ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) { - htab->elf.ifunc_resolvers = TRUE; + htab->elf.ifunc_resolvers = true; plt = htab->elf.iplt; relplt = htab->elf.irelplt; } @@ -14336,13 +14336,13 @@ write_plt_relocs_for_local_syms (struct bfd_link_info *info) symtab_hdr->contents = (unsigned char *) local_syms; } } - return TRUE; + return true; } /* Emit the static wrapper function preserving registers around a __tls_get_addr_opt call. */ -static bfd_boolean +static bool emit_tga_desc (struct ppc_link_hash_table *htab) { asection *stub_sec = htab->tga_group->stub_sec; @@ -14359,8 +14359,8 @@ emit_tga_desc (struct ppc_link_hash_table *htab) if (delta + (1 << 25) >= 1 << 26) { _bfd_error_handler (_("__tls_get_addr call offset overflow")); - htab->stub_error = TRUE; - return FALSE; + htab->stub_error = true; + return false; } p = stub_sec->contents; @@ -14411,7 +14411,7 @@ emit_tga_desc_eh_frame (struct ppc_link_hash_table *htab, bfd_byte *p) The stubs are kept in a hash table attached to the main linker hash table. This function is called via gldelf64ppc_finish. */ -bfd_boolean +bool ppc64_elf_build_stubs (struct bfd_link_info *info, char **stats) { @@ -14422,7 +14422,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, int stub_sec_count = 0; if (htab == NULL) - return FALSE; + return false; /* Allocate memory to hold the linker stubs. */ for (group = htab->group; group != NULL; group = group->next) @@ -14435,7 +14435,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, stub_sec->contents = bfd_zalloc (htab->params->stub_bfd, stub_sec->size); if (stub_sec->contents == NULL) - return FALSE; + return false; stub_sec->size = 0; } } @@ -14450,9 +14450,9 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, { struct elf_link_hash_entry *h; h = elf_link_hash_lookup (&htab->elf, "__glink_PLTresolve", - TRUE, FALSE, FALSE); + true, false, false); if (h == NULL) - return FALSE; + return false; if (h->root.type == bfd_link_hash_new) { h->root.type = bfd_link_hash_defined; @@ -14473,7 +14473,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, { Elf_Internal_Rela *r = get_relocs (htab->glink, 1); if (r == NULL) - return FALSE; + return false; r->r_offset = (htab->glink->output_offset + htab->glink->output_section->vma); r->r_info = ELF64_R_INFO (0, R_PPC64_REL64); @@ -14608,7 +14608,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, htab->tga_group->lr_restore = 23 * 4; htab->tga_group->stub_sec->size = 24 * 4; if (!emit_tga_desc (htab)) - return FALSE; + return false; if (htab->glink_eh_frame != NULL && htab->glink_eh_frame->size != 0) { @@ -14625,21 +14625,21 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, elf_link_hash_traverse (&htab->elf, build_global_entry_stubs_and_plt, info); if (!write_plt_relocs_for_local_syms (info)) - return FALSE; + return false; if (htab->brlt != NULL && htab->brlt->size != 0) { htab->brlt->contents = bfd_zalloc (htab->brlt->owner, htab->brlt->size); if (htab->brlt->contents == NULL) - return FALSE; + return false; } if (htab->relbrlt != NULL && htab->relbrlt->size != 0) { htab->relbrlt->contents = bfd_zalloc (htab->relbrlt->owner, htab->relbrlt->size); if (htab->relbrlt->contents == NULL) - return FALSE; + return false; } /* Build the stubs as directed by the stub hash table. */ @@ -14672,7 +14672,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, for (i = 0; i < ARRAY_SIZE (save_res_funcs); i++) if (!sfpr_define (info, &save_res_funcs[i], stub_sec)) - return FALSE; + return false; } } @@ -14699,7 +14699,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, _bfd_error_handler (_("%s offset too large for .eh_frame sdata4 encoding"), group->stub_sec->name); - return FALSE; + return false; } bfd_put_32 (htab->elf.dynobj, val, p + 8); p += (group->eh_size + 17 + 3) & -4; @@ -14718,7 +14718,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, _bfd_error_handler (_("%s offset too large for .eh_frame sdata4 encoding"), htab->glink->name); - return FALSE; + return false; } bfd_put_32 (htab->elf.dynobj, val, p + 8); p += (24 + align - 1) & -align; @@ -14737,12 +14737,12 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, if (group != NULL) { - htab->stub_error = TRUE; + htab->stub_error = true; _bfd_error_handler (_("stubs don't match calculated size")); } if (htab->stub_error) - return FALSE; + return false; if (stats != NULL) { @@ -14787,7 +14787,7 @@ ppc64_elf_build_stubs (struct bfd_link_info *info, free (groupmsg); } } - return TRUE; + return true; } /* What to do when ld finds relocations against symbols defined in @@ -14810,7 +14810,7 @@ ppc64_elf_action_discarded (asection *sec) /* These are the dynamic relocations supported by glibc. */ -static bfd_boolean +static bool ppc64_glibc_dynamic_reloc (enum elf_ppc64_reloc_type r_type) { switch (r_type) @@ -14861,10 +14861,10 @@ ppc64_glibc_dynamic_reloc (enum elf_ppc64_reloc_type r_type) case R_PPC64_ADDR14_BRNTAKEN: case R_PPC64_REL32: case R_PPC64_REL64: - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -14917,11 +14917,11 @@ ppc64_elf_relocate_section (bfd *output_bfd, bfd_byte *loc; struct got_entry **local_got_ents; bfd_vma TOCstart; - bfd_boolean ret = TRUE; - bfd_boolean is_opd; + bool ret = true; + bool is_opd; /* Assume 'at' branch hints. */ - bfd_boolean is_isa_v2 = TRUE; - bfd_boolean warned_dynamic = FALSE; + bool is_isa_v2 = true; + bool warned_dynamic = false; bfd_vma d_offset = (bfd_big_endian (input_bfd) ? 2 : 0); /* Initialize howto table if needed. */ @@ -14930,16 +14930,16 @@ ppc64_elf_relocate_section (bfd *output_bfd, htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Don't relocate stub sections. */ if (input_section->owner == htab->params->stub_bfd) - return TRUE; + return true; if (!is_ppc64_elf (input_bfd)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } local_got_ents = elf_local_got_ents (input_bfd); @@ -14966,8 +14966,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, unsigned char tls_mask, tls_gd, tls_type; unsigned char sym_type; bfd_vma relocation; - bfd_boolean unresolved_reloc, save_unresolved_reloc; - bfd_boolean warned; + bool unresolved_reloc, save_unresolved_reloc; + bool warned; enum { DEST_NORMAL, DEST_OPD, DEST_STUB } reloc_dest; unsigned int insn; unsigned int mask; @@ -14999,8 +14999,8 @@ ppc64_elf_relocate_section (bfd *output_bfd, sec = NULL; h_elf = NULL; sym_name = NULL; - unresolved_reloc = FALSE; - warned = FALSE; + unresolved_reloc = false; + warned = false; if (r_symndx < symtab_hdr->sh_info) { @@ -15035,7 +15035,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean ignored; + bool ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -15100,7 +15100,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, { relocation = TOCstart + htab->sec_info[input_section->id].toc_off; sec = bfd_abs_section_ptr; - unresolved_reloc = FALSE; + unresolved_reloc = false; } /* TLS optimizations. Replace instruction sequences and relocs @@ -15130,7 +15130,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, if (!get_tls_mask (&toc_tls, &toc_symndx, &toc_addend, &local_syms, rel, input_bfd)) - return FALSE; + return false; if (toc_tls) tls_mask = *toc_tls; @@ -15203,7 +15203,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, retval = get_tls_mask (&toc_tls, &toc_symndx, &toc_addend, &local_syms, rel, input_bfd); if (retval == 0) - return FALSE; + return false; if (toc_tls) { @@ -15813,7 +15813,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, || stub_entry->stub_type == ppc_stub_long_branch_r2off || stub_entry->stub_type == ppc_stub_long_branch_both)) { - bfd_boolean can_plt_call = FALSE; + bool can_plt_call = false; if (stub_entry->stub_type == ppc_stub_plt_call && !htab->opd_abi @@ -15822,12 +15822,12 @@ ppc64_elf_relocate_section (bfd *output_bfd, && is_elfv2_localentry0 (&h->elf)) { /* The function doesn't use or change r2. */ - can_plt_call = TRUE; + can_plt_call = true; } else if (r_type == R_PPC64_REL24_NOTOC) { /* NOTOC calls don't need to restore r2. */ - can_plt_call = TRUE; + can_plt_call = true; } /* All of these stubs may modify r2, so there must be a @@ -15846,7 +15846,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, nop = bfd_get_32 (input_bfd, contents + rel->r_offset + 4); if (nop == LD_R2_0R1 + STK_TOC (htab)) - can_plt_call = TRUE; + can_plt_call = true; else if (nop == NOP || nop == CROR_151515 || nop == CROR_313131) @@ -15861,7 +15861,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, bfd_put_32 (input_bfd, LD_R2_0R1 + STK_TOC (htab), contents + rel->r_offset + 4); - can_plt_call = TRUE; + can_plt_call = true; } } } @@ -15879,7 +15879,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, /* Allow crt1 branch to go via a toc adjusting stub. Other calls that never return could do the same, if we could detect such. */ - can_plt_call = TRUE; + can_plt_call = true; } } @@ -15901,10 +15901,10 @@ ppc64_elf_relocate_section (bfd *output_bfd, - sec->output_section->vma - sec->output_offset); - opd_entry_value (sec, off, &code_sec, NULL, FALSE); + opd_entry_value (sec, off, &code_sec, NULL, false); } if (code_sec == input_section) - can_plt_call = TRUE; + can_plt_call = true; } if (!can_plt_call) @@ -15924,13 +15924,13 @@ ppc64_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, sym_name); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; } if (can_plt_call && stub_entry->stub_type >= ppc_stub_plt_call && stub_entry->stub_type <= ppc_stub_plt_call_both) - unresolved_reloc = FALSE; + unresolved_reloc = false; } if ((stub_entry == NULL @@ -15942,7 +15942,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, bfd_vma off = (relocation + addend - sec->output_section->vma - sec->output_offset); - bfd_vma dest = opd_entry_value (sec, off, NULL, NULL, FALSE); + bfd_vma dest = opd_entry_value (sec, off, NULL, NULL, false); if (dest != (bfd_vma) -1) { relocation = dest; @@ -16223,7 +16223,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, input_bfd, ppc64_elf_howto_table[r_type]->name); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; goto copy_reloc; case R_PPC64_NONE: @@ -16309,7 +16309,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, else { indx = h->elf.dynindx; - unresolved_reloc = FALSE; + unresolved_reloc = false; } ent = h->elf.got.glist; } @@ -16348,7 +16348,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, the case of TLSLD where we'll use one entry per module. */ asection *relgot; - bfd_boolean ifunc; + bool ifunc; *offp = off | 1; relgot = NULL; @@ -16359,7 +16359,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, { relgot = htab->elf.irelplt; if (indx == 0 || is_static_defined (&h->elf)) - htab->elf.ifunc_resolvers = TRUE; + htab->elf.ifunc_resolvers = true; } else if (indx != 0 || (bfd_link_pic (info) @@ -16490,7 +16490,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_PLTCALL_NOTOC: /* Relocation is to the entry for this symbol in the procedure linkage table. */ - unresolved_reloc = TRUE; + unresolved_reloc = true; { struct plt_entry **plt_list = NULL; if (h != NULL) @@ -16535,7 +16535,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, relocation -= got; } addend = 0; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; } } @@ -16552,7 +16552,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, else if (sec != NULL && sec->id < htab->sec_info_arr_size) relocation += htab->sec_info[sec->id].toc_off; else - unresolved_reloc = TRUE; + unresolved_reloc = true; goto dodyn; /* TOC16 relocs. We want the offset relative to the TOC base, @@ -16730,7 +16730,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, ? h->elf.dyn_relocs != NULL : ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC)) { - bfd_boolean skip, relocate; + bool skip, relocate; asection *sreloc; bfd_vma out_off; long indx = 0; @@ -16739,15 +16739,15 @@ ppc64_elf_relocate_section (bfd *output_bfd, are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; out_off = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (out_off == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (out_off == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; out_off += (input_section->output_section->vma + input_section->output_offset); outrel.r_offset = out_off; @@ -16795,7 +16795,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, bug in binutils handling of weak syms.) In these cases we won't use the opd entry in this lib. */ - unresolved_reloc = FALSE; + unresolved_reloc = false; } if (!is_opd && r_type == R_PPC64_ADDR64 @@ -16811,7 +16811,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, Prelink also wants simple and consistent rules for relocs. This make all RELATIVE relocs have *r_offset equal to r_addend. */ - relocate = TRUE; + relocate = true; } } else @@ -16827,14 +16827,14 @@ ppc64_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, ppc64_elf_howto_table[r_type]->name, sym_name); - ret = FALSE; + ret = false; } else if (r_symndx == STN_UNDEF || bfd_is_abs_section (sec)) ; else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -16890,7 +16890,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, { sreloc = htab->elf.irelplt; if (indx == 0 || is_static_defined (&h->elf)) - htab->elf.ifunc_resolvers = TRUE; + htab->elf.ifunc_resolvers = true; } if (sreloc == NULL) abort (); @@ -16912,7 +16912,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, input_bfd, ppc64_elf_howto_table[ELF64_R_TYPE (outrel.r_info)]->name, sym_name); - warned_dynamic = TRUE; + warned_dynamic = true; } /* If this reloc is against an external symbol, it will @@ -16921,7 +16921,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, that the section contents are a known value. */ if (!relocate) { - unresolved_reloc = FALSE; + unresolved_reloc = false; /* The value chosen here is quite arbitrary as ld.so ignores section contents except for the special case of .opd where the contents might be accessed @@ -16967,7 +16967,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, ppc64_elf_howto_table[r_type]->name, sym_name); bfd_set_error (bfd_error_invalid_operation); - ret = FALSE; + ret = false; goto copy_reloc; } @@ -17017,7 +17017,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_PLTSEQ: if (unresolved_reloc) { - unresolved_reloc = FALSE; + unresolved_reloc = false; goto nop_it; } break; @@ -17032,7 +17032,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, bfd_byte *p = contents + rel->r_offset; bfd_put_32 (input_bfd, PNOP >> 32, p); bfd_put_32 (input_bfd, PNOP, p + 4); - unresolved_reloc = FALSE; + unresolved_reloc = false; goto copy_reloc; } break; @@ -17040,7 +17040,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_PLT16_HA: if (unresolved_reloc) { - unresolved_reloc = FALSE; + unresolved_reloc = false; goto nop_it; } /* Fall through. */ @@ -17065,7 +17065,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, case R_PPC64_PLT16_LO_DS: if (unresolved_reloc) { - unresolved_reloc = FALSE; + unresolved_reloc = false; goto nop_it; } /* Fall through. */ @@ -17215,7 +17215,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, ppc64_elf_howto_table[r_type]->name, mask + 1); bfd_set_error (bfd_error_bad_value); - ret = FALSE; + ret = false; goto copy_reloc; } break; @@ -17237,7 +17237,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, input_bfd, input_section, rel->r_offset, howto->name, h->elf.root.root.string); - ret = FALSE; + ret = false; } /* 16-bit fields in insns mostly have signed values, but a @@ -17380,7 +17380,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, (_("%H: %s against `%pT': error %d\n"), input_bfd, input_section, rel->r_offset, reloc_name, sym_name, (int) r); - ret = FALSE; + ret = false; } free (more_info); } @@ -17422,7 +17422,7 @@ ppc64_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (ppc64_elf_tdata (input_bfd)->opd.relocs == NULL); ppc64_elf_tdata (input_bfd)->opd.relocs = rel; if (rel == NULL) - return FALSE; + return false; memcpy (rel, relocs, amt); } return ret; @@ -17463,7 +17463,7 @@ ppc64_elf_output_symbol_hook (struct bfd_link_info *info, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool ppc64_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -17474,7 +17474,7 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd, htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (!htab->opd_abi && !h->def_regular) for (ent = h->plt.plist; ent != NULL; ent = ent->next) @@ -17526,7 +17526,7 @@ ppc64_elf_finish_dynamic_symbol (bfd *output_bfd, bfd_elf64_swap_reloca_out (output_bfd, &rela, loc); } - return TRUE; + return true; } /* Used to decide how to sort relocs in an optimal manner for the @@ -17559,7 +17559,7 @@ ppc64_elf_reloc_type_class (const struct bfd_link_info *info, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool ppc64_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -17569,7 +17569,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, htab = ppc_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; sdyn = bfd_get_linker_section (dynobj, ".dynamic"); @@ -17684,7 +17684,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, elf_section_data (htab->brlt)->rela.hdr, elf_section_data (htab->brlt)->relocs, NULL)) - return FALSE; + return false; if (htab->glink != NULL && htab->glink->reloc_count != 0 @@ -17693,7 +17693,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, elf_section_data (htab->glink)->rela.hdr, elf_section_data (htab->glink)->relocs, NULL)) - return FALSE; + return false; if (htab->glink_eh_frame != NULL @@ -17702,7 +17702,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, && !_bfd_elf_write_section_eh_frame (output_bfd, info, htab->glink_eh_frame, htab->glink_eh_frame->contents)) - return FALSE; + return false; /* We need to handle writing out multiple GOT sections ourselves, since we didn't add them to DYNOBJ. We know dynobj is the first @@ -17721,7 +17721,7 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, && !bfd_set_section_contents (output_bfd, s->output_section, s->contents, s->output_offset, s->size)) - return FALSE; + return false; s = ppc64_elf_tdata (dynobj)->relgot; if (s != NULL && s->size != 0 @@ -17729,10 +17729,10 @@ ppc64_elf_finish_dynamic_sections (bfd *output_bfd, && !bfd_set_section_contents (output_bfd, s->output_section, s->contents, s->output_offset, s->size)) - return FALSE; + return false; } - return TRUE; + return true; } #include "elf64-target.h" diff --git a/bfd/elf64-ppc.h b/bfd/elf64-ppc.h index e24a320545..ce056e1b68 100644 --- a/bfd/elf64-ppc.h +++ b/bfd/elf64-ppc.h @@ -75,19 +75,19 @@ struct ppc64_elf_params int object_in_toc; }; -bfd_boolean ppc64_elf_init_stub_bfd +bool ppc64_elf_init_stub_bfd (struct bfd_link_info *, struct ppc64_elf_params *); -bfd_boolean ppc64_elf_edit_opd +bool ppc64_elf_edit_opd (struct bfd_link_info *); -bfd_boolean ppc64_elf_inline_plt +bool ppc64_elf_inline_plt (struct bfd_link_info *); -bfd_boolean ppc64_elf_tls_setup +bool ppc64_elf_tls_setup (struct bfd_link_info *); -bfd_boolean ppc64_elf_tls_optimize +bool ppc64_elf_tls_optimize (struct bfd_link_info *); -bfd_boolean ppc64_elf_edit_toc +bool ppc64_elf_edit_toc (struct bfd_link_info *); -bfd_boolean ppc64_elf_has_small_toc_reloc +bool ppc64_elf_has_small_toc_reloc (asection *); bfd_vma ppc64_elf_set_toc (struct bfd_link_info *, bfd *); @@ -95,17 +95,17 @@ int ppc64_elf_setup_section_lists (struct bfd_link_info *); void ppc64_elf_start_multitoc_partition (struct bfd_link_info *); -bfd_boolean ppc64_elf_next_toc_section +bool ppc64_elf_next_toc_section (struct bfd_link_info *, asection *); -bfd_boolean ppc64_elf_layout_multitoc +bool ppc64_elf_layout_multitoc (struct bfd_link_info *); void ppc64_elf_finish_multitoc_partition (struct bfd_link_info *); -bfd_boolean ppc64_elf_check_init_fini +bool ppc64_elf_check_init_fini (struct bfd_link_info *); -bfd_boolean ppc64_elf_next_input_section +bool ppc64_elf_next_input_section (struct bfd_link_info *, asection *); -bfd_boolean ppc64_elf_size_stubs +bool ppc64_elf_size_stubs (struct bfd_link_info *); -bfd_boolean ppc64_elf_build_stubs +bool ppc64_elf_build_stubs (struct bfd_link_info *, char **); diff --git a/bfd/elf64-s390.c b/bfd/elf64-s390.c index 8314c9a1b6..ff7ea7c35f 100644 --- a/bfd/elf64-s390.c +++ b/bfd/elf64-s390.c @@ -46,147 +46,147 @@ static reloc_howto_type elf_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = 2 byte, 2 = 4 byte) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_390_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ - - HOWTO(R_390_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_8", FALSE, 0,0x000000ff, FALSE), - HOWTO(R_390_12, 0, 1, 12, FALSE, 0, complain_overflow_dont, - bfd_elf_generic_reloc, "R_390_12", FALSE, 0,0x00000fff, FALSE), - HOWTO(R_390_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_32", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_PC32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC32", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_GOT12, 0, 1, 12, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOT12", FALSE, 0,0x00000fff, FALSE), - HOWTO(R_390_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOT32", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT32", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_COPY, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_COPY", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_GLOB_DAT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GLOB_DAT", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_JMP_SLOT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_JMP_SLOT", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_RELATIVE, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_RELATIVE", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_GOTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTOFF32", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_GOTPC, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPC", FALSE, 0,MINUS_ONE, TRUE), - HOWTO(R_390_GOT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOT16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_PC16, 0, 1, 16, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC16", FALSE, 0,0x0000ffff, TRUE), - HOWTO(R_390_PC16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC16DBL", FALSE, 0,0x0000ffff, TRUE), - HOWTO(R_390_PLT16DBL, 1, 1, 16, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT16DBL", FALSE, 0,0x0000ffff, TRUE), - HOWTO(R_390_PC32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC32DBL", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_PLT32DBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT32DBL", FALSE, 0,0xffffffff, TRUE), - HOWTO(R_390_GOTPCDBL, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPCDBL", FALSE, 0,MINUS_ONE, TRUE), - HOWTO(R_390_64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_64", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_PC64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC64", FALSE, 0,MINUS_ONE, TRUE), - HOWTO(R_390_GOT64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOT64", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_PLT64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT64", FALSE, 0,MINUS_ONE, TRUE), - HOWTO(R_390_GOTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTENT", FALSE, 0,MINUS_ONE, TRUE), - HOWTO(R_390_GOTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTOFF16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_GOTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTOFF64", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_GOTPLT12, 0, 1, 12, FALSE, 0, complain_overflow_dont, - bfd_elf_generic_reloc, "R_390_GOTPLT12", FALSE, 0,0x00000fff, FALSE), - HOWTO(R_390_GOTPLT16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPLT16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_GOTPLT32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPLT32", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_GOTPLT64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPLT64", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_GOTPLTENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_GOTPLTENT",FALSE, 0,MINUS_ONE, TRUE), - HOWTO(R_390_PLTOFF16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLTOFF16", FALSE, 0,0x0000ffff, FALSE), - HOWTO(R_390_PLTOFF32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLTOFF32", FALSE, 0,0xffffffff, FALSE), - HOWTO(R_390_PLTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLTOFF64", FALSE, 0,MINUS_ONE, FALSE), - HOWTO(R_390_TLS_LOAD, 0, 0, 0, FALSE, 0, complain_overflow_dont, - s390_tls_reloc, "R_390_TLS_LOAD", FALSE, 0, 0, FALSE), - HOWTO(R_390_TLS_GDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont, - s390_tls_reloc, "R_390_TLS_GDCALL", FALSE, 0, 0, FALSE), - HOWTO(R_390_TLS_LDCALL, 0, 0, 0, FALSE, 0, complain_overflow_dont, - s390_tls_reloc, "R_390_TLS_LDCALL", FALSE, 0, 0, FALSE), + false), /* pcrel_offset */ + + HOWTO(R_390_8, 0, 0, 8, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_8", false, 0,0x000000ff, false), + HOWTO(R_390_12, 0, 1, 12, false, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "R_390_12", false, 0,0x00000fff, false), + HOWTO(R_390_16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_16", false, 0,0x0000ffff, false), + HOWTO(R_390_32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_32", false, 0,0xffffffff, false), + HOWTO(R_390_PC32, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC32", false, 0,0xffffffff, true), + HOWTO(R_390_GOT12, 0, 1, 12, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOT12", false, 0,0x00000fff, false), + HOWTO(R_390_GOT32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOT32", false, 0,0xffffffff, false), + HOWTO(R_390_PLT32, 0, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT32", false, 0,0xffffffff, true), + HOWTO(R_390_COPY, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_COPY", false, 0,MINUS_ONE, false), + HOWTO(R_390_GLOB_DAT, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GLOB_DAT", false, 0,MINUS_ONE, false), + HOWTO(R_390_JMP_SLOT, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_JMP_SLOT", false, 0,MINUS_ONE, false), + HOWTO(R_390_RELATIVE, 0, 4, 64, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_RELATIVE", false, 0,MINUS_ONE, false), + HOWTO(R_390_GOTOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTOFF32", false, 0,MINUS_ONE, false), + HOWTO(R_390_GOTPC, 0, 4, 64, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPC", false, 0,MINUS_ONE, true), + HOWTO(R_390_GOT16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOT16", false, 0,0x0000ffff, false), + HOWTO(R_390_PC16, 0, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC16", false, 0,0x0000ffff, true), + HOWTO(R_390_PC16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC16DBL", false, 0,0x0000ffff, true), + HOWTO(R_390_PLT16DBL, 1, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT16DBL", false, 0,0x0000ffff, true), + HOWTO(R_390_PC32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC32DBL", false, 0,0xffffffff, true), + HOWTO(R_390_PLT32DBL, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT32DBL", false, 0,0xffffffff, true), + HOWTO(R_390_GOTPCDBL, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPCDBL", false, 0,MINUS_ONE, true), + HOWTO(R_390_64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_64", false, 0,MINUS_ONE, false), + HOWTO(R_390_PC64, 0, 4, 64, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC64", false, 0,MINUS_ONE, true), + HOWTO(R_390_GOT64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOT64", false, 0,MINUS_ONE, false), + HOWTO(R_390_PLT64, 0, 4, 64, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT64", false, 0,MINUS_ONE, true), + HOWTO(R_390_GOTENT, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTENT", false, 0,MINUS_ONE, true), + HOWTO(R_390_GOTOFF16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTOFF16", false, 0,0x0000ffff, false), + HOWTO(R_390_GOTOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTOFF64", false, 0,MINUS_ONE, false), + HOWTO(R_390_GOTPLT12, 0, 1, 12, false, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "R_390_GOTPLT12", false, 0,0x00000fff, false), + HOWTO(R_390_GOTPLT16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPLT16", false, 0,0x0000ffff, false), + HOWTO(R_390_GOTPLT32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPLT32", false, 0,0xffffffff, false), + HOWTO(R_390_GOTPLT64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPLT64", false, 0,MINUS_ONE, false), + HOWTO(R_390_GOTPLTENT, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_GOTPLTENT",false, 0,MINUS_ONE, true), + HOWTO(R_390_PLTOFF16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLTOFF16", false, 0,0x0000ffff, false), + HOWTO(R_390_PLTOFF32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLTOFF32", false, 0,0xffffffff, false), + HOWTO(R_390_PLTOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLTOFF64", false, 0,MINUS_ONE, false), + HOWTO(R_390_TLS_LOAD, 0, 0, 0, false, 0, complain_overflow_dont, + s390_tls_reloc, "R_390_TLS_LOAD", false, 0, 0, false), + HOWTO(R_390_TLS_GDCALL, 0, 0, 0, false, 0, complain_overflow_dont, + s390_tls_reloc, "R_390_TLS_GDCALL", false, 0, 0, false), + HOWTO(R_390_TLS_LDCALL, 0, 0, 0, false, 0, complain_overflow_dont, + s390_tls_reloc, "R_390_TLS_LDCALL", false, 0, 0, false), EMPTY_HOWTO (R_390_TLS_GD32), /* Empty entry for R_390_TLS_GD32. */ - HOWTO(R_390_TLS_GD64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_GD64", FALSE, 0, MINUS_ONE, FALSE), - HOWTO(R_390_TLS_GOTIE12, 0, 1, 12, FALSE, 0, complain_overflow_dont, - bfd_elf_generic_reloc, "R_390_TLS_GOTIE12", FALSE, 0, 0x00000fff, FALSE), + HOWTO(R_390_TLS_GD64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_GD64", false, 0, MINUS_ONE, false), + HOWTO(R_390_TLS_GOTIE12, 0, 1, 12, false, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "R_390_TLS_GOTIE12", false, 0, 0x00000fff, false), EMPTY_HOWTO (R_390_TLS_GOTIE32), /* Empty entry for R_390_TLS_GOTIE32. */ - HOWTO(R_390_TLS_GOTIE64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_GOTIE64", FALSE, 0, MINUS_ONE, FALSE), + HOWTO(R_390_TLS_GOTIE64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_GOTIE64", false, 0, MINUS_ONE, false), EMPTY_HOWTO (R_390_TLS_LDM32), /* Empty entry for R_390_TLS_LDM32. */ - HOWTO(R_390_TLS_LDM64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_LDM64", FALSE, 0, MINUS_ONE, FALSE), + HOWTO(R_390_TLS_LDM64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_LDM64", false, 0, MINUS_ONE, false), EMPTY_HOWTO (R_390_TLS_IE32), /* Empty entry for R_390_TLS_IE32. */ - HOWTO(R_390_TLS_IE64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_IE64", FALSE, 0, MINUS_ONE, FALSE), - HOWTO(R_390_TLS_IEENT, 1, 2, 32, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_IEENT", FALSE, 0, MINUS_ONE, TRUE), + HOWTO(R_390_TLS_IE64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_IE64", false, 0, MINUS_ONE, false), + HOWTO(R_390_TLS_IEENT, 1, 2, 32, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_IEENT", false, 0, MINUS_ONE, true), EMPTY_HOWTO (R_390_TLS_LE32), /* Empty entry for R_390_TLS_LE32. */ - HOWTO(R_390_TLS_LE64, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_LE64", FALSE, 0, MINUS_ONE, FALSE), + HOWTO(R_390_TLS_LE64, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_LE64", false, 0, MINUS_ONE, false), EMPTY_HOWTO (R_390_TLS_LDO32), /* Empty entry for R_390_TLS_LDO32. */ - HOWTO(R_390_TLS_LDO64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_LDO64", FALSE, 0, MINUS_ONE, FALSE), - HOWTO(R_390_TLS_DTPMOD, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_DTPMOD", FALSE, 0, MINUS_ONE, FALSE), - HOWTO(R_390_TLS_DTPOFF, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", FALSE, 0, MINUS_ONE, FALSE), - HOWTO(R_390_TLS_TPOFF, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_TLS_TPOFF", FALSE, 0, MINUS_ONE, FALSE), - HOWTO(R_390_20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_GOT20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_GOT20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_GOTPLT20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_GOTPLT20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_TLS_GOTIE20, 0, 2, 20, FALSE, 8, complain_overflow_dont, - s390_elf_ldisp_reloc, "R_390_TLS_GOTIE20", FALSE, 0,0x0fffff00, FALSE), - HOWTO(R_390_IRELATIVE, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_IRELATIVE", FALSE, 0, MINUS_ONE, FALSE), - HOWTO(R_390_PC12DBL, 1, 1, 12, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC12DBL", FALSE, 0,0x00000fff, TRUE), - HOWTO(R_390_PLT12DBL, 1, 1, 12, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT12DBL", FALSE, 0,0x00000fff, TRUE), - HOWTO(R_390_PC24DBL, 1, 2, 24, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PC24DBL", FALSE, 0,0x00ffffff, TRUE), - HOWTO(R_390_PLT24DBL, 1, 2, 24, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_390_PLT24DBL", FALSE, 0,0x00ffffff, TRUE), + HOWTO(R_390_TLS_LDO64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_LDO64", false, 0, MINUS_ONE, false), + HOWTO(R_390_TLS_DTPMOD, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_DTPMOD", false, 0, MINUS_ONE, false), + HOWTO(R_390_TLS_DTPOFF, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_DTPOFF", false, 0, MINUS_ONE, false), + HOWTO(R_390_TLS_TPOFF, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_TLS_TPOFF", false, 0, MINUS_ONE, false), + HOWTO(R_390_20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_20", false, 0,0x0fffff00, false), + HOWTO(R_390_GOT20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_GOT20", false, 0,0x0fffff00, false), + HOWTO(R_390_GOTPLT20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_GOTPLT20", false, 0,0x0fffff00, false), + HOWTO(R_390_TLS_GOTIE20, 0, 2, 20, false, 8, complain_overflow_dont, + s390_elf_ldisp_reloc, "R_390_TLS_GOTIE20", false, 0,0x0fffff00, false), + HOWTO(R_390_IRELATIVE, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_IRELATIVE", false, 0, MINUS_ONE, false), + HOWTO(R_390_PC12DBL, 1, 1, 12, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC12DBL", false, 0,0x00000fff, true), + HOWTO(R_390_PLT12DBL, 1, 1, 12, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT12DBL", false, 0,0x00000fff, true), + HOWTO(R_390_PC24DBL, 1, 2, 24, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PC24DBL", false, 0,0x00ffffff, true), + HOWTO(R_390_PLT24DBL, 1, 2, 24, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_390_PLT24DBL", false, 0,0x00ffffff, true), }; /* GNU extension to record C++ vtable hierarchy. */ static reloc_howto_type elf64_s390_vtinherit_howto = - HOWTO (R_390_GNU_VTINHERIT, 0,4,0,FALSE,0,complain_overflow_dont, NULL, "R_390_GNU_VTINHERIT", FALSE,0, 0, FALSE); + HOWTO (R_390_GNU_VTINHERIT, 0,4,0,false,0,complain_overflow_dont, NULL, "R_390_GNU_VTINHERIT", false,0, 0, false); static reloc_howto_type elf64_s390_vtentry_howto = - HOWTO (R_390_GNU_VTENTRY, 0,4,0,FALSE,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_390_GNU_VTENTRY", FALSE,0,0, FALSE); + HOWTO (R_390_GNU_VTENTRY, 0,4,0,false,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_390_GNU_VTENTRY", false,0,0, false); static reloc_howto_type * elf_s390_reloc_type_lookup (bfd *abfd, @@ -354,7 +354,7 @@ elf_s390_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* We need to use ELF64_R_TYPE so we have our own copy of this function, and elf64-s390.c has its own copy. */ -static bfd_boolean +static bool elf_s390_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -378,11 +378,11 @@ elf_s390_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } cache_ptr->howto = &elf_howto_table[r_type]; } - return TRUE; + return true; } /* A relocation function which doesn't do anything. */ @@ -450,11 +450,11 @@ s390_elf_ldisp_reloc (bfd *abfd, return bfd_reloc_ok; } -static bfd_boolean +static bool elf_s390_is_local_label_name (bfd *abfd, const char *name) { if (name[0] == '.' && (name[1] == 'X' || name[1] == 'L')) - return TRUE; + return true; return _bfd_elf_is_local_label_name (abfd, name); } @@ -635,14 +635,14 @@ struct elf_s390_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == S390_ELF_DATA) -static bfd_boolean +static bool elf_s390_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_s390_obj_tdata), S390_ELF_DATA); } -static bfd_boolean +static bool elf_s390_object_p (bfd *abfd) { /* Set the right machine number for an s390 elf32 file. */ @@ -799,7 +799,7 @@ elf_s390_tls_transition (struct bfd_link_info *info, allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool elf_s390_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -815,13 +815,13 @@ elf_s390_check_relocs (bfd *abfd, int tls_type, old_tls_type; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_s390_elf (abfd)); htab = elf_s390_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); @@ -844,7 +844,7 @@ elf_s390_check_relocs (bfd *abfd, /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx < symtab_hdr->sh_info) @@ -853,7 +853,7 @@ elf_s390_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { @@ -863,12 +863,12 @@ elf_s390_check_relocs (bfd *abfd, htab->elf.dynobj = abfd; if (!s390_elf_create_ifunc_sections (htab->elf.dynobj, info)) - return FALSE; + return false; if (local_got_refcounts == NULL) { if (!elf_s390_allocate_local_syminfo (abfd, symtab_hdr)) - return FALSE; + return false; local_got_refcounts = elf_local_got_refcounts (abfd); } plt = elf_s390_local_plt (abfd); @@ -914,7 +914,7 @@ elf_s390_check_relocs (bfd *abfd, && local_got_refcounts == NULL) { if (!elf_s390_allocate_local_syminfo (abfd, symtab_hdr)) - return FALSE; + return false; local_got_refcounts = elf_local_got_refcounts (abfd); } @@ -929,7 +929,7 @@ elf_s390_check_relocs (bfd *abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } } @@ -938,7 +938,7 @@ elf_s390_check_relocs (bfd *abfd, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!s390_elf_create_ifunc_sections (htab->elf.dynobj, info)) - return FALSE; + return false; /* Make sure an IFUNC symbol defined in a non-shared object always gets a PLT slot. */ @@ -1082,7 +1082,7 @@ elf_s390_check_relocs (bfd *abfd, /* xgettext:c-format */ (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h->root.root.string); - return FALSE; + return false; } if (old_tls_type > tls_type) tls_type = old_tls_type; @@ -1194,10 +1194,10 @@ elf_s390_check_relocs (bfd *abfd, htab->elf.dynobj = abfd; sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->elf.dynobj, 3, abfd, /*rela?*/ TRUE); + (sec, htab->elf.dynobj, 3, abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -1217,7 +1217,7 @@ elf_s390_check_relocs (bfd *abfd, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -1234,7 +1234,7 @@ elf_s390_check_relocs (bfd *abfd, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -1258,14 +1258,14 @@ elf_s390_check_relocs (bfd *abfd, Reconstruct it for later use during GC. */ case R_390_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_390_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; default: @@ -1273,7 +1273,7 @@ elf_s390_check_relocs (bfd *abfd, } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -1325,7 +1325,7 @@ elf_s390_adjust_gotplt (struct elf_s390_link_hash_entry *h) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1371,7 +1371,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, h->plt.offset = (bfd_vma) -1; h->needs_plt = 0; } - return TRUE; + return true; } /* If this is a function, put it in the procedure linkage table. We @@ -1394,7 +1394,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, elf_s390_adjust_gotplt((struct elf_s390_link_hash_entry *) h); } - return TRUE; + return true; } else /* It's possible that we incorrectly decided a .plt reloc was @@ -1415,7 +1415,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, h->root.u.def.value = def->root.u.def.value; if (ELIMINATE_COPY_RELOCS || info->nocopyreloc) h->non_got_ref = def->non_got_ref; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1426,18 +1426,18 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -1445,7 +1445,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, if (ELIMINATE_COPY_RELOCS && !_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -1460,7 +1460,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, htab = elf_s390_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* We must generate a R_390_COPY reloc to tell the dynamic linker to copy the initial value out of the dynamic object and into the @@ -1487,7 +1487,7 @@ elf_s390_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { @@ -1496,12 +1496,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = elf_s390_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Since STT_GNU_IFUNC symbol must go through PLT, we handle it here if it is defined and referenced in a non-shared object. */ @@ -1516,7 +1516,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (bfd_link_pic (info) @@ -1589,7 +1589,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, else if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = elf_s390_hash_entry(h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -1598,7 +1598,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->elf.sgot; @@ -1624,7 +1624,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -1664,7 +1664,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -1687,7 +1687,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -1708,24 +1708,24 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, sreloc->size += p->count * sizeof (Elf64_External_Rela); } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -static bfd_boolean +static bool elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_s390_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = elf_s390_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; if (dynobj == NULL) @@ -1855,7 +1855,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -1876,7 +1876,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->elf.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -1914,7 +1914,7 @@ elf_s390_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } return _bfd_elf_add_dynamic_tags (output_bfd, info, relocs); @@ -1990,12 +1990,12 @@ elf_s390_relocate_section (bfd *output_bfd, if (!is_s390_elf (input_bfd)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } htab = elf_s390_hash_table (info); if (htab == NULL) - return FALSE; + return false; symtab_hdr = &elf_symtab_hdr (input_bfd); sym_hashes = elf_sym_hashes (input_bfd); @@ -2013,10 +2013,10 @@ elf_s390_relocate_section (bfd *output_bfd, asection *sec; bfd_vma off; bfd_vma relocation; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_reloc_status_type r; int tls_type; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; r_type = ELF64_R_TYPE (rel->r_info); if (r_type == (int) R_390_GNU_VTINHERIT @@ -2025,7 +2025,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (r_type >= (int) R_390_max) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = elf_howto_table + r_type; @@ -2034,7 +2034,7 @@ elf_s390_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -2044,7 +2044,7 @@ elf_s390_relocate_section (bfd *output_bfd, { struct plt_entry *local_plt = elf_s390_local_plt (input_bfd); if (local_plt == NULL) - return FALSE; + return false; /* Address of the PLT slot. */ relocation = (htab->elf.iplt->output_section->vma @@ -2096,8 +2096,8 @@ elf_s390_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2155,7 +2155,7 @@ elf_s390_relocate_section (bfd *output_bfd, } if (r_type == R_390_GOTPLTENT) relocation += s390_got_pointer (info); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; } /* Fall through. */ @@ -2173,7 +2173,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; dyn = htab->elf.dynamic_sections_created; @@ -2282,7 +2282,7 @@ elf_s390_relocate_section (bfd *output_bfd, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2365,7 +2365,7 @@ elf_s390_relocate_section (bfd *output_bfd, case R_390_GOTPCDBL: /* Use global offset table as symbol value. */ relocation = s390_got_pointer (info); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_PLT12DBL: @@ -2398,7 +2398,7 @@ elf_s390_relocate_section (bfd *output_bfd, relocation = (htab->elf.splt->output_section->vma + htab->elf.splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_PLTOFF16: @@ -2427,7 +2427,7 @@ elf_s390_relocate_section (bfd *output_bfd, + htab->elf.splt->output_offset + h->plt.offset - s390_got_pointer (info)); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_PC16: @@ -2447,7 +2447,7 @@ elf_s390_relocate_section (bfd *output_bfd, "(rebuild file with -fPIC ?)"), input_bfd, h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* The target of these relocs are instruction operands residing in read-only sections. We cannot emit a runtime @@ -2558,23 +2558,23 @@ elf_s390_relocate_section (bfd *output_bfd, || h->root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; asection *sreloc; bfd_byte *loc; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -2603,7 +2603,7 @@ elf_s390_relocate_section (bfd *output_bfd, outrel.r_addend = relocation + rel->r_addend; if (r_type == R_390_64) { - relocate = TRUE; + relocate = true; outrel.r_info = ELF64_R_INFO (0, R_390_RELATIVE); } else @@ -2615,7 +2615,7 @@ elf_s390_relocate_section (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error(bfd_error_bad_value); - return FALSE; + return false; } else { @@ -2783,7 +2783,7 @@ elf_s390_relocate_section (bfd *output_bfd, relocation = htab->elf.sgot->output_offset + off; if (r_type == R_390_TLS_IE64 || r_type == R_390_TLS_IEENT) relocation += htab->elf.sgot->output_section->vma; - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2821,7 +2821,7 @@ elf_s390_relocate_section (bfd *output_bfd, relocation = htab->elf.sgot->output_offset + off; if (r_type == R_390_TLS_IEENT) relocation += htab->elf.sgot->output_section->vma; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_TLS_LDM64: @@ -2859,7 +2859,7 @@ elf_s390_relocate_section (bfd *output_bfd, htab->tls_ldm_got.offset |= 1; } relocation = htab->elf.sgot->output_offset + off; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_390_TLS_LE64: @@ -2936,7 +2936,7 @@ elf_s390_relocate_section (bfd *output_bfd, if (insn1 != 0x0004) { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } if ((insn0 & 0xff00f000) == 0xe3000000) /* lg %rx,0(%ry,0) -> sllg %rx,%ry,0 */ @@ -2953,7 +2953,7 @@ elf_s390_relocate_section (bfd *output_bfd, else { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } insn0 = 0xeb000000 | (insn0 & 0x00f00000) | ry; insn1 = 0x000d; @@ -2970,7 +2970,7 @@ elf_s390_relocate_section (bfd *output_bfd, if ((insn0 & 0xffff0000) != 0xc0e50000) { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } if (!bfd_link_pic (info) && (h == NULL || h->dynindx == -1)) { @@ -3000,7 +3000,7 @@ elf_s390_relocate_section (bfd *output_bfd, if ((insn0 & 0xffff0000) != 0xc0e50000) { invalid_tls_insn (input_bfd, input_section, rel); - return FALSE; + return false; } /* LD->LE transition. brasl %r14,__tls_get_addr@plt -> brcl 0,. */ @@ -3071,7 +3071,7 @@ elf_s390_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -3087,12 +3087,12 @@ elf_s390_relocate_section (bfd *output_bfd, (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"), input_bfd, input_section, (uint64_t) rel->r_offset, name, (int) r); - return FALSE; + return false; } } } - return TRUE; + return true; } /* Generate the PLT slots together with the dynamic relocations needed @@ -3184,7 +3184,7 @@ elf_s390_finish_ifunc_symbol (bfd *output_bfd, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_s390_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3195,7 +3195,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, htab = elf_s390_hash_table (info); if (htab == NULL) - return FALSE; + return false; if (h->plt.offset != (bfd_vma) -1) { @@ -3327,14 +3327,14 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, + htab->elf.iplt->output_offset + h->plt.offset), htab->elf.sgot->contents + h->got.offset); - return TRUE; + return true; } } else if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h)) { if (UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)) - return TRUE; + return true; /* If this is a static link, or it is a -Bsymbolic link and the symbol is defined locally or was forced to be local @@ -3343,7 +3343,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, will already have been initialized in the relocate_section function. */ if (!(h->def_regular || ELF_COMMON_DEF_P (h))) - return FALSE; + return false; BFD_ASSERT((h->got.offset & 1) != 0); rela.r_info = ELF64_R_INFO (0, R_390_RELATIVE); rela.r_addend = (h->root.u.def.value @@ -3397,7 +3397,7 @@ elf_s390_finish_dynamic_symbol (bfd *output_bfd, || h == htab->elf.hplt) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Used to decide how to sort relocs in an optimal manner for the @@ -3440,7 +3440,7 @@ elf_s390_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSED, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_s390_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3452,7 +3452,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd, htab = elf_s390_hash_table (info); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; sdyn = bfd_get_linker_section (dynobj, ".dynamic"); @@ -3573,7 +3573,7 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd, asection *sec = local_plt[i].sec; isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, ibfd, i); if (isym == NULL) - return FALSE; + return false; if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) elf_s390_finish_ifunc_symbol (output_bfd, info, NULL, htab, @@ -3586,12 +3586,12 @@ elf_s390_finish_dynamic_sections (bfd *output_bfd, } } - return TRUE; + return true; } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf_s390_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -3600,7 +3600,7 @@ elf_s390_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 336: /* sizeof(struct elf_prstatus) on s390x */ /* pr_cursig */ @@ -3620,13 +3620,13 @@ elf_s390_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf_s390_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 136: /* sizeof(struct elf_prpsinfo) on s390x */ elf_tdata (abfd)->core->pid @@ -3649,7 +3649,7 @@ elf_s390_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } static char * @@ -3726,11 +3726,11 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt, /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf64_s390_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { if (!is_s390_elf (ibfd) || !is_s390_elf (info->output_bfd)) - return TRUE; + return true; return elf_s390_merge_obj_attributes (ibfd, info); } @@ -3755,18 +3755,18 @@ elf_s390_additional_program_headers (bfd *abfd ATTRIBUTE_UNUSED, /* Add the PT_S390_PGSTE program header. */ -static bfd_boolean +static bool elf_s390_modify_segment_map (bfd *abfd, struct bfd_link_info *info) { struct elf_s390_link_hash_table *htab; struct elf_segment_map *m, *pm = NULL; if (!abfd || !info) - return TRUE; + return true; htab = elf_s390_hash_table (info); if (!htab || !htab->params->pgste) - return TRUE; + return true; /* If there is already a PT_S390_PGSTE header, avoid adding another. */ @@ -3778,22 +3778,22 @@ elf_s390_modify_segment_map (bfd *abfd, struct bfd_link_info *info) } if (m) - return TRUE; + return true; m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof (struct elf_segment_map)); if (m == NULL) - return FALSE; + return false; m->p_type = PT_S390_PGSTE; m->count = 0; m->next = NULL; if (pm) pm->next = m; - return TRUE; + return true; } -bfd_boolean +bool bfd_elf_s390_set_options (struct bfd_link_info *info, struct s390_elf_params *params) { @@ -3806,7 +3806,7 @@ bfd_elf_s390_set_options (struct bfd_link_info *info, htab->params = params; } - return TRUE; + return true; } diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c index 1d4521dfca..035ebdd45c 100644 --- a/bfd/elf64-sparc.c +++ b/bfd/elf64-sparc.c @@ -66,10 +66,10 @@ elf64_sparc_get_dynamic_reloc_upper_bound (bfd *abfd) has secondary addend in ELF64_R_TYPE_DATA. We handle it as two relocations for the same location, R_SPARC_LO10 and R_SPARC_13. */ -static bfd_boolean +static bool elf64_sparc_slurp_one_reloc_table (bfd *abfd, asection *asect, Elf_Internal_Shdr *rel_hdr, - asymbol **symbols, bfd_boolean dynamic) + asymbol **symbols, bool dynamic) { void * allocated = NULL; bfd_byte *native_relocs; @@ -80,10 +80,10 @@ elf64_sparc_slurp_one_reloc_table (bfd *abfd, asection *asect, arelent *relents; if (bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0) - return FALSE; + return false; allocated = _bfd_malloc_and_read (abfd, rel_hdr->sh_size, rel_hdr->sh_size); if (allocated == NULL) - return FALSE; + return false; native_relocs = (bfd_byte *) allocated; @@ -162,18 +162,18 @@ elf64_sparc_slurp_one_reloc_table (bfd *abfd, asection *asect, canon_reloc_count (asect) += relent - relents; free (allocated); - return TRUE; + return true; error_return: free (allocated); - return FALSE; + return false; } /* Read in and swap the external relocs. */ -static bfd_boolean +static bool elf64_sparc_slurp_reloc_table (bfd *abfd, asection *asect, - asymbol **symbols, bfd_boolean dynamic) + asymbol **symbols, bool dynamic) { struct bfd_elf_section_data * const d = elf_section_data (asect); Elf_Internal_Shdr *rel_hdr; @@ -181,13 +181,13 @@ elf64_sparc_slurp_reloc_table (bfd *abfd, asection *asect, bfd_size_type amt; if (asect->relocation != NULL) - return TRUE; + return true; if (! dynamic) { if ((asect->flags & SEC_RELOC) == 0 || asect->reloc_count == 0) - return TRUE; + return true; rel_hdr = d->rel.hdr; rel_hdr2 = d->rela.hdr; @@ -202,7 +202,7 @@ elf64_sparc_slurp_reloc_table (bfd *abfd, asection *asect, dynamic symbol table, and in that case bfd_section_from_shdr in elf.c does not update the RELOC_COUNT. */ if (asect->size == 0) - return TRUE; + return true; rel_hdr = &d->this_hdr; asect->reloc_count = NUM_SHDR_ENTRIES (rel_hdr); @@ -213,7 +213,7 @@ elf64_sparc_slurp_reloc_table (bfd *abfd, asection *asect, amt *= 2 * sizeof (arelent); asect->relocation = (arelent *) bfd_alloc (abfd, amt); if (asect->relocation == NULL) - return FALSE; + return false; /* The elf64_sparc_slurp_one_reloc_table routine increments canon_reloc_count. */ @@ -222,14 +222,14 @@ elf64_sparc_slurp_reloc_table (bfd *abfd, asection *asect, if (rel_hdr && !elf64_sparc_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)) - return FALSE; + return false; if (rel_hdr2 && !elf64_sparc_slurp_one_reloc_table (abfd, asect, rel_hdr2, symbols, dynamic)) - return FALSE; + return false; - return TRUE; + return true; } /* Canonicalize the relocs. */ @@ -242,7 +242,7 @@ elf64_sparc_canonicalize_reloc (bfd *abfd, sec_ptr section, unsigned int i; const struct elf_backend_data *bed = get_elf_backend_data (abfd); - if (! bed->s->slurp_reloc_table (abfd, section, symbols, FALSE)) + if (! bed->s->slurp_reloc_table (abfd, section, symbols, false)) return -1; tblptr = section->relocation; @@ -286,7 +286,7 @@ elf64_sparc_canonicalize_dynamic_reloc (bfd *abfd, arelent **storage, arelent *p; long count, i; - if (! elf64_sparc_slurp_reloc_table (abfd, s, syms, TRUE)) + if (! elf64_sparc_slurp_reloc_table (abfd, s, syms, true)) return -1; count = canon_reloc_count (s); p = s->relocation; @@ -318,7 +318,7 @@ elf64_sparc_set_reloc (bfd *abfd ATTRIBUTE_UNUSED, static void elf64_sparc_write_relocs (bfd *abfd, asection *sec, void * data) { - bfd_boolean *failedp = (bfd_boolean *) data; + bool *failedp = (bool *) data; Elf_Internal_Shdr *rela_hdr; bfd_vma addr_offset; Elf64_External_Rela *outbound_relocas, *src_rela; @@ -370,7 +370,7 @@ elf64_sparc_write_relocs (bfd *abfd, asection *sec, void * data) rela_hdr->contents = bfd_alloc (abfd, rela_hdr->sh_size); if (rela_hdr->contents == NULL) { - *failedp = TRUE; + *failedp = true; return; } @@ -408,7 +408,7 @@ elf64_sparc_write_relocs (bfd *abfd, asection *sec, void * data) n = _bfd_elf_symbol_from_bfd_symbol (abfd, &sym); if (n < 0) { - *failedp = TRUE; + *failedp = true; return; } last_sym_idx = n; @@ -418,7 +418,7 @@ elf64_sparc_write_relocs (bfd *abfd, asection *sec, void * data) && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec && ! _bfd_elf_validate_reloc (abfd, ptr)) { - *failedp = TRUE; + *failedp = true; return; } @@ -454,7 +454,7 @@ elf64_sparc_write_relocs (bfd *abfd, asection *sec, void * data) /* Hook called by the linker routine which adds symbols from an object file. We use it for STT_REGISTER symbols. */ -static bfd_boolean +static bool elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep, flagword *flagsp ATTRIBUTE_UNUSED, @@ -477,7 +477,7 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, _bfd_error_handler (_("%pB: only registers %%g[2367] can be declared using STT_REGISTER"), abfd); - return FALSE; + return false; } if (info->output_bfd->xvec != abfd->xvec @@ -487,7 +487,7 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, If STT_REGISTER comes from a dynamic object, don't put it into the output bfd. The dynamic linker will recheck it. */ *namep = NULL; - return TRUE; + return true; } p = _bfd_sparc_elf_hash_table(info)->app_regs + reg; @@ -500,7 +500,7 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, " previously %s in %pB"), (int) sym->st_value, **namep ? *namep : "#scratch", abfd, *p->name ? p->name : "#scratch", p->abfd); - return FALSE; + return false; } if (p->name == NULL) @@ -510,7 +510,7 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, struct elf_link_hash_entry *h; h = (struct elf_link_hash_entry *) - bfd_link_hash_lookup (info->hash, *namep, FALSE, FALSE, FALSE); + bfd_link_hash_lookup (info->hash, *namep, false, false, false); if (h != NULL) { @@ -523,13 +523,13 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, (_("symbol `%s' has differing types: REGISTER in %pB," " previously %s in %pB"), *namep, abfd, stt_types[type], p->abfd); - return FALSE; + return false; } p->name = bfd_hash_allocate (&info->hash->table, strlen (*namep) + 1); if (!p->name) - return FALSE; + return false; strcpy (p->name, *namep); } @@ -549,7 +549,7 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, } } *namep = NULL; - return TRUE; + return true; } else if (*namep && **namep && info->output_bfd->xvec == abfd->xvec) @@ -570,16 +570,16 @@ elf64_sparc_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, (_("Symbol `%s' has differing types: %s in %pB," " previously REGISTER in %pB"), *namep, stt_types[type], abfd, p->abfd); - return FALSE; + return false; } } - return TRUE; + return true; } /* This function takes care of emitting STT_REGISTER symbols which we cannot easily keep in the symbol hash table. */ -static bfd_boolean +static bool elf64_sparc_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, void * flaginfo, @@ -599,7 +599,7 @@ elf64_sparc_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED, if (info->strip == strip_some && bfd_hash_lookup (info->keep_hash, app_regs [reg].name, - FALSE, FALSE) == NULL) + false, false) == NULL) continue; sym.st_value = reg < 2 ? reg + 2 : reg + 4; @@ -612,10 +612,10 @@ elf64_sparc_output_arch_syms (bfd *output_bfd ATTRIBUTE_UNUSED, sym.st_shndx == SHN_ABS ? bfd_abs_section_ptr : bfd_und_section_ptr, NULL) != 1) - return FALSE; + return false; } - return TRUE; + return true; } static int @@ -649,24 +649,24 @@ elf64_sparc_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, asymbol *asym) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; - bfd_boolean error; + bool error; flagword new_flags, old_flags; int new_mm, old_mm; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour || bfd_get_flavour (obfd) != bfd_target_elf_flavour) - return TRUE; + return true; new_flags = elf_elfheader (ibfd)->e_flags; old_flags = elf_elfheader (obfd)->e_flags; if (!elf_flags_init (obfd)) /* First call, no flags set */ { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; } @@ -675,7 +675,7 @@ elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) else /* Incompatible flags */ { - error = FALSE; + error = false; #define EF_SPARC_ISA_EXTENSIONS \ (EF_SPARC_SUN_US1 | EF_SPARC_SUN_US3 | EF_SPARC_HAL_R1) @@ -697,7 +697,7 @@ elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if ((old_flags & (EF_SPARC_SUN_US1 | EF_SPARC_SUN_US3)) && (old_flags & EF_SPARC_HAL_R1)) { - error = TRUE; + error = true; _bfd_error_handler (_("%pB: linking UltraSPARC specific with HAL specific code"), ibfd); @@ -716,7 +716,7 @@ elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Warn about any other mismatches */ if (new_flags != old_flags) { - error = TRUE; + error = true; _bfd_error_handler /* xgettext:c-format */ (_("%pB: uses different e_flags (%#x) fields than previous modules (%#x)"), @@ -728,7 +728,7 @@ elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (error) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } return _bfd_sparc_elf_merge_private_bfd_data (ibfd, info); @@ -736,7 +736,7 @@ elf64_sparc_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* MARCO: Set the correct entry size for the .stab section. */ -static bfd_boolean +static bool elf64_sparc_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED, asection *sec) @@ -751,7 +751,7 @@ elf64_sparc_fake_sections (bfd *abfd ATTRIBUTE_UNUSED, elf_section_data (sec)->this_hdr.sh_entsize = 12; } - return TRUE; + return true; } /* Print a STT_REGISTER symbol to file FILE. */ @@ -1007,7 +1007,7 @@ const struct elf_size_info elf64_sparc_size_info = #undef elf_backend_strtab_flags #define elf_backend_strtab_flags SHF_STRINGS -static bfd_boolean +static bool elf64_sparc_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED, @@ -1015,7 +1015,7 @@ elf64_sparc_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSE { /* PR 19938: FIXME: Need to add code for setting the sh_info and sh_link fields of Solaris specific section types. */ - return FALSE; + return false; } #undef elf_backend_copy_special_section_fields diff --git a/bfd/elf64-tilegx.c b/bfd/elf64-tilegx.c index 4cd508acdd..42811046c5 100644 --- a/bfd/elf64-tilegx.c +++ b/bfd/elf64-tilegx.c @@ -28,14 +28,14 @@ /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; size_t size; if (note->descsz != TILEGX_PRSTATUS_SIZEOF) - return FALSE; + return false; /* pr_cursig */ elf_tdata (abfd)->core->signal = @@ -54,11 +54,11 @@ tilegx_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { if (note->descsz != TILEGX_PRPSINFO_SIZEOF) - return FALSE; + return false; elf_tdata (abfd)->core->program = _bfd_elfcore_strndup (abfd, note->descdata + TILEGX_PRPSINFO_OFFSET_PR_FNAME, 16); @@ -77,7 +77,7 @@ tilegx_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 5edbb7084a..3ac6159f3f 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -44,134 +44,134 @@ special_function, name, partial_inplace, src_mask, dst_mask, pcrel_offset. */ static reloc_howto_type x86_64_elf_howto_table[] = { - HOWTO(R_X86_64_NONE, 0, 3, 0, FALSE, 0, complain_overflow_dont, - bfd_elf_generic_reloc, "R_X86_64_NONE", FALSE, 0x00000000, 0x00000000, - FALSE), - HOWTO(R_X86_64_64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_64", FALSE, MINUS_ONE, MINUS_ONE, - FALSE), - HOWTO(R_X86_64_PC32, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_PC32", FALSE, 0xffffffff, 0xffffffff, - TRUE), - HOWTO(R_X86_64_GOT32, 0, 2, 32, FALSE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_GOT32", FALSE, 0xffffffff, 0xffffffff, - FALSE), - HOWTO(R_X86_64_PLT32, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_PLT32", FALSE, 0xffffffff, 0xffffffff, - TRUE), - HOWTO(R_X86_64_COPY, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_COPY", FALSE, 0xffffffff, 0xffffffff, - FALSE), - HOWTO(R_X86_64_GLOB_DAT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_GLOB_DAT", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_JUMP_SLOT, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_JUMP_SLOT", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_RELATIVE, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_RELATIVE", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_GOTPCREL, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_GOTPCREL", FALSE, 0xffffffff, - 0xffffffff, TRUE), - HOWTO(R_X86_64_32, 0, 2, 32, FALSE, 0, complain_overflow_unsigned, - bfd_elf_generic_reloc, "R_X86_64_32", FALSE, 0xffffffff, 0xffffffff, - FALSE), - HOWTO(R_X86_64_32S, 0, 2, 32, FALSE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_32S", FALSE, 0xffffffff, 0xffffffff, - FALSE), - HOWTO(R_X86_64_16, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_16", FALSE, 0xffff, 0xffff, FALSE), - HOWTO(R_X86_64_PC16,0, 1, 16, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_PC16", FALSE, 0xffff, 0xffff, TRUE), - HOWTO(R_X86_64_8, 0, 0, 8, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_8", FALSE, 0xff, 0xff, FALSE), - HOWTO(R_X86_64_PC8, 0, 0, 8, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_PC8", FALSE, 0xff, 0xff, TRUE), - HOWTO(R_X86_64_DTPMOD64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_DTPMOD64", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_DTPOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_DTPOFF64", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_TPOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_TPOFF64", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_TLSGD, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_TLSGD", FALSE, 0xffffffff, - 0xffffffff, TRUE), - HOWTO(R_X86_64_TLSLD, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_TLSLD", FALSE, 0xffffffff, - 0xffffffff, TRUE), - HOWTO(R_X86_64_DTPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_DTPOFF32", FALSE, 0xffffffff, - 0xffffffff, FALSE), - HOWTO(R_X86_64_GOTTPOFF, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_GOTTPOFF", FALSE, 0xffffffff, - 0xffffffff, TRUE), - HOWTO(R_X86_64_TPOFF32, 0, 2, 32, FALSE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_TPOFF32", FALSE, 0xffffffff, - 0xffffffff, FALSE), - HOWTO(R_X86_64_PC64, 0, 4, 64, TRUE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_PC64", FALSE, MINUS_ONE, MINUS_ONE, - TRUE), - HOWTO(R_X86_64_GOTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, + HOWTO(R_X86_64_NONE, 0, 3, 0, false, 0, complain_overflow_dont, + bfd_elf_generic_reloc, "R_X86_64_NONE", false, 0x00000000, 0x00000000, + false), + HOWTO(R_X86_64_64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_64", false, MINUS_ONE, MINUS_ONE, + false), + HOWTO(R_X86_64_PC32, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_PC32", false, 0xffffffff, 0xffffffff, + true), + HOWTO(R_X86_64_GOT32, 0, 2, 32, false, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_GOT32", false, 0xffffffff, 0xffffffff, + false), + HOWTO(R_X86_64_PLT32, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_PLT32", false, 0xffffffff, 0xffffffff, + true), + HOWTO(R_X86_64_COPY, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_COPY", false, 0xffffffff, 0xffffffff, + false), + HOWTO(R_X86_64_GLOB_DAT, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_GLOB_DAT", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_JUMP_SLOT, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_JUMP_SLOT", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_RELATIVE, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_RELATIVE", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_GOTPCREL, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_GOTPCREL", false, 0xffffffff, + 0xffffffff, true), + HOWTO(R_X86_64_32, 0, 2, 32, false, 0, complain_overflow_unsigned, + bfd_elf_generic_reloc, "R_X86_64_32", false, 0xffffffff, 0xffffffff, + false), + HOWTO(R_X86_64_32S, 0, 2, 32, false, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_32S", false, 0xffffffff, 0xffffffff, + false), + HOWTO(R_X86_64_16, 0, 1, 16, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_16", false, 0xffff, 0xffff, false), + HOWTO(R_X86_64_PC16,0, 1, 16, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_PC16", false, 0xffff, 0xffff, true), + HOWTO(R_X86_64_8, 0, 0, 8, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_8", false, 0xff, 0xff, false), + HOWTO(R_X86_64_PC8, 0, 0, 8, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_PC8", false, 0xff, 0xff, true), + HOWTO(R_X86_64_DTPMOD64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_DTPMOD64", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_DTPOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_DTPOFF64", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_TPOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_TPOFF64", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_TLSGD, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_TLSGD", false, 0xffffffff, + 0xffffffff, true), + HOWTO(R_X86_64_TLSLD, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_TLSLD", false, 0xffffffff, + 0xffffffff, true), + HOWTO(R_X86_64_DTPOFF32, 0, 2, 32, false, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_DTPOFF32", false, 0xffffffff, + 0xffffffff, false), + HOWTO(R_X86_64_GOTTPOFF, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_GOTTPOFF", false, 0xffffffff, + 0xffffffff, true), + HOWTO(R_X86_64_TPOFF32, 0, 2, 32, false, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_TPOFF32", false, 0xffffffff, + 0xffffffff, false), + HOWTO(R_X86_64_PC64, 0, 4, 64, true, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_PC64", false, MINUS_ONE, MINUS_ONE, + true), + HOWTO(R_X86_64_GOTOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_X86_64_GOTOFF64", - FALSE, MINUS_ONE, MINUS_ONE, FALSE), - HOWTO(R_X86_64_GOTPC32, 0, 2, 32, TRUE, 0, complain_overflow_signed, + false, MINUS_ONE, MINUS_ONE, false), + HOWTO(R_X86_64_GOTPC32, 0, 2, 32, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_X86_64_GOTPC32", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(R_X86_64_GOT64, 0, 4, 64, FALSE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_GOT64", FALSE, MINUS_ONE, MINUS_ONE, - FALSE), - HOWTO(R_X86_64_GOTPCREL64, 0, 4, 64, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_GOTPCREL64", FALSE, MINUS_ONE, - MINUS_ONE, TRUE), - HOWTO(R_X86_64_GOTPC64, 0, 4, 64, TRUE, 0, complain_overflow_signed, + false, 0xffffffff, 0xffffffff, true), + HOWTO(R_X86_64_GOT64, 0, 4, 64, false, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_GOT64", false, MINUS_ONE, MINUS_ONE, + false), + HOWTO(R_X86_64_GOTPCREL64, 0, 4, 64, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_GOTPCREL64", false, MINUS_ONE, + MINUS_ONE, true), + HOWTO(R_X86_64_GOTPC64, 0, 4, 64, true, 0, complain_overflow_signed, bfd_elf_generic_reloc, "R_X86_64_GOTPC64", - FALSE, MINUS_ONE, MINUS_ONE, TRUE), - HOWTO(R_X86_64_GOTPLT64, 0, 4, 64, FALSE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_GOTPLT64", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_PLTOFF64, 0, 4, 64, FALSE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_PLTOFF64", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_SIZE32, 0, 2, 32, FALSE, 0, complain_overflow_unsigned, - bfd_elf_generic_reloc, "R_X86_64_SIZE32", FALSE, 0xffffffff, 0xffffffff, - FALSE), - HOWTO(R_X86_64_SIZE64, 0, 4, 64, FALSE, 0, complain_overflow_unsigned, - bfd_elf_generic_reloc, "R_X86_64_SIZE64", FALSE, MINUS_ONE, MINUS_ONE, - FALSE), - HOWTO(R_X86_64_GOTPC32_TLSDESC, 0, 2, 32, TRUE, 0, + false, MINUS_ONE, MINUS_ONE, true), + HOWTO(R_X86_64_GOTPLT64, 0, 4, 64, false, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_GOTPLT64", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_PLTOFF64, 0, 4, 64, false, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_PLTOFF64", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_SIZE32, 0, 2, 32, false, 0, complain_overflow_unsigned, + bfd_elf_generic_reloc, "R_X86_64_SIZE32", false, 0xffffffff, 0xffffffff, + false), + HOWTO(R_X86_64_SIZE64, 0, 4, 64, false, 0, complain_overflow_unsigned, + bfd_elf_generic_reloc, "R_X86_64_SIZE64", false, MINUS_ONE, MINUS_ONE, + false), + HOWTO(R_X86_64_GOTPC32_TLSDESC, 0, 2, 32, true, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_X86_64_GOTPC32_TLSDESC", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(R_X86_64_TLSDESC_CALL, 0, 0, 0, FALSE, 0, + false, 0xffffffff, 0xffffffff, true), + HOWTO(R_X86_64_TLSDESC_CALL, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_X86_64_TLSDESC_CALL", - FALSE, 0, 0, FALSE), - HOWTO(R_X86_64_TLSDESC, 0, 4, 64, FALSE, 0, + false, 0, 0, false), + HOWTO(R_X86_64_TLSDESC, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_X86_64_TLSDESC", - FALSE, MINUS_ONE, MINUS_ONE, FALSE), - HOWTO(R_X86_64_IRELATIVE, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_IRELATIVE", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_RELATIVE64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_RELATIVE64", FALSE, MINUS_ONE, - MINUS_ONE, FALSE), - HOWTO(R_X86_64_PC32_BND, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_PC32_BND", FALSE, 0xffffffff, 0xffffffff, - TRUE), - HOWTO(R_X86_64_PLT32_BND, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_PLT32_BND", FALSE, 0xffffffff, 0xffffffff, - TRUE), - HOWTO(R_X86_64_GOTPCRELX, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_GOTPCRELX", FALSE, 0xffffffff, - 0xffffffff, TRUE), - HOWTO(R_X86_64_REX_GOTPCRELX, 0, 2, 32, TRUE, 0, complain_overflow_signed, - bfd_elf_generic_reloc, "R_X86_64_REX_GOTPCRELX", FALSE, 0xffffffff, - 0xffffffff, TRUE), + false, MINUS_ONE, MINUS_ONE, false), + HOWTO(R_X86_64_IRELATIVE, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_IRELATIVE", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_RELATIVE64, 0, 4, 64, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_RELATIVE64", false, MINUS_ONE, + MINUS_ONE, false), + HOWTO(R_X86_64_PC32_BND, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_PC32_BND", false, 0xffffffff, 0xffffffff, + true), + HOWTO(R_X86_64_PLT32_BND, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_PLT32_BND", false, 0xffffffff, 0xffffffff, + true), + HOWTO(R_X86_64_GOTPCRELX, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_GOTPCRELX", false, 0xffffffff, + 0xffffffff, true), + HOWTO(R_X86_64_REX_GOTPCRELX, 0, 2, 32, true, 0, complain_overflow_signed, + bfd_elf_generic_reloc, "R_X86_64_REX_GOTPCRELX", false, 0xffffffff, + 0xffffffff, true), /* We have a gap in the reloc numbers here. R_X86_64_standard counts the number up to this point, and @@ -181,18 +181,18 @@ static reloc_howto_type x86_64_elf_howto_table[] = #define R_X86_64_vt_offset (R_X86_64_GNU_VTINHERIT - R_X86_64_standard) /* GNU extension to record C++ vtable hierarchy. */ - HOWTO (R_X86_64_GNU_VTINHERIT, 0, 4, 0, FALSE, 0, complain_overflow_dont, - NULL, "R_X86_64_GNU_VTINHERIT", FALSE, 0, 0, FALSE), + HOWTO (R_X86_64_GNU_VTINHERIT, 0, 4, 0, false, 0, complain_overflow_dont, + NULL, "R_X86_64_GNU_VTINHERIT", false, 0, 0, false), /* GNU extension to record C++ vtable member usage. */ - HOWTO (R_X86_64_GNU_VTENTRY, 0, 4, 0, FALSE, 0, complain_overflow_dont, - _bfd_elf_rel_vtable_reloc_fn, "R_X86_64_GNU_VTENTRY", FALSE, 0, 0, - FALSE), + HOWTO (R_X86_64_GNU_VTENTRY, 0, 4, 0, false, 0, complain_overflow_dont, + _bfd_elf_rel_vtable_reloc_fn, "R_X86_64_GNU_VTENTRY", false, 0, 0, + false), /* Use complain_overflow_bitfield on R_X86_64_32 for x32. */ - HOWTO(R_X86_64_32, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, - bfd_elf_generic_reloc, "R_X86_64_32", FALSE, 0xffffffff, 0xffffffff, - FALSE) + HOWTO(R_X86_64_32, 0, 2, 32, false, 0, complain_overflow_bitfield, + bfd_elf_generic_reloc, "R_X86_64_32", false, 0xffffffff, 0xffffffff, + false) }; #define X86_PCREL_TYPE_P(TYPE) \ @@ -333,7 +333,7 @@ elf_x86_64_reloc_name_lookup (bfd *abfd, /* Given an x86_64 ELF reloc type, fill in an arelent structure. */ -static bfd_boolean +static bool elf_x86_64_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -342,13 +342,13 @@ elf_x86_64_info_to_howto (bfd *abfd, arelent *cache_ptr, r_type = ELF32_R_TYPE (dst->r_info); cache_ptr->howto = elf_x86_64_rtype_to_howto (abfd, r_type); if (cache_ptr->howto == NULL) - return FALSE; + return false; BFD_ASSERT (r_type == cache_ptr->howto->type || cache_ptr->howto->type == R_X86_64_NONE); - return TRUE; + return true; } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -357,7 +357,7 @@ elf_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 296: /* sizeof(istruct elf_prstatus) on Linux/x32 */ /* pr_cursig */ @@ -393,13 +393,13 @@ elf_x86_64_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -static bfd_boolean +static bool elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 124: /* sizeof(struct elf_prpsinfo) on Linux/x32 */ elf_tdata (abfd)->core->pid @@ -431,7 +431,7 @@ elf_x86_64_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } #ifdef CORE_HEADER @@ -985,26 +985,26 @@ static const struct elf_x86_non_lazy_plt_layout elf_x32_non_lazy_ibt_plt = }; -static bfd_boolean +static bool elf64_x86_64_elf_object_p (bfd *abfd) { /* Set the right machine number for an x86-64 elf64 file. */ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x86_64); - return TRUE; + return true; } -static bfd_boolean +static bool elf32_x86_64_elf_object_p (bfd *abfd) { /* Set the right machine number for an x86-64 elf32 file. */ bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_x64_32); - return TRUE; + return true; } /* Return TRUE if the TLS access code sequence support transition from R_TYPE. */ -static bfd_boolean +static bool elf_x86_64_check_tls_transition (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -1017,12 +1017,12 @@ elf_x86_64_check_tls_transition (bfd *abfd, { unsigned int val; unsigned long r_symndx; - bfd_boolean largepic = FALSE; + bool largepic = false; struct elf_link_hash_entry *h; bfd_vma offset; struct elf_x86_link_hash_table *htab; bfd_byte *call; - bfd_boolean indirect_call; + bool indirect_call; htab = elf_x86_hash_table (info, X86_64_ELF_DATA); offset = rel->r_offset; @@ -1031,7 +1031,7 @@ elf_x86_64_check_tls_transition (bfd *abfd, case R_X86_64_TLSGD: case R_X86_64_TLSLD: if ((rel + 1) >= relend) - return FALSE; + return false; if (r_type == R_X86_64_TLSGD) { @@ -1068,7 +1068,7 @@ elf_x86_64_check_tls_transition (bfd *abfd, static const unsigned char leaq[] = { 0x66, 0x48, 0x8d, 0x3d }; if ((offset + 12) > sec->size) - return FALSE; + return false; call = contents + offset + 4; if (call[0] != 0x66 @@ -1092,20 +1092,20 @@ elf_x86_64_check_tls_transition (bfd *abfd, || call[14] != 0xd0 || !((call[10] == 0x48 && call[12] == 0xd8) || (call[10] == 0x4c && call[12] == 0xf8))) - return FALSE; - largepic = TRUE; + return false; + largepic = true; } else if (ABI_64_P (abfd)) { if (offset < 4 || memcmp (contents + offset - 4, leaq, 4) != 0) - return FALSE; + return false; } else { if (offset < 3 || memcmp (contents + offset - 3, leaq + 1, 3) != 0) - return FALSE; + return false; } indirect_call = call[2] == 0xff; } @@ -1134,10 +1134,10 @@ elf_x86_64_check_tls_transition (bfd *abfd, static const unsigned char lea[] = { 0x48, 0x8d, 0x3d }; if (offset < 3 || (offset + 9) > sec->size) - return FALSE; + return false; if (memcmp (contents + offset - 3, lea, 3) != 0) - return FALSE; + return false; call = contents + offset + 4; if (!(call[0] == 0xe8 @@ -1152,20 +1152,20 @@ elf_x86_64_check_tls_transition (bfd *abfd, || call[14] != 0xd0 || !((call[10] == 0x48 && call[12] == 0xd8) || (call[10] == 0x4c && call[12] == 0xf8))) - return FALSE; - largepic = TRUE; + return false; + largepic = true; } indirect_call = call[0] == 0xff; } r_symndx = htab->r_sym (rel[1].r_info); if (r_symndx < symtab_hdr->sh_info) - return FALSE; + return false; h = sym_hashes[r_symndx - symtab_hdr->sh_info]; if (h == NULL || !((struct elf_x86_link_hash_entry *) h)->tls_get_addr) - return FALSE; + return false; else { r_type = (ELF32_R_TYPE (rel[1].r_info) @@ -1192,21 +1192,21 @@ elf_x86_64_check_tls_transition (bfd *abfd, { /* X32 may have 0x44 REX prefix or no REX prefix. */ if (ABI_64_P (abfd)) - return FALSE; + return false; } } else { /* X32 may not have any REX prefix. */ if (ABI_64_P (abfd)) - return FALSE; + return false; if (offset < 2 || (offset + 3) > sec->size) - return FALSE; + return false; } val = bfd_get_8 (abfd, contents + offset - 2); if (val != 0x8b && val != 0x03) - return FALSE; + return false; val = bfd_get_8 (abfd, contents + offset - 1); return (val & 0xc7) == 5; @@ -1221,15 +1221,15 @@ elf_x86_64_check_tls_transition (bfd *abfd, going to be rax. */ if (offset < 3 || (offset + 4) > sec->size) - return FALSE; + return false; val = bfd_get_8 (abfd, contents + offset - 3); val &= 0xfb; if (val != 0x48 && (ABI_64_P (abfd) || val != 0x40)) - return FALSE; + return false; if (bfd_get_8 (abfd, contents + offset - 2) != 0x8d) - return FALSE; + return false; val = bfd_get_8 (abfd, contents + offset - 1); return (val & 0xc7) == 0x05; @@ -1251,14 +1251,14 @@ elf_x86_64_check_tls_transition (bfd *abfd, { prefix = 1; if (offset + 3 > sec->size) - return FALSE; + return false; } } /* Make sure that it's a call *x@tlsdesc(%rax). */ return call[prefix] == 0xff && call[1 + prefix] == 0x10; } - return FALSE; + return false; default: abort (); @@ -1268,7 +1268,7 @@ elf_x86_64_check_tls_transition (bfd *abfd, /* Return TRUE if the TLS access transition is OK or no transition will be performed. Update R_TYPE if there is a transition. */ -static bfd_boolean +static bool elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, asection *sec, bfd_byte *contents, Elf_Internal_Shdr *symtab_hdr, @@ -1278,17 +1278,17 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, const Elf_Internal_Rela *relend, struct elf_link_hash_entry *h, unsigned long r_symndx, - bfd_boolean from_relocate_section) + bool from_relocate_section) { unsigned int from_type = *r_type; unsigned int to_type = from_type; - bfd_boolean check = TRUE; + bool check = true; /* Skip TLS transition for functions. */ if (h != NULL && (h->type == STT_FUNC || h->type == STT_GNU_IFUNC)) - return TRUE; + return true; switch (from_type) { @@ -1336,12 +1336,12 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, break; default: - return TRUE; + return true; } /* Return TRUE if there is no transition. */ if (from_type == to_type) - return TRUE; + return true; /* Check if the transition can be performed. */ if (check @@ -1356,7 +1356,7 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, to = elf_x86_64_rtype_to_howto (abfd, to_type); if (from == NULL || to == NULL) - return FALSE; + return false; if (h) name = h->root.root.string; @@ -1383,18 +1383,18 @@ elf_x86_64_tls_transition (struct bfd_link_info *info, bfd *abfd, " in section `%pA' failed"), abfd, from->name, to->name, name, (uint64_t) rel->r_offset, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } *r_type = to_type; - return TRUE; + return true; } /* Rename some of the generic section flags to better document how they are used here. */ #define check_relocs_failed sec_flg0 -static bfd_boolean +static bool elf_x86_64_need_pic (struct bfd_link_info *info, bfd *input_bfd, asection *sec, struct elf_link_hash_entry *h, @@ -1463,7 +1463,7 @@ elf_x86_64_need_pic (struct bfd_link_info *info, object, pic); bfd_set_error (bfd_error_bad_value); sec->check_relocs_failed = 1; - return FALSE; + return false; } /* With the local symbol, foo, we convert @@ -1485,22 +1485,22 @@ elf_x86_64_need_pic (struct bfd_link_info *info, where binop is one of adc, add, and, cmp, or, sbb, sub, xor instructions. */ -static bfd_boolean +static bool elf_x86_64_convert_load_reloc (bfd *abfd, bfd_byte *contents, unsigned int *r_type_p, Elf_Internal_Rela *irel, struct elf_link_hash_entry *h, - bfd_boolean *converted, + bool *converted, struct bfd_link_info *link_info) { struct elf_x86_link_hash_table *htab; - bfd_boolean is_pic; - bfd_boolean no_overflow; - bfd_boolean relocx; - bfd_boolean to_reloc_pc32; - bfd_boolean abs_symbol; - bfd_boolean local_ref; + bool is_pic; + bool no_overflow; + bool relocx; + bool to_reloc_pc32; + bool abs_symbol; + bool local_ref; asection *tsec; bfd_signed_vma raddend; unsigned int opcode; @@ -1511,12 +1511,12 @@ elf_x86_64_convert_load_reloc (bfd *abfd, bfd_vma abs_relocation; if (roff < (r_type == R_X86_64_REX_GOTPCRELX ? 3 : 2)) - return TRUE; + return true; raddend = irel->r_addend; /* Addend for 32-bit PC-relative relocation must be -4. */ if (raddend != -4) - return TRUE; + return true; htab = elf_x86_hash_table (link_info, X86_64_ELF_DATA); is_pic = bfd_link_pic (link_info); @@ -1538,7 +1538,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd, for call, jmp or one of adc, add, and, cmp, or, sbb, sub, test, xor instructions. */ if (!relocx) - return TRUE; + return true; } /* We convert only to R_X86_64_PC32: @@ -1552,7 +1552,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd, || no_overflow || is_pic); - abs_symbol = FALSE; + abs_symbol = false; abs_relocation = 0; /* Get the symbol referred to by the reloc. */ @@ -1563,13 +1563,13 @@ elf_x86_64_convert_load_reloc (bfd *abfd, /* Skip relocation against undefined symbols. */ if (isym->st_shndx == SHN_UNDEF) - return TRUE; + return true; - local_ref = TRUE; + local_ref = true; if (isym->st_shndx == SHN_ABS) { tsec = bfd_abs_section_ptr; - abs_symbol = TRUE; + abs_symbol = true; abs_relocation = isym->st_value; } else if (isym->st_shndx == SHN_COMMON) @@ -1604,20 +1604,20 @@ elf_x86_64_convert_load_reloc (bfd *abfd, /* Skip for branch instructions since R_X86_64_PC32 may overflow. */ if (no_overflow) - return TRUE; + return true; } else if (relocx) { /* For non-branch instructions, we can convert to R_X86_64_32/R_X86_64_32S since we know if there is a REX byte. */ - to_reloc_pc32 = FALSE; + to_reloc_pc32 = false; } /* Since we don't know the current PC when PIC is true, we can't convert to R_X86_64_PC32. */ if (to_reloc_pc32 && is_pic) - return TRUE; + return true; goto convert; } @@ -1647,23 +1647,23 @@ elf_x86_64_convert_load_reloc (bfd *abfd, { /* Skip since R_X86_64_32/R_X86_64_32S may overflow. */ if (no_overflow) - return TRUE; + return true; goto convert; } tsec = h->root.u.def.section; } else - return TRUE; + return true; } /* Don't convert GOTPCREL relocation against large section. */ if (elf_section_data (tsec) != NULL && (elf_section_flags (tsec) & SHF_X86_64_LARGE) != 0) - return TRUE; + return true; /* Skip since R_X86_64_PC32/R_X86_64_32/R_X86_64_32S may overflow. */ if (no_overflow) - return TRUE; + return true; convert: if (opcode == 0xff) @@ -1732,7 +1732,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd, if (opcode == 0x8b) { if (abs_symbol && local_ref && relocx) - to_reloc_pc32 = FALSE; + to_reloc_pc32 = false; if (to_reloc_pc32) { @@ -1771,7 +1771,7 @@ elf_x86_64_convert_load_reloc (bfd *abfd, { /* R_X86_64_PC32 isn't supported. */ if (to_reloc_pc32) - return TRUE; + return true; modrm = bfd_get_8 (abfd, contents + roff - 1); if (opcode == 0x85) @@ -1800,12 +1800,12 @@ elf_x86_64_convert_load_reloc (bfd *abfd, if (r_type == R_X86_64_32S) { if ((abs_relocation + 0x80000000) > 0xffffffff) - return TRUE; + return true; } else { if (abs_relocation > 0xffffffff) - return TRUE; + return true; } } @@ -1829,16 +1829,16 @@ elf_x86_64_convert_load_reloc (bfd *abfd, irel->r_info = htab->r_info (r_symndx, r_type | R_X86_64_converted_reloc_bit); - *converted = TRUE; + *converted = true; - return TRUE; + return true; } /* Look through the relocs for a section during the first phase, and calculate needed space in the global offset table, procedure linkage table, and dynamic reloc sections. */ -static bfd_boolean +static bool elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) @@ -1850,16 +1850,16 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel_end; asection *sreloc; bfd_byte *contents; - bfd_boolean converted; + bool converted; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = elf_x86_hash_table (info, X86_64_ELF_DATA); if (htab == NULL) { sec->check_relocs_failed = 1; - return FALSE; + return false; } BFD_ASSERT (is_x86_elf (abfd, htab)); @@ -1870,13 +1870,13 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, else if (!bfd_malloc_and_get_section (abfd, sec, &contents)) { sec->check_relocs_failed = 1; - return FALSE; + return false; } symtab_hdr = &elf_symtab_hdr (abfd); sym_hashes = elf_sym_hashes (abfd); - converted = FALSE; + converted = false; sreloc = NULL; @@ -1889,9 +1889,9 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, struct elf_x86_link_hash_entry *eh; Elf_Internal_Sym *isym; const char *name; - bfd_boolean size_reloc; - bfd_boolean converted_reloc; - bfd_boolean no_dynreloc; + bool size_reloc; + bool converted_reloc; + bool no_dynreloc; r_symndx = htab->r_sym (rel->r_info); r_type = ELF32_R_TYPE (rel->r_info); @@ -1916,7 +1916,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { h = _bfd_elf_x86_get_local_sym_hash (htab, abfd, rel, - TRUE); + true); if (h == NULL) goto error_return; @@ -1980,7 +1980,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, h->ref_regular = 1; } - converted_reloc = FALSE; + converted_reloc = false; if ((r_type == R_X86_64_GOTPCREL || r_type == R_X86_64_GOTPCRELX || r_type == R_X86_64_REX_GOTPCRELX) @@ -1993,22 +1993,22 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, goto error_return; if (converted_reloc) - converted = TRUE; + converted = true; } if (!_bfd_elf_x86_valid_reloc_p (sec, info, htab, rel, h, isym, symtab_hdr, &no_dynreloc)) - return FALSE; + return false; if (! elf_x86_64_tls_transition (info, abfd, sec, contents, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, - rel, rel_end, h, r_symndx, FALSE)) + rel, rel_end, h, r_symndx, false)) goto error_return; /* Check if _GLOBAL_OFFSET_TABLE_ is referenced. */ if (h == htab->elf.hgot) - htab->got_referenced = TRUE; + htab->got_referenced = true; eh = (struct elf_x86_link_hash_entry *) h; switch (r_type) @@ -2178,7 +2178,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_X86_64_SIZE32: case R_X86_64_SIZE64: - size_reloc = TRUE; + size_reloc = true; goto do_size; case R_X86_64_32: @@ -2220,7 +2220,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, && (bfd_link_executable (info) || h->type == STT_GNU_IFUNC)) { - bfd_boolean func_pointer_ref = FALSE; + bool func_pointer_ref = false; if (r_type == R_X86_64_PC32) { @@ -2252,7 +2252,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, || (!ABI_64_P (abfd) && (r_type == R_X86_64_32 || r_type == R_X86_64_32S)))) - func_pointer_ref = TRUE; + func_pointer_ref = true; } if (!func_pointer_ref) @@ -2274,10 +2274,10 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - size_reloc = FALSE; + size_reloc = false; do_size: if (!no_dynreloc - && NEED_DYNAMIC_RELOCATION_P (info, TRUE, h, sec, r_type, + && NEED_DYNAMIC_RELOCATION_P (info, true, h, sec, r_type, htab->pointer_r_type)) { struct elf_dyn_relocs *p; @@ -2290,7 +2290,7 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, { sreloc = _bfd_elf_make_dynamic_reloc_section (sec, htab->elf.dynobj, ABI_64_P (abfd) ? 3 : 2, - abfd, /*rela?*/ TRUE); + abfd, /*rela?*/ true); if (sreloc == NULL) goto error_return; @@ -2381,13 +2381,13 @@ elf_x86_64_check_relocs (bfd *abfd, struct bfd_link_info *info, if (elf_section_data (sec)->relocs != relocs && converted) elf_section_data (sec)->relocs = (Elf_Internal_Rela *) relocs; - return TRUE; + return true; error_return: if (elf_section_data (sec)->this_hdr.contents != contents) free (contents); sec->check_relocs_failed = 1; - return FALSE; + return false; } /* Return the relocation value for @tpoff relocation @@ -2430,20 +2430,20 @@ elf_x86_64_relocate_section (bfd *output_bfd, Elf_Internal_Rela *wrel; Elf_Internal_Rela *relend; unsigned int plt_entry_size; - bfd_boolean status; + bool status; /* Skip if check_relocs failed. */ if (input_section->check_relocs_failed) - return FALSE; + return false; htab = elf_x86_hash_table (info, X86_64_ELF_DATA); if (htab == NULL) - return FALSE; + return false; if (!is_x86_elf (input_bfd, htab)) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } plt_entry_size = htab->plt.plt_entry_size; @@ -2454,7 +2454,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, _bfd_x86_elf_set_tls_module_base (info); - status = TRUE; + status = true; rel = wrel = relocs; relend = relocs + input_section->reloc_count; for (; rel < relend; wrel++, rel++) @@ -2468,16 +2468,16 @@ elf_x86_64_relocate_section (bfd *output_bfd, asection *sec; bfd_vma off, offplt, plt_offset; bfd_vma relocation; - bfd_boolean unresolved_reloc; + bool unresolved_reloc; bfd_reloc_status_type r; int tls_type; asection *base_got, *resolved_plt; bfd_vma st_size; - bfd_boolean resolved_to_zero; - bfd_boolean relative_reloc; - bfd_boolean converted_reloc; - bfd_boolean need_copy_reloc_in_pie; - bfd_boolean no_copyreloc_p; + bool resolved_to_zero; + bool relative_reloc; + bool converted_reloc; + bool need_copy_reloc_in_pie; + bool no_copyreloc_p; r_type = ELF32_R_TYPE (rel->r_info); if (r_type == (int) R_X86_64_GNU_VTINHERIT @@ -2503,7 +2503,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -2518,7 +2518,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) { h = _bfd_elf_x86_get_local_sym_hash (htab, input_bfd, - rel, FALSE); + rel, false); if (h == NULL) abort (); @@ -2529,8 +2529,8 @@ elf_x86_64_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2724,7 +2724,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, "symbol `%s' isn't supported"), input_bfd, howto->name, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; case R_X86_64_32S: if (bfd_link_pic (info)) @@ -2750,7 +2750,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, "symbol `%s' has non-zero addend: %" PRId64), input_bfd, howto->name, name, (int64_t) rel->r_addend); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Generate dynamic relcoation only when there is a @@ -2851,7 +2851,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, if (htab->elf.sgot == NULL) abort (); - relative_reloc = FALSE; + relative_reloc = false; if (h != NULL) { off = h->got.offset; @@ -2894,12 +2894,12 @@ elf_x86_64_relocate_section (bfd *output_bfd, /* If this symbol isn't dynamic in PIC, generate R_X86_64_RELATIVE here. */ eh->no_finish_dynamic_symbol = 1; - relative_reloc = TRUE; + relative_reloc = true; } } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2927,7 +2927,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, && (r_type == R_X86_64_GOTPCREL || r_type == R_X86_64_GOTPCRELX || r_type == R_X86_64_REX_GOTPCRELX))) - relative_reloc = TRUE; + relative_reloc = true; } } @@ -3006,7 +3006,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, " `%s' can not be used when making a shared object"), input_bfd, v, h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else if (!bfd_link_executable (info) && !SYMBOL_REFERENCES_LOCAL_P (info, h) @@ -3022,7 +3022,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, h->type == STT_FUNC ? "function" : "data", h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -3040,7 +3040,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, /* Use global offset table as symbol value. */ relocation = htab->elf.sgotplt->output_section->vma + htab->elf.sgotplt->output_offset; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_X86_64_PLTOFF64: @@ -3072,7 +3072,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, relocation = (resolved_plt->output_section->vma + resolved_plt->output_offset + plt_offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; } relocation -= htab->elf.sgotplt->output_section->vma @@ -3123,7 +3123,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, relocation = (resolved_plt->output_section->vma + resolved_plt->output_offset + plt_offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_X86_64_SIZE32: @@ -3164,7 +3164,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, && !(h->root.u.def.section->flags & SEC_CODE)))) || bfd_link_dll (info))) { - bfd_boolean fail = FALSE; + bool fail = false; if (SYMBOL_REFERENCES_LOCAL_P (info, h)) { /* Symbol is referenced locally. Make sure it is @@ -3177,7 +3177,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, from non-code sections. */ if (h->type == STT_FUNC && (sec->flags & SEC_CODE) != 0) - fail = TRUE; + fail = true; } else if (no_copyreloc_p || bfd_link_dll (info)) { @@ -3229,26 +3229,26 @@ elf_x86_64_relocate_section (bfd *output_bfd, if (GENERATE_DYNAMIC_RELOCATION_P (info, eh, r_type, sec, need_copy_reloc_in_pie, - resolved_to_zero, FALSE)) + resolved_to_zero, false)) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate; + bool skip, relocate; asection *sreloc; const char *relative_reloc_name = NULL; /* When generating a shared object, these relocations are copied into the output file to be resolved at run time. */ - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -3270,7 +3270,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, || (r_type == R_X86_64_32 && htab->params->no_reloc_overflow_check)) { - relocate = TRUE; + relocate = true; outrel.r_info = htab->r_info (0, R_X86_64_RELATIVE); outrel.r_addend = relocation + rel->r_addend; relative_reloc_name = "R_X86_64_RELATIVE"; @@ -3278,7 +3278,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, else if (r_type == R_X86_64_64 && !ABI_64_P (output_bfd)) { - relocate = TRUE; + relocate = true; outrel.r_info = htab->r_info (0, R_X86_64_RELATIVE64); outrel.r_addend = relocation + rel->r_addend; @@ -3303,7 +3303,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, howto->name, name, (uint64_t) rel->r_offset, input_section); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } else @@ -3315,7 +3315,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -3382,8 +3382,8 @@ elf_x86_64_relocate_section (bfd *output_bfd, input_section, contents, symtab_hdr, sym_hashes, &r_type_tls, tls_type, rel, - relend, h, r_symndx, TRUE)) - return FALSE; + relend, h, r_symndx, true)) + return false; if (r_type_tls == R_X86_64_TPOFF32) { @@ -3438,7 +3438,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, info->callbacks->einfo (_("%F%P: corrupt input: %pB\n"), input_bfd); - return FALSE; + return false; } memcpy (contents + roff - 3, "\x64\x48\x8b\x04\x25\0\0\0\0\x48\x8d\x80" @@ -3636,7 +3636,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, continue; } else - BFD_ASSERT (FALSE); + BFD_ASSERT (false); } if (htab->elf.sgot == NULL) @@ -3748,7 +3748,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, else relocation = htab->elf.sgot->output_section->vma + htab->elf.sgot->output_offset + off; - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -3901,7 +3901,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, continue; } else - BFD_ASSERT (FALSE); + BFD_ASSERT (false); } break; @@ -3910,8 +3910,8 @@ elf_x86_64_relocate_section (bfd *output_bfd, input_section, contents, symtab_hdr, sym_hashes, &r_type, GOT_UNKNOWN, rel, - relend, h, r_symndx, TRUE)) - return FALSE; + relend, h, r_symndx, true)) + return false; if (r_type != R_X86_64_TLSLD) { @@ -4031,7 +4031,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, } relocation = htab->elf.sgot->output_section->vma + htab->elf.sgot->output_offset + off; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_X86_64_DTPOFF32: @@ -4088,7 +4088,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, (uint64_t) rel->r_offset, howto->name, h->root.root.string); - return FALSE; + return false; } } @@ -4110,7 +4110,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -4125,7 +4125,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, (_(" failed to convert GOTPCREL relocation against " "'%s'; relink with --no-relax\n"), name); - status = FALSE; + status = false; continue; } (*info->callbacks->reloc_overflow) @@ -4139,7 +4139,7 @@ elf_x86_64_relocate_section (bfd *output_bfd, (_("%pB(%pA+%#" PRIx64 "): reloc against `%s': error %d"), input_bfd, input_section, (uint64_t) rel->r_offset, name, (int) r); - return FALSE; + return false; } } @@ -4173,20 +4173,20 @@ elf_x86_64_relocate_section (bfd *output_bfd, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym) { struct elf_x86_link_hash_table *htab; - bfd_boolean use_plt_second; + bool use_plt_second; struct elf_x86_link_hash_entry *eh; - bfd_boolean local_undefweak; + bool local_undefweak; htab = elf_x86_hash_table (info, X86_64_ELF_DATA); if (htab == NULL) - return FALSE; + return false; /* Use the second PLT section only if there is .plt section. */ use_plt_second = htab->elf.splt != NULL && htab->plt_second != NULL; @@ -4367,7 +4367,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, { bfd_vma got_offset, plt_offset; asection *plt, *got; - bfd_boolean got_after_plt; + bool got_after_plt; int32_t got_pcrel_offset; /* Set the entry in the GOT procedure linkage table. */ @@ -4515,14 +4515,14 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, + plt->output_offset + plt_offset), htab->elf.sgot->contents + h->got.offset); - return TRUE; + return true; } } else if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL_P (info, h)) { if (!SYMBOL_DEFINED_NON_SHARED_P (h)) - return FALSE; + return false; BFD_ASSERT((h->got.offset & 1) != 0); rela.r_info = htab->r_info (0, R_X86_64_RELATIVE); rela.r_addend = (h->root.u.def.value @@ -4568,7 +4568,7 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd, elf_append_rela (output_bfd, s, &rela); } - return TRUE; + return true; } /* Finish up local dynamic symbol handling. We set the contents of @@ -4590,7 +4590,7 @@ elf_x86_64_finish_local_dynamic_symbol (void **slot, void *inf) here since undefined weak symbol may not be dynamic and may not be called for elf_x86_64_finish_dynamic_symbol. */ -static bfd_boolean +static bool elf_x86_64_pie_finish_undefweak_symbol (struct bfd_hash_entry *bh, void *inf) { @@ -4599,7 +4599,7 @@ elf_x86_64_pie_finish_undefweak_symbol (struct bfd_hash_entry *bh, if (h->root.type != bfd_link_hash_undefweak || h->dynindx != -1) - return TRUE; + return true; return elf_x86_64_finish_dynamic_symbol (info->output_bfd, info, h, NULL); @@ -4656,7 +4656,7 @@ elf_x86_64_reloc_type_class (const struct bfd_link_info *info, /* Finish up the dynamic sections. */ -static bfd_boolean +static bool elf_x86_64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -4664,10 +4664,10 @@ elf_x86_64_finish_dynamic_sections (bfd *output_bfd, htab = _bfd_x86_elf_finish_dynamic_sections (output_bfd, info); if (htab == NULL) - return FALSE; + return false; if (! htab->elf.dynamic_sections_created) - return TRUE; + return true; if (htab->elf.splt && htab->elf.splt->size > 0) { @@ -4752,7 +4752,7 @@ elf_x86_64_finish_dynamic_sections (bfd *output_bfd, elf_x86_64_pie_finish_undefweak_symbol, info); - return TRUE; + return true; } /* Fill PLT/GOT entries and allocate dynamic relocations for local @@ -4760,7 +4760,7 @@ elf_x86_64_finish_dynamic_sections (bfd *output_bfd, It has to be done before elf_link_sort_relocs is called so that dynamic relocations are properly sorted. */ -static bfd_boolean +static bool elf_x86_64_output_arch_local_syms (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, @@ -4773,14 +4773,14 @@ elf_x86_64_output_arch_local_syms struct elf_x86_link_hash_table *htab = elf_x86_hash_table (info, X86_64_ELF_DATA); if (htab == NULL) - return FALSE; + return false; /* Fill PLT and GOT entries for local STT_GNU_IFUNC symbols. */ htab_traverse (htab->loc_hash_table, elf_x86_64_finish_local_dynamic_symbol, info); - return TRUE; + return true; } /* Similar to _bfd_elf_get_synthetic_symtab. Support PLTs with all @@ -4963,24 +4963,24 @@ elf_x86_64_get_synthetic_symtab (bfd *abfd, /* Handle an x86-64 specific section when reading an object file. This is called when elfcode.h finds a section with an unknown type. */ -static bfd_boolean +static bool elf_x86_64_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, int shindex) { if (hdr->sh_type != SHT_X86_64_UNWIND) - return FALSE; + return false; if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; - return TRUE; + return true; } /* Hook called by the linker routine which adds symbols from an object file. We use it to put SHN_X86_64_LCOMMON items in .lbss, instead of .bss. */ -static bfd_boolean +static bool elf_x86_64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, @@ -5003,31 +5003,31 @@ elf_x86_64_add_symbol_hook (bfd *abfd, | SEC_IS_COMMON | SEC_LINKER_CREATED)); if (lcomm == NULL) - return FALSE; + return false; elf_section_flags (lcomm) |= SHF_X86_64_LARGE; } *secp = lcomm; *valp = sym->st_size; - return TRUE; + return true; } - return TRUE; + return true; } /* Given a BFD section, try to locate the corresponding ELF section index. */ -static bfd_boolean +static bool elf_x86_64_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *index_return) { if (sec == &_bfd_elf_large_com_section) { *index_return = SHN_X86_64_LCOMMON; - return TRUE; + return true; } - return FALSE; + return false; } /* Process a symbol. */ @@ -5049,7 +5049,7 @@ elf_x86_64_symbol_processing (bfd *abfd ATTRIBUTE_UNUSED, } } -static bfd_boolean +static bool elf_x86_64_common_definition (Elf_Internal_Sym *sym) { return (sym->st_shndx == SHN_COMMON @@ -5074,12 +5074,12 @@ elf_x86_64_common_section (asection *sec) return &_bfd_elf_large_com_section; } -static bfd_boolean +static bool elf_x86_64_merge_symbol (struct elf_link_hash_entry *h, const Elf_Internal_Sym *sym, asection **psec, - bfd_boolean newdef, - bfd_boolean olddef, + bool newdef, + bool olddef, bfd *oldbfd, const asection *oldsec) { @@ -5104,7 +5104,7 @@ elf_x86_64_merge_symbol (struct elf_link_hash_entry *h, *psec = bfd_com_section_ptr; } - return TRUE; + return true; } static int @@ -5131,7 +5131,7 @@ elf_x86_64_additional_program_headers (bfd *abfd, /* Return TRUE iff relocations for INPUT are compatible with OUTPUT. */ -static bfd_boolean +static bool elf_x86_64_relocs_compatible (const bfd_target *input, const bfd_target *output) { @@ -5355,7 +5355,7 @@ elf_x86_64_special_sections[]= #undef elf_backend_strtab_flags #define elf_backend_strtab_flags SHF_STRINGS -static bfd_boolean +static bool elf64_x86_64_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, const Elf_Internal_Shdr *isection ATTRIBUTE_UNUSED, @@ -5363,7 +5363,7 @@ elf64_x86_64_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUS { /* PR 19938: FIXME: Need to add code for setting the sh_info and sh_link fields of Solaris specific section types. */ - return FALSE; + return false; } #undef elf_backend_copy_special_section_fields @@ -5381,12 +5381,12 @@ elf64_x86_64_copy_solaris_special_section_fields (const bfd *ibfd ATTRIBUTE_UNUS /* Intel L1OM support. */ -static bfd_boolean +static bool elf64_l1om_elf_object_p (bfd *abfd) { /* Set the right machine number for an L1OM elf64 file. */ bfd_default_set_arch_mach (abfd, bfd_arch_l1om, bfd_mach_l1om); - return TRUE; + return true; } #undef TARGET_LITTLE_SYM @@ -5441,12 +5441,12 @@ elf64_l1om_elf_object_p (bfd *abfd) /* Intel K1OM support. */ -static bfd_boolean +static bool elf64_k1om_elf_object_p (bfd *abfd) { /* Set the right machine number for an K1OM elf64 file. */ bfd_default_set_arch_mach (abfd, bfd_arch_k1om, bfd_mach_k1om); - return TRUE; + return true; } #undef TARGET_LITTLE_SYM diff --git a/bfd/elfcode.h b/bfd/elfcode.h index 4e99fcc6b9..7eb27c2e16 100644 --- a/bfd/elfcode.h +++ b/bfd/elfcode.h @@ -170,7 +170,7 @@ static void elf_debug_file (Elf_Internal_Ehdr *); /* Translate an ELF symbol in external format into an ELF symbol in internal format. */ -bfd_boolean +bool elf_swap_symbol_in (bfd *abfd, const void *psrc, const void *pshn, @@ -192,13 +192,13 @@ elf_swap_symbol_in (bfd *abfd, if (dst->st_shndx == (SHN_XINDEX & 0xffff)) { if (shndx == NULL) - return FALSE; + return false; dst->st_shndx = H_GET_32 (abfd, shndx->est_shndx); } else if (dst->st_shndx >= (SHN_LORESERVE & 0xffff)) dst->st_shndx += SHN_LORESERVE - (SHN_LORESERVE & 0xffff); dst->st_target_internal = 0; - return TRUE; + return true; } /* Translate an ELF symbol in internal format into an ELF symbol in external @@ -483,7 +483,7 @@ elf_swap_dyn_out (bfd *abfd, First we validate the file by reading in the ELF header and checking the magic number. */ -static inline bfd_boolean +static inline bool elf_file_p (Elf_External_Ehdr *x_ehdrp) { return ((x_ehdrp->e_ident[EI_MAG0] == ELFMAG0) @@ -885,7 +885,7 @@ void elf_write_relocs (bfd *abfd, asection *sec, void *data) { const struct elf_backend_data * const bed = get_elf_backend_data (abfd); - bfd_boolean *failedp = (bfd_boolean *) data; + bool *failedp = (bool *) data; Elf_Internal_Shdr *rela_hdr; bfd_vma addr_offset; void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *); @@ -925,7 +925,7 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data) || (rela_hdr->contents = bfd_alloc (abfd, amt)) == NULL) { bfd_set_error (bfd_error_no_memory); - *failedp = TRUE; + *failedp = true; return; } @@ -976,7 +976,7 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data) n = _bfd_elf_symbol_from_bfd_symbol (abfd, &sym); if (n < 0) { - *failedp = TRUE; + *failedp = true; return; } last_sym_idx = n; @@ -986,13 +986,13 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data) && (*ptr->sym_ptr_ptr)->the_bfd->xvec != abfd->xvec && ! _bfd_elf_validate_reloc (abfd, ptr)) { - *failedp = TRUE; + *failedp = true; return; } if (ptr->howto == NULL) { - *failedp = TRUE; + *failedp = true; return; } @@ -1005,7 +1005,7 @@ elf_write_relocs (bfd *abfd, asection *sec, void *data) if (elf_section_data (sec)->has_secondary_relocs && !bed->write_secondary_relocs (abfd, sec)) { - *failedp = TRUE; + *failedp = true; return; } } @@ -1032,7 +1032,7 @@ elf_write_out_phdrs (bfd *abfd, /* Write out the section headers and the ELF file header. */ -bfd_boolean +bool elf_write_shdrs_and_ehdr (bfd *abfd) { Elf_External_Ehdr x_ehdr; /* Elf file header, external form */ @@ -1054,7 +1054,7 @@ elf_write_shdrs_and_ehdr (bfd *abfd) amt = sizeof (x_ehdr); if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 || bfd_bwrite (&x_ehdr, amt, abfd) != amt) - return FALSE; + return false; /* Some fields in the first section header handle overflow of ehdr fields. */ @@ -1069,11 +1069,11 @@ elf_write_shdrs_and_ehdr (bfd *abfd) if (_bfd_mul_overflow (i_ehdrp->e_shnum, sizeof (*x_shdrp), &amt)) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } x_shdrp = (Elf_External_Shdr *) bfd_alloc (abfd, amt); if (!x_shdrp) - return FALSE; + return false; for (count = 0; count < i_ehdrp->e_shnum; i_shdrp++, count++) { @@ -1085,14 +1085,14 @@ elf_write_shdrs_and_ehdr (bfd *abfd) amt = (bfd_size_type) i_ehdrp->e_shnum * sizeof (*x_shdrp); if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0 || bfd_bwrite (x_shdrp, amt, abfd) != amt) - return FALSE; + return false; /* need to dump the string table too... */ - return TRUE; + return true; } -bfd_boolean +bool elf_checksum_contents (bfd *abfd, void (*process) (const void *, size_t, void *), void *arg) @@ -1164,11 +1164,11 @@ elf_checksum_contents (bfd *abfd, } } - return TRUE; + return true; } long -elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) +elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bool dynamic) { Elf_Internal_Shdr *hdr; Elf_Internal_Shdr *verhdr; @@ -1210,7 +1210,7 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) || (elf_dynverref (abfd) != 0 && elf_tdata (abfd)->verref == NULL)) { - if (!_bfd_elf_slurp_version_tables (abfd, FALSE)) + if (!_bfd_elf_slurp_version_tables (abfd, false)) return -1; } } @@ -1438,14 +1438,14 @@ elf_slurp_symbol_table (bfd *abfd, asymbol **symptrs, bfd_boolean dynamic) /* Read relocations for ASECT from REL_HDR. There are RELOC_COUNT of them. */ -static bfd_boolean +static bool elf_slurp_reloc_table_from_section (bfd *abfd, asection *asect, Elf_Internal_Shdr *rel_hdr, bfd_size_type reloc_count, arelent *relents, asymbol **symbols, - bfd_boolean dynamic) + bool dynamic) { const struct elf_backend_data * const ebd = get_elf_backend_data (abfd); void *allocated = NULL; @@ -1456,10 +1456,10 @@ elf_slurp_reloc_table_from_section (bfd *abfd, unsigned int symcount; if (bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0) - return FALSE; + return false; allocated = _bfd_malloc_and_read (abfd, rel_hdr->sh_size, rel_hdr->sh_size); if (allocated == NULL) - return FALSE; + return false; native_relocs = (bfd_byte *) allocated; @@ -1476,7 +1476,7 @@ elf_slurp_reloc_table_from_section (bfd *abfd, i < reloc_count; i++, relent++, native_relocs += entsize) { - bfd_boolean res; + bool res; Elf_Internal_Rela rela; if (entsize == sizeof (Elf_External_Rela)) @@ -1529,20 +1529,20 @@ elf_slurp_reloc_table_from_section (bfd *abfd, } free (allocated); - return TRUE; + return true; error_return: free (allocated); - return FALSE; + return false; } /* Read in and swap the external relocs. */ -bfd_boolean +bool elf_slurp_reloc_table (bfd *abfd, asection *asect, asymbol **symbols, - bfd_boolean dynamic) + bool dynamic) { const struct elf_backend_data * const bed = get_elf_backend_data (abfd); struct bfd_elf_section_data * const d = elf_section_data (asect); @@ -1554,13 +1554,13 @@ elf_slurp_reloc_table (bfd *abfd, size_t amt; if (asect->relocation != NULL) - return TRUE; + return true; if (! dynamic) { if ((asect->flags & SEC_RELOC) == 0 || asect->reloc_count == 0) - return TRUE; + return true; rel_hdr = d->rel.hdr; reloc_count = rel_hdr ? NUM_SHDR_ENTRIES (rel_hdr) : 0; @@ -1569,7 +1569,7 @@ elf_slurp_reloc_table (bfd *abfd, /* PR 17512: file: 0b4f81b7. */ if (asect->reloc_count != reloc_count + reloc_count2) - return FALSE; + return false; BFD_ASSERT ((rel_hdr && asect->rel_filepos == rel_hdr->sh_offset) || (rel_hdr2 && asect->rel_filepos == rel_hdr2->sh_offset)); @@ -1581,7 +1581,7 @@ elf_slurp_reloc_table (bfd *abfd, dynamic symbol table, and in that case bfd_section_from_shdr in elf.c does not update the RELOC_COUNT. */ if (asect->size == 0) - return TRUE; + return true; rel_hdr = &d->this_hdr; reloc_count = NUM_SHDR_ENTRIES (rel_hdr); @@ -1592,31 +1592,31 @@ elf_slurp_reloc_table (bfd *abfd, if (_bfd_mul_overflow (reloc_count + reloc_count2, sizeof (arelent), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } relents = (arelent *) bfd_alloc (abfd, amt); if (relents == NULL) - return FALSE; + return false; if (rel_hdr && !elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count, relents, symbols, dynamic)) - return FALSE; + return false; if (rel_hdr2 && !elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr2, reloc_count2, relents + reloc_count, symbols, dynamic)) - return FALSE; + return false; if (!bed->slurp_secondary_relocs (abfd, asect, symbols, dynamic)) - return FALSE; + return false; asect->relocation = relents; - return TRUE; + return true; } #if DEBUG & 2 @@ -1927,7 +1927,7 @@ NAME(_bfd_elf,bfd_from_remote_memory) nbfd->origin = 0; nbfd->direction = read_direction; nbfd->mtime = time (NULL); - nbfd->mtime_set = TRUE; + nbfd->mtime_set = true; if (loadbasep) *loadbasep = loadbase; diff --git a/bfd/elfcore.h b/bfd/elfcore.h index 4e6383415f..c0cdceba42 100644 --- a/bfd/elfcore.h +++ b/bfd/elfcore.h @@ -36,7 +36,7 @@ elf_core_file_pid (bfd *abfd) return elf_tdata (abfd)->core->pid; } -bfd_boolean +bool elf_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) { char* corename; @@ -46,7 +46,7 @@ elf_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) if (core_bfd->xvec != exec_bfd->xvec) { bfd_set_error (bfd_error_system_call); - return FALSE; + return false; } /* If both BFDs have identical build-ids, then they match. */ @@ -55,7 +55,7 @@ elf_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) && core_bfd->build_id->size == exec_bfd->build_id->size && memcmp (core_bfd->build_id->data, exec_bfd->build_id->data, core_bfd->build_id->size) == 0) - return TRUE; + return true; /* See if the name in the corefile matches the executable name. */ corename = elf_tdata (core_bfd)->core->program; @@ -66,10 +66,10 @@ elf_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) execname = execname ? execname + 1 : bfd_get_filename (exec_bfd); if (strcmp (execname, corename) != 0) - return FALSE; + return false; } - return TRUE; + return true; } /* Core files are simply standard ELF formatted files that partition @@ -326,7 +326,7 @@ elf_core_file_p (bfd *abfd) OFFSET is the file offset to a PT_LOAD segment that may contain the build-id note. Returns TRUE upon success, FALSE otherwise. */ -bfd_boolean +bool NAME(_bfd_elf, core_find_build_id) (bfd *abfd, bfd_vma offset) @@ -418,7 +418,7 @@ NAME(_bfd_elf, core_find_build_id) goto fail; if (abfd->build_id != NULL) - return TRUE; + return true; } } @@ -429,5 +429,5 @@ NAME(_bfd_elf, core_find_build_id) wrong: bfd_set_error (bfd_error_wrong_format); fail: - return FALSE; + return false; } diff --git a/bfd/elflink.c b/bfd/elflink.c index c7102e691f..ce1407fa2d 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -45,7 +45,7 @@ struct elf_info_failed { struct bfd_link_info *info; - bfd_boolean failed; + bool failed; }; /* This structure is used to pass information to @@ -58,16 +58,16 @@ struct elf_find_verdep_info /* The number of dependencies. */ unsigned int vers; /* Whether we had a failure. */ - bfd_boolean failed; + bool failed; }; -static bfd_boolean _bfd_elf_fix_symbol_flags +static bool _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *, struct elf_info_failed *); asection * _bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie, unsigned long r_symndx, - bfd_boolean discard) + bool discard) { if (r_symndx >= cookie->locsymcount || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL) @@ -117,7 +117,7 @@ _bfd_elf_define_linkage_sym (bfd *abfd, struct bfd_link_hash_entry *bh; const struct elf_backend_data *bed; - h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE, FALSE); + h = elf_link_hash_lookup (elf_hash_table (info), name, false, false, false); if (h != NULL) { /* Zap symbol defined in an as-needed lib that wasn't linked. @@ -132,7 +132,7 @@ _bfd_elf_define_linkage_sym (bfd *abfd, bed = get_elf_backend_data (abfd); if (!_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, - sec, 0, NULL, FALSE, bed->collect, + sec, 0, NULL, false, bed->collect, &bh)) return NULL; h = (struct elf_link_hash_entry *) bh; @@ -144,11 +144,11 @@ _bfd_elf_define_linkage_sym (bfd *abfd, if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL) h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN; - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); return h; } -bfd_boolean +bool _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -159,7 +159,7 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ if (htab->sgot != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; @@ -170,13 +170,13 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->srelgot = s; s = bfd_make_section_anyway_with_flags (abfd, ".got", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgot = s; if (bed->want_got_plt) @@ -184,7 +184,7 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgotplt = s; } @@ -201,14 +201,14 @@ _bfd_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; } - return TRUE; + return true; } /* Create a strtab to hold the dynamic symbol names. */ -static bfd_boolean +static bool _bfd_elf_link_create_dynstrtab (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_table *hash_table; @@ -243,9 +243,9 @@ _bfd_elf_link_create_dynstrtab (bfd *abfd, struct bfd_link_info *info) { hash_table->dynstr = _bfd_elf_strtab_init (); if (hash_table->dynstr == NULL) - return FALSE; + return false; } - return TRUE; + return true; } /* Create some sections which will be filled in with dynamic linking @@ -255,7 +255,7 @@ _bfd_elf_link_create_dynstrtab (bfd *abfd, struct bfd_link_info *info) addresses are assigned to the output sections. We work out the actual contents and size of these sections later. */ -bfd_boolean +bool _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -264,13 +264,13 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) struct elf_link_hash_entry *h; if (! is_elf_hash_table (info->hash)) - return FALSE; + return false; if (elf_hash_table (info)->dynamic_sections_created) - return TRUE; + return true; if (!_bfd_elf_link_create_dynstrtab (abfd, info)) - return FALSE; + return false; abfd = elf_hash_table (info)->dynobj; bed = get_elf_backend_data (abfd); @@ -284,7 +284,7 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".interp", flags | SEC_READONLY); if (s == NULL) - return FALSE; + return false; } /* Create sections to hold version informations. These are removed @@ -293,36 +293,36 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".gnu.version", flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, 1)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".gnu.version_r", flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".dynsym", flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; elf_hash_table (info)->dynsym = s; s = bfd_make_section_anyway_with_flags (abfd, ".dynstr", flags | SEC_READONLY); if (s == NULL) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".dynamic", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; /* The special symbol _DYNAMIC is always set to the start of the .dynamic section. We could set _DYNAMIC in a linker script, but we @@ -333,7 +333,7 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) h = _bfd_elf_define_linkage_sym (abfd, info, s, "_DYNAMIC"); elf_hash_table (info)->hdynamic = h; if (h == NULL) - return FALSE; + return false; if (info->emit_hash) { @@ -341,7 +341,7 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; elf_section_data (s)->this_hdr.sh_entsize = bed->s->sizeof_hash_entry; } @@ -351,7 +351,7 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; /* For 64-bit ELF, .gnu.hash is a non-uniform entity size section: 4 32-bit words followed by variable count of 64-bit words, then variable count of 32-bit words. */ @@ -366,16 +366,16 @@ _bfd_elf_link_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) the .got and .plt sections. */ if (bed->elf_backend_create_dynamic_sections == NULL || ! (*bed->elf_backend_create_dynamic_sections) (abfd, info)) - return FALSE; + return false; - elf_hash_table (info)->dynamic_sections_created = TRUE; + elf_hash_table (info)->dynamic_sections_created = true; - return TRUE; + return true; } /* Create dynamic sections when linking against a dynamic object. */ -bfd_boolean +bool _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { flagword flags, pltflags; @@ -402,7 +402,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".plt", pltflags); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; htab->splt = s; /* Define the symbol _PROCEDURE_LINKAGE_TABLE_ at the start of the @@ -413,7 +413,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) "_PROCEDURE_LINKAGE_TABLE_"); elf_hash_table (info)->hplt = h; if (h == NULL) - return FALSE; + return false; } s = bfd_make_section_anyway_with_flags (abfd, @@ -422,11 +422,11 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->srelplt = s; if (! _bfd_elf_create_got_section (abfd, info)) - return FALSE; + return false; if (bed->want_dynbss) { @@ -439,7 +439,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".dynbss", SEC_ALLOC | SEC_LINKER_CREATED); if (s == NULL) - return FALSE; + return false; htab->sdynbss = s; if (bed->want_dynrelro) @@ -450,7 +450,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".data.rel.ro", flags); if (s == NULL) - return FALSE; + return false; htab->sdynrelro = s; } @@ -473,7 +473,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->srelbss = s; if (bed->want_dynrelro) @@ -484,13 +484,13 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sreldynrelro = s; } } } - return TRUE; + return true; } /* Record a new dynamic symbol. We record the dynamic symbols as we @@ -501,7 +501,7 @@ _bfd_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) symbol should be in the dynamic symbol table, but only if there is one. */ -bfd_boolean +bool bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -519,7 +519,7 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, if (h->root.u.def.section != NULL && h->root.u.def.section->owner != NULL && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0) - return TRUE; + return true; } /* XXX: The ABI draft says the linker must turn hidden and @@ -542,7 +542,7 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, || (h->root.type == bfd_link_hash_common && h->root.u.c.p->section->owner != NULL && h->root.u.c.p->section->owner->no_export)) - return TRUE; + return true; } default: @@ -558,7 +558,7 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, /* Create a strtab to hold the dynamic symbol names. */ elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init (); if (dynstr == NULL) - return FALSE; + return false; } /* We don't put any version information in the dynamic string @@ -579,11 +579,11 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, *p = ELF_VER_CHR; if (indx == (size_t) -1) - return FALSE; + return false; h->dynstr_index = indx; } - return TRUE; + return true; } /* Mark a symbol dynamic. */ @@ -619,22 +619,22 @@ bfd_elf_link_mark_dynamic_symbol (struct bfd_link_info *info, /* Record an assignment to a symbol made by a linker script. We need this in case some dynamic object refers to this symbol. */ -bfd_boolean +bool bfd_elf_record_link_assignment (bfd *output_bfd, struct bfd_link_info *info, const char *name, - bfd_boolean provide, - bfd_boolean hidden) + bool provide, + bool hidden) { struct elf_link_hash_entry *h, *hv; struct elf_link_hash_table *htab; const struct elf_backend_data *bed; if (!is_elf_hash_table (info->hash)) - return TRUE; + return true; htab = elf_hash_table (info); - h = elf_link_hash_lookup (htab, name, !provide, TRUE, FALSE); + h = elf_link_hash_lookup (htab, name, !provide, true, false); if (h == NULL) return provide; @@ -696,7 +696,7 @@ bfd_elf_record_link_assignment (bfd *output_bfd, break; default: BFD_FAIL (); - return FALSE; + return false; } /* If this symbol is being provided by the linker script, and it is @@ -725,7 +725,7 @@ bfd_elf_record_link_assignment (bfd *output_bfd, bed = get_elf_backend_data (output_bfd); if (ELF_ST_VISIBILITY (h->other) != STV_INTERNAL) h->other = (h->other & ~ELF_ST_VISIBILITY (-1)) | STV_HIDDEN; - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); } /* STV_HIDDEN and STV_INTERNAL symbols must be STB_LOCAL in shared objects @@ -744,7 +744,7 @@ bfd_elf_record_link_assignment (bfd *output_bfd, && h->dynindx == -1) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; /* If this is a weak defined symbol, and we know a corresponding real symbol from the same dynamic object, make sure the real @@ -755,11 +755,11 @@ bfd_elf_record_link_assignment (bfd *output_bfd, if (def->dynindx == -1 && !bfd_elf_link_record_dynamic_symbol (info, def)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Record a new local dynamic symbol. Returns 0 on failure, 1 on @@ -829,7 +829,7 @@ bfd_elf_link_record_local_dynamic_symbol (struct bfd_link_info *info, return 0; } - dynstr_index = _bfd_elf_strtab_add (dynstr, name, FALSE); + dynstr_index = _bfd_elf_strtab_add (dynstr, name, false); if (dynstr_index == (size_t) -1) return 0; entry->isym.st_name = dynstr_index; @@ -870,43 +870,43 @@ _bfd_elf_link_lookup_local_dynindx (struct bfd_link_info *info, them are removed because they are marked as local. This is called via elf_link_hash_traverse. */ -static bfd_boolean +static bool elf_link_renumber_hash_table_dynsyms (struct elf_link_hash_entry *h, void *data) { size_t *count = (size_t *) data; if (h->forced_local) - return TRUE; + return true; if (h->dynindx != -1) h->dynindx = ++(*count); - return TRUE; + return true; } /* Like elf_link_renumber_hash_table_dynsyms, but just number symbols with STB_LOCAL binding. */ -static bfd_boolean +static bool elf_link_renumber_local_hash_table_dynsyms (struct elf_link_hash_entry *h, void *data) { size_t *count = (size_t *) data; if (!h->forced_local) - return TRUE; + return true; if (h->dynindx != -1) h->dynindx = ++(*count); - return TRUE; + return true; } /* Return true if the dynamic symbol for a given section should be omitted when creating a shared library. */ -bfd_boolean +bool _bfd_elf_omit_section_dynsym_default (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info, asection *p) @@ -932,17 +932,17 @@ _bfd_elf_omit_section_dynsym_default (bfd *output_bfd ATTRIBUTE_UNUSED, /* There shouldn't be section relative relocations against any other section. */ default: - return TRUE; + return true; } } -bfd_boolean +bool _bfd_elf_omit_section_dynsym_all (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, asection *p ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* Assign dynsym indices. In a shared library we generate a section @@ -960,7 +960,7 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd, unsigned long *section_sym_count) { unsigned long dynsymcount = 0; - bfd_boolean do_sec = section_sym_count != NULL; + bool do_sec = section_sym_count != NULL; if (bfd_link_pic (info) || elf_hash_table (info)->is_relocatable_executable) @@ -1014,7 +1014,7 @@ _bfd_elf_link_renumber_dynsyms (bfd *output_bfd, static void elf_merge_st_other (bfd *abfd, struct elf_link_hash_entry *h, unsigned int st_other, asection *sec, - bfd_boolean definition, bfd_boolean dynamic) + bool definition, bool dynamic) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -1053,7 +1053,7 @@ elf_merge_st_other (bfd *abfd, struct elf_link_hash_entry *h, to change. By OK to change, we mean that we shouldn't warn if the type or size does change. */ -static bfd_boolean +static bool _bfd_elf_merge_symbol (bfd *abfd, struct bfd_link_info *info, const char *name, @@ -1062,13 +1062,13 @@ _bfd_elf_merge_symbol (bfd *abfd, bfd_vma *pvalue, struct elf_link_hash_entry **sym_hash, bfd **poldbfd, - bfd_boolean *pold_weak, + bool *pold_weak, unsigned int *pold_alignment, - bfd_boolean *skip, + bool *skip, bfd **override, - bfd_boolean *type_change_ok, - bfd_boolean *size_change_ok, - bfd_boolean *matched) + bool *type_change_ok, + bool *size_change_ok, + bool *matched) { asection *sec, *oldsec; struct elf_link_hash_entry *h; @@ -1076,25 +1076,25 @@ _bfd_elf_merge_symbol (bfd *abfd, struct elf_link_hash_entry *flip; int bind; bfd *oldbfd; - bfd_boolean newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon; - bfd_boolean newweak, oldweak, newfunc, oldfunc; + bool newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon; + bool newweak, oldweak, newfunc, oldfunc; const struct elf_backend_data *bed; char *new_version; - bfd_boolean default_sym = *matched; + bool default_sym = *matched; - *skip = FALSE; + *skip = false; *override = NULL; sec = *psec; bind = ELF_ST_BIND (sym->st_info); if (! bfd_is_und_section (sec)) - h = elf_link_hash_lookup (elf_hash_table (info), name, TRUE, FALSE, FALSE); + h = elf_link_hash_lookup (elf_hash_table (info), name, true, false, false); else h = ((struct elf_link_hash_entry *) - bfd_wrapped_link_hash_lookup (abfd, info, name, TRUE, FALSE, FALSE)); + bfd_wrapped_link_hash_lookup (abfd, info, name, true, false, false)); if (h == NULL) - return FALSE; + return false; *sym_hash = h; bed = get_elf_backend_data (abfd); @@ -1133,19 +1133,19 @@ _bfd_elf_merge_symbol (bfd *abfd, if (!*matched) { if (hi == h || h->root.type == bfd_link_hash_new) - *matched = TRUE; + *matched = true; else { /* OLD_HIDDEN is true if the existing symbol is only visible to the symbol with the same symbol version. NEW_HIDDEN is true if the new symbol is only visible to the symbol with the same symbol version. */ - bfd_boolean old_hidden = h->versioned == versioned_hidden; - bfd_boolean new_hidden = hi->versioned == versioned_hidden; + bool old_hidden = h->versioned == versioned_hidden; + bool new_hidden = hi->versioned == versioned_hidden; if (!old_hidden && !new_hidden) /* The new symbol matches the existing symbol if both aren't hidden. */ - *matched = TRUE; + *matched = true; else { /* OLD_VERSION is the symbol version of the existing @@ -1249,7 +1249,7 @@ _bfd_elf_merge_symbol (bfd *abfd, if (h->root.type == bfd_link_hash_new) { h->non_elf = 0; - return TRUE; + return true; } /* In cases involving weak versioned symbols, we may wind up trying @@ -1262,9 +1262,9 @@ _bfd_elf_merge_symbol (bfd *abfd, && (newweak || oldweak) && ((abfd->flags & DYNAMIC) == 0 || !h->def_regular)) - return TRUE; + return true; - olddyn = FALSE; + olddyn = false; if (oldbfd != NULL) olddyn = (oldbfd->flags & DYNAMIC) != 0; else if (oldsec != NULL) @@ -1280,8 +1280,8 @@ _bfd_elf_merge_symbol (bfd *abfd, && (oldbfd->flags & BFD_PLUGIN) != (abfd->flags & BFD_PLUGIN) && newdyn != olddyn) { - h->root.non_ir_ref_dynamic = TRUE; - hi->root.non_ir_ref_dynamic = TRUE; + h->root.non_ir_ref_dynamic = true; + hi->root.non_ir_ref_dynamic = true; } /* NEWDEF and OLDDEF indicate whether the new or old symbol, @@ -1317,8 +1317,8 @@ _bfd_elf_merge_symbol (bfd *abfd, if (newdyn && !olddyn) { - *skip = TRUE; - return TRUE; + *skip = true; + return true; } /* When adding a symbol from a regular object file after we have @@ -1329,7 +1329,7 @@ _bfd_elf_merge_symbol (bfd *abfd, && olddyn) { h = hi; - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); h->forced_local = 0; h->ref_dynamic = 0; h->def_dynamic = 0; @@ -1344,7 +1344,7 @@ _bfd_elf_merge_symbol (bfd *abfd, h->root.type = bfd_link_hash_new; h->root.u.undef.abfd = NULL; } - return TRUE; + return true; } } @@ -1358,7 +1358,7 @@ _bfd_elf_merge_symbol (bfd *abfd, && (ELF_ST_TYPE (sym->st_info) == STT_TLS || h->type == STT_TLS)) { bfd *ntbfd, *tbfd; - bfd_boolean ntdef, tdef; + bool ntdef, tdef; asection *ntsec, *tsec; if (h->type == STT_TLS) @@ -1406,7 +1406,7 @@ _bfd_elf_merge_symbol (bfd *abfd, h->root.root.string, tbfd, ntbfd, ntsec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* If the old symbol has non-default visibility, we ignore the new @@ -1415,7 +1415,7 @@ _bfd_elf_merge_symbol (bfd *abfd, && ELF_ST_VISIBILITY (h->other) != STV_DEFAULT && !bfd_is_und_section (sec)) { - *skip = TRUE; + *skip = true; /* Make sure this symbol is dynamic. */ h->ref_dynamic = 1; hi->ref_dynamic = 1; @@ -1426,7 +1426,7 @@ _bfd_elf_merge_symbol (bfd *abfd, if (ELF_ST_VISIBILITY (h->other) == STV_PROTECTED) return bfd_elf_link_record_dynamic_symbol (info, h); else - return TRUE; + return true; } else if (!newdyn && ELF_ST_VISIBILITY (sym->st_other) != STV_DEFAULT @@ -1452,7 +1452,7 @@ _bfd_elf_merge_symbol (bfd *abfd, { /* If the new symbol is hidden or internal, completely undo any dynamic link state. */ - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); h->forced_local = 0; h->ref_dynamic = 0; } @@ -1492,7 +1492,7 @@ _bfd_elf_merge_symbol (bfd *abfd, { /* If the new symbol is hidden or internal, completely undo any dynamic link state. */ - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); h->forced_local = 0; h->ref_dynamic = 0; } @@ -1502,7 +1502,7 @@ _bfd_elf_merge_symbol (bfd *abfd, /* FIXME: Should we check type and size for protected symbol? */ h->size = 0; h->type = 0; - return TRUE; + return true; } /* If a new weak symbol definition comes from a regular file and the @@ -1522,13 +1522,13 @@ _bfd_elf_merge_symbol (bfd *abfd, we warn properly when dynamic library symbols are overridden. */ if (newdef && !newdyn && (olddyn || h->root.ldscript_def)) - newweak = FALSE; + newweak = false; if (olddef && newdyn) - oldweak = FALSE; + oldweak = false; /* Allow changes between different types of function symbol. */ if (newfunc && oldfunc) - *type_change_ok = TRUE; + *type_change_ok = true; /* It's OK to change the type if either the existing symbol or the new symbol is weak. A type change is also OK if the old symbol @@ -1538,14 +1538,14 @@ _bfd_elf_merge_symbol (bfd *abfd, || newweak || (newdef && h->root.type == bfd_link_hash_undefined)) - *type_change_ok = TRUE; + *type_change_ok = true; /* It's OK to change the size if either the existing symbol or the new symbol is weak, or if the old symbol is undefined. */ if (*type_change_ok || h->root.type == bfd_link_hash_undefined) - *size_change_ok = TRUE; + *size_change_ok = true; /* NEWDYNCOMMON and OLDDYNCOMMON indicate whether the new or old symbol, respectively, appears to be a common symbol in a dynamic @@ -1577,9 +1577,9 @@ _bfd_elf_merge_symbol (bfd *abfd, && (sec->flags & SEC_LOAD) == 0 && sym->st_size > 0 && !newfunc) - newdyncommon = TRUE; + newdyncommon = true; else - newdyncommon = FALSE; + newdyncommon = false; if (olddyn && olddef @@ -1589,16 +1589,16 @@ _bfd_elf_merge_symbol (bfd *abfd, && (h->root.u.def.section->flags & SEC_LOAD) == 0 && h->size > 0 && !oldfunc) - olddyncommon = TRUE; + olddyncommon = true; else - olddyncommon = FALSE; + olddyncommon = false; /* We now know everything about the old and new symbols. We ask the backend to check if we can merge them. */ if (bed->merge_symbol != NULL) { if (!bed->merge_symbol (h, sym, psec, newdef, olddef, oldbfd, oldsec)) - return FALSE; + return false; sec = *psec; } @@ -1613,8 +1613,8 @@ _bfd_elf_merge_symbol (bfd *abfd, /* Handle a multiple definition. */ (*info->callbacks->multiple_definition) (info, &h->root, abfd, sec, *pvalue); - *skip = TRUE; - return TRUE; + *skip = true; + return true; } /* If both the old and the new symbols look like common symbols in a @@ -1636,7 +1636,7 @@ _bfd_elf_merge_symbol (bfd *abfd, if (sym->st_size > h->size) h->size = sym->st_size; - *size_change_ok = TRUE; + *size_change_ok = true; } /* If we are looking at a dynamic object, and we have found a @@ -1660,11 +1660,11 @@ _bfd_elf_merge_symbol (bfd *abfd, && (newweak || newfunc)))) { *override = abfd; - newdef = FALSE; - newdyncommon = FALSE; + newdef = false; + newdyncommon = false; *psec = sec = bfd_und_section_ptr; - *size_change_ok = TRUE; + *size_change_ok = true; /* If we get here when the old symbol is a common symbol, then we are explicitly letting it override a weak symbol or @@ -1673,7 +1673,7 @@ _bfd_elf_merge_symbol (bfd *abfd, change warning may still be appropriate. */ if (h->root.type == bfd_link_hash_common) - *type_change_ok = TRUE; + *type_change_ok = true; } /* Handle the special case of an old common symbol merging with a @@ -1686,11 +1686,11 @@ _bfd_elf_merge_symbol (bfd *abfd, && h->root.type == bfd_link_hash_common) { *override = oldbfd; - newdef = FALSE; - newdyncommon = FALSE; + newdef = false; + newdyncommon = false; *pvalue = sym->st_size; *psec = sec = bed->common_section (oldsec); - *size_change_ok = TRUE; + *size_change_ok = true; } /* Skip weak definitions of symbols that are already defined. */ @@ -1701,8 +1701,8 @@ _bfd_elf_merge_symbol (bfd *abfd, && (oldbfd->flags & BFD_PLUGIN) != 0 && (abfd->flags & BFD_PLUGIN) == 0)) { - newdef = FALSE; - *skip = TRUE; + newdef = false; + *skip = true; } /* Merge st_other. If the symbol already has a dynamic index, @@ -1714,7 +1714,7 @@ _bfd_elf_merge_symbol (bfd *abfd, { case STV_INTERNAL: case STV_HIDDEN: - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); break; } } @@ -1744,10 +1744,10 @@ _bfd_elf_merge_symbol (bfd *abfd, h->root.type = bfd_link_hash_undefined; h->root.u.undef.abfd = h->root.u.def.section->owner; - *size_change_ok = TRUE; + *size_change_ok = true; - olddef = FALSE; - olddyncommon = FALSE; + olddef = false; + olddyncommon = false; /* We again permit a type change when a common symbol may be overriding a function. */ @@ -1762,7 +1762,7 @@ _bfd_elf_merge_symbol (bfd *abfd, h->def_dynamic = 0; h->type = STT_NOTYPE; } - *type_change_ok = TRUE; + *type_change_ok = true; } if (hi->root.type == bfd_link_hash_indirect) @@ -1801,14 +1801,14 @@ _bfd_elf_merge_symbol (bfd *abfd, BFD_ASSERT (pold_alignment); *pold_alignment = h->root.u.def.section->alignment_power; - olddef = FALSE; - olddyncommon = FALSE; + olddef = false; + olddyncommon = false; h->root.type = bfd_link_hash_undefined; h->root.u.undef.abfd = h->root.u.def.section->owner; - *size_change_ok = TRUE; - *type_change_ok = TRUE; + *size_change_ok = true; + *type_change_ok = true; if (hi->root.type == bfd_link_hash_indirect) flip = hi; @@ -1833,7 +1833,7 @@ _bfd_elf_merge_symbol (bfd *abfd, } } - return TRUE; + return true; } /* This function is called to create an indirect symbol from the @@ -1841,7 +1841,7 @@ _bfd_elf_merge_symbol (bfd *abfd, symbol is described by H, NAME, SYM, SEC, and VALUE. We set DYNSYM if the new indirect symbol is dynamic. */ -static bfd_boolean +static bool _bfd_elf_add_default_symbol (bfd *abfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -1850,25 +1850,25 @@ _bfd_elf_add_default_symbol (bfd *abfd, asection *sec, bfd_vma value, bfd **poldbfd, - bfd_boolean *dynsym) + bool *dynsym) { - bfd_boolean type_change_ok; - bfd_boolean size_change_ok; - bfd_boolean skip; + bool type_change_ok; + bool size_change_ok; + bool skip; char *shortname; struct elf_link_hash_entry *hi; struct bfd_link_hash_entry *bh; const struct elf_backend_data *bed; - bfd_boolean collect; - bfd_boolean dynamic; + bool collect; + bool dynamic; bfd *override; char *p; size_t len, shortlen; asection *tmp_sec; - bfd_boolean matched; + bool matched; if (h->versioned == unversioned || h->versioned == versioned_hidden) - return TRUE; + return true; /* If this symbol has a version, and it is the default version, we create an indirect symbol from the default name to the fully @@ -1880,14 +1880,14 @@ _bfd_elf_add_default_symbol (bfd *abfd, if (p == NULL) { h->versioned = unversioned; - return TRUE; + return true; } else { if (p[1] != ELF_VER_CHR) { h->versioned = versioned_hidden; - return TRUE; + return true; } else h->versioned = versioned; @@ -1898,7 +1898,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, /* PR ld/19073: We may see an unversioned definition after the default version. */ if (p == NULL) - return TRUE; + return true; } bed = get_elf_backend_data (abfd); @@ -1908,7 +1908,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, shortlen = p - name; shortname = (char *) bfd_hash_allocate (&info->hash->table, shortlen + 1); if (shortname == NULL) - return FALSE; + return false; memcpy (shortname, name, shortlen); shortname[shortlen] = '\0'; @@ -1916,14 +1916,14 @@ _bfd_elf_add_default_symbol (bfd *abfd, symbol with this name. For the purposes of the merge, act as though we were defining the symbol we just defined, although we actually going to define an indirect symbol. */ - type_change_ok = FALSE; - size_change_ok = FALSE; - matched = TRUE; + type_change_ok = false; + size_change_ok = false; + matched = true; tmp_sec = sec; if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &tmp_sec, &value, &hi, poldbfd, NULL, NULL, &skip, &override, &type_change_ok, &size_change_ok, &matched)) - return FALSE; + return false; if (skip) goto nondefault; @@ -1937,14 +1937,14 @@ _bfd_elf_add_default_symbol (bfd *abfd, command line rather than via --version-script. */ if (hi->verinfo.vertree == NULL && info->version_info != NULL) { - bfd_boolean hide; + bool hide; hi->verinfo.vertree = bfd_find_version_for_sym (info->version_info, hi->root.root.string, &hide); if (hi->verinfo.vertree != NULL && hide) { - (*bed->elf_backend_hide_symbol) (info, hi, TRUE); + (*bed->elf_backend_hide_symbol) (info, hi, true); goto nondefault; } } @@ -1972,8 +1972,8 @@ _bfd_elf_add_default_symbol (bfd *abfd, if (! (_bfd_generic_link_add_one_symbol (info, abfd, shortname, BSF_INDIRECT, bfd_ind_section_ptr, - 0, name, FALSE, collect, &bh))) - return FALSE; + 0, name, false, collect, &bh))) + return false; hi = (struct elf_link_hash_entry *) bh; } } @@ -2011,7 +2011,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, || hi->def_regular) { if (! bfd_elf_link_record_dynamic_symbol (info, hi)) - return FALSE; + return false; } } @@ -2037,7 +2037,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, /* If we first saw a reference to SHORTNAME with non-default visibility, merge that visibility to the @@VER symbol. */ - elf_merge_st_other (abfd, ht, hi->other, sec, TRUE, dynamic); + elf_merge_st_other (abfd, ht, hi->other, sec, true, dynamic); /* A reference to the SHORTNAME symbol from a dynamic library will be satisfied by the versioned symbol at runtime. In @@ -2054,12 +2054,12 @@ _bfd_elf_add_default_symbol (bfd *abfd, if (! bfd_link_executable (info) || hi->def_dynamic || hi->ref_dynamic) - *dynsym = TRUE; + *dynsym = true; } else { if (hi->ref_regular) - *dynsym = TRUE; + *dynsym = true; } } } @@ -2071,18 +2071,18 @@ _bfd_elf_add_default_symbol (bfd *abfd, len = strlen (name); shortname = (char *) bfd_hash_allocate (&info->hash->table, len); if (shortname == NULL) - return FALSE; + return false; memcpy (shortname, name, shortlen); memcpy (shortname + shortlen, p + 1, len - shortlen); /* Once again, merge with any existing symbol. */ - type_change_ok = FALSE; - size_change_ok = FALSE; + type_change_ok = false; + size_change_ok = false; tmp_sec = sec; if (!_bfd_elf_merge_symbol (abfd, info, shortname, sym, &tmp_sec, &value, &hi, poldbfd, NULL, NULL, &skip, &override, &type_change_ok, &size_change_ok, &matched)) - return FALSE; + return false; if (skip) { @@ -2102,7 +2102,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, hi->root.u.i.link = &h->root; } else - return TRUE; + return true; } else if (override) { @@ -2115,15 +2115,15 @@ _bfd_elf_add_default_symbol (bfd *abfd, /* xgettext:c-format */ (_("%pB: unexpected redefinition of indirect versioned symbol `%s'"), abfd, shortname); - return TRUE; + return true; } else { bh = &hi->root; if (! (_bfd_generic_link_add_one_symbol (info, abfd, shortname, BSF_INDIRECT, - bfd_ind_section_ptr, 0, name, FALSE, collect, &bh))) - return FALSE; + bfd_ind_section_ptr, 0, name, false, collect, &bh))) + return false; hi = (struct elf_link_hash_entry *) bh; } @@ -2139,7 +2139,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, /* If we first saw a reference to @VER symbol with non-default visibility, merge that visibility to the @@VER symbol. */ - elf_merge_st_other (abfd, h, hi->other, sec, TRUE, dynamic); + elf_merge_st_other (abfd, h, hi->other, sec, true, dynamic); /* See if the new flags lead us to realize that the symbol must be dynamic. */ @@ -2149,34 +2149,34 @@ _bfd_elf_add_default_symbol (bfd *abfd, { if (! bfd_link_executable (info) || hi->ref_dynamic) - *dynsym = TRUE; + *dynsym = true; } else { if (hi->ref_regular) - *dynsym = TRUE; + *dynsym = true; } } } - return TRUE; + return true; } /* This routine is used to export all defined symbols into the dynamic symbol table. It is called via elf_link_hash_traverse. */ -static bfd_boolean +static bool _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data) { struct elf_info_failed *eif = (struct elf_info_failed *) data; /* Ignore indirect symbols. These are added by the versioning code. */ if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; /* Ignore this if we won't export it. */ if (!eif->info->export_dynamic && !h->dynamic) - return TRUE; + return true; if (h->dynindx == -1 && (h->def_regular || h->ref_regular) @@ -2185,12 +2185,12 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data) { if (! bfd_elf_link_record_dynamic_symbol (eif->info, h)) { - eif->failed = TRUE; - return FALSE; + eif->failed = true; + return false; } } - return TRUE; + return true; } /* Look through the symbols which are defined in other shared @@ -2198,7 +2198,7 @@ _bfd_elf_export_symbol (struct elf_link_hash_entry *h, void *data) dependencies. This will be put into the .gnu.version_r section. This function is called via elf_link_hash_traverse. */ -static bfd_boolean +static bool _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, void *data) { @@ -2215,7 +2215,7 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, || h->verinfo.verdef == NULL || (elf_dyn_lib_class (h->verinfo.verdef->vd_bfd) & (DYN_AS_NEEDED | DYN_DT_NEEDED | DYN_NO_NEEDED))) - return TRUE; + return true; /* See if we already know about this version. */ for (t = elf_tdata (rinfo->info->output_bfd)->verref; @@ -2227,7 +2227,7 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, for (a = t->vn_auxptr; a != NULL; a = a->vna_nextptr) if (a->vna_nodename == h->verinfo.verdef->vd_nodename) - return TRUE; + return true; break; } @@ -2240,8 +2240,8 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, t = (Elf_Internal_Verneed *) bfd_zalloc (rinfo->info->output_bfd, amt); if (t == NULL) { - rinfo->failed = TRUE; - return FALSE; + rinfo->failed = true; + return false; } t->vn_bfd = h->verinfo.verdef->vd_bfd; @@ -2253,8 +2253,8 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, a = (Elf_Internal_Vernaux *) bfd_zalloc (rinfo->info->output_bfd, amt); if (a == NULL) { - rinfo->failed = TRUE; - return FALSE; + rinfo->failed = true; + return false; } /* Note that we are copying a string pointer here, and testing it @@ -2273,18 +2273,18 @@ _bfd_elf_link_find_version_dependencies (struct elf_link_hash_entry *h, t->vn_auxptr = a; - return TRUE; + return true; } /* Return TRUE and set *HIDE to TRUE if the versioned symbol is hidden. Set *T_P to NULL if there is no match. */ -static bfd_boolean +static bool _bfd_elf_link_hide_versioned_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h, const char *version_p, struct bfd_elf_version_tree **t_p, - bfd_boolean *hide) + bool *hide) { struct bfd_elf_version_tree *t; @@ -2300,14 +2300,14 @@ _bfd_elf_link_hide_versioned_symbol (struct bfd_link_info *info, len = version_p - h->root.root.string; alc = (char *) bfd_malloc (len); if (alc == NULL) - return FALSE; + return false; memcpy (alc, h->root.root.string, len - 1); alc[len - 1] = '\0'; if (alc[len - 2] == ELF_VER_CHR) alc[len - 2] = '\0'; h->verinfo.vertree = t; - t->used = TRUE; + t->used = true; d = NULL; if (t->globals.list != NULL) @@ -2321,7 +2321,7 @@ _bfd_elf_link_hide_versioned_symbol (struct bfd_link_info *info, if (d != NULL && h->dynindx != -1 && ! info->export_dynamic) - *hide = TRUE; + *hide = true; } free (alc); @@ -2331,23 +2331,23 @@ _bfd_elf_link_hide_versioned_symbol (struct bfd_link_info *info, *t_p = t; - return TRUE; + return true; } /* Return TRUE if the symbol H is hidden by version script. */ -bfd_boolean +bool _bfd_elf_link_hide_sym_by_version (struct bfd_link_info *info, struct elf_link_hash_entry *h) { const char *p; - bfd_boolean hide = FALSE; + bool hide = false; const struct elf_backend_data *bed = get_elf_backend_data (info->output_bfd); /* Version script only hides symbols defined in regular objects. */ if (!h->def_regular && !ELF_COMMON_DEF_P (h)) - return TRUE; + return true; p = strchr (h->root.root.string, ELF_VER_CHR); if (p != NULL && h->verinfo.vertree == NULL) @@ -2363,8 +2363,8 @@ _bfd_elf_link_hide_sym_by_version (struct bfd_link_info *info, && hide) { if (hide) - (*bed->elf_backend_hide_symbol) (info, h, TRUE); - return TRUE; + (*bed->elf_backend_hide_symbol) (info, h, true); + return true; } } @@ -2377,12 +2377,12 @@ _bfd_elf_link_hide_sym_by_version (struct bfd_link_info *info, h->root.root.string, &hide); if (h->verinfo.vertree != NULL && hide) { - (*bed->elf_backend_hide_symbol) (info, h, TRUE); - return TRUE; + (*bed->elf_backend_hide_symbol) (info, h, true); + return true; } } - return FALSE; + return false; } /* Figure out appropriate versions for all the symbols. We may not @@ -2390,7 +2390,7 @@ _bfd_elf_link_hide_sym_by_version (struct bfd_link_info *info, files, so until that point we don't know which symbols should be local. This function is called via elf_link_hash_traverse. */ -static bfd_boolean +static bool _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) { struct elf_info_failed *sinfo; @@ -2398,19 +2398,19 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) const struct elf_backend_data *bed; struct elf_info_failed eif; char *p; - bfd_boolean hide; + bool hide; sinfo = (struct elf_info_failed *) data; info = sinfo->info; /* Fix the symbol flags. */ - eif.failed = FALSE; + eif.failed = false; eif.info = info; if (! _bfd_elf_fix_symbol_flags (h, &eif)) { if (eif.failed) - sinfo->failed = TRUE; - return FALSE; + sinfo->failed = true; + return false; } bed = get_elf_backend_data (info->output_bfd); @@ -2423,11 +2423,11 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) if ((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) && discarded_section (h->root.u.def.section)) - (*bed->elf_backend_hide_symbol) (info, h, TRUE); - return TRUE; + (*bed->elf_backend_hide_symbol) (info, h, true); + return true; } - hide = FALSE; + hide = false; p = strchr (h->root.root.string, ELF_VER_CHR); if (p != NULL && h->verinfo.vertree == NULL) { @@ -2439,16 +2439,16 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) /* If there is no version string, we can just return out. */ if (*p == '\0') - return TRUE; + return true; if (!_bfd_elf_link_hide_versioned_symbol (info, h, p, &t, &hide)) { - sinfo->failed = TRUE; - return FALSE; + sinfo->failed = true; + return false; } if (hide) - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); /* If we are building an application, we need to create a version node for this version. */ @@ -2460,19 +2460,19 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) /* If we aren't going to export this symbol, we don't need to worry about it. */ if (h->dynindx == -1) - return TRUE; + return true; t = (struct bfd_elf_version_tree *) bfd_zalloc (info->output_bfd, sizeof *t); if (t == NULL) { - sinfo->failed = TRUE; - return FALSE; + sinfo->failed = true; + return false; } t->name = p; t->name_indx = (unsigned int) -1; - t->used = TRUE; + t->used = true; version_index = 1; /* Don't count anonymous version tag. */ @@ -2498,8 +2498,8 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) (_("%pB: version node not found for symbol %s"), info->output_bfd, h->root.root.string); bfd_set_error (bfd_error_bad_value); - sinfo->failed = TRUE; - return FALSE; + sinfo->failed = true; + return false; } } @@ -2513,10 +2513,10 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) = bfd_find_version_for_sym (sinfo->info->version_info, h->root.root.string, &hide); if (h->verinfo.vertree != NULL && hide) - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); } - return TRUE; + return true; } /* Read and swap the relocs from the section indicated by SHDR. This @@ -2528,7 +2528,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) Returns FALSE if something goes wrong. */ -static bfd_boolean +static bool elf_link_read_relocs_from_section (bfd *abfd, asection *sec, Elf_Internal_Shdr *shdr, @@ -2545,11 +2545,11 @@ elf_link_read_relocs_from_section (bfd *abfd, /* Position ourselves at the start of the section. */ if (bfd_seek (abfd, shdr->sh_offset, SEEK_SET) != 0) - return FALSE; + return false; /* Read the relocations. */ if (bfd_bread (external_relocs, shdr->sh_size, abfd) != shdr->sh_size) - return FALSE; + return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; nsyms = NUM_SHDR_ENTRIES (symtab_hdr); @@ -2564,7 +2564,7 @@ elf_link_read_relocs_from_section (bfd *abfd, else { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } erela = (const bfd_byte *) external_relocs; @@ -2591,7 +2591,7 @@ elf_link_read_relocs_from_section (bfd *abfd, abfd, (uint64_t) r_symndx, (unsigned long) nsyms, (uint64_t) irela->r_offset, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } else if (r_symndx != STN_UNDEF) @@ -2604,13 +2604,13 @@ elf_link_read_relocs_from_section (bfd *abfd, abfd, (uint64_t) r_symndx, (uint64_t) irela->r_offset, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } irela += bed->s->int_rels_per_ext_rel; erela += shdr->sh_entsize; } - return TRUE; + return true; } /* Read and swap the relocs for a section O. They may have been @@ -2628,7 +2628,7 @@ _bfd_elf_link_read_relocs (bfd *abfd, asection *o, void *external_relocs, Elf_Internal_Rela *internal_relocs, - bfd_boolean keep_memory) + bool keep_memory) { void *alloc1 = NULL; Elf_Internal_Rela *alloc2 = NULL; @@ -2715,7 +2715,7 @@ _bfd_elf_link_read_relocs (bfd *abfd, /* Compute the size of, and allocate space for, REL_HDR which is the section header for a section containing relocations for O. */ -static bfd_boolean +static bool _bfd_elf_link_size_reloc_section (bfd *abfd, struct bfd_elf_section_reloc_data *reldata) { @@ -2730,7 +2730,7 @@ _bfd_elf_link_size_reloc_section (bfd *abfd, we zero the allocated space. */ rel_hdr->contents = (unsigned char *) bfd_zalloc (abfd, rel_hdr->sh_size); if (rel_hdr->contents == NULL && rel_hdr->sh_size != 0) - return FALSE; + return false; if (reldata->hashes == NULL && reldata->count) { @@ -2739,19 +2739,19 @@ _bfd_elf_link_size_reloc_section (bfd *abfd, p = ((struct elf_link_hash_entry **) bfd_zmalloc (reldata->count * sizeof (*p))); if (p == NULL) - return FALSE; + return false; reldata->hashes = p; } - return TRUE; + return true; } /* Copy the relocations indicated by the INTERNAL_RELOCS (which originated from the section given by INPUT_REL_HDR) to the OUTPUT_BFD. */ -bfd_boolean +bool _bfd_elf_link_output_relocs (bfd *output_bfd, asection *input_section, Elf_Internal_Shdr *input_rel_hdr, @@ -2790,7 +2790,7 @@ _bfd_elf_link_output_relocs (bfd *output_bfd, (_("%pB: relocation size mismatch in %pB section %pA"), output_bfd, input_section->owner, input_section); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } erel = output_reldata->hdr->contents; @@ -2809,12 +2809,12 @@ _bfd_elf_link_output_relocs (bfd *output_bfd, relocations. */ output_reldata->count += NUM_SHDR_ENTRIES (input_rel_hdr); - return TRUE; + return true; } /* Make weak undefined symbols in PIE dynamic. */ -bfd_boolean +bool _bfd_elf_link_hash_fixup_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2823,7 +2823,7 @@ _bfd_elf_link_hash_fixup_symbol (struct bfd_link_info *info, && h->root.type == bfd_link_hash_undefweak) return bfd_elf_link_record_dynamic_symbol (info, h); - return TRUE; + return true; } /* Fix up the flags for a symbol. This handles various cases which @@ -2832,7 +2832,7 @@ _bfd_elf_link_hash_fixup_symbol (struct bfd_link_info *info, assign_sym_version, which is unnecessary but perhaps more robust in the face of future changes. */ -static bfd_boolean +static bool _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, struct elf_info_failed *eif) { @@ -2872,8 +2872,8 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, { if (! bfd_elf_link_record_dynamic_symbol (eif->info, h)) { - eif->failed = TRUE; - return FALSE; + eif->failed = true; + return false; } } } @@ -2900,7 +2900,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, bed = get_elf_backend_data (elf_hash_table (eif->info)->dynobj); if (bed->elf_backend_fixup_symbol && !(*bed->elf_backend_fixup_symbol) (eif->info, h)) - return FALSE; + return false; /* If this is a final link, and the symbol was defined as a common symbol in a regular object file, and there was no definition in @@ -2916,13 +2916,13 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, /* Symbols defined in discarded sections shouldn't be dynamic. */ if (h->root.type == bfd_link_hash_undefined && h->indx == -3) - (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE); + (*bed->elf_backend_hide_symbol) (eif->info, h, true); /* If a weak undefined symbol has non-default visibility, we also hide it from the dynamic linker. */ else if (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT && h->root.type == bfd_link_hash_undefweak) - (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE); + (*bed->elf_backend_hide_symbol) (eif->info, h, true); /* A hidden versioned symbol in executable should be forced local if it is is locally defined, not referenced by shared library and not @@ -2933,7 +2933,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, && !h->dynamic && !h->ref_dynamic && h->def_regular) - (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE); + (*bed->elf_backend_hide_symbol) (eif->info, h, true); /* If -Bsymbolic was used (which means to bind references to global symbols to the definition within the shared object), and this @@ -2948,7 +2948,7 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT) && h->def_regular) { - bfd_boolean force_local; + bool force_local; force_local = (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN); @@ -2990,14 +2990,14 @@ _bfd_elf_fix_symbol_flags (struct elf_link_hash_entry *h, } } - return TRUE; + return true; } /* Make the backend pick a good value for a dynamic symbol. This is called via elf_link_hash_traverse, and also calls itself recursively. */ -static bfd_boolean +static bool _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) { struct elf_info_failed *eif = (struct elf_info_failed *) data; @@ -3005,15 +3005,15 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) const struct elf_backend_data *bed; if (! is_elf_hash_table (eif->info->hash)) - return FALSE; + return false; /* Ignore indirect symbols. These are added by the versioning code. */ if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; /* Fix the symbol flags. */ if (! _bfd_elf_fix_symbol_flags (h, eif)) - return FALSE; + return false; htab = elf_hash_table (eif->info); bed = get_elf_backend_data (htab->dynobj); @@ -3021,7 +3021,7 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) if (h->root.type == bfd_link_hash_undefweak) { if (eif->info->dynamic_undefined_weak == 0) - (*bed->elf_backend_hide_symbol) (eif->info, h, TRUE); + (*bed->elf_backend_hide_symbol) (eif->info, h, true); else if (eif->info->dynamic_undefined_weak > 0 && h->ref_regular && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT @@ -3030,8 +3030,8 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) { if (!bfd_elf_link_record_dynamic_symbol (eif->info, h)) { - eif->failed = TRUE; - return FALSE; + eif->failed = true; + return false; } } } @@ -3051,13 +3051,13 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) && (!h->is_weakalias || weakdef (h)->dynindx == -1)))) { h->plt = elf_hash_table (eif->info)->init_plt_offset; - return TRUE; + return true; } /* If we've already adjusted this symbol, don't do it again. This can happen via a recursive call. */ if (h->dynamic_adjusted) - return TRUE; + return true; /* Don't look at this symbol again. Note that we must set this after checking the above conditions, because we may look at a @@ -3104,7 +3104,7 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) /* Ensure that the backend adjust_dynamic_symbol function sees the strong alias before H by recursively calling ourselves. */ if (!_bfd_elf_adjust_dynamic_symbol (def, eif)) - return FALSE; + return false; } /* If a symbol has no type and no size and does not require a PLT @@ -3121,17 +3121,17 @@ _bfd_elf_adjust_dynamic_symbol (struct elf_link_hash_entry *h, void *data) if (! (*bed->elf_backend_adjust_dynamic_symbol) (eif->info, h)) { - eif->failed = TRUE; - return FALSE; + eif->failed = true; + return false; } - return TRUE; + return true; } /* Adjust the dynamic symbol, H, for copy in the dynamic bss section, DYNBSS. */ -bfd_boolean +bool _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info, struct elf_link_hash_entry *h, asection *dynbss) @@ -3157,7 +3157,7 @@ _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info, { /* Adjust the section alignment if needed. */ if (!bfd_set_section_alignment (dynbss, power_of_two)) - return FALSE; + return false; } /* We make sure that the symbol will be aligned properly. */ @@ -3179,13 +3179,13 @@ _bfd_elf_adjust_dynamic_copy (struct bfd_link_info *info, (_("%P: copy reloc against protected `%pT' is dangerous\n"), h->root.root.string); - return TRUE; + return true; } /* Adjust all external symbols pointing into SEC_MERGE sections to reflect the object merging within the sections. */ -static bfd_boolean +static bool _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data) { asection *sec; @@ -3204,24 +3204,24 @@ _bfd_elf_link_sec_merge_syms (struct elf_link_hash_entry *h, void *data) h->root.u.def.value); } - return TRUE; + return true; } /* Returns false if the symbol referred to by H should be considered to resolve local to the current module, and true if it should be considered to bind dynamically. */ -bfd_boolean +bool _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, struct bfd_link_info *info, - bfd_boolean not_local_protected) + bool not_local_protected) { - bfd_boolean binding_stays_local_p; + bool binding_stays_local_p; const struct elf_backend_data *bed; struct elf_link_hash_table *hash_table; if (h == NULL) - return FALSE; + return false; while (h->root.type == bfd_link_hash_indirect || h->root.type == bfd_link_hash_warning) @@ -3229,9 +3229,9 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, /* If it was forced local, then clearly it's not dynamic. */ if (h->dynindx == -1) - return FALSE; + return false; if (h->forced_local) - return FALSE; + return false; /* Identify the cases where name binding rules say that a visible symbol resolves locally. */ @@ -3242,12 +3242,12 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, { case STV_INTERNAL: case STV_HIDDEN: - return FALSE; + return false; case STV_PROTECTED: hash_table = elf_hash_table (info); if (!is_elf_hash_table (hash_table)) - return FALSE; + return false; bed = get_elf_backend_data (hash_table->dynobj); @@ -3255,7 +3255,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, that these symbols perhaps be resolved dynamically, even though we should be resolving them to the current module. */ if (!not_local_protected || !bed->is_function_type (h->type)) - binding_stays_local_p = TRUE; + binding_stays_local_p = true; break; default: @@ -3264,7 +3264,7 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, /* If it isn't defined locally, then clearly it's dynamic. */ if (!h->def_regular && !ELF_COMMON_DEF_P (h)) - return TRUE; + return true; /* Otherwise, the symbol is dynamic if binding rules don't tell us that it remains local. */ @@ -3284,26 +3284,26 @@ _bfd_elf_dynamic_symbol_p (struct elf_link_hash_entry *h, treatment of undefined weak symbols. For those that do not make undefined weak symbols dynamic, both functions may return false. */ -bfd_boolean +bool _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, struct bfd_link_info *info, - bfd_boolean local_protected) + bool local_protected) { const struct elf_backend_data *bed; struct elf_link_hash_table *hash_table; /* If it's a local sym, of course we resolve locally. */ if (h == NULL) - return TRUE; + return true; /* STV_HIDDEN or STV_INTERNAL ones must be local. */ if (ELF_ST_VISIBILITY (h->other) == STV_HIDDEN || ELF_ST_VISIBILITY (h->other) == STV_INTERNAL) - return TRUE; + return true; /* Forced local symbols resolve locally. */ if (h->forced_local) - return TRUE; + return true; /* Common symbols that become definitions don't get the DEF_REGULAR flag set, so test it first, and don't bail out. */ @@ -3312,26 +3312,26 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, /* If we don't have a definition in a regular file, then we can't resolve locally. The sym is either undefined or dynamic. */ else if (!h->def_regular) - return FALSE; + return false; /* Non-dynamic symbols resolve locally. */ if (h->dynindx == -1) - return TRUE; + return true; /* At this point, we know the symbol is defined and dynamic. In an executable it must resolve locally, likewise when building symbolic shared libraries. */ if (bfd_link_executable (info) || SYMBOLIC_BIND (info, h)) - return TRUE; + return true; /* Now deal with defined dynamic symbols in shared libraries. Ones with default visibility might not resolve locally. */ if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT) - return FALSE; + return false; hash_table = elf_hash_table (info); if (!is_elf_hash_table (hash_table)) - return TRUE; + return true; bed = get_elf_backend_data (hash_table->dynobj); @@ -3341,7 +3341,7 @@ _bfd_elf_symbol_refs_local_p (struct elf_link_hash_entry *h, || (info->extern_protected_data < 0 && !bed->extern_protected_data)) && !bed->is_function_type (h->type)) - return TRUE; + return true; /* Function pointer equality tests may require that STV_PROTECTED symbols be treated as dynamic symbols. If the address of a @@ -3380,7 +3380,7 @@ _bfd_elf_tls_setup (bfd *obfd, struct bfd_link_info *info) } /* Return TRUE iff this is a non-common, definition of a non-function symbol. */ -static bfd_boolean +static bool is_global_data_symbol_definition (bfd *abfd ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym) { @@ -3389,21 +3389,21 @@ is_global_data_symbol_definition (bfd *abfd ATTRIBUTE_UNUSED, /* Local symbols do not count, but target specific ones might. */ if (ELF_ST_BIND (sym->st_info) != STB_GLOBAL && ELF_ST_BIND (sym->st_info) < STB_LOOS) - return FALSE; + return false; bed = get_elf_backend_data (abfd); /* Function symbols do not count. */ if (bed->is_function_type (ELF_ST_TYPE (sym->st_info))) - return FALSE; + return false; /* If the section is undefined, then so is the symbol. */ if (sym->st_shndx == SHN_UNDEF) - return FALSE; + return false; /* If the symbol is defined in the common section, then it is a common definition and so does not count. */ if (bed->common_definition (sym)) - return FALSE; + return false; /* If the symbol is in a target specific section then we must rely upon the backend to tell us what it is. */ @@ -3415,15 +3415,15 @@ is_global_data_symbol_definition (bfd *abfd ATTRIBUTE_UNUSED, Instead for now assume that the definition is not global, Even if this is wrong, at least the linker will behave in the same way that it used to do. */ - return FALSE; + return false; - return TRUE; + return true; } /* Search the symbol table of the archive element of the archive ABFD whose archive map contains a mention of SYMDEF, and determine if the symbol is defined in this element. */ -static bfd_boolean +static bool elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef) { Elf_Internal_Shdr * hdr; @@ -3433,14 +3433,14 @@ elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef) Elf_Internal_Sym *isymbuf; Elf_Internal_Sym *isym; Elf_Internal_Sym *isymend; - bfd_boolean result; + bool result; abfd = _bfd_get_elt_at_filepos (abfd, symdef->file_offset); if (abfd == NULL) - return FALSE; + return false; if (! bfd_check_format (abfd, bfd_object)) - return FALSE; + return false; /* Select the appropriate symbol table. If we don't know if the object file is an IR object, give linker LTO plugin a chance to @@ -3478,16 +3478,16 @@ elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef) } if (extsymcount == 0) - return FALSE; + return false; /* Read in the symbol table. */ isymbuf = bfd_elf_get_elf_syms (abfd, hdr, extsymcount, extsymoff, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; /* Scan the symbol table looking for SYMDEF. */ - result = FALSE; + result = false; for (isym = isymbuf, isymend = isymbuf + extsymcount; isym < isymend; isym++) { const char *name; @@ -3511,7 +3511,7 @@ elf_link_is_defined_archive_symbol (bfd * abfd, carsym * symdef) /* Add an entry to the .dynamic table. */ -bfd_boolean +bool _bfd_elf_add_dynamic_entry (struct bfd_link_info *info, bfd_vma tag, bfd_vma val) @@ -3525,10 +3525,10 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info, hash_table = elf_hash_table (info); if (! is_elf_hash_table (hash_table)) - return FALSE; + return false; if (tag == DT_RELA || tag == DT_REL) - hash_table->dynamic_relocs = TRUE; + hash_table->dynamic_relocs = true; bed = get_elf_backend_data (hash_table->dynobj); s = bfd_get_linker_section (hash_table->dynobj, ".dynamic"); @@ -3537,7 +3537,7 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info, newsize = s->size + bed->s->sizeof_dyn; newcontents = (bfd_byte *) bfd_realloc (s->contents, newsize); if (newcontents == NULL) - return FALSE; + return false; dyn.d_tag = tag; dyn.d_un.d_val = val; @@ -3546,12 +3546,12 @@ _bfd_elf_add_dynamic_entry (struct bfd_link_info *info, s->size = newsize; s->contents = newcontents; - return TRUE; + return true; } /* Strip zero-sized dynamic sections. */ -bfd_boolean +bool _bfd_elf_strip_zero_sized_dynamic_sections (struct bfd_link_info *info) { struct elf_link_hash_table *hash_table; @@ -3561,28 +3561,28 @@ _bfd_elf_strip_zero_sized_dynamic_sections (struct bfd_link_info *info) Elf_Internal_Dyn dyn; bfd_byte *extdyn, *next; void (*swap_dyn_in) (bfd *, const void *, Elf_Internal_Dyn *); - bfd_boolean strip_zero_sized; - bfd_boolean strip_zero_sized_plt; + bool strip_zero_sized; + bool strip_zero_sized_plt; if (bfd_link_relocatable (info)) - return TRUE; + return true; hash_table = elf_hash_table (info); if (!is_elf_hash_table (hash_table)) - return FALSE; + return false; if (!hash_table->dynobj) - return TRUE; + return true; sdynamic= bfd_get_linker_section (hash_table->dynobj, ".dynamic"); if (!sdynamic) - return TRUE; + return true; bed = get_elf_backend_data (hash_table->dynobj); swap_dyn_in = bed->s->swap_dyn_in; - strip_zero_sized = FALSE; - strip_zero_sized_plt = FALSE; + strip_zero_sized = false; + strip_zero_sized_plt = false; /* Strip zero-sized dynamic sections. */ rela_dyn = bfd_get_section_by_name (info->output_bfd, ".rela.dyn"); @@ -3596,7 +3596,7 @@ _bfd_elf_strip_zero_sized_dynamic_sections (struct bfd_link_info *info) { *pp = s->next; info->output_bfd->section_count--; - strip_zero_sized = TRUE; + strip_zero_sized = true; if (s == rela_dyn) s = rela_dyn; if (s == rel_dyn) @@ -3604,7 +3604,7 @@ _bfd_elf_strip_zero_sized_dynamic_sections (struct bfd_link_info *info) else if (s == hash_table->splt->output_section) { s = hash_table->splt; - strip_zero_sized_plt = TRUE; + strip_zero_sized_plt = true; } else s = hash_table->srelplt; @@ -3644,7 +3644,7 @@ _bfd_elf_strip_zero_sized_dynamic_sections (struct bfd_link_info *info) return _bfd_elf_map_sections_to_segments (info->output_bfd, info); } - return TRUE; + return true; } /* Add a DT_NEEDED entry for this dynamic object. Returns -1 on error, @@ -3662,7 +3662,7 @@ bfd_elf_add_dt_needed_tag (bfd *abfd, struct bfd_link_info *info) hash_table = elf_hash_table (info); soname = elf_dt_name (abfd); - strindex = _bfd_elf_strtab_add (hash_table->dynstr, soname, FALSE); + strindex = _bfd_elf_strtab_add (hash_table->dynstr, soname, false); if (strindex == (size_t) -1) return -1; @@ -3704,7 +3704,7 @@ bfd_elf_add_dt_needed_tag (bfd *abfd, struct bfd_link_info *info) (or the end of list if STOP is NULL), and needed by a library that will be loaded. */ -static bfd_boolean +static bool on_needed_list (const char *soname, struct bfd_link_needed_list *needed, struct bfd_link_needed_list *stop) @@ -3720,9 +3720,9 @@ on_needed_list (const char *soname, the library. Therefore search prior to the current LOOK, preventing possible infinite recursion. */ || on_needed_list (elf_dt_name (look->by), needed, look))) - return TRUE; + return true; - return FALSE; + return false; } /* Sort symbol by value, section, size, and type. */ @@ -3784,20 +3784,20 @@ elf_sort_symbol (const void *arg1, const void *arg2) /* This function is used to adjust offsets into .dynstr for dynamic symbols. This is called via elf_link_hash_traverse. */ -static bfd_boolean +static bool elf_adjust_dynstr_offsets (struct elf_link_hash_entry *h, void *data) { struct elf_strtab_hash *dynstr = (struct elf_strtab_hash *) data; if (h->dynindx != -1) h->dynstr_index = _bfd_elf_strtab_offset (dynstr, h->dynstr_index); - return TRUE; + return true; } /* Assign string offsets in .dynstr, update all structures referencing them. */ -static bfd_boolean +static bool elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info) { struct elf_link_hash_table *hash_table = elf_hash_table (info); @@ -3924,14 +3924,14 @@ elf_finalize_dynstr (bfd *output_bfd, struct bfd_link_info *info) while (need.vn_next); } - return TRUE; + return true; } /* Return TRUE iff relocations for INPUT are compatible with OUTPUT. The default is to only match when the INPUT and OUTPUT are exactly the same target. */ -bfd_boolean +bool _bfd_elf_default_relocs_compatible (const bfd_target *input, const bfd_target *output) { @@ -3942,20 +3942,20 @@ _bfd_elf_default_relocs_compatible (const bfd_target *input, This version is used when different targets for the same architecture are virtually identical. */ -bfd_boolean +bool _bfd_elf_relocs_compatible (const bfd_target *input, const bfd_target *output) { const struct elf_backend_data *obed, *ibed; if (input == output) - return TRUE; + return true; ibed = xvec_get_elf_backend_data (input); obed = xvec_get_elf_backend_data (output); if (ibed->arch != obed->arch) - return FALSE; + return false; /* If both backends are using this function, deem them compatible. */ return ibed->relocs_compatible == obed->relocs_compatible; @@ -3965,7 +3965,7 @@ _bfd_elf_relocs_compatible (const bfd_target *input, we are about to handle an as-needed lib, or have finished processing the lib. */ -bfd_boolean +bool _bfd_elf_notice_as_needed (bfd *ibfd, struct bfd_link_info *info, enum notice_asneeded_action act) @@ -3975,7 +3975,7 @@ _bfd_elf_notice_as_needed (bfd *ibfd, /* Check relocations an ELF object file. */ -bfd_boolean +bool _bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -4009,7 +4009,7 @@ _bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) for (o = abfd->sections; o != NULL; o = o->next) { Elf_Internal_Rela *internal_relocs; - bfd_boolean ok; + bool ok; /* Don't check relocations in excluded sections. Don't do anything special with non-loaded, non-alloced sections. @@ -4031,7 +4031,7 @@ _bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) internal_relocs = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory); if (internal_relocs == NULL) - return FALSE; + return false; ok = (*bed->check_relocs) (abfd, info, o, internal_relocs); @@ -4039,16 +4039,16 @@ _bfd_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) free (internal_relocs); if (! ok) - return FALSE; + return false; } } - return TRUE; + return true; } /* Add symbols from an ELF object file to the linker hash table. */ -static bfd_boolean +static bool elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Ehdr *ehdr; @@ -4057,7 +4057,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) size_t extsymcount; size_t extsymoff; struct elf_link_hash_entry **sym_hash; - bfd_boolean dynamic; + bool dynamic; Elf_External_Versym *extversym = NULL; Elf_External_Versym *extversym_end = NULL; Elf_External_Versym *ever; @@ -4068,7 +4068,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) Elf_Internal_Sym *isym; Elf_Internal_Sym *isymend; const struct elf_backend_data *bed; - bfd_boolean add_needed; + bool add_needed; struct elf_link_hash_table *htab; void *alloc_mark = NULL; struct bfd_hash_entry **old_table = NULL; @@ -4081,16 +4081,16 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) void *old_strtab = NULL; size_t tabsize = 0; asection *s; - bfd_boolean just_syms; + bool just_syms; htab = elf_hash_table (info); bed = get_elf_backend_data (abfd); if ((abfd->flags & DYNAMIC) == 0) - dynamic = FALSE; + dynamic = false; else { - dynamic = TRUE; + dynamic = true; /* You can't use -r against a dynamic object. Also, there's no hope of using a dynamic object which does not exactly match @@ -4149,7 +4149,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_entry *h; - h = elf_link_hash_lookup (htab, name, FALSE, FALSE, TRUE); + h = elf_link_hash_lookup (htab, name, false, false, true); /* FIXME: What about bfd_link_hash_common? */ if (h != NULL @@ -4170,7 +4170,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (! (_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_WARNING, s, 0, msg, - FALSE, bed->collect, NULL))) + false, bed->collect, NULL))) goto error_return; if (bfd_link_executable (info)) @@ -4189,7 +4189,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) just_syms = ((s = abfd->sections) != NULL && s->sec_info_type == SEC_INFO_TYPE_JUST_SYMS); - add_needed = TRUE; + add_needed = true; if (! dynamic) { /* If we are creating a shared library, create all the dynamic @@ -4421,14 +4421,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) loaded_lib = loaded_lib->next) { if (strcmp (elf_dt_name (loaded_lib->abfd), soname) == 0) - return TRUE; + return true; } /* Create dynamic sections for backends that require that be done before setup_gnu_properties. */ if (add_needed && !_bfd_elf_link_create_dynamic_sections (abfd, info)) - return FALSE; + return false; /* Save the DT_AUDIT entry for the linker emulation code. */ elf_dt_audit (abfd) = audit; @@ -4622,18 +4622,18 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) const char *name; struct elf_link_hash_entry *h; struct elf_link_hash_entry *hi; - bfd_boolean definition; - bfd_boolean size_change_ok; - bfd_boolean type_change_ok; - bfd_boolean new_weak; - bfd_boolean old_weak; + bool definition; + bool size_change_ok; + bool type_change_ok; + bool new_weak; + bool old_weak; bfd *override; - bfd_boolean common; - bfd_boolean discarded; + bool common; + bool discarded; unsigned int old_alignment; unsigned int shindex; bfd *old_bfd; - bfd_boolean matched; + bool matched; override = NULL; @@ -4645,9 +4645,9 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { /* Treat common symbol as undefined for --no-define-common. */ isym->st_shndx = SHN_UNDEF; - common = FALSE; + common = false; } - discarded = FALSE; + discarded = false; bind = ELF_ST_BIND (isym->st_info); switch (bind) @@ -4716,7 +4716,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) /* Symbols from discarded section are undefined. We keep its visibility. */ sec = bfd_und_section_ptr; - discarded = TRUE; + discarded = true; isym->st_shndx = SHN_UNDEF; } else if ((abfd->flags & (EXEC_P | DYNAMIC)) != 0) @@ -4784,14 +4784,14 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (bfd_is_und_section (sec) || bfd_is_com_section (sec)) - definition = FALSE; + definition = false; else - definition = TRUE; + definition = true; - size_change_ok = FALSE; + size_change_ok = false; type_change_ok = bed->type_change_ok; - old_weak = FALSE; - matched = FALSE; + old_weak = false; + matched = false; old_alignment = 0; old_bfd = NULL; new_sec = sec; @@ -4800,7 +4800,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Versym iver; unsigned int vernum = 0; - bfd_boolean skip; + bool skip; if (ever == NULL) { @@ -4941,7 +4941,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) /* Override a definition only if the new symbol matches the existing one. */ if (override && matched) - definition = FALSE; + definition = false; h = *sym_hash; while (h->root.type == bfd_link_hash_indirect @@ -4956,7 +4956,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (! (_bfd_generic_link_add_one_symbol (info, override ? override : abfd, name, flags, sec, value, - NULL, FALSE, bed->collect, + NULL, false, bed->collect, (struct bfd_link_hash_entry **) sym_hash))) goto error_free_vers; @@ -5025,7 +5025,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) reference or definition we just found. A dynamic symbol is one which is referenced or defined by both a regular object and a shared object. */ - bfd_boolean dynsym = FALSE; + bool dynsym = false; /* Plugin symbols aren't normal. Don't set def/ref flags. */ if ((abfd->flags & BFD_PLUGIN) != 0) @@ -5076,7 +5076,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (bfd_link_dll (info) || h->def_dynamic || h->ref_dynamic) - dynsym = TRUE; + dynsym = true; } else { @@ -5084,7 +5084,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) || h->ref_regular || (h->is_weakalias && weakdef (h)->dynindx != -1)) - dynsym = TRUE; + dynsym = true; } /* Check to see if we need to add an indirect symbol for @@ -5220,11 +5220,11 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (definition && (sec->flags & SEC_DEBUGGING) && !bfd_link_relocatable (info)) - dynsym = FALSE; + dynsym = false; /* Nor should we make plugin symbols dynamic. */ if ((abfd->flags & BFD_PLUGIN) != 0) - dynsym = FALSE; + dynsym = false; if (definition) { @@ -5271,8 +5271,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { case STV_INTERNAL: case STV_HIDDEN: - (*bed->elf_backend_hide_symbol) (info, h, TRUE); - dynsym = FALSE; + (*bed->elf_backend_hide_symbol) (info, h, true); + dynsym = false; break; } @@ -5318,8 +5318,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) /* Create dynamic sections for backends that require that be done before setup_gnu_properties. */ if (!_bfd_elf_link_create_dynamic_sections (abfd, info)) - return FALSE; - add_needed = TRUE; + return false; + add_needed = true; } } } @@ -5449,7 +5449,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) objalloc_free_block ((struct objalloc *) htab->root.table.memory, alloc_mark); free (nondeflt_vers); - return TRUE; + return true; } if (old_tab != NULL) @@ -5488,13 +5488,13 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) hi = (struct elf_link_hash_entry *) bfd_link_hash_lookup (&htab->root, shortname, - FALSE, FALSE, FALSE); + false, false, false); if (hi != NULL && hi->root.type == h->root.type && hi->root.u.def.value == h->root.u.def.value && hi->root.u.def.section == h->root.u.def.section) { - (*bed->elf_backend_hide_symbol) (info, hi, TRUE); + (*bed->elf_backend_hide_symbol) (info, hi, true); hi->root.type = bfd_link_hash_indirect; hi->root.u.i.link = (struct bfd_link_hash_entry *) h; (*bed->elf_backend_copy_indirect_symbol) (info, h, hi); @@ -5675,7 +5675,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) if (bed->check_directives && !(*bed->check_directives) (abfd, info)) - return FALSE; + return false; /* If this is a non-traditional link, try to optimize the handling of the .stab/.stabstr sections. */ @@ -5728,7 +5728,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) && (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) != 0) elf_dyn_lib_class (abfd) |= DYN_NO_NEEDED; - return TRUE; + return true; error_free_vers: free (old_tab); @@ -5738,7 +5738,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) error_free_sym: free (isymbuf); error_return: - return FALSE; + return false; } /* Return the linker hash table entry of a symbol that might be @@ -5753,7 +5753,7 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, char *p, *copy; size_t len, first; - h = elf_link_hash_lookup (elf_hash_table (info), name, FALSE, FALSE, TRUE); + h = elf_link_hash_lookup (elf_hash_table (info), name, false, false, true); if (h != NULL) return h; @@ -5776,14 +5776,14 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, memcpy (copy, name, first); memcpy (copy + first, name + first + 1, len - first); - h = elf_link_hash_lookup (elf_hash_table (info), copy, FALSE, FALSE, TRUE); + h = elf_link_hash_lookup (elf_hash_table (info), copy, false, false, true); if (h == NULL) { /* We also need to check references to the symbol without the version. */ copy[first - 1] = '\0'; h = elf_link_hash_lookup (elf_hash_table (info), copy, - FALSE, FALSE, TRUE); + false, false, true); } bfd_release (abfd, copy); @@ -5803,13 +5803,13 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, Unfortunately, we do have to make multiple passes over the symbol table until nothing further is resolved. */ -static bfd_boolean +static bool elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { symindex c; unsigned char *included = NULL; carsym *symdefs; - bfd_boolean loop; + bool loop; size_t amt; const struct elf_backend_data *bed; struct elf_link_hash_entry * (*archive_symbol_lookup) @@ -5819,9 +5819,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { /* An empty archive is a special case. */ if (bfd_openr_next_archived_file (abfd, NULL) == NULL) - return TRUE; + return true; bfd_set_error (bfd_error_no_armap); - return FALSE; + return false; } /* Keep track of all symbols we know to be already defined, and all @@ -5829,11 +5829,11 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) second and subsequent passes. */ c = bfd_ardata (abfd)->symdef_count; if (c == 0) - return TRUE; + return true; amt = c * sizeof (*included); included = (unsigned char *) bfd_zmalloc (amt); if (included == NULL) - return FALSE; + return false; symdefs = bfd_ardata (abfd)->symdefs; bed = get_elf_backend_data (abfd); @@ -5846,7 +5846,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) carsym *symdef; carsym *symdefend; - loop = FALSE; + loop = false; last = -1; symdef = symdefs; @@ -5862,7 +5862,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) continue; if (symdef->file_offset == last) { - included[i] = TRUE; + included[i] = true; continue; } @@ -5902,7 +5902,7 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { if (h->root.type != bfd_link_hash_undefweak) /* Symbol must be defined. Don't check it again. */ - included[i] = TRUE; + included[i] = true; continue; } @@ -5930,14 +5930,14 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) does not require another pass. This isn't a bug, but it does make the code less efficient than it could be. */ if (undefs_tail != info->hash->undefs_tail) - loop = TRUE; + loop = true; /* Look backward to mark all symbols from this object file which we have already seen in this pass. */ mark = i; do { - included[mark] = TRUE; + included[mark] = true; if (mark == 0) break; --mark; @@ -5952,17 +5952,17 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) while (loop); free (included); - return TRUE; + return true; error_return: free (included); - return FALSE; + return false; } /* Given an ELF BFD, add symbols to the global hash table as appropriate. */ -bfd_boolean +bool bfd_elf_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -5973,20 +5973,20 @@ bfd_elf_link_add_symbols (bfd *abfd, struct bfd_link_info *info) return elf_link_add_archive_symbols (abfd, info); default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } struct hash_codes_info { unsigned long *hashcodes; - bfd_boolean error; + bool error; }; /* This function will be called though elf_link_hash_traverse to store all hash value of the exported symbols in an array. */ -static bfd_boolean +static bool elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data) { struct hash_codes_info *inf = (struct hash_codes_info *) data; @@ -5996,7 +5996,7 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data) /* Ignore indirect symbols. These are added by the versioning code. */ if (h->dynindx == -1) - return TRUE; + return true; name = h->root.root.string; if (h->versioned >= versioned) @@ -6007,8 +6007,8 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data) alc = (char *) bfd_malloc (p - name + 1); if (alc == NULL) { - inf->error = TRUE; - return FALSE; + inf->error = true; + return false; } memcpy (alc, name, p - name); alc[p - name] = '\0'; @@ -6027,7 +6027,7 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data) h->u.elf_hash_value = ha; free (alc); - return TRUE; + return true; } struct collect_gnu_hash_codes @@ -6049,13 +6049,13 @@ struct collect_gnu_hash_codes long int local_indx; long int shift1, shift2; unsigned long int mask; - bfd_boolean error; + bool error; }; /* This function will be called though elf_link_hash_traverse to store all hash value of the exported symbols in an array. */ -static bfd_boolean +static bool elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) { struct collect_gnu_hash_codes *s = (struct collect_gnu_hash_codes *) data; @@ -6065,11 +6065,11 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) /* Ignore indirect symbols. These are added by the versioning code. */ if (h->dynindx == -1) - return TRUE; + return true; /* Ignore also local symbols and undefined symbols. */ if (! (*s->bed->elf_hash_symbol) (h)) - return TRUE; + return true; name = h->root.root.string; if (h->versioned >= versioned) @@ -6080,8 +6080,8 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) alc = (char *) bfd_malloc (p - name + 1); if (alc == NULL) { - s->error = TRUE; - return FALSE; + s->error = true; + return false; } memcpy (alc, name, p - name); alc[p - name] = '\0'; @@ -6101,7 +6101,7 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) s->min_dynindx = h->dynindx; free (alc); - return TRUE; + return true; } /* This function will be called though elf_link_hash_traverse to do @@ -6109,7 +6109,7 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) If using .MIPS.xhash, invoke record_xhash_symbol to add symbol index to the translation table. */ -static bfd_boolean +static bool elf_gnu_hash_process_symidx (struct elf_link_hash_entry *h, void *data) { struct collect_gnu_hash_codes *s = (struct collect_gnu_hash_codes *) data; @@ -6118,7 +6118,7 @@ elf_gnu_hash_process_symidx (struct elf_link_hash_entry *h, void *data) /* Ignore indirect symbols. */ if (h->dynindx == -1) - return TRUE; + return true; /* Ignore also local symbols and undefined symbols. */ if (! (*s->bed->elf_hash_symbol) (h)) @@ -6133,7 +6133,7 @@ elf_gnu_hash_process_symidx (struct elf_link_hash_entry *h, void *data) else h->dynindx = s->local_indx++; } - return TRUE; + return true; } bucket = s->hashval[h->dynindx] % s->bucketcount; @@ -6157,12 +6157,12 @@ elf_gnu_hash_process_symidx (struct elf_link_hash_entry *h, void *data) } else h->dynindx = s->indx[bucket]++; - return TRUE; + return true; } /* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */ -bfd_boolean +bool _bfd_elf_hash_symbol (struct elf_link_hash_entry *h) { return !(h->forced_local @@ -6332,7 +6332,7 @@ compute_bucket_count (struct bfd_link_info *info ATTRIBUTE_UNUSED, /* Size any SHT_GROUP section for ld -r. */ -bfd_boolean +bool _bfd_elf_size_group_sections (struct bfd_link_info *info) { bfd *ibfd; @@ -6343,15 +6343,15 @@ _bfd_elf_size_group_sections (struct bfd_link_info *info) && (s = ibfd->sections) != NULL && s->sec_info_type != SEC_INFO_TYPE_JUST_SYMS && !_bfd_elf_fixup_group_sections (ibfd, bfd_abs_section_ptr)) - return FALSE; - return TRUE; + return false; + return true; } /* Set a default stack segment size. The value in INFO wins. If it is unset, LEGACY_SYMBOL's value is used, and if that symbol is undefined it is initialized. */ -bfd_boolean +bool bfd_elf_stack_segment_size (bfd *output_bfd, struct bfd_link_info *info, const char *legacy_symbol, @@ -6362,7 +6362,7 @@ bfd_elf_stack_segment_size (bfd *output_bfd, /* Look for legacy symbol. */ if (legacy_symbol) h = elf_link_hash_lookup (elf_hash_table (info), legacy_symbol, - FALSE, FALSE, FALSE); + false, false, false); if (h && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) && h->def_regular @@ -6397,15 +6397,15 @@ bfd_elf_stack_segment_size (bfd *output_bfd, (info, output_bfd, legacy_symbol, BSF_GLOBAL, bfd_abs_section_ptr, info->stacksize >= 0 ? info->stacksize : 0, - NULL, FALSE, get_elf_backend_data (output_bfd)->collect, &bh))) - return FALSE; + NULL, false, get_elf_backend_data (output_bfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->def_regular = 1; h->type = STT_OBJECT; } - return TRUE; + return true; } /* Sweep symbols in swept sections. Called via elf_link_hash_traverse. */ @@ -6414,10 +6414,10 @@ struct elf_gc_sweep_symbol_info { struct bfd_link_info *info; void (*hide_symbol) (struct bfd_link_info *, struct elf_link_hash_entry *, - bfd_boolean); + bool); }; -static bfd_boolean +static bool elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data) { if (!h->mark @@ -6431,13 +6431,13 @@ elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data) struct elf_gc_sweep_symbol_info *inf; inf = (struct elf_gc_sweep_symbol_info *) data; - (*inf->hide_symbol) (inf->info, h, TRUE); + (*inf->hide_symbol) (inf->info, h, true); h->def_regular = 0; h->ref_regular = 0; h->ref_regular_nonweak = 0; } - return TRUE; + return true; } /* Set up the sizes and contents of the ELF dynamic sections. This is @@ -6445,7 +6445,7 @@ elf_gc_sweep_symbol (struct elf_link_hash_entry *h, void *data) must set the sizes of the sections before the linker sets the addresses of the various sections. */ -bfd_boolean +bool bfd_elf_size_dynamic_sections (bfd *output_bfd, const char *soname, const char *rpath, @@ -6462,7 +6462,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, *sinterpptr = NULL; if (!is_elf_hash_table (info->hash)) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; @@ -6483,21 +6483,21 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, struct elf_info_failed eif; eif.info = info; - eif.failed = FALSE; + eif.failed = false; elf_link_hash_traverse (elf_hash_table (info), _bfd_elf_export_symbol, &eif); if (eif.failed) - return FALSE; + return false; } if (soname != NULL) { soname_indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, - soname, TRUE); + soname, true); if (soname_indx == (size_t) -1 || !_bfd_elf_add_dynamic_entry (info, DT_SONAME, soname_indx)) - return FALSE; + return false; } else soname_indx = (size_t) -1; @@ -6521,7 +6521,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, newname = (char *) bfd_malloc (newlen); if (newname == NULL) - return FALSE; + return false; newname[0] = leading_char; memcpy (newname + (leading_char != '\0'), name, namelen); @@ -6530,8 +6530,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, *p++ = ELF_VER_CHR; memcpy (p, verstr, verlen + 1); newh = elf_link_hash_lookup (elf_hash_table (info), - newname, FALSE, FALSE, - FALSE); + newname, false, false, + false); if (newh == NULL || (newh->root.type != bfd_link_hash_defined && newh->root.type != bfd_link_hash_defweak)) @@ -6540,8 +6540,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, *p++ = ELF_VER_CHR; memcpy (p, verstr, verlen + 1); newh = elf_link_hash_lookup (elf_hash_table (info), - newname, FALSE, FALSE, - FALSE); + newname, false, false, + false); } free (newname); @@ -6556,18 +6556,18 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, /* Attach all the symbols to their version information. */ asvinfo.info = info; - asvinfo.failed = FALSE; + asvinfo.failed = false; elf_link_hash_traverse (elf_hash_table (info), _bfd_elf_link_assign_sym_version, &asvinfo); if (asvinfo.failed) - return FALSE; + return false; if (!info->allow_undefined_version) { /* Check if all global versions have a definition. */ - bfd_boolean all_defined = TRUE; + bool all_defined = true; for (t = info->version_info; t != NULL; t = t->next) for (d = t->globals.list; d != NULL; d = d->next) if (d->literal && !d->symver && !d->script) @@ -6575,13 +6575,13 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, _bfd_error_handler (_("%s: undefined version: %s"), d->pattern, t->name); - all_defined = FALSE; + all_defined = false; } if (!all_defined) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -6644,7 +6644,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, s->size = size; s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); if (s->contents == NULL && s->size != 0) - return FALSE; + return false; /* Fill in the version definition section. */ @@ -6681,9 +6681,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, name = lbasename (bfd_get_filename (output_bfd)); def.vd_hash = bfd_elf_hash (name); indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, - name, FALSE); + name, false); if (indx == (size_t) -1) - return FALSE; + return false; defaux.vda_name = indx; } defaux.vda_next = 0; @@ -6697,9 +6697,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, bh = NULL; if (! (_bfd_generic_link_add_one_symbol (info, dynobj, name, BSF_GLOBAL, bfd_abs_section_ptr, - 0, NULL, FALSE, + 0, NULL, false, get_elf_backend_data (dynobj)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; h->def_regular = 1; @@ -6707,7 +6707,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, h->verinfo.vertree = NULL; if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; /* Create a duplicate of the base version with the same aux block, but different flags. */ @@ -6744,9 +6744,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, bh = NULL; if (! (_bfd_generic_link_add_one_symbol (info, dynobj, t->name, BSF_GLOBAL, bfd_abs_section_ptr, - 0, NULL, FALSE, + 0, NULL, false, get_elf_backend_data (dynobj)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; h->def_regular = 1; @@ -6754,7 +6754,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, h->verinfo.vertree = t; if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; def.vd_version = VER_DEF_CURRENT; def.vd_flags = 0; @@ -6850,13 +6850,13 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, sinfo.vers = elf_tdata (output_bfd)->cverdefs; if (sinfo.vers == 0) sinfo.vers = 1; - sinfo.failed = FALSE; + sinfo.failed = false; elf_link_hash_traverse (elf_hash_table (info), _bfd_elf_link_find_version_dependencies, &sinfo); if (sinfo.failed) - return FALSE; + return false; if (elf_tdata (output_bfd)->verref == NULL) s->flags |= SEC_EXCLUDE; @@ -6885,7 +6885,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, s->size = size; s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); if (s->contents == NULL) - return FALSE; + return false; p = s->contents; for (vn = elf_tdata (output_bfd)->verref; @@ -6907,9 +6907,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, ? elf_dt_name (vn->vn_bfd) : lbasename (bfd_get_filename (vn->vn_bfd)), - FALSE); + false); if (indx == (size_t) -1) - return FALSE; + return false; vn->vn_file = indx; vn->vn_aux = sizeof (Elf_External_Verneed); if (vn->vn_nextref == NULL) @@ -6926,9 +6926,9 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, { a->vna_hash = bfd_elf_hash (a->vna_nodename); indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, - a->vna_nodename, FALSE); + a->vna_nodename, false); if (indx == (size_t) -1) - return FALSE; + return false; a->vna_name = indx; if (a->vna_nextptr == NULL) a->vna_next = 0; @@ -6954,13 +6954,13 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, if (bfd_link_relocatable (info) && !_bfd_elf_size_group_sections (info)) - return FALSE; + return false; /* The backend may have to create some sections regardless of whether we're dynamic or not. */ if (bed->elf_backend_always_size_sections && ! (*bed->elf_backend_always_size_sections) (output_bfd, info)) - return FALSE; + return false; /* Determine any GNU_STACK segment requirements, after the backend has had a chance to set a default segment size. */ @@ -7017,7 +7017,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, if (info->symbolic) { if (!_bfd_elf_add_dynamic_entry (info, DT_SYMBOLIC, 0)) - return FALSE; + return false; info->flags |= DF_SYMBOLIC; } @@ -7027,13 +7027,13 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, bfd_vma tag; indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, rpath, - TRUE); + true); if (indx == (size_t) -1) - return FALSE; + return false; tag = info->new_dtags ? DT_RUNPATH : DT_RPATH; if (!_bfd_elf_add_dynamic_entry (info, tag, indx)) - return FALSE; + return false; } if (filter_shlib != NULL) @@ -7041,10 +7041,10 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, size_t indx; indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, - filter_shlib, TRUE); + filter_shlib, true); if (indx == (size_t) -1 || !_bfd_elf_add_dynamic_entry (info, DT_FILTER, indx)) - return FALSE; + return false; } if (auxiliary_filters != NULL) @@ -7056,10 +7056,10 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, size_t indx; indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, - *p, TRUE); + *p, true); if (indx == (size_t) -1 || !_bfd_elf_add_dynamic_entry (info, DT_AUXILIARY, indx)) - return FALSE; + return false; } } @@ -7068,10 +7068,10 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, size_t indx; indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, audit, - TRUE); + true); if (indx == (size_t) -1 || !_bfd_elf_add_dynamic_entry (info, DT_AUDIT, indx)) - return FALSE; + return false; } if (depaudit != NULL) @@ -7079,14 +7079,14 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, size_t indx; indx = _bfd_elf_strtab_add (elf_hash_table (info)->dynstr, depaudit, - TRUE); + true); if (indx == (size_t) -1 || !_bfd_elf_add_dynamic_entry (info, DT_DEPAUDIT, indx)) - return FALSE; + return false; } eif.info = info; - eif.failed = FALSE; + eif.failed = false; /* Find all symbols which were defined in a dynamic object and make the backend pick a reasonable value for them. */ @@ -7094,7 +7094,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, _bfd_elf_adjust_dynamic_symbol, &eif); if (eif.failed) - return FALSE; + return false; /* Add some entries to the .dynamic section. We fill in some of the values later, in bfd_elf_final_link, but we must add the entries @@ -7104,27 +7104,27 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, call then add the corresponding DT_INIT/DT_FINI entries. */ h = (info->init_function ? elf_link_hash_lookup (elf_hash_table (info), - info->init_function, FALSE, - FALSE, FALSE) + info->init_function, false, + false, false) : NULL); if (h != NULL && (h->ref_regular || h->def_regular)) { if (!_bfd_elf_add_dynamic_entry (info, DT_INIT, 0)) - return FALSE; + return false; } h = (info->fini_function ? elf_link_hash_lookup (elf_hash_table (info), - info->fini_function, FALSE, - FALSE, FALSE) + info->fini_function, false, + false, false) : NULL); if (h != NULL && (h->ref_regular || h->def_regular)) { if (!_bfd_elf_add_dynamic_entry (info, DT_FINI, 0)) - return FALSE; + return false; } s = bfd_get_section_by_name (output_bfd, ".preinit_array"); @@ -7151,26 +7151,26 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, } bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } if (!_bfd_elf_add_dynamic_entry (info, DT_PREINIT_ARRAY, 0) || !_bfd_elf_add_dynamic_entry (info, DT_PREINIT_ARRAYSZ, 0)) - return FALSE; + return false; } s = bfd_get_section_by_name (output_bfd, ".init_array"); if (s != NULL && s->linker_has_input) { if (!_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAY, 0) || !_bfd_elf_add_dynamic_entry (info, DT_INIT_ARRAYSZ, 0)) - return FALSE; + return false; } s = bfd_get_section_by_name (output_bfd, ".fini_array"); if (s != NULL && s->linker_has_input) { if (!_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAY, 0) || !_bfd_elf_add_dynamic_entry (info, DT_FINI_ARRAYSZ, 0)) - return FALSE; + return false; } dynstr = bfd_get_linker_section (dynobj, ".dynstr"); @@ -7196,19 +7196,19 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, || (info->gnu_flags_1 && !_bfd_elf_add_dynamic_entry (info, DT_GNU_FLAGS_1, info->gnu_flags_1))) - return FALSE; + return false; } } if (! _bfd_elf_maybe_strip_eh_frame_hdr (info)) - return FALSE; + return false; /* The backend must work out the sizes of all the other dynamic sections. */ if (dynobj != NULL && bed->elf_backend_size_dynamic_sections != NULL && ! (*bed->elf_backend_size_dynamic_sections) (output_bfd, info)) - return FALSE; + return false; if (dynobj != NULL && elf_hash_table (info)->dynamic_sections_created) { @@ -7218,18 +7218,18 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, if (!_bfd_elf_add_dynamic_entry (info, DT_VERDEF, 0) || !_bfd_elf_add_dynamic_entry (info, DT_VERDEFNUM, crefs)) - return FALSE; + return false; } if ((info->new_dtags && info->flags) || (info->flags & DF_STATIC_TLS)) { if (!_bfd_elf_add_dynamic_entry (info, DT_FLAGS, info->flags)) - return FALSE; + return false; } else if (info->flags & DF_BIND_NOW) { if (!_bfd_elf_add_dynamic_entry (info, DT_BIND_NOW, 0)) - return FALSE; + return false; } if (info->flags_1) @@ -7239,7 +7239,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, | DF_1_NODELETE | DF_1_NOOPEN); if (!_bfd_elf_add_dynamic_entry (info, DT_FLAGS_1, info->flags_1)) - return FALSE; + return false; } if (elf_tdata (output_bfd)->cverrefs) @@ -7248,7 +7248,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, if (!_bfd_elf_add_dynamic_entry (info, DT_VERNEED, 0) || !_bfd_elf_add_dynamic_entry (info, DT_VERNEEDNUM, crefs)) - return FALSE; + return false; } if ((elf_tdata (output_bfd)->cverrefs == 0 @@ -7261,7 +7261,7 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, s->flags |= SEC_EXCLUDE; } } - return TRUE; + return true; } /* Find the first non-excluded output section. We'll use its @@ -7318,7 +7318,7 @@ _bfd_elf_init_2_index_sections (bfd *output_bfd, struct bfd_link_info *info) #define GNU_HASH_SECTION_NAME(bed) \ (bed)->record_xhash_symbol != NULL ? ".MIPS.xhash" : ".gnu.hash" -bfd_boolean +bool bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) { const struct elf_backend_data *bed; @@ -7326,7 +7326,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) bfd_size_type dynsymcount = 0; if (!is_elf_hash_table (info->hash)) - return TRUE; + return true; bed = get_elf_backend_data (output_bfd); (*bed->elf_backend_init_index_section) (output_bfd, info); @@ -7363,10 +7363,10 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) s->size = dynsymcount * sizeof (Elf_External_Versym); s->contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); if (s->contents == NULL) - return FALSE; + return false; if (!_bfd_elf_add_dynamic_entry (info, DT_VERSYM, 0)) - return FALSE; + return false; } /* Set the size of the .dynsym and .hash sections. We counted @@ -7381,7 +7381,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) s->contents = (unsigned char *) bfd_alloc (output_bfd, s->size); if (s->contents == NULL) - return FALSE; + return false; /* The first entry in .dynsym is a dummy symbol. Clear all the section syms, in case we don't output them all. */ @@ -7407,9 +7407,9 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) amt = dynsymcount * sizeof (unsigned long int); hashcodes = (unsigned long int *) bfd_malloc (amt); if (hashcodes == NULL) - return FALSE; + return false; hashinf.hashcodes = hashcodes; - hashinf.error = FALSE; + hashinf.error = false; /* Put all hash values in HASHCODES. */ elf_link_hash_traverse (elf_hash_table (info), @@ -7417,7 +7417,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) if (hashinf.error) { free (hashcodes); - return FALSE; + return false; } nsyms = hashinf.hashcodes - hashcodes; @@ -7426,7 +7426,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) free (hashcodes); if (bucketcount == 0 && nsyms > 0) - return FALSE; + return false; elf_hash_table (info)->bucketcount = bucketcount; @@ -7436,7 +7436,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) s->size = ((2 + bucketcount + dynsymcount) * hash_entry_size); s->contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); if (s->contents == NULL) - return FALSE; + return false; bfd_put (8 * hash_entry_size, output_bfd, bucketcount, s->contents); bfd_put (8 * hash_entry_size, output_bfd, dynsymcount, @@ -7459,7 +7459,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) amt = dynsymcount * 2 * sizeof (unsigned long int); cinfo.hashcodes = (long unsigned int *) bfd_malloc (amt); if (cinfo.hashcodes == NULL) - return FALSE; + return false; cinfo.hashval = cinfo.hashcodes + dynsymcount; cinfo.min_dynindx = -1; @@ -7472,7 +7472,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) if (cinfo.error) { free (cinfo.hashcodes); - return FALSE; + return false; } bucketcount @@ -7481,7 +7481,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) if (bucketcount == 0) { free (cinfo.hashcodes); - return FALSE; + return false; } s = bfd_get_linker_section (dynobj, GNU_HASH_SECTION_NAME (bed)); @@ -7495,7 +7495,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) s->size = 5 * 4 + bed->s->arch_size / 8; contents = (unsigned char *) bfd_zalloc (output_bfd, s->size); if (contents == NULL) - return FALSE; + return false; s->contents = contents; /* 1 empty bucket. */ bfd_put_32 (output_bfd, 1, contents); @@ -7544,7 +7544,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) if (cinfo.bitmask == NULL) { free (cinfo.hashcodes); - return FALSE; + return false; } cinfo.counts = (long unsigned int *) (cinfo.bitmask + maskwords); @@ -7576,7 +7576,7 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) { free (cinfo.bitmask); free (cinfo.hashcodes); - return FALSE; + return false; } s->contents = contents; @@ -7625,10 +7625,10 @@ bfd_elf_size_dynsym_hash_dynstr (bfd *output_bfd, struct bfd_link_info *info) for (dtagcount = 0; dtagcount <= info->spare_dynamic_tags; ++dtagcount) if (!_bfd_elf_add_dynamic_entry (info, DT_NULL, 0)) - return FALSE; + return false; } - return TRUE; + return true; } /* Make sure sec_info_type is cleared if sec_info is cleared too. */ @@ -7643,14 +7643,14 @@ merge_sections_remove_hook (bfd *abfd ATTRIBUTE_UNUSED, /* Finish SHF_MERGE section merging. */ -bfd_boolean +bool _bfd_elf_merge_sections (bfd *obfd, struct bfd_link_info *info) { bfd *ibfd; asection *sec; if (!is_elf_hash_table (info->hash)) - return FALSE; + return false; for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) if ((ibfd->flags & DYNAMIC) == 0 @@ -7667,7 +7667,7 @@ _bfd_elf_merge_sections (bfd *obfd, struct bfd_link_info *info) if (! _bfd_add_merge_section (obfd, &elf_hash_table (info)->merge_info, sec, &secdata->sec_info)) - return FALSE; + return false; else if (secdata->sec_info) sec->sec_info_type = SEC_INFO_TYPE_MERGE; } @@ -7675,7 +7675,7 @@ _bfd_elf_merge_sections (bfd *obfd, struct bfd_link_info *info) if (elf_hash_table (info)->merge_info != NULL) _bfd_merge_sections (obfd, info, elf_hash_table (info)->merge_info, merge_sections_remove_hook); - return TRUE; + return true; } /* Create an entry in an ELF linker hash table. */ @@ -7807,7 +7807,7 @@ _bfd_elf_link_hash_copy_indirect (struct bfd_link_info *info, void _bfd_elf_link_hash_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h, - bfd_boolean force_local) + bool force_local) { /* STT_GNU_IFUNC symbol must go through PLT. */ if (h->type != STT_GNU_IFUNC) @@ -7841,7 +7841,7 @@ _bfd_elf_link_hide_symbol (bfd *output_bfd, = get_elf_backend_data (output_bfd); struct elf_link_hash_entry *eh = (struct elf_link_hash_entry *) h; - bed->elf_backend_hide_symbol (info, eh, TRUE); + bed->elf_backend_hide_symbol (info, eh, true); eh->def_dynamic = 0; eh->ref_dynamic = 0; eh->dynamic_def = 0; @@ -7851,7 +7851,7 @@ _bfd_elf_link_hide_symbol (bfd *output_bfd, /* Initialize an ELF linker hash table. *TABLE has been zeroed by our caller. */ -bfd_boolean +bool _bfd_elf_link_hash_table_init (struct elf_link_hash_table *table, bfd *abfd, @@ -7861,7 +7861,7 @@ _bfd_elf_link_hash_table_init unsigned int entsize, enum elf_target_id target_id) { - bfd_boolean ret; + bool ret; int can_refcount = get_elf_backend_data (abfd)->can_refcount; table->init_got_refcount.refcount = can_refcount - 1; @@ -7990,7 +7990,7 @@ bfd_elf_get_dt_soname (bfd *abfd) /* Get the list of DT_NEEDED entries from a BFD. This is a hook for the ELF linker emulation code. */ -bfd_boolean +bool bfd_elf_get_bfd_needed_list (bfd *abfd, struct bfd_link_needed_list **pneeded) { @@ -8006,11 +8006,11 @@ bfd_elf_get_bfd_needed_list (bfd *abfd, if (bfd_get_flavour (abfd) != bfd_target_elf_flavour || bfd_get_format (abfd) != bfd_object) - return TRUE; + return true; s = bfd_get_section_by_name (abfd, ".dynamic"); if (s == NULL || s->size == 0) - return TRUE; + return true; if (!bfd_malloc_and_get_section (abfd, s, &dynbuf)) goto error_return; @@ -8060,11 +8060,11 @@ bfd_elf_get_bfd_needed_list (bfd *abfd, free (dynbuf); - return TRUE; + return true; error_return: free (dynbuf); - return FALSE; + return false; } struct elf_symbuf_symbol @@ -8187,7 +8187,7 @@ elf_create_symbuf (size_t symcount, Elf_Internal_Sym *isymbuf) /* Check if 2 sections define the same set of local and global symbols. */ -static bfd_boolean +static bool bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, struct bfd_link_info *info) { @@ -8201,8 +8201,8 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, struct elf_symbol *symtable1 = NULL, *symtable2 = NULL; size_t count1, count2, sec_count1, sec_count2, i; unsigned int shndx1, shndx2; - bfd_boolean result; - bfd_boolean ignore_section_symbol_p; + bool result; + bool ignore_section_symbol_p; bfd1 = sec1->owner; bfd2 = sec2->owner; @@ -8210,15 +8210,15 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, /* Both sections have to be in ELF. */ if (bfd_get_flavour (bfd1) != bfd_target_elf_flavour || bfd_get_flavour (bfd2) != bfd_target_elf_flavour) - return FALSE; + return false; if (elf_section_type (sec1) != elf_section_type (sec2)) - return FALSE; + return false; shndx1 = _bfd_elf_section_from_bfd_section (bfd1, sec1); shndx2 = _bfd_elf_section_from_bfd_section (bfd2, sec2); if (shndx1 == SHN_BAD || shndx2 == SHN_BAD) - return FALSE; + return false; bed1 = get_elf_backend_data (bfd1); bed2 = get_elf_backend_data (bfd2); @@ -8228,9 +8228,9 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, symcount2 = hdr2->sh_size / bed2->s->sizeof_sym; if (symcount1 == 0 || symcount2 == 0) - return FALSE; + return false; - result = FALSE; + result = false; isymbuf1 = NULL; isymbuf2 = NULL; ssymbuf1 = (struct elf_symbuf_head *) elf_tdata (bfd1)->symbuf; @@ -8381,7 +8381,7 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, || strcmp (symtable1 [i].name, symtable2 [i].name) != 0) goto done; - result = TRUE; + result = true; goto done; } @@ -8433,7 +8433,7 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, || strcmp (symtable1 [i].name, symtable2 [i].name) != 0) goto done; - result = TRUE; + result = true; done: free (symtable1); @@ -8446,7 +8446,7 @@ bfd_elf_match_symbols_in_sections (asection *sec1, asection *sec2, /* Return TRUE if 2 section types are compatible. */ -bfd_boolean +bool _bfd_elf_match_sections_by_type (bfd *abfd, const asection *asec, bfd *bbfd, const asection *bsec) { @@ -8454,7 +8454,7 @@ _bfd_elf_match_sections_by_type (bfd *abfd, const asection *asec, || bsec == NULL || abfd->xvec->flavour != bfd_target_elf_flavour || bbfd->xvec->flavour != bfd_target_elf_flavour) - return TRUE; + return true; return elf_section_type (asec) == elf_section_type (bsec); } @@ -8546,9 +8546,9 @@ local_hash_newfunc (struct bfd_hash_entry *entry, struct elf_outext_info { - bfd_boolean failed; - bfd_boolean localsyms; - bfd_boolean file_sym_done; + bool failed; + bool localsyms; + bool file_sym_done; struct elf_final_link_info *flinfo; }; @@ -8623,7 +8623,7 @@ set_symbol_value (bfd *bfd_with_globals, h->root.u.def.section = bfd_abs_section_ptr; } -static bfd_boolean +static bool resolve_symbol (const char *name, bfd *input_bfd, struct elf_final_link_info *flinfo, @@ -8663,15 +8663,15 @@ resolve_symbol (const char *name, printf ("Found symbol with value %8.8lx\n", (unsigned long) *result); #endif - return TRUE; + return true; } } /* Hmm, haven't found it yet. perhaps it is a global. */ global_entry = bfd_link_hash_lookup (flinfo->info->hash, name, - FALSE, FALSE, TRUE); + false, false, true); if (!global_entry) - return FALSE; + return false; if (global_entry->type == bfd_link_hash_defined || global_entry->type == bfd_link_hash_defweak) @@ -8683,17 +8683,17 @@ resolve_symbol (const char *name, printf ("Found GLOBAL symbol '%s' with value %8.8lx\n", global_entry->root.string, (unsigned long) *result); #endif - return TRUE; + return true; } - return FALSE; + return false; } /* Looks up NAME in SECTIONS. If found sets RESULT to NAME's address (in bytes) and returns TRUE, otherwise returns FALSE. Accepts pseudo-section names like "foo.end" which is the end address of section "foo". */ -static bfd_boolean +static bool resolve_section (const char *name, asection *sections, bfd_vma *result, @@ -8706,7 +8706,7 @@ resolve_section (const char *name, if (strcmp (curr->name, name) == 0) { *result = curr->vma; - return TRUE; + return true; } /* Hmm. still haven't found it. try pseudo-section names. */ @@ -8723,14 +8723,14 @@ resolve_section (const char *name, { *result = (curr->vma + curr->size / bfd_octets_per_byte (abfd, curr)); - return TRUE; + return true; } /* Insert more pseudo-section names here, if you like. */ } } - return FALSE; + return false; } static void @@ -8742,7 +8742,7 @@ undefined_reference (const char *reftype, const char *name) bfd_set_error (bfd_error_bad_value); } -static bfd_boolean +static bool eval_symbol (bfd_vma *result, const char **symp, bfd *input_bfd, @@ -8759,7 +8759,7 @@ eval_symbol (bfd_vma *result, char symbuf[4096]; const char *sym = *symp; const char *symend; - bfd_boolean symbol_is_section = FALSE; + bool symbol_is_section = false; len = strlen (sym); symend = sym + len; @@ -8767,7 +8767,7 @@ eval_symbol (bfd_vma *result, if (len < 1 || len > sizeof (symbuf)) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } switch (* sym) @@ -8775,15 +8775,15 @@ eval_symbol (bfd_vma *result, case '.': *result = dot; *symp = sym + 1; - return TRUE; + return true; case '#': ++sym; *result = strtoul (sym, (char **) symp, 16); - return TRUE; + return true; case 'S': - symbol_is_section = TRUE; + symbol_is_section = true; /* Fall through. */ case 's': ++sym; @@ -8793,7 +8793,7 @@ eval_symbol (bfd_vma *result, if (symend < sym || symlen + 1 > sizeof (symbuf)) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } memcpy (symbuf, sym, symlen); @@ -8812,7 +8812,7 @@ eval_symbol (bfd_vma *result, isymbuf, locsymcount)) { undefined_reference ("section", symbuf); - return FALSE; + return false; } } else @@ -8823,11 +8823,11 @@ eval_symbol (bfd_vma *result, result, input_bfd)) { undefined_reference ("symbol", symbuf); - return FALSE; + return false; } } - return TRUE; + return true; /* All that remains are operators. */ @@ -8840,12 +8840,12 @@ eval_symbol (bfd_vma *result, *symp = sym; \ if (!eval_symbol (&a, symp, input_bfd, flinfo, dot, \ isymbuf, locsymcount, signed_p)) \ - return FALSE; \ + return false; \ if (signed_p) \ *result = op ((bfd_signed_vma) a); \ else \ *result = op a; \ - return TRUE; \ + return true; \ } #define BINARY_OP_HEAD(op) \ @@ -8857,17 +8857,17 @@ eval_symbol (bfd_vma *result, *symp = sym; \ if (!eval_symbol (&a, symp, input_bfd, flinfo, dot, \ isymbuf, locsymcount, signed_p)) \ - return FALSE; \ + return false; \ ++*symp; \ if (!eval_symbol (&b, symp, input_bfd, flinfo, dot, \ isymbuf, locsymcount, signed_p)) \ - return FALSE; + return false; #define BINARY_OP_TAIL(op) \ if (signed_p) \ *result = ((bfd_signed_vma) a) op ((bfd_signed_vma) b); \ else \ *result = a op b; \ - return TRUE; \ + return true; \ } #define BINARY_OP(op) BINARY_OP_HEAD(op) BINARY_OP_TAIL(op) @@ -8877,7 +8877,7 @@ eval_symbol (bfd_vma *result, if (b >= sizeof (a) * CHAR_BIT) { *result = 0; - return TRUE; + return true; } signed_p = 0; BINARY_OP_TAIL (<<); @@ -8885,7 +8885,7 @@ eval_symbol (bfd_vma *result, if (b >= sizeof (a) * CHAR_BIT) { *result = signed_p && (bfd_signed_vma) a < 0 ? -1 : 0; - return TRUE; + return true; } BINARY_OP_TAIL (>>); BINARY_OP (==); @@ -8902,7 +8902,7 @@ eval_symbol (bfd_vma *result, { _bfd_error_handler (_("division by zero")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } BINARY_OP_TAIL (/); BINARY_OP_HEAD (%); @@ -8910,7 +8910,7 @@ eval_symbol (bfd_vma *result, { _bfd_error_handler (_("division by zero")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } BINARY_OP_TAIL (%); BINARY_OP (^); @@ -8924,7 +8924,7 @@ eval_symbol (bfd_vma *result, #undef BINARY_OP _bfd_error_handler (_("unknown operator '%c' in complex symbol"), * sym); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } } @@ -9202,11 +9202,11 @@ ext64b_r_offset (const void *p) referenced must be updated. Update all the relocations found in RELDATA. */ -static bfd_boolean +static bool elf_link_adjust_relocs (bfd *abfd, asection *sec, struct bfd_elf_section_reloc_data *reldata, - bfd_boolean sort, + bool sort, struct bfd_link_info *info) { unsigned int i; @@ -9266,7 +9266,7 @@ elf_link_adjust_relocs (bfd *abfd, _bfd_error_handler (_("%pB:%pA: error: try relinking with --gc-keep-exported enabled"), abfd, sec); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } BFD_ASSERT ((*rel_hash)->indx >= 0); @@ -9368,7 +9368,7 @@ elf_link_adjust_relocs (bfd *abfd, { buf = bfd_malloc (buf_size); if (buf == NULL) - return FALSE; + return false; } if (runlen < sortlen) { @@ -9390,7 +9390,7 @@ elf_link_adjust_relocs (bfd *abfd, reldata->hashes = NULL; free (buf); } - return TRUE; + return true; } struct elf_link_sort_rela @@ -9476,7 +9476,7 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) void (*swap_out) (bfd *, const Elf_Internal_Rela *, bfd_byte *); struct bfd_link_order *lo; bfd_vma r_sym_mask; - bfd_boolean use_rela; + bool use_rela; /* Find a dynamic reloc section. */ rela_dyn = bfd_get_section_by_name (abfd, ".rela.dyn"); @@ -9484,11 +9484,11 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) if (rela_dyn != NULL && rela_dyn->size > 0 && rel_dyn != NULL && rel_dyn->size > 0) { - bfd_boolean use_rela_initialised = FALSE; + bool use_rela_initialised = false; /* This is just here to stop gcc from complaining. Its initialization checking code is not perfect. */ - use_rela = TRUE; + use_rela = true; /* Both sections are present. Examine the sizes of the indirect sections to help us choose. */ @@ -9516,8 +9516,8 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) } else { - use_rela = TRUE; - use_rela_initialised = TRUE; + use_rela = true; + use_rela_initialised = true; } } } @@ -9534,8 +9534,8 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) } else { - use_rela = FALSE; - use_rela_initialised = TRUE; + use_rela = false; + use_rela_initialised = true; } } else @@ -9573,8 +9573,8 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) } else { - use_rela = TRUE; - use_rela_initialised = TRUE; + use_rela = true; + use_rela_initialised = true; } } } @@ -9591,8 +9591,8 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) } else { - use_rela = FALSE; - use_rela_initialised = TRUE; + use_rela = false; + use_rela_initialised = true; } } else @@ -9608,12 +9608,12 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec) if (! use_rela_initialised) /* Make a guess. */ - use_rela = TRUE; + use_rela = true; } else if (rela_dyn != NULL && rela_dyn->size > 0) - use_rela = TRUE; + use_rela = true; else if (rel_dyn != NULL && rel_dyn->size > 0) - use_rela = FALSE; + use_rela = false; else return 0; @@ -9839,7 +9839,7 @@ elf_link_output_symstrtab (void *finf, break; default: lh = (struct local_hash_entry *) bfd_hash_lookup - (&flinfo->local_hash_table, name, TRUE, FALSE); + (&flinfo->local_hash_table, name, true, false); if (lh == NULL) return 0; if (lh->count) @@ -9870,7 +9870,7 @@ elf_link_output_symstrtab (void *finf, } elfsym->st_name = (unsigned long) _bfd_elf_strtab_add (flinfo->symstrtab, - versioned_name, FALSE); + versioned_name, false); if (elfsym->st_name == (unsigned long) -1) return 0; } @@ -9903,7 +9903,7 @@ elf_link_output_symstrtab (void *finf, /* Swap symbols out to the symbol table and flush the output symbols to the file. */ -static bfd_boolean +static bool elf_link_swap_symbols_out (struct elf_final_link_info *flinfo) { struct elf_link_hash_table *hash_table = elf_hash_table (flinfo->info); @@ -9913,10 +9913,10 @@ elf_link_swap_symbols_out (struct elf_final_link_info *flinfo) bfd_byte *symbuf; Elf_Internal_Shdr *hdr; file_ptr pos; - bfd_boolean ret; + bool ret; if (!hash_table->strtabcount) - return TRUE; + return true; BFD_ASSERT (elf_onesymtab (flinfo->output_bfd)); @@ -9925,7 +9925,7 @@ elf_link_swap_symbols_out (struct elf_final_link_info *flinfo) amt = bed->s->sizeof_sym * hash_table->strtabcount; symbuf = (bfd_byte *) bfd_malloc (amt); if (symbuf == NULL) - return FALSE; + return false; if (flinfo->symshndxbuf) { @@ -9935,7 +9935,7 @@ elf_link_swap_symbols_out (struct elf_final_link_info *flinfo) if (flinfo->symshndxbuf == NULL) { free (symbuf); - return FALSE; + return false; } } @@ -9971,10 +9971,10 @@ elf_link_swap_symbols_out (struct elf_final_link_info *flinfo) && bfd_bwrite (symbuf, amt, flinfo->output_bfd) == amt) { hdr->sh_size += amt; - ret = TRUE; + ret = true; } else - ret = FALSE; + ret = false; free (symbuf); @@ -9986,7 +9986,7 @@ elf_link_swap_symbols_out (struct elf_final_link_info *flinfo) /* Return TRUE if the dynamic symbol SYM in ABFD is supported. */ -static bfd_boolean +static bool check_dynsym (bfd *abfd, Elf_Internal_Sym *sym) { if (sym->st_shndx >= (SHN_LORESERVE & 0xffff) @@ -9999,9 +9999,9 @@ check_dynsym (bfd *abfd, Elf_Internal_Sym *sym) (_("%pB: too many sections: %d (>= %d)"), abfd, bfd_count_sections (abfd), SHN_LORESERVE & 0xffff); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } - return TRUE; + return true; } /* For DSOs loaded in via a DT_NEEDED entry, emulate ld.so in @@ -10010,7 +10010,7 @@ check_dynsym (bfd *abfd, Elf_Internal_Sym *sym) We also handle the case that a DSO references a hidden symbol which may be satisfied by a versioned symbol in another DSO. */ -static bfd_boolean +static bool elf_link_check_versioned_symbol (struct bfd_link_info *info, const struct elf_backend_data *bed, struct elf_link_hash_entry *h) @@ -10019,7 +10019,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, struct elf_link_loaded_list *loaded; if (!is_elf_hash_table (info->hash)) - return FALSE; + return false; /* Check indirect symbol. */ while (h->root.type == bfd_link_hash_indirect) @@ -10037,7 +10037,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, if (abfd == NULL || (abfd->flags & DYNAMIC) == 0 || (elf_dyn_lib_class (abfd) & DYN_DT_NEEDED) == 0) - return FALSE; + return false; break; case bfd_link_hash_defined: @@ -10094,7 +10094,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, isymbuf = bfd_elf_get_elf_syms (input, hdr, extsymcount, extsymoff, NULL, NULL, NULL); if (isymbuf == NULL) - return FALSE; + return false; /* Read in any version definitions. */ versymhdr = &elf_tdata (input)->dynversym_hdr; @@ -10104,7 +10104,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, versymhdr->sh_size)) == NULL) { free (isymbuf); - return FALSE; + return false; } ever = extversym + extsymoff; @@ -10144,7 +10144,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, /* This is the base or first version. We can use it. */ free (extversym); free (isymbuf); - return TRUE; + return true; } } @@ -10152,7 +10152,7 @@ elf_link_check_versioned_symbol (struct bfd_link_info *info, free (isymbuf); } - return FALSE; + return false; } /* Convert ELF common symbol TYPE. */ @@ -10184,13 +10184,13 @@ elf_link_convert_common_type (struct bfd_link_info *info, int type) script. The second time we output the symbols that are still global symbols. */ -static bfd_boolean +static bool elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) { struct elf_link_hash_entry *h = (struct elf_link_hash_entry *) bh; struct elf_outext_info *eoinfo = (struct elf_outext_info *) data; struct elf_final_link_info *flinfo = eoinfo->flinfo; - bfd_boolean strip; + bool strip; Elf_Internal_Sym sym; asection *input_sec; const struct elf_backend_data *bed; @@ -10202,19 +10202,19 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) { h = (struct elf_link_hash_entry *) h->root.u.i.link; if (h->root.type == bfd_link_hash_new) - return TRUE; + return true; } /* Decide whether to output this symbol in this pass. */ if (eoinfo->localsyms) { if (!h->forced_local) - return TRUE; + return true; } else { if (h->forced_local) - return TRUE; + return true; } bed = get_elf_backend_data (flinfo->output_bfd); @@ -10226,7 +10226,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) references in regular files have already been handled unless they are in unreferenced sections which are removed by garbage collection). */ - bfd_boolean ignore_undef = FALSE; + bool ignore_undef = false; /* Some symbols may be special in that the fact that they're undefined can be safely ignored - let backend determine that. */ @@ -10249,7 +10249,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* Strip a global symbol defined in a discarded section. */ if (h->indx == -3) - return TRUE; + return true; } /* We should also warn if a forced local symbol is referenced from @@ -10285,15 +10285,15 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) _bfd_error_handler (msg, flinfo->output_bfd, h->root.root.string, def_bfd); bfd_set_error (bfd_error_bad_value); - eoinfo->failed = TRUE; - return FALSE; + eoinfo->failed = true; + return false; } /* We don't want to output symbols that have never been mentioned by a regular file, or that we have been told to strip. However, if h->indx is set to -2, the symbol is used by a reloc and we must output it. */ - strip = FALSE; + strip = false; if (h->indx == -2) ; else if ((h->def_dynamic @@ -10301,13 +10301,13 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) || h->root.type == bfd_link_hash_new) && !h->def_regular && !h->ref_regular) - strip = TRUE; + strip = true; else if (flinfo->info->strip == strip_all) - strip = TRUE; + strip = true; else if (flinfo->info->strip == strip_some && bfd_hash_lookup (flinfo->info->keep_hash, - h->root.root.string, FALSE, FALSE) == NULL) - strip = TRUE; + h->root.root.string, false, false) == NULL) + strip = true; else if ((h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) && ((flinfo->info->strip_discarded @@ -10315,12 +10315,12 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) || ((h->root.u.def.section->flags & SEC_LINKER_CREATED) == 0 && h->root.u.def.section->owner != NULL && (h->root.u.def.section->owner->flags & BFD_PLUGIN) != 0))) - strip = TRUE; + strip = true; else if ((h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak) && h->root.u.undef.abfd != NULL && (h->root.u.undef.abfd->flags & BFD_PLUGIN) != 0) - strip = TRUE; + strip = true; type = h->type; @@ -10332,7 +10332,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) && h->dynindx == -1 && type != STT_GNU_IFUNC && !h->forced_local) - return TRUE; + return true; sym.st_value = 0; sym.st_size = h->size; @@ -10343,7 +10343,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) case bfd_link_hash_new: case bfd_link_hash_warning: abort (); - return FALSE; + return false; case bfd_link_hash_undefined: case bfd_link_hash_undefweak: @@ -10367,8 +10367,8 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) (_("%pB: could not find output section %pA for input section %pA"), flinfo->output_bfd, input_sec->output_section, input_sec); bfd_set_error (bfd_error_nonrepresentable_section); - eoinfo->failed = TRUE; - return FALSE; + eoinfo->failed = true; + return false; } /* ELF symbols in relocatable files are section relative, @@ -10409,7 +10409,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) foo is used with no version, then we add an indirect symbol foo which points to foo@@GNU_1.2. We ignore these symbols, since the indirected symbol is already in the hash table. */ - return TRUE; + return true; } if (type == STT_COMMON || type == STT_OBJECT) @@ -10467,8 +10467,8 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) if (! ((*bed->elf_backend_finish_dynamic_symbol) (flinfo->output_bfd, flinfo->info, h, &sym))) { - eoinfo->failed = TRUE; - return FALSE; + eoinfo->failed = true; + return false; } } @@ -10527,8 +10527,8 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) msg = _("%pB: hidden symbol `%s' isn't defined"); _bfd_error_handler (msg, flinfo->output_bfd, h->root.root.string); bfd_set_error (bfd_error_bad_value); - eoinfo->failed = TRUE; - return FALSE; + eoinfo->failed = true; + return false; } /* If this symbol should be put in the .dynsym section, then put it @@ -10558,8 +10558,8 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* xgettext:c-format */ (_("%pB: no symbol version section for versioned symbol `%s'"), flinfo->output_bfd, h->root.root.string); - eoinfo->failed = TRUE; - return FALSE; + eoinfo->failed = true; + return false; } } @@ -10568,8 +10568,8 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) + h->dynindx * bed->s->sizeof_sym); if (!check_dynsym (flinfo->output_bfd, &sym)) { - eoinfo->failed = TRUE; - return FALSE; + eoinfo->failed = true; + return false; } /* Inform the linker of the addition of this symbol. */ @@ -10645,14 +10645,14 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) /* PR 22319 Do not strip global undefined symbols marked as being needed. */ && (h->mark != 1 || ELF_ST_BIND (sym.st_info) != STB_GLOBAL) && !bfd_link_relocatable (flinfo->info)) - return TRUE; + return true; /* Also strip others that we couldn't earlier due to dynamic symbol processing. */ if (strip) - return TRUE; + return true; if ((input_sec->flags & SEC_EXCLUDE) != 0) - return TRUE; + return true; /* Output a FILE symbol so that following locals are not associated with the wrong input file. We need one for forced local symbols @@ -10672,9 +10672,9 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) fsym.st_shndx = SHN_ABS; if (!elf_link_output_symstrtab (eoinfo->flinfo, NULL, &fsym, bfd_und_section_ptr, NULL)) - return FALSE; + return false; - eoinfo->file_sym_done = TRUE; + eoinfo->file_sym_done = true; } indx = bfd_get_symcount (flinfo->output_bfd); @@ -10682,21 +10682,21 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) input_sec, h); if (ret == 0) { - eoinfo->failed = TRUE; - return FALSE; + eoinfo->failed = true; + return false; } else if (ret == 1) h->indx = indx; else if (h->indx == -2) abort(); - return TRUE; + return true; } /* Return TRUE if special handling is done for relocs in SEC against symbols defined in discarded sections. */ -static bfd_boolean +static bool elf_section_ignore_discarded_relocs (asection *sec) { const struct elf_backend_data *bed; @@ -10706,7 +10706,7 @@ elf_section_ignore_discarded_relocs (asection *sec) case SEC_INFO_TYPE_STABS: case SEC_INFO_TYPE_EH_FRAME: case SEC_INFO_TYPE_EH_FRAME_ENTRY: - return TRUE; + return true; default: break; } @@ -10714,9 +10714,9 @@ elf_section_ignore_discarded_relocs (asection *sec) bed = get_elf_backend_data (sec->owner); if (bed->elf_backend_ignore_discarded_relocs != NULL && (*bed->elf_backend_ignore_discarded_relocs) (sec)) - return TRUE; + return true; - return FALSE; + return false; } /* Return a mask saying how ld should treat relocations in SEC against @@ -10804,7 +10804,7 @@ _bfd_elf_check_kept_section (asection *sec, struct bfd_link_info *info) This is so that we only have to read the local symbols once, and don't have to keep them in memory. */ -static bfd_boolean +static bool elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) { int (*relocate_section) @@ -10825,7 +10825,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) bfd_size_type address_size; bfd_vma r_type_mask; int r_sym_shift; - bfd_boolean have_file_sym = FALSE; + bool have_file_sym = false; output_bfd = flinfo->output_bfd; bed = get_elf_backend_data (output_bfd); @@ -10835,7 +10835,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) we don't want the local symbols, and we don't want the section contents. */ if ((input_bfd->flags & DYNAMIC) != 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; if (elf_bad_symtab (input_bfd)) @@ -10868,7 +10868,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) flinfo->external_syms, flinfo->locsym_shndx); if (isymbuf == NULL) - return FALSE; + return false; } /* Find local symbol sections and adjust values of symbols in @@ -10971,11 +10971,11 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) name = bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, isym->st_name); if (name == NULL) - return FALSE; + return false; /* See if we are discarding symbols with this name. */ if ((flinfo->info->strip == strip_some - && (bfd_hash_lookup (flinfo->info->keep_hash, name, FALSE, FALSE) + && (bfd_hash_lookup (flinfo->info->keep_hash, name, false, false) == NULL)) || (((flinfo->info->discard == discard_sec_merge && (isec->flags & SEC_MERGE) @@ -10990,7 +10990,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) /* -flto puts a temp file name here. This means builds are not reproducible. Discard the symbol. */ continue; - have_file_sym = TRUE; + have_file_sym = true; flinfo->filesym_count += 1; } if (!have_file_sym) @@ -11002,7 +11002,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) associated with a previous input file. It's not the source file, but the best we can do. */ const char *filename; - have_file_sym = TRUE; + have_file_sym = true; flinfo->filesym_count += 1; memset (&osym, 0, sizeof (osym)); osym.st_info = ELF_ST_INFO (STB_LOCAL, STT_FILE); @@ -11013,7 +11013,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) filename = lbasename (bfd_get_filename (input_bfd)); if (!elf_link_output_symstrtab (flinfo, filename, &osym, bfd_abs_section_ptr, NULL)) - return FALSE; + return false; } osym = *isym; @@ -11022,7 +11022,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) osym.st_shndx = _bfd_elf_section_from_bfd_section (output_bfd, isec->output_section); if (osym.st_shndx == SHN_BAD) - return FALSE; + return false; /* ELF symbols in relocatable files are section relative, but in executable files they are virtual addresses. Note that @@ -11049,7 +11049,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) indx = bfd_get_symcount (output_bfd); ret = elf_link_output_symstrtab (flinfo, name, &osym, isec, NULL); if (ret == 0) - return FALSE; + return false; else if (ret == 1) *pindex = indx; } @@ -11121,12 +11121,12 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) symtab_hdr->sh_link, sym.st_name); if (name == NULL) - return FALSE; + return false; sym.st_shndx = _bfd_elf_section_from_bfd_section (output_bfd, sec); if (sym.st_shndx == SHN_BAD) - return FALSE; + return false; sym.st_value += o->output_offset; @@ -11134,7 +11134,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) ret = elf_link_output_symstrtab (flinfo, name, &sym, o, NULL); if (ret == 0) - return FALSE; + return false; else if (ret == 1) flinfo->indices[symndx] = indx; else @@ -11175,7 +11175,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) { contents = flinfo->contents; if (! bfd_get_full_section_contents (input_bfd, o, &contents)) - return FALSE; + return false; } if ((o->flags & SEC_RELOC) != 0) @@ -11188,10 +11188,10 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) /* Get the swapped relocs. */ internal_relocs = _bfd_elf_link_read_relocs (input_bfd, o, flinfo->external_relocs, - flinfo->internal_relocs, FALSE); + flinfo->internal_relocs, false); if (internal_relocs == NULL && o->reloc_count > 0) - return FALSE; + return false; /* We need to reverse-copy input .ctors/.dtors sections if they are placed in .init_array/.finit_array for output. */ @@ -11213,7 +11213,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) "multiple of address size"), input_bfd, o); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } o->flags |= SEC_ELF_REVERSE_COPY; } @@ -11258,7 +11258,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) "that references a non-existent global symbol"), input_bfd, (uint64_t) rel->r_info, o); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } while (h->root.type == bfd_link_hash_indirect @@ -11322,7 +11322,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) #endif if (!eval_symbol (&val, &sym_name, input_bfd, flinfo, dot, isymbuf, locsymcount, s_type == STT_SRELC)) - return FALSE; + return false; /* Symbol evaluated OK. Update to absolute value. */ set_symbol_value (input_bfd, isymbuf, locsymcount, @@ -11392,7 +11392,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) isymbuf, flinfo->sections); if (!ret) - return FALSE; + return false; if (ret == 2 || bfd_link_relocatable (flinfo->info) @@ -11405,12 +11405,12 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) struct elf_link_hash_entry **rel_hash_list, **rela_hash_list; Elf_Internal_Shdr *input_rel_hdr, *input_rela_hdr; unsigned int next_erel; - bfd_boolean rela_normal; + bool rela_normal; struct bfd_elf_section_data *esdi, *esdo; esdi = elf_section_data (o); esdo = elf_section_data (o->output_section); - rela_normal = FALSE; + rela_normal = false; /* Adjust the reloc addresses and symbol indices. */ @@ -11521,7 +11521,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -11573,7 +11573,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) { /* You can't do ld -r -s. */ bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* This symbol was skipped earlier, but @@ -11583,14 +11583,14 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) name = (bfd_elf_string_from_elf_section (input_bfd, shlink, sym.st_name)); if (name == NULL) - return FALSE; + return false; osec = sec->output_section; sym.st_shndx = _bfd_elf_section_from_bfd_section (output_bfd, osec); if (sym.st_shndx == SHN_BAD) - return FALSE; + return false; sym.st_value += sec->output_offset; if (!bfd_link_relocatable (flinfo->info)) @@ -11617,7 +11617,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) &sym, sec, NULL); if (ret == 0) - return FALSE; + return false; else if (ret == 1) flinfo->indices[r_symndx] = indx; else @@ -11639,7 +11639,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) input_rel_hdr, internal_relocs, rel_hash_list)) - return FALSE; + return false; internal_relocs += (NUM_SHDR_ENTRIES (input_rel_hdr) * bed->s->int_rels_per_ext_rel); rel_hash_list += NUM_SHDR_ENTRIES (input_rel_hdr); @@ -11652,7 +11652,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) input_rela_hdr, internal_relocs, rela_hash_list)) - return FALSE; + return false; } } } @@ -11671,18 +11671,18 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) (output_bfd, &elf_hash_table (flinfo->info)->stab_info, o, &elf_section_data (o)->sec_info, contents))) - return FALSE; + return false; break; case SEC_INFO_TYPE_MERGE: if (! _bfd_write_merged_section (output_bfd, o, elf_section_data (o)->sec_info)) - return FALSE; + return false; break; case SEC_INFO_TYPE_EH_FRAME: { if (! _bfd_elf_write_section_eh_frame (output_bfd, flinfo->info, o, contents)) - return FALSE; + return false; } break; case SEC_INFO_TYPE_EH_FRAME_ENTRY: @@ -11690,7 +11690,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) if (! _bfd_elf_write_section_eh_frame_entry (output_bfd, flinfo->info, o, contents)) - return FALSE; + return false; } break; default: @@ -11713,7 +11713,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) contents + todo, offset, address_size)) - return FALSE; + return false; if (todo == 0) break; offset += address_size; @@ -11724,14 +11724,14 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) o->output_section, contents, offset, todo)) - return FALSE; + return false; } } break; } } - return TRUE; + return true; } /* Generate a reloc when linking an ELF file. This is a reloc @@ -11739,7 +11739,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) is used to build constructor and destructor tables when linking with -Ur. */ -static bfd_boolean +static bool elf_reloc_link_order (bfd *output_bfd, struct bfd_link_info *info, asection *output_section, @@ -11762,7 +11762,7 @@ elf_reloc_link_order (bfd *output_bfd, if (howto == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } addend = link_order->u.reloc.p->addend; @@ -11794,7 +11794,7 @@ elf_reloc_link_order (bfd *output_bfd, h = ((struct elf_link_hash_entry *) bfd_wrapped_link_hash_lookup (output_bfd, info, link_order->u.reloc.p->u.name, - FALSE, FALSE, TRUE)); + false, false, true)); if (h != NULL && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak)) @@ -11832,14 +11832,14 @@ elf_reloc_link_order (bfd *output_bfd, bfd_size_type size; bfd_reloc_status_type rstat; bfd_byte *buf; - bfd_boolean ok; + bool ok; const char *sym_name; bfd_size_type octets; size = (bfd_size_type) bfd_get_reloc_size (howto); buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL && size != 0) - return FALSE; + return false; rstat = _bfd_relocate_contents (howto, output_bfd, addend, buf); switch (rstat) { @@ -11867,7 +11867,7 @@ elf_reloc_link_order (bfd *output_bfd, octets, size); free (buf); if (! ok) - return FALSE; + return false; } /* The address of a reloc is relative to the section in a @@ -11904,16 +11904,16 @@ elf_reloc_link_order (bfd *output_bfd, ++reldata->count; - return TRUE; + return true; } /* Generate an import library in INFO->implib_bfd from symbols in ABFD. Returns TRUE upon success, FALSE otherwise. */ -static bfd_boolean +static bool elf_output_implib (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean ret = FALSE; + bool ret = false; bfd *implib_bfd; const struct elf_backend_data *bed; flagword flags; @@ -11930,14 +11930,14 @@ elf_output_implib (bfd *abfd, struct bfd_link_info *info) bed = get_elf_backend_data (abfd); if (!bfd_set_format (implib_bfd, bfd_object)) - return FALSE; + return false; /* Use flag from executable but make it a relocatable object. */ flags = bfd_get_file_flags (abfd); flags &= ~HAS_RELOC; if (!bfd_set_start_address (implib_bfd, 0) || !bfd_set_file_flags (implib_bfd, flags & ~EXEC_P)) - return FALSE; + return false; /* Copy architecture of output file to import library file. */ arch = bfd_get_arch (abfd); @@ -11945,17 +11945,17 @@ elf_output_implib (bfd *abfd, struct bfd_link_info *info) if (!bfd_set_arch_mach (implib_bfd, arch, mach) && (abfd->target_defaulted || bfd_get_arch (abfd) != bfd_get_arch (implib_bfd))) - return FALSE; + return false; /* Get symbol table size. */ symsize = bfd_get_symtab_upper_bound (abfd); if (symsize < 0) - return FALSE; + return false; /* Read in the symbol table. */ sympp = (asymbol **) bfd_malloc (symsize); if (sympp == NULL) - return FALSE; + return false; symcount = bfd_canonicalize_symtab (abfd, sympp); if (symcount < 0) @@ -12010,7 +12010,7 @@ elf_output_implib (bfd *abfd, struct bfd_link_info *info) if (!bfd_close (implib_bfd)) goto free_sym_buf; - ret = TRUE; + ret = true; free_sym_buf: free (sympp); @@ -12044,11 +12044,11 @@ elf_final_link_free (bfd *obfd, struct elf_final_link_info *flinfo) /* Do the final step of an ELF link. */ -bfd_boolean +bool bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean dynamic; - bfd_boolean emit_relocs; + bool dynamic; + bool emit_relocs; bfd *dynobj; struct elf_final_link_info flinfo; asection *o; @@ -12065,7 +12065,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) Elf_Internal_Shdr *symtab_shndx_hdr; const struct elf_backend_data *bed = get_elf_backend_data (abfd); struct elf_outext_info eoinfo; - bfd_boolean merged; + bool merged; size_t relativecount = 0; asection *reldyn = 0; bfd_size_type amt; @@ -12073,11 +12073,11 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) bfd_vma attr_size = 0; const char *std_attrs_section; struct elf_link_hash_table *htab = elf_hash_table (info); - bfd_boolean sections_removed; - bfd_boolean ret; + bool sections_removed; + bool ret; if (!is_elf_hash_table (htab)) - return FALSE; + return false; if (bfd_link_pic (info)) abfd->flags |= DYNAMIC; @@ -12093,7 +12093,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) flinfo.output_bfd = abfd; flinfo.symstrtab = _bfd_elf_strtab_init (); if (flinfo.symstrtab == NULL) - return FALSE; + return false; if (! dynamic) { @@ -12112,16 +12112,16 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) && !bfd_hash_table_init (&flinfo.local_hash_table, local_hash_newfunc, sizeof (struct local_hash_entry))) - return FALSE; + return false; /* The object attributes have been merged. Remove the input sections from the link, and set the contents of the output section. */ - sections_removed = FALSE; + sections_removed = false; std_attrs_section = get_elf_backend_data (abfd)->obj_attrs_section; for (o = abfd->sections; o != NULL; o = o->next) { - bfd_boolean remove_section = FALSE; + bool remove_section = false; if ((std_attrs_section && strcmp (o->name, std_attrs_section) == 0) || strcmp (o->name, ".gnu.attributes") == 0) @@ -12145,19 +12145,19 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (attr_size) attr_section = o; else - remove_section = TRUE; + remove_section = true; } else if ((o->flags & SEC_GROUP) != 0 && o->size == 0) { /* Remove empty group section from linker output. */ - remove_section = TRUE; + remove_section = true; } if (remove_section) { o->flags |= SEC_EXCLUDE; bfd_section_list_remove (abfd, o); abfd->section_count--; - sections_removed = TRUE; + sections_removed = true; } } if (sections_removed) @@ -12171,7 +12171,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) max_internal_reloc_count = 0; max_sym_count = 0; max_sym_shndx_count = 0; - merged = FALSE; + merged = false; for (o = abfd->sections; o != NULL; o = o->next) { struct bfd_elf_section_data *esdo = elf_section_data (o); @@ -12196,10 +12196,10 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) link. This will normally be every section. We need to do this so that we can identify any sections which the linker has decided to not include. */ - sec->linker_mark = TRUE; + sec->linker_mark = true; if (sec->flags & SEC_MERGE) - merged = TRUE; + merged = true; if (sec->rawsize > max_contents_size) max_contents_size = sec->rawsize; @@ -12394,7 +12394,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { file_ptr off = elf_next_file_pos (abfd); - _bfd_elf_assign_file_position_for_section (symtab_hdr, off, TRUE); + _bfd_elf_assign_file_position_for_section (symtab_hdr, off, true); /* Note that at this point elf_next_file_pos (abfd) is incorrect. We do not yet know the size of the .symtab section. @@ -12419,7 +12419,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (bfd_keep_unused_section_symbols (abfd) || emit_relocs) { - bfd_boolean name_local_sections + bool name_local_sections = (bed->elf_backend_name_local_section_symbols && bed->elf_backend_name_local_section_symbols (abfd)); const char *name = NULL; @@ -12541,7 +12541,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) } if (!_bfd_elf_fixup_eh_frame_hdr (info)) - return FALSE; + return false; /* Since ELF permits relocations to be against local symbols, we must have the local symbols available when we do the relocations. @@ -12564,7 +12564,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) know how bad the memory loss will be. */ for (sub = info->input_bfds; sub != NULL; sub = sub->link.next) - sub->output_has_begun = FALSE; + sub->output_has_begun = false; for (o = abfd->sections; o != NULL; o = o->next) { for (p = o->map_head.link_order; p != NULL; p = p->next) @@ -12578,7 +12578,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { if (! elf_link_input_bfd (&flinfo, sub)) goto error_return; - sub->output_has_begun = TRUE; + sub->output_has_begun = true; } } else if (p->type == bfd_section_reloc_link_order @@ -12639,7 +12639,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) } } - ret = TRUE; + ret = true; /* Output any global symbols that got converted to local in a version script or due to symbol visibility. We do this in a @@ -12647,14 +12647,14 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) prior to any global symbols. FIXME: We should only do this if some global symbols were, in fact, converted to become local. FIXME: Will this work correctly with the Irix 5 linker? */ - eoinfo.failed = FALSE; + eoinfo.failed = false; eoinfo.flinfo = &flinfo; - eoinfo.localsyms = TRUE; - eoinfo.file_sym_done = FALSE; + eoinfo.localsyms = true; + eoinfo.file_sym_done = false; bfd_hash_traverse (&info->hash->table, elf_link_output_extsym, &eoinfo); if (eoinfo.failed) { - ret = FALSE; + ret = false; goto return_local_hash_table; } @@ -12666,7 +12666,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (! ((*bed->elf_backend_output_arch_local_syms) (abfd, info, &flinfo, elf_link_output_symstrtab))) { - ret = FALSE; + ret = false; goto return_local_hash_table; } } @@ -12716,7 +12716,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) sym.st_shndx = indx; if (! check_dynsym (abfd, &sym)) { - ret = FALSE; + ret = false; goto return_local_hash_table; } sym.st_value = s->vma; @@ -12757,7 +12757,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) elf_section_data (s->output_section)->this_idx; if (! check_dynsym (abfd, &sym)) { - ret = FALSE; + ret = false; goto return_local_hash_table; } sym.st_value = (s->output_section->vma @@ -12777,13 +12777,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) } /* We get the global symbols from the hash table. */ - eoinfo.failed = FALSE; - eoinfo.localsyms = FALSE; + eoinfo.failed = false; + eoinfo.localsyms = false; eoinfo.flinfo = &flinfo; bfd_hash_traverse (&info->hash->table, elf_link_output_extsym, &eoinfo); if (eoinfo.failed) { - ret = FALSE; + ret = false; goto return_local_hash_table; } @@ -12795,7 +12795,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (! ((*bed->elf_backend_output_arch_syms) (abfd, info, &flinfo, elf_link_output_symstrtab))) { - ret = FALSE; + ret = false; goto return_local_hash_table; } } @@ -12806,7 +12806,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) /* Swap out the .strtab section. */ if (!elf_link_swap_symbols_out (&flinfo)) { - ret = FALSE; + ret = false; goto return_local_hash_table; } @@ -12831,12 +12831,12 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) symtab_shndx_hdr->sh_size = amt; off = _bfd_elf_assign_file_position_for_section (symtab_shndx_hdr, - off, TRUE); + off, true); if (bfd_seek (abfd, symtab_shndx_hdr->sh_offset, SEEK_SET) != 0 || (bfd_bwrite (flinfo.symshndxbuf, amt, abfd) != amt)) { - ret = FALSE; + ret = false; goto return_local_hash_table; } } @@ -12855,13 +12855,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) symstrtab_hdr->sh_addralign = 1; off = _bfd_elf_assign_file_position_for_section (symstrtab_hdr, - off, TRUE); + off, true); elf_next_file_pos (abfd) = off; if (bfd_seek (abfd, symstrtab_hdr->sh_offset, SEEK_SET) != 0 || ! _bfd_elf_strtab_emit (abfd, flinfo.symstrtab)) { - ret = FALSE; + ret = false; goto return_local_hash_table; } } @@ -12870,7 +12870,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { _bfd_error_handler (_("%pB: failed to generate import library"), info->out_implib_bfd); - ret = FALSE; + ret = false; goto return_local_hash_table; } @@ -12878,7 +12878,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) for (o = abfd->sections; o != NULL; o = o->next) { struct bfd_elf_section_data *esdo = elf_section_data (o); - bfd_boolean sort; + bool sort; if ((o->flags & SEC_RELOC) == 0) continue; @@ -12887,13 +12887,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (esdo->rel.hdr != NULL && !elf_link_adjust_relocs (abfd, o, &esdo->rel, sort, info)) { - ret = FALSE; + ret = false; goto return_local_hash_table; } if (esdo->rela.hdr != NULL && !elf_link_adjust_relocs (abfd, o, &esdo->rela, sort, info)) { - ret = FALSE; + ret = false; goto return_local_hash_table; } @@ -12955,7 +12955,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_entry *h; - h = elf_link_hash_lookup (htab, name, FALSE, FALSE, TRUE); + h = elf_link_hash_lookup (htab, name, false, false, true); if (h != NULL && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak)) @@ -13187,7 +13187,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (!info->resolve_section_groups) { - bfd_boolean failed = FALSE; + bool failed = false; BFD_ASSERT (bfd_link_relocatable (info)); bfd_map_over_sections (abfd, bfd_elf_set_group_contents, &failed); @@ -13216,7 +13216,7 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (contents == NULL) { /* Bail out and fail. */ - ret = FALSE; + ret = false; goto return_local_hash_table; } bfd_elf_set_obj_attr_contents (abfd, contents, attr_size); @@ -13231,13 +13231,13 @@ bfd_elf_final_link (bfd *abfd, struct bfd_link_info *info) error_return: elf_final_link_free (abfd, &flinfo); - ret = FALSE; + ret = false; goto return_local_hash_table; } /* Initialize COOKIE for input bfd ABFD. */ -static bfd_boolean +static bool init_reloc_cookie (struct elf_reloc_cookie *cookie, struct bfd_link_info *info, bfd *abfd) { @@ -13275,12 +13275,12 @@ init_reloc_cookie (struct elf_reloc_cookie *cookie, if (cookie->locsyms == NULL) { info->callbacks->einfo (_("%P%X: can not read symbols: %E\n")); - return FALSE; + return false; } if (info->keep_memory) symtab_hdr->contents = (bfd_byte *) cookie->locsyms; } - return TRUE; + return true; } /* Free the memory allocated by init_reloc_cookie, if appropriate. */ @@ -13298,7 +13298,7 @@ fini_reloc_cookie (struct elf_reloc_cookie *cookie, bfd *abfd) /* Initialize the relocation information in COOKIE for input section SEC of input bfd ABFD. */ -static bfd_boolean +static bool init_reloc_cookie_rels (struct elf_reloc_cookie *cookie, struct bfd_link_info *info, bfd *abfd, asection *sec) @@ -13313,12 +13313,12 @@ init_reloc_cookie_rels (struct elf_reloc_cookie *cookie, cookie->rels = _bfd_elf_link_read_relocs (abfd, sec, NULL, NULL, info->keep_memory); if (cookie->rels == NULL) - return FALSE; + return false; cookie->rel = cookie->rels; cookie->relend = cookie->rels + sec->reloc_count; } cookie->rel = cookie->rels; - return TRUE; + return true; } /* Free the memory allocated by init_reloc_cookie_rels, @@ -13334,7 +13334,7 @@ fini_reloc_cookie_rels (struct elf_reloc_cookie *cookie, /* Initialize the whole of COOKIE for input section SEC. */ -static bfd_boolean +static bool init_reloc_cookie_for_section (struct elf_reloc_cookie *cookie, struct bfd_link_info *info, asection *sec) @@ -13343,12 +13343,12 @@ init_reloc_cookie_for_section (struct elf_reloc_cookie *cookie, goto error1; if (!init_reloc_cookie_rels (cookie, info, sec->owner, sec)) goto error2; - return TRUE; + return true; error2: fini_reloc_cookie (cookie, sec->owner); error1: - return FALSE; + return false; } /* Free the memory allocated by init_reloc_cookie_for_section, @@ -13431,7 +13431,7 @@ asection * _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, elf_gc_mark_hook_fn gc_mark_hook, struct elf_reloc_cookie *cookie, - bfd_boolean *start_stop) + bool *start_stop) { unsigned long r_symndx; struct elf_link_hash_entry *h, *hw; @@ -13443,7 +13443,7 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, if (r_symndx >= cookie->locsymcount || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL) { - bfd_boolean was_marked; + bool was_marked; h = cookie->sym_hashes[r_symndx - cookie->extsymoff]; if (h == NULL) @@ -13480,7 +13480,7 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, else if (start_stop != NULL) { asection *s = h->u2.start_stop_section; - *start_stop = TRUE; + *start_stop = true; return s; } } @@ -13496,14 +13496,14 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, a section we've decided to keep. Mark the section that contains the relocation symbol. */ -bfd_boolean +bool _bfd_elf_gc_mark_reloc (struct bfd_link_info *info, asection *sec, elf_gc_mark_hook_fn gc_mark_hook, struct elf_reloc_cookie *cookie) { asection *rsec; - bfd_boolean start_stop = FALSE; + bool start_stop = false; rsec = _bfd_elf_gc_mark_rsec (info, sec, gc_mark_hook, cookie, &start_stop); while (rsec != NULL) @@ -13514,25 +13514,25 @@ _bfd_elf_gc_mark_reloc (struct bfd_link_info *info, || (rsec->owner->flags & DYNAMIC) != 0) rsec->gc_mark = 1; else if (!_bfd_elf_gc_mark (info, rsec, gc_mark_hook)) - return FALSE; + return false; } if (!start_stop) break; rsec = bfd_get_next_section_by_name (rsec->owner, rsec); } - return TRUE; + return true; } /* The mark phase of garbage collection. For a given section, mark it and any sections in this section's group, and all the sections which define symbols to which it refers. */ -bfd_boolean +bool _bfd_elf_gc_mark (struct bfd_link_info *info, asection *sec, elf_gc_mark_hook_fn gc_mark_hook) { - bfd_boolean ret; + bool ret; asection *group_sec, *eh_frame; sec->gc_mark = 1; @@ -13541,10 +13541,10 @@ _bfd_elf_gc_mark (struct bfd_link_info *info, group_sec = elf_section_data (sec)->next_in_group; if (group_sec && !group_sec->gc_mark) if (!_bfd_elf_gc_mark (info, group_sec, gc_mark_hook)) - return FALSE; + return false; /* Look through the section relocs. */ - ret = TRUE; + ret = true; eh_frame = elf_eh_frame_section (sec->owner); if ((sec->flags & SEC_RELOC) != 0 && sec->reloc_count > 0 @@ -13553,13 +13553,13 @@ _bfd_elf_gc_mark (struct bfd_link_info *info, struct elf_reloc_cookie cookie; if (!init_reloc_cookie_for_section (&cookie, info, sec)) - ret = FALSE; + ret = false; else { for (; cookie.rel < cookie.relend; cookie.rel++) if (!_bfd_elf_gc_mark_reloc (info, sec, gc_mark_hook, &cookie)) { - ret = FALSE; + ret = false; break; } fini_reloc_cookie_for_section (&cookie, sec); @@ -13571,12 +13571,12 @@ _bfd_elf_gc_mark (struct bfd_link_info *info, struct elf_reloc_cookie cookie; if (!init_reloc_cookie_for_section (&cookie, info, eh_frame)) - ret = FALSE; + ret = false; else { if (!_bfd_elf_gc_mark_fdes (info, sec, eh_frame, gc_mark_hook, &cookie)) - ret = FALSE; + ret = false; fini_reloc_cookie_for_section (&cookie, eh_frame); } } @@ -13584,7 +13584,7 @@ _bfd_elf_gc_mark (struct bfd_link_info *info, eh_frame = elf_section_eh_frame_entry (sec); if (ret && eh_frame && !eh_frame->gc_mark) if (!_bfd_elf_gc_mark (info, eh_frame, gc_mark_hook)) - ret = FALSE; + ret = false; return ret; } @@ -13599,8 +13599,8 @@ _bfd_elf_gc_mark_debug_special_section_group (asection *grp) /* Used to iterate the section group. */ asection *msec; - bfd_boolean is_special_grp = TRUE; - bfd_boolean is_debug_grp = TRUE; + bool is_special_grp = true; + bool is_debug_grp = true; /* First scan to see if group contains any section other than debug and special section. */ @@ -13608,10 +13608,10 @@ _bfd_elf_gc_mark_debug_special_section_group (asection *grp) do { if ((msec->flags & SEC_DEBUGGING) == 0) - is_debug_grp = FALSE; + is_debug_grp = false; if ((msec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) != 0) - is_special_grp = FALSE; + is_special_grp = false; msec = elf_next_in_group (msec); } @@ -13632,7 +13632,7 @@ _bfd_elf_gc_mark_debug_special_section_group (asection *grp) /* Keep debug and special sections. */ -bfd_boolean +bool _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, elf_gc_mark_hook_fn mark_hook) { @@ -13641,9 +13641,9 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link.next) { asection *isec; - bfd_boolean some_kept; - bfd_boolean debug_frag_seen; - bfd_boolean has_kept_debug_info; + bool some_kept; + bool debug_frag_seen; + bool has_kept_debug_info; if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour) continue; @@ -13654,7 +13654,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, /* Ensure all linker created sections are kept, see if any other section is already marked, and note if we have any fragmented debug sections. */ - debug_frag_seen = some_kept = has_kept_debug_info = FALSE; + debug_frag_seen = some_kept = has_kept_debug_info = false; for (isec = ibfd->sections; isec != NULL; isec = isec->next) { if ((isec->flags & SEC_LINKER_CREATED) != 0) @@ -13662,7 +13662,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, else if (isec->gc_mark && (isec->flags & SEC_ALLOC) != 0 && elf_section_type (isec) != SHT_NOTE) - some_kept = TRUE; + some_kept = true; else { /* Since all sections, except for backend specific ones, @@ -13676,7 +13676,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, if (linked_to_sec->gc_mark) { if (!_bfd_elf_gc_mark (info, isec, mark_hook)) - return FALSE; + return false; break; } linked_to_sec->linker_mark = 1; @@ -13690,7 +13690,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, if (!debug_frag_seen && (isec->flags & SEC_DEBUGGING) && startswith (isec->name, ".debug_line.")) - debug_frag_seen = TRUE; + debug_frag_seen = true; else if (strcmp (bfd_section_name (isec), "__patchable_function_entries") == 0 && elf_linked_to_section (isec) == NULL) @@ -13719,7 +13719,7 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, && elf_linked_to_section (isec) == NULL) isec->gc_mark = 1; if (isec->gc_mark && (isec->flags & SEC_DEBUGGING) != 0) - has_kept_debug_info = TRUE; + has_kept_debug_info = true; } /* Look for CODE sections which are going to be discarded, @@ -13763,12 +13763,12 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info, && (isec->flags & SEC_DEBUGGING) != 0) if (!_bfd_elf_gc_mark (info, isec, elf_gc_mark_debug_section)) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool elf_gc_sweep (bfd *abfd, struct bfd_link_info *info) { bfd *sub; @@ -13816,28 +13816,28 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info) } } - return TRUE; + return true; } /* Propagate collected vtable information. This is called through elf_link_hash_traverse. */ -static bfd_boolean +static bool elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp) { /* Those that are not vtables. */ if (h->start_stop || h->u2.vtable == NULL || h->u2.vtable->parent == NULL) - return TRUE; + return true; /* Those vtables that do not have parents, we cannot merge. */ if (h->u2.vtable->parent == (struct elf_link_hash_entry *) -1) - return TRUE; + return true; /* If we've already been done, exit. */ if (h->u2.vtable->used && h->u2.vtable->used[-1]) - return TRUE; + return true; /* Make sure the parent's table is up to date. */ elf_gc_propagate_vtable_entries_used (h->u2.vtable->parent, okp); @@ -13852,11 +13852,11 @@ elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp) else { size_t n; - bfd_boolean *cu, *pu; + bool *cu, *pu; /* Or the parent's entries into ours. */ cu = h->u2.vtable->used; - cu[-1] = TRUE; + cu[-1] = true; pu = h->u2.vtable->parent->u2.vtable->used; if (pu != NULL) { @@ -13869,17 +13869,17 @@ elf_gc_propagate_vtable_entries_used (struct elf_link_hash_entry *h, void *okp) while (n--) { if (*pu) - *cu = TRUE; + *cu = true; pu++; cu++; } } } - return TRUE; + return true; } -static bfd_boolean +static bool elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp) { asection *sec; @@ -13893,7 +13893,7 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp) if (h->start_stop || h->u2.vtable == NULL || h->u2.vtable->parent == NULL) - return TRUE; + return true; BFD_ASSERT (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak); @@ -13902,9 +13902,9 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp) hstart = h->root.u.def.value; hend = hstart + h->size; - relstart = _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, TRUE); + relstart = _bfd_elf_link_read_relocs (sec->owner, sec, NULL, NULL, true); if (!relstart) - return *(bfd_boolean *) okp = FALSE; + return *(bool *) okp = false; bed = get_elf_backend_data (sec->owner); log_file_align = bed->s->log_file_align; @@ -13925,14 +13925,14 @@ elf_gc_smash_unused_vtentry_relocs (struct elf_link_hash_entry *h, void *okp) rel->r_offset = rel->r_info = rel->r_addend = 0; } - return TRUE; + return true; } /* Mark sections containing dynamically referenced symbols. When building shared libraries, we must assume that any visible symbol is referenced. */ -bfd_boolean +bool bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info = (struct bfd_link_info *) inf; @@ -13958,7 +13958,7 @@ bfd_elf_gc_mark_dynamic_ref_symbol (struct elf_link_hash_entry *h, void *inf) h->root.root.string))))) h->root.u.def.section->flags |= SEC_KEEP; - return TRUE; + return true; } /* Keep all sections containing symbols undefined on the command-line, @@ -13974,7 +13974,7 @@ _bfd_elf_gc_keep (struct bfd_link_info *info) struct elf_link_hash_entry *h; h = elf_link_hash_lookup (elf_hash_table (info), sym->name, - FALSE, FALSE, FALSE); + false, false, false); if (h != NULL && (h->root.type == bfd_link_hash_defined @@ -13984,7 +13984,7 @@ _bfd_elf_gc_keep (struct bfd_link_info *info) } } -bfd_boolean +bool bfd_elf_parse_eh_frame_entries (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -14002,7 +14002,7 @@ bfd_elf_parse_eh_frame_entries (bfd *abfd ATTRIBUTE_UNUSED, continue; if (!init_reloc_cookie (&cookie, info, ibfd)) - return FALSE; + return false; for (sec = ibfd->sections; sec; sec = sec->next) { @@ -14014,15 +14014,15 @@ bfd_elf_parse_eh_frame_entries (bfd *abfd ATTRIBUTE_UNUSED, } } } - return TRUE; + return true; } /* Do mark and sweep of unused sections. */ -bfd_boolean +bool bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean ok = TRUE; + bool ok = true; bfd *sub; elf_gc_mark_hook_fn gc_mark_hook; const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -14032,7 +14032,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) || !is_elf_hash_table (info->hash)) { _bfd_error_handler(_("warning: gc-sections option ignored")); - return TRUE; + return true; } bed->gc_keep (info); @@ -14065,12 +14065,12 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) /* Apply transitive closure to the vtable entry usage info. */ elf_link_hash_traverse (htab, elf_gc_propagate_vtable_entries_used, &ok); if (!ok) - return FALSE; + return false; /* Kill the vtable relocations that were not used. */ elf_link_hash_traverse (htab, elf_gc_smash_unused_vtentry_relocs, &ok); if (!ok) - return FALSE; + return false; /* Mark dynamically referenced symbols. */ if (htab->dynamic_sections_created || info->gc_keep_exported) @@ -14113,7 +14113,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) && (elf_section_flags (o) & SHF_GNU_RETAIN)))) { if (!_bfd_elf_gc_mark (info, o, gc_mark_hook)) - return FALSE; + return false; } } @@ -14126,7 +14126,7 @@ bfd_elf_gc_sections (bfd *abfd, struct bfd_link_info *info) /* Called from check_relocs to record the existence of a VTINHERIT reloc. */ -bfd_boolean +bool bfd_elf_gc_record_vtinherit (bfd *abfd, asection *sec, struct elf_link_hash_entry *h, @@ -14163,7 +14163,7 @@ bfd_elf_gc_record_vtinherit (bfd *abfd, _bfd_error_handler (_("%pB: %pA+%#" PRIx64 ": no symbol found for INHERIT"), abfd, sec, (uint64_t) offset); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; win: if (!child->u2.vtable) @@ -14171,7 +14171,7 @@ bfd_elf_gc_record_vtinherit (bfd *abfd, child->u2.vtable = ((struct elf_link_virtual_table_entry *) bfd_zalloc (abfd, sizeof (*child->u2.vtable))); if (!child->u2.vtable) - return FALSE; + return false; } if (!h) { @@ -14185,12 +14185,12 @@ bfd_elf_gc_record_vtinherit (bfd *abfd, else child->u2.vtable->parent = h; - return TRUE; + return true; } /* Called from check_relocs to record the existence of a VTENTRY reloc. */ -bfd_boolean +bool bfd_elf_gc_record_vtentry (bfd *abfd, asection *sec, struct elf_link_hash_entry *h, bfd_vma addend) @@ -14204,7 +14204,7 @@ bfd_elf_gc_record_vtentry (bfd *abfd, asection *sec, _bfd_error_handler (_("%pB: section '%pA': corrupt VTENTRY entry"), abfd, sec); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (!h->u2.vtable) @@ -14212,13 +14212,13 @@ bfd_elf_gc_record_vtentry (bfd *abfd, asection *sec, h->u2.vtable = ((struct elf_link_virtual_table_entry *) bfd_zalloc (abfd, sizeof (*h->u2.vtable))); if (!h->u2.vtable) - return FALSE; + return false; } if (addend >= h->u2.vtable->size) { size_t size, bytes, file_align; - bfd_boolean *ptr = h->u2.vtable->used; + bool *ptr = h->u2.vtable->used; /* While the symbol is undefined, we have to be prepared to handle a zero size. */ @@ -14239,35 +14239,35 @@ bfd_elf_gc_record_vtentry (bfd *abfd, asection *sec, /* Allocate one extra entry for use as a "done" flag for the consolidation pass. */ - bytes = ((size >> log_file_align) + 1) * sizeof (bfd_boolean); + bytes = ((size >> log_file_align) + 1) * sizeof (bool); if (ptr) { - ptr = (bfd_boolean *) bfd_realloc (ptr - 1, bytes); + ptr = (bool *) bfd_realloc (ptr - 1, bytes); if (ptr != NULL) { size_t oldbytes; oldbytes = (((h->u2.vtable->size >> log_file_align) + 1) - * sizeof (bfd_boolean)); + * sizeof (bool)); memset (((char *) ptr) + oldbytes, 0, bytes - oldbytes); } } else - ptr = (bfd_boolean *) bfd_zmalloc (bytes); + ptr = (bool *) bfd_zmalloc (bytes); if (ptr == NULL) - return FALSE; + return false; /* And arrange for that done flag to be at index -1. */ h->u2.vtable->used = ptr + 1; h->u2.vtable->size = size; } - h->u2.vtable->used[addend >> log_file_align] = TRUE; + h->u2.vtable->used[addend >> log_file_align] = true; - return TRUE; + return true; } /* Map an ELF section header flag to its corresponding string. */ @@ -14294,7 +14294,7 @@ static const elf_flags_to_name_table elf_flags_to_names [] = }; /* Returns TRUE if the section is to be included, otherwise FALSE. */ -bfd_boolean +bool bfd_elf_lookup_section_flags (struct bfd_link_info *info, struct flag_info *flaginfo, asection *section) @@ -14325,7 +14325,7 @@ bfd_elf_lookup_section_flags (struct bfd_link_info *info, with_hex |= hexval; else if (tf->with == without_flags) without_hex |= hexval; - tf->valid = TRUE; + tf->valid = true; continue; } } @@ -14337,7 +14337,7 @@ bfd_elf_lookup_section_flags (struct bfd_link_info *info, with_hex |= elf_flags_to_names[i].flag_value; else if (tf->with == without_flags) without_hex |= elf_flags_to_names[i].flag_value; - tf->valid = TRUE; + tf->valid = true; break; } } @@ -14345,21 +14345,21 @@ bfd_elf_lookup_section_flags (struct bfd_link_info *info, { info->callbacks->einfo (_("unrecognized INPUT_SECTION_FLAG %s\n"), tf->name); - return FALSE; + return false; } } - flaginfo->flags_initialized = TRUE; + flaginfo->flags_initialized = true; flaginfo->only_with_flags |= with_hex; flaginfo->not_with_flags |= without_hex; } if ((flaginfo->only_with_flags & sh_flags) != flaginfo->only_with_flags) - return FALSE; + return false; if ((flaginfo->not_with_flags & sh_flags) != 0) - return FALSE; + return false; - return TRUE; + return true; } struct alloc_got_off_arg { @@ -14370,7 +14370,7 @@ struct alloc_got_off_arg { /* We need a special top-level link routine to convert got reference counts to real got offsets. */ -static bfd_boolean +static bool elf_gc_allocate_got_offsets (struct elf_link_hash_entry *h, void *arg) { struct alloc_got_off_arg *gofarg = (struct alloc_got_off_arg *) arg; @@ -14385,13 +14385,13 @@ elf_gc_allocate_got_offsets (struct elf_link_hash_entry *h, void *arg) else h->got.offset = (bfd_vma) -1; - return TRUE; + return true; } /* And an accompanying bit to work out final got entry offsets once we're done. Should be called from final_link. */ -bfd_boolean +bool bfd_elf_gc_common_finalize_got_offsets (bfd *abfd, struct bfd_link_info *info) { @@ -14403,7 +14403,7 @@ bfd_elf_gc_common_finalize_got_offsets (bfd *abfd, BFD_ASSERT (abfd == info->output_bfd); if (! is_elf_hash_table (info->hash)) - return FALSE; + return false; /* The GOT offset is relative to the .got section, but the GOT header is put into the .got.plt section, if the backend uses it. */ @@ -14451,23 +14451,23 @@ bfd_elf_gc_common_finalize_got_offsets (bfd *abfd, elf_link_hash_traverse (elf_hash_table (info), elf_gc_allocate_got_offsets, &gofarg); - return TRUE; + return true; } /* Many folk need no more in the way of final link than this, once got entry reference counting is enabled. */ -bfd_boolean +bool bfd_elf_gc_common_final_link (bfd *abfd, struct bfd_link_info *info) { if (!bfd_elf_gc_common_finalize_got_offsets (abfd, info)) - return FALSE; + return false; /* Invoke the regular ELF backend linker to do all the work. */ return bfd_elf_final_link (abfd, info); } -bfd_boolean +bool bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) { struct elf_reloc_cookie *rcookie = (struct elf_reloc_cookie *) cookie; @@ -14481,13 +14481,13 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) if (! rcookie->bad_symtab) if (rcookie->rel->r_offset > offset) - return FALSE; + return false; if (rcookie->rel->r_offset != offset) continue; r_symndx = rcookie->rel->r_info >> rcookie->r_sym_shift; if (r_symndx == STN_UNDEF) - return TRUE; + return true; if (r_symndx >= rcookie->locsymcount || ELF_ST_BIND (rcookie->locsyms[r_symndx].st_info) != STB_LOCAL) @@ -14505,7 +14505,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) && (h->root.u.def.section->owner != rcookie->abfd || h->root.u.def.section->kept_section != NULL || discarded_section (h->root.u.def.section))) - return TRUE; + return true; } else { @@ -14521,11 +14521,11 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) if (isec != NULL && (isec->kept_section != NULL || discarded_section (isec))) - return TRUE; + return true; } - return FALSE; + return false; } - return FALSE; + return false; } /* Discard unneeded references to discarded sections. @@ -14679,7 +14679,7 @@ bfd_elf_discard_info (bfd *output_bfd, struct bfd_link_info *info) return changed; } -bfd_boolean +bool _bfd_elf_section_already_linked (bfd *abfd, asection *sec, struct bfd_link_info *info) @@ -14690,19 +14690,19 @@ _bfd_elf_section_already_linked (bfd *abfd, struct bfd_section_already_linked_hash_entry *already_linked_list; if (sec->output_section == bfd_abs_section_ptr) - return FALSE; + return false; flags = sec->flags; /* Return if it isn't a linkonce section. A comdat group section also has SEC_LINK_ONCE set. */ if ((flags & SEC_LINK_ONCE) == 0) - return FALSE; + return false; /* Don't put group member sections on our list of already linked sections. They are handled as a group via their group section. */ if (elf_sec_group (sec) != NULL) - return FALSE; + return false; /* For a SHT_GROUP section, use the group signature as the key. */ name = sec->name; @@ -14742,7 +14742,7 @@ _bfd_elf_section_already_linked (bfd *abfd, /* The section has already been linked. See if we should issue a warning. */ if (!_bfd_handle_already_linked (sec, l, info)) - return FALSE; + return false; if (flags & SEC_GROUP) { @@ -14761,7 +14761,7 @@ _bfd_elf_section_already_linked (bfd *abfd, } } - return TRUE; + return true; } } @@ -14828,7 +14828,7 @@ _bfd_elf_section_already_linked (bfd *abfd, return sec->output_section == bfd_abs_section_ptr; } -bfd_boolean +bool _bfd_elf_common_definition (Elf_Internal_Sym *sym) { return sym->st_shndx == SHN_COMMON; @@ -14864,7 +14864,7 @@ _bfd_elf_default_got_elt_size (bfd *abfd, static const char * get_dynamic_reloc_section_name (bfd * abfd, asection * sec, - bfd_boolean is_rela) + bool is_rela) { char *name; const char *old_name = bfd_section_name (sec); @@ -14885,15 +14885,15 @@ get_dynamic_reloc_section_name (bfd * abfd, of IS_RELA. */ asection * -_bfd_elf_get_dynamic_reloc_section (bfd * abfd, - asection * sec, - bfd_boolean is_rela) +_bfd_elf_get_dynamic_reloc_section (bfd *abfd, + asection *sec, + bool is_rela) { - asection * reloc_sec = elf_section_data (sec)->sreloc; + asection *reloc_sec = elf_section_data (sec)->sreloc; if (reloc_sec == NULL) { - const char * name = get_dynamic_reloc_section_name (abfd, sec, is_rela); + const char *name = get_dynamic_reloc_section_name (abfd, sec, is_rela); if (name != NULL) { @@ -14922,7 +14922,7 @@ _bfd_elf_make_dynamic_reloc_section (asection *sec, bfd *dynobj, unsigned int alignment, bfd *abfd, - bfd_boolean is_rela) + bool is_rela) { asection * reloc_sec = elf_section_data (sec)->sreloc; @@ -14978,7 +14978,7 @@ _bfd_elf_copy_link_hash_symbol_type (bfd *abfd, ehdest->target_internal = ehsrc->target_internal; isym.st_other = ehsrc->other; - elf_merge_st_other (abfd, ehdest, isym.st_other, NULL, TRUE, FALSE); + elf_merge_st_other (abfd, ehdest, isym.st_other, NULL, true, false); } /* Append a RELA relocation REL to section S in BFD. */ @@ -15012,7 +15012,7 @@ bfd_elf_define_start_stop (struct bfd_link_info *info, struct elf_link_hash_entry *h; h = elf_link_hash_lookup (elf_hash_table (info), symbol, - FALSE, FALSE, TRUE); + false, false, true); /* NB: Common symbols will be turned into definition later. */ if (h != NULL && !h->root.ldscript_def @@ -15022,7 +15022,7 @@ bfd_elf_define_start_stop (struct bfd_link_info *info, && !h->def_regular && h->root.type != bfd_link_hash_common))) { - bfd_boolean was_dynamic = h->ref_dynamic || h->def_dynamic; + bool was_dynamic = h->ref_dynamic || h->def_dynamic; h->verinfo.verdef = NULL; h->root.type = bfd_link_hash_defined; h->root.u.def.section = sec; @@ -15036,7 +15036,7 @@ bfd_elf_define_start_stop (struct bfd_link_info *info, /* .startof. and .sizeof. symbols are local. */ const struct elf_backend_data *bed; bed = get_elf_backend_data (info->output_bfd); - (*bed->elf_backend_hide_symbol) (info, h, TRUE); + (*bed->elf_backend_hide_symbol) (info, h, true); } else { @@ -15071,13 +15071,13 @@ _bfd_elf_readonly_dynrelocs (struct elf_link_hash_entry *h) /* Set DF_TEXTREL if we find any dynamic relocs that apply to read-only sections. */ -bfd_boolean +bool _bfd_elf_maybe_set_textrel (struct elf_link_hash_entry *h, void *inf) { asection *sec; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; sec = _bfd_elf_readonly_dynrelocs (h); if (sec != NULL) @@ -15097,16 +15097,16 @@ _bfd_elf_maybe_set_textrel (struct elf_link_hash_entry *h, void *inf) sec->owner, h->root.root.string, sec); /* Not an error, just cut short the traversal. */ - return FALSE; + return false; } - return TRUE; + return true; } /* Add dynamic tags. */ -bfd_boolean +bool _bfd_elf_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, - bfd_boolean need_dynamic_reloc) + bool need_dynamic_reloc) { struct elf_link_hash_table *htab = elf_hash_table (info); @@ -15126,7 +15126,7 @@ _bfd_elf_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, if (bfd_link_executable (info)) { if (!add_dynamic_entry (DT_DEBUG, 0)) - return FALSE; + return false; } if (htab->dt_pltgot_required || htab->splt->size != 0) @@ -15134,7 +15134,7 @@ _bfd_elf_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, /* DT_PLTGOT is used by prelink even if there is no PLT relocation. */ if (!add_dynamic_entry (DT_PLTGOT, 0)) - return FALSE; + return false; } if (htab->dt_jmprel_required || htab->srelplt->size != 0) @@ -15144,13 +15144,13 @@ _bfd_elf_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, (bed->rela_plts_and_copies_p ? DT_RELA : DT_REL)) || !add_dynamic_entry (DT_JMPREL, 0)) - return FALSE; + return false; } if (htab->tlsdesc_plt && (!add_dynamic_entry (DT_TLSDESC_PLT, 0) || !add_dynamic_entry (DT_TLSDESC_GOT, 0))) - return FALSE; + return false; if (need_dynamic_reloc) { @@ -15160,7 +15160,7 @@ _bfd_elf_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, || !add_dynamic_entry (DT_RELASZ, 0) || !add_dynamic_entry (DT_RELAENT, bed->s->sizeof_rela)) - return FALSE; + return false; } else { @@ -15168,7 +15168,7 @@ _bfd_elf_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, || !add_dynamic_entry (DT_RELSZ, 0) || !add_dynamic_entry (DT_RELENT, bed->s->sizeof_rel)) - return FALSE; + return false; } /* If any dynamic relocs apply to a read-only section, @@ -15186,11 +15186,11 @@ _bfd_elf_add_dynamic_tags (bfd *output_bfd, struct bfd_link_info *info, bfd_link_dll (info) ? "-fPIC" : "-fPIE"); if (!add_dynamic_entry (DT_TEXTREL, 0)) - return FALSE; + return false; } } } #undef add_dynamic_entry - return TRUE; + return true; } diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index da8afa3e57..dc607e776d 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -48,10 +48,10 @@ #define ECOFF_SIGNED_32 #include "ecoffswap.h" -static bfd_boolean mips_elf_assign_gp +static bool mips_elf_assign_gp (bfd *, bfd_vma *); static bfd_reloc_status_type mips_elf_final_gp - (bfd *, asymbol *, bfd_boolean, char **, bfd_vma *); + (bfd *, asymbol *, bool, char **, bfd_vma *); static bfd_reloc_status_type mips_elf_gprel16_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type mips_elf_literal_reloc @@ -59,32 +59,32 @@ static bfd_reloc_status_type mips_elf_literal_reloc static bfd_reloc_status_type mips_elf_gprel32_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type gprel32_with_gp - (bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma); + (bfd *, asymbol *, arelent *, asection *, bool, void *, bfd_vma); static bfd_reloc_status_type mips_elf_shift6_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static bfd_reloc_status_type mips16_gprel_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); -static bfd_boolean mips_info_to_howto_rel +static bool mips_info_to_howto_rel (bfd *, arelent *, Elf_Internal_Rela *); -static bfd_boolean mips_info_to_howto_rela +static bool mips_info_to_howto_rela (bfd *, arelent *, Elf_Internal_Rela *); -static bfd_boolean mips_elf_sym_is_global +static bool mips_elf_sym_is_global (bfd *, asymbol *); -static bfd_boolean mips_elf_n32_elfsym_local_is_section +static bool mips_elf_n32_elfsym_local_is_section (bfd *); -static bfd_boolean mips_elf_n32_object_p +static bool mips_elf_n32_object_p (bfd *); -static bfd_boolean elf32_mips_grok_prstatus +static bool elf32_mips_grok_prstatus (bfd *, Elf_Internal_Note *); -static bfd_boolean elf32_mips_grok_psinfo +static bool elf32_mips_grok_psinfo (bfd *, Elf_Internal_Note *); -static bfd_boolean elf_n32_mips_grok_freebsd_prstatus +static bool elf_n32_mips_grok_freebsd_prstatus (bfd *, Elf_Internal_Note *); static irix_compat_t elf_n32_mips_irix_compat (bfd *); -static bfd_boolean mips_elf_n32_mkobject +static bool mips_elf_n32_mkobject (bfd *); extern const bfd_target mips_elf32_n_be_vec; @@ -114,67 +114,67 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit relocation. */ HOWTO (R_MIPS_16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation. */ HOWTO (R_MIPS_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit symbol relative relocation. */ HOWTO (R_MIPS_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 26 bit jump address. */ HOWTO (R_MIPS_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -182,10 +182,10 @@ static reloc_howto_type elf_mips_howto_table_rel[] = bits must match the PC + 4. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03ffffff, /* src_mask */ 0x03ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* R_MIPS_HI16 and R_MIPS_LO16 are unsupported for NewABI REL. However, the native IRIX6 tools use them, so we try our best. */ @@ -195,75 +195,75 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf_gprel16_reloc, /* special_function */ "R_MIPS_GPREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf_literal_reloc, /* special_function */ "R_MIPS_LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit PC relative reference. Note that the ABI document has a typo and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. @@ -272,45 +272,45 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit GP relative reference. */ HOWTO (R_MIPS_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mips_elf_gprel32_reloc, /* special_function */ "R_MIPS_GPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The remaining relocs are defined on Irix 5, although they are not defined by the ABI. */ @@ -323,135 +323,135 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SHIFT5", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000007c0, /* src_mask */ 0x000007c0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit shift field. */ HOWTO (R_MIPS_SHIFT6, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mips_elf_shift6_reloc, /* special_function */ "R_MIPS_SHIFT6", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000007c4, /* src_mask */ 0x000007c4, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 64 bit relocation. */ HOWTO (R_MIPS_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement in the global offset table. */ HOWTO (R_MIPS_GOT_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_PAGE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_OFST", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. */ HOWTO (R_MIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SUB", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction. */ /* FIXME: Not handled correctly. */ @@ -459,15 +459,15 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_A", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction, and change all relocations to refer to the old instruction at the address. */ @@ -476,15 +476,15 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_B", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Delete a 32 bit instruction. */ /* FIXME: Not handled correctly. */ @@ -492,15 +492,15 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_DELETE", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The MIPS ELF64 ABI Draft wants us to support these for REL relocations. We don't, because @@ -516,59 +516,59 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement. */ HOWTO (R_MIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SCN_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_REL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* These two are obsolete. */ EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE), @@ -580,15 +580,15 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_RELGOT", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -596,44 +596,44 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x00000000, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD dynamic relocations. */ HOWTO (R_MIPS_TLS_DTPMOD32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPMOD32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_TLS_DTPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64), EMPTY_HOWTO (R_MIPS_TLS_DTPREL64), @@ -643,90 +643,90 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS IE dynamic relocations. */ HOWTO (R_MIPS_TLS_TPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_MIPS_TLS_TPREL64), @@ -735,45 +735,45 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation with no addend. */ HOWTO (R_MIPS_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (52), EMPTY_HOWTO (53), @@ -788,85 +788,85 @@ static reloc_howto_type elf_mips_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC21_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x001fffff, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC26_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC26_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x03ffffff, /* src_mask */ 0x03ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC18_S3, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC18_S3", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0003ffff, /* src_mask */ 0x0003ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC19_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC19_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0007ffff, /* src_mask */ 0x0007ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCHI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCLO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; @@ -879,67 +879,67 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit relocation. */ HOWTO (R_MIPS_16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation. */ HOWTO (R_MIPS_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit symbol relative relocation. */ HOWTO (R_MIPS_REL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 26 bit jump address. */ HOWTO (R_MIPS_26, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -947,85 +947,85 @@ static reloc_howto_type elf_mips_howto_table_rela[] = bits must match the PC + 4. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x03ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MIPS_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf_gprel16_reloc, /* special_function */ "R_MIPS_GPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips_elf_literal_reloc, /* special_function */ "R_MIPS_LITERAL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit PC relative reference. Note that the ABI document has a typo and claims R_MIPS_PC16 to be not rightshifted, rendering it useless. @@ -1034,45 +1034,45 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit GP relative reference. */ HOWTO (R_MIPS_GPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ mips_elf_gprel32_reloc, /* special_function */ "R_MIPS_GPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (13), EMPTY_HOWTO (14), @@ -1083,135 +1083,135 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 5, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SHIFT5", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000007c0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 6 bit shift field. */ HOWTO (R_MIPS_SHIFT6, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 6, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 6, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ mips_elf_shift6_reloc, /* special_function */ "R_MIPS_SHIFT6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000007c4, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit relocation. */ HOWTO (R_MIPS_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement in the global offset table. */ HOWTO (R_MIPS_GOT_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_DISP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_PAGE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_OFST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GOT_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. */ HOWTO (R_MIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SUB", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction. */ /* FIXME: Not handled correctly. */ @@ -1219,15 +1219,15 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_A", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Insert the addend as an instruction, and change all relocations to refer to the old instruction at the address. */ @@ -1236,15 +1236,15 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_INSERT_B", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Delete a 32 bit instruction. */ /* FIXME: Not handled correctly. */ @@ -1252,105 +1252,105 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_DELETE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the higher value of a 64 bit addend. */ HOWTO (R_MIPS_HIGHER, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HIGHER", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the highest value of a 64 bit addend. */ HOWTO (R_MIPS_HIGHEST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_HIGHEST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_CALL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement, used by an associated event location section. */ HOWTO (R_MIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_SCN_DISP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16 bit relocation. */ HOWTO (R_MIPS_REL16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_REL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* These two are obsolete. */ EMPTY_HOWTO (R_MIPS_ADD_IMMEDIATE), @@ -1362,15 +1362,15 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_RELGOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -1378,44 +1378,44 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS GD/LD dynamic relocations. */ HOWTO (R_MIPS_TLS_DTPMOD32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPMOD32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MIPS_TLS_DTPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_MIPS_TLS_DTPMOD64), EMPTY_HOWTO (R_MIPS_TLS_DTPREL64), @@ -1425,90 +1425,90 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_LDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_DTPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_GOTTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS IE dynamic relocations. */ HOWTO (R_MIPS_TLS_TPREL32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (R_MIPS_TLS_TPREL64), @@ -1517,45 +1517,45 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_TLS_TPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation with no addend. */ HOWTO (R_MIPS_GLOB_DAT, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (52), EMPTY_HOWTO (53), @@ -1570,85 +1570,85 @@ static reloc_howto_type elf_mips_howto_table_rela[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC21_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x001fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC26_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC26_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x03ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC18_S3, /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 18, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC18_S3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0003ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PC19_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC19_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0007ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCHI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCHI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MIPS_PCLO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PCLO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; @@ -1659,7 +1659,7 @@ static reloc_howto_type elf_mips16_howto_table_rel[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -1667,205 +1667,205 @@ static reloc_howto_type elf_mips16_howto_table_rel[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_26", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The reloc used for the mips16 gprel instruction. */ HOWTO (R_MIPS16_GPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips16_gprel_reloc, /* special_function */ "R_MIPS16_GPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 reference to the global offset table. */ HOWTO (R_MIPS16_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS16_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 call through the global offset table. */ HOWTO (R_MIPS16_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 high 16 bits of symbol value. */ HOWTO (R_MIPS16_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS16_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 low 16 bits of symbol value. */ HOWTO (R_MIPS16_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS16_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS general dynamic variable reference. */ HOWTO (R_MIPS16_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic variable reference. */ HOWTO (R_MIPS16_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 16-bit PC-relative branch offset. */ HOWTO (R_MIPS16_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_PC16_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; static reloc_howto_type elf_mips16_howto_table_rela[] = @@ -1875,7 +1875,7 @@ static reloc_howto_type elf_mips16_howto_table_rela[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -1883,205 +1883,205 @@ static reloc_howto_type elf_mips16_howto_table_rela[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_26", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The reloc used for the mips16 gprel instruction. */ HOWTO (R_MIPS16_GPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ mips16_gprel_reloc, /* special_function */ "R_MIPS16_GPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 reference to the global offset table. */ HOWTO (R_MIPS16_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MIPS16_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A MIPS16 call through the global offset table. */ HOWTO (R_MIPS16_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_CALL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 high 16 bits of symbol value. */ HOWTO (R_MIPS16_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MIPS16_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 low 16 bits of symbol value. */ HOWTO (R_MIPS16_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MIPS16_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS general dynamic variable reference. */ HOWTO (R_MIPS16_TLS_GD, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic variable reference. */ HOWTO (R_MIPS16_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_LDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS local dynamic offset. */ HOWTO (R_MIPS16_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_DTPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_GOTTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 TLS thread pointer offset. */ HOWTO (R_MIPS16_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_TLS_TPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MIPS16 16-bit PC-relative branch offset. */ HOWTO (R_MIPS16_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS16_PC16_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; static reloc_howto_type elf_micromips_howto_table_rel[] = @@ -2095,7 +2095,7 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -2103,143 +2103,143 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_26_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MICROMIPS_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MICROMIPS_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MICROMIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MICROMIPS_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MICROMIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MICROMIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_LITERAL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MICROMIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MICROMIPS_GOT16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This is for microMIPS branches. */ HOWTO (R_MICROMIPS_PC7_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC7_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000007f, /* src_mask */ 0x0000007f, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC10_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC10_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x000003ff, /* src_mask */ 0x000003ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC16_S1", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MICROMIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (143), EMPTY_HOWTO (144), @@ -2249,90 +2249,90 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_DISP",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_PAGE",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_OFST",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_HI16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. Used in the N32 ABI. */ HOWTO (R_MICROMIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SUB", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ MINUS_ONE, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* We don't support these for REL relocations, because it means building the addend from a R_MICROMIPS_HIGHEST/R_MICROMIPS_HIGHER/ @@ -2346,45 +2346,45 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_HI16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement. */ HOWTO (R_MICROMIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SCN_DISP", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -2392,15 +2392,15 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. Note that the high 16 bits of symbol values must be zero. This is used for relaxation. */ @@ -2408,15 +2408,15 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HI0_LO16",/* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (158), EMPTY_HOWTO (159), @@ -2428,75 +2428,75 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GD", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MICROMIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_LDM", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GOTTPREL", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (167), EMPTY_HOWTO (168), @@ -2506,30 +2506,30 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_HI16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_LO16", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (171), @@ -2538,29 +2538,29 @@ static reloc_howto_type elf_micromips_howto_table_rel[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL7_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000007f, /* src_mask */ 0x0000007f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC23_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 23, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC23_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x007fffff, /* src_mask */ 0x007fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; static reloc_howto_type elf_micromips_howto_table_rela[] = @@ -2574,7 +2574,7 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ /* This needs complex overflow @@ -2582,143 +2582,143 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = bits must match the PC. */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_26_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x3ffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of symbol value. */ HOWTO (R_MICROMIPS_HI16, /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_hi16_reloc, /* special_function */ "R_MICROMIPS_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. */ HOWTO (R_MICROMIPS_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_lo16_reloc, /* special_function */ "R_MICROMIPS_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP relative reference. */ HOWTO (R_MICROMIPS_GPREL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to literal section. */ HOWTO (R_MICROMIPS_LITERAL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_LITERAL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reference to global offset table. */ HOWTO (R_MICROMIPS_GOT16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_got16_reloc, /* special_function */ "R_MICROMIPS_GOT16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* This is for microMIPS branches. */ HOWTO (R_MICROMIPS_PC7_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC7_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000007f, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC10_S1, /* type */ 1, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC10_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x000003ff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC16_S1, /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC16_S1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 16 bit call through global offset table. */ HOWTO (R_MICROMIPS_CALL16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (143), EMPTY_HOWTO (144), @@ -2728,165 +2728,165 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_DISP",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Displacement to page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_PAGE, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_PAGE",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Offset from page pointer in the global offset table. */ HOWTO (R_MICROMIPS_GOT_OFST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_OFST",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_HI16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_GOT_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_GOT_LO16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit subtraction. Used in the N32 ABI. */ HOWTO (R_MICROMIPS_SUB, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SUB", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the higher value of a 64 bit addend. */ HOWTO (R_MICROMIPS_HIGHER, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HIGHER", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get the highest value of a 64 bit addend. */ HOWTO (R_MICROMIPS_HIGHEST, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HIGHEST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_HI16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of displacement in global offset table. */ HOWTO (R_MICROMIPS_CALL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_CALL_LO16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Section displacement. */ HOWTO (R_MICROMIPS_SCN_DISP, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_SCN_DISP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Protected jump conversion. This is an optimization hint. No relocation is required for correctness. */ @@ -2894,15 +2894,15 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_JALR", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x00000000, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 16 bits of symbol value. Note that the high 16 bits of symbol values must be zero. This is used for relaxation. */ @@ -2910,15 +2910,15 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_HI0_LO16",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (158), EMPTY_HOWTO (159), @@ -2930,75 +2930,75 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic variable reference. */ HOWTO (R_MICROMIPS_TLS_LDM, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_LDM", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_HI16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS local dynamic offset. */ HOWTO (R_MICROMIPS_TLS_DTPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_DTPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_GOTTPREL, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_GOTTPREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (167), EMPTY_HOWTO (168), @@ -3008,30 +3008,30 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_HI16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS thread pointer offset. */ HOWTO (R_MICROMIPS_TLS_TPREL_LO16, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_TLS_TPREL_LO16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (171), @@ -3040,29 +3040,29 @@ static reloc_howto_type elf_micromips_howto_table_rela[] = 2, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 7, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf32_gprel16_reloc, /* special_function */ "R_MICROMIPS_GPREL7_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000007f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_MICROMIPS_PC23_S2, /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 23, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MICROMIPS_PC23_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x007fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ }; /* GNU extension to record C++ vtable hierarchy */ @@ -3071,15 +3071,15 @@ static reloc_howto_type elf_mips_gnu_vtinherit_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_MIPS_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ static reloc_howto_type elf_mips_gnu_vtentry_howto = @@ -3087,15 +3087,15 @@ static reloc_howto_type elf_mips_gnu_vtentry_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_MIPS_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* 16 bit offset for pc-relative branches. */ static reloc_howto_type elf_mips_gnu_rel16_s2 = @@ -3103,15 +3103,15 @@ static reloc_howto_type elf_mips_gnu_rel16_s2 = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GNU_REL16_S2", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0x0000ffff, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* 16 bit offset for pc-relative branches. */ static reloc_howto_type elf_mips_gnu_rela16_s2 = @@ -3119,15 +3119,15 @@ static reloc_howto_type elf_mips_gnu_rela16_s2 = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_GNU_REL16_S2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x0000ffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* 32 bit pc-relative. Used for compact EH tables. */ static reloc_howto_type elf_mips_gnu_pcrel32 = @@ -3135,15 +3135,15 @@ static reloc_howto_type elf_mips_gnu_pcrel32 = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_PC32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE); /* pcrel_offset */ + true); /* pcrel_offset */ /* Originally a VxWorks extension, but now used for other systems too. */ @@ -3152,15 +3152,15 @@ static reloc_howto_type elf_mips_copy_howto = 0, /* rightshift */ 0, /* this one is variable size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Originally a VxWorks extension, but now used for other systems too. */ static reloc_howto_type elf_mips_jump_slot_howto = @@ -3168,15 +3168,15 @@ static reloc_howto_type elf_mips_jump_slot_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_JUMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Used in EH tables. */ static reloc_howto_type elf_mips_eh_howto = @@ -3184,21 +3184,21 @@ static reloc_howto_type elf_mips_eh_howto = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ _bfd_mips_elf_generic_reloc, /* special_function */ "R_MIPS_EH", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Set the GP value for OUTPUT_BFD. Returns FALSE if this is a dangerous relocation. */ -static bfd_boolean +static bool mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) { unsigned int count; @@ -3208,7 +3208,7 @@ mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* If we've already figured out what GP will be, just return it. */ *pgp = _bfd_get_gp_value (output_bfd); if (*pgp) - return TRUE; + return true; count = bfd_get_symcount (output_bfd); sym = bfd_get_outsymbols (output_bfd); @@ -3238,10 +3238,10 @@ mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) /* Only get the error once. */ *pgp = 4; _bfd_set_gp_value (output_bfd, *pgp); - return FALSE; + return false; } - return TRUE; + return true; } /* We have to figure out the gp value, so that we can adjust the @@ -3251,7 +3251,7 @@ mips_elf_assign_gp (bfd *output_bfd, bfd_vma *pgp) external symbol if we are producing relocatable output. */ static bfd_reloc_status_type -mips_elf_final_gp (bfd *output_bfd, asymbol *symbol, bfd_boolean relocatable, +mips_elf_final_gp (bfd *output_bfd, asymbol *symbol, bool relocatable, char **error_message, bfd_vma *pgp) { if (bfd_is_und_section (symbol->section) @@ -3292,15 +3292,15 @@ mips_elf_gprel16_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry, asection *input_section, bfd *output_bfd, char **error_message ATTRIBUTE_UNUSED) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -3321,7 +3321,7 @@ mips_elf_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; @@ -3337,10 +3337,10 @@ mips_elf_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, /* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */ if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -3362,7 +3362,7 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_vma gp; @@ -3378,12 +3378,12 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, if (output_bfd != NULL) { - relocatable = TRUE; + relocatable = true; gp = _bfd_get_gp_value (output_bfd); } else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; ret = mips_elf_final_gp (output_bfd, symbol, relocatable, @@ -3398,7 +3398,7 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, static bfd_reloc_status_type gprel32_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, - asection *input_section, bfd_boolean relocatable, + asection *input_section, bool relocatable, void *data, bfd_vma gp) { bfd_vma relocation; @@ -3464,7 +3464,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, void *data, asection *input_section, bfd *output_bfd, char **error_message) { - bfd_boolean relocatable; + bool relocatable; bfd_reloc_status_type ret; bfd_byte *location; bfd_vma gp; @@ -3480,10 +3480,10 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, } if (output_bfd != NULL) - relocatable = TRUE; + relocatable = true; else { - relocatable = FALSE; + relocatable = false; output_bfd = symbol->section->output_section->owner; } @@ -3493,7 +3493,7 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, return ret; location = (bfd_byte *) data + reloc_entry->address; - _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, false, location); ret = _bfd_mips_elf_gprel16_with_gp (abfd, symbol, reloc_entry, input_section, relocatable, @@ -3737,7 +3737,7 @@ bfd_elf32_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, /* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */ static reloc_howto_type * -mips_elf_n32_rtype_to_howto (bfd *abfd, unsigned int r_type, bfd_boolean rela_p) +mips_elf_n32_rtype_to_howto (bfd *abfd, unsigned int r_type, bool rela_p) { reloc_howto_type *howto = NULL; @@ -3794,16 +3794,16 @@ mips_elf_n32_rtype_to_howto (bfd *abfd, unsigned int r_type, bfd_boolean rela_p) /* Given a MIPS Elf_Internal_Rel, fill in an arelent structure. */ -static bfd_boolean +static bool mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - cache_ptr->howto = mips_elf_n32_rtype_to_howto (abfd, r_type, FALSE); + cache_ptr->howto = mips_elf_n32_rtype_to_howto (abfd, r_type, false); if (cache_ptr->howto == NULL) - return FALSE; + return false; /* The addend for a GPREL16 or LITERAL relocation comes from the GP value for the object file. We get the addend now, rather than @@ -3813,19 +3813,19 @@ mips_info_to_howto_rel (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) && (gprel16_reloc_p (r_type) || r_type == (unsigned int) R_MIPS_LITERAL)) cache_ptr->addend = elf_gp (abfd); - return TRUE; + return true; } /* Given a MIPS Elf_Internal_Rela, fill in an arelent structure. */ -static bfd_boolean +static bool mips_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { unsigned int r_type; r_type = ELF32_R_TYPE (dst->r_info); - cache_ptr->howto = mips_elf_n32_rtype_to_howto (abfd, r_type, TRUE); + cache_ptr->howto = mips_elf_n32_rtype_to_howto (abfd, r_type, true); cache_ptr->addend = dst->r_addend; return cache_ptr->howto != NULL; } @@ -3836,7 +3836,7 @@ mips_info_to_howto_rela (bfd *abfd, symbols. On most ELF targets the split is between static symbols and externally visible symbols. */ -static bfd_boolean +static bool mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) { if (SGI_COMPAT (abfd)) @@ -3849,7 +3849,7 @@ mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) /* Likewise, return TRUE if the symbol table split overall must be between section symbols and all other symbols. */ -static bfd_boolean +static bool mips_elf_n32_elfsym_local_is_section (bfd *abfd) { return SGI_COMPAT (abfd); @@ -3857,27 +3857,27 @@ mips_elf_n32_elfsym_local_is_section (bfd *abfd) /* Set the right machine number for a MIPS ELF file. */ -static bfd_boolean +static bool mips_elf_n32_object_p (bfd *abfd) { unsigned long mach; if (!ABI_N32_P (abfd)) - return FALSE; + return false; /* Irix 5 and 6 are broken. Object file symbol tables are not always sorted correctly such that local symbols precede global symbols, and the sh_info field in the symbol table is not always right. */ if (SGI_COMPAT (abfd)) - elf_bad_symtab (abfd) = TRUE; + elf_bad_symtab (abfd) = true; mach = _bfd_elf_mips_mach (elf_elfheader (abfd)->e_flags); bfd_default_set_arch_mach (abfd, bfd_arch_mips, mach); - return TRUE; + return true; } /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -3886,7 +3886,7 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 440: /* Linux/MIPS N32 */ /* pr_cursig */ @@ -3907,13 +3907,13 @@ elf32_mips_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) note->descpos + offset); } -static bfd_boolean +static bool elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 128: /* Linux/MIPS elf_prpsinfo */ elf_tdata (abfd)->core->pid @@ -3936,10 +3936,10 @@ elf32_mips_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } -static bfd_boolean +static bool elf_n32_mips_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note) { size_t offset; @@ -3952,11 +3952,11 @@ elf_n32_mips_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note) min_size = offset + 4 * 2 + 4 + 4 + 4; if (note->descsz < min_size) - return FALSE; + return false; /* Check for version 1 in pr_version. */ if (bfd_h_get_32 (abfd, (bfd_byte *) note->descdata) != 1) - return FALSE; + return false; /* Extract size of pr_reg from pr_gregsetsz. */ /* Skip over pr_gregsetsz and pr_fpregsetsz. */ @@ -3982,7 +3982,7 @@ elf_n32_mips_grok_freebsd_prstatus (bfd *abfd, Elf_Internal_Note *note) /* Make sure that there is enough data remaining in the note. */ if (note->descsz - offset < size) - return FALSE; + return false; /* Make a ".reg/999" section and a ".reg" section. */ return _bfd_elfcore_make_pseudosection (abfd, ".reg", @@ -4043,10 +4043,10 @@ elf_n32_mips_irix_compat (bfd *abfd) /* Make an n32 MIPS object. We need to set the n32 ABI flag in `e_flags' to tell the object apart from an o32 object. */ -static bfd_boolean +static bool mips_elf_n32_mkobject (bfd *abfd) { - bfd_boolean ret; + bool ret; ret = _bfd_mips_elf_mkobject (abfd); if (ret) @@ -4101,9 +4101,9 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #define ELF_TARGET_ID MIPS_ELF_DATA #define ELF_MACHINE_CODE EM_MIPS -#define elf_backend_collect TRUE -#define elf_backend_type_change_ok TRUE -#define elf_backend_can_gc_sections TRUE +#define elf_backend_collect true +#define elf_backend_type_change_ok true +#define elf_backend_can_gc_sections true #define elf_backend_gc_mark_extra_sections \ _bfd_mips_elf_gc_mark_extra_sections #define elf_info_to_howto mips_info_to_howto_rela @@ -4162,7 +4162,7 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap = { #define elf_backend_may_use_rela_p 1 #define elf_backend_default_use_rela_p 1 #define elf_backend_rela_plts_and_copies_p 0 -#define elf_backend_sign_extend_vma TRUE +#define elf_backend_sign_extend_vma true #define elf_backend_plt_readonly 1 #define elf_backend_plt_sym_val _bfd_mips_elf_plt_sym_val diff --git a/bfd/elfnn-aarch64.c b/bfd/elfnn-aarch64.c index 86130b424a..e2b1de7878 100644 --- a/bfd/elfnn-aarch64.c +++ b/bfd/elfnn-aarch64.c @@ -444,118 +444,118 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AARCH64_NULL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_AARCH64_NONE, /* type */ 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AARCH64_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* .xword: (S+A) */ HOWTO64 (AARCH64_R (ABS64), /* type */ 0, /* rightshift */ 4, /* size (4 = long long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ABS64), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ALL_ONES, /* src_mask */ ALL_ONES, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* .word: (S+A) */ HOWTO (AARCH64_R (ABS32), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ABS32), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* .half: (S+A) */ HOWTO (AARCH64_R (ABS16), /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ABS16), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* .xword: (S+A-P) */ HOWTO64 (AARCH64_R (PREL64), /* type */ 0, /* rightshift */ 4, /* size (4 = long long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (PREL64), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ ALL_ONES, /* src_mask */ ALL_ONES, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* .word: (S+A-P) */ HOWTO (AARCH64_R (PREL32), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (PREL32), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* .half: (S+A-P) */ HOWTO (AARCH64_R (PREL16), /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (PREL16), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Group relocations to create a 16, 32, 48 or 64 bit unsigned data or abs address inline. */ @@ -565,105 +565,105 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G0), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVK: ((S+A) >> 0) & 0xffff [no overflow check] */ HOWTO (AARCH64_R (MOVW_UABS_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVZ: ((S+A) >> 16) & 0xffff */ HOWTO (AARCH64_R (MOVW_UABS_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVK: ((S+A) >> 16) & 0xffff [no overflow check] */ HOWTO64 (AARCH64_R (MOVW_UABS_G1_NC), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G1_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVZ: ((S+A) >> 32) & 0xffff */ HOWTO64 (AARCH64_R (MOVW_UABS_G2), /* type */ 32, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G2), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVK: ((S+A) >> 32) & 0xffff [no overflow check] */ HOWTO64 (AARCH64_R (MOVW_UABS_G2_NC), /* type */ 32, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G2_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVZ: ((S+A) >> 48) & 0xffff */ HOWTO64 (AARCH64_R (MOVW_UABS_G3), /* type */ 48, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_UABS_G3), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Group relocations to create high part of a 16, 32, 48 or 64 bit signed data or abs address inline. Will change instruction @@ -674,45 +674,45 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_SABS_G0), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOV[ZN]: ((S+A) >> 16) & 0xffff */ HOWTO64 (AARCH64_R (MOVW_SABS_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_SABS_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOV[ZN]: ((S+A) >> 32) & 0xffff */ HOWTO64 (AARCH64_R (MOVW_SABS_G2), /* type */ 32, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_SABS_G2), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Group relocations to create a 16, 32, 48 or 64 bit PC relative address inline. */ @@ -722,105 +722,105 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G0), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* MOVK: ((S+A-P) >> 0) & 0xffff [no overflow check] */ HOWTO (AARCH64_R (MOVW_PREL_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* MOV[NZ]: ((S+A-P) >> 16) & 0xffff */ HOWTO (AARCH64_R (MOVW_PREL_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* MOVK: ((S+A-P) >> 16) & 0xffff [no overflow check] */ HOWTO64 (AARCH64_R (MOVW_PREL_G1_NC), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G1_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* MOV[NZ]: ((S+A-P) >> 32) & 0xffff */ HOWTO64 (AARCH64_R (MOVW_PREL_G2), /* type */ 32, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G2), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* MOVK: ((S+A-P) >> 32) & 0xffff [no overflow check] */ HOWTO64 (AARCH64_R (MOVW_PREL_G2_NC), /* type */ 32, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G2_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* MOV[NZ]: ((S+A-P) >> 48) & 0xffff */ HOWTO64 (AARCH64_R (MOVW_PREL_G3), /* type */ 48, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_PREL_G3), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Relocations to generate 19, 21 and 33 bit PC-relative load/store addresses: PG(x) is (x & ~0xfff). */ @@ -830,90 +830,90 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD_PREL_LO19), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7ffff, /* src_mask */ 0x7ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* ADR: (S+A-P) & 0x1fffff */ HOWTO (AARCH64_R (ADR_PREL_LO21), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_PREL_LO21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* ADRP: ((PG(S+A)-PG(P)) >> 12) & 0x1fffff */ HOWTO (AARCH64_R (ADR_PREL_PG_HI21), /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_PREL_PG_HI21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* ADRP: ((PG(S+A)-PG(P)) >> 12) & 0x1fffff [no overflow check] */ HOWTO64 (AARCH64_R (ADR_PREL_PG_HI21_NC), /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_PREL_PG_HI21_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* ADD: (S+A) & 0xfff [no overflow check] */ HOWTO (AARCH64_R (ADD_ABS_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADD_ABS_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffc00, /* src_mask */ 0x3ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST8: (S+A) & 0xfff */ HOWTO (AARCH64_R (LDST8_ABS_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST8_ABS_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocations for control-flow instructions. */ @@ -922,120 +922,120 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 14, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TSTBR14), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3fff, /* src_mask */ 0x3fff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* B.cond: ((S+A-P) >> 2) & 0x7ffff */ HOWTO (AARCH64_R (CONDBR19), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (CONDBR19), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7ffff, /* src_mask */ 0x7ffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* B: ((S+A-P) >> 2) & 0x3ffffff */ HOWTO (AARCH64_R (JUMP26), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (JUMP26), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* BL: ((S+A-P) >> 2) & 0x3ffffff */ HOWTO (AARCH64_R (CALL26), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 26, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (CALL26), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffffff, /* src_mask */ 0x3ffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* LD/ST16: (S+A) & 0xffe */ HOWTO (AARCH64_R (LDST16_ABS_LO12_NC), /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST16_ABS_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffe, /* src_mask */ 0xffe, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST32: (S+A) & 0xffc */ HOWTO (AARCH64_R (LDST32_ABS_LO12_NC), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST32_ABS_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffc, /* src_mask */ 0xffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST64: (S+A) & 0xff8 */ HOWTO (AARCH64_R (LDST64_ABS_LO12_NC), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST64_ABS_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff8, /* src_mask */ 0xff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST128: (S+A) & 0xff0 */ HOWTO (AARCH64_R (LDST128_ABS_LO12_NC), /* type */ 4, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LDST128_ABS_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff0, /* src_mask */ 0xff0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Set a load-literal immediate field to bits 0x1FFFFC of G(S)-P */ @@ -1043,15 +1043,15 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte,1 = short,2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (GOT_LD_PREL19), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffffe0, /* src_mask */ 0xffffe0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Get to the page for the GOT entry for the symbol (G(S) - P) using an ADRP instruction. */ @@ -1059,90 +1059,90 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (ADR_GOT_PAGE), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* LD64: GOT offset G(S) & 0xff8 */ HOWTO64 (AARCH64_R (LD64_GOT_LO12_NC), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD64_GOT_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff8, /* src_mask */ 0xff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD32: GOT offset G(S) & 0xffc */ HOWTO32 (AARCH64_R (LD32_GOT_LO12_NC), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD32_GOT_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffc, /* src_mask */ 0xffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 16 bits of GOT offset for the symbol. */ HOWTO64 (AARCH64_R (MOVW_GOTOFF_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_GOTOFF_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Higher 16 bits of GOT offset for the symbol. */ HOWTO64 (AARCH64_R (MOVW_GOTOFF_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (MOVW_GOTOFF_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD64: GOT offset for the symbol. */ HOWTO64 (AARCH64_R (LD64_GOTOFF_LO15), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD64_GOTOFF_LO15), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7ff8, /* src_mask */ 0x7ff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD32: GOT offset to the page address of GOT table. (G(S) - PAGE (_GLOBAL_OFFSET_TABLE_)) & 0x5ffc. */ @@ -1150,15 +1150,15 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD32_GOTPAGE_LO14), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x5ffc, /* src_mask */ 0x5ffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD64: GOT offset to the page address of GOT table. (G(S) - PAGE (_GLOBAL_OFFSET_TABLE_)) & 0x7ff8. */ @@ -1166,15 +1166,15 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (LD64_GOTPAGE_LO15), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7ff8, /* src_mask */ 0x7ff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get to the page for the GOT entry for the symbol (G(S) - P) using an ADRP instruction. */ @@ -1182,218 +1182,218 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_ADR_PAGE21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (AARCH64_R (TLSGD_ADR_PREL21), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_ADR_PREL21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* ADD: GOT offset G(S) & 0xff8 [no overflow check] */ HOWTO (AARCH64_R (TLSGD_ADD_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_ADD_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Lower 16 bits of GOT offset to tls_index. */ HOWTO64 (AARCH64_R (TLSGD_MOVW_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_MOVW_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Higher 16 bits of GOT offset to tls_index. */ HOWTO64 (AARCH64_R (TLSGD_MOVW_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSGD_MOVW_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSIE_ADR_GOTTPREL_PAGE21), /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_ADR_GOTTPREL_PAGE21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSIE_LD64_GOTTPREL_LO12_NC), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_LD64_GOTTPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff8, /* src_mask */ 0xff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO32 (AARCH64_R (TLSIE_LD32_GOTTPREL_LO12_NC), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_LD32_GOTTPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffc, /* src_mask */ 0xffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSIE_LD_GOTTPREL_PREL19), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_LD_GOTTPREL_PREL19), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1ffffc, /* src_mask */ 0x1ffffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSIE_MOVW_GOTTPREL_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSIE_MOVW_GOTTPREL_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSIE_MOVW_GOTTPREL_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* ADD: bit[23:12] of byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLD_ADD_DTPREL_HI12), /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_DTPREL_HI12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Unsigned 12 bit byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLD_ADD_DTPREL_LO12), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_DTPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_LO12. */ HOWTO (AARCH64_R (TLSLD_ADD_DTPREL_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_DTPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* ADD: GOT offset G(S) & 0xff8 [no overflow check] */ HOWTO (AARCH64_R (TLSLD_ADD_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADD_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Get to the page for the GOT entry for the symbol (G(S) - P) using an ADRP instruction. */ @@ -1401,484 +1401,484 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADR_PAGE21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (AARCH64_R (TLSLD_ADR_PREL21), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_ADR_PREL21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* LD/ST16: bit[11:1] of byte offset to module TLS base address. */ HOWTO64 (AARCH64_R (TLSLD_LDST16_DTPREL_LO12), /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST16_DTPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1ffc00, /* src_mask */ 0x1ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLD_LDST16_DTPREL_LO12, but no overflow check. */ HOWTO64 (AARCH64_R (TLSLD_LDST16_DTPREL_LO12_NC), /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST16_DTPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1ffc00, /* src_mask */ 0x1ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST32: bit[11:2] of byte offset to module TLS base address. */ HOWTO64 (AARCH64_R (TLSLD_LDST32_DTPREL_LO12), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST32_DTPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffc00, /* src_mask */ 0x3ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLD_LDST32_DTPREL_LO12, but no overflow check. */ HOWTO64 (AARCH64_R (TLSLD_LDST32_DTPREL_LO12_NC), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST32_DTPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffc00, /* src_mask */ 0xffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST64: bit[11:3] of byte offset to module TLS base address. */ HOWTO64 (AARCH64_R (TLSLD_LDST64_DTPREL_LO12), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST64_DTPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffc00, /* src_mask */ 0x3ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLD_LDST64_DTPREL_LO12, but no overflow check. */ HOWTO64 (AARCH64_R (TLSLD_LDST64_DTPREL_LO12_NC), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST64_DTPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7fc00, /* src_mask */ 0x7fc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST8: bit[11:0] of byte offset to module TLS base address. */ HOWTO64 (AARCH64_R (TLSLD_LDST8_DTPREL_LO12), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST8_DTPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffc00, /* src_mask */ 0x3ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLD_LDST8_DTPREL_LO12, but no overflow check. */ HOWTO64 (AARCH64_R (TLSLD_LDST8_DTPREL_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_LDST8_DTPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffc00, /* src_mask */ 0x3ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVZ: bit[15:0] of byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLD_MOVW_DTPREL_G0), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G0), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G0. */ HOWTO (AARCH64_R (TLSLD_MOVW_DTPREL_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVZ: bit[31:16] of byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLD_MOVW_DTPREL_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* No overflow check version of BFD_RELOC_AARCH64_TLSLD_MOVW_DTPREL_G1. */ HOWTO64 (AARCH64_R (TLSLD_MOVW_DTPREL_G1_NC), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G1_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* MOVZ: bit[47:32] of byte offset to module TLS base address. */ HOWTO64 (AARCH64_R (TLSLD_MOVW_DTPREL_G2), /* type */ 32, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLD_MOVW_DTPREL_G2), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSLE_MOVW_TPREL_G2), /* type */ 32, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G2), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSLE_MOVW_TPREL_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSLE_MOVW_TPREL_G1_NC), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G1_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSLE_MOVW_TPREL_G0), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G0), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSLE_MOVW_TPREL_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_MOVW_TPREL_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSLE_ADD_TPREL_HI12), /* type */ 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_ADD_TPREL_HI12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSLE_ADD_TPREL_LO12), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_ADD_TPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSLE_ADD_TPREL_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_ADD_TPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST16: bit[11:1] of byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLE_LDST16_TPREL_LO12), /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST16_TPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1ffc00, /* src_mask */ 0x1ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLE_LDST16_TPREL_LO12, but no overflow check. */ HOWTO (AARCH64_R (TLSLE_LDST16_TPREL_LO12_NC), /* type */ 1, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 11, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST16_TPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1ffc00, /* src_mask */ 0x1ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST32: bit[11:2] of byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLE_LDST32_TPREL_LO12), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST32_TPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffc00, /* src_mask */ 0xffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLE_LDST32_TPREL_LO12, but no overflow check. */ HOWTO (AARCH64_R (TLSLE_LDST32_TPREL_LO12_NC), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 10, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST32_TPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffc00, /* src_mask */ 0xffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST64: bit[11:3] of byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLE_LDST64_TPREL_LO12), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST64_TPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7fc00, /* src_mask */ 0x7fc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLE_LDST64_TPREL_LO12, but no overflow check. */ HOWTO (AARCH64_R (TLSLE_LDST64_TPREL_LO12_NC), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 9, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST64_TPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x7fc00, /* src_mask */ 0x7fc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD/ST8: bit[11:0] of byte offset to module TLS base address. */ HOWTO (AARCH64_R (TLSLE_LDST8_TPREL_LO12), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST8_TPREL_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffc00, /* src_mask */ 0x3ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Same as BFD_RELOC_AARCH64_TLSLE_LDST8_TPREL_LO12, but no overflow check. */ HOWTO (AARCH64_R (TLSLE_LDST8_TPREL_LO12_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 10, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSLE_LDST8_TPREL_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x3ffc00, /* src_mask */ 0x3ffc00, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSDESC_LD_PREL19), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 19, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_LD_PREL19), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0ffffe0, /* src_mask */ 0x0ffffe0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (AARCH64_R (TLSDESC_ADR_PREL21), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_ADR_PREL21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Get to the page for the GOT entry for the symbol (G(S) - P) using an ADRP instruction. */ @@ -1886,192 +1886,192 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = 12, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 21, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_ADR_PAGE21), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x1fffff, /* src_mask */ 0x1fffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* LD64: GOT offset G(S) & 0xff8. */ HOWTO64 (AARCH64_R (TLSDESC_LD64_LO12), /* type */ 3, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_LD64_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xff8, /* src_mask */ 0xff8, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* LD32: GOT offset G(S) & 0xffc. */ HOWTO32 (AARCH64_R (TLSDESC_LD32_LO12_NC), /* type */ 2, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_LD32_LO12_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffc, /* src_mask */ 0xffc, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* ADD: GOT offset G(S) & 0xfff. */ HOWTO (AARCH64_R (TLSDESC_ADD_LO12), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_ADD_LO12), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xfff, /* src_mask */ 0xfff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSDESC_OFF_G1), /* type */ 16, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_OFF_G1), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSDESC_OFF_G0_NC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_OFF_G0_NC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0xffff, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSDESC_LDR), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_LDR), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO64 (AARCH64_R (TLSDESC_ADD), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 12, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_ADD), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSDESC_CALL), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC_CALL), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0x0, /* src_mask */ 0x0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (COPY), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (COPY), /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (GLOB_DAT), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (GLOB_DAT), /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (JUMP_SLOT), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (JUMP_SLOT), /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (RELATIVE), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (RELATIVE), /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ ALL_ONES, /* src_mask */ ALL_ONES, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLS_DTPMOD), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ @@ -2080,16 +2080,16 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = #else AARCH64_R_STR (TLS_DTPMOD), /* name */ #endif - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ALL_ONES, /* dst_mask */ - FALSE), /* pc_reloffset */ + false), /* pc_reloffset */ HOWTO (AARCH64_R (TLS_DTPREL), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ @@ -2098,16 +2098,16 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = #else AARCH64_R_STR (TLS_DTPREL), /* name */ #endif - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ALL_ONES, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLS_TPREL), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ @@ -2116,38 +2116,38 @@ static reloc_howto_type elfNN_aarch64_howto_table[] = #else AARCH64_R_STR (TLS_TPREL), /* name */ #endif - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ALL_ONES, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (TLSDESC), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (TLSDESC), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ALL_ONES, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (AARCH64_R (IRELATIVE), /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ AARCH64_R_STR (IRELATIVE), /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ALL_ONES, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ EMPTY_HOWTO (0), }; @@ -2157,15 +2157,15 @@ static reloc_howto_type elfNN_aarch64_howto_none = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_AARCH64_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE); /* pcrel_offset */ + false); /* pcrel_offset */ /* Given HOWTO, return the bfd internal relocation enumerator. */ @@ -2191,7 +2191,7 @@ elfNN_aarch64_bfd_reloc_from_howto (reloc_howto_type *howto) static bfd_reloc_code_real_type elfNN_aarch64_bfd_reloc_from_type (bfd *abfd, unsigned int r_type) { - static bfd_boolean initialized_p = FALSE; + static bool initialized_p = false; /* Indexed by R_TYPE, values are offsets in the howto_table. */ static unsigned int offsets[R_AARCH64_end]; @@ -2203,7 +2203,7 @@ elfNN_aarch64_bfd_reloc_from_type (bfd *abfd, unsigned int r_type) if (elfNN_aarch64_howto_table[i].type != 0) offsets[elfNN_aarch64_howto_table[i].type] = i; - initialized_p = TRUE; + initialized_p = true; } if (r_type == R_AARCH64_NONE || r_type == R_AARCH64_NULL) @@ -2298,7 +2298,7 @@ elfNN_aarch64_howto_from_type (bfd *abfd, unsigned int r_type) return NULL; } -static bfd_boolean +static bool elfNN_aarch64_info_to_howto (bfd *abfd, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) { @@ -2311,9 +2311,9 @@ elfNN_aarch64_info_to_howto (bfd *abfd, arelent *bfd_reloc, { /* xgettext:c-format */ _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); - return FALSE; + return false; } - return TRUE; + return true; } static reloc_howto_type * @@ -2547,7 +2547,7 @@ struct elf_aarch64_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == AARCH64_ELF_DATA) -static bfd_boolean +static bool elfNN_aarch64_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct elf_aarch64_obj_tdata), @@ -2789,7 +2789,7 @@ elfNN_aarch64_local_htab_eq (const void *ptr1, const void *ptr2) static struct elf_link_hash_entry * elfNN_aarch64_get_local_sym_hash (struct elf_aarch64_link_hash_table *htab, bfd *abfd, const Elf_Internal_Rela *rel, - bfd_boolean create) + bool create) { struct elf_aarch64_link_hash_entry e, *ret; asection *sec = abfd->sections; @@ -2855,8 +2855,8 @@ elfNN_aarch64_copy_indirect_symbol (struct bfd_link_info *info, static void elfNN_aarch64_merge_symbol_attribute (struct elf_link_hash_entry *h, unsigned int st_other, - bfd_boolean definition ATTRIBUTE_UNUSED, - bfd_boolean dynamic ATTRIBUTE_UNUSED) + bool definition ATTRIBUTE_UNUSED, + bool dynamic ATTRIBUTE_UNUSED) { unsigned int isym_sto = st_other & ~ELF_ST_VISIBILITY (-1); unsigned int h_sto = h->other & ~ELF_ST_VISIBILITY (-1); @@ -2944,7 +2944,7 @@ elfNN_aarch64_link_hash_table_create (bfd *abfd) /* Perform relocation R_TYPE. Returns TRUE upon success, FALSE otherwise. */ -static bfd_boolean +static bool aarch64_relocate (unsigned int r_type, bfd *input_bfd, asection *input_section, bfd_vma offset, bfd_vma value) { @@ -2957,7 +2957,7 @@ aarch64_relocate (unsigned int r_type, bfd *input_bfd, asection *input_section, r_type = elfNN_aarch64_bfd_reloc_from_type (input_bfd, r_type); value = _bfd_aarch64_elf_resolve_relocation (input_bfd, r_type, place, - value, 0, FALSE); + value, 0, false); return _bfd_aarch64_elf_put_addend (input_bfd, input_section->contents + offset, r_type, howto, value) == bfd_reloc_ok; @@ -3050,13 +3050,13 @@ elfNN_aarch64_stub_name (const asection *input_section, executable PLT slots where the executable never takes the address of those functions, the function symbols are not added to the hash table. */ -static bfd_boolean +static bool elf_aarch64_hash_symbol (struct elf_link_hash_entry *h) { if (h->plt.offset != (bfd_vma) -1 && !h->def_regular && !h->pointer_equality_needed) - return FALSE; + return false; return _bfd_elf_hash_symbol (h); } @@ -3101,7 +3101,7 @@ elfNN_aarch64_get_stub_entry (const asection *input_section, return NULL; stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, - stub_name, FALSE, FALSE); + stub_name, false, false); if (h != NULL) h->stub_cache = stub_entry; @@ -3180,7 +3180,7 @@ _bfd_aarch64_add_stub_entry_in_group (const char *stub_name, /* Enter this entry into the linker stub hash table. */ stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, stub_name, - TRUE, FALSE); + true, false); if (stub_entry == NULL) { /* xgettext:c-format */ @@ -3212,7 +3212,7 @@ _bfd_aarch64_add_stub_entry_after (const char *stub_name, if (htab->fix_erratum_843419 & ERRAT_ADRP) stub_sec = _bfd_aarch64_get_stub_for_link_section (link_section, htab); stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, stub_name, - TRUE, FALSE); + true, false); if (stub_entry == NULL) { _bfd_error_handler (_("cannot create stub entry %s"), stub_name); @@ -3227,7 +3227,7 @@ _bfd_aarch64_add_stub_entry_after (const char *stub_name, } -static bfd_boolean +static bool aarch64_build_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { @@ -3360,13 +3360,13 @@ aarch64_build_one_stub (struct bfd_hash_entry *gen_entry, abort (); } - return TRUE; + return true; } /* As above, but don't actually build the stub. Just bump offset so we know stub section sizes. */ -static bfd_boolean +static bool aarch64_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct elf_aarch64_stub_hash_entry *stub_entry; @@ -3391,7 +3391,7 @@ aarch64_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) case aarch64_stub_erratum_843419_veneer: { if (htab->fix_erratum_843419 == ERRAT_ADR) - return TRUE; + return true; size = sizeof (aarch64_erratum_843419_stub); } break; @@ -3401,7 +3401,7 @@ aarch64_size_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) size = (size + 7) & ~7; stub_entry->stub_sec->size += size; - return TRUE; + return true; } /* External entry points for sizing and building linker stubs. */ @@ -3518,7 +3518,7 @@ elfNN_aarch64_next_input_section (struct bfd_link_info *info, asection *isec) static void group_sections (struct elf_aarch64_link_hash_table *htab, bfd_size_type stub_group_size, - bfd_boolean stubs_always_after_branch) + bool stubs_always_after_branch) { asection **list = htab->input_list; @@ -3655,9 +3655,9 @@ group_sections (struct elf_aarch64_link_hash_table *htab, For LD/ST pair instructions PAIR is TRUE, RT and RT2 are returned. */ -static bfd_boolean +static bool aarch64_mem_op_p (uint32_t insn, unsigned int *rt, unsigned int *rt2, - bfd_boolean *pair, bfd_boolean *load) + bool *pair, bool *load) { uint32_t opcode; unsigned int r; @@ -3668,32 +3668,32 @@ aarch64_mem_op_p (uint32_t insn, unsigned int *rt, unsigned int *rt2, /* Bail out quickly if INSN doesn't fall into the load-store encoding space. */ if (!AARCH64_LDST (insn)) - return FALSE; + return false; - *pair = FALSE; - *load = FALSE; + *pair = false; + *load = false; if (AARCH64_LDST_EX (insn)) { *rt = AARCH64_RT (insn); *rt2 = *rt; if (AARCH64_BIT (insn, 21) == 1) { - *pair = TRUE; + *pair = true; *rt2 = AARCH64_RT2 (insn); } *load = AARCH64_LD (insn); - return TRUE; + return true; } else if (AARCH64_LDST_NAP (insn) || AARCH64_LDSTP_PI (insn) || AARCH64_LDSTP_O (insn) || AARCH64_LDSTP_PRE (insn)) { - *pair = TRUE; + *pair = true; *rt = AARCH64_RT (insn); *rt2 = AARCH64_RT2 (insn); *load = AARCH64_LD (insn); - return TRUE; + return true; } else if (AARCH64_LDST_PCREL (insn) || AARCH64_LDST_UI (insn) @@ -3706,13 +3706,13 @@ aarch64_mem_op_p (uint32_t insn, unsigned int *rt, unsigned int *rt2, *rt = AARCH64_RT (insn); *rt2 = *rt; if (AARCH64_LDST_PCREL (insn)) - *load = TRUE; + *load = true; opc = AARCH64_BITS (insn, 22, 2); v = AARCH64_BIT (insn, 26); opc_v = opc | (v << 2); *load = (opc_v == 1 || opc_v == 2 || opc_v == 3 || opc_v == 5 || opc_v == 7); - return TRUE; + return true; } else if (AARCH64_LDST_SIMD_M (insn) || AARCH64_LDST_SIMD_M_PI (insn)) @@ -3742,9 +3742,9 @@ aarch64_mem_op_p (uint32_t insn, unsigned int *rt, unsigned int *rt2, break; default: - return FALSE; + return false; } - return TRUE; + return true; } else if (AARCH64_LDST_SIMD_S (insn) || AARCH64_LDST_SIMD_S_PI (insn)) @@ -3776,17 +3776,17 @@ aarch64_mem_op_p (uint32_t insn, unsigned int *rt, unsigned int *rt2, break; default: - return FALSE; + return false; } - return TRUE; + return true; } - return FALSE; + return false; } /* Return TRUE if INSN is multiply-accumulate. */ -static bfd_boolean +static bool aarch64_mlxl_p (uint32_t insn) { uint32_t op31 = AARCH64_OP31 (insn); @@ -3796,9 +3796,9 @@ aarch64_mlxl_p (uint32_t insn) /* Exclude MUL instructions which are encoded as a multiple accumulate with RA = XZR. */ && AARCH64_RA (insn) != AARCH64_ZR) - return TRUE; + return true; - return FALSE; + return false; } /* Some early revisions of the Cortex-A53 have an erratum (835769) whereby @@ -3814,7 +3814,7 @@ aarch64_mlxl_p (uint32_t insn) operation (INSN_2). Return TRUE if an erratum sequence is found, FALSE if INSN_1 and INSN_2 are safe. */ -static bfd_boolean +static bool aarch64_erratum_sequence (uint32_t insn_1, uint32_t insn_2) { uint32_t rt; @@ -3822,8 +3822,8 @@ aarch64_erratum_sequence (uint32_t insn_1, uint32_t insn_2) uint32_t rn; uint32_t rm; uint32_t ra; - bfd_boolean pair; - bfd_boolean load; + bool pair; + bool load; if (aarch64_mlxl_p (insn_2) && aarch64_mem_op_p (insn_1, &rt, &rt2, &pair, &load)) @@ -3831,7 +3831,7 @@ aarch64_erratum_sequence (uint32_t insn_1, uint32_t insn_2) /* Any SIMD memory op is independent of the subsequent MLA by definition of the erratum. */ if (AARCH64_BIT (insn_1, 26)) - return TRUE; + return true; /* If not SIMD, check for integer memory ops and MLA relationship. */ rn = AARCH64_RN (insn_2); @@ -3843,14 +3843,14 @@ aarch64_erratum_sequence (uint32_t insn_1, uint32_t insn_2) if (load && (rt == rn || rt == rm || rt == ra || (pair && (rt2 == rn || rt2 == rm || rt2 == ra)))) - return FALSE; + return false; /* We conservatively put out stubs for all other cases (including writebacks). */ - return TRUE; + return true; } - return FALSE; + return false; } /* Used to order a list of mapping symbols by address. */ @@ -3891,7 +3891,7 @@ _bfd_aarch64_erratum_835769_stub_name (unsigned num_fixes) Return TRUE else FALSE on abnormal termination. */ -static bfd_boolean +static bool _bfd_aarch64_erratum_835769_scan (bfd *input_bfd, struct bfd_link_info *info, unsigned int *num_fixes_p) @@ -3901,7 +3901,7 @@ _bfd_aarch64_erratum_835769_scan (bfd *input_bfd, unsigned int num_fixes = *num_fixes_p; if (htab == NULL) - return TRUE; + return true; for (section = input_bfd->sections; section != NULL; @@ -3921,7 +3921,7 @@ _bfd_aarch64_erratum_835769_scan (bfd *input_bfd, if (elf_section_data (section)->this_hdr.contents != NULL) contents = elf_section_data (section)->this_hdr.contents; else if (! bfd_malloc_and_get_section (input_bfd, section, &contents)) - return FALSE; + return false; sec_data = elf_aarch64_section_data (section); @@ -3951,13 +3951,13 @@ _bfd_aarch64_erratum_835769_scan (bfd *input_bfd, struct elf_aarch64_stub_hash_entry *stub_entry; char *stub_name = _bfd_aarch64_erratum_835769_stub_name (num_fixes); if (! stub_name) - return FALSE; + return false; stub_entry = _bfd_aarch64_add_stub_entry_in_group (stub_name, section, htab); if (! stub_entry) - return FALSE; + return false; stub_entry->stub_type = aarch64_stub_erratum_835769_veneer; stub_entry->target_section = section; @@ -3974,13 +3974,13 @@ _bfd_aarch64_erratum_835769_scan (bfd *input_bfd, *num_fixes_p = num_fixes; - return TRUE; + return true; } /* Test if instruction INSN is ADRP. */ -static bfd_boolean +static bool _bfd_aarch64_adrp_p (uint32_t insn) { return ((insn & AARCH64_ADRP_OP_MASK) == AARCH64_ADRP_OP); @@ -3989,14 +3989,14 @@ _bfd_aarch64_adrp_p (uint32_t insn) /* Helper predicate to look for cortex-a53 erratum 843419 sequence 1. */ -static bfd_boolean +static bool _bfd_aarch64_erratum_843419_sequence_p (uint32_t insn_1, uint32_t insn_2, uint32_t insn_3) { uint32_t rt; uint32_t rt2; - bfd_boolean pair; - bfd_boolean load; + bool pair; + bool load; return (aarch64_mem_op_p (insn_2, &rt, &rt2, &pair, &load) && (!pair @@ -4014,7 +4014,7 @@ _bfd_aarch64_erratum_843419_sequence_p (uint32_t insn_1, uint32_t insn_2, instruction in the sequence. */ -static bfd_boolean +static bool _bfd_aarch64_erratum_843419_p (bfd_byte *contents, bfd_vma vma, bfd_vma i, bfd_vma span_end, bfd_vma *p_veneer_i) @@ -4022,35 +4022,35 @@ _bfd_aarch64_erratum_843419_p (bfd_byte *contents, bfd_vma vma, uint32_t insn_1 = bfd_getl32 (contents + i); if (!_bfd_aarch64_adrp_p (insn_1)) - return FALSE; + return false; if (span_end < i + 12) - return FALSE; + return false; uint32_t insn_2 = bfd_getl32 (contents + i + 4); uint32_t insn_3 = bfd_getl32 (contents + i + 8); if ((vma & 0xfff) != 0xff8 && (vma & 0xfff) != 0xffc) - return FALSE; + return false; if (_bfd_aarch64_erratum_843419_sequence_p (insn_1, insn_2, insn_3)) { *p_veneer_i = i + 8; - return TRUE; + return true; } if (span_end < i + 16) - return FALSE; + return false; uint32_t insn_4 = bfd_getl32 (contents + i + 12); if (_bfd_aarch64_erratum_843419_sequence_p (insn_1, insn_2, insn_4)) { *p_veneer_i = i + 12; - return TRUE; + return true; } - return FALSE; + return false; } @@ -4121,7 +4121,7 @@ _bfd_aarch64_erratum_843419_stub_name (asection *input_section, Returns TRUE on success. */ -static bfd_boolean +static bool _bfd_aarch64_erratum_843419_fixup (uint32_t insn, bfd_vma adrp_offset, bfd_vma ldst_offset, @@ -4134,13 +4134,13 @@ _bfd_aarch64_erratum_843419_fixup (uint32_t insn, stub_name = _bfd_aarch64_erratum_843419_stub_name (section, ldst_offset); if (stub_name == NULL) - return FALSE; + return false; stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, stub_name, - FALSE, FALSE); + false, false); if (stub_entry) { free (stub_name); - return TRUE; + return true; } /* We always place an 843419 workaround veneer in the stub section @@ -4158,7 +4158,7 @@ _bfd_aarch64_erratum_843419_fixup (uint32_t insn, if (stub_entry == NULL) { free (stub_name); - return FALSE; + return false; } stub_entry->adrp_offset = adrp_offset; @@ -4168,7 +4168,7 @@ _bfd_aarch64_erratum_843419_fixup (uint32_t insn, stub_entry->veneered_insn = insn; stub_entry->output_name = stub_name; - return TRUE; + return true; } @@ -4181,21 +4181,21 @@ _bfd_aarch64_erratum_843419_fixup (uint32_t insn, Return TRUE on successful scan, FALSE on failure to scan. */ -static bfd_boolean +static bool _bfd_aarch64_erratum_843419_scan (bfd *input_bfd, asection *section, struct bfd_link_info *info) { struct elf_aarch64_link_hash_table *htab = elf_aarch64_hash_table (info); if (htab == NULL) - return TRUE; + return true; if (elf_section_type (section) != SHT_PROGBITS || (elf_section_flags (section) & SHF_EXECINSTR) == 0 || (section->flags & SEC_EXCLUDE) != 0 || (section->sec_info_type == SEC_INFO_TYPE_JUST_SYMS) || (section->output_section == bfd_abs_section_ptr)) - return TRUE; + return true; do { @@ -4206,7 +4206,7 @@ _bfd_aarch64_erratum_843419_scan (bfd *input_bfd, asection *section, if (elf_section_data (section)->this_hdr.contents != NULL) contents = elf_section_data (section)->this_hdr.contents; else if (! bfd_malloc_and_get_section (input_bfd, section, &contents)) - return FALSE; + return false; sec_data = elf_aarch64_section_data (section); @@ -4240,7 +4240,7 @@ _bfd_aarch64_erratum_843419_scan (bfd *input_bfd, asection *section, if (!_bfd_aarch64_erratum_843419_fixup (insn, i, veneer_i, section, info)) - return FALSE; + return false; } } } @@ -4250,7 +4250,7 @@ _bfd_aarch64_erratum_843419_scan (bfd *input_bfd, asection *section, } while (0); - return TRUE; + return true; } @@ -4260,7 +4260,7 @@ _bfd_aarch64_erratum_843419_scan (bfd *input_bfd, asection *section, PC-relative calls to a target that is unreachable with a "bl" instruction. */ -bfd_boolean +bool elfNN_aarch64_size_stubs (bfd *output_bfd, bfd *stub_bfd, struct bfd_link_info *info, @@ -4270,8 +4270,8 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, void (*layout_sections_again) (void)) { bfd_size_type stub_group_size; - bfd_boolean stubs_always_before_branch; - bfd_boolean stub_changed = FALSE; + bool stubs_always_before_branch; + bool stub_changed = false; struct elf_aarch64_link_hash_table *htab = elf_aarch64_hash_table (info); unsigned int num_erratum_835769_fixes = 0; @@ -4314,7 +4314,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, if (!_bfd_aarch64_erratum_835769_scan (input_bfd, info, &num_erratum_835769_fixes)) - return FALSE; + return false; } _bfd_aarch64_resize_stubs (htab); @@ -4339,7 +4339,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, section != NULL; section = section->next) if (!_bfd_aarch64_erratum_843419_scan (input_bfd, section, info)) - return FALSE; + return false; } _bfd_aarch64_resize_stubs (htab); @@ -4564,7 +4564,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, stub_entry = aarch64_stub_hash_lookup (&htab->stub_hash_table, - stub_name, FALSE, FALSE); + stub_name, false, false); if (stub_entry != NULL) { /* The proper stub has already been created. */ @@ -4602,7 +4602,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, snprintf (stub_entry->output_name, len, STUB_ENTRY_NAME, sym_name); - stub_changed = TRUE; + stub_changed = true; } /* We're done with the internal relocs, free them. */ @@ -4618,13 +4618,13 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, /* Ask the linker to do its stuff. */ (*htab->layout_sections_again) (); - stub_changed = FALSE; + stub_changed = false; } - return TRUE; + return true; error_ret_free_local: - return FALSE; + return false; } /* Build all the stubs associated with the current output file. The @@ -4633,7 +4633,7 @@ elfNN_aarch64_size_stubs (bfd *output_bfd, functions here. This function is called via aarch64_elf_finish in the linker. */ -bfd_boolean +bool elfNN_aarch64_build_stubs (struct bfd_link_info *info) { asection *stub_sec; @@ -4655,7 +4655,7 @@ elfNN_aarch64_build_stubs (struct bfd_link_info *info) size = stub_sec->size; stub_sec->contents = bfd_zalloc (htab->stub_bfd, size); if (stub_sec->contents == NULL && size != 0) - return FALSE; + return false; stub_sec->size = 0; /* Add a branch around the stub section, and a nop, to keep it 8 byte @@ -4669,7 +4669,7 @@ elfNN_aarch64_build_stubs (struct bfd_link_info *info) table = &htab->stub_hash_table; bfd_hash_traverse (table, aarch64_build_one_stub, info); - return TRUE; + return true; } @@ -4839,11 +4839,11 @@ aarch64_calculate_got_entry_vma (struct elf_link_hash_entry *h, struct elf_aarch64_link_hash_table *globals, struct bfd_link_info *info, bfd_vma value, bfd *output_bfd, - bfd_boolean *unresolved_reloc_p) + bool *unresolved_reloc_p) { bfd_vma off = (bfd_vma) - 1; asection *basegot = globals->root.sgot; - bfd_boolean dyn = globals->root.dynamic_sections_created; + bool dyn = globals->root.dynamic_sections_created; if (h != NULL) { @@ -4874,7 +4874,7 @@ aarch64_calculate_got_entry_vma (struct elf_link_hash_entry *h, } } else - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; off = off + basegot->output_section->vma + basegot->output_offset; } @@ -4889,7 +4889,7 @@ static bfd_reloc_code_real_type aarch64_tls_transition_without_check (bfd_reloc_code_real_type r_type, struct elf_link_hash_entry *h) { - bfd_boolean is_local = h == NULL; + bool is_local = h == NULL; switch (r_type) { @@ -5027,7 +5027,7 @@ aarch64_reloc_got_type (bfd_reloc_code_real_type r_type) return GOT_UNKNOWN; } -static bfd_boolean +static bool aarch64_can_relax_tls (bfd *input_bfd, struct bfd_link_info *info, bfd_reloc_code_real_type r_type, @@ -5038,21 +5038,21 @@ aarch64_can_relax_tls (bfd *input_bfd, unsigned int reloc_got_type; if (! IS_AARCH64_TLS_RELAX_RELOC (r_type)) - return FALSE; + return false; symbol_got_type = elfNN_aarch64_symbol_got_type (h, input_bfd, r_symndx); reloc_got_type = aarch64_reloc_got_type (r_type); if (symbol_got_type == GOT_TLS_IE && GOT_TLS_GD_ANY_P (reloc_got_type)) - return TRUE; + return true; if (!bfd_link_executable (info)) - return FALSE; + return false; if (h && h->root.type == bfd_link_hash_undefweak) - return FALSE; + return false; - return TRUE; + return true; } /* Given the relocation code R_TYPE, return the relaxed bfd reloc @@ -5210,7 +5210,7 @@ struct erratum_835769_branch_to_stub_data /* Helper to insert branches to erratum 835769 stubs in the right places for a particular section. */ -static bfd_boolean +static bool make_branch_to_erratum_835769_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { @@ -5228,7 +5228,7 @@ make_branch_to_erratum_835769_stub (struct bfd_hash_entry *gen_entry, if (stub_entry->target_section != data->output_section || stub_entry->stub_type != aarch64_stub_erratum_835769_veneer) - return TRUE; + return true; contents = data->contents; veneered_insn_loc = stub_entry->target_section->output_section->vma @@ -5252,11 +5252,11 @@ make_branch_to_erratum_835769_stub (struct bfd_hash_entry *gen_entry, branch_insn |= branch_offset; bfd_putl32 (branch_insn, &contents[target]); - return TRUE; + return true; } -static bfd_boolean +static bool _bfd_aarch64_erratum_843419_branch_to_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { @@ -5280,7 +5280,7 @@ _bfd_aarch64_erratum_843419_branch_to_stub (struct bfd_hash_entry *gen_entry, if (stub_entry->target_section != section || stub_entry->stub_type != aarch64_stub_erratum_843419_veneer) - return TRUE; + return true; BFD_ASSERT (((htab->fix_erratum_843419 & ERRAT_ADRP) && stub_entry->stub_sec) || (htab->fix_erratum_843419 & ERRAT_ADR)); @@ -5358,11 +5358,11 @@ _bfd_aarch64_erratum_843419_branch_to_stub (struct bfd_hash_entry *gen_entry, To prevent this, issue a hard abort. */ BFD_FAIL (); } - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_aarch64_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info, asection *sec, @@ -5373,7 +5373,7 @@ elfNN_aarch64_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, elf_aarch64_hash_table (link_info); if (globals == NULL) - return FALSE; + return false; /* Fix code to point to erratum 835769 stubs. */ if (globals->fix_erratum_835769) @@ -5398,12 +5398,12 @@ elfNN_aarch64_write_section (bfd *output_bfd ATTRIBUTE_UNUSED, _bfd_aarch64_erratum_843419_branch_to_stub, &data); } - return FALSE; + return false; } /* Return TRUE if RELOC is a relocation against the base of GOT table. */ -static bfd_boolean +static bool aarch64_relocation_aginst_gp_p (bfd_reloc_code_real_type reloc) { return (reloc == BFD_RELOC_AARCH64_LD32_GOTPAGE_LO14 @@ -5427,8 +5427,8 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, struct bfd_link_info *info, asection *sym_sec, struct elf_link_hash_entry *h, - bfd_boolean *unresolved_reloc_p, - bfd_boolean save_addend, + bool *unresolved_reloc_p, + bool save_addend, bfd_vma *saved_addend, Elf_Internal_Sym *sym) { @@ -5441,12 +5441,12 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, bfd_vma place, off, got_entry_addr = 0; bfd_signed_vma signed_addend; struct elf_aarch64_link_hash_table *globals; - bfd_boolean weak_undef_p; - bfd_boolean relative_reloc; + bool weak_undef_p; + bool relative_reloc; asection *base_got; bfd_vma orig_value = value; - bfd_boolean resolved_to_zero; - bfd_boolean abs_symbol_p; + bool resolved_to_zero; + bool abs_symbol_p; globals = elf_aarch64_hash_table (info); @@ -5693,7 +5693,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, case BFD_RELOC_AARCH64_TLSDESC_ADD: case BFD_RELOC_AARCH64_TLSDESC_CALL: case BFD_RELOC_AARCH64_TLSDESC_LDR: - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; return bfd_reloc_ok; case BFD_RELOC_AARCH64_NN: @@ -5724,24 +5724,24 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, { Elf_Internal_Rela outrel; bfd_byte *loc; - bfd_boolean skip, relocate; + bool skip, relocate; asection *sreloc; - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; - skip = FALSE; - relocate = FALSE; + skip = false; + relocate = false; outrel.r_addend = signed_addend; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) - 1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) - 2) { - skip = TRUE; - relocate = TRUE; + skip = true; + relocate = true; } else if (abs_symbol_p) { @@ -5807,7 +5807,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, case BFD_RELOC_AARCH64_JUMP26: { asection *splt = globals->root.splt; - bfd_boolean via_plt_p = + bool via_plt_p = splt != NULL && h != NULL && h->plt.offset != (bfd_vma) - 1; /* A call to an undefined weak symbol is converted to a jump to @@ -5855,7 +5855,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type, place, value, signed_addend, weak_undef_p); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; break; case BFD_RELOC_AARCH64_16_PCREL: @@ -5945,7 +5945,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, if (globals->root.sgot == NULL) BFD_ASSERT (h != NULL); - relative_reloc = FALSE; + relative_reloc = false; if (h != NULL) { bfd_vma addend = 0; @@ -5961,7 +5961,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, && h->root.type != bfd_link_hash_undefweak && bfd_link_pic (info) && !symbol_got_offset_mark_p (input_bfd, h, r_symndx)) - relative_reloc = TRUE; + relative_reloc = true; value = aarch64_calculate_got_entry_vma (h, globals, info, value, output_bfd, @@ -6010,7 +6010,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, base address. So, we need to generate a R_AARCH64_RELATIVE reloc for dynamic linker. */ if (bfd_link_pic (info)) - relative_reloc = TRUE; + relative_reloc = true; symbol_got_offset_mark (input_bfd, h, r_symndx); } @@ -6063,7 +6063,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type, place, value, 0, weak_undef_p); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; break; case BFD_RELOC_AARCH64_TLSGD_MOVW_G0_NC: @@ -6077,7 +6077,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type, place, value, 0, weak_undef_p); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; break; case BFD_RELOC_AARCH64_TLSLD_ADD_DTPREL_HI12: @@ -6151,7 +6151,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type, place, value, def_value, weak_undef_p); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; break; } @@ -6171,7 +6171,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type, place, value, 0, weak_undef_p); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; break; case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC: @@ -6190,7 +6190,7 @@ elfNN_aarch64_final_link_relocate (reloc_howto_type *howto, value = _bfd_aarch64_elf_resolve_relocation (input_bfd, bfd_r_type, place, value, 0, weak_undef_p); - *unresolved_reloc_p = FALSE; + *unresolved_reloc_p = false; break; default: @@ -6250,7 +6250,7 @@ struct erratum_843419_branch_to_stub_clear_data section inside IN_ARG matches. The clearing is done by setting the stub_type to none. */ -static bfd_boolean +static bool _bfd_aarch64_erratum_843419_clear_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { @@ -6262,7 +6262,7 @@ _bfd_aarch64_erratum_843419_clear_stub (struct bfd_hash_entry *gen_entry, if (stub_entry->target_section != data->output_section || stub_entry->stub_type != aarch64_stub_erratum_843419_veneer || stub_entry->adrp_offset != data->adrp_offset) - return TRUE; + return true; /* Change the stub type instead of removing the entry, removing from the hash table would be slower and we have already reserved the memory for the entry @@ -6272,7 +6272,7 @@ _bfd_aarch64_erratum_843419_clear_stub (struct bfd_hash_entry *gen_entry, /* We're done and there could have been only one matching stub at that particular offset, so abort further traversal. */ - return FALSE; + return false; } /* TLS Relaxations may relax an adrp sequence that matches the erratum 843419 @@ -6309,7 +6309,7 @@ elfNN_aarch64_tls_relax (struct elf_aarch64_link_hash_table *globals, bfd_byte *contents, Elf_Internal_Rela *rel, struct elf_link_hash_entry *h) { - bfd_boolean is_local = h == NULL; + bool is_local = h == NULL; unsigned int r_type = ELFNN_R_TYPE (rel->r_info); unsigned long insn; @@ -6713,7 +6713,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, Elf_Internal_Rela *relend; const char *name; struct elf_aarch64_link_hash_table *globals; - bfd_boolean save_addend = FALSE; + bool save_addend = false; bfd_vma addend = 0; globals = elf_aarch64_hash_table (info); @@ -6737,7 +6737,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, bfd_reloc_status_type r; arelent bfd_reloc; char sym_type; - bfd_boolean unresolved_reloc = FALSE; + bool unresolved_reloc = false; char *error_message = NULL; r_symndx = ELFNN_R_SYM (rel->r_info); @@ -6770,7 +6770,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, (*info->callbacks->undefined_symbol) (info, bfd_elf_string_from_elf_section (input_bfd, symtab_hdr->sh_link, sym->st_name), - input_bfd, input_section, rel->r_offset, TRUE); + input_bfd, input_section, rel->r_offset, true); relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel); @@ -6779,7 +6779,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) { h = elfNN_aarch64_get_local_sym_hash (globals, input_bfd, - rel, FALSE); + rel, false); if (h == NULL) abort (); @@ -6790,7 +6790,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -6862,9 +6862,9 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, && rel->r_offset == rel[1].r_offset && ELFNN_R_TYPE (rel[1].r_info) != R_AARCH64_NONE && ELFNN_R_TYPE (rel[1].r_info) != R_AARCH64_NULL) - save_addend = TRUE; + save_addend = true; else - save_addend = FALSE; + save_addend = false; if (r == bfd_reloc_continue) r = elfNN_aarch64_final_link_relocate (howto, input_bfd, output_bfd, @@ -6885,7 +6885,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, case BFD_RELOC_AARCH64_TLSLD_ADR_PREL21: if (! symbol_got_offset_mark_p (input_bfd, h, r_symndx)) { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; bfd_byte *loc; int indx; bfd_vma off; @@ -6979,7 +6979,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, case BFD_RELOC_AARCH64_TLSIE_MOVW_GOTTPREL_G1: if (! symbol_got_offset_mark_p (input_bfd, h, r_symndx)) { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; bfd_byte *loc; int indx; bfd_vma off; @@ -7035,7 +7035,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, case BFD_RELOC_AARCH64_TLSDESC_OFF_G1: if (! symbol_tlsdesc_got_offset_mark_p (input_bfd, h, r_symndx)) { - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; int indx = h && h->dynindx != -1 ? h->dynindx : 0; bfd_vma off = symbol_tlsdesc_got_offset (input_bfd, h, r_symndx); @@ -7105,7 +7105,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, "unresolvable %s relocation against symbol `%s'"), input_bfd, input_section, (uint64_t) rel->r_offset, howto->name, h->root.root.string); - return FALSE; + return false; } if (r != bfd_reloc_ok && r != bfd_reloc_continue) @@ -7127,7 +7127,7 @@ elfNN_aarch64_relocate_section (bfd *output_bfd, _("too many GOT entries for -fpic, " "please recompile with -fPIC"), name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; } /* Overflow can occur when a variable is referenced with a type that has a larger alignment than the type with which it was @@ -7161,7 +7161,7 @@ alignment than was declared where it was defined"), case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -7192,12 +7192,12 @@ alignment than was declared where it was defined"), addend = 0; } - return TRUE; + return true; } /* Set the right machine number. */ -static bfd_boolean +static bool elfNN_aarch64_object_p (bfd *abfd) { #if ARCH_SIZE == 32 @@ -7205,12 +7205,12 @@ elfNN_aarch64_object_p (bfd *abfd) #else bfd_default_set_arch_mach (abfd, bfd_arch_aarch64, bfd_mach_aarch64); #endif - return TRUE; + return true; } /* Function to keep AArch64 specific flags in the ELF header. */ -static bfd_boolean +static bool elfNN_aarch64_set_private_flags (bfd *abfd, flagword flags) { if (elf_flags_init (abfd) && elf_elfheader (abfd)->e_flags != flags) @@ -7219,30 +7219,30 @@ elfNN_aarch64_set_private_flags (bfd *abfd, flagword flags) else { elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; + elf_flags_init (abfd) = true; } - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword out_flags; flagword in_flags; - bfd_boolean flags_compatible = TRUE; + bool flags_compatible = true; asection *sec; /* Check if we have the same endianess. */ if (!_bfd_generic_verify_endian_match (ibfd, info)) - return FALSE; + return false; if (!is_aarch64_elf (ibfd) || !is_aarch64_elf (obfd)) - return TRUE; + return true; /* The input BFD must have had its flags initialised. */ /* The following seems bogus to me -- The flags are initialized in @@ -7263,9 +7263,9 @@ elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) to the default values. */ if (bfd_get_arch_info (ibfd)->the_default && elf_elfheader (ibfd)->e_flags == 0) - return TRUE; + return true; - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -7273,12 +7273,12 @@ elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) return bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd)); - return TRUE; + return true; } /* Identical flags must be compatible. */ if (in_flags == out_flags) - return TRUE; + return true; /* Check to see if the input BFD actually contains any sections. If not, its flags may not have been initialised either, but it @@ -7292,22 +7292,22 @@ elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) in data sections ? */ if (!(ibfd->flags & DYNAMIC)) { - bfd_boolean null_input_bfd = TRUE; - bfd_boolean only_data_sections = TRUE; + bool null_input_bfd = true; + bool only_data_sections = true; for (sec = ibfd->sections; sec != NULL; sec = sec->next) { if ((bfd_section_flags (sec) & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) - only_data_sections = FALSE; + only_data_sections = false; - null_input_bfd = FALSE; + null_input_bfd = false; break; } if (null_input_bfd || only_data_sections) - return TRUE; + return true; } return flags_compatible; @@ -7315,7 +7315,7 @@ elfNN_aarch64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Display the flags field. */ -static bfd_boolean +static bool elfNN_aarch64_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = (FILE *) ptr; @@ -7338,12 +7338,12 @@ elfNN_aarch64_print_private_bfd_data (bfd *abfd, void *ptr) fputc ('\n', file); - return TRUE; + return true; } /* Return true if we need copy relocation against EH. */ -static bfd_boolean +static bool need_copy_relocation_p (struct elf_aarch64_link_hash_entry *eh) { struct elf_dyn_relocs *p; @@ -7355,15 +7355,15 @@ need_copy_relocation_p (struct elf_aarch64_link_hash_entry *eh) to avoid propagating the relocation into runtime that current glibc does not support. */ if (p->pc_count) - return TRUE; + return true; s = p->sec->output_section; /* Need copy relocation if it's against read-only section. */ if (s != NULL && (s->flags & SEC_READONLY) != 0) - return TRUE; + return true; } - return FALSE; + return false; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -7372,7 +7372,7 @@ need_copy_relocation_p (struct elf_aarch64_link_hash_entry *eh) change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool elfNN_aarch64_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -7399,7 +7399,7 @@ elfNN_aarch64_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else /* Otherwise, reset to -1. */ @@ -7417,7 +7417,7 @@ elfNN_aarch64_adjust_dynamic_symbol (struct bfd_link_info *info, h->root.u.def.value = def->root.u.def.value; if (ELIMINATE_COPY_RELOCS || info->nocopyreloc) h->non_got_ref = def->non_got_ref; - return TRUE; + return true; } /* If we are creating a shared library, we must presume that the @@ -7425,18 +7425,18 @@ elfNN_aarch64_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } if (ELIMINATE_COPY_RELOCS) @@ -7448,7 +7448,7 @@ elfNN_aarch64_adjust_dynamic_symbol (struct bfd_link_info *info, if (!need_copy_relocation_p (eh)) { h->non_got_ref = 0; - return TRUE; + return true; } } @@ -7487,7 +7487,7 @@ elfNN_aarch64_adjust_dynamic_symbol (struct bfd_link_info *info, } -static bfd_boolean +static bool elfNN_aarch64_allocate_local_symbols (bfd *abfd, unsigned number) { struct elf_aarch64_local_symbol *locals; @@ -7497,15 +7497,15 @@ elfNN_aarch64_allocate_local_symbols (bfd *abfd, unsigned number) locals = (struct elf_aarch64_local_symbol *) bfd_zalloc (abfd, number * sizeof (struct elf_aarch64_local_symbol)); if (locals == NULL) - return FALSE; + return false; elf_aarch64_locals (abfd) = locals; } - return TRUE; + return true; } /* Create the .got section to hold the global offset table. */ -static bfd_boolean +static bool aarch64_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -7516,7 +7516,7 @@ aarch64_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ if (htab->sgot != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; @@ -7527,13 +7527,13 @@ aarch64_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->srelgot = s; s = bfd_make_section_anyway_with_flags (abfd, ".got", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgot = s; htab->sgot->size += GOT_ENTRY_SIZE; @@ -7547,7 +7547,7 @@ aarch64_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; } if (bed->want_got_plt) @@ -7555,19 +7555,19 @@ aarch64_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgotplt = s; } /* The first bit of the global offset table is the header. */ s->size += bed->got_header_size; - return TRUE; + return true; } /* Look through the relocs for a section during the first phase. */ -static bfd_boolean +static bool elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -7580,7 +7580,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, struct elf_aarch64_link_hash_table *htab; if (bfd_link_relocatable (info)) - return TRUE; + return true; BFD_ASSERT (is_aarch64_elf (abfd)); @@ -7606,7 +7606,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, { /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx < symtab_hdr->sh_info) @@ -7615,15 +7615,15 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; /* Check relocation against local STT_GNU_IFUNC symbol. */ if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { h = elfNN_aarch64_get_local_sym_hash (htab, abfd, rel, - TRUE); + true); if (h == NULL) - return FALSE; + return false; /* Fake a STT_GNU_IFUNC symbol. */ h->type = STT_GNU_IFUNC; @@ -7659,7 +7659,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, htab->root.dynobj = abfd; if (! aarch64_elf_create_got_section (htab->root.dynobj, info)) - return FALSE; + return false; BFD_ASSERT (h == htab->root.hgot); } @@ -7690,7 +7690,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, if (htab->root.dynobj == NULL) htab->root.dynobj = abfd; if (!_bfd_elf_create_ifunc_sections (htab->root.dynobj, info)) - return FALSE; + return false; break; } @@ -7724,7 +7724,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, abfd, elfNN_aarch64_howto_table[howto_index].name, (h) ? h->root.root.string : "a local symbol"); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else break; @@ -7743,7 +7743,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, abfd, elfNN_aarch64_howto_table[howto_index].name, (h) ? h->root.root.string : "a local symbol"); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Fall through. */ @@ -7818,10 +7818,10 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, htab->root.dynobj = abfd; sreloc = _bfd_elf_make_dynamic_reloc_section - (sec, htab->root.dynobj, LOG_FILE_ALIGN, abfd, /*rela? */ TRUE); + (sec, htab->root.dynobj, LOG_FILE_ALIGN, abfd, /*rela? */ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -7842,7 +7842,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->root.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -7861,7 +7861,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, p = ((struct elf_dyn_relocs *) bfd_zalloc (htab->root.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -7924,7 +7924,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, if (!elfNN_aarch64_allocate_local_symbols (abfd, symtab_hdr->sh_info)) - return FALSE; + return false; locals = elf_aarch64_locals (abfd); BFD_ASSERT (r_symndx < symtab_hdr->sh_info); @@ -7967,7 +7967,7 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, if (htab->root.dynobj == NULL) htab->root.dynobj = abfd; if (! aarch64_elf_create_got_section (htab->root.dynobj, info)) - return FALSE; + return false; break; } @@ -7990,12 +7990,12 @@ elfNN_aarch64_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Treat mapping symbols as special target symbols. */ -static bfd_boolean +static bool elfNN_aarch64_is_target_special_symbol (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym) { @@ -8042,13 +8042,13 @@ elfNN_aarch64_maybe_function_sym (const asymbol *sym, asection *sec, return size; } -static bfd_boolean +static bool elfNN_aarch64_find_inliner_info (bfd *abfd, const char **filename_ptr, const char **functionname_ptr, unsigned int *line_ptr) { - bfd_boolean found; + bool found; found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr, functionname_ptr, line_ptr, &elf_tdata (abfd)->dwarf2_find_line_info); @@ -8056,17 +8056,17 @@ elfNN_aarch64_find_inliner_info (bfd *abfd, } -static bfd_boolean +static bool elfNN_aarch64_init_file_header (bfd *abfd, struct bfd_link_info *link_info) { Elf_Internal_Ehdr *i_ehdrp; /* ELF file header, internal form. */ if (!_bfd_elf_init_file_header (abfd, link_info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_ident[EI_ABIVERSION] = AARCH64_ELF_ABI_VERSION; - return TRUE; + return true; } static enum elf_reloc_type_class @@ -8122,7 +8122,7 @@ elfNN_aarch64_reloc_type_class (const struct bfd_link_info *info ATTRIBUTE_UNUSE called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool elfNN_aarch64_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, int shindex) @@ -8138,13 +8138,13 @@ elfNN_aarch64_section_from_shdr (bfd *abfd, break; default: - return FALSE; + return false; } if (!_bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; - return TRUE; + return true; } /* A structure used to record a list of sections, independently @@ -8255,7 +8255,7 @@ enum map_symbol_type /* Output a single mapping symbol. */ -static bfd_boolean +static bool elfNN_aarch64_output_map_sym (output_arch_syminfo *osi, enum map_symbol_type type, bfd_vma offset) { @@ -8273,7 +8273,7 @@ elfNN_aarch64_output_map_sym (output_arch_syminfo *osi, /* Output a single local symbol for a generated stub. */ -static bfd_boolean +static bool elfNN_aarch64_output_stub_sym (output_arch_syminfo *osi, const char *name, bfd_vma offset, bfd_vma size) { @@ -8288,7 +8288,7 @@ elfNN_aarch64_output_stub_sym (output_arch_syminfo *osi, const char *name, return osi->func (osi->finfo, name, &sym, osi->sec, NULL) == 1; } -static bfd_boolean +static bool aarch64_map_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) { struct elf_aarch64_stub_hash_entry *stub_entry; @@ -8306,7 +8306,7 @@ aarch64_map_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) /* Ensure this stub is attached to the current section being processed. */ if (stub_sec != osi->sec) - return TRUE; + return true; addr = (bfd_vma) stub_entry->stub_offset; @@ -8317,32 +8317,32 @@ aarch64_map_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) case aarch64_stub_adrp_branch: if (!elfNN_aarch64_output_stub_sym (osi, stub_name, addr, sizeof (aarch64_adrp_branch_stub))) - return FALSE; + return false; if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr)) - return FALSE; + return false; break; case aarch64_stub_long_branch: if (!elfNN_aarch64_output_stub_sym (osi, stub_name, addr, sizeof (aarch64_long_branch_stub))) - return FALSE; + return false; if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr)) - return FALSE; + return false; if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_DATA, addr + 16)) - return FALSE; + return false; break; case aarch64_stub_erratum_835769_veneer: if (!elfNN_aarch64_output_stub_sym (osi, stub_name, addr, sizeof (aarch64_erratum_835769_stub))) - return FALSE; + return false; if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr)) - return FALSE; + return false; break; case aarch64_stub_erratum_843419_veneer: if (!elfNN_aarch64_output_stub_sym (osi, stub_name, addr, sizeof (aarch64_erratum_843419_stub))) - return FALSE; + return false; if (!elfNN_aarch64_output_map_sym (osi, AARCH64_MAP_INSN, addr)) - return FALSE; + return false; break; case aarch64_stub_none: break; @@ -8351,12 +8351,12 @@ aarch64_map_one_stub (struct bfd_hash_entry *gen_entry, void *in_arg) abort (); } - return TRUE; + return true; } /* Output mapping symbols for linker generated sections. */ -static bfd_boolean +static bool elfNN_aarch64_output_arch_local_syms (bfd *output_bfd, struct bfd_link_info *info, void *finfo, @@ -8394,7 +8394,7 @@ elfNN_aarch64_output_arch_local_syms (bfd *output_bfd, /* The first instruction in a stub is always a branch. */ if (!elfNN_aarch64_output_map_sym (&osi, AARCH64_MAP_INSN, 0)) - return FALSE; + return false; bfd_hash_traverse (&htab->stub_hash_table, aarch64_map_one_stub, &osi); @@ -8403,7 +8403,7 @@ elfNN_aarch64_output_arch_local_syms (bfd *output_bfd, /* Finally, output mapping symbols for the PLT. */ if (!htab->root.splt || htab->root.splt->size == 0) - return TRUE; + return true; osi.sec_shndx = _bfd_elf_section_from_bfd_section (output_bfd, htab->root.splt->output_section); @@ -8411,13 +8411,13 @@ elfNN_aarch64_output_arch_local_syms (bfd *output_bfd, elfNN_aarch64_output_map_sym (&osi, AARCH64_MAP_INSN, 0); - return TRUE; + return true; } /* Allocate target specific section data. */ -static bfd_boolean +static bool elfNN_aarch64_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -8427,7 +8427,7 @@ elfNN_aarch64_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -8445,7 +8445,7 @@ unrecord_section_via_map_over_sections (bfd *abfd ATTRIBUTE_UNUSED, unrecord_section_with_aarch64_elf_section_data (sec); } -static bfd_boolean +static bool elfNN_aarch64_close_and_cleanup (bfd *abfd) { if (abfd->sections) @@ -8455,7 +8455,7 @@ elfNN_aarch64_close_and_cleanup (bfd *abfd) return _bfd_elf_close_and_cleanup (abfd); } -static bfd_boolean +static bool elfNN_aarch64_bfd_free_cached_info (bfd *abfd) { if (abfd->sections) @@ -8469,13 +8469,13 @@ elfNN_aarch64_bfd_free_cached_info (bfd *abfd) the got, plt, gotplt and their relocation sections are all created in the standard part of the bfd elf backend. */ -static bfd_boolean +static bool elfNN_aarch64_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { /* We need to create .got section. */ if (!aarch64_elf_create_got_section (dynobj, info)) - return FALSE; + return false; return _bfd_elf_create_dynamic_sections (dynobj, info); } @@ -8484,7 +8484,7 @@ elfNN_aarch64_create_dynamic_sections (bfd *dynobj, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -8502,7 +8502,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) called to copy all relevant data from the generic to the concrete symbol instance. */ if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -8514,7 +8514,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) here if it is defined and referenced in a non-shared object. */ if (h->type == STT_GNU_IFUNC && h->def_regular) - return TRUE; + return true; else if (htab->root.dynamic_sections_created && h->plt.refcount > 0) { /* Make sure this symbol is output as a dynamic symbol. @@ -8523,7 +8523,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && h->root.type == bfd_link_hash_undefweak) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (bfd_link_pic (info) || WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, 0, h)) @@ -8598,7 +8598,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->got.refcount > 0) { - bfd_boolean dyn; + bool dyn; unsigned got_type = elf_aarch64_hash_entry (h)->got_type; h->got.offset = (bfd_vma) - 1; @@ -8611,7 +8611,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && h->root.type == bfd_link_hash_undefweak) { if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (got_type == GOT_UNKNOWN) @@ -8688,7 +8688,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) } if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -8733,7 +8733,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local && h->root.type == bfd_link_hash_undefweak && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } @@ -8756,7 +8756,7 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local && h->root.type == bfd_link_hash_undefweak && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; /* If that succeeded, we know we'll be keeping all the relocs. */ @@ -8781,13 +8781,13 @@ elfNN_aarch64_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) sreloc->size += p->count * RELOC_SIZE (htab); } - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for ifunc dynamic relocs. */ -static bfd_boolean +static bool elfNN_aarch64_allocate_ifunc_dynrelocs (struct elf_link_hash_entry *h, void *inf) { @@ -8804,7 +8804,7 @@ elfNN_aarch64_allocate_ifunc_dynrelocs (struct elf_link_hash_entry *h, called to copy all relevant data from the generic to the concrete symbol instance. */ if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -8821,8 +8821,8 @@ elfNN_aarch64_allocate_ifunc_dynrelocs (struct elf_link_hash_entry *h, htab->plt_entry_size, htab->plt_header_size, GOT_ENTRY_SIZE, - FALSE); - return TRUE; + false); + return true; } /* Allocate space in .plt, .got and associated reloc sections for @@ -8847,14 +8847,14 @@ elfNN_aarch64_allocate_local_ifunc_dynrelocs (void **slot, void *inf) /* This is the most important function of all . Innocuosly named though ! */ -static bfd_boolean +static bool elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { struct elf_aarch64_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; htab = elf_aarch64_hash_table ((info)); @@ -9030,7 +9030,7 @@ elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { if ((s->flags & SEC_LINKER_CREATED) == 0) @@ -9050,7 +9050,7 @@ elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, else if (startswith (bfd_section_name (s), ".rela")) { if (s->size != 0 && s != htab->root.srelplt) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -9088,7 +9088,7 @@ elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, of garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } if (htab->root.dynamic_sections_created) @@ -9102,31 +9102,31 @@ elfNN_aarch64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, _bfd_elf_add_dynamic_entry (info, TAG, VAL) if (!_bfd_elf_add_dynamic_tags (output_bfd, info, relocs)) - return FALSE; + return false; if (htab->root.splt->size != 0) { if (htab->variant_pcs && !add_dynamic_entry (DT_AARCH64_VARIANT_PCS, 0)) - return FALSE; + return false; if ((elf_aarch64_tdata (output_bfd)->plt_type == PLT_BTI_PAC) && (!add_dynamic_entry (DT_AARCH64_BTI_PLT, 0) || !add_dynamic_entry (DT_AARCH64_PAC_PLT, 0))) - return FALSE; + return false; else if ((elf_aarch64_tdata (output_bfd)->plt_type == PLT_BTI) && !add_dynamic_entry (DT_AARCH64_BTI_PLT, 0)) - return FALSE; + return false; else if ((elf_aarch64_tdata (output_bfd)->plt_type == PLT_PAC) && !add_dynamic_entry (DT_AARCH64_PAC_PLT, 0)) - return FALSE; + return false; } } #undef add_dynamic_entry - return TRUE; + return true; } static inline void @@ -9261,14 +9261,14 @@ elfNN_aarch64_create_small_pltn_entry (struct elf_link_hash_entry *h, /* Size sections even though they're not dynamic. We use it to setup _TLS_MODULE_BASE_, if needed. */ -static bfd_boolean +static bool elfNN_aarch64_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { asection *tls_sec; if (bfd_link_relocatable (info)) - return TRUE; + return true; tls_sec = elf_hash_table (info)->tls_sec; @@ -9277,7 +9277,7 @@ elfNN_aarch64_always_size_sections (bfd *output_bfd, struct elf_link_hash_entry *tlsbase; tlsbase = elf_link_hash_lookup (elf_hash_table (info), - "_TLS_MODULE_BASE_", TRUE, TRUE, FALSE); + "_TLS_MODULE_BASE_", true, true, false); if (tlsbase) { @@ -9287,24 +9287,24 @@ elfNN_aarch64_always_size_sections (bfd *output_bfd, if (!(_bfd_generic_link_add_one_symbol (info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL, - tls_sec, 0, NULL, FALSE, bed->collect, &h))) - return FALSE; + tls_sec, 0, NULL, false, bed->collect, &h))) + return false; tlsbase->type = STT_TLS; tlsbase = (struct elf_link_hash_entry *) h; tlsbase->def_regular = 1; tlsbase->other = STV_HIDDEN; - (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE); + (*bed->elf_backend_hide_symbol) (info, tlsbase, true); } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -9344,7 +9344,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd, || plt == NULL || gotplt == NULL || relplt == NULL) - return FALSE; + return false; elfNN_aarch64_create_small_pltn_entry (h, htab, output_bfd, info); if (!h->def_regular) @@ -9407,13 +9407,13 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd, + h->plt.offset), htab->root.sgot->contents + (h->got.offset & ~(bfd_vma) 1)); - return TRUE; + return true; } } else if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h)) { if (!(h->def_regular || ELF_COMMON_DEF_P (h))) - return FALSE; + return false; BFD_ASSERT ((h->got.offset & 1) != 0); rela.r_info = ELFNN_R_INFO (0, AARCH64_R (RELATIVE)); @@ -9469,7 +9469,7 @@ elfNN_aarch64_finish_dynamic_symbol (bfd *output_bfd, || h == elf_hash_table (info)->hgot)) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up local dynamic symbol handling. We set the contents of @@ -9546,7 +9546,7 @@ elfNN_aarch64_init_small_plt0_entry (bfd *output_bfd ATTRIBUTE_UNUSED, PG_OFFSET (plt_got_2nd_ent)); } -static bfd_boolean +static bool elfNN_aarch64_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -9701,7 +9701,7 @@ elfNN_aarch64_finish_dynamic_sections (bfd *output_bfd, { _bfd_error_handler (_("discarded output section: `%pA'"), htab->root.sgotplt); - return FALSE; + return false; } /* Fill in the first three entries in the global offset table. */ @@ -9741,7 +9741,7 @@ elfNN_aarch64_finish_dynamic_sections (bfd *output_bfd, elfNN_aarch64_finish_local_dynamic_symbol, info); - return TRUE; + return true; } /* Check if BTI enabled PLTs are needed. Returns the type needed. */ @@ -9830,7 +9830,7 @@ elfNN_aarch64_plt_sym_val (bfd_vma i, const asection *plt, It also allows a period initiated suffix to be added to the symbol, ie: "$[adtx]\.[:sym_char]+". */ -static bfd_boolean +static bool is_aarch64_mapping_symbol (const char * name) { return name != NULL /* Paranoia. */ @@ -9877,7 +9877,7 @@ elfNN_aarch64_link_setup_gnu_properties (struct bfd_link_info *info) /* Implement elf_backend_merge_gnu_properties for AArch64. It serves as a wrapper function for _bfd_aarch64_elf_merge_gnu_properties to account for the effect of GNU properties of the output_bfd. */ -static bfd_boolean +static bool elfNN_aarch64_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd, bfd *bbfd, elf_property *aprop, diff --git a/bfd/elfnn-ia64.c b/bfd/elfnn-ia64.c index 04bf7d7f25..ceebe554a5 100644 --- a/bfd/elfnn-ia64.c +++ b/bfd/elfnn-ia64.c @@ -77,7 +77,7 @@ struct elfNN_ia64_dyn_sym_info int count; /* Is this reloc against readonly section? */ - bfd_boolean reltext; + bool reltext; } *reloc_entries; /* TRUE when the section contents have been updated. */ @@ -162,7 +162,7 @@ struct elfNN_ia64_allocate_data { struct bfd_link_info *info; bfd_size_type ofs; - bfd_boolean only_got; + bool only_got; }; #define elfNN_ia64_hash_table(p) \ @@ -173,24 +173,24 @@ struct elfNN_ia64_allocate_data static struct elfNN_ia64_dyn_sym_info * get_dyn_sym_info (struct elfNN_ia64_link_hash_table *ia64_info, struct elf_link_hash_entry *h, - bfd *abfd, const Elf_Internal_Rela *rel, bfd_boolean create); -static bfd_boolean elfNN_ia64_dynamic_symbol_p + bfd *abfd, const Elf_Internal_Rela *rel, bool create); +static bool elfNN_ia64_dynamic_symbol_p (struct elf_link_hash_entry *h, struct bfd_link_info *info, int); -static bfd_boolean elfNN_ia64_choose_gp - (bfd *abfd, struct bfd_link_info *info, bfd_boolean final); +static bool elfNN_ia64_choose_gp + (bfd *abfd, struct bfd_link_info *info, bool final); static void elfNN_ia64_dyn_sym_traverse (struct elfNN_ia64_link_hash_table *ia64_info, - bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, void *), + bool (*func) (struct elfNN_ia64_dyn_sym_info *, void *), void * info); -static bfd_boolean allocate_global_data_got +static bool allocate_global_data_got (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data); -static bfd_boolean allocate_global_fptr_got +static bool allocate_global_fptr_got (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data); -static bfd_boolean allocate_local_got +static bool allocate_local_got (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data); -static bfd_boolean elfNN_ia64_hpux_vec +static bool elfNN_ia64_hpux_vec (const bfd_target *vec); -static bfd_boolean allocate_dynrel_entries +static bool allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data); static asection *get_pltoff (bfd *abfd, struct bfd_link_info *info, @@ -200,7 +200,7 @@ static asection *get_pltoff /* Given a ELF reloc, return the matching HOWTO structure. */ -static bfd_boolean +static bool elfNN_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, arelent *bfd_reloc, Elf_Internal_Rela *elf_reloc) @@ -214,10 +214,10 @@ elfNN_ia64_info_to_howto (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } #define PLT_HEADER_SIZE (3 * 16) @@ -329,10 +329,10 @@ elfNN_ia64_update_short_info (asection *sec, bfd_vma offset, } } -static bfd_boolean +static bool elfNN_ia64_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { struct one_fixup { @@ -349,16 +349,16 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, Elf_Internal_Sym *isymbuf = NULL; struct elfNN_ia64_link_hash_table *ia64_info; struct one_fixup *fixups = NULL; - bfd_boolean changed_contents = FALSE; - bfd_boolean changed_relocs = FALSE; - bfd_boolean changed_got = FALSE; - bfd_boolean skip_relax_pass_0 = TRUE; - bfd_boolean skip_relax_pass_1 = TRUE; + bool changed_contents = false; + bool changed_relocs = false; + bool changed_got = false; + bool skip_relax_pass_0 = true; + bool skip_relax_pass_1 = true; bfd_vma gp = 0; /* Assume we're not going to change any sizes, and we'll only need one pass. */ - *again = FALSE; + *again = false; if (bfd_link_relocatable (link_info)) (*link_info->callbacks->einfo) @@ -366,7 +366,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, /* Don't even try to relax for non-ELF outputs. */ if (!is_elf_hash_table (link_info->hash)) - return FALSE; + return false; /* Nothing to do if there are no relocations or there is no need for the current pass. */ @@ -374,11 +374,11 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, || sec->reloc_count == 0 || (link_info->relax_pass == 0 && sec->skip_relax_pass_0) || (link_info->relax_pass == 1 && sec->skip_relax_pass_1)) - return TRUE; + return true; ia64_info = elfNN_ia64_hash_table (link_info); if (ia64_info == NULL) - return FALSE; + return false; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -387,7 +387,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, (abfd, sec, NULL, (Elf_Internal_Rela *) NULL, link_info->keep_memory)); if (internal_relocs == NULL) - return FALSE; + return false; irelend = internal_relocs + sec->reloc_count; @@ -407,7 +407,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, asection *tsec; struct one_fixup *f; bfd_size_type amt; - bfd_boolean is_branch; + bool is_branch; struct elfNN_ia64_dyn_sym_info *dyn_i; char symtype; @@ -420,8 +420,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, /* In pass 1, all br relaxations are done. We can skip it. */ if (link_info->relax_pass == 1) continue; - skip_relax_pass_0 = FALSE; - is_branch = TRUE; + skip_relax_pass_0 = false; + is_branch = true; break; case R_IA64_PCREL60B: @@ -429,10 +429,10 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, will increase the code size. Defer it to pass 1. */ if (link_info->relax_pass == 0) { - skip_relax_pass_1 = FALSE; + skip_relax_pass_1 = false; continue; } - is_branch = TRUE; + is_branch = true; break; case R_IA64_GPREL22: @@ -444,10 +444,10 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, increase the code size. Defer it to pass 1. */ if (link_info->relax_pass == 0) { - skip_relax_pass_1 = FALSE; + skip_relax_pass_1 = false; continue; } - is_branch = FALSE; + is_branch = false; break; default: @@ -485,7 +485,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, tsec = bfd_section_from_elf_index (abfd, isym->st_shndx); toff = isym->st_value; - dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, NULL, abfd, irel, false); symtype = ELF_ST_TYPE (isym->st_info); } else @@ -501,7 +501,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, || h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; - dyn_i = get_dyn_sym_info (ia64_info, h, abfd, irel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, abfd, irel, false); /* For branches to dynamic symbols, we're interested instead in a branch to the PLT entry. */ @@ -608,8 +608,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, if ((irel->r_offset & 3) == 1) irel->r_offset += 1; - changed_contents = TRUE; - changed_relocs = TRUE; + changed_contents = true; + changed_relocs = true; } continue; @@ -625,8 +625,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, /* Make the relocation offset point to slot 1. */ irel->r_offset = (irel->r_offset & ~((bfd_vma) 0x3)) + 1; - changed_contents = TRUE; - changed_relocs = TRUE; + changed_contents = true; + changed_relocs = true; continue; } @@ -739,8 +739,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, != bfd_reloc_ok) goto error_return; - changed_contents = TRUE; - changed_relocs = TRUE; + changed_contents = true; + changed_relocs = true; } else { @@ -751,7 +751,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, gp = _bfd_get_gp_value (obfd); if (gp == 0) { - if (!elfNN_ia64_choose_gp (obfd, link_info, FALSE)) + if (!elfNN_ia64_choose_gp (obfd, link_info, false)) goto error_return; gp = _bfd_get_gp_value (obfd); } @@ -770,7 +770,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, { irel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (irel->r_info), R_IA64_GPREL22); - changed_relocs = TRUE; + changed_relocs = true; if (dyn_i->want_gotx) { dyn_i->want_gotx = 0; @@ -785,8 +785,8 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, { ia64_elf_relax_ldxmov (contents, roff); irel->r_info = ELFNN_R_INFO (0, R_IA64_NONE); - changed_contents = TRUE; - changed_relocs = TRUE; + changed_contents = true; + changed_relocs = true; } } } @@ -856,7 +856,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, if (bfd_link_pic (link_info) && ia64_info->self_dtpmod_offset != (bfd_vma) -1) ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); - data.only_got = TRUE; + data.only_got = true; elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data); } @@ -870,7 +870,7 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, } *again = changed_contents || changed_relocs; - return TRUE; + return true; error_return: if ((unsigned char *) isymbuf != symtab_hdr->contents) @@ -879,19 +879,19 @@ elfNN_ia64_relax_section (bfd *abfd, asection *sec, free (contents); if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } #undef skip_relax_pass_0 #undef skip_relax_pass_1 /* Return TRUE if NAME is an unwind table section name. */ -static inline bfd_boolean +static inline bool is_unwind_section_name (bfd *abfd, const char *name) { if (elfNN_ia64_hpux_vec (abfd->xvec) && !strcmp (name, ELF_STRING_ia64_unwind_hdr)) - return FALSE; + return false; return ((startswith (name, ELF_STRING_ia64_unwind) && ! startswith (name, ELF_STRING_ia64_unwind_info)) @@ -902,7 +902,7 @@ is_unwind_section_name (bfd *abfd, const char *name) is called when bfd_section_from_shdr finds a section with an unknown type. */ -static bfd_boolean +static bool elfNN_ia64_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -921,17 +921,17 @@ elfNN_ia64_section_from_shdr (bfd *abfd, case SHT_IA_64_EXT: if (strcmp (name, ELF_STRING_ia64_archext) != 0) - return FALSE; + return false; break; default: - return FALSE; + return false; } if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; - return TRUE; + return true; } /* Convert IA-64 specific section flags to bfd internal section flags. */ @@ -939,19 +939,19 @@ elfNN_ia64_section_from_shdr (bfd *abfd, /* ??? There is no bfd internal flag equivalent to the SHF_IA_64_NORECOV flag. */ -static bfd_boolean +static bool elfNN_ia64_section_flags (const Elf_Internal_Shdr *hdr) { if (hdr->sh_flags & SHF_IA_64_SHORT) hdr->bfd_section->flags |= SEC_SMALL_DATA; - return TRUE; + return true; } /* Set the correct type for an IA-64 ELF section. We do this by the section name, which is a hack, but ought to work. */ -static bfd_boolean +static bool elfNN_ia64_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) { @@ -997,13 +997,13 @@ elfNN_ia64_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, if (elfNN_ia64_hpux_vec (abfd->xvec) && (sec->flags & SHF_TLS)) hdr->sh_flags |= SHF_IA_64_HP_TLS; - return TRUE; + return true; } /* The final processing done just before writing out an IA-64 ELF object file. */ -static bfd_boolean +static bool elfNN_ia64_final_write_processing (bfd *abfd) { Elf_Internal_Shdr *hdr; @@ -1034,7 +1034,7 @@ elfNN_ia64_final_write_processing (bfd *abfd) flags |= EF_IA_64_ABI64; elf_elfheader(abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; + elf_flags_init (abfd) = true; } return _bfd_elf_final_write_processing (abfd); } @@ -1042,7 +1042,7 @@ elfNN_ia64_final_write_processing (bfd *abfd) /* Hook called by the linker routine which adds symbols from an object file. We use it to put .comm items in .sbss, and not .bss. */ -static bfd_boolean +static bool elfNN_ia64_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, @@ -1068,14 +1068,14 @@ elfNN_ia64_add_symbol_hook (bfd *abfd, | SEC_SMALL_DATA | SEC_LINKER_CREATED)); if (scomm == NULL) - return FALSE; + return false; } *secp = scomm; *valp = sym->st_size; } - return TRUE; + return true; } /* Return the number of additional phdrs we will need. */ @@ -1100,7 +1100,7 @@ elfNN_ia64_additional_program_headers (bfd *abfd, return ret; } -static bfd_boolean +static bool elfNN_ia64_modify_segment_map (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -1121,7 +1121,7 @@ elfNN_ia64_modify_segment_map (bfd *abfd, m = ((struct elf_segment_map *) bfd_zalloc (abfd, (bfd_size_type) sizeof *m)); if (m == NULL) - return FALSE; + return false; m->p_type = PT_IA_64_ARCHEXT; m->count = 1; @@ -1169,7 +1169,7 @@ elfNN_ia64_modify_segment_map (bfd *abfd, m = ((struct elf_segment_map *) bfd_zalloc (abfd, (bfd_size_type) sizeof *m)); if (m == NULL) - return FALSE; + return false; m->p_type = PT_IA_64_UNWIND; m->count = 1; @@ -1185,14 +1185,14 @@ elfNN_ia64_modify_segment_map (bfd *abfd, } } - return TRUE; + return true; } /* Turn on PF_IA_64_NORECOV if needed. This involves traversing all of the input sections for each output section in the segment and testing for SHF_IA_64_NORECOV on each. */ -static bfd_boolean +static bool elfNN_ia64_modify_headers (bfd *abfd, struct bfd_link_info *info) { struct elf_obj_tdata *tdata = elf_tdata (abfd); @@ -1231,7 +1231,7 @@ elfNN_ia64_modify_headers (bfd *abfd, struct bfd_link_info *info) /* According to the Tahoe assembler spec, all labels starting with a '.' are local. */ -static bfd_boolean +static bool elfNN_ia64_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { @@ -1240,11 +1240,11 @@ elfNN_ia64_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, /* Should we do dynamic things to this symbol? */ -static bfd_boolean +static bool elfNN_ia64_dynamic_symbol_p (struct elf_link_hash_entry *h, struct bfd_link_info *info, int r_type) { - bfd_boolean ignore_protected + bool ignore_protected = ((r_type & 0xf8) == 0x40 /* FPTR relocs */ || (r_type & 0xf8) == 0x50); /* LTOFF_FPTR relocs */ @@ -1345,7 +1345,7 @@ elfNN_ia64_hash_copy_indirect (struct bfd_link_info *info, static void elfNN_ia64_hash_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *xh, - bfd_boolean force_local) + bool force_local) { struct elfNN_ia64_link_hash_entry *h; struct elfNN_ia64_dyn_sym_info *dyn_i; @@ -1390,7 +1390,7 @@ elfNN_ia64_local_htab_eq (const void *ptr1, const void *ptr2) /* Free the global elfNN_ia64_dyn_sym_info array. */ -static bfd_boolean +static bool elfNN_ia64_global_dyn_info_free (void **xentry, void * unused ATTRIBUTE_UNUSED) { @@ -1403,7 +1403,7 @@ elfNN_ia64_global_dyn_info_free (void **xentry, entry->sorted_count = 0; entry->size = 0; - return TRUE; + return true; } /* Free the local elfNN_ia64_dyn_sym_info array. */ @@ -1421,7 +1421,7 @@ elfNN_ia64_local_dyn_info_free (void **slot, entry->sorted_count = 0; entry->size = 0; - return TRUE; + return true; } /* Destroy IA-64 linker hash table. */ @@ -1475,7 +1475,7 @@ elfNN_ia64_hash_table_create (bfd *abfd) return NULL; } ret->root.root.hash_table_free = elfNN_ia64_link_hash_table_free; - ret->root.dt_pltgot_required = TRUE; + ret->root.dt_pltgot_required = true; return &ret->root.root; } @@ -1484,11 +1484,11 @@ elfNN_ia64_hash_table_create (bfd *abfd) struct elfNN_ia64_dyn_sym_traverse_data { - bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, void *); + bool (*func) (struct elfNN_ia64_dyn_sym_info *, void *); void * data; }; -static bfd_boolean +static bool elfNN_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry, void * xdata) { @@ -1503,8 +1503,8 @@ elfNN_ia64_global_dyn_sym_thunk (struct bfd_hash_entry *xentry, count != 0; count--, dyn_i++) if (! (*data->func) (dyn_i, data->data)) - return FALSE; - return TRUE; + return false; + return true; } static int @@ -1521,13 +1521,14 @@ elfNN_ia64_local_dyn_sym_thunk (void **slot, void * xdata) count != 0; count--, dyn_i++) if (! (*data->func) (dyn_i, data->data)) - return FALSE; - return TRUE; + return false; + return true; } static void elfNN_ia64_dyn_sym_traverse (struct elfNN_ia64_link_hash_table *ia64_info, - bfd_boolean (*func) (struct elfNN_ia64_dyn_sym_info *, void *), + bool (*func) (struct elfNN_ia64_dyn_sym_info *, + void *), void * data) { struct elfNN_ia64_dyn_sym_traverse_data xdata; @@ -1541,7 +1542,7 @@ elfNN_ia64_dyn_sym_traverse (struct elfNN_ia64_link_hash_table *ia64_info, elfNN_ia64_local_dyn_sym_thunk, &xdata); } -static bfd_boolean +static bool elfNN_ia64_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { @@ -1549,22 +1550,22 @@ elfNN_ia64_create_dynamic_sections (bfd *abfd, asection *s; if (! _bfd_elf_create_dynamic_sections (abfd, info)) - return FALSE; + return false; ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; { flagword flags = bfd_section_flags (ia64_info->root.sgot); bfd_set_section_flags (ia64_info->root.sgot, SEC_SMALL_DATA | flags); /* The .got section is always aligned at 8 bytes. */ if (!bfd_set_section_alignment (ia64_info->root.sgot, 3)) - return FALSE; + return false; } if (!get_pltoff (abfd, info, ia64_info)) - return FALSE; + return false; s = bfd_make_section_anyway_with_flags (abfd, ".rela.IA_64.pltoff", (SEC_ALLOC | SEC_LOAD @@ -1574,17 +1575,17 @@ elfNN_ia64_create_dynamic_sections (bfd *abfd, | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, LOG_SECTION_ALIGN)) - return FALSE; + return false; ia64_info->rel_pltoff_sec = s; - return TRUE; + return true; } /* Find and/or create a hash entry for local symbol. */ static struct elfNN_ia64_local_hash_entry * get_local_sym_hash (struct elfNN_ia64_link_hash_table *ia64_info, bfd *abfd, const Elf_Internal_Rela *rel, - bfd_boolean create) + bool create) { struct elfNN_ia64_local_hash_entry e, *ret; asection *sec = abfd->sections; @@ -1814,7 +1815,7 @@ sort_dyn_sym_info (struct elfNN_ia64_dyn_sym_info *info, static struct elfNN_ia64_dyn_sym_info * get_dyn_sym_info (struct elfNN_ia64_link_hash_table *ia64_info, struct elf_link_hash_entry *h, bfd *abfd, - const Elf_Internal_Rela *rel, bfd_boolean create) + const Elf_Internal_Rela *rel, bool create) { struct elfNN_ia64_dyn_sym_info **info_p, *info, *dyn_i, key; unsigned int *count_p, *sorted_count_p, *size_p; @@ -2081,7 +2082,7 @@ get_pltoff (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, static asection * get_reloc_section (bfd *abfd, struct elfNN_ia64_link_hash_table *ia64_info, - asection *sec, bfd_boolean create) + asection *sec, bool create) { const char *srel_name; asection *srel; @@ -2114,9 +2115,9 @@ get_reloc_section (bfd *abfd, return srel; } -static bfd_boolean +static bool count_dyn_reloc (bfd *abfd, struct elfNN_ia64_dyn_sym_info *dyn_i, - asection *srel, int type, bfd_boolean reltext) + asection *srel, int type, bool reltext) { struct elfNN_ia64_dyn_reloc_entry *rent; @@ -2129,7 +2130,7 @@ count_dyn_reloc (bfd *abfd, struct elfNN_ia64_dyn_sym_info *dyn_i, rent = ((struct elfNN_ia64_dyn_reloc_entry *) bfd_alloc (abfd, (bfd_size_type) sizeof (*rent))); if (!rent) - return FALSE; + return false; rent->next = dyn_i->reloc_entries; rent->srel = srel; @@ -2140,10 +2141,10 @@ count_dyn_reloc (bfd *abfd, struct elfNN_ia64_dyn_sym_info *dyn_i, rent->reltext = reltext; rent->count++; - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) @@ -2169,15 +2170,15 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, int need_entry; struct elf_link_hash_entry *h; unsigned long r_symndx; - bfd_boolean maybe_dynamic; + bool maybe_dynamic; if (bfd_link_relocatable (info)) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; got = fptr = srel = pltoff = NULL; @@ -2345,8 +2346,8 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, abfd, 0, (bfd_vma) 0); } - if (get_dyn_sym_info (ia64_info, h, abfd, rel, TRUE) == NULL) - return FALSE; + if (get_dyn_sym_info (ia64_info, h, abfd, rel, true) == NULL) + return false; } /* Now, we only do lookup without insertion, which is very fast @@ -2514,7 +2515,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, if (!need_entry) continue; - dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, false); /* Record whether or not this is a local symbol. */ dyn_i->h = h; @@ -2527,7 +2528,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { got = get_got (abfd, info, ia64_info); if (!got) - return FALSE; + return false; } if (need_entry & NEED_GOT) dyn_i->want_got = 1; @@ -2546,7 +2547,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { fptr = get_fptr (abfd, info, ia64_info); if (!fptr) - return FALSE; + return false; } /* FPTRs for shared libraries are allocated by the dynamic @@ -2556,7 +2557,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { if (! (bfd_elf_link_record_local_dynamic_symbol (info, abfd, (long) r_symndx))) - return FALSE; + return false; } dyn_i->want_fptr = 1; @@ -2580,7 +2581,7 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { pltoff = get_pltoff (abfd, info, ia64_info); if (!pltoff) - return FALSE; + return false; } dyn_i->want_pltoff = 1; @@ -2589,23 +2590,23 @@ elfNN_ia64_check_relocs (bfd *abfd, struct bfd_link_info *info, { if (!srel) { - srel = get_reloc_section (abfd, ia64_info, sec, TRUE); + srel = get_reloc_section (abfd, ia64_info, sec, true); if (!srel) - return FALSE; + return false; } if (!count_dyn_reloc (abfd, dyn_i, srel, dynrel_type, (sec->flags & SEC_READONLY) != 0)) - return FALSE; + return false; } } - return TRUE; + return true; } /* For cleanliness, and potentially faster dynamic loading, allocate external GOT entries first. */ -static bfd_boolean +static bool allocate_global_data_got (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2636,7 +2637,7 @@ allocate_global_data_got (struct elfNN_ia64_dyn_sym_info *dyn_i, ia64_info = elfNN_ia64_hash_table (x->info); if (ia64_info == NULL) - return FALSE; + return false; if (ia64_info->self_dtpmod_offset == (bfd_vma) -1) { @@ -2651,12 +2652,12 @@ allocate_global_data_got (struct elfNN_ia64_dyn_sym_info *dyn_i, dyn_i->dtprel_offset = x->ofs; x->ofs += 8; } - return TRUE; + return true; } /* Next, allocate all the GOT entries used by LTOFF_FPTR relocs. */ -static bfd_boolean +static bool allocate_global_fptr_got (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2669,12 +2670,12 @@ allocate_global_fptr_got (struct elfNN_ia64_dyn_sym_info *dyn_i, dyn_i->got_offset = x->ofs; x->ofs += 8; } - return TRUE; + return true; } /* Lastly, allocate all the GOT entries for local data. */ -static bfd_boolean +static bool allocate_local_got (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2686,7 +2687,7 @@ allocate_local_got (struct elfNN_ia64_dyn_sym_info *dyn_i, dyn_i->got_offset = x->ofs; x->ofs += 8; } - return TRUE; + return true; } /* Search for the index of a global symbol in it's defining object file. */ @@ -2710,7 +2711,7 @@ global_sym_index (struct elf_link_hash_entry *h) /* Allocate function descriptors. We can do these for every function in a main executable that is not exported. */ -static bfd_boolean +static bool allocate_fptr (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { struct elfNN_ia64_allocate_data *x = (struct elfNN_ia64_allocate_data *)data; @@ -2738,7 +2739,7 @@ allocate_fptr (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) if (!bfd_elf_link_record_local_dynamic_symbol (x->info, h->root.u.def.section->owner, global_sym_index (h))) - return FALSE; + return false; } dyn_i->want_fptr = 0; @@ -2751,12 +2752,12 @@ allocate_fptr (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) else dyn_i->want_fptr = 0; } - return TRUE; + return true; } /* Allocate all the minimal PLT entries. */ -static bfd_boolean +static bool allocate_plt_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2788,12 +2789,12 @@ allocate_plt_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, dyn_i->want_plt2 = 0; } } - return TRUE; + return true; } /* Allocate all the full PLT entries. */ -static bfd_boolean +static bool allocate_plt2_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2812,7 +2813,7 @@ allocate_plt2_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, h = (struct elf_link_hash_entry *) h->root.u.i.link; dyn_i->h->plt.offset = ofs; } - return TRUE; + return true; } /* Allocate all the PLTOFF entries requested by relocations and @@ -2820,7 +2821,7 @@ allocate_plt2_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, because the latter are not necessarily addressable by the GP. ??? Relaxation might be able to determine that they are. */ -static bfd_boolean +static bool allocate_pltoff_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { @@ -2831,24 +2832,24 @@ allocate_pltoff_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, dyn_i->pltoff_offset = x->ofs; x->ofs += 16; } - return TRUE; + return true; } /* Allocate dynamic relocations for those symbols that turned out to be dynamic. */ -static bfd_boolean +static bool allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, void * data) { struct elfNN_ia64_allocate_data *x = (struct elfNN_ia64_allocate_data *)data; struct elfNN_ia64_link_hash_table *ia64_info; struct elfNN_ia64_dyn_reloc_entry *rent; - bfd_boolean dynamic_symbol, shared, resolved_zero; + bool dynamic_symbol, shared, resolved_zero; ia64_info = elfNN_ia64_hash_table (x->info); if (ia64_info == NULL) - return FALSE; + return false; /* Note that this can't be used in relation to FPTR relocs below. */ dynamic_symbol = elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info, 0); @@ -2881,7 +2882,7 @@ allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); if (x->only_got) - return TRUE; + return true; if (ia64_info->rel_fptr_sec && dyn_i->want_fptr) { @@ -2952,10 +2953,10 @@ allocate_dynrel_entries (struct elfNN_ia64_dyn_sym_info *dyn_i, rent->srel->size += sizeof (ElfNN_External_Rela) * count; } - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, struct elf_link_hash_entry *h) { @@ -2971,7 +2972,7 @@ elfNN_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* If this is a reference to a symbol defined by a dynamic object which @@ -2981,10 +2982,10 @@ elfNN_ia64_adjust_dynamic_symbol (struct bfd_link_info *info ATTRIBUTE_UNUSED, But IA-64 code is canonically PIC, so as a rule we can avoid this sort of hackery. */ - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2995,7 +2996,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; dynobj = ia64_info->root.dynobj; ia64_info->self_dtpmod_offset = (bfd_vma) -1; BFD_ASSERT(dynobj != NULL); @@ -3081,7 +3082,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, if (bfd_link_pic (info) && ia64_info->self_dtpmod_offset != (bfd_vma) -1) ia64_info->root.srelgot->size += sizeof (ElfNN_External_Rela); - data.only_got = FALSE; + data.only_got = false; elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_dynrel_entries, &data); } @@ -3089,7 +3090,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, Allocate memory for them. */ for (sec = dynobj->sections; sec != NULL; sec = sec->next) { - bfd_boolean strip; + bool strip; if (!(sec->flags & SEC_LINKER_CREATED)) continue; @@ -3105,7 +3106,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, strip = (sec->size == 0); if (sec == ia64_info->root.sgot) - strip = FALSE; + strip = false; else if (sec == ia64_info->root.srelgot) { if (strip) @@ -3145,7 +3146,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, ia64_info->rel_pltoff_sec = NULL; else { - ia64_info->root.dt_jmprel_required = TRUE; + ia64_info->root.dt_jmprel_required = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ sec->reloc_count = 0; @@ -3160,7 +3161,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, name = bfd_section_name (sec); if (strcmp (name, ".got.plt") == 0) - strip = FALSE; + strip = false; else if (startswith (name, ".rel")) { if (!strip) @@ -3181,7 +3182,7 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, /* Allocate memory for the section contents. */ sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->size); if (sec->contents == NULL && sec->size != 0) - return FALSE; + return false; } } @@ -3194,16 +3195,16 @@ elfNN_ia64_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, #define add_dynamic_entry(TAG, VAL) \ _bfd_elf_add_dynamic_entry (info, TAG, VAL) - if (!_bfd_elf_add_dynamic_tags (output_bfd, info, TRUE)) - return FALSE; + if (!_bfd_elf_add_dynamic_tags (output_bfd, info, true)) + return false; if (!add_dynamic_entry (DT_IA_64_PLT_RESERVE, 0)) - return FALSE; + return false; } /* ??? Perhaps force __gp local. */ - return TRUE; + return true; } static void @@ -3247,7 +3248,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, { struct elfNN_ia64_link_hash_table *ia64_info; asection *got_sec; - bfd_boolean done; + bool done; bfd_vma got_offset; ia64_info = elfNN_ia64_hash_table (info); @@ -3260,19 +3261,19 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, { case R_IA64_TPREL64LSB: done = dyn_i->tprel_done; - dyn_i->tprel_done = TRUE; + dyn_i->tprel_done = true; got_offset = dyn_i->tprel_offset; break; case R_IA64_DTPMOD64LSB: if (dyn_i->dtpmod_offset != ia64_info->self_dtpmod_offset) { done = dyn_i->dtpmod_done; - dyn_i->dtpmod_done = TRUE; + dyn_i->dtpmod_done = true; } else { done = ia64_info->self_dtpmod_done; - ia64_info->self_dtpmod_done = TRUE; + ia64_info->self_dtpmod_done = true; dynindx = 0; } got_offset = dyn_i->dtpmod_offset; @@ -3280,12 +3281,12 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, case R_IA64_DTPREL32LSB: case R_IA64_DTPREL64LSB: done = dyn_i->dtprel_done; - dyn_i->dtprel_done = TRUE; + dyn_i->dtprel_done = true; got_offset = dyn_i->dtprel_offset; break; default: done = dyn_i->got_done; - dyn_i->got_done = TRUE; + dyn_i->got_done = true; got_offset = dyn_i->got_offset; break; } @@ -3359,7 +3360,7 @@ set_got_entry (bfd *abfd, struct bfd_link_info *info, dyn_r_type = R_IA64_DTPREL64MSB; break; default: - BFD_ASSERT (FALSE); + BFD_ASSERT (false); break; } } @@ -3438,7 +3439,7 @@ set_fptr_entry (bfd *abfd, struct bfd_link_info *info, static bfd_vma set_pltoff_entry (bfd *abfd, struct bfd_link_info *info, struct elfNN_ia64_dyn_sym_info *dyn_i, - bfd_vma value, bfd_boolean is_plt) + bfd_vma value, bool is_plt) { struct elfNN_ia64_link_hash_table *ia64_info; asection *pltoff_sec; @@ -3536,8 +3537,8 @@ elfNN_ia64_unwind_entry_compare (const void * a, const void * b) } /* Make sure we've got ourselves a nice fat __gp value. */ -static bfd_boolean -elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) +static bool +elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bool final) { bfd_vma min_vma = (bfd_vma) -1, max_vma = 0; bfd_vma min_short_vma = min_vma, max_short_vma = 0; @@ -3548,7 +3549,7 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; /* Find the min and max vma of all sections marked short. Also collect min and max vma of any type, for use in selecting a nice gp. */ @@ -3597,8 +3598,8 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) } /* See if the user wants to force a value. */ - gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE, - FALSE, FALSE); + gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false, + false, false); if (gp && (gp->root.type == bfd_link_hash_defined @@ -3668,7 +3669,7 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) /* xgettext:c-format */ (_("%pB: short data segment overflowed (%#" PRIx64 " >= 0x400000)"), abfd, (uint64_t) (max_short_vma - min_short_vma)); - return FALSE; + return false; } else if ((gp_val > min_short_vma && gp_val - min_short_vma > 0x200000) @@ -3677,16 +3678,16 @@ elfNN_ia64_choose_gp (bfd *abfd, struct bfd_link_info *info, bfd_boolean final) { _bfd_error_handler (_("%pB: __gp does not cover short data segment"), abfd); - return FALSE; + return false; } } _bfd_set_gp_value (abfd, gp_val); - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info) { struct elfNN_ia64_link_hash_table *ia64_info; @@ -3694,7 +3695,7 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info) ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; /* Make sure we've got ourselves a nice fat __gp value. */ if (!bfd_link_relocatable (info)) @@ -3705,12 +3706,12 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info) /* We assume after gp is set, section size will only decrease. We need to adjust gp for it. */ _bfd_set_gp_value (abfd, 0); - if (! elfNN_ia64_choose_gp (abfd, info, TRUE)) - return FALSE; + if (! elfNN_ia64_choose_gp (abfd, info, true)) + return false; gp_val = _bfd_get_gp_value (abfd); - gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", FALSE, - FALSE, FALSE); + gp = elf_link_hash_lookup (elf_hash_table (info), "__gp", false, + false, false); if (gp) { gp->root.type = bfd_link_hash_defined; @@ -3732,13 +3733,13 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info) unwind_output_sec->contents = bfd_malloc (unwind_output_sec->size); if (unwind_output_sec->contents == NULL) - return FALSE; + return false; } } /* Invoke the regular ELF backend linker to do all the work. */ if (!bfd_elf_final_link (abfd, info)) - return FALSE; + return false; if (unwind_output_sec) { @@ -3751,10 +3752,10 @@ elfNN_ia64_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_set_section_contents (abfd, unwind_output_sec, unwind_output_sec->contents, (bfd_vma) 0, unwind_output_sec->size)) - return FALSE; + return false; } - return TRUE; + return true; } static int @@ -3772,13 +3773,13 @@ elfNN_ia64_relocate_section (bfd *output_bfd, Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; asection *srel; - bfd_boolean ret_val = TRUE; /* for non-fatal errors */ + bool ret_val = true; /* for non-fatal errors */ bfd_vma gp_val; symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr; ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; /* Infect various flags from the input section to the output section. */ if (bfd_link_relocatable (info)) @@ -3793,7 +3794,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, } gp_val = _bfd_get_gp_value (output_bfd); - srel = get_reloc_section (input_bfd, ia64_info, input_section, FALSE); + srel = get_reloc_section (input_bfd, ia64_info, input_section, false); rel = relocs; relend = relocs + input_section->reloc_count; @@ -3809,8 +3810,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd, bfd_vma value; asection *sym_sec; bfd_byte *hit_addr; - bfd_boolean dynamic_symbol_p; - bfd_boolean undef_weak_ref; + bool dynamic_symbol_p; + bool undef_weak_ref; r_type = ELFNN_R_TYPE (rel->r_info); if (r_type > R_IA64_MAX_RELOC_CODE) @@ -3819,14 +3820,14 @@ elfNN_ia64_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), input_bfd, (int) r_type); bfd_set_error (bfd_error_bad_value); - ret_val = FALSE; + ret_val = false; continue; } howto = ia64_elf_lookup_howto (r_type); if (howto == NULL) { - ret_val = FALSE; + ret_val = false; continue; } @@ -3834,7 +3835,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sym_sec = NULL; - undef_weak_ref = FALSE; + undef_weak_ref = false; if (r_symndx < symtab_hdr->sh_info) { @@ -3851,7 +3852,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, { struct elfNN_ia64_local_hash_entry *loc_h; - loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, FALSE); + loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, false); if (loc_h && ! loc_h->sec_merge_done) { struct elfNN_ia64_dyn_sym_info *dynent; @@ -3890,8 +3891,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd, } else { - bfd_boolean unresolved_reloc; - bfd_boolean warned, ignored; + bool unresolved_reloc; + bool warned, ignored; struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, @@ -3900,7 +3901,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, unresolved_reloc, warned, ignored); if (h->root.type == bfd_link_hash_undefweak) - undef_weak_ref = TRUE; + undef_weak_ref = true; else if (warned || (ignored && bfd_link_executable (info))) continue; } @@ -3954,7 +3955,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, h ? h->root.root.string : bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sym_sec)); - ret_val = FALSE; + ret_val = false; continue; default: @@ -4022,7 +4023,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, h ? h->root.root.string : bfd_elf_sym_name (input_bfd, symtab_hdr, sym, sym_sec)); - ret_val = FALSE; + ret_val = false; continue; } value -= gp_val; @@ -4032,7 +4033,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, case R_IA64_LTOFF22: case R_IA64_LTOFF22X: case R_IA64_LTOFF64I: - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); value = set_got_entry (input_bfd, info, dyn_i, (h ? h->dynindx : -1), rel->r_addend, value, R_IA64_DIRNNLSB); value -= gp_val; @@ -4043,8 +4044,8 @@ elfNN_ia64_relocate_section (bfd *output_bfd, case R_IA64_PLTOFF64I: case R_IA64_PLTOFF64MSB: case R_IA64_PLTOFF64LSB: - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); - value = set_pltoff_entry (output_bfd, info, dyn_i, value, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); + value = set_pltoff_entry (output_bfd, info, dyn_i, value, false); value -= gp_val; r = ia64_elf_install_value (hit_addr, value, r_type); break; @@ -4054,7 +4055,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, case R_IA64_FPTR32LSB: case R_IA64_FPTR64MSB: case R_IA64_FPTR64LSB: - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); if (dyn_i->want_fptr) { if (!undef_weak_ref) @@ -4082,7 +4083,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, _bfd_error_handler (_("%pB: linking non-pic code in a position independent executable"), input_bfd); - ret_val = FALSE; + ret_val = false; continue; } dynindx = 0; @@ -4123,7 +4124,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, { long dynindx; - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); if (dyn_i->want_fptr) { BFD_ASSERT (h == NULL || h->dynindx == -1); @@ -4177,7 +4178,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, /* We should have created a PLT entry for any dynamic symbol. */ dyn_i = NULL; if (h) - dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, false); if (dyn_i && dyn_i->want_plt2) { @@ -4231,7 +4232,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, symtab_hdr, sym, sym_sec)); - ret_val = FALSE; + ret_val = false; continue; } goto finish_pcrel; @@ -4386,7 +4387,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, got_r_type = R_IA64_DTPRELNNLSB; break; } - dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, input_bfd, rel, false); value = set_got_entry (input_bfd, info, dyn_i, dynindx, r_addend, value, got_r_type); value -= gp_val; @@ -4410,7 +4411,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, don't try to continue. */ (*info->callbacks->undefined_symbol) (info, "__gp", input_bfd, input_section, rel->r_offset, 1); - return FALSE; + return false; case bfd_reloc_notsupported: { @@ -4424,7 +4425,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, (*info->callbacks->warning) (info, _("unsupported reloc"), name, input_bfd, input_section, rel->r_offset); - ret_val = FALSE; + ret_val = false; } break; @@ -4496,7 +4497,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, break; } - ret_val = FALSE; + ret_val = false; } break; } @@ -4505,7 +4506,7 @@ elfNN_ia64_relocate_section (bfd *output_bfd, return ret_val; } -static bfd_boolean +static bool elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -4516,9 +4517,9 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd, ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; - dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, FALSE); + dyn_i = get_dyn_sym_info (ia64_info, h, NULL, NULL, false); /* Fill in the PLT data, if required. */ if (dyn_i && dyn_i->want_plt) @@ -4543,7 +4544,7 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd, plt_addr = (plt_sec->output_section->vma + plt_sec->output_offset + dyn_i->plt_offset); - pltoff_addr = set_pltoff_entry (output_bfd, info, dyn_i, plt_addr, TRUE); + pltoff_addr = set_pltoff_entry (output_bfd, info, dyn_i, plt_addr, true); /* Initialize the FULL PLT entry, if needed. */ if (dyn_i->want_plt2) @@ -4593,10 +4594,10 @@ elfNN_ia64_finish_dynamic_symbol (bfd *output_bfd, || h == ia64_info->root.hplt) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_ia64_finish_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { @@ -4605,7 +4606,7 @@ elfNN_ia64_finish_dynamic_sections (bfd *abfd, ia64_info = elfNN_ia64_hash_table (info); if (ia64_info == NULL) - return FALSE; + return false; dynobj = ia64_info->root.dynobj; @@ -4673,47 +4674,47 @@ elfNN_ia64_finish_dynamic_sections (bfd *abfd, } } - return TRUE; + return true; } /* ELF file flag handling: */ /* Function to keep IA-64 specific file flags. */ -static bfd_boolean +static bool elfNN_ia64_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword out_flags; flagword in_flags; - bfd_boolean ok = TRUE; + bool ok = true; /* FIXME: What should be checked when linking shared libraries? */ if ((ibfd->flags & DYNAMIC) != 0) - return TRUE; + return true; if (!is_ia64_elf (ibfd) || !is_ia64_elf (obfd)) - return TRUE; + return true; in_flags = elf_elfheader (ibfd)->e_flags; out_flags = elf_elfheader (obfd)->e_flags; if (! elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = in_flags; if (bfd_get_arch (obfd) == bfd_get_arch (ibfd) @@ -4723,12 +4724,12 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) bfd_get_mach (ibfd)); } - return TRUE; + return true; } /* Check flag compatibility. */ if (in_flags == out_flags) - return TRUE; + return true; /* Output has EF_IA_64_REDUCEDFP set only if all inputs have it set. */ if (!(in_flags & EF_IA_64_REDUCEDFP) && (out_flags & EF_IA_64_REDUCEDFP)) @@ -4741,7 +4742,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_BE) != (out_flags & EF_IA_64_BE)) { @@ -4750,7 +4751,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_ABI64) != (out_flags & EF_IA_64_ABI64)) { @@ -4759,7 +4760,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_CONS_GP) != (out_flags & EF_IA_64_CONS_GP)) { @@ -4768,7 +4769,7 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } if ((in_flags & EF_IA_64_NOFUNCDESC_CONS_GP) != (out_flags & EF_IA_64_NOFUNCDESC_CONS_GP)) @@ -4778,13 +4779,13 @@ elfNN_ia64_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) ibfd); bfd_set_error (bfd_error_bad_value); - ok = FALSE; + ok = false; } return ok; } -static bfd_boolean +static bool elfNN_ia64_print_private_bfd_data (bfd *abfd, void * ptr) { FILE *file = (FILE *) ptr; @@ -4803,7 +4804,7 @@ elfNN_ia64_print_private_bfd_data (bfd *abfd, void * ptr) (flags & EF_IA_64_ABI64) ? "ABI64" : "ABI32"); _bfd_elf_print_private_bfd_data (abfd, ptr); - return TRUE; + return true; } static enum elf_reloc_type_class @@ -4835,7 +4836,7 @@ static const struct bfd_elf_special_section elfNN_ia64_special_sections[] = { NULL, 0, 0, 0, 0 } }; -static bfd_boolean +static bool elfNN_ia64_object_p (bfd *abfd) { asection *sec; @@ -4846,7 +4847,7 @@ elfNN_ia64_object_p (bfd *abfd) size_t amt; if (abfd->flags & DYNAMIC) - return TRUE; + return true; /* Flags for fake group section. */ flags = (SEC_LINKER_CREATED | SEC_GROUP | SEC_LINK_ONCE @@ -4866,7 +4867,7 @@ elfNN_ia64_object_p (bfd *abfd) amt = strlen (name) + sizeof (".gnu.linkonce.ia64unwi."); unwi_name = bfd_alloc (abfd, amt); if (!unwi_name) - return FALSE; + return false; strcpy (stpcpy (unwi_name, ".gnu.linkonce.ia64unwi."), name); unwi = bfd_get_section_by_name (abfd, unwi_name); @@ -4874,7 +4875,7 @@ elfNN_ia64_object_p (bfd *abfd) amt = strlen (name) + sizeof (".gnu.linkonce.ia64unw."); unw_name = bfd_alloc (abfd, amt); if (!unw_name) - return FALSE; + return false; strcpy (stpcpy (unw_name, ".gnu.linkonce.ia64unw."), name); unw = bfd_get_section_by_name (abfd, unw_name); @@ -4884,7 +4885,7 @@ elfNN_ia64_object_p (bfd *abfd) group = bfd_make_section_anyway_with_flags (abfd, name, flags); if (group == NULL) - return FALSE; + return false; /* Move the fake group section to the beginning. */ bfd_section_list_remove (abfd, group); @@ -4925,40 +4926,40 @@ elfNN_ia64_object_p (bfd *abfd) elf_section_data (group)->this_hdr.sh_type = SHT_GROUP; } } - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_ia64_hpux_vec (const bfd_target *vec) { extern const bfd_target ia64_elfNN_hpux_be_vec; return (vec == &ia64_elfNN_hpux_be_vec); } -static bfd_boolean +static bool elfNN_hpux_init_file_header (bfd *abfd, struct bfd_link_info *info) { Elf_Internal_Ehdr *i_ehdrp; if (!_bfd_elf_init_file_header (abfd, info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); i_ehdrp->e_ident[EI_OSABI] = get_elf_backend_data (abfd)->elf_osabi; i_ehdrp->e_ident[EI_ABIVERSION] = 1; - return TRUE; + return true; } -static bfd_boolean +static bool elfNN_hpux_backend_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) { if (bfd_is_com_section (sec)) { *retval = SHN_IA_64_ANSI_COMMON; - return TRUE; + return true; } - return FALSE; + return false; } static void diff --git a/bfd/elfnn-riscv.c b/bfd/elfnn-riscv.c index 391846aaa6..51f9d756cd 100644 --- a/bfd/elfnn-riscv.c +++ b/bfd/elfnn-riscv.c @@ -104,7 +104,7 @@ struct _bfd_riscv_elf_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == RISCV_ELF_DATA) -static bfd_boolean +static bool elfNN_riscv_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, @@ -133,7 +133,7 @@ struct riscv_elf_link_hash_table bfd_vma last_iplt_index; /* Re-run the relaxations from relax pass 0 if TRUE. */ - bfd_boolean restart_relax; + bool restart_relax; }; /* Instruction access functions. */ @@ -154,7 +154,7 @@ struct riscv_elf_link_hash_table && elf_hash_table_id (elf_hash_table (p)) == RISCV_ELF_DATA) \ ? (struct riscv_elf_link_hash_table *) (p)->hash : NULL) -static bfd_boolean +static bool riscv_info_to_howto_rela (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -176,7 +176,7 @@ riscv_elf_append_rela (bfd *abfd, asection *s, Elf_Internal_Rela *rel) /* Return true if a relocation is modifying an instruction. */ -static bfd_boolean +static bool riscv_is_insn_reloc (const reloc_howto_type *howto) { /* Heuristic: A multibyte destination with a nontrivial mask @@ -208,7 +208,7 @@ riscv_is_insn_reloc (const reloc_howto_type *howto) /* Generate a PLT header. */ -static bfd_boolean +static bool riscv_make_plt_header (bfd *output_bfd, bfd_vma gotplt_addr, bfd_vma addr, uint32_t *entry) { @@ -220,7 +220,7 @@ riscv_make_plt_header (bfd *output_bfd, bfd_vma gotplt_addr, bfd_vma addr, { _bfd_error_handler (_("%pB: warning: RVE PLT generation not supported"), output_bfd); - return FALSE; + return false; } /* auipc t2, %hi(.got.plt) @@ -241,12 +241,12 @@ riscv_make_plt_header (bfd *output_bfd, bfd_vma gotplt_addr, bfd_vma addr, entry[6] = RISCV_ITYPE (LREG, X_T0, X_T0, RISCV_ELF_WORD_BYTES); entry[7] = RISCV_ITYPE (JALR, 0, X_T3, 0); - return TRUE; + return true; } /* Generate a PLT entry. */ -static bfd_boolean +static bool riscv_make_plt_entry (bfd *output_bfd, bfd_vma got, bfd_vma addr, uint32_t *entry) { @@ -255,7 +255,7 @@ riscv_make_plt_entry (bfd *output_bfd, bfd_vma got, bfd_vma addr, { _bfd_error_handler (_("%pB: warning: RVE PLT generation not supported"), output_bfd); - return FALSE; + return false; } /* auipc t3, %hi(.got.plt entry) @@ -268,7 +268,7 @@ riscv_make_plt_entry (bfd *output_bfd, bfd_vma got, bfd_vma addr, entry[2] = RISCV_ITYPE (JALR, X_T1, X_T3, 0); entry[3] = RISCV_NOP; - return TRUE; + return true; } /* Create an entry in an RISC-V ELF linker hash table. */ @@ -329,7 +329,7 @@ riscv_elf_local_htab_eq (const void *ptr1, const void *ptr2) static struct elf_link_hash_entry * riscv_elf_get_local_sym_hash (struct riscv_elf_link_hash_table *htab, bfd *abfd, const Elf_Internal_Rela *rel, - bfd_boolean create) + bool create) { struct riscv_elf_link_hash_entry eh, *ret; asection *sec = abfd->sections; @@ -402,7 +402,7 @@ riscv_elf_link_hash_table_create (bfd *abfd) } ret->max_alignment = (bfd_vma) -1; - ret->restart_relax = FALSE; + ret->restart_relax = false; /* Create hash table for local ifunc. */ ret->loc_hash_table = htab_try_create (1024, @@ -422,7 +422,7 @@ riscv_elf_link_hash_table_create (bfd *abfd) /* Create the .got section. */ -static bfd_boolean +static bool riscv_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -433,7 +433,7 @@ riscv_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ if (htab->sgot != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; @@ -444,13 +444,13 @@ riscv_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->srelgot = s; s = s_got = bfd_make_section_anyway_with_flags (abfd, ".got", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgot = s; /* The first bit of the global offset table is the header. */ @@ -461,7 +461,7 @@ riscv_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgotplt = s; /* Reserve room for the header. */ @@ -478,17 +478,17 @@ riscv_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; } - return TRUE; + return true; } /* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -static bfd_boolean +static bool riscv_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { @@ -498,10 +498,10 @@ riscv_elf_create_dynamic_sections (bfd *dynobj, BFD_ASSERT (htab != NULL); if (!riscv_elf_create_got_section (dynobj, info)) - return FALSE; + return false; if (!_bfd_elf_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; if (!bfd_link_pic (info)) { @@ -529,7 +529,7 @@ riscv_elf_create_dynamic_sections (bfd *dynobj, || (!bfd_link_pic (info) && (!htab->elf.srelbss || !htab->sdyntdata))) abort (); - return TRUE; + return true; } /* Copy the extra info we tack onto an elf_link_hash_entry. */ @@ -553,7 +553,7 @@ riscv_elf_copy_indirect_symbol (struct bfd_link_info *info, _bfd_elf_link_hash_copy_indirect (info, dir, ind); } -static bfd_boolean +static bool riscv_elf_record_tls_type (bfd *abfd, struct elf_link_hash_entry *h, unsigned long symndx, char tls_type) { @@ -565,12 +565,12 @@ riscv_elf_record_tls_type (bfd *abfd, struct elf_link_hash_entry *h, (*_bfd_error_handler) (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h ? h->root.root.string : ""); - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool riscv_elf_record_got_reference (bfd *abfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, long symndx) { @@ -580,13 +580,13 @@ riscv_elf_record_got_reference (bfd *abfd, struct bfd_link_info *info, if (htab->elf.sgot == NULL) { if (!riscv_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } if (h != NULL) { h->got.refcount += 1; - return TRUE; + return true; } /* This is a global offset table entry for a local symbol. */ @@ -594,16 +594,16 @@ riscv_elf_record_got_reference (bfd *abfd, struct bfd_link_info *info, { bfd_size_type size = symtab_hdr->sh_info * (sizeof (bfd_vma) + 1); if (!(elf_local_got_refcounts (abfd) = bfd_zalloc (abfd, size))) - return FALSE; + return false; _bfd_riscv_elf_local_got_tls_type (abfd) = (char *) (elf_local_got_refcounts (abfd) + symtab_hdr->sh_info); } elf_local_got_refcounts (abfd) [symndx] += 1; - return TRUE; + return true; } -static bfd_boolean +static bool bad_static_reloc (bfd *abfd, unsigned r_type, struct elf_link_hash_entry *h) { reloc_howto_type * r = riscv_elf_rtype_to_howto (abfd, r_type); @@ -617,14 +617,14 @@ bad_static_reloc (bfd *abfd, unsigned r_type, struct elf_link_hash_entry *h) abfd, r ? r->name : _(""), h != NULL ? h->root.root.string : "a local symbol"); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Look through the relocs for a section during the first phase, and allocate space in the global offset table or procedure linkage table. */ -static bfd_boolean +static bool riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -635,7 +635,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sreloc = NULL; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = riscv_elf_hash_table (info); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -657,7 +657,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { (*_bfd_error_handler) (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx < symtab_hdr->sh_info) @@ -666,14 +666,14 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; /* Check relocation against local STT_GNU_IFUNC symbol. */ if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { - h = riscv_elf_get_local_sym_hash (htab, abfd, rel, TRUE); + h = riscv_elf_get_local_sym_hash (htab, abfd, rel, true); if (h == NULL) - return FALSE; + return false; /* Fake STT_GNU_IFUNC global symbol. */ h->root.root.string = bfd_elf_sym_name (abfd, symtab_hdr, @@ -710,7 +710,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, executables. */ if (h->type == STT_GNU_IFUNC && !_bfd_elf_create_ifunc_sections (htab->elf.dynobj, info)) - return FALSE; + return false; break; default: @@ -726,7 +726,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_RISCV_TLS_GD_HI20: if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx) || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_GD)) - return FALSE; + return false; break; case R_RISCV_TLS_GOT_HI20: @@ -734,13 +734,13 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, info->flags |= DF_STATIC_TLS; if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx) || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_TLS_IE)) - return FALSE; + return false; break; case R_RISCV_GOT_HI20: if (!riscv_elf_record_got_reference (abfd, info, h, r_symndx) || !riscv_elf_record_tls_type (abfd, h, r_symndx, GOT_NORMAL)) - return FALSE; + return false; break; case R_RISCV_CALL: @@ -876,10 +876,10 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { sreloc = _bfd_elf_make_dynamic_reloc_section (sec, htab->elf.dynobj, RISCV_ELF_LOG_WORD_BYTES, - abfd, /*rela?*/ TRUE); + abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -899,7 +899,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -916,7 +916,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -932,12 +932,12 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_RISCV_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; case R_RISCV_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; default: @@ -945,7 +945,7 @@ riscv_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } static asection * @@ -972,7 +972,7 @@ riscv_elf_gc_mark_hook (asection *sec, change the definition to something the rest of the link can understand. */ -static bfd_boolean +static bool riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1014,7 +1014,7 @@ riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -1028,7 +1028,7 @@ riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1039,18 +1039,18 @@ riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -1058,7 +1058,7 @@ riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -1103,7 +1103,7 @@ riscv_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -1111,7 +1111,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = riscv_elf_hash_table (info); @@ -1124,14 +1124,14 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && htab->elf.dynamic_sections_created && strcmp (h->root.root.string, RISCV_GP_SYMBOL) == 0 && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; /* Since STT_GNU_IFUNC symbols must go through PLT, we handle them in the allocate_ifunc_dynrelocs and allocate_local_ifunc_dynrelocs, if they are defined and referenced in a non-shared object. */ if (h->type == STT_GNU_IFUNC && h->def_regular) - return TRUE; + return true; else if (htab->elf.dynamic_sections_created && h->plt.refcount > 0) { @@ -1141,7 +1141,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -1189,7 +1189,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = riscv_elf_hash_entry (h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -1198,7 +1198,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->elf.sgot; @@ -1232,7 +1232,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -1272,7 +1272,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -1295,7 +1295,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -1316,20 +1316,20 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) sreloc->size += p->count * sizeof (ElfNN_External_Rela); } - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for ifunc dynamic relocs. */ -static bfd_boolean +static bool allocate_ifunc_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; if (h->root.type == bfd_link_hash_warning) h = (struct elf_link_hash_entry *) h->root.u.i.link; @@ -1345,8 +1345,8 @@ allocate_ifunc_dynrelocs (struct elf_link_hash_entry *h, PLT_ENTRY_SIZE, PLT_HEADER_SIZE, GOT_ENTRY_SIZE, - TRUE); - return TRUE; + true); + return true; } /* Allocate space in .plt, .got and associated reloc sections for @@ -1368,7 +1368,7 @@ allocate_local_ifunc_dynrelocs (void **slot, void *inf) return allocate_ifunc_dynrelocs (h, inf); } -static bfd_boolean +static bool riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct riscv_elf_link_hash_table *htab; @@ -1480,7 +1480,7 @@ riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) struct elf_link_hash_entry *got; got = elf_link_hash_lookup (elf_hash_table (info), "_GLOBAL_OFFSET_TABLE_", - FALSE, FALSE, FALSE); + false, false, false); /* Don't allocate .got.plt section if there are no GOT nor PLT entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */ @@ -1553,10 +1553,10 @@ riscv_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) at the beginning, and we don't want garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } - return _bfd_elf_add_dynamic_tags (output_bfd, info, TRUE); + return _bfd_elf_add_dynamic_tags (output_bfd, info, true); } #define TP_OFFSET 0 @@ -1591,7 +1591,7 @@ riscv_global_pointer_value (struct bfd_link_info *info) { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, RISCV_GP_SYMBOL, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, RISCV_GP_SYMBOL, false, false, true); if (h == NULL || h->type != bfd_link_hash_defined) return 0; @@ -1773,7 +1773,7 @@ riscv_pcrel_reloc_eq (const void *entry1, const void *entry2) return e1->address == e2->address; } -static bfd_boolean +static bool riscv_init_pcrel_relocs (riscv_pcrel_relocs *p) { p->lo_relocs = NULL; @@ -1797,7 +1797,7 @@ riscv_free_pcrel_relocs (riscv_pcrel_relocs *p) htab_delete (p->hi_relocs); } -static bfd_boolean +static bool riscv_zero_pcrel_hi_reloc (Elf_Internal_Rela *rel, struct bfd_link_info *info, bfd_vma pc, @@ -1814,31 +1814,31 @@ riscv_zero_pcrel_hi_reloc (Elf_Internal_Rela *rel, programs to work we simply convert the PC-relative auipc sequences to 0-relative lui sequences. */ if (bfd_link_pic (info)) - return FALSE; + return false; /* If it's possible to reference the symbol using auipc we do so, as that's more in the spirit of the PC-relative relocations we're processing. */ bfd_vma offset = addr - pc; if (ARCH_SIZE == 32 || VALID_UTYPE_IMM (RISCV_CONST_HIGH_PART (offset))) - return FALSE; + return false; /* If it's impossible to reference this with a LUI-based offset then don't bother to convert it at all so users still see the PC-relative relocation in the truncation message. */ if (ARCH_SIZE > 32 && !VALID_UTYPE_IMM (RISCV_CONST_HIGH_PART (addr))) - return FALSE; + return false; rel->r_info = ELFNN_R_INFO (addr, R_RISCV_HI20); bfd_vma insn = riscv_get_insn (howto->bitsize, contents + rel->r_offset); insn = (insn & ~MASK_AUIPC) | MATCH_LUI; riscv_put_insn (howto->bitsize, insn, contents + rel->r_offset); - return TRUE; + return true; } -static bfd_boolean +static bool riscv_record_pcrel_hi_reloc (riscv_pcrel_relocs *p, bfd_vma addr, - bfd_vma value, bfd_boolean absolute) + bfd_vma value, bool absolute) { bfd_vma offset = absolute ? value : value - addr; riscv_pcrel_hi_reloc entry = {addr, offset}; @@ -1848,12 +1848,12 @@ riscv_record_pcrel_hi_reloc (riscv_pcrel_relocs *p, bfd_vma addr, BFD_ASSERT (*slot == NULL); *slot = (riscv_pcrel_hi_reloc *) bfd_malloc (sizeof (riscv_pcrel_hi_reloc)); if (*slot == NULL) - return FALSE; + return false; **slot = entry; - return TRUE; + return true; } -static bfd_boolean +static bool riscv_record_pcrel_lo_reloc (riscv_pcrel_relocs *p, asection *input_section, struct bfd_link_info *info, @@ -1866,14 +1866,14 @@ riscv_record_pcrel_lo_reloc (riscv_pcrel_relocs *p, riscv_pcrel_lo_reloc *entry; entry = (riscv_pcrel_lo_reloc *) bfd_malloc (sizeof (riscv_pcrel_lo_reloc)); if (entry == NULL) - return FALSE; + return false; *entry = (riscv_pcrel_lo_reloc) {input_section, info, howto, reloc, addr, name, contents, p->lo_relocs}; p->lo_relocs = entry; - return TRUE; + return true; } -static bfd_boolean +static bool riscv_resolve_pcrel_lo_relocs (riscv_pcrel_relocs *p) { riscv_pcrel_lo_reloc *r; @@ -1894,14 +1894,14 @@ riscv_resolve_pcrel_lo_relocs (riscv_pcrel_relocs *p) : "%pcrel_lo overflow with an addend"); (*r->info->callbacks->reloc_dangerous) (r->info, string, input_bfd, r->input_section, r->reloc->r_offset); - return TRUE; + return true; } perform_relocation (r->howto, r->reloc, entry->value, r->input_section, input_bfd, r->contents); } - return TRUE; + return true; } /* Relocate a RISC-V ELF section. @@ -1945,15 +1945,15 @@ riscv_elf_relocate_section (bfd *output_bfd, Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; riscv_pcrel_relocs pcrel_relocs; - bfd_boolean ret = FALSE; + bool ret = false; struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (input_bfd); struct elf_link_hash_entry **sym_hashes = elf_sym_hashes (input_bfd); bfd_vma *local_got_offsets = elf_local_got_offsets (input_bfd); - bfd_boolean absolute; + bool absolute; if (!riscv_init_pcrel_relocs (&pcrel_relocs)) - return FALSE; + return false; relend = relocs + input_section->reloc_count; for (rel = relocs; rel < relend; rel++) @@ -1966,13 +1966,13 @@ riscv_elf_relocate_section (bfd *output_bfd, bfd_reloc_status_type r = bfd_reloc_ok; const char *name = NULL; bfd_vma off, ie_off; - bfd_boolean unresolved_reloc, is_ie = FALSE; + bool unresolved_reloc, is_ie = false; bfd_vma pc = sec_addr (input_section) + rel->r_offset; int r_type = ELFNN_R_TYPE (rel->r_info), tls_type; reloc_howto_type *howto = riscv_elf_rtype_to_howto (input_bfd, r_type); const char *msg = NULL; char *msg_buf = NULL; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; if (howto == NULL || r_type == R_RISCV_GNU_VTINHERIT || r_type == R_RISCV_GNU_VTENTRY) @@ -1983,7 +1983,7 @@ riscv_elf_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -1994,7 +1994,7 @@ riscv_elf_relocate_section (bfd *output_bfd, if (!bfd_link_relocatable (info) && ELF_ST_TYPE (sym->st_info) == STT_GNU_IFUNC) { - h = riscv_elf_get_local_sym_hash (htab, input_bfd, rel, FALSE); + h = riscv_elf_get_local_sym_hash (htab, input_bfd, rel, false); if (h == NULL) abort (); @@ -2005,7 +2005,7 @@ riscv_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2088,7 +2088,7 @@ riscv_elf_relocate_section (bfd *output_bfd, "symbol `%s' has non-zero addend: %" PRId64), input_bfd, howto->name, name, (int64_t) rel->r_addend); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Generate dynamic relocation only when there is a non-GOT @@ -2218,7 +2218,7 @@ riscv_elf_relocate_section (bfd *output_bfd, if (howto == NULL) r = bfd_reloc_notsupported; else if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, - relocation, FALSE)) + relocation, false)) r = bfd_reloc_overflow; goto do_relocation; @@ -2235,7 +2235,7 @@ riscv_elf_relocate_section (bfd *output_bfd, if (howto == NULL) r = bfd_reloc_notsupported; else if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, - relocation, FALSE)) + relocation, false)) r = bfd_reloc_overflow; goto do_relocation; @@ -2254,7 +2254,7 @@ riscv_elf_relocate_section (bfd *output_bfd, "symbol `%s' isn't supported"), input_bfd, howto->name, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -2301,7 +2301,7 @@ riscv_elf_relocate_section (bfd *output_bfd, case R_RISCV_GOT_HI20: if (h != NULL) { - bfd_boolean dyn, pic; + bool dyn, pic; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -2333,7 +2333,7 @@ riscv_elf_relocate_section (bfd *output_bfd, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -2436,7 +2436,7 @@ riscv_elf_relocate_section (bfd *output_bfd, { /* Refer to the PLT entry. */ relocation = sec_addr (htab->elf.splt) + h->plt.offset; - unresolved_reloc = FALSE; + unresolved_reloc = false; } break; @@ -2468,7 +2468,7 @@ riscv_elf_relocate_section (bfd *output_bfd, case R_RISCV_GPREL_S: { bfd_vma gp = riscv_global_pointer_value (info); - bfd_boolean x0_base = VALID_ITYPE_IMM (relocation + rel->r_addend); + bool x0_base = VALID_ITYPE_IMM (relocation + rel->r_addend); if (x0_base || VALID_ITYPE_IMM (relocation + rel->r_addend - gp)) { /* We can use x0 or gp as the base register. */ @@ -2555,7 +2555,7 @@ riscv_elf_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; asection *sreloc; - bfd_boolean skip_static_relocation, skip_dynamic_relocation; + bool skip_static_relocation, skip_dynamic_relocation; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -2592,7 +2592,7 @@ riscv_elf_relocate_section (bfd *output_bfd, break; case R_RISCV_TLS_GOT_HI20: - is_ie = TRUE; + is_ie = true; /* Fall through. */ case R_RISCV_TLS_GD_HI20: @@ -2621,14 +2621,14 @@ riscv_elf_relocate_section (bfd *output_bfd, { Elf_Internal_Rela outrel; int indx = 0; - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; if (htab->elf.srelgot == NULL) abort (); if (h != NULL) { - bfd_boolean dyn, pic; + bool dyn, pic; dyn = htab->elf.dynamic_sections_created; pic = bfd_link_pic (info); @@ -2643,7 +2643,7 @@ riscv_elf_relocate_section (bfd *output_bfd, && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) - need_relocs = TRUE; + need_relocs = true; if (tls_type & GOT_TLS_GD) { @@ -2714,9 +2714,9 @@ riscv_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (off < (bfd_vma) -2); relocation = sec_addr (htab->elf.sgot) + off + (is_ie ? ie_off : 0); if (!riscv_record_pcrel_hi_reloc (&pcrel_relocs, pc, - relocation, FALSE)) + relocation, false)) r = bfd_reloc_overflow; - unresolved_reloc = FALSE; + unresolved_reloc = false; break; default: @@ -2782,7 +2782,7 @@ riscv_elf_relocate_section (bfd *output_bfd, case bfd_reloc_undefined: info->callbacks->undefined_symbol (info, name, input_bfd, input_section, rel->r_offset, - TRUE); + true); break; case bfd_reloc_outofrange: @@ -2817,7 +2817,7 @@ riscv_elf_relocate_section (bfd *output_bfd, /* We already reported the error via a callback, so don't try to report it again by returning false. That leads to spurious errors. */ - ret = TRUE; + ret = true; goto out; } @@ -2830,7 +2830,7 @@ riscv_elf_relocate_section (bfd *output_bfd, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -static bfd_boolean +static bool riscv_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -2872,7 +2872,7 @@ riscv_elf_finish_dynamic_symbol (bfd *output_bfd, || plt == NULL || gotplt == NULL || relplt == NULL) - return FALSE; + return false; /* Calculate the address of the PLT header. */ header_address = sec_addr (plt); @@ -2900,7 +2900,7 @@ riscv_elf_finish_dynamic_symbol (bfd *output_bfd, if (! riscv_make_plt_entry (output_bfd, got_address, header_address + h->plt.offset, plt_entry)) - return FALSE; + return false; for (i = 0; i < PLT_ENTRY_INSNS; i++) bfd_putl32 (plt_entry[i], loc + 4*i); @@ -2960,7 +2960,7 @@ riscv_elf_finish_dynamic_symbol (bfd *output_bfd, asection *sgot; asection *srela; Elf_Internal_Rela rela; - bfd_boolean use_elf_append_rela = TRUE; + bool use_elf_append_rela = true; /* This symbol has an entry in the GOT. Set it up. */ @@ -2986,7 +2986,7 @@ riscv_elf_finish_dynamic_symbol (bfd *output_bfd, /* Do not use riscv_elf_append_rela to add dynamic relocs. */ - use_elf_append_rela = FALSE; + use_elf_append_rela = false; } if (SYMBOL_REFERENCES_LOCAL (info, h)) @@ -3033,7 +3033,7 @@ riscv_elf_finish_dynamic_symbol (bfd *output_bfd, + h->plt.offset), htab->elf.sgot->contents + (h->got.offset & ~(bfd_vma) 1)); - return TRUE; + return true; } } else if (bfd_link_pic (info) @@ -3104,7 +3104,7 @@ riscv_elf_finish_dynamic_symbol (bfd *output_bfd, || (h == htab->elf.hgot || h == htab->elf.hplt)) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up local dynamic symbol handling. We set the contents of @@ -3121,7 +3121,7 @@ riscv_elf_finish_local_dynamic_symbol (void **slot, void *inf) /* Finish up the dynamic sections. */ -static bfd_boolean +static bool riscv_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bfd *dynobj, asection *sdyn) { @@ -3158,10 +3158,10 @@ riscv_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bed->s->swap_dyn_out (output_bfd, &dyn, dyncon); } - return TRUE; + return true; } -static bfd_boolean +static bool riscv_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3178,7 +3178,7 @@ riscv_elf_finish_dynamic_sections (bfd *output_bfd, if (elf_hash_table (info)->dynamic_sections_created) { asection *splt; - bfd_boolean ret; + bool ret; splt = htab->elf.splt; BFD_ASSERT (splt != NULL && sdyn != NULL); @@ -3215,7 +3215,7 @@ riscv_elf_finish_dynamic_sections (bfd *output_bfd, { (*_bfd_error_handler) (_("discarded output section: `%pA'"), htab->elf.sgotplt); - return FALSE; + return false; } if (htab->elf.sgotplt->size > 0) @@ -3250,7 +3250,7 @@ riscv_elf_finish_dynamic_sections (bfd *output_bfd, riscv_elf_finish_local_dynamic_symbol, info); - return TRUE; + return true; } /* Return address for Ith PLT stub in section PLT, for relocation REL @@ -3313,7 +3313,7 @@ static riscv_subset_list_t merged_subsets; /* Predicator for standard extension. */ -static bfd_boolean +static bool riscv_std_ext_p (const char *name) { return (strlen (name) == 1) && (name[0] != 'x') && (name[0] != 's'); @@ -3321,13 +3321,13 @@ riscv_std_ext_p (const char *name) /* Check if the versions are compatible. */ -static bfd_boolean +static bool riscv_version_mismatch (bfd *ibfd, struct riscv_subset_t *in, struct riscv_subset_t *out) { if (in == NULL || out == NULL) - return TRUE; + return true; /* Since there are no version conflicts for now, we just report warning when the versions are mis-matched. */ @@ -3354,12 +3354,12 @@ riscv_version_mismatch (bfd *ibfd, } } - return TRUE; + return true; } /* Return true if subset is 'i' or 'e'. */ -static bfd_boolean +static bool riscv_i_or_e_p (bfd *ibfd, const char *arch, struct riscv_subset_t *subset) @@ -3371,9 +3371,9 @@ riscv_i_or_e_p (bfd *ibfd, (_("error: %pB: corrupted ISA string '%s'. " "First letter should be 'i' or 'e' but got '%s'"), ibfd, arch, subset->name); - return FALSE; + return false; } - return TRUE; + return true; } /* Merge standard extensions. @@ -3388,7 +3388,7 @@ riscv_i_or_e_p (bfd *ibfd, `pin`: Subset list for input object. `pout`: Subset list for output object. */ -static bfd_boolean +static bool riscv_merge_std_ext (bfd *ibfd, const char *in_arch, const char *out_arch, @@ -3402,10 +3402,10 @@ riscv_merge_std_ext (bfd *ibfd, /* First letter should be 'i' or 'e'. */ if (!riscv_i_or_e_p (ibfd, in_arch, in)) - return FALSE; + return false; if (!riscv_i_or_e_p (ibfd, out_arch, out)) - return FALSE; + return false; if (strcasecmp (in->name, out->name) != 0) { @@ -3413,10 +3413,10 @@ riscv_merge_std_ext (bfd *ibfd, _bfd_error_handler (_("error: %pB: mis-matched ISA string to merge '%s' and '%s'"), ibfd, in->name, out->name); - return FALSE; + return false; } else if (!riscv_version_mismatch (ibfd, in, out)) - return FALSE; + return false; else riscv_add_subset (&merged_subsets, out->name, out->major_version, out->minor_version); @@ -3429,7 +3429,7 @@ riscv_merge_std_ext (bfd *ibfd, { struct riscv_subset_t *ext_in, *ext_out, *ext_merged; char find_ext[2] = {*p, '\0'}; - bfd_boolean find_in, find_out; + bool find_in, find_out; find_in = riscv_lookup_subset (&in_subsets, find_ext, &ext_in); find_out = riscv_lookup_subset (&out_subsets, find_ext, &ext_out); @@ -3440,7 +3440,7 @@ riscv_merge_std_ext (bfd *ibfd, if (find_in && find_out && !riscv_version_mismatch (ibfd, ext_in, ext_out)) - return FALSE; + return false; ext_merged = find_out ? ext_out : ext_in; riscv_add_subset (&merged_subsets, ext_merged->name, @@ -3454,14 +3454,14 @@ riscv_merge_std_ext (bfd *ibfd, *pin = in; *pout = out; - return TRUE; + return true; } /* Merge multi letter extensions. PIN is a pointer to the head of the input object subset list. Likewise for POUT and the output object. Return TRUE on success and FALSE when a conflict is found. */ -static bfd_boolean +static bool riscv_merge_multi_letter_ext (bfd *ibfd, riscv_subset_t **pin, riscv_subset_t **pout) @@ -3494,7 +3494,7 @@ riscv_merge_multi_letter_ext (bfd *ibfd, { /* Both present, check version and increment both. */ if (!riscv_version_mismatch (ibfd, in, out)) - return FALSE; + return false; riscv_add_subset (&merged_subsets, out->name, out->major_version, out->minor_version); @@ -3516,7 +3516,7 @@ riscv_merge_multi_letter_ext (bfd *ibfd, } } - return TRUE; + return true; } /* Merge Tag_RISCV_arch attribute. */ @@ -3612,26 +3612,26 @@ riscv_merge_arch_attr_info (bfd *ibfd, char *in_arch, char *out_arch) /* Merge object attributes from IBFD into output_bfd of INFO. Raise an error if there are conflicting attributes. */ -static bfd_boolean +static bool riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; obj_attribute *in_attr; obj_attribute *out_attr; - bfd_boolean result = TRUE; - bfd_boolean priv_attrs_merged = FALSE; + bool result = true; + bool priv_attrs_merged = false; const char *sec_name = get_elf_backend_data (ibfd)->obj_attrs_section; unsigned int i; /* Skip linker created files. */ if (ibfd->flags & BFD_LINKER_CREATED) - return TRUE; + return true; /* Skip any input that doesn't have an attribute section. This enables to link object files without attribute section with any others. */ if (bfd_get_section_by_name (ibfd, sec_name) == NULL) - return TRUE; + return true; if (!elf_known_obj_attributes_proc (obfd)[0].i) { @@ -3644,7 +3644,7 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info) initialized. */ out_attr[0].i = 1; - return TRUE; + return true; } in_attr = elf_known_obj_attributes_proc (ibfd); @@ -3667,7 +3667,7 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info) out_attr[Tag_RISCV_arch].s); if (merged_arch == NULL) { - result = FALSE; + result = false; out_attr[Tag_RISCV_arch].s = ""; } else @@ -3737,7 +3737,7 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info) out_attr[Tag_c].i = in_attr[Tag_c].i; } } - priv_attrs_merged = TRUE; + priv_attrs_merged = true; } break; @@ -3756,7 +3756,7 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info) (_("error: %pB use %u-byte stack aligned but the output " "use %u-byte stack aligned"), ibfd, in_attr[i].i, out_attr[i].i); - result = FALSE; + result = false; } break; @@ -3771,7 +3771,7 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge Tag_compatibility attributes and any common GNU ones. */ if (!_bfd_elf_merge_object_attributes (ibfd, info)) - return FALSE; + return false; /* Check for any attributes not known on RISC-V. */ result &= _bfd_elf_merge_unknown_attribute_list (ibfd, obfd); @@ -3782,14 +3782,14 @@ riscv_merge_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge backend specific data from an object file to the output object file when linking. */ -static bfd_boolean +static bool _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; flagword new_flags, old_flags; if (!is_riscv_elf (ibfd) || !is_riscv_elf (obfd)) - return TRUE; + return true; if (strcmp (bfd_get_target (ibfd), bfd_get_target (obfd)) != 0) { @@ -3797,14 +3797,14 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("%pB: ABI is incompatible with that of the selected emulation:\n" " target emulation `%s' does not match `%s'"), ibfd, bfd_get_target (ibfd), bfd_get_target (obfd)); - return FALSE; + return false; } if (!_bfd_elf_merge_object_attributes (ibfd, info)) - return FALSE; + return false; if (!riscv_merge_attributes (ibfd, info)) - return FALSE; + return false; /* Check to see if the input BFD actually contains any sections. If not, its flags may not have been initialized either, but it cannot actually @@ -3815,25 +3815,25 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) case, there is no need to check for code specific flags. */ if (!(ibfd->flags & DYNAMIC)) { - bfd_boolean null_input_bfd = TRUE; - bfd_boolean only_data_sections = TRUE; + bool null_input_bfd = true; + bool only_data_sections = true; asection *sec; for (sec = ibfd->sections; sec != NULL; sec = sec->next) { - null_input_bfd = FALSE; + null_input_bfd = false; if ((bfd_section_flags (sec) & (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) == (SEC_LOAD | SEC_CODE | SEC_HAS_CONTENTS)) { - only_data_sections = FALSE; + only_data_sections = false; break; } } if (null_input_bfd || only_data_sections) - return TRUE; + return true; } new_flags = elf_elfheader (ibfd)->e_flags; @@ -3841,9 +3841,9 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = new_flags; - return TRUE; + return true; } /* Disallow linking different float ABIs. */ @@ -3867,16 +3867,16 @@ _bfd_riscv_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Allow linking RVC and non-RVC, and keep the RVC flag. */ elf_elfheader (obfd)->e_flags |= new_flags & EF_RISCV_RVC; - return TRUE; + return true; fail: bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Delete some bytes from a section while relaxing. */ -static bfd_boolean +static bool riscv_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, size_t count, struct bfd_link_info *link_info) { @@ -3980,7 +3980,7 @@ riscv_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, size_t count, } } - return TRUE; + return true; } /* A second format for recording PC-relative hi relocations. This stores the @@ -3994,7 +3994,7 @@ struct riscv_pcgp_hi_reloc bfd_vma hi_addr; unsigned hi_sym; asection *sym_sec; - bfd_boolean undefined_weak; + bool undefined_weak; riscv_pcgp_hi_reloc *next; }; @@ -4013,12 +4013,12 @@ typedef struct /* Initialize the pcgp reloc info in P. */ -static bfd_boolean +static bool riscv_init_pcgp_relocs (riscv_pcgp_relocs *p) { p->hi = NULL; p->lo = NULL; - return TRUE; + return true; } /* Free the pcgp reloc info in P. */ @@ -4050,15 +4050,15 @@ riscv_free_pcgp_relocs (riscv_pcgp_relocs *p, The HI_ADDEND, HI_ADDR, HI_SYM, and SYM_SEC args contain info required to relax the corresponding lo part reloc. */ -static bfd_boolean +static bool riscv_record_pcgp_hi_reloc (riscv_pcgp_relocs *p, bfd_vma hi_sec_off, bfd_vma hi_addend, bfd_vma hi_addr, unsigned hi_sym, asection *sym_sec, - bfd_boolean undefined_weak) + bool undefined_weak) { riscv_pcgp_hi_reloc *new = bfd_malloc (sizeof (*new)); if (!new) - return FALSE; + return false; new->hi_sec_off = hi_sec_off; new->hi_addend = hi_addend; new->hi_addr = hi_addr; @@ -4067,7 +4067,7 @@ riscv_record_pcgp_hi_reloc (riscv_pcgp_relocs *p, bfd_vma hi_sec_off, new->undefined_weak = undefined_weak; new->next = p->hi; p->hi = new; - return TRUE; + return true; } /* Look up hi part pcgp reloc info in P, using HI_SEC_OFF as the lookup index. @@ -4087,55 +4087,55 @@ riscv_find_pcgp_hi_reloc (riscv_pcgp_relocs *p, bfd_vma hi_sec_off) /* Record pcgp lo part reloc info in P, using HI_SEC_OFF as the lookup info. This is used to record relocs that can't be relaxed. */ -static bfd_boolean +static bool riscv_record_pcgp_lo_reloc (riscv_pcgp_relocs *p, bfd_vma hi_sec_off) { riscv_pcgp_lo_reloc *new = bfd_malloc (sizeof (*new)); if (!new) - return FALSE; + return false; new->hi_sec_off = hi_sec_off; new->next = p->lo; p->lo = new; - return TRUE; + return true; } /* Look up lo part pcgp reloc info in P, using HI_SEC_OFF as the lookup index. This is used by a hi part reloc to find the corresponding lo part reloc. */ -static bfd_boolean +static bool riscv_find_pcgp_lo_reloc (riscv_pcgp_relocs *p, bfd_vma hi_sec_off) { riscv_pcgp_lo_reloc *c; for (c = p->lo; c != NULL; c = c->next) if (c->hi_sec_off == hi_sec_off) - return TRUE; - return FALSE; + return true; + return false; } -typedef bfd_boolean (*relax_func_t) (bfd *, asection *, asection *, - struct bfd_link_info *, - Elf_Internal_Rela *, - bfd_vma, bfd_vma, bfd_vma, bfd_boolean *, - riscv_pcgp_relocs *, - bfd_boolean undefined_weak); +typedef bool (*relax_func_t) (bfd *, asection *, asection *, + struct bfd_link_info *, + Elf_Internal_Rela *, + bfd_vma, bfd_vma, bfd_vma, bool *, + riscv_pcgp_relocs *, + bool undefined_weak); /* Relax AUIPC + JALR into JAL. */ -static bfd_boolean +static bool _bfd_riscv_relax_call (bfd *abfd, asection *sec, asection *sym_sec, struct bfd_link_info *link_info, Elf_Internal_Rela *rel, bfd_vma symval, bfd_vma max_alignment, bfd_vma reserve_size ATTRIBUTE_UNUSED, - bfd_boolean *again, + bool *again, riscv_pcgp_relocs *pcgp_relocs ATTRIBUTE_UNUSED, - bfd_boolean undefined_weak ATTRIBUTE_UNUSED) + bool undefined_weak ATTRIBUTE_UNUSED) { bfd_byte *contents = elf_section_data (sec)->this_hdr.contents; bfd_vma foff = symval - (sec_addr (sec) + rel->r_offset); - bfd_boolean near_zero = (symval + RISCV_IMM_REACH / 2) < RISCV_IMM_REACH; + bool near_zero = (symval + RISCV_IMM_REACH / 2) < RISCV_IMM_REACH; bfd_vma auipc, jalr; int rd, r_type, len = 4, rvc = elf_elfheader (abfd)->e_flags & EF_RISCV_RVC; @@ -4153,7 +4153,7 @@ _bfd_riscv_relax_call (bfd *abfd, asection *sec, asection *sym_sec, /* See if this function call can be shortened. */ if (!VALID_JTYPE_IMM (foff) && !(!bfd_link_pic (link_info) && near_zero)) - return TRUE; + return true; /* Shorten the function call. */ BFD_ASSERT (rel->r_offset + 8 <= sec->size); @@ -4192,7 +4192,7 @@ _bfd_riscv_relax_call (bfd *abfd, asection *sec, asection *sym_sec, riscv_put_insn (8 * len, auipc, contents + rel->r_offset); /* Delete unnecessary JALR. */ - *again = TRUE; + *again = true; return riscv_relax_delete_bytes (abfd, sec, rel->r_offset + len, 8 - len, link_info); } @@ -4216,7 +4216,7 @@ _bfd_riscv_get_max_alignment (asection *sec) /* Relax non-PIC global variable references to GP-relative references. */ -static bfd_boolean +static bool _bfd_riscv_relax_lui (bfd *abfd, asection *sec, asection *sym_sec, @@ -4225,9 +4225,9 @@ _bfd_riscv_relax_lui (bfd *abfd, bfd_vma symval, bfd_vma max_alignment, bfd_vma reserve_size, - bfd_boolean *again, + bool *again, riscv_pcgp_relocs *pcgp_relocs ATTRIBUTE_UNUSED, - bfd_boolean undefined_weak) + bool undefined_weak) { bfd_byte *contents = elf_section_data (sec)->this_hdr.contents; bfd_vma gp = riscv_global_pointer_value (link_info); @@ -4240,8 +4240,8 @@ _bfd_riscv_relax_lui (bfd *abfd, /* If gp and the symbol are in the same output section, which is not the abs section, then consider only that output section's alignment. */ struct bfd_link_hash_entry *h = - bfd_link_hash_lookup (link_info->hash, RISCV_GP_SYMBOL, FALSE, FALSE, - TRUE); + bfd_link_hash_lookup (link_info->hash, RISCV_GP_SYMBOL, false, false, + true); if (h->u.def.section->output_section == sym_sec->output_section && sym_sec->output_section != bfd_abs_section_ptr) max_alignment = (bfd_vma) 1 << sym_sec->output_section->alignment_power; @@ -4269,7 +4269,7 @@ _bfd_riscv_relax_lui (bfd *abfd, } else rel->r_info = ELFNN_R_INFO (sym, R_RISCV_GPREL_I); - return TRUE; + return true; case R_RISCV_LO12_S: if (undefined_weak) @@ -4281,12 +4281,12 @@ _bfd_riscv_relax_lui (bfd *abfd, } else rel->r_info = ELFNN_R_INFO (sym, R_RISCV_GPREL_S); - return TRUE; + return true; case R_RISCV_HI20: /* We can delete the unnecessary LUI and reloc. */ rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE); - *again = TRUE; + *again = true; return riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4, link_info); @@ -4311,7 +4311,7 @@ _bfd_riscv_relax_lui (bfd *abfd, bfd_vma lui = bfd_getl32 (contents + rel->r_offset); unsigned rd = ((unsigned)lui >> OP_SH_RD) & OP_MASK_RD; if (rd == 0 || rd == X_SP) - return TRUE; + return true; lui = (lui & (OP_MASK_RD << OP_SH_RD)) | MATCH_C_LUI; bfd_putl32 (lui, contents + rel->r_offset); @@ -4319,17 +4319,17 @@ _bfd_riscv_relax_lui (bfd *abfd, /* Replace the R_RISCV_HI20 reloc. */ rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), R_RISCV_RVC_LUI); - *again = TRUE; + *again = true; return riscv_relax_delete_bytes (abfd, sec, rel->r_offset + 2, 2, link_info); } - return TRUE; + return true; } /* Relax non-PIC TLS references to TP-relative references. */ -static bfd_boolean +static bool _bfd_riscv_relax_tls_le (bfd *abfd, asection *sec, asection *sym_sec ATTRIBUTE_UNUSED, @@ -4338,30 +4338,30 @@ _bfd_riscv_relax_tls_le (bfd *abfd, bfd_vma symval, bfd_vma max_alignment ATTRIBUTE_UNUSED, bfd_vma reserve_size ATTRIBUTE_UNUSED, - bfd_boolean *again, + bool *again, riscv_pcgp_relocs *prcel_relocs ATTRIBUTE_UNUSED, - bfd_boolean undefined_weak ATTRIBUTE_UNUSED) + bool undefined_weak ATTRIBUTE_UNUSED) { /* See if this symbol is in range of tp. */ if (RISCV_CONST_HIGH_PART (tpoff (link_info, symval)) != 0) - return TRUE; + return true; BFD_ASSERT (rel->r_offset + 4 <= sec->size); switch (ELFNN_R_TYPE (rel->r_info)) { case R_RISCV_TPREL_LO12_I: rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), R_RISCV_TPREL_I); - return TRUE; + return true; case R_RISCV_TPREL_LO12_S: rel->r_info = ELFNN_R_INFO (ELFNN_R_SYM (rel->r_info), R_RISCV_TPREL_S); - return TRUE; + return true; case R_RISCV_TPREL_HI20: case R_RISCV_TPREL_ADD: /* We can delete the unnecessary instruction and reloc. */ rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE); - *again = TRUE; + *again = true; return riscv_relax_delete_bytes (abfd, sec, rel->r_offset, 4, link_info); default: @@ -4372,7 +4372,7 @@ _bfd_riscv_relax_tls_le (bfd *abfd, /* Implement R_RISCV_ALIGN by deleting excess alignment NOPs. Once we've handled an R_RISCV_ALIGN, we can't relax anything else. */ -static bfd_boolean +static bool _bfd_riscv_relax_align (bfd *abfd, asection *sec, asection *sym_sec, struct bfd_link_info *link_info, @@ -4380,9 +4380,9 @@ _bfd_riscv_relax_align (bfd *abfd, asection *sec, bfd_vma symval, bfd_vma max_alignment ATTRIBUTE_UNUSED, bfd_vma reserve_size ATTRIBUTE_UNUSED, - bfd_boolean *again ATTRIBUTE_UNUSED, + bool *again ATTRIBUTE_UNUSED, riscv_pcgp_relocs *pcrel_relocs ATTRIBUTE_UNUSED, - bfd_boolean undefined_weak ATTRIBUTE_UNUSED) + bool undefined_weak ATTRIBUTE_UNUSED) { bfd_byte *contents = elf_section_data (sec)->this_hdr.contents; bfd_vma alignment = 1, pos; @@ -4402,7 +4402,7 @@ _bfd_riscv_relax_align (bfd *abfd, asection *sec, abfd, sym_sec, (uint64_t) rel->r_offset, (int64_t) nop_bytes, (int64_t) alignment, (int64_t) rel->r_addend); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Delete the reloc. */ @@ -4410,7 +4410,7 @@ _bfd_riscv_relax_align (bfd *abfd, asection *sec, /* If the number of NOPs is already correct, there's nothing to do. */ if (nop_bytes == rel->r_addend) - return TRUE; + return true; /* Write as many RISC-V NOPs as we need. */ for (pos = 0; pos < (nop_bytes & -4); pos += 4) @@ -4427,7 +4427,7 @@ _bfd_riscv_relax_align (bfd *abfd, asection *sec, /* Relax PC-relative references to GP-relative references. */ -static bfd_boolean +static bool _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, asection *sym_sec, @@ -4436,9 +4436,9 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, bfd_vma symval, bfd_vma max_alignment, bfd_vma reserve_size, - bfd_boolean *again ATTRIBUTE_UNUSED, + bool *again ATTRIBUTE_UNUSED, riscv_pcgp_relocs *pcgp_relocs, - bfd_boolean undefined_weak) + bool undefined_weak) { bfd_byte *contents = elf_section_data (sec)->this_hdr.contents; bfd_vma gp = riscv_global_pointer_value (link_info); @@ -4464,7 +4464,7 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, if (hi == NULL) { riscv_record_pcgp_lo_reloc (pcgp_relocs, hi_sec_off); - return TRUE; + return true; } hi_reloc = *hi; @@ -4483,12 +4483,12 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, /* Mergeable symbols and code might later move out of range. */ if (! undefined_weak && sym_sec->flags & (SEC_MERGE | SEC_CODE)) - return TRUE; + return true; /* If the cooresponding lo relocation has already been seen then it's not safe to relax this relocation. */ if (riscv_find_pcgp_lo_reloc (pcgp_relocs, rel->r_offset)) - return TRUE; + return true; break; @@ -4501,8 +4501,8 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, /* If gp and the symbol are in the same output section, which is not the abs section, then consider only that output section's alignment. */ struct bfd_link_hash_entry *h = - bfd_link_hash_lookup (link_info->hash, RISCV_GP_SYMBOL, FALSE, FALSE, - TRUE); + bfd_link_hash_lookup (link_info->hash, RISCV_GP_SYMBOL, false, false, + true); if (h->u.def.section->output_section == sym_sec->output_section && sym_sec->output_section != bfd_abs_section_ptr) max_alignment = (bfd_vma) 1 << sym_sec->output_section->alignment_power; @@ -4536,7 +4536,7 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, rel->r_info = ELFNN_R_INFO (sym, R_RISCV_GPREL_I); rel->r_addend += hi_reloc.hi_addend; } - return TRUE; + return true; case R_RISCV_PCREL_LO12_S: if (undefined_weak) @@ -4554,7 +4554,7 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, rel->r_info = ELFNN_R_INFO (sym, R_RISCV_GPREL_S); rel->r_addend += hi_reloc.hi_addend; } - return TRUE; + return true; case R_RISCV_PCREL_HI20: riscv_record_pcgp_hi_reloc (pcgp_relocs, @@ -4567,19 +4567,19 @@ _bfd_riscv_relax_pc (bfd *abfd ATTRIBUTE_UNUSED, /* We can delete the unnecessary AUIPC and reloc. */ rel->r_info = ELFNN_R_INFO (0, R_RISCV_DELETE); rel->r_addend = 4; - return TRUE; + return true; default: abort (); } } - return TRUE; + return true; } /* Delete the bytes for R_RISCV_DELETE. */ -static bfd_boolean +static bool _bfd_riscv_relax_delete (bfd *abfd, asection *sec, asection *sym_sec ATTRIBUTE_UNUSED, @@ -4588,28 +4588,28 @@ _bfd_riscv_relax_delete (bfd *abfd, bfd_vma symval ATTRIBUTE_UNUSED, bfd_vma max_alignment ATTRIBUTE_UNUSED, bfd_vma reserve_size ATTRIBUTE_UNUSED, - bfd_boolean *again, + bool *again, riscv_pcgp_relocs *pcgp_relocs ATTRIBUTE_UNUSED, - bfd_boolean undefined_weak ATTRIBUTE_UNUSED) + bool undefined_weak ATTRIBUTE_UNUSED) { if (!riscv_relax_delete_bytes (abfd, sec, rel->r_offset, rel->r_addend, link_info)) - return FALSE; + return false; rel->r_info = ELFNN_R_INFO (0, R_RISCV_NONE); - *again = TRUE; - return TRUE; + *again = true; + return true; } /* Called by after_allocation to check if we need to run the whole relaxations again. */ -bfd_boolean +bool bfd_elfNN_riscv_restart_relax_sections (struct bfd_link_info *info) { struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); - bfd_boolean restart = htab->restart_relax; + bool restart = htab->restart_relax; /* Reset the flag. */ - htab->restart_relax = FALSE; + htab->restart_relax = false; return restart; } @@ -4630,21 +4630,21 @@ bfd_elfNN_riscv_restart_relax_sections (struct bfd_link_info *info) Since we can't relax anything else once we start to handle the alignments, we will only enter into the relax pass 3 when the restart_relax is FALSE. */ -static bfd_boolean +static bool _bfd_riscv_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *info, - bfd_boolean *again) + bool *again) { Elf_Internal_Shdr *symtab_hdr = &elf_symtab_hdr (abfd); struct riscv_elf_link_hash_table *htab = riscv_elf_hash_table (info); struct bfd_elf_section_data *data = elf_section_data (sec); Elf_Internal_Rela *relocs; - bfd_boolean ret = FALSE; + bool ret = false; unsigned int i; bfd_vma max_alignment, reserve_size = 0; riscv_pcgp_relocs pcgp_relocs; - *again = FALSE; + *again = false; if (bfd_link_relocatable (info) || (sec->flags & SEC_RELOC) == 0 @@ -4653,7 +4653,7 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec, && info->relax_pass < 2) || (htab->restart_relax && info->relax_pass == 3)) - return TRUE; + return true; riscv_init_pcgp_relocs (&pcgp_relocs); @@ -4685,7 +4685,7 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec, int type = ELFNN_R_TYPE (rel->r_info); bfd_vma symval; char symtype; - bfd_boolean undefined_weak = FALSE; + bool undefined_weak = false; relax_func = NULL; if (info->relax_pass == 0) @@ -4812,7 +4812,7 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec, libraries can not happen currently. Once we support the auipc relaxations when creating shared libraries, then we will need the more rigorous checking for this optimization. */ - undefined_weak = TRUE; + undefined_weak = true; } /* This line has to match the check in riscv_elf_relocate_section @@ -4884,7 +4884,7 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec, goto fail; } - ret = TRUE; + ret = true; fail: if (relocs != data->relocs) @@ -4892,7 +4892,7 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec, riscv_free_pcgp_relocs (&pcgp_relocs, abfd, sec); if (*again) - htab->restart_relax = TRUE; + htab->restart_relax = true; return ret; } @@ -4998,13 +4998,13 @@ riscv_write_core_note (bfd *abfd ATTRIBUTE_UNUSED, /* Support for core dump NOTE sections. */ -static bfd_boolean +static bool riscv_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case PRSTATUS_SIZE: /* sizeof(struct elf_prstatus) on Linux/RISC-V. */ /* pr_cursig */ @@ -5022,13 +5022,13 @@ riscv_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) note->descpos + PRSTATUS_OFFSET_PR_REG); } -static bfd_boolean +static bool riscv_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case PRPSINFO_SIZE: /* sizeof(struct elf_prpsinfo) on Linux/RISC-V. */ /* pr_pid */ @@ -5059,12 +5059,12 @@ riscv_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } /* Set the right mach type. */ -static bfd_boolean +static bool riscv_elf_object_p (bfd *abfd) { /* There are only two mach types in RISCV currently. */ @@ -5074,7 +5074,7 @@ riscv_elf_object_p (bfd *abfd) else bfd_default_set_arch_mach (abfd, bfd_arch_riscv, bfd_mach_riscv64); - return TRUE; + return true; } /* Determine whether an object attribute tag takes an integer, a diff --git a/bfd/elfxx-aarch64.c b/bfd/elfxx-aarch64.c index 246e6ea389..70385a0ebd 100644 --- a/bfd/elfxx-aarch64.c +++ b/bfd/elfxx-aarch64.c @@ -398,9 +398,9 @@ bfd_vma _bfd_aarch64_elf_resolve_relocation (bfd *input_bfd, bfd_reloc_code_real_type r_type, bfd_vma place, bfd_vma value, - bfd_vma addend, bfd_boolean weak_undef_p) + bfd_vma addend, bool weak_undef_p) { - bfd_boolean tls_reloc = TRUE; + bool tls_reloc = true; switch (r_type) { case BFD_RELOC_AARCH64_NONE: @@ -448,7 +448,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd *input_bfd, case BFD_RELOC_AARCH64_MOVW_G2_NC: case BFD_RELOC_AARCH64_MOVW_G2_S: case BFD_RELOC_AARCH64_MOVW_G3: - tls_reloc = FALSE; + tls_reloc = false; /* fall-through. */ case BFD_RELOC_AARCH64_TLSDESC_OFF_G0_NC: case BFD_RELOC_AARCH64_TLSDESC_OFF_G1: @@ -575,7 +575,7 @@ _bfd_aarch64_elf_resolve_relocation (bfd *input_bfd, /* Support for core dump NOTE sections. */ -bfd_boolean +bool _bfd_aarch64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) { int offset; @@ -584,7 +584,7 @@ _bfd_aarch64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) switch (note->descsz) { default: - return FALSE; + return false; case 392: /* sizeof(struct elf_prstatus) on Linux/arm64. */ /* pr_cursig */ @@ -607,13 +607,13 @@ _bfd_aarch64_elf_grok_prstatus (bfd *abfd, Elf_Internal_Note *note) size, note->descpos + offset); } -bfd_boolean +bool _bfd_aarch64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) { switch (note->descsz) { default: - return FALSE; + return false; case 136: /* This is sizeof(struct elf_prpsinfo) on Linux/aarch64. */ elf_tdata (abfd)->core->pid = bfd_get_32 (abfd, note->descdata + 24); @@ -635,7 +635,7 @@ _bfd_aarch64_elf_grok_psinfo (bfd *abfd, Elf_Internal_Note *note) command[n - 1] = '\0'; } - return TRUE; + return true; } char * @@ -830,7 +830,7 @@ _bfd_aarch64_elf_parse_gnu_properties (bfd *abfd, unsigned int type, If APROP isn't NULL, merge it with BPROP and/or PROP. Vice-versa if BROP isn't NULL. Return TRUE if there is any update to APROP or if BPROP should be merge with ABFD. */ -bfd_boolean +bool _bfd_aarch64_elf_merge_gnu_properties (struct bfd_link_info *info ATTRIBUTE_UNUSED, bfd *abfd ATTRIBUTE_UNUSED, @@ -839,7 +839,7 @@ _bfd_aarch64_elf_merge_gnu_properties (struct bfd_link_info *info uint32_t prop) { unsigned int orig_number; - bfd_boolean updated = FALSE; + bool updated = false; unsigned int pr_type = aprop != NULL ? aprop->pr_type : bprop->pr_type; switch (pr_type) @@ -869,14 +869,14 @@ _bfd_aarch64_elf_merge_gnu_properties (struct bfd_link_info *info else { bprop->u.number = prop; - updated = TRUE; + updated = true; } } /* No PROP and BPROP is NULL, so remove APROP. */ else if (aprop != NULL) { aprop->pr_kind = property_remove; - updated = TRUE; + updated = true; } } break; diff --git a/bfd/elfxx-aarch64.h b/bfd/elfxx-aarch64.h index f947c3475d..c3a3a55190 100644 --- a/bfd/elfxx-aarch64.h +++ b/bfd/elfxx-aarch64.h @@ -78,22 +78,22 @@ extern int elf64_aarch64_setup_section_lists (bfd *, struct bfd_link_info *); extern void elf64_aarch64_next_input_section (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf64_aarch64_size_stubs +extern bool elf64_aarch64_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf64_aarch64_build_stubs +extern bool elf64_aarch64_build_stubs (struct bfd_link_info *); /* AArch64 stub generation support for ELF32. Called from the linker. */ extern int elf32_aarch64_setup_section_lists (bfd *, struct bfd_link_info *); extern void elf32_aarch64_next_input_section (struct bfd_link_info *, struct bfd_section *); -extern bfd_boolean elf32_aarch64_size_stubs +extern bool elf32_aarch64_size_stubs (bfd *, bfd *, struct bfd_link_info *, bfd_signed_vma, struct bfd_section * (*) (const char *, struct bfd_section *), void (*) (void)); -extern bfd_boolean elf32_aarch64_build_stubs +extern bool elf32_aarch64_build_stubs (struct bfd_link_info *); /* Take the PAGE component of an address or offset. */ @@ -119,12 +119,12 @@ _bfd_aarch64_elf_put_addend (bfd *, bfd_byte *, bfd_reloc_code_real_type, extern bfd_vma _bfd_aarch64_elf_resolve_relocation (bfd *, bfd_reloc_code_real_type, bfd_vma, - bfd_vma, bfd_vma, bfd_boolean); + bfd_vma, bfd_vma, bool); -extern bfd_boolean +extern bool _bfd_aarch64_elf_grok_prstatus (bfd *, Elf_Internal_Note *); -extern bfd_boolean +extern bool _bfd_aarch64_elf_grok_psinfo (bfd *, Elf_Internal_Note *); extern char * @@ -142,7 +142,7 @@ extern enum elf_property_kind _bfd_aarch64_elf_parse_gnu_properties (bfd *, unsigned int, bfd_byte *, unsigned int); -extern bfd_boolean +extern bool _bfd_aarch64_elf_merge_gnu_properties (struct bfd_link_info *, bfd *, elf_property *, elf_property *, uint32_t); diff --git a/bfd/elfxx-ia64.c b/bfd/elfxx-ia64.c index 6e9c2800c7..0ac92b41b8 100644 --- a/bfd/elfxx-ia64.c +++ b/bfd/elfxx-ia64.c @@ -84,108 +84,108 @@ ia64_elf_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc, #define IA64_HOWTO(TYPE, NAME, SIZE, PCREL, IN) \ HOWTO (TYPE, 0, SIZE, 0, PCREL, 0, complain_overflow_signed, \ - ia64_elf_reloc, NAME, FALSE, 0, -1, IN) + ia64_elf_reloc, NAME, false, 0, -1, IN) /* This table has to be sorted according to increasing number of the TYPE field. */ static reloc_howto_type ia64_howto_table[] = { - IA64_HOWTO (R_IA64_NONE, "NONE", 3, FALSE, TRUE), - - IA64_HOWTO (R_IA64_IMM14, "IMM14", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_IMM22, "IMM22", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_IMM64, "IMM64", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_DIR32MSB, "DIR32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_DIR32LSB, "DIR32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_DIR64MSB, "DIR64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_DIR64LSB, "DIR64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_GPREL22, "GPREL22", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_GPREL64I, "GPREL64I", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_GPREL32MSB, "GPREL32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_GPREL32LSB, "GPREL32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_GPREL64MSB, "GPREL64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_GPREL64LSB, "GPREL64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_LTOFF22, "LTOFF22", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTOFF64I, "LTOFF64I", 0, FALSE, TRUE), - - IA64_HOWTO (R_IA64_PLTOFF22, "PLTOFF22", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_PLTOFF64I, "PLTOFF64I", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_PLTOFF64MSB, "PLTOFF64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_PLTOFF64LSB, "PLTOFF64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_FPTR64I, "FPTR64I", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_FPTR32MSB, "FPTR32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_FPTR32LSB, "FPTR32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_FPTR64MSB, "FPTR64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_FPTR64LSB, "FPTR64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_PCREL60B, "PCREL60B", 0, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL21B, "PCREL21B", 0, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL21M, "PCREL21M", 0, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL21F, "PCREL21F", 0, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL32MSB, "PCREL32MSB", 2, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL32LSB, "PCREL32LSB", 2, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL64MSB, "PCREL64MSB", 4, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL64LSB, "PCREL64LSB", 4, TRUE, TRUE), - - IA64_HOWTO (R_IA64_LTOFF_FPTR22, "LTOFF_FPTR22", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTOFF_FPTR64I, "LTOFF_FPTR64I", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTOFF_FPTR32MSB, "LTOFF_FPTR32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTOFF_FPTR32LSB, "LTOFF_FPTR32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTOFF_FPTR64MSB, "LTOFF_FPTR64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTOFF_FPTR64LSB, "LTOFF_FPTR64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_SEGREL32MSB, "SEGREL32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_SEGREL32LSB, "SEGREL32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_SEGREL64MSB, "SEGREL64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_SEGREL64LSB, "SEGREL64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_SECREL32MSB, "SECREL32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_SECREL32LSB, "SECREL32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_SECREL64MSB, "SECREL64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_SECREL64LSB, "SECREL64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_REL32MSB, "REL32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_REL32LSB, "REL32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_REL64MSB, "REL64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_REL64LSB, "REL64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_LTV32MSB, "LTV32MSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTV32LSB, "LTV32LSB", 2, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTV64MSB, "LTV64MSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTV64LSB, "LTV64LSB", 4, FALSE, TRUE), - - IA64_HOWTO (R_IA64_PCREL21BI, "PCREL21BI", 0, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL22, "PCREL22", 0, TRUE, TRUE), - IA64_HOWTO (R_IA64_PCREL64I, "PCREL64I", 0, TRUE, TRUE), - - IA64_HOWTO (R_IA64_IPLTMSB, "IPLTMSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_IPLTLSB, "IPLTLSB", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_COPY, "COPY", 4, FALSE, TRUE), - IA64_HOWTO (R_IA64_LTOFF22X, "LTOFF22X", 0, FALSE, TRUE), - IA64_HOWTO (R_IA64_LDXMOV, "LDXMOV", 0, FALSE, TRUE), - - IA64_HOWTO (R_IA64_TPREL14, "TPREL14", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_TPREL22, "TPREL22", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_TPREL64I, "TPREL64I", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_TPREL64MSB, "TPREL64MSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_LTOFF_TPREL22, "LTOFF_TPREL22", 0, FALSE, FALSE), - - IA64_HOWTO (R_IA64_DTPMOD64MSB, "DTPMOD64MSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPMOD64LSB, "DTPMOD64LSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_LTOFF_DTPMOD22, "LTOFF_DTPMOD22", 0, FALSE, FALSE), - - IA64_HOWTO (R_IA64_DTPREL14, "DTPREL14", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL22, "DTPREL22", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL64I, "DTPREL64I", 0, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL32MSB, "DTPREL32MSB", 2, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL32LSB, "DTPREL32LSB", 2, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL64MSB, "DTPREL64MSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_DTPREL64LSB, "DTPREL64LSB", 4, FALSE, FALSE), - IA64_HOWTO (R_IA64_LTOFF_DTPREL22, "LTOFF_DTPREL22", 0, FALSE, FALSE), + IA64_HOWTO (R_IA64_NONE, "NONE", 3, false, true), + + IA64_HOWTO (R_IA64_IMM14, "IMM14", 0, false, true), + IA64_HOWTO (R_IA64_IMM22, "IMM22", 0, false, true), + IA64_HOWTO (R_IA64_IMM64, "IMM64", 0, false, true), + IA64_HOWTO (R_IA64_DIR32MSB, "DIR32MSB", 2, false, true), + IA64_HOWTO (R_IA64_DIR32LSB, "DIR32LSB", 2, false, true), + IA64_HOWTO (R_IA64_DIR64MSB, "DIR64MSB", 4, false, true), + IA64_HOWTO (R_IA64_DIR64LSB, "DIR64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_GPREL22, "GPREL22", 0, false, true), + IA64_HOWTO (R_IA64_GPREL64I, "GPREL64I", 0, false, true), + IA64_HOWTO (R_IA64_GPREL32MSB, "GPREL32MSB", 2, false, true), + IA64_HOWTO (R_IA64_GPREL32LSB, "GPREL32LSB", 2, false, true), + IA64_HOWTO (R_IA64_GPREL64MSB, "GPREL64MSB", 4, false, true), + IA64_HOWTO (R_IA64_GPREL64LSB, "GPREL64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_LTOFF22, "LTOFF22", 0, false, true), + IA64_HOWTO (R_IA64_LTOFF64I, "LTOFF64I", 0, false, true), + + IA64_HOWTO (R_IA64_PLTOFF22, "PLTOFF22", 0, false, true), + IA64_HOWTO (R_IA64_PLTOFF64I, "PLTOFF64I", 0, false, true), + IA64_HOWTO (R_IA64_PLTOFF64MSB, "PLTOFF64MSB", 4, false, true), + IA64_HOWTO (R_IA64_PLTOFF64LSB, "PLTOFF64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_FPTR64I, "FPTR64I", 0, false, true), + IA64_HOWTO (R_IA64_FPTR32MSB, "FPTR32MSB", 2, false, true), + IA64_HOWTO (R_IA64_FPTR32LSB, "FPTR32LSB", 2, false, true), + IA64_HOWTO (R_IA64_FPTR64MSB, "FPTR64MSB", 4, false, true), + IA64_HOWTO (R_IA64_FPTR64LSB, "FPTR64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_PCREL60B, "PCREL60B", 0, true, true), + IA64_HOWTO (R_IA64_PCREL21B, "PCREL21B", 0, true, true), + IA64_HOWTO (R_IA64_PCREL21M, "PCREL21M", 0, true, true), + IA64_HOWTO (R_IA64_PCREL21F, "PCREL21F", 0, true, true), + IA64_HOWTO (R_IA64_PCREL32MSB, "PCREL32MSB", 2, true, true), + IA64_HOWTO (R_IA64_PCREL32LSB, "PCREL32LSB", 2, true, true), + IA64_HOWTO (R_IA64_PCREL64MSB, "PCREL64MSB", 4, true, true), + IA64_HOWTO (R_IA64_PCREL64LSB, "PCREL64LSB", 4, true, true), + + IA64_HOWTO (R_IA64_LTOFF_FPTR22, "LTOFF_FPTR22", 0, false, true), + IA64_HOWTO (R_IA64_LTOFF_FPTR64I, "LTOFF_FPTR64I", 0, false, true), + IA64_HOWTO (R_IA64_LTOFF_FPTR32MSB, "LTOFF_FPTR32MSB", 2, false, true), + IA64_HOWTO (R_IA64_LTOFF_FPTR32LSB, "LTOFF_FPTR32LSB", 2, false, true), + IA64_HOWTO (R_IA64_LTOFF_FPTR64MSB, "LTOFF_FPTR64MSB", 4, false, true), + IA64_HOWTO (R_IA64_LTOFF_FPTR64LSB, "LTOFF_FPTR64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_SEGREL32MSB, "SEGREL32MSB", 2, false, true), + IA64_HOWTO (R_IA64_SEGREL32LSB, "SEGREL32LSB", 2, false, true), + IA64_HOWTO (R_IA64_SEGREL64MSB, "SEGREL64MSB", 4, false, true), + IA64_HOWTO (R_IA64_SEGREL64LSB, "SEGREL64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_SECREL32MSB, "SECREL32MSB", 2, false, true), + IA64_HOWTO (R_IA64_SECREL32LSB, "SECREL32LSB", 2, false, true), + IA64_HOWTO (R_IA64_SECREL64MSB, "SECREL64MSB", 4, false, true), + IA64_HOWTO (R_IA64_SECREL64LSB, "SECREL64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_REL32MSB, "REL32MSB", 2, false, true), + IA64_HOWTO (R_IA64_REL32LSB, "REL32LSB", 2, false, true), + IA64_HOWTO (R_IA64_REL64MSB, "REL64MSB", 4, false, true), + IA64_HOWTO (R_IA64_REL64LSB, "REL64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_LTV32MSB, "LTV32MSB", 2, false, true), + IA64_HOWTO (R_IA64_LTV32LSB, "LTV32LSB", 2, false, true), + IA64_HOWTO (R_IA64_LTV64MSB, "LTV64MSB", 4, false, true), + IA64_HOWTO (R_IA64_LTV64LSB, "LTV64LSB", 4, false, true), + + IA64_HOWTO (R_IA64_PCREL21BI, "PCREL21BI", 0, true, true), + IA64_HOWTO (R_IA64_PCREL22, "PCREL22", 0, true, true), + IA64_HOWTO (R_IA64_PCREL64I, "PCREL64I", 0, true, true), + + IA64_HOWTO (R_IA64_IPLTMSB, "IPLTMSB", 4, false, true), + IA64_HOWTO (R_IA64_IPLTLSB, "IPLTLSB", 4, false, true), + IA64_HOWTO (R_IA64_COPY, "COPY", 4, false, true), + IA64_HOWTO (R_IA64_LTOFF22X, "LTOFF22X", 0, false, true), + IA64_HOWTO (R_IA64_LDXMOV, "LDXMOV", 0, false, true), + + IA64_HOWTO (R_IA64_TPREL14, "TPREL14", 0, false, false), + IA64_HOWTO (R_IA64_TPREL22, "TPREL22", 0, false, false), + IA64_HOWTO (R_IA64_TPREL64I, "TPREL64I", 0, false, false), + IA64_HOWTO (R_IA64_TPREL64MSB, "TPREL64MSB", 4, false, false), + IA64_HOWTO (R_IA64_TPREL64LSB, "TPREL64LSB", 4, false, false), + IA64_HOWTO (R_IA64_LTOFF_TPREL22, "LTOFF_TPREL22", 0, false, false), + + IA64_HOWTO (R_IA64_DTPMOD64MSB, "DTPMOD64MSB", 4, false, false), + IA64_HOWTO (R_IA64_DTPMOD64LSB, "DTPMOD64LSB", 4, false, false), + IA64_HOWTO (R_IA64_LTOFF_DTPMOD22, "LTOFF_DTPMOD22", 0, false, false), + + IA64_HOWTO (R_IA64_DTPREL14, "DTPREL14", 0, false, false), + IA64_HOWTO (R_IA64_DTPREL22, "DTPREL22", 0, false, false), + IA64_HOWTO (R_IA64_DTPREL64I, "DTPREL64I", 0, false, false), + IA64_HOWTO (R_IA64_DTPREL32MSB, "DTPREL32MSB", 2, false, false), + IA64_HOWTO (R_IA64_DTPREL32LSB, "DTPREL32LSB", 2, false, false), + IA64_HOWTO (R_IA64_DTPREL64MSB, "DTPREL64MSB", 4, false, false), + IA64_HOWTO (R_IA64_DTPREL64LSB, "DTPREL64LSB", 4, false, false), + IA64_HOWTO (R_IA64_LTOFF_DTPREL22, "LTOFF_DTPREL22", 0, false, false), }; static unsigned char elf_code_to_howto_index[R_IA64_MAX_RELOC_CODE + 1]; @@ -195,12 +195,12 @@ static unsigned char elf_code_to_howto_index[R_IA64_MAX_RELOC_CODE + 1]; reloc_howto_type * ia64_elf_lookup_howto (unsigned int rtype) { - static bfd_boolean inited = FALSE; + static bool inited = false; int i; if (!inited) { - inited = TRUE; + inited = true; memset (elf_code_to_howto_index, 0xff, sizeof (elf_code_to_howto_index)); for (i = 0; i < NELEMS (ia64_howto_table); ++i) @@ -380,7 +380,7 @@ ia64_elf_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, #define IS_BR_CALL(i) \ (((i) & OPCODE_BITS) == (0x5LL << OPCODE_SHIFT)) -bfd_boolean +bool ia64_elf_relax_br (bfd_byte *contents, bfd_vma off) { unsigned int template_val, mlx; @@ -407,7 +407,7 @@ ia64_elf_relax_br (bfd_byte *contents, bfd_vma off) /* Check if slot 1 and slot 2 are NOPs. Possible template is BBB. We only need to check nop.b. */ if (!(IS_NOP_B (s1) && IS_NOP_B (s2))) - return FALSE; + return false; br_code = s0; break; case 1: @@ -418,7 +418,7 @@ ia64_elf_relax_br (bfd_byte *contents, bfd_vma off) || (template_val == 0x16 /* BBB */ && IS_NOP_B (s0) && IS_NOP_B (s2)))) - return FALSE; + return false; br_code = s1; break; case 2: @@ -435,7 +435,7 @@ ia64_elf_relax_br (bfd_byte *contents, bfd_vma off) && IS_NOP_M (s1)) || (template_val == 0x1c /* MFB */ && IS_NOP_F (s1)))) - return FALSE; + return false; br_code = s2; break; default: @@ -445,7 +445,7 @@ ia64_elf_relax_br (bfd_byte *contents, bfd_vma off) /* We can turn br.cond/br.call into brl.cond/brl.call. */ if (!(IS_BR_COND (br_code) || IS_BR_CALL (br_code))) - return FALSE; + return false; /* Turn br into brl by setting bit 40. */ br_code |= 0x1LL << 40; @@ -480,7 +480,7 @@ ia64_elf_relax_br (bfd_byte *contents, bfd_vma off) bfd_putl64 (t0, hit_addr); bfd_putl64 (t1, hit_addr + 8); - return TRUE; + return true; } void diff --git a/bfd/elfxx-ia64.h b/bfd/elfxx-ia64.h index 7a66303e6d..d4092e461a 100644 --- a/bfd/elfxx-ia64.h +++ b/bfd/elfxx-ia64.h @@ -25,7 +25,7 @@ reloc_howto_type *ia64_elf_reloc_name_lookup (bfd *, const char *); reloc_howto_type *ia64_elf_lookup_howto (unsigned int rtype); -bfd_boolean ia64_elf_relax_br (bfd_byte *contents, bfd_vma off); +bool ia64_elf_relax_br (bfd_byte *contents, bfd_vma off); void ia64_elf_relax_brl (bfd_byte *contents, bfd_vma off); void ia64_elf_relax_ldxmov (bfd_byte *contents, bfd_vma off); diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index bd4140cc3e..426f432d9d 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -442,34 +442,34 @@ struct mips_elf_link_hash_table /* This flag indicates that the value of DT_MIPS_RLD_MAP dynamic entry is set to the address of __rld_obj_head as in IRIX5 and IRIX6. */ - bfd_boolean use_rld_obj_head; + bool use_rld_obj_head; /* The __rld_map or __rld_obj_head symbol. */ struct elf_link_hash_entry *rld_symbol; /* This is set if we see any mips16 stub sections. */ - bfd_boolean mips16_stubs_seen; + bool mips16_stubs_seen; /* True if we can generate copy relocs and PLTs. */ - bfd_boolean use_plts_and_copy_relocs; + bool use_plts_and_copy_relocs; /* True if we can only use 32-bit microMIPS instructions. */ - bfd_boolean insn32; + bool insn32; /* True if we suppress checks for invalid branches between ISA modes. */ - bfd_boolean ignore_branch_isa; + bool ignore_branch_isa; /* True if we are targetting R6 compact branches. */ - bfd_boolean compact_branches; + bool compact_branches; /* True if we already reported the small-data section overflow. */ - bfd_boolean small_data_overflow_reported; + bool small_data_overflow_reported; /* True if we use the special `__gnu_absolute_zero' symbol. */ - bfd_boolean use_absolute_zero; + bool use_absolute_zero; /* True if we have been configured for a GNU target. */ - bfd_boolean gnu_target; + bool gnu_target; /* Shortcuts to some dynamic sections, or NULL if they are not being used. */ @@ -546,7 +546,7 @@ struct mips_htab_traverse_info bfd *output_bfd; /* Starts off FALSE and is set to TRUE if the link should be aborted. */ - bfd_boolean error; + bool error; }; /* MIPS ELF private object data. */ @@ -564,7 +564,7 @@ struct mips_elf_obj_tdata /* The abiflags for this object. */ Elf_Internal_ABIFlags_v0 abiflags; - bfd_boolean abiflags_valid; + bool abiflags_valid; /* The GOT requirements of input bfds. */ struct mips_got_info *got; @@ -628,7 +628,7 @@ struct extsym_info struct bfd_link_info *info; struct ecoff_debug_info *debug; const struct ecoff_debug_swap *swap; - bfd_boolean failed; + bool failed; }; /* The names of the runtime procedure table symbols used on IRIX5. */ @@ -755,11 +755,11 @@ typedef struct runtime_pdr { static struct mips_got_entry *mips_elf_create_local_got_entry (bfd *, struct bfd_link_info *, bfd *, bfd_vma, unsigned long, struct mips_elf_link_hash_entry *, int); -static bfd_boolean mips_elf_sort_hash_table_f +static bool mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *, void *); static bfd_vma mips_elf_high (bfd_vma); -static bfd_boolean mips_elf_create_dynamic_relocation +static bool mips_elf_create_dynamic_relocation (bfd *, struct bfd_link_info *, const Elf_Internal_Rela *, struct mips_elf_link_hash_entry *, asection *, bfd_vma, bfd_vma *, asection *); @@ -1282,7 +1282,7 @@ bfd_get_micromips_32 (const bfd *abfd, const bfd_byte *ptr) #define mips_elf_link_hash_traverse(table, func, info) \ (elf_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func), \ + (bool (*) (struct elf_link_hash_entry *, void *)) (func), \ (info))) /* Find the base offsets for thread-local storage in this object, @@ -1343,14 +1343,14 @@ mips_elf_link_hash_newfunc (struct bfd_hash_entry *entry, ret->call_fp_stub = NULL; ret->mipsxhash_loc = 0; ret->global_got_area = GGA_NONE; - ret->got_only_for_calls = TRUE; - ret->readonly_reloc = FALSE; - ret->has_static_relocs = FALSE; - ret->no_fn_stub = FALSE; - ret->need_fn_stub = FALSE; - ret->has_nonpic_branches = FALSE; - ret->needs_lazy_stub = FALSE; - ret->use_plt_entry = FALSE; + ret->got_only_for_calls = true; + ret->readonly_reloc = false; + ret->has_static_relocs = false; + ret->no_fn_stub = false; + ret->need_fn_stub = false; + ret->has_nonpic_branches = false; + ret->needs_lazy_stub = false; + ret->use_plt_entry = false; } return (struct bfd_hash_entry *) ret; @@ -1358,14 +1358,14 @@ mips_elf_link_hash_newfunc (struct bfd_hash_entry *entry, /* Allocate MIPS ELF private object data. */ -bfd_boolean +bool _bfd_mips_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct mips_elf_obj_tdata), MIPS_ELF_DATA); } -bfd_boolean +bool _bfd_mips_elf_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -1375,7 +1375,7 @@ _bfd_mips_elf_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } @@ -1385,7 +1385,7 @@ _bfd_mips_elf_new_section_hook (bfd *abfd, asection *sec) /* Read ECOFF debugging information from a .mdebug section into a ecoff_debug_info structure. */ -bfd_boolean +bool _bfd_mips_elf_read_ecoff_info (bfd *abfd, asection *section, struct ecoff_debug_info *debug) { @@ -1444,7 +1444,7 @@ _bfd_mips_elf_read_ecoff_info (bfd *abfd, asection *section, debug->fdr = NULL; - return TRUE; + return true; error_return: free (ext_hdr); @@ -1459,7 +1459,7 @@ _bfd_mips_elf_read_ecoff_info (bfd *abfd, asection *section, free (debug->external_fdr); free (debug->external_rfd); free (debug->external_ext); - return FALSE; + return false; } /* Swap RPDR (runtime procedure table entry) for output. */ @@ -1482,7 +1482,7 @@ ecoff_swap_rpdr_out (bfd *abfd, const RPDR *in, struct rpdr_ext *ex) /* Create a runtime procedure table from the .mdebug section. */ -static bfd_boolean +static bool mips_elf_create_procedure_table (void *handle, bfd *abfd, struct bfd_link_info *info, asection *s, struct ecoff_debug_info *debug) @@ -1608,7 +1608,7 @@ mips_elf_create_procedure_table (void *handle, bfd *abfd, free (esym); free (ss); free (sv); - return TRUE; + return true; error_return: free (epdr); @@ -1616,23 +1616,23 @@ mips_elf_create_procedure_table (void *handle, bfd *abfd, free (esym); free (ss); free (sv); - return FALSE; + return false; } /* We're going to create a stub for H. Create a symbol for the stub's value and size, to help make the disassembly easier to read. */ -static bfd_boolean +static bool mips_elf_create_stub_symbol (struct bfd_link_info *info, struct mips_elf_link_hash_entry *h, const char *prefix, asection *s, bfd_vma value, bfd_vma size) { - bfd_boolean micromips_p = ELF_ST_IS_MICROMIPS (h->root.other); + bool micromips_p = ELF_ST_IS_MICROMIPS (h->root.other); struct bfd_link_hash_entry *bh; struct elf_link_hash_entry *elfh; char *name; - bfd_boolean res; + bool res; if (micromips_p) value |= 1; @@ -1642,10 +1642,10 @@ mips_elf_create_stub_symbol (struct bfd_link_info *info, bh = NULL; res = _bfd_generic_link_add_one_symbol (info, s->owner, name, BSF_LOCAL, s, value, NULL, - TRUE, FALSE, &bh); + true, false, &bh); free (name); if (! res) - return FALSE; + return false; /* Make it a local function. */ elfh = (struct elf_link_hash_entry *) bh; @@ -1654,14 +1654,14 @@ mips_elf_create_stub_symbol (struct bfd_link_info *info, elfh->forced_local = 1; if (micromips_p) elfh->other = ELF_ST_SET_MICROMIPS (elfh->other); - return TRUE; + return true; } /* We're about to redefine H. Create a symbol to represent H's current value and size, to help make the disassembly easier to read. */ -static bfd_boolean +static bool mips_elf_create_shadow_symbol (struct bfd_link_info *info, struct mips_elf_link_hash_entry *h, const char *prefix) @@ -1671,7 +1671,7 @@ mips_elf_create_shadow_symbol (struct bfd_link_info *info, char *name; asection *s; bfd_vma value; - bfd_boolean res; + bool res; /* Read the symbol's value. */ BFD_ASSERT (h->root.root.type == bfd_link_hash_defined @@ -1684,10 +1684,10 @@ mips_elf_create_shadow_symbol (struct bfd_link_info *info, bh = NULL; res = _bfd_generic_link_add_one_symbol (info, s->owner, name, BSF_LOCAL, s, value, NULL, - TRUE, FALSE, &bh); + true, false, &bh); free (name); if (! res) - return FALSE; + return false; /* Make it local and copy the other attributes from H. */ elfh = (struct elf_link_hash_entry *) bh; @@ -1695,13 +1695,13 @@ mips_elf_create_shadow_symbol (struct bfd_link_info *info, elfh->other = h->root.other; elfh->size = h->root.size; elfh->forced_local = 1; - return TRUE; + return true; } /* Return TRUE if relocations in SECTION can refer directly to a MIPS16 function rather than to a hard-float stub. */ -static bfd_boolean +static bool section_allows_mips16_refs_p (asection *section) { const char *name; @@ -1753,7 +1753,7 @@ mips_elf_check_mips16_stubs (struct bfd_link_info *info, && h->root.dynindx != -1) { mips_elf_create_shadow_symbol (info, h, ".mips16."); - h->need_fn_stub = TRUE; + h->need_fn_stub = true; } if (h->fn_stub != NULL @@ -1825,7 +1825,7 @@ mips_elf_la25_stub_eq (const void *entry1_, const void *entry2_) the linker's implementation of add_stub_function. Return true on success. */ -bfd_boolean +bool _bfd_mips_elf_init_stubs (struct bfd_link_info *info, asection *(*fn) (const char *, asection *, asection *)) @@ -1834,15 +1834,15 @@ _bfd_mips_elf_init_stubs (struct bfd_link_info *info, htab = mips_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; htab->add_stub_section = fn; htab->la25_stubs = htab_try_create (1, mips_elf_la25_stub_hash, mips_elf_la25_stub_eq, NULL); if (htab->la25_stubs == NULL) - return FALSE; + return false; - return TRUE; + return true; } /* Return true if H is a locally-defined PIC function, in the sense @@ -1851,7 +1851,7 @@ _bfd_mips_elf_init_stubs (struct bfd_link_info *info, so they themselves never need $25 to be valid. Only non-MIPS16 entry points are of interest here. */ -static bfd_boolean +static bool mips_elf_local_pic_function_p (struct mips_elf_link_hash_entry *h) { return ((h->root.root.type == bfd_link_hash_defined @@ -1889,7 +1889,7 @@ mips_elf_get_la25_target (struct mips_elf_la25_stub *stub, by inserting an LUI/ADDIU pair before the target function. Create the section and redirect the function symbol to it. */ -static bfd_boolean +static bool mips_elf_add_la25_intro (struct mips_elf_la25_stub *stub, struct bfd_link_info *info) { @@ -1900,12 +1900,12 @@ mips_elf_add_la25_intro (struct mips_elf_la25_stub *stub, htab = mips_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Create a unique name for the new section. */ name = bfd_malloc (11 + sizeof (".text.stub.")); if (name == NULL) - return FALSE; + return false; sprintf (name, ".text.stub.%d", (int) htab_elements (htab->la25_stubs)); /* Create the section. */ @@ -1913,12 +1913,12 @@ mips_elf_add_la25_intro (struct mips_elf_la25_stub *stub, s = htab->add_stub_section (name, input_section, input_section->output_section); if (s == NULL) - return FALSE; + return false; /* Make sure that any padding goes before the stub. */ align = input_section->alignment_power; if (!bfd_set_section_alignment (s, align)) - return FALSE; + return false; if (align > 3) s->size = (1 << align) - 8; @@ -1929,14 +1929,14 @@ mips_elf_add_la25_intro (struct mips_elf_la25_stub *stub, /* Allocate room for it. */ s->size += 8; - return TRUE; + return true; } /* STUB describes an la25 stub that we have decided to implement with a separate trampoline. Allocate room for it and redirect the function symbol to it. */ -static bfd_boolean +static bool mips_elf_add_la25_trampoline (struct mips_elf_la25_stub *stub, struct bfd_link_info *info) { @@ -1945,7 +1945,7 @@ mips_elf_add_la25_trampoline (struct mips_elf_la25_stub *stub, htab = mips_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; /* Create a trampoline section, if we haven't already. */ s = htab->strampoline; @@ -1955,7 +1955,7 @@ mips_elf_add_la25_trampoline (struct mips_elf_la25_stub *stub, s = htab->add_stub_section (".text", NULL, input_section->output_section); if (s == NULL || !bfd_set_section_alignment (s, 4)) - return FALSE; + return false; htab->strampoline = s; } @@ -1966,19 +1966,19 @@ mips_elf_add_la25_trampoline (struct mips_elf_la25_stub *stub, /* Allocate room for it. */ s->size += 16; - return TRUE; + return true; } /* H describes a symbol that needs an la25 stub. Make sure that an appropriate stub exists and point H at it. */ -static bfd_boolean +static bool mips_elf_add_la25_stub (struct bfd_link_info *info, struct mips_elf_link_hash_entry *h) { struct mips_elf_link_hash_table *htab; struct mips_elf_la25_stub search, *stub; - bfd_boolean use_trampoline_p; + bool use_trampoline_p; asection *s; bfd_vma value; void **slot; @@ -1991,24 +1991,24 @@ mips_elf_add_la25_stub (struct bfd_link_info *info, /* See if we've already created an equivalent stub. */ htab = mips_elf_hash_table (info); if (htab == NULL) - return FALSE; + return false; slot = htab_find_slot (htab->la25_stubs, &search, INSERT); if (slot == NULL) - return FALSE; + return false; stub = (struct mips_elf_la25_stub *) *slot; if (stub != NULL) { /* We can reuse the existing stub. */ h->la25_stub = stub; - return TRUE; + return true; } /* Create a permanent copy of ENTRY and add it to the hash table. */ stub = bfd_malloc (sizeof (search)); if (stub == NULL) - return FALSE; + return false; *stub = search; *slot = stub; @@ -2028,7 +2028,7 @@ mips_elf_add_la25_stub (struct bfd_link_info *info, /* A mips_elf_link_hash_traverse callback that is called before sizing sections. DATA points to a mips_htab_traverse_info structure. */ -static bfd_boolean +static bool mips_elf_check_symbols (struct mips_elf_link_hash_entry *h, void *data) { struct mips_htab_traverse_info *hti; @@ -2042,7 +2042,7 @@ mips_elf_check_symbols (struct mips_elf_link_hash_entry *h, void *data) /* PR 12845: If H is in a section that has been garbage collected it will have its output section set to *ABS*. */ if (bfd_is_abs_section (h->root.root.u.def.section->output_section)) - return TRUE; + return true; /* H is a function that might need $25 to be valid on entry. If we're creating a non-PIC relocatable object, mark H as @@ -2056,11 +2056,11 @@ mips_elf_check_symbols (struct mips_elf_link_hash_entry *h, void *data) } else if (h->has_nonpic_branches && !mips_elf_add_la25_stub (hti->info, h)) { - hti->error = TRUE; - return FALSE; + hti->error = true; + return false; } } - return TRUE; + return true; } /* R_MIPS16_26 is used for the mips16 jal and jalx instructions. @@ -2152,7 +2152,7 @@ mips_elf_check_symbols (struct mips_elf_link_hash_entry *h, void *data) relocatable field is shifted by 1 rather than 2 and the same bit shuffling is done as with the relocations above. */ -static inline bfd_boolean +static inline bool mips16_reloc_p (int r_type) { switch (r_type) @@ -2171,16 +2171,16 @@ mips16_reloc_p (int r_type) case R_MIPS16_TLS_TPREL_HI16: case R_MIPS16_TLS_TPREL_LO16: case R_MIPS16_PC16_S1: - return TRUE; + return true; default: - return FALSE; + return false; } } /* Check if a microMIPS reloc. */ -static inline bfd_boolean +static inline bool micromips_reloc_p (unsigned int r_type) { return r_type >= R_MICROMIPS_min && r_type < R_MICROMIPS_max; @@ -2190,7 +2190,7 @@ micromips_reloc_p (unsigned int r_type) on a little-endian system. This does not apply to R_MICROMIPS_PC7_S1 and R_MICROMIPS_PC10_S1 relocs that apply to 16-bit instructions. */ -static inline bfd_boolean +static inline bool micromips_reloc_shuffle_p (unsigned int r_type) { return (micromips_reloc_p (r_type) @@ -2198,7 +2198,7 @@ micromips_reloc_shuffle_p (unsigned int r_type) && r_type != R_MICROMIPS_PC10_S1); } -static inline bfd_boolean +static inline bool got16_reloc_p (int r_type) { return (r_type == R_MIPS_GOT16 @@ -2206,7 +2206,7 @@ got16_reloc_p (int r_type) || r_type == R_MICROMIPS_GOT16); } -static inline bfd_boolean +static inline bool call16_reloc_p (int r_type) { return (r_type == R_MIPS_CALL16 @@ -2214,37 +2214,37 @@ call16_reloc_p (int r_type) || r_type == R_MICROMIPS_CALL16); } -static inline bfd_boolean +static inline bool got_disp_reloc_p (unsigned int r_type) { return r_type == R_MIPS_GOT_DISP || r_type == R_MICROMIPS_GOT_DISP; } -static inline bfd_boolean +static inline bool got_page_reloc_p (unsigned int r_type) { return r_type == R_MIPS_GOT_PAGE || r_type == R_MICROMIPS_GOT_PAGE; } -static inline bfd_boolean +static inline bool got_lo16_reloc_p (unsigned int r_type) { return r_type == R_MIPS_GOT_LO16 || r_type == R_MICROMIPS_GOT_LO16; } -static inline bfd_boolean +static inline bool call_hi16_reloc_p (unsigned int r_type) { return r_type == R_MIPS_CALL_HI16 || r_type == R_MICROMIPS_CALL_HI16; } -static inline bfd_boolean +static inline bool call_lo16_reloc_p (unsigned int r_type) { return r_type == R_MIPS_CALL_LO16 || r_type == R_MICROMIPS_CALL_LO16; } -static inline bfd_boolean +static inline bool hi16_reloc_p (int r_type) { return (r_type == R_MIPS_HI16 @@ -2253,7 +2253,7 @@ hi16_reloc_p (int r_type) || r_type == R_MIPS_PCHI16); } -static inline bfd_boolean +static inline bool lo16_reloc_p (int r_type) { return (r_type == R_MIPS_LO16 @@ -2262,13 +2262,13 @@ lo16_reloc_p (int r_type) || r_type == R_MIPS_PCLO16); } -static inline bfd_boolean +static inline bool mips16_call_reloc_p (int r_type) { return r_type == R_MIPS16_26 || r_type == R_MIPS16_CALL16; } -static inline bfd_boolean +static inline bool jal_reloc_p (int r_type) { return (r_type == R_MIPS_26 @@ -2276,7 +2276,7 @@ jal_reloc_p (int r_type) || r_type == R_MICROMIPS_26_S1); } -static inline bfd_boolean +static inline bool b_reloc_p (int r_type) { return (r_type == R_MIPS_PC26_S2 @@ -2289,14 +2289,14 @@ b_reloc_p (int r_type) || r_type == R_MICROMIPS_PC7_S1); } -static inline bfd_boolean +static inline bool aligned_pcrel_reloc_p (int r_type) { return (r_type == R_MIPS_PC18_S3 || r_type == R_MIPS_PC19_S2); } -static inline bfd_boolean +static inline bool branch_reloc_p (int r_type) { return (r_type == R_MIPS_26 @@ -2306,14 +2306,14 @@ branch_reloc_p (int r_type) || r_type == R_MIPS_GNU_REL16_S2); } -static inline bfd_boolean +static inline bool mips16_branch_reloc_p (int r_type) { return (r_type == R_MIPS16_26 || r_type == R_MIPS16_PC16_S1); } -static inline bfd_boolean +static inline bool micromips_branch_reloc_p (int r_type) { return (r_type == R_MICROMIPS_26_S1 @@ -2322,7 +2322,7 @@ micromips_branch_reloc_p (int r_type) || r_type == R_MICROMIPS_PC7_S1); } -static inline bfd_boolean +static inline bool tls_gd_reloc_p (unsigned int r_type) { return (r_type == R_MIPS_TLS_GD @@ -2330,7 +2330,7 @@ tls_gd_reloc_p (unsigned int r_type) || r_type == R_MICROMIPS_TLS_GD); } -static inline bfd_boolean +static inline bool tls_ldm_reloc_p (unsigned int r_type) { return (r_type == R_MIPS_TLS_LDM @@ -2338,7 +2338,7 @@ tls_ldm_reloc_p (unsigned int r_type) || r_type == R_MICROMIPS_TLS_LDM); } -static inline bfd_boolean +static inline bool tls_gottprel_reloc_p (unsigned int r_type) { return (r_type == R_MIPS_TLS_GOTTPREL @@ -2348,7 +2348,7 @@ tls_gottprel_reloc_p (unsigned int r_type) void _bfd_mips_elf_reloc_unshuffle (bfd *abfd, int r_type, - bfd_boolean jal_shuffle, bfd_byte *data) + bool jal_shuffle, bfd_byte *data) { bfd_vma first, second, val; @@ -2371,7 +2371,7 @@ _bfd_mips_elf_reloc_unshuffle (bfd *abfd, int r_type, void _bfd_mips_elf_reloc_shuffle (bfd *abfd, int r_type, - bfd_boolean jal_shuffle, bfd_byte *data) + bool jal_shuffle, bfd_byte *data) { bfd_vma first, second, val; @@ -2402,7 +2402,7 @@ _bfd_mips_elf_reloc_shuffle (bfd *abfd, int r_type, bfd_reloc_status_type _bfd_mips_elf_gprel16_with_gp (bfd *abfd, asymbol *symbol, arelent *reloc_entry, asection *input_section, - bfd_boolean relocatable, void *data, bfd_vma gp) + bool relocatable, void *data, bfd_vma gp) { bfd_vma relocation; bfd_signed_vma val; @@ -2537,10 +2537,10 @@ _bfd_mips_elf_lo16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, if (reloc_entry->address > bfd_get_section_limit (abfd, input_section)) return bfd_reloc_outofrange; - _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, false, location); vallo = bfd_get_32 (abfd, location); - _bfd_mips_elf_reloc_shuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_shuffle (abfd, reloc_entry->howto->type, false, location); while (mips_hi16_list != NULL) @@ -2556,11 +2556,11 @@ _bfd_mips_elf_lo16_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, relocations can also be used with global symbols, their howto has a rightshift of 0. */ if (hi->rel.howto->type == R_MIPS_GOT16) - hi->rel.howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, R_MIPS_HI16, FALSE); + hi->rel.howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, R_MIPS_HI16, false); else if (hi->rel.howto->type == R_MIPS16_GOT16) - hi->rel.howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, R_MIPS16_HI16, FALSE); + hi->rel.howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, R_MIPS16_HI16, false); else if (hi->rel.howto->type == R_MICROMIPS_GOT16) - hi->rel.howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, R_MICROMIPS_HI16, FALSE); + hi->rel.howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, R_MICROMIPS_HI16, false); /* VALLO is a signed 16-bit number. Bias it by 0x8000 so that any carry or borrow will induce a change of +1 or -1 in the high part. */ @@ -2593,7 +2593,7 @@ _bfd_mips_elf_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry, { bfd_signed_vma val; bfd_reloc_status_type status; - bfd_boolean relocatable; + bool relocatable; relocatable = (output_bfd != NULL); @@ -2638,11 +2638,11 @@ _bfd_mips_elf_generic_reloc (bfd *abfd ATTRIBUTE_UNUSED, arelent *reloc_entry, val += reloc_entry->addend; /* Add VAL to the relocation field. */ - _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_unshuffle (abfd, reloc_entry->howto->type, false, location); status = _bfd_relocate_contents (reloc_entry->howto, abfd, val, location); - _bfd_mips_elf_reloc_shuffle (abfd, reloc_entry->howto->type, FALSE, + _bfd_mips_elf_reloc_shuffle (abfd, reloc_entry->howto->type, false, location); if (status != bfd_reloc_ok) @@ -2894,32 +2894,32 @@ sort_dynamic_relocs_64 (const void *arg1 ATTRIBUTE_UNUSED, stripped but required by a reloc. In particular, it can not happen when generating a final executable. */ -static bfd_boolean +static bool mips_elf_output_extsym (struct mips_elf_link_hash_entry *h, void *data) { struct extsym_info *einfo = data; - bfd_boolean strip; + bool strip; asection *sec, *output_section; if (h->root.indx == -2) - strip = FALSE; + strip = false; else if ((h->root.def_dynamic || h->root.ref_dynamic || h->root.type == bfd_link_hash_new) && !h->root.def_regular && !h->root.ref_regular) - strip = TRUE; + strip = true; else if (einfo->info->strip == strip_all || (einfo->info->strip == strip_some && bfd_hash_lookup (einfo->info->keep_hash, h->root.root.root.string, - FALSE, FALSE) == NULL)) - strip = TRUE; + false, false) == NULL)) + strip = true; else - strip = FALSE; + strip = false; if (strip) - return TRUE; + return true; if (h->esym.ifd == -2) { @@ -3052,11 +3052,11 @@ mips_elf_output_extsym (struct mips_elf_link_hash_entry *h, void *data) h->root.root.root.string, &h->esym)) { - einfo->failed = TRUE; - return FALSE; + einfo->failed = true; + return false; } - return TRUE; + return true; } /* A comparison routine used to sort .gptab entries. */ @@ -3107,7 +3107,7 @@ mips_elf_got_entry_eq (const void *entry1, const void *entry2) return (e1->symndx == e2->symndx && e1->tls_type == e2->tls_type - && (e1->tls_type == GOT_TLS_LDM ? TRUE + && (e1->tls_type == GOT_TLS_LDM ? true : !e1->abfd ? !e2->abfd && e1->d.address == e2->d.address : e1->symndx >= 0 ? (e1->abfd == e2->abfd && e1->d.addend == e2->d.addend) @@ -3187,7 +3187,7 @@ mips_elf_create_got_info (bfd *abfd) CREATE_P and if ABFD doesn't already have a GOT. */ static struct mips_got_info * -mips_elf_bfd_got (bfd *abfd, bfd_boolean create_p) +mips_elf_bfd_got (bfd *abfd, bool create_p) { struct mips_elf_obj_tdata *tdata; @@ -3226,7 +3226,7 @@ mips_elf_replace_bfd_got (bfd *abfd, struct mips_got_info *g) if creation fails. */ static asection * -mips_elf_rel_dyn_section (struct bfd_link_info *info, bfd_boolean create_p) +mips_elf_rel_dyn_section (struct bfd_link_info *info, bool create_p) { const char *dname; asection *sreloc; @@ -3298,8 +3298,8 @@ mips_tls_got_relocs (struct bfd_link_info *info, unsigned char tls_type, struct elf_link_hash_entry *h) { int indx = 0; - bfd_boolean need_relocs = FALSE; - bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created; + bool need_relocs = false; + bool dyn = elf_hash_table (info)->dynamic_sections_created; if (h != NULL && h->dynindx != -1 @@ -3311,7 +3311,7 @@ mips_tls_got_relocs (struct bfd_link_info *info, unsigned char tls_type, && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) - need_relocs = TRUE; + need_relocs = true; if (!need_relocs) return 0; @@ -3392,12 +3392,12 @@ mips_elf_initialize_tls_slots (bfd *abfd, struct bfd_link_info *info, struct mips_elf_link_hash_entry *h, bfd_vma value) { - bfd_boolean dyn = elf_hash_table (info)->dynamic_sections_created; + bool dyn = elf_hash_table (info)->dynamic_sections_created; struct mips_elf_link_hash_table *htab; int indx; asection *sreloc, *sgot; bfd_vma got_offset, got_offset2; - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; htab = mips_elf_hash_table (info); if (htab == NULL) @@ -3419,7 +3419,7 @@ mips_elf_initialize_tls_slots (bfd *abfd, struct bfd_link_info *info, && (h == NULL || ELF_ST_VISIBILITY (h->root.other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) - need_relocs = TRUE; + need_relocs = true; /* MINUS_ONE means the symbol is not defined in this object. It may not be defined at all; assume that the value doesn't matter in that @@ -3428,7 +3428,7 @@ mips_elf_initialize_tls_slots (bfd *abfd, struct bfd_link_info *info, || h->root.root.type == bfd_link_hash_undefweak); /* Emit necessary relocations. */ - sreloc = mips_elf_rel_dyn_section (info, FALSE); + sreloc = mips_elf_rel_dyn_section (info, false); got_offset = entry->gotidx; switch (entry->tls_type) @@ -3504,7 +3504,7 @@ mips_elf_initialize_tls_slots (bfd *abfd, struct bfd_link_info *info, abort (); } - entry->tls_initialized = TRUE; + entry->tls_initialized = true; } /* Return the offset from _GLOBAL_OFFSET_TABLE_ of the .got.plt entry @@ -3587,7 +3587,7 @@ mips_elf_primary_global_got_index (bfd *obfd, struct bfd_link_info *info, indices into the primary GOT. That makes it easy to calculate the GOT offset. */ BFD_ASSERT (h->dynindx >= global_got_dynindx); - g = mips_elf_bfd_got (obfd, FALSE); + g = mips_elf_bfd_got (obfd, false); got_index = ((h->dynindx - global_got_dynindx + g->local_gotno) * MIPS_ELF_GOT_SIZE (obfd)); BFD_ASSERT (got_index < htab->root.sgot->size); @@ -3610,11 +3610,11 @@ mips_elf_global_got_index (bfd *obfd, struct bfd_link_info *info, bfd *ibfd, htab = mips_elf_hash_table (info); BFD_ASSERT (htab != NULL); - g = mips_elf_bfd_got (ibfd, FALSE); + g = mips_elf_bfd_got (ibfd, false); BFD_ASSERT (g); lookup.tls_type = mips_elf_reloc_tls_type (r_type); - if (!lookup.tls_type && g == mips_elf_bfd_got (obfd, FALSE)) + if (!lookup.tls_type && g == mips_elf_bfd_got (obfd, false)) return mips_elf_primary_global_got_index (obfd, info, h); lookup.abfd = ibfd; @@ -3676,7 +3676,7 @@ mips_elf_got_page (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, static bfd_vma mips_elf_got16_entry (bfd *abfd, bfd *ibfd, struct bfd_link_info *info, - bfd_vma value, bfd_boolean external) + bfd_vma value, bool external) { struct mips_got_entry *entry; @@ -3740,10 +3740,10 @@ mips_elf_create_local_got_entry (bfd *abfd, struct bfd_link_info *info, htab = mips_elf_hash_table (info); BFD_ASSERT (htab != NULL); - g = mips_elf_bfd_got (ibfd, FALSE); + g = mips_elf_bfd_got (ibfd, false); if (g == NULL) { - g = mips_elf_bfd_got (abfd, FALSE); + g = mips_elf_bfd_got (abfd, false); BFD_ASSERT (g != NULL); } @@ -3825,7 +3825,7 @@ mips_elf_create_local_got_entry (bfd *abfd, struct bfd_link_info *info, bfd_byte *rloc; bfd_vma got_address; - s = mips_elf_rel_dyn_section (info, FALSE); + s = mips_elf_rel_dyn_section (info, false); got_address = (htab->root.sgot->output_section->vma + htab->root.sgot->output_offset + entry->gotidx); @@ -3871,7 +3871,7 @@ count_section_dynsyms (bfd *output_bfd, struct bfd_link_info *info) /* Sort the dynamic symbol table so that symbols that need GOT entries appear towards the end. */ -static bfd_boolean +static bool mips_elf_sort_hash_table (bfd *abfd, struct bfd_link_info *info) { struct mips_elf_link_hash_table *htab; @@ -3882,11 +3882,11 @@ mips_elf_sort_hash_table (bfd *abfd, struct bfd_link_info *info) BFD_ASSERT (htab != NULL); if (htab->root.dynsymcount == 0) - return TRUE; + return true; g = htab->got_info; if (g == NULL) - return TRUE; + return true; hsd.low = NULL; hsd.max_unref_got_dynindx @@ -3921,14 +3921,14 @@ mips_elf_sort_hash_table (bfd *abfd, struct bfd_link_info *info) table index in the GOT. */ htab->global_gotsym = hsd.low; - return TRUE; + return true; } /* If H needs a GOT entry, assign it the highest available dynamic index. Otherwise, assign it the lowest available dynamic index. */ -static bfd_boolean +static bool mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *h, void *data) { struct mips_elf_hash_sort_data *hsd = data; @@ -3936,7 +3936,7 @@ mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *h, void *data) /* Symbols without dynamic symbol table entries aren't interesting at all. */ if (h->root.dynindx == -1) - return TRUE; + return true; switch (h->global_got_area) { @@ -3965,14 +3965,14 @@ mips_elf_sort_hash_table_f (struct mips_elf_link_hash_entry *h, void *data) bfd_put_32 (hsd->output_bfd, h->root.dynindx, hsd->mipsxhash + h->mipsxhash_loc); - return TRUE; + return true; } /* Record that input bfd ABFD requires a GOT entry like *LOOKUP (which is owned by the caller and shouldn't be added to the hash table directly). */ -static bfd_boolean +static bool mips_elf_record_got_entry (struct bfd_link_info *info, bfd *abfd, struct mips_got_entry *lookup) { @@ -3986,7 +3986,7 @@ mips_elf_record_got_entry (struct bfd_link_info *info, bfd *abfd, g = htab->got_info; loc = htab_find_slot (g->got_entries, lookup, INSERT); if (!loc) - return FALSE; + return false; /* Populate the entry if it isn't already. */ entry = (struct mips_got_entry *) *loc; @@ -3994,36 +3994,36 @@ mips_elf_record_got_entry (struct bfd_link_info *info, bfd *abfd, { entry = (struct mips_got_entry *) bfd_alloc (abfd, sizeof (*entry)); if (!entry) - return FALSE; + return false; - lookup->tls_initialized = FALSE; + lookup->tls_initialized = false; lookup->gotidx = -1; *entry = *lookup; *loc = entry; } /* Reuse the same GOT entry for the BFD's GOT. */ - g = mips_elf_bfd_got (abfd, TRUE); + g = mips_elf_bfd_got (abfd, true); if (!g) - return FALSE; + return false; bfd_loc = htab_find_slot (g->got_entries, lookup, INSERT); if (!bfd_loc) - return FALSE; + return false; if (!*bfd_loc) *bfd_loc = entry; - return TRUE; + return true; } /* ABFD has a GOT relocation of type R_TYPE against H. Reserve a GOT entry for it. FOR_CALL is true if the caller is only interested in using the GOT entry for calls. */ -static bfd_boolean +static bool mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h, bfd *abfd, struct bfd_link_info *info, - bfd_boolean for_call, int r_type) + bool for_call, int r_type) { struct mips_elf_link_hash_table *htab; struct mips_elf_link_hash_entry *hmips; @@ -4035,7 +4035,7 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h, hmips = (struct mips_elf_link_hash_entry *) h; if (!for_call) - hmips->got_only_for_calls = FALSE; + hmips->got_only_for_calls = false; /* A global symbol in the GOT must also be in the dynamic symbol table. */ @@ -4045,11 +4045,11 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h, { case STV_INTERNAL: case STV_HIDDEN: - _bfd_mips_elf_hide_symbol (info, h, TRUE); + _bfd_mips_elf_hide_symbol (info, h, true); break; } if (!bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } tls_type = mips_elf_reloc_tls_type (r_type); @@ -4066,7 +4066,7 @@ mips_elf_record_global_got_symbol (struct elf_link_hash_entry *h, /* ABFD has a GOT relocation of type R_TYPE against symbol SYMNDX + ADDEND, where SYMNDX is a local symbol. Reserve a GOT entry for it. */ -static bfd_boolean +static bool mips_elf_record_local_got_symbol (bfd *abfd, long symndx, bfd_vma addend, struct bfd_link_info *info, int r_type) { @@ -4091,7 +4091,7 @@ mips_elf_record_local_got_symbol (bfd *abfd, long symndx, bfd_vma addend, H is the symbol's hash table entry, or null if SYMNDX is local to ABFD. */ -static bfd_boolean +static bool mips_elf_record_got_page_ref (struct bfd_link_info *info, bfd *abfd, long symndx, struct elf_link_hash_entry *h, bfd_signed_vma addend) @@ -4120,32 +4120,32 @@ mips_elf_record_got_page_ref (struct bfd_link_info *info, bfd *abfd, lookup.addend = addend; loc = htab_find_slot (g1->got_page_refs, &lookup, INSERT); if (loc == NULL) - return FALSE; + return false; entry = (struct mips_got_page_ref *) *loc; if (!entry) { entry = bfd_alloc (abfd, sizeof (*entry)); if (!entry) - return FALSE; + return false; *entry = lookup; *loc = entry; } /* Add the same entry to the BFD's GOT. */ - g2 = mips_elf_bfd_got (abfd, TRUE); + g2 = mips_elf_bfd_got (abfd, true); if (!g2) - return FALSE; + return false; bfd_loc = htab_find_slot (g2->got_page_refs, &lookup, INSERT); if (!bfd_loc) - return FALSE; + return false; if (!*bfd_loc) *bfd_loc = entry; - return TRUE; + return true; } /* Add room for N relocations to the .rel(a).dyn section in ABFD. */ @@ -4160,7 +4160,7 @@ mips_elf_allocate_dynamic_relocations (bfd *abfd, struct bfd_link_info *info, htab = mips_elf_hash_table (info); BFD_ASSERT (htab != NULL); - s = mips_elf_rel_dyn_section (info, FALSE); + s = mips_elf_rel_dyn_section (info, false); BFD_ASSERT (s != NULL); if (htab->root.target_os == is_vxworks) @@ -4198,7 +4198,7 @@ mips_elf_check_recreate_got (void **entryp, void *data) if (h->root.root.type == bfd_link_hash_indirect || h->root.root.type == bfd_link_hash_warning) { - arg->value = TRUE; + arg->value = true; return 0; } } @@ -4273,7 +4273,7 @@ mips_elf_pages_for_range (const struct mips_got_page_range *range) /* Record that G requires a page entry that can reach SEC + ADDEND. */ -static bfd_boolean +static bool mips_elf_record_got_page_entry (struct mips_elf_traverse_got_arg *arg, asection *sec, bfd_signed_vma addend) { @@ -4287,7 +4287,7 @@ mips_elf_record_got_page_entry (struct mips_elf_traverse_got_arg *arg, lookup.sec = sec; loc = htab_find_slot (g->got_page_entries, &lookup, INSERT); if (loc == NULL) - return FALSE; + return false; /* Create a mips_got_page_entry if this is the first time we've seen the section. */ @@ -4296,7 +4296,7 @@ mips_elf_record_got_page_entry (struct mips_elf_traverse_got_arg *arg, { entry = bfd_zalloc (arg->info->output_bfd, sizeof (*entry)); if (!entry) - return FALSE; + return false; entry->sec = sec; *loc = entry; @@ -4316,7 +4316,7 @@ mips_elf_record_got_page_entry (struct mips_elf_traverse_got_arg *arg, { range = bfd_zalloc (arg->info->output_bfd, sizeof (*range)); if (!range) - return FALSE; + return false; range->next = *range_ptr; range->min_addend = addend; @@ -4325,7 +4325,7 @@ mips_elf_record_got_page_entry (struct mips_elf_traverse_got_arg *arg, *range_ptr = range; entry->num_pages++; g->page_gotno++; - return TRUE; + return true; } /* Remember how many pages the old range contributed. */ @@ -4354,7 +4354,7 @@ mips_elf_record_got_page_entry (struct mips_elf_traverse_got_arg *arg, g->page_gotno += new_pages - old_pages; } - return TRUE; + return true; } /* A htab_traverse callback for which *REFP points to a mips_got_page_ref @@ -4447,7 +4447,7 @@ mips_elf_resolve_got_page_ref (void **refp, void *data) into got_page_entry structures and estimate the number of page entries that they require. */ -static bfd_boolean +static bool mips_elf_resolve_final_got_entries (struct bfd_link_info *info, struct mips_got_info *g) { @@ -4458,7 +4458,7 @@ mips_elf_resolve_final_got_entries (struct bfd_link_info *info, tga.info = info; tga.g = g; - tga.value = FALSE; + tga.value = false; htab_traverse (g->got_entries, mips_elf_check_recreate_got, &tga); if (tga.value) { @@ -4467,11 +4467,11 @@ mips_elf_resolve_final_got_entries (struct bfd_link_info *info, mips_elf_got_entry_hash, mips_elf_got_entry_eq, NULL); if (!g->got_entries) - return FALSE; + return false; htab_traverse (oldg.got_entries, mips_elf_recreate_got, &tga); if (!tga.g) - return FALSE; + return false; htab_delete (oldg.got_entries); } @@ -4479,19 +4479,19 @@ mips_elf_resolve_final_got_entries (struct bfd_link_info *info, g->got_page_entries = htab_try_create (1, mips_got_page_entry_hash, mips_got_page_entry_eq, NULL); if (g->got_page_entries == NULL) - return FALSE; + return false; tga.info = info; tga.g = g; htab_traverse (g->got_page_refs, mips_elf_resolve_got_page_ref, &tga); - return TRUE; + return true; } /* Return true if a GOT entry for H should live in the local rather than global GOT area. */ -static bfd_boolean +static bool mips_use_local_got_p (struct bfd_link_info *info, struct mips_elf_link_hash_entry *h) { @@ -4500,28 +4500,28 @@ mips_use_local_got_p (struct bfd_link_info *info, and which therefore don't bind locally. We'll report undefined symbols later if appropriate. */ if (h->root.dynindx == -1) - return TRUE; + return true; /* Absolute symbols, if ever they need a GOT entry, cannot ever go to the local GOT, as they would be implicitly relocated by the base address by the dynamic loader. */ if (bfd_is_abs_symbol (&h->root.root)) - return FALSE; + return false; /* Symbols that bind locally can (and in the case of forced-local symbols, must) live in the local GOT. */ if (h->got_only_for_calls ? SYMBOL_CALLS_LOCAL (info, &h->root) : SYMBOL_REFERENCES_LOCAL (info, &h->root)) - return TRUE; + return true; /* If this is an executable that must provide a definition of the symbol, either though PLTs or copy relocations, then that address should go in the local rather than global GOT. */ if (bfd_link_executable (info) && h->has_static_relocs) - return TRUE; + return true; - return FALSE; + return false; } /* A mips_elf_link_hash_traverse callback for which DATA points to the @@ -4530,7 +4530,7 @@ mips_use_local_got_p (struct bfd_link_info *info, Count the number of global symbols that are in the primary GOT only because they have relocations against them (reloc_only_gotno). */ -static bfd_boolean +static bool mips_elf_count_got_symbols (struct mips_elf_link_hash_entry *h, void *data) { struct bfd_link_info *info; @@ -4675,7 +4675,7 @@ mips_elf_merge_got_with (bfd *abfd, struct mips_got_info *from, attempt to merge with the current got, or finish the current got and then make make the new got current. */ -static bfd_boolean +static bool mips_elf_merge_got (bfd *abfd, struct mips_got_info *g, struct mips_elf_got_per_bfd_arg *arg) { @@ -4683,7 +4683,7 @@ mips_elf_merge_got (bfd *abfd, struct mips_got_info *g, int result; if (!mips_elf_resolve_final_got_entries (arg->info, g)) - return FALSE; + return false; /* Work out the number of page, local and TLS entries. */ estimate = arg->max_pages; @@ -4704,7 +4704,7 @@ mips_elf_merge_got (bfd *abfd, struct mips_got_info *g, if (!arg->primary) { arg->primary = g; - return TRUE; + return true; } /* Try merging with the primary GOT. */ @@ -4727,14 +4727,14 @@ mips_elf_merge_got (bfd *abfd, struct mips_got_info *g, g->next = arg->current; arg->current = g; - return TRUE; + return true; } /* ENTRYP is a hash table entry for a mips_got_entry. Set its gotidx to GOTIDX, duplicating the entry if it has already been assigned an index in a different GOT. */ -static bfd_boolean +static bool mips_elf_set_gotidx (void **entryp, long gotidx) { struct mips_got_entry *entry; @@ -4746,14 +4746,14 @@ mips_elf_set_gotidx (void **entryp, long gotidx) new_entry = bfd_alloc (entry->abfd, sizeof (*entry)); if (!new_entry) - return FALSE; + return false; *new_entry = *entry; *entryp = new_entry; entry = new_entry; } entry->gotidx = gotidx; - return TRUE; + return true; } /* Set the TLS GOT index for the GOT entry in ENTRYP. DATA points to a @@ -4856,7 +4856,7 @@ mips_elf_forbid_lazy_stubs (void **entryp, void *data) && entry->symndx == -1 && entry->d.h->needs_lazy_stub) { - entry->d.h->needs_lazy_stub = FALSE; + entry->d.h->needs_lazy_stub = false; htab->lazy_stub_count--; } @@ -4871,7 +4871,7 @@ mips_elf_adjust_gp (bfd *abfd, struct mips_got_info *g, bfd *ibfd) if (!g->next) return 0; - g = mips_elf_bfd_got (ibfd, FALSE); + g = mips_elf_bfd_got (ibfd, false); if (! g) return 0; @@ -4886,7 +4886,7 @@ mips_elf_adjust_gp (bfd *abfd, struct mips_got_info *g, bfd *ibfd) /* Turn a single GOT that is too big for 16-bit addressing into a sequence of GOTs, each one 16-bit addressable. */ -static bfd_boolean +static bool mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info, asection *got, bfd_size_type pages) { @@ -4921,9 +4921,9 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info, to be the primary GOT. */ for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next) { - gg = mips_elf_bfd_got (ibfd, FALSE); + gg = mips_elf_bfd_got (ibfd, false); if (gg && !mips_elf_merge_got (ibfd, gg, &got_per_bfd_arg)) - return FALSE; + return false; } /* If we do not find any suitable primary GOT, create an empty one. */ @@ -5000,7 +5000,7 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info, tga.value = MIPS_ELF_GOT_SIZE (abfd); htab_traverse (g->got_entries, mips_elf_initialize_tls_index, &tga); if (!tga.g) - return FALSE; + return false; BFD_ASSERT (g->tls_assigned_gotno == assign); /* Move onto the next GOT. It will be a secondary GOT if nonull. */ @@ -5029,7 +5029,7 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info, tga.g = g; htab_traverse (g->got_entries, mips_elf_set_global_gotidx, &tga); if (!tga.g) - return FALSE; + return false; BFD_ASSERT (g->assigned_low_gotno == g->local_gotno + g->global_gotno); g->assigned_low_gotno = save_assign; @@ -5049,7 +5049,7 @@ mips_elf_multi_got (bfd *abfd, struct bfd_link_info *info, mips_elf_allocate_dynamic_relocations (dynobj, info, needed_relocs); - return TRUE; + return true; } @@ -5078,7 +5078,7 @@ mips_elf_next_relocation (bfd *abfd ATTRIBUTE_UNUSED, unsigned int r_type, /* Return whether an input relocation is against a local symbol. */ -static bfd_boolean +static bool mips_elf_local_relocation_p (bfd *input_bfd, const Elf_Internal_Rela *relocation, asection **local_sections) @@ -5092,11 +5092,11 @@ mips_elf_local_relocation_p (bfd *input_bfd, extsymoff = (elf_bad_symtab (input_bfd)) ? 0 : symtab_hdr->sh_info; if (r_symndx < extsymoff) - return TRUE; + return true; if (elf_bad_symtab (input_bfd) && local_sections[r_symndx] != NULL) - return TRUE; + return true; - return FALSE; + return false; } /* Sign-extend VALUE, which has the indicated number of BITS. */ @@ -5115,20 +5115,20 @@ _bfd_mips_elf_sign_extend (bfd_vma value, int bits) range expressible by a signed number with the indicated number of BITS. */ -static bfd_boolean +static bool mips_elf_overflow_p (bfd_vma value, int bits) { bfd_signed_vma svalue = (bfd_signed_vma) value; if (svalue > (1 << (bits - 1)) - 1) /* The value is too big. */ - return TRUE; + return true; else if (svalue < -(1 << (bits - 1))) /* The value is too small. */ - return TRUE; + return true; /* All is well. */ - return FALSE; + return false; } /* Calculate the %high function. */ @@ -5167,7 +5167,7 @@ mips_elf_highest (bfd_vma value ATTRIBUTE_UNUSED) /* Create the .compact_rel section. */ -static bfd_boolean +static bool mips_elf_create_compact_rel_section (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -5182,17 +5182,17 @@ mips_elf_create_compact_rel_section s = bfd_make_section_anyway_with_flags (abfd, ".compact_rel", flags); if (s == NULL || !bfd_set_section_alignment (s, MIPS_ELF_LOG_FILE_ALIGN (abfd))) - return FALSE; + return false; s->size = sizeof (Elf32_External_compact_rel); } - return TRUE; + return true; } /* Create the .got section to hold the global offset table. */ -static bfd_boolean +static bool mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -5206,7 +5206,7 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ if (htab->root.sgot) - return TRUE; + return true; flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED); @@ -5216,7 +5216,7 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".got", flags); if (s == NULL || !bfd_set_section_alignment (s, 4)) - return FALSE; + return false; htab->root.sgot = s; /* Define the symbol _GLOBAL_OFFSET_TABLE_. We don't do this in the @@ -5225,8 +5225,8 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) bh = NULL; if (! (_bfd_generic_link_add_one_symbol (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s, - 0, NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; @@ -5237,7 +5237,7 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) if (bfd_link_pic (info) && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; htab->got_info = mips_elf_create_got_info (abfd); mips_elf_section_data (s)->elf.this_hdr.sh_flags @@ -5250,17 +5250,17 @@ mips_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) | SEC_IN_MEMORY | SEC_LINKER_CREATED); if (s == NULL) - return FALSE; + return false; htab->root.sgotplt = s; - return TRUE; + return true; } /* Return true if H refers to the special VxWorks __GOTT_BASE__ or __GOTT_INDEX__ symbols. These symbols are only special for shared objects; they are not used in executables. */ -static bfd_boolean +static bool is_gott_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { return (mips_elf_hash_table (info)->root.target_os == is_vxworks @@ -5274,9 +5274,9 @@ is_gott_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) which determines whether the destination function ever requires a stub. */ -static bfd_boolean +static bool mips_elf_relocation_needs_la25_stub (bfd *input_bfd, int r_type, - bfd_boolean target_is_16_bit_code_p) + bool target_is_16_bit_code_p) { /* We specifically ignore branches and jumps from EF_PIC objects, where the onus is on the compiler or programmer to perform any @@ -5284,7 +5284,7 @@ mips_elf_relocation_needs_la25_stub (bfd *input_bfd, int r_type, is unnecessary; for example, -mno-shared functions do not use the incoming value of $25, and may therefore be called directly. */ if (PIC_OBJECT_P (input_bfd)) - return FALSE; + return false; switch (r_type) { @@ -5297,13 +5297,13 @@ mips_elf_relocation_needs_la25_stub (bfd *input_bfd, int r_type, case R_MICROMIPS_PC10_S1: case R_MICROMIPS_PC16_S1: case R_MICROMIPS_PC23_S2: - return TRUE; + return true; case R_MIPS16_26: return !target_is_16_bit_code_p; default: - return FALSE; + return false; } } @@ -5347,17 +5347,17 @@ mips_elf_store_contents (reloc_howto_type *howto, return status without actually changing CONTENTS. */ -static bfd_boolean +static bool mips_elf_nullify_got_load (bfd *input_bfd, bfd_byte *contents, const Elf_Internal_Rela *relocation, - reloc_howto_type *howto, bfd_boolean doit) + reloc_howto_type *howto, bool doit) { int r_type = ELF_R_TYPE (input_bfd, relocation->r_info); bfd_byte *location = contents + relocation->r_offset; - bfd_boolean nullified = TRUE; + bool nullified = true; bfd_vma x; - _bfd_mips_elf_reloc_unshuffle (input_bfd, r_type, FALSE, location); + _bfd_mips_elf_reloc_unshuffle (input_bfd, r_type, false, location); /* Obtain the current value. */ x = mips_elf_obtain_contents (howto, relocation, input_bfd, contents); @@ -5375,13 +5375,13 @@ mips_elf_nullify_got_load (bfd *input_bfd, bfd_byte *contents, || ((x >> 26) & 0x3f) == 0x37) /* LD */ x = (0x9 << 26) | (x & (0x1f << 16)); /* ADDIU */ else - nullified = FALSE; + nullified = false; /* Put the value into the output. */ if (doit && nullified) mips_elf_store_contents (howto, relocation, input_bfd, contents, x); - _bfd_mips_elf_reloc_shuffle (input_bfd, r_type, FALSE, location); + _bfd_mips_elf_reloc_shuffle (input_bfd, r_type, false, location); return nullified; } @@ -5408,8 +5408,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, Elf_Internal_Sym *local_syms, asection **local_sections, bfd_vma *valuep, const char **namep, - bfd_boolean *cross_mode_jump_p, - bfd_boolean save_addend) + bool *cross_mode_jump_p, + bool save_addend) { /* The eventual value we will return. */ bfd_vma value; @@ -5434,28 +5434,28 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, struct mips_elf_link_hash_entry *h = NULL; /* TRUE if the symbol referred to by this relocation is a local symbol. */ - bfd_boolean local_p, was_local_p; + bool local_p, was_local_p; /* TRUE if the symbol referred to by this relocation is a section symbol. */ - bfd_boolean section_p = FALSE; + bool section_p = false; /* TRUE if the symbol referred to by this relocation is "_gp_disp". */ - bfd_boolean gp_disp_p = FALSE; + bool gp_disp_p = false; /* TRUE if the symbol referred to by this relocation is "__gnu_local_gp". */ - bfd_boolean gnu_local_gp_p = FALSE; + bool gnu_local_gp_p = false; Elf_Internal_Shdr *symtab_hdr; size_t extsymoff; unsigned long r_symndx; int r_type; /* TRUE if overflow occurred during the calculation of the relocation value. */ - bfd_boolean overflowed_p; + bool overflowed_p; /* TRUE if this relocation refers to a MIPS16 function. */ - bfd_boolean target_is_16_bit_code_p = FALSE; - bfd_boolean target_is_micromips_code_p = FALSE; + bool target_is_16_bit_code_p = false; + bool target_is_micromips_code_p = false; struct mips_elf_link_hash_table *htab; bfd *dynobj; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; dynobj = elf_hash_table (info)->dynobj; htab = mips_elf_hash_table (info); @@ -5469,7 +5469,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, + relocation->r_offset); /* Assume that there will be no overflow. */ - overflowed_p = FALSE; + overflowed_p = false; /* Figure out whether or not the symbol is local, and get the offset used in the array of hash table entries. */ @@ -5489,7 +5489,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, /* Figure out the value of the symbol. */ if (local_p) { - bfd_boolean micromips_p = MICROMIPS_P (abfd); + bool micromips_p = MICROMIPS_P (abfd); Elf_Internal_Sym *sym; sym = local_syms + r_symndx; @@ -5564,12 +5564,12 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, if (!hi16_reloc_p (r_type) && !lo16_reloc_p (r_type)) return bfd_reloc_notsupported; - gp_disp_p = TRUE; + gp_disp_p = true; } /* See if this is the special _gp symbol. Note that such a symbol must always be a global symbol. */ else if (strcmp (*namep, "__gnu_local_gp") == 0) - gnu_local_gp_p = TRUE; + gnu_local_gp_p = true; /* If this symbol is defined, calculate its address. Note that @@ -5623,10 +5623,10 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, } else { - bfd_boolean reject_undefined - = (info->unresolved_syms_in_objects == RM_DIAGNOSE - && !info->warn_unresolved_syms) - || ELF_ST_VISIBILITY (h->root.other) != STV_DEFAULT; + bool reject_undefined + = ((info->unresolved_syms_in_objects == RM_DIAGNOSE + && !info->warn_unresolved_syms) + || ELF_ST_VISIBILITY (h->root.other) != STV_DEFAULT); info->callbacks->undefined_symbol (info, h->root.root.root.string, input_bfd, @@ -5688,7 +5688,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, symbol = sec->output_section->vma + sec->output_offset + value; /* The target is 16-bit, but the stub isn't. */ - target_is_16_bit_code_p = FALSE; + target_is_16_bit_code_p = false; } /* If this is a MIPS16 call with a stub, that is made through the PLT or to a standard MIPS function, we need to redirect the call to the stub. @@ -5758,7 +5758,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, && h->root.plt.plist->comp_offset != MINUS_ONE && h->root.plt.plist->mips_offset != MINUS_ONE) { - bfd_boolean micromips_p = MICROMIPS_P (abfd); + bool micromips_p = MICROMIPS_P (abfd); sec = htab->root.splt; symbol = (sec->output_section->vma @@ -5820,7 +5820,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, if (resolved_to_zero && !bfd_link_relocatable (info) && mips_elf_nullify_got_load (input_bfd, contents, - relocation, howto, TRUE)) + relocation, howto, true)) return bfd_reloc_continue; /* Fall through. */ @@ -5834,7 +5834,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, { /* Redirect to the special `__gnu_absolute_zero' symbol. */ h = mips_elf_link_hash_lookup (htab, "__gnu_absolute_zero", - FALSE, FALSE, FALSE); + false, false, false); BFD_ASSERT (h != NULL); } break; @@ -5946,7 +5946,7 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, bfd_byte *loc; asection *s; - s = mips_elf_rel_dyn_section (info, FALSE); + s = mips_elf_rel_dyn_section (info, false); loc = s->contents + s->reloc_count++ * sizeof (Elf32_External_Rela); outrel.r_offset = (input_section->output_section->vma @@ -6506,13 +6506,13 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd, Returns FALSE if anything goes wrong. */ -static bfd_boolean +static bool mips_elf_perform_relocation (struct bfd_link_info *info, reloc_howto_type *howto, const Elf_Internal_Rela *relocation, bfd_vma value, bfd *input_bfd, asection *input_section, bfd_byte *contents, - bfd_boolean cross_mode_jump_p) + bool cross_mode_jump_p) { bfd_vma x; bfd_byte *location; @@ -6521,7 +6521,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info, /* Figure out where the relocation is occurring. */ location = contents + relocation->r_offset; - _bfd_mips_elf_reloc_unshuffle (input_bfd, r_type, FALSE, location); + _bfd_mips_elf_reloc_unshuffle (input_bfd, r_type, false, location); /* Obtain the current value. */ x = mips_elf_obtain_contents (howto, relocation, input_bfd, contents); @@ -6544,12 +6544,12 @@ mips_elf_perform_relocation (struct bfd_link_info *info, info->callbacks->einfo (_("%X%H: unsupported JALX to the same ISA mode\n"), input_bfd, input_section, relocation->r_offset); - return TRUE; + return true; } } if (cross_mode_jump_p && jal_reloc_p (r_type)) { - bfd_boolean ok; + bool ok; bfd_vma opcode = x >> 26; bfd_vma jalx_opcode; @@ -6578,7 +6578,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info, (_("%X%H: unsupported jump between ISA modes; " "consider recompiling with interlinking enabled\n"), input_bfd, input_section, relocation->r_offset); - return TRUE; + return true; } /* Make this the JALX opcode. */ @@ -6586,7 +6586,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info, } else if (cross_mode_jump_p && b_reloc_p (r_type)) { - bfd_boolean ok = FALSE; + bool ok = false; bfd_vma opcode = x >> 16; bfd_vma jalx_opcode = 0; bfd_vma sign_bit = 0; @@ -6623,7 +6623,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info, (_("%X%H: cannot convert branch between ISA modes " "to JALX: relocation out of range\n"), input_bfd, input_section, relocation->r_offset); - return TRUE; + return true; } /* Make this the JALX opcode. */ @@ -6634,7 +6634,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info, info->callbacks->einfo (_("%X%H: unsupported branch between ISA modes\n"), input_bfd, input_section, relocation->r_offset); - return TRUE; + return true; } } @@ -6680,7 +6680,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info, _bfd_mips_elf_reloc_shuffle (input_bfd, r_type, !bfd_link_relocatable (info), location); - return TRUE; + return true; } /* Create a rel.dyn relocation for the dynamic linker to resolve. REL @@ -6688,7 +6688,7 @@ mips_elf_perform_relocation (struct bfd_link_info *info, dynamic relocation. The ADDENDP is adjusted if necessary; the caller should store the result in place of the original addend. */ -static bfd_boolean +static bool mips_elf_create_dynamic_relocation (bfd *output_bfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel, @@ -6701,7 +6701,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, bfd *dynobj; int r_type; long indx; - bfd_boolean defined_p; + bool defined_p; struct mips_elf_link_hash_table *htab; htab = mips_elf_hash_table (info); @@ -6709,7 +6709,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, r_type = ELF_R_TYPE (output_bfd, rel->r_info); dynobj = elf_hash_table (info)->dynobj; - sreloc = mips_elf_rel_dyn_section (info, FALSE); + sreloc = mips_elf_rel_dyn_section (info, false); BFD_ASSERT (sreloc != NULL); BFD_ASSERT (sreloc->contents != NULL); BFD_ASSERT (sreloc->reloc_count * MIPS_ELF_REL_SIZE (output_bfd) @@ -6727,7 +6727,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, if (outrel[0].r_offset == MINUS_ONE) /* The relocation field has been deleted. */ - return TRUE; + return true; if (outrel[0].r_offset == MINUS_TWO) { @@ -6735,7 +6735,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, some sort. Functions like _bfd_elf_write_section_eh_frame expect the field to be fully relocated, so add in the symbol's value. */ *addendp += symbol; - return TRUE; + return true; } /* We must now calculate the dynamic symbol table index to use @@ -6752,7 +6752,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, relocation field. It therefore treats relocs against defined symbols in the same way as relocs against undefined symbols. */ - defined_p = FALSE; + defined_p = false; } else { @@ -6761,7 +6761,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -6792,7 +6792,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, against STN_UNDEF have no effect. */ if (!SGI_COMPAT (output_bfd)) indx = 0; - defined_p = TRUE; + defined_p = true; } /* If the relocation was previously an absolute relocation and @@ -6907,7 +6907,7 @@ mips_elf_create_dynamic_relocation (bfd *output_bfd, if (MIPS_ELF_READONLY_SECTION (input_section)) info->flags |= DF_TEXTREL; - return TRUE; + return true; } /* Return the MACH for a MIPS e_flags value. */ @@ -7201,7 +7201,7 @@ _bfd_mips_elf_eh_frame_address_size (bfd *abfd, const asection *sec) return 8; if ((elf_elfheader (abfd)->e_flags & EF_MIPS_ABI) == E_MIPS_ABI_EABI64) { - bfd_boolean long32_p, long64_p; + bool long32_p, long64_p; long32_p = bfd_get_section_by_name (abfd, ".gcc_compiled_long32") != 0; long64_p = bfd_get_section_by_name (abfd, ".gcc_compiled_long64") != 0; @@ -7237,7 +7237,7 @@ _bfd_mips_elf_eh_frame_address_size (bfd *abfd, const asection *sec) We can work around this problem by giving names to local section symbols. This is also what the MIPSpro tools do. */ -bfd_boolean +bool _bfd_mips_elf_name_local_section_symbols (bfd *abfd) { return elf_elfheader (abfd)->e_type == ET_REL && SGI_COMPAT (abfd); @@ -7248,7 +7248,7 @@ _bfd_mips_elf_name_local_section_symbols (bfd *abfd) sections that need the SHF_MIPS_GPREL flag by name; there has to be a better way. */ -bfd_boolean +bool _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) { if (hdr->sh_type == SHT_MIPS_REGINFO @@ -7266,16 +7266,16 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) abfd, (uint64_t) sizeof (Elf32_External_RegInfo), (uint64_t) hdr->sh_size); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (bfd_seek (abfd, hdr->sh_offset + sizeof (Elf32_External_RegInfo) - 4, SEEK_SET) != 0) - return FALSE; + return false; H_PUT_32 (abfd, elf_gp (abfd), buf); if (bfd_bwrite (buf, 4, abfd) != 4) - return FALSE; + return false; } if (hdr->sh_type == SHT_MIPS_OPTIONS @@ -7320,10 +7320,10 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) + sizeof (Elf_External_Options) + (sizeof (Elf64_External_RegInfo) - 8)), SEEK_SET) != 0) - return FALSE; + return false; H_PUT_64 (abfd, elf_gp (abfd), buf); if (bfd_bwrite (buf, 8, abfd) != 8) - return FALSE; + return false; } else if (intopt.kind == ODK_REGINFO) { @@ -7335,10 +7335,10 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) + sizeof (Elf_External_Options) + (sizeof (Elf32_External_RegInfo) - 4)), SEEK_SET) != 0) - return FALSE; + return false; H_PUT_32 (abfd, elf_gp (abfd), buf); if (bfd_bwrite (buf, 4, abfd) != 4) - return FALSE; + return false; } l += intopt.size; } @@ -7376,14 +7376,14 @@ _bfd_mips_elf_section_processing (bfd *abfd, Elf_Internal_Shdr *hdr) } } - return TRUE; + return true; } /* Handle a MIPS specific section when reading an object file. This is called when elfcode.h finds a section with an unknown type. This routine supports both the 32-bit and 64-bit ELF ABI. */ -bfd_boolean +bool _bfd_mips_elf_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr, const char *name, @@ -7400,75 +7400,75 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, { case SHT_MIPS_LIBLIST: if (strcmp (name, ".liblist") != 0) - return FALSE; + return false; break; case SHT_MIPS_MSYM: if (strcmp (name, ".msym") != 0) - return FALSE; + return false; break; case SHT_MIPS_CONFLICT: if (strcmp (name, ".conflict") != 0) - return FALSE; + return false; break; case SHT_MIPS_GPTAB: if (! startswith (name, ".gptab.")) - return FALSE; + return false; break; case SHT_MIPS_UCODE: if (strcmp (name, ".ucode") != 0) - return FALSE; + return false; break; case SHT_MIPS_DEBUG: if (strcmp (name, ".mdebug") != 0) - return FALSE; + return false; flags = SEC_DEBUGGING; break; case SHT_MIPS_REGINFO: if (strcmp (name, ".reginfo") != 0 || hdr->sh_size != sizeof (Elf32_External_RegInfo)) - return FALSE; + return false; flags = (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_SIZE); break; case SHT_MIPS_IFACE: if (strcmp (name, ".MIPS.interfaces") != 0) - return FALSE; + return false; break; case SHT_MIPS_CONTENT: if (! startswith (name, ".MIPS.content")) - return FALSE; + return false; break; case SHT_MIPS_OPTIONS: if (!MIPS_ELF_OPTIONS_SECTION_NAME_P (name)) - return FALSE; + return false; break; case SHT_MIPS_ABIFLAGS: if (!MIPS_ELF_ABIFLAGS_SECTION_NAME_P (name)) - return FALSE; + return false; flags = (SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_SIZE); break; case SHT_MIPS_DWARF: if (! startswith (name, ".debug_") && ! startswith (name, ".zdebug_")) - return FALSE; + return false; break; case SHT_MIPS_SYMBOL_LIB: if (strcmp (name, ".MIPS.symlib") != 0) - return FALSE; + return false; break; case SHT_MIPS_EVENTS: if (! startswith (name, ".MIPS.events") && ! startswith (name, ".MIPS.post_rel")) - return FALSE; + return false; break; case SHT_MIPS_XHASH: if (strcmp (name, ".MIPS.xhash") != 0) - return FALSE; + return false; default: break; } if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name, shindex)) - return FALSE; + return false; if (hdr->sh_flags & SHF_MIPS_GPREL) flags |= SEC_SMALL_DATA; @@ -7478,7 +7478,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, if (!bfd_set_section_flags (hdr->bfd_section, (bfd_section_flags (hdr->bfd_section) | flags))) - return FALSE; + return false; } if (hdr->sh_type == SHT_MIPS_ABIFLAGS) @@ -7487,12 +7487,12 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, if (! bfd_get_section_contents (abfd, hdr->bfd_section, &ext, 0, sizeof ext)) - return FALSE; + return false; bfd_mips_elf_swap_abiflags_v0_in (abfd, &ext, &mips_elf_tdata (abfd)->abiflags); if (mips_elf_tdata (abfd)->abiflags.version != 0) - return FALSE; - mips_elf_tdata (abfd)->abiflags_valid = TRUE; + return false; + mips_elf_tdata (abfd)->abiflags_valid = true; } /* FIXME: We should record sh_info for a .gptab section. */ @@ -7508,7 +7508,7 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, if (! bfd_get_section_contents (abfd, hdr->bfd_section, &ext, 0, sizeof ext)) - return FALSE; + return false; bfd_mips_elf32_swap_reginfo_in (abfd, &ext, &s); elf_gp (abfd) = s.ri_gp_value; } @@ -7523,12 +7523,12 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, contents = bfd_malloc (hdr->sh_size); if (contents == NULL) - return FALSE; + return false; if (! bfd_get_section_contents (abfd, hdr->bfd_section, contents, 0, hdr->sh_size)) { free (contents); - return FALSE; + return false; } l = contents; lend = contents + hdr->sh_size; @@ -7574,14 +7574,14 @@ _bfd_mips_elf_section_from_shdr (bfd *abfd, free (contents); } - return TRUE; + return true; } /* Set the correct type for a MIPS ELF section. We do this by the section name, which is a hack, but ought to work. This routine is used by both the 32-bit and the 64-bit ABI. */ -bfd_boolean +bool _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) { const char *name = bfd_section_name (sec); @@ -7711,7 +7711,7 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) these, and the IRIX ld doesn't like resulting empty RELA sections. Thus we create those header only on demand now. */ - return TRUE; + return true; } /* Given a BFD section, try to locate the corresponding ELF section @@ -7720,27 +7720,27 @@ _bfd_mips_elf_fake_sections (bfd *abfd, Elf_Internal_Shdr *hdr, asection *sec) but for non-PIC objects we will certainly want support for at least the .scommon section. */ -bfd_boolean +bool _bfd_mips_elf_section_from_bfd_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, int *retval) { if (strcmp (bfd_section_name (sec), ".scommon") == 0) { *retval = SHN_MIPS_SCOMMON; - return TRUE; + return true; } if (strcmp (bfd_section_name (sec), ".acommon") == 0) { *retval = SHN_MIPS_ACOMMON; - return TRUE; + return true; } - return FALSE; + return false; } /* Hook called by the linker routine which adds symbols from an object file. We must handle the special MIPS section numbers here. */ -bfd_boolean +bool _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, Elf_Internal_Sym *sym, const char **namep, flagword *flagsp ATTRIBUTE_UNUSED, @@ -7752,7 +7752,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, { /* Skip IRIX5 rld entry name. */ *namep = NULL; - return TRUE; + return true; } /* Shared objects may have a dynamic symbol '_gp_disp' defined as @@ -7766,7 +7766,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, && (strcmp (*namep, "_gp_disp") == 0)) { *namep = NULL; - return TRUE; + return true; } switch (sym->st_shndx) @@ -7795,12 +7795,12 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, elf_text_section = bfd_zalloc (abfd, amt); if (elf_text_section == NULL) - return FALSE; + return false; amt = sizeof (asymbol); elf_text_symbol = bfd_zalloc (abfd, amt); if (elf_text_symbol == NULL) - return FALSE; + return false; /* Initialize the section. */ @@ -7836,12 +7836,12 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, elf_data_section = bfd_zalloc (abfd, amt); if (elf_data_section == NULL) - return FALSE; + return false; amt = sizeof (asymbol); elf_data_symbol = bfd_zalloc (abfd, amt); if (elf_data_symbol == NULL) - return FALSE; + return false; /* Initialize the section. */ @@ -7881,9 +7881,9 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, /* Mark __rld_obj_head as dynamic. */ bh = NULL; if (! (_bfd_generic_link_add_one_symbol - (info, abfd, *namep, BSF_GLOBAL, *secp, *valp, NULL, FALSE, + (info, abfd, *namep, BSF_GLOBAL, *secp, *valp, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; @@ -7891,9 +7891,9 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, h->type = STT_OBJECT; if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; - mips_elf_hash_table (info)->use_rld_obj_head = TRUE; + mips_elf_hash_table (info)->use_rld_obj_head = true; mips_elf_hash_table (info)->rld_symbol = h; } @@ -7903,7 +7903,7 @@ _bfd_mips_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info, if (ELF_ST_IS_COMPRESSED (sym->st_other)) ++*valp; - return TRUE; + return true; } /* This hook function is called before the linker writes out a global @@ -7933,7 +7933,7 @@ _bfd_mips_elf_link_output_symbol_hook /* Create dynamic sections when linking against a dynamic object. */ -bfd_boolean +bool _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) { struct elf_link_hash_entry *h; @@ -7957,16 +7957,16 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) if (s != NULL) { if (!bfd_set_section_flags (s, flags)) - return FALSE; + return false; } } /* We need to create .got section. */ if (!mips_elf_create_got_section (abfd, info)) - return FALSE; + return false; - if (! mips_elf_rel_dyn_section (info, TRUE)) - return FALSE; + if (! mips_elf_rel_dyn_section (info, true)) + return false; /* Create .stub section. */ s = bfd_make_section_anyway_with_flags (abfd, @@ -7974,7 +7974,7 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags | SEC_CODE); if (s == NULL || !bfd_set_section_alignment (s, MIPS_ELF_LOG_FILE_ALIGN (abfd))) - return FALSE; + return false; htab->sstubs = s; if (!mips_elf_hash_table (info)->use_rld_obj_head @@ -7985,7 +7985,7 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) flags &~ (flagword) SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, MIPS_ELF_LOG_FILE_ALIGN (abfd))) - return FALSE; + return false; } /* Create .MIPS.xhash section. */ @@ -8004,8 +8004,8 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) bh = NULL; if (! (_bfd_generic_link_add_one_symbol (info, abfd, *namep, BSF_GLOBAL, bfd_und_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + NULL, false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->mark = 1; @@ -8014,14 +8014,14 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) h->type = STT_SECTION; if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* We need to create a .compact_rel section. */ if (SGI_COMPAT (abfd)) { if (!mips_elf_create_compact_rel_section (abfd, info)) - return FALSE; + return false; } /* Change alignments of some sections. */ @@ -8055,8 +8055,8 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) bh = NULL; if (!(_bfd_generic_link_add_one_symbol (info, abfd, name, BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + NULL, false, get_elf_backend_data (abfd)->collect, &bh))) + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; @@ -8064,7 +8064,7 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) h->type = STT_SECTION; if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; if (! mips_elf_hash_table (info)->use_rld_obj_head) { @@ -8078,9 +8078,9 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) name = SGI_COMPAT (abfd) ? "__rld_map" : "__RLD_MAP"; bh = NULL; if (!(_bfd_generic_link_add_one_symbol - (info, abfd, name, BSF_GLOBAL, s, 0, NULL, FALSE, + (info, abfd, name, BSF_GLOBAL, s, 0, NULL, false, get_elf_backend_data (abfd)->collect, &bh))) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; h->non_elf = 0; @@ -8088,7 +8088,7 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) h->type = STT_OBJECT; if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; mips_elf_hash_table (info)->rld_symbol = h; } } @@ -8096,21 +8096,21 @@ _bfd_mips_elf_create_dynamic_sections (bfd *abfd, struct bfd_link_info *info) /* Create the .plt, .rel(a).plt, .dynbss and .rel(a).bss sections. Also, on VxWorks, create the _PROCEDURE_LINKAGE_TABLE_ symbol. */ if (!_bfd_elf_create_dynamic_sections (abfd, info)) - return FALSE; + return false; /* Do the usual VxWorks handling. */ if (htab->root.target_os == is_vxworks && !elf_vxworks_create_dynamic_sections (abfd, info, &htab->srelplt2)) - return FALSE; + return false; - return TRUE; + return true; } /* Return true if relocation REL against section SEC is a REL rather than RELA relocation. RELOCS is the first relocation in the section and ABFD is the bfd that contains SEC. */ -static bfd_boolean +static bool mips_elf_rel_relocation_p (bfd *abfd, asection *sec, const Elf_Internal_Rela *relocs, const Elf_Internal_Rela *rel) @@ -8122,7 +8122,7 @@ mips_elf_rel_relocation_p (bfd *abfd, asection *sec, fact that the INPUT_SECTION's REL_HDR is read before RELA_HDR. */ rel_hdr = elf_section_data (sec)->rel.hdr; if (rel_hdr == NULL) - return FALSE; + return false; bed = get_elf_backend_data (abfd); return ((size_t) (rel - relocs) < NUM_SHDR_ENTRIES (rel_hdr) * bed->s->int_rels_per_ext_rel); @@ -8145,9 +8145,9 @@ mips_elf_read_rel_addend (bfd *abfd, const Elf_Internal_Rela *rel, location = contents + rel->r_offset; /* Get the addend, which is stored in the input file. */ - _bfd_mips_elf_reloc_unshuffle (abfd, r_type, FALSE, location); + _bfd_mips_elf_reloc_unshuffle (abfd, r_type, false, location); bytes = mips_elf_obtain_contents (howto, rel, abfd, contents); - _bfd_mips_elf_reloc_shuffle (abfd, r_type, FALSE, location); + _bfd_mips_elf_reloc_shuffle (abfd, r_type, false, location); addend = bytes & howto->src_mask; @@ -8165,7 +8165,7 @@ mips_elf_read_rel_addend (bfd *abfd, const Elf_Internal_Rela *rel, or false if the LO16 could not be found. RELEND is the exclusive upper bound on the relocations for REL's section. */ -static bfd_boolean +static bool mips_elf_add_lo16_rel_addend (bfd *abfd, const Elf_Internal_Rela *rel, const Elf_Internal_Rela *relend, @@ -8205,10 +8205,10 @@ mips_elf_add_lo16_rel_addend (bfd *abfd, the ABI but not immediately harmful. */ lo16_relocation = mips_elf_next_relocation (abfd, lo16_type, rel, relend); if (lo16_relocation == NULL) - return FALSE; + return false; /* Obtain the addend kept there. */ - lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, lo16_type, FALSE); + lo16_howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, lo16_type, false); l = mips_elf_read_rel_addend (abfd, lo16_relocation, lo16_howto, contents); l <<= lo16_howto->rightshift; @@ -8216,24 +8216,24 @@ mips_elf_add_lo16_rel_addend (bfd *abfd, *addend <<= 16; *addend += l; - return TRUE; + return true; } /* Try to read the contents of section SEC in bfd ABFD. Return true and store the contents in *CONTENTS on success. Assume that *CONTENTS already holds the contents if it is nonull on entry. */ -static bfd_boolean +static bool mips_elf_get_section_contents (bfd *abfd, asection *sec, bfd_byte **contents) { if (*contents) - return TRUE; + return true; /* Get cached copy if it exists. */ if (elf_section_data (sec)->this_hdr.contents != NULL) { *contents = elf_section_data (sec)->this_hdr.contents; - return TRUE; + return true; } return bfd_malloc_and_get_section (abfd, sec, contents); @@ -8262,7 +8262,7 @@ mips_elf_make_plt_record (bfd *abfd) and local GOT entries whose value is zero at static link time will retain their value at load time. */ -static bfd_boolean +static bool mips_elf_define_absolute_zero (bfd *abfd, struct bfd_link_info *info, struct mips_elf_link_hash_table *htab, unsigned int r_type) @@ -8280,8 +8280,8 @@ mips_elf_define_absolute_zero (bfd *abfd, struct bfd_link_info *info, hzero.bh = NULL; if (!_bfd_generic_link_add_one_symbol (info, abfd, "__gnu_absolute_zero", BSF_GLOBAL, bfd_abs_section_ptr, 0, - NULL, FALSE, FALSE, &hzero.bh)) - return FALSE; + NULL, false, false, &hzero.bh)) + return false; BFD_ASSERT (hzero.bh != NULL); hzero.eh->size = 0; @@ -8290,19 +8290,19 @@ mips_elf_define_absolute_zero (bfd *abfd, struct bfd_link_info *info, hzero.eh->def_regular = 1; hzero.eh->non_elf = 0; - if (!mips_elf_record_global_got_symbol (hzero.eh, abfd, info, TRUE, r_type)) - return FALSE; + if (!mips_elf_record_global_got_symbol (hzero.eh, abfd, info, true, r_type)) + return false; - htab->use_absolute_zero = TRUE; + htab->use_absolute_zero = true; - return TRUE; + return true; } /* Look through the relocs for a section during the first phase, and allocate space in the global offset table and record the need for standard MIPS and compressed procedure linkage table entries. */ -bfd_boolean +bool _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -8321,7 +8321,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, reloc_howto_type *howto; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = mips_elf_hash_table (info); BFD_ASSERT (htab != NULL); @@ -8353,7 +8353,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, " stub section `%s'"), abfd, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (r_symndx < extsymoff @@ -8379,7 +8379,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory); if (sec_relocs == NULL) - return FALSE; + return false; rend = sec_relocs + o->reloc_count; for (r = sec_relocs; r < rend; r++) @@ -8402,7 +8402,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, can easily discard it by setting the SEC_EXCLUDE flag. */ sec->flags |= SEC_EXCLUDE; - return TRUE; + return true; } /* Record this stub in an array of local symbol stubs for @@ -8420,7 +8420,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, amt = symcount * sizeof (asection *); n = bfd_zalloc (abfd, amt); if (n == NULL) - return FALSE; + return false; mips_elf_tdata (abfd)->local_stubs = n; } @@ -8453,12 +8453,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (h->fn_stub != NULL) { sec->flags |= SEC_EXCLUDE; - return TRUE; + return true; } sec->flags |= SEC_KEEP; h->fn_stub = sec; - mips_elf_hash_table (info)->mips16_stubs_seen = TRUE; + mips_elf_hash_table (info)->mips16_stubs_seen = true; } } else if (CALL_STUB_P (name) || CALL_FP_STUB_P (name)) @@ -8479,7 +8479,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, " stub section `%s'"), abfd, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (r_symndx < extsymoff @@ -8505,7 +8505,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory); if (sec_relocs == NULL) - return FALSE; + return false; rend = sec_relocs + o->reloc_count; for (r = sec_relocs; r < rend; r++) @@ -8528,7 +8528,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, can easily discard it by setting the SEC_EXCLUDE flag. */ sec->flags |= SEC_EXCLUDE; - return TRUE; + return true; } /* Record this stub in an array of local symbol call_stubs for @@ -8546,7 +8546,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, amt = symcount * sizeof (asection *); n = bfd_zalloc (abfd, amt); if (n == NULL) - return FALSE; + return false; mips_elf_tdata (abfd)->local_call_stubs = n; } @@ -8578,12 +8578,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (*loc != NULL) { sec->flags |= SEC_EXCLUDE; - return TRUE; + return true; } sec->flags |= SEC_KEEP; *loc = sec; - mips_elf_hash_table (info)->mips16_stubs_seen = TRUE; + mips_elf_hash_table (info)->mips16_stubs_seen = true; } } @@ -8594,9 +8594,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, unsigned long r_symndx; unsigned int r_type; struct elf_link_hash_entry *h; - bfd_boolean can_make_dynamic_p; - bfd_boolean call_reloc_p; - bfd_boolean constrain_symbol_p; + bool can_make_dynamic_p; + bool call_reloc_p; + bool constrain_symbol_p; r_symndx = ELF_R_SYM (abfd, rel->r_info); r_type = ELF_R_TYPE (abfd, rel->r_info); @@ -8610,7 +8610,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, (_("%pB: malformed reloc detected for section %s"), abfd, name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -8625,15 +8625,15 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* Set CAN_MAKE_DYNAMIC_P to true if we can convert this relocation into a dynamic one. */ - can_make_dynamic_p = FALSE; + can_make_dynamic_p = false; /* Set CALL_RELOC_P to true if the relocation is for a call, and if pointer equality therefore doesn't matter. */ - call_reloc_p = FALSE; + call_reloc_p = false; /* Set CONSTRAIN_SYMBOL_P if we need to take the relocation into account when deciding how to define the symbol. */ - constrain_symbol_p = TRUE; + constrain_symbol_p = true; switch (r_type) { @@ -8644,7 +8644,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_MICROMIPS_CALL16: case R_MICROMIPS_CALL_HI16: case R_MICROMIPS_CALL_LO16: - call_reloc_p = TRUE; + call_reloc_p = true; /* Fall through. */ case R_MIPS_GOT16: @@ -8669,18 +8669,18 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, && !htab->use_absolute_zero && UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)) { - bfd_boolean rel_reloc; + bool rel_reloc; if (!mips_elf_get_section_contents (abfd, sec, &contents)) - return FALSE; + return false; rel_reloc = mips_elf_rel_relocation_p (abfd, sec, relocs, rel); howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, !rel_reloc); if (!mips_elf_nullify_got_load (abfd, contents, rel, howto, - FALSE)) + false)) if (!mips_elf_define_absolute_zero (abfd, info, htab, r_type)) - return FALSE; + return false; } /* Fall through. */ @@ -8700,7 +8700,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; if (!mips_elf_create_got_section (dynobj, info)) - return FALSE; + return false; if (htab->root.target_os == is_vxworks && !bfd_link_pic (info)) { @@ -8709,9 +8709,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, (_("%pB: GOT reloc at %#" PRIx64 " not expected in executables"), abfd, (uint64_t) rel->r_offset); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - can_make_dynamic_p = TRUE; + can_make_dynamic_p = true; break; case R_MIPS_NONE: @@ -8719,7 +8719,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_MICROMIPS_JALR: /* These relocations have empty fields and are purely there to provide link information. The symbol value doesn't matter. */ - constrain_symbol_p = FALSE; + constrain_symbol_p = false; break; case R_MIPS_GPREL16: @@ -8731,7 +8731,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, important for the GP setup sequence in NewABI code, which always resolves to a local function even if other relocations against the symbol wouldn't. */ - constrain_symbol_p = FALSE; + constrain_symbol_p = false; break; case R_MIPS_32: @@ -8755,7 +8755,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, && MIPS_ELF_READONLY_SECTION (sec)))) && (sec->flags & SEC_ALLOC) != 0) { - can_make_dynamic_p = TRUE; + can_make_dynamic_p = true; if (dynobj == NULL) elf_hash_table (info)->dynobj = dynobj = abfd; } @@ -8772,7 +8772,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_MICROMIPS_PC10_S1: case R_MICROMIPS_PC16_S1: case R_MICROMIPS_PC23_S2: - call_reloc_p = TRUE; + call_reloc_p = true; break; } @@ -8792,7 +8792,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, to a .got.plt entry instead of a normal .got entry. */ if (htab->root.target_os != is_vxworks && (!can_make_dynamic_p || !call_reloc_p)) - ((struct mips_elf_link_hash_entry *) h)->no_fn_stub = TRUE; + ((struct mips_elf_link_hash_entry *) h)->no_fn_stub = true; } /* Relocations against the special VxWorks __GOTT_BASE__ and @@ -8802,9 +8802,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { if (sreloc == NULL) { - sreloc = mips_elf_rel_dyn_section (info, TRUE); + sreloc = mips_elf_rel_dyn_section (info, true); if (sreloc == NULL) - return FALSE; + return false; } mips_elf_allocate_dynamic_relocations (dynobj, info, 1); if (MIPS_ELF_READONLY_SECTION (sec)) @@ -8829,13 +8829,13 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, R_MIPS_GOT_LO16 or R_MIPS_CALL_LO16. */ if (!mips_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, info, r_type)) - return FALSE; + return false; } if (h != NULL && mips_elf_relocation_needs_la25_stub (abfd, r_type, ELF_ST_IS_MIPS16 (h->other))) - ((struct mips_elf_link_hash_entry *) h)->has_nonpic_branches = TRUE; + ((struct mips_elf_link_hash_entry *) h)->has_nonpic_branches = true; switch (r_type) { @@ -8849,7 +8849,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, (_("%pB: CALL16 reloc at %#" PRIx64 " not against global symbol"), abfd, (uint64_t) rel->r_offset); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Fall through. */ @@ -8862,9 +8862,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* Make sure there is room in the regular GOT to hold the function's address. We may eliminate it in favour of a .got.plt entry later; see mips_elf_count_got_symbols. */ - if (!mips_elf_record_global_got_symbol (h, abfd, info, TRUE, + if (!mips_elf_record_global_got_symbol (h, abfd, info, true, r_type)) - return FALSE; + return false; /* We need a stub, not a plt entry for the undefined function. But we record it as if it needs plt. See @@ -8892,8 +8892,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (mips_elf_rel_relocation_p (abfd, sec, relocs, rel)) { if (!mips_elf_get_section_contents (abfd, sec, &contents)) - return FALSE; - howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, FALSE); + return false; + howto = MIPS_ELF_RTYPE_TO_HOWTO (abfd, r_type, false); addend = mips_elf_read_rel_addend (abfd, rel, howto, contents); if (got16_reloc_p (r_type)) @@ -8906,7 +8906,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, addend = rel->r_addend; if (!mips_elf_record_got_page_ref (info, abfd, r_symndx, h, addend)) - return FALSE; + return false; if (h) { @@ -8927,8 +8927,8 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_MIPS_GOT_DISP: case R_MICROMIPS_GOT_DISP: if (h && !mips_elf_record_global_got_symbol (h, abfd, info, - FALSE, r_type)) - return FALSE; + false, r_type)) + return false; break; case R_MIPS_TLS_GOTTPREL: @@ -8956,15 +8956,15 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (h != NULL) { if (!mips_elf_record_global_got_symbol (h, abfd, info, - FALSE, r_type)) - return FALSE; + false, r_type)) + return false; } else { if (!mips_elf_record_local_got_symbol (abfd, r_symndx, rel->r_addend, info, r_type)) - return FALSE; + return false; } break; @@ -8978,9 +8978,9 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { if (sreloc == NULL) { - sreloc = mips_elf_rel_dyn_section (info, TRUE); + sreloc = mips_elf_rel_dyn_section (info, true); if (sreloc == NULL) - return FALSE; + return false; } if (bfd_link_pic (info) && h == NULL) { @@ -9013,7 +9013,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (MIPS_ELF_READONLY_SECTION (sec)) /* We need it to tell the dynamic linker if there are relocations against the text segment. */ - hmips->readonly_reloc = TRUE; + hmips->readonly_reloc = true; } } @@ -9039,14 +9039,14 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, Reconstruct it for later use during GC. */ case R_MIPS_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; /* This relocation describes which C++ vtable entries are actually used. Record for later use during GC. */ case R_MIPS_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; default: @@ -9069,12 +9069,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (h->plt.plist == NULL) h->plt.plist = mips_elf_make_plt_record (abfd); if (h->plt.plist == NULL) - return FALSE; + return false; if (branch_reloc_p (r_type)) - h->plt.plist->need_mips = TRUE; + h->plt.plist->need_mips = true; else - h->plt.plist->need_comp = TRUE; + h->plt.plist->need_comp = true; } /* See if this reloc would need to refer to a MIPS16 hard-float stub, @@ -9088,7 +9088,7 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, struct mips_elf_link_hash_entry *mh; mh = (struct mips_elf_link_hash_entry *) h; - mh->need_fn_stub = TRUE; + mh->need_fn_stub = true; } /* Refuse some position-dependent relocations when creating a @@ -9160,12 +9160,12 @@ _bfd_mips_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Allocate space for global sym dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info = inf; @@ -9182,12 +9182,12 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) /* VxWorks executables are handled elsewhere; we only need to allocate relocations in shared objects. */ if (htab->root.target_os == is_vxworks && !bfd_link_pic (info)) - return TRUE; + return true; /* Ignore indirect symbols. All relocations against such symbols will be redirected to the target symbol. */ if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; /* If this symbol is defined in a dynamic object, or we are creating a shared library, we will need to copy any R_MIPS_32 or @@ -9198,21 +9198,21 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) || (!h->def_regular && !ELF_COMMON_DEF_P (h)) || bfd_link_pic (info))) { - bfd_boolean do_copy = TRUE; + bool do_copy = true; if (h->root.type == bfd_link_hash_undefweak) { /* Do not copy relocations for undefined weak symbols that we are not going to export. */ if (UNDEFWEAK_NO_DYNAMIC_RELOC (info, h)) - do_copy = FALSE; + do_copy = false; /* Make sure undefined weak symbols are output as a dynamic symbol in PIEs. */ else if (h->dynindx == -1 && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } @@ -9230,7 +9230,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { if (hmips->global_got_area > GGA_RELOC_ONLY) hmips->global_got_area = GGA_RELOC_ONLY; - hmips->got_only_for_calls = FALSE; + hmips->got_only_for_calls = false; } mips_elf_allocate_dynamic_relocations @@ -9242,7 +9242,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) } } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -9251,7 +9251,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) change the definition to something the rest of the link can understand. */ -bfd_boolean +bool _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -9280,7 +9280,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, else _bfd_error_handler (_("non-dynamic symbol %s in dynamic symbol table"), h->root.root.string); - return TRUE; + return true; } hmips = (struct mips_elf_link_hash_entry *) h; @@ -9298,7 +9298,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, && !hmips->no_fn_stub) { if (! elf_hash_table (info)->dynamic_sections_created) - return TRUE; + return true; /* If this symbol is not defined in a regular file, then set the symbol to the stub location. This is required to make @@ -9307,9 +9307,9 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!h->def_regular && !bfd_is_abs_section (htab->sstubs->output_section)) { - hmips->needs_lazy_stub = TRUE; + hmips->needs_lazy_stub = true; htab->lazy_stub_count++; - return TRUE; + return true; } } /* As above, VxWorks requires PLT entries for externally-defined @@ -9329,8 +9329,8 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, && !(ELF_ST_VISIBILITY (h->other) != STV_DEFAULT && h->root.type == bfd_link_hash_undefweak)) { - bfd_boolean micromips_p = MICROMIPS_P (info->output_bfd); - bfd_boolean newabi_p = NEWABI_P (info->output_bfd); + bool micromips_p = MICROMIPS_P (info->output_bfd); + bool newabi_p = NEWABI_P (info->output_bfd); /* If this is the first symbol to need a PLT entry, then make some basic setup. Also work out PLT entry sizes. We'll need them @@ -9346,13 +9346,13 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, lazily to avoid pessimizing traditional objects. */ if (htab->root.target_os != is_vxworks && !bfd_set_section_alignment (htab->root.splt, 5)) - return FALSE; + return false; /* Make sure that .got.plt is word-aligned. We do this lazily for the same reason as above. */ if (!bfd_set_section_alignment (htab->root.sgotplt, MIPS_ELF_LOG_FILE_ALIGN (dynobj))) - return FALSE; + return false; /* On non-VxWorks targets, the first two entries in .got.plt are reserved. */ @@ -9404,7 +9404,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (h->plt.plist == NULL) h->plt.plist = mips_elf_make_plt_record (dynobj); if (h->plt.plist == NULL) - return FALSE; + return false; /* There are no defined MIPS16 or microMIPS PLT entries for VxWorks, n32 or n64, so always use a standard entry there. @@ -9419,8 +9419,8 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, || hmips->call_stub || hmips->call_fp_stub) { - h->plt.plist->need_mips = TRUE; - h->plt.plist->need_comp = FALSE; + h->plt.plist->need_mips = true; + h->plt.plist->need_comp = false; } /* Otherwise, if there are no direct calls to the function, we @@ -9432,9 +9432,9 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!h->plt.plist->need_mips && !h->plt.plist->need_comp) { if (micromips_p) - h->plt.plist->need_comp = TRUE; + h->plt.plist->need_comp = true; else - h->plt.plist->need_mips = TRUE; + h->plt.plist->need_mips = true; } if (h->plt.plist->need_mips) @@ -9454,7 +9454,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* If the output file has no definition of the symbol, set the symbol's value to the address of the stub. */ if (!bfd_link_pic (info) && !h->def_regular) - hmips->use_plt_entry = TRUE; + hmips->use_plt_entry = true; /* Make room for the R_MIPS_JUMP_SLOT relocation. */ htab->root.srelplt->size += (htab->root.target_os == is_vxworks @@ -9469,7 +9469,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, dynamic will now refer to the PLT entry instead. */ hmips->possibly_dynamic_relocs = 0; - return TRUE; + return true; } /* If this is a weak symbol, and there is a real definition, the @@ -9481,18 +9481,18 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* Otherwise, there is nothing further to do for symbols defined in regular objects. */ if (h->def_regular) - return TRUE; + return true; /* There's also nothing more to do if we'll convert all relocations against this symbol into dynamic relocations. */ if (!hmips->has_static_relocs) - return TRUE; + return true; /* We're now relying on copy relocations. Complain if we have some that we can't convert. */ @@ -9502,7 +9502,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, "dynamic symbol %s"), h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* We must allocate the symbol in our .dynbss section, which will @@ -9545,7 +9545,7 @@ _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *info, and the input sections have been assigned to output sections. We check for any mips16 stub sections that we can discard. */ -bfd_boolean +bool _bfd_mips_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -9574,18 +9574,18 @@ _bfd_mips_elf_always_size_sections (bfd *output_bfd, hti.info = info; hti.output_bfd = output_bfd; - hti.error = FALSE; + hti.error = false; mips_elf_link_hash_traverse (mips_elf_hash_table (info), mips_elf_check_symbols, &hti); if (hti.error) - return FALSE; + return false; - return TRUE; + return true; } /* If the link uses a GOT, lay it out and work out its size. */ -static bfd_boolean +static bool mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; @@ -9602,7 +9602,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info) s = htab->root.sgot; if (s == NULL) - return TRUE; + return true; dynobj = elf_hash_table (info)->dynobj; g = htab->got_info; @@ -9622,7 +9622,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info) mips_elf_link_hash_traverse (htab, mips_elf_count_got_symbols, info); if (!mips_elf_resolve_final_got_entries (info, g)) - return FALSE; + return false; /* Calculate the total loadable size of the output. That will give us the maximum number of GOT_PAGE entries @@ -9671,14 +9671,14 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info) && s->size > MIPS_ELF_GOT_MAX_SIZE (info)) { if (!mips_elf_multi_got (output_bfd, info, s, page_gotno)) - return FALSE; + return false; } else { /* Record that all bfds use G. This also has the effect of freeing the per-bfd GOTs, which we no longer need. */ for (ibfd = info->input_bfds; ibfd; ibfd = ibfd->link.next) - if (mips_elf_bfd_got (ibfd, FALSE)) + if (mips_elf_bfd_got (ibfd, false)) mips_elf_replace_bfd_got (ibfd, g); mips_elf_replace_bfd_got (output_bfd, g); @@ -9689,7 +9689,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info) tga.value = MIPS_ELF_GOT_SIZE (output_bfd); htab_traverse (g->got_entries, mips_elf_initialize_tls_index, &tga); if (!tga.g) - return FALSE; + return false; BFD_ASSERT (g->tls_assigned_gotno == g->global_gotno + g->local_gotno + g->tls_gotno); @@ -9702,7 +9702,7 @@ mips_elf_lay_out_got (bfd *output_bfd, struct bfd_link_info *info) mips_elf_allocate_dynamic_relocations (dynobj, info, g->relocs); } - return TRUE; + return true; } /* Estimate the size of the .MIPS.stubs section. */ @@ -9755,7 +9755,7 @@ mips_elf_estimate_stub_size (bfd *output_bfd, struct bfd_link_info *info) mips_htab_traverse_info. If H needs a traditional MIPS lazy-binding stub, allocate an entry in the stubs section. */ -static bfd_boolean +static bool mips_elf_allocate_lazy_stub (struct mips_elf_link_hash_entry *h, void *data) { struct mips_htab_traverse_info *hti = data; @@ -9770,7 +9770,7 @@ mips_elf_allocate_lazy_stub (struct mips_elf_link_hash_entry *h, void *data) if (h->needs_lazy_stub) { - bfd_boolean micromips_p = MICROMIPS_P (output_bfd); + bool micromips_p = MICROMIPS_P (output_bfd); unsigned int other = micromips_p ? STO_MICROMIPS : 0; bfd_vma isa_bit = micromips_p; @@ -9779,8 +9779,8 @@ mips_elf_allocate_lazy_stub (struct mips_elf_link_hash_entry *h, void *data) h->root.plt.plist = mips_elf_make_plt_record (htab->sstubs->owner); if (h->root.plt.plist == NULL) { - hti->error = TRUE; - return FALSE; + hti->error = true; + return false; } h->root.root.u.def.section = htab->sstubs; h->root.root.u.def.value = htab->sstubs->size + isa_bit; @@ -9788,17 +9788,17 @@ mips_elf_allocate_lazy_stub (struct mips_elf_link_hash_entry *h, void *data) h->root.other = other; htab->sstubs->size += htab->function_stub_size; } - return TRUE; + return true; } /* Allocate offsets in the stubs section to each symbol that needs one. Set the final size of the .MIPS.stub section. */ -static bfd_boolean +static bool mips_elf_lay_out_lazy_stubs (struct bfd_link_info *info) { bfd *output_bfd = info->output_bfd; - bfd_boolean micromips_p = MICROMIPS_P (output_bfd); + bool micromips_p = MICROMIPS_P (output_bfd); unsigned int other = micromips_p ? STO_MICROMIPS : 0; bfd_vma isa_bit = micromips_p; struct mips_elf_link_hash_table *htab; @@ -9810,15 +9810,15 @@ mips_elf_lay_out_lazy_stubs (struct bfd_link_info *info) BFD_ASSERT (htab != NULL); if (htab->lazy_stub_count == 0) - return TRUE; + return true; htab->sstubs->size = 0; hti.info = info; hti.output_bfd = output_bfd; - hti.error = FALSE; + hti.error = false; mips_elf_link_hash_traverse (htab, mips_elf_allocate_lazy_stub, &hti); if (hti.error) - return FALSE; + return false; htab->sstubs->size += htab->function_stub_size; BFD_ASSERT (htab->sstubs->size == htab->lazy_stub_count * htab->function_stub_size); @@ -9827,12 +9827,12 @@ mips_elf_lay_out_lazy_stubs (struct bfd_link_info *info) BFD_ASSERT (dynobj != NULL); h = _bfd_elf_define_linkage_sym (dynobj, info, htab->sstubs, "_MIPS_STUBS_"); if (h == NULL) - return FALSE; + return false; h->root.u.def.value = isa_bit; h->other = other; h->type = STT_FUNC; - return TRUE; + return true; } /* A mips_elf_link_hash_traverse callback for which DATA points to a @@ -9840,11 +9840,11 @@ mips_elf_lay_out_lazy_stubs (struct bfd_link_info *info) of the symbol, then set the entry in the symbol table now. Prefer a standard MIPS PLT entry. */ -static bfd_boolean +static bool mips_elf_set_plt_sym_value (struct mips_elf_link_hash_entry *h, void *data) { struct bfd_link_info *info = data; - bfd_boolean micromips_p = MICROMIPS_P (info->output_bfd); + bool micromips_p = MICROMIPS_P (info->output_bfd); struct mips_elf_link_hash_table *htab; unsigned int other; bfd_vma isa_bit; @@ -9884,18 +9884,18 @@ mips_elf_set_plt_sym_value (struct mips_elf_link_hash_entry *h, void *data) h->root.other = other; } - return TRUE; + return true; } /* Set the sizes of the dynamic sections. */ -bfd_boolean +bool _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; asection *s, *sreldyn; - bfd_boolean reltext; + bool reltext; struct mips_elf_link_hash_table *htab; htab = mips_elf_hash_table (info); @@ -9930,7 +9930,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, haven't already in _bfd_elf_create_dynamic_sections. */ if (htab->root.splt && htab->plt_mips_offset + htab->plt_comp_offset != 0) { - bfd_boolean micromips_p = (MICROMIPS_P (output_bfd) + bool micromips_p = (MICROMIPS_P (output_bfd) && !htab->plt_mips_offset); unsigned int other = micromips_p ? STO_MICROMIPS : 0; bfd_vma isa_bit = micromips_p; @@ -9972,7 +9972,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, "_PROCEDURE_LINKAGE_TABLE_"); htab->root.hplt = h; if (h == NULL) - return FALSE; + return false; } h = htab->root.hplt; @@ -9988,14 +9988,14 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, mips_elf_estimate_stub_size (output_bfd, info); if (!mips_elf_lay_out_got (output_bfd, info)) - return FALSE; + return false; mips_elf_lay_out_lazy_stubs (info); /* The check_relocs and adjust_dynamic_symbol entry points have determined the sizes of the various dynamic sections. Allocate memory for them. */ - reltext = FALSE; + reltext = false; for (s = dynobj->sections; s != NULL; s = s->next) { const char *name; @@ -10026,7 +10026,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, && (target->flags & SEC_READONLY) != 0 && (target->flags & SEC_ALLOC) != 0) || strcmp (outname, MIPS_ELF_REL_DYN_NAME (info)) == 0) - reltext = TRUE; + reltext = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -10088,7 +10088,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, if (s->contents == NULL) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } } @@ -10105,18 +10105,18 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, may only look at the first one they see. */ if (!bfd_link_pic (info) && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP, 0)) - return FALSE; + return false; if (bfd_link_executable (info) && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_MAP_REL, 0)) - return FALSE; + return false; /* The DT_DEBUG entry may be filled in by the dynamic linker and used by the debugger. */ if (bfd_link_executable (info) && !SGI_COMPAT (output_bfd) && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_DEBUG, 0)) - return FALSE; + return false; if (reltext && (SGI_COMPAT (output_bfd) @@ -10126,7 +10126,7 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, if ((info->flags & DF_TEXTREL) != 0) { if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_TEXTREL, 0)) - return FALSE; + return false; /* Clear the DF_TEXTREL flag. It will be set again if we write out an actual text relocation; we may not, because @@ -10136,9 +10136,9 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, } if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTGOT, 0)) - return FALSE; + return false; - sreldyn = mips_elf_rel_dyn_section (info, FALSE); + sreldyn = mips_elf_rel_dyn_section (info, false); if (htab->root.target_os == is_vxworks) { /* VxWorks uses .rela.dyn instead of .rel.dyn. It does not @@ -10146,13 +10146,13 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, if (sreldyn && sreldyn->size > 0) { if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELA, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELASZ, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELAENT, 0)) - return FALSE; + return false; } } else @@ -10161,70 +10161,70 @@ _bfd_mips_elf_size_dynamic_sections (bfd *output_bfd, && !bfd_is_abs_section (sreldyn->output_section)) { if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_REL, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELSZ, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_RELENT, 0)) - return FALSE; + return false; } if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_RLD_VERSION, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_FLAGS, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_BASE_ADDRESS, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_LOCAL_GOTNO, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_SYMTABNO, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_UNREFEXTNO, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_GOTSYM, 0)) - return FALSE; + return false; if (info->emit_gnu_hash && ! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_XHASH, 0)) - return FALSE; + return false; if (IRIX_COMPAT (dynobj) == ict_irix5 && ! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_HIPAGENO, 0)) - return FALSE; + return false; if (IRIX_COMPAT (dynobj) == ict_irix6 && (bfd_get_section_by_name (output_bfd, MIPS_ELF_OPTIONS_SECTION_NAME (dynobj))) && !MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_OPTIONS, 0)) - return FALSE; + return false; } if (htab->root.splt->size > 0) { if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTREL, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_JMPREL, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_PLTRELSZ, 0)) - return FALSE; + return false; if (! MIPS_ELF_ADD_DYNAMIC_ENTRY (info, DT_MIPS_PLTGOT, 0)) - return FALSE; + return false; } if (htab->root.target_os == is_vxworks && !elf_vxworks_add_dynamic_entries (output_bfd, info)) - return FALSE; + return false; } - return TRUE; + return true; } /* REL is a relocation in INPUT_BFD that is being copied to OUTPUT_BFD. @@ -10290,7 +10290,7 @@ mips_reloc_against_discarded_section (bfd *output_bfd, bfd *input_bfd, asection *input_section, Elf_Internal_Rela **rel, const Elf_Internal_Rela **relend, - bfd_boolean rel_reloc, + bool rel_reloc, reloc_howto_type *howto, bfd_byte *contents) { @@ -10329,7 +10329,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, Elf_Internal_Rela *rel; const Elf_Internal_Rela *relend; bfd_vma addend = 0; - bfd_boolean use_saved_addend_p = FALSE; + bool use_saved_addend_p = false; relend = relocs + input_section->reloc_count; for (rel = relocs; rel < relend; ++rel) @@ -10337,17 +10337,17 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, const char *name; bfd_vma value = 0; reloc_howto_type *howto; - bfd_boolean cross_mode_jump_p = FALSE; + bool cross_mode_jump_p = false; /* TRUE if the relocation is a RELA relocation, rather than a REL relocation. */ - bfd_boolean rela_relocation_p = TRUE; + bool rela_relocation_p = true; unsigned int r_type = ELF_R_TYPE (output_bfd, rel->r_info); const char *msg; unsigned long r_symndx; asection *sec; Elf_Internal_Shdr *symtab_hdr; struct elf_link_hash_entry *h; - bfd_boolean rel_reloc; + bool rel_reloc; rel_reloc = (NEWABI_P (input_bfd) && mips_elf_rel_relocation_p (input_bfd, input_section, @@ -10396,7 +10396,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, space. Thus, when they use an R_MIPS_64 they mean what is usually meant by R_MIPS_32, with the exception that the stored value is sign-extended to 64 bits. */ - howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, R_MIPS_32, FALSE); + howto = MIPS_ELF_RTYPE_TO_HOWTO (input_bfd, R_MIPS_32, false); /* On big-endian systems, we need to lie about the position of the reloc. */ @@ -10413,7 +10413,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (mips_elf_rel_relocation_p (input_bfd, input_section, relocs, rel)) { - rela_relocation_p = FALSE; + rela_relocation_p = false; addend = mips_elf_read_rel_addend (input_bfd, rel, howto, contents); if (hi16_reloc_p (r_type) @@ -10512,8 +10512,8 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (! mips_elf_perform_relocation (info, howto, rel, addend, input_bfd, input_section, - contents, FALSE)) - return FALSE; + contents, false)) + return false; } /* Go on to the next relocation. */ @@ -10527,9 +10527,9 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (rel + 1 < relend && rel->r_offset == rel[1].r_offset && ELF_R_TYPE (input_bfd, rel[1].r_info) != R_MIPS_NONE) - use_saved_addend_p = TRUE; + use_saved_addend_p = true; else - use_saved_addend_p = FALSE; + use_saved_addend_p = false; /* Figure out what value we are supposed to relocate. */ switch (mips_elf_calculate_relocation (output_bfd, input_bfd, @@ -10554,7 +10554,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, msg = _("internal error: unsupported relocation error"); info->callbacks->warning (info, msg, name, input_bfd, input_section, rel->r_offset); - return FALSE; + return false; case bfd_reloc_overflow: if (use_saved_addend_p) @@ -10575,7 +10575,7 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, msg = _("small-data section exceeds 64KB;" " lower small-data size limit (see option -G)"); - htab->small_data_overflow_reported = TRUE; + htab->small_data_overflow_reported = true; (*info->callbacks->einfo) ("%P: %s\n", msg); } (*info->callbacks->reloc_overflow) @@ -10673,10 +10673,10 @@ _bfd_mips_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (! mips_elf_perform_relocation (info, howto, rel, value, input_bfd, input_section, contents, cross_mode_jump_p)) - return FALSE; + return false; } - return TRUE; + return true; } /* A function that iterates over each entry in la25_stubs and fills @@ -10707,8 +10707,8 @@ mips_elf_create_la25_stub (void **slot, void *data) loc = bfd_malloc (s->size); if (loc == NULL) { - hti->error = TRUE; - return FALSE; + hti->error = true; + return false; } s->contents = loc; } @@ -10786,7 +10786,7 @@ mips_elf_create_la25_stub (void **slot, void *data) bfd_put_32 (hti->output_bfd, 0, loc + 12); } } - return TRUE; + return true; } /* If NAME is one of the special IRIX6 symbols defined by the linker, @@ -10842,7 +10842,7 @@ mips_elf_irix6_finish_dynamic_symbol (bfd *abfd ATTRIBUTE_UNUSED, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -bfd_boolean +bool _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -10908,7 +10908,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, htab->root.sgotplt->output_section, (int64_t) got_address); bfd_set_error (bfd_error_no_error); - return FALSE; + return false; } /* Initially point the .got.plt entry at the PLT header. */ @@ -11024,7 +11024,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, (int64_t) gotpc_offset, htab->root.splt->output_section); bfd_set_error (bfd_error_no_error); - return FALSE; + return false; } bfd_put_16 (output_bfd, plt_entry[0] | ((gotpc_offset >> 18) & 0x7f), loc); @@ -11058,7 +11058,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, if (h->plt.plist != NULL && h->plt.plist->stub_offset != MINUS_ONE) { /* We've decided to create a lazy-binding stub. */ - bfd_boolean micromips_p = MICROMIPS_P (output_bfd); + bool micromips_p = MICROMIPS_P (output_bfd); unsigned int other = micromips_p ? STO_MICROMIPS : 0; bfd_vma stub_size = htab->function_stub_size; bfd_byte stub[MIPS_FUNCTION_STUB_BIG_SIZE]; @@ -11082,7 +11082,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, sign extension at runtime in the stub, resulting in a negative index value. */ if (h->dynindx & ~0x7fffffff) - return FALSE; + return false; /* Fill the stub. */ if (micromips_p) @@ -11270,7 +11270,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, if (! (mips_elf_create_dynamic_relocation (output_bfd, info, rel, e.d.h, NULL, sym->st_value, &entry, sgot))) - return FALSE; + return false; } else entry = sym->st_value; @@ -11326,7 +11326,7 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, BFD_ASSERT (h->dynindx != -1); BFD_ASSERT (htab->use_plts_and_copy_relocs); - s = mips_elf_rel_dyn_section (info, FALSE); + s = mips_elf_rel_dyn_section (info, false); symval = (h->root.u.def.section->output_section->vma + h->root.u.def.section->output_offset + h->root.u.def.value); @@ -11351,12 +11351,12 @@ _bfd_mips_elf_finish_dynamic_symbol (bfd *output_bfd, sym->st_other -= STO_MICROMIPS; } - return TRUE; + return true; } /* Likewise, for VxWorks. */ -bfd_boolean +bool _bfd_mips_vxworks_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -11493,7 +11493,7 @@ _bfd_mips_vxworks_finish_dynamic_symbol (bfd *output_bfd, MIPS_ELF_PUT_WORD (output_bfd, sym->st_value, sgot->contents + offset); /* Add a dynamic relocation for it. */ - s = mips_elf_rel_dyn_section (info, FALSE); + s = mips_elf_rel_dyn_section (info, false); loc = s->contents + (s->reloc_count++ * sizeof (Elf32_External_Rela)); outrel.r_offset = (sgot->output_section->vma + sgot->output_offset @@ -11530,12 +11530,12 @@ _bfd_mips_vxworks_finish_dynamic_symbol (bfd *output_bfd, if (ELF_ST_IS_COMPRESSED (sym->st_other)) sym->st_value &= ~1; - return TRUE; + return true; } /* Write out a plt0 entry to the beginning of .plt. */ -static bfd_boolean +static bool mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info) { bfd_byte *loc; @@ -11582,7 +11582,7 @@ mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info) htab->root.sgotplt->output_section, (int64_t) gotplt_value); bfd_set_error (bfd_error_no_error); - return FALSE; + return false; } /* Install the PLT header. */ @@ -11611,7 +11611,7 @@ mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info) (int64_t) gotpc_offset, htab->root.splt->output_section); bfd_set_error (bfd_error_no_error); - return FALSE; + return false; } bfd_put_16 (output_bfd, plt_entry[0] | ((gotpc_offset >> 18) & 0x7f), loc); @@ -11644,7 +11644,7 @@ mips_finish_exec_plt (bfd *output_bfd, struct bfd_link_info *info) bfd_put_32 (output_bfd, plt_entry[7], loc + 28); } - return TRUE; + return true; } /* Install the PLT header for a VxWorks executable and finalize the @@ -11743,7 +11743,7 @@ mips_vxworks_finish_shared_plt (bfd *output_bfd, struct bfd_link_info *info) /* Finish up the dynamic sections. */ -bfd_boolean +bool _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -11771,7 +11771,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, BFD_ASSERT (sdyn != NULL); BFD_ASSERT (gg != NULL); - g = mips_elf_bfd_got (output_bfd, FALSE); + g = mips_elf_bfd_got (output_bfd, false); BFD_ASSERT (g != NULL); for (b = sdyn->contents; @@ -11782,13 +11782,13 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, const char *name; size_t elemsize; asection *s; - bfd_boolean swap_out_p; + bool swap_out_p; /* Read in the current dynamic entry. */ (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn); /* Assume that we're going to modify it and write it out. */ - swap_out_p = TRUE; + swap_out_p = true; switch (dyn.d_tag) { @@ -11835,12 +11835,12 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, case DT_MIPS_ICHECKSUM: /* XXX FIXME: */ - swap_out_p = FALSE; + swap_out_p = false; break; case DT_MIPS_IVERSION: /* XXX FIXME: */ - swap_out_p = FALSE; + swap_out_p = false; break; case DT_MIPS_BASE_ADDRESS: @@ -11893,7 +11893,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, if (!h) { dyn_to_skip = MIPS_ELF_DYN_SIZE (dynobj); - swap_out_p = FALSE; + swap_out_p = false; break; } s = h->root.u.def.section; @@ -11913,7 +11913,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, if (!h) { dyn_to_skip = MIPS_ELF_DYN_SIZE (dynobj); - swap_out_p = FALSE; + swap_out_p = false; break; } s = h->root.u.def.section; @@ -11959,7 +11959,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, if (!(info->flags & DF_TEXTREL)) { dyn_to_skip = MIPS_ELF_DYN_SIZE (dynobj); - swap_out_p = FALSE; + swap_out_p = false; } break; @@ -11969,7 +11969,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, if (!(info->flags & DF_TEXTREL)) dyn.d_un.d_val &= ~DF_TEXTREL; else - swap_out_p = FALSE; + swap_out_p = false; break; case DT_MIPS_XHASH: @@ -11979,10 +11979,10 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, break; default: - swap_out_p = FALSE; + swap_out_p = false; if (htab->root.target_os == is_vxworks && elf_vxworks_finish_dynamic_entry (output_bfd, &dyn)) - swap_out_p = TRUE; + swap_out_p = true; break; } @@ -12070,7 +12070,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, (output_bfd, info, rel, NULL, bfd_abs_section_ptr, 0, &addend, sgot))) - return FALSE; + return false; BFD_ASSERT (addend == 0); } } @@ -12083,7 +12083,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, if (elf_hash_table (info)->dynamic_sections_created) { bfd_byte *b; - bfd_boolean swap_out_p; + bool swap_out_p; BFD_ASSERT (sdyn != NULL); @@ -12098,7 +12098,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, (*get_elf_backend_data (dynobj)->s->swap_dyn_in) (dynobj, b, &dyn); /* Assume that we're going to modify it and write it out. */ - swap_out_p = TRUE; + swap_out_p = true; switch (dyn.d_tag) { @@ -12107,7 +12107,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, decided not to make. This is for the n64 irix rld, which doesn't seem to apply any relocations if there are trailing null entries. */ - s = mips_elf_rel_dyn_section (info, FALSE); + s = mips_elf_rel_dyn_section (info, false); dyn.d_un.d_val = (s->reloc_count * (ABI_64_P (output_bfd) ? sizeof (Elf64_Mips_External_Rel) @@ -12120,7 +12120,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, break; default: - swap_out_p = FALSE; + swap_out_p = false; break; } @@ -12171,7 +12171,7 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, relocations, using it for VxWorks would be outright harmful. */ if (htab->root.target_os != is_vxworks) { - s = mips_elf_rel_dyn_section (info, FALSE); + s = mips_elf_rel_dyn_section (info, false); if (s != NULL && s->size > (bfd_vma)2 * MIPS_ELF_REL_SIZE (output_bfd)) { @@ -12202,10 +12202,10 @@ _bfd_mips_elf_finish_dynamic_sections (bfd *output_bfd, { BFD_ASSERT (!bfd_link_pic (info)); if (!mips_finish_exec_plt (output_bfd, info)) - return FALSE; + return false; } } - return TRUE; + return true; } @@ -12378,7 +12378,7 @@ mips_set_isa_flags (bfd *abfd) as is. On the other hand, elf-eh-frame.c processing requires .eh_frame relocs to be sorted. */ -bfd_boolean +bool _bfd_mips_elf_sort_relocs_p (asection *sec) { return (sec->flags & SEC_CODE) == 0; @@ -12474,7 +12474,7 @@ _bfd_mips_final_write_processing (bfd *abfd) } } -bfd_boolean +bool _bfd_mips_elf_final_write_processing (bfd *abfd) { _bfd_mips_final_write_processing (abfd); @@ -12523,7 +12523,7 @@ _bfd_mips_elf_additional_program_headers (bfd *abfd, /* Modify the segment map for an IRIX5 executable. */ -bfd_boolean +bool _bfd_mips_elf_modify_segment_map (bfd *abfd, struct bfd_link_info *info) { @@ -12544,7 +12544,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd, amt = sizeof *m; m = bfd_zalloc (abfd, amt); if (m == NULL) - return FALSE; + return false; m->p_type = PT_MIPS_REGINFO; m->count = 1; @@ -12575,7 +12575,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd, amt = sizeof *m; m = bfd_zalloc (abfd, amt); if (m == NULL) - return FALSE; + return false; m->p_type = PT_MIPS_ABIFLAGS; m->count = 1; @@ -12625,7 +12625,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd, options_segment->next = *pm; options_segment->p_type = PT_MIPS_OPTIONS; options_segment->p_flags = PF_R; - options_segment->p_flags_valid = TRUE; + options_segment->p_flags_valid = true; options_segment->count = 1; options_segment->sections[0] = s; *pm = options_segment; @@ -12650,7 +12650,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd, amt = sizeof *m; m = bfd_zalloc (abfd, amt); if (m == NULL) - return FALSE; + return false; m->p_type = PT_MIPS_RTPROC; @@ -12735,7 +12735,7 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd, amt = sizeof *n - sizeof (asection *) + c * sizeof (asection *); n = bfd_zalloc (abfd, amt); if (n == NULL) - return FALSE; + return false; *n = *m; n->count = c; @@ -12784,14 +12784,14 @@ _bfd_mips_elf_modify_segment_map (bfd *abfd, { m = bfd_zalloc (abfd, sizeof (*m)); if (m == NULL) - return FALSE; + return false; m->p_type = PT_NULL; *pm = m; } } - return TRUE; + return true; } /* Return the section that should be marked against GC for a given @@ -12819,7 +12819,7 @@ _bfd_mips_elf_gc_mark_hook (asection *sec, /* Prevent .MIPS.abiflags from being discarded with --gc-sections. */ -bfd_boolean +bool _bfd_mips_elf_gc_mark_extra_sections (struct bfd_link_info *info, elf_gc_mark_hook_fn gc_mark_hook) { @@ -12839,11 +12839,11 @@ _bfd_mips_elf_gc_mark_extra_sections (struct bfd_link_info *info, && MIPS_ELF_ABIFLAGS_SECTION_NAME_P (bfd_section_name (o))) { if (!_bfd_elf_gc_mark (info, o, gc_mark_hook)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Copy data from a MIPS ELF indirect symbol to its direct symbol, @@ -12865,16 +12865,16 @@ _bfd_mips_elf_copy_indirect_symbol (struct bfd_link_info *info, /* Any absolute non-dynamic relocations against an indirect or weak definition will be against the target symbol. */ if (indmips->has_static_relocs) - dirmips->has_static_relocs = TRUE; + dirmips->has_static_relocs = true; if (ind->root.type != bfd_link_hash_indirect) return; dirmips->possibly_dynamic_relocs += indmips->possibly_dynamic_relocs; if (indmips->readonly_reloc) - dirmips->readonly_reloc = TRUE; + dirmips->readonly_reloc = true; if (indmips->no_fn_stub) - dirmips->no_fn_stub = TRUE; + dirmips->no_fn_stub = true; if (indmips->fn_stub) { dirmips->fn_stub = indmips->fn_stub; @@ -12882,8 +12882,8 @@ _bfd_mips_elf_copy_indirect_symbol (struct bfd_link_info *info, } if (indmips->need_fn_stub) { - dirmips->need_fn_stub = TRUE; - indmips->need_fn_stub = FALSE; + dirmips->need_fn_stub = true; + indmips->need_fn_stub = false; } if (indmips->call_stub) { @@ -12900,7 +12900,7 @@ _bfd_mips_elf_copy_indirect_symbol (struct bfd_link_info *info, if (indmips->global_got_area < GGA_NONE) indmips->global_got_area = GGA_NONE; if (indmips->has_nonpic_branches) - dirmips->has_nonpic_branches = TRUE; + dirmips->has_nonpic_branches = true; } /* Take care of the special `__gnu_absolute_zero' symbol and ignore attempts @@ -12911,7 +12911,7 @@ _bfd_mips_elf_copy_indirect_symbol (struct bfd_link_info *info, void _bfd_mips_elf_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *entry, - bfd_boolean force_local) + bool force_local) { struct mips_elf_link_hash_table *htab; @@ -12926,36 +12926,36 @@ _bfd_mips_elf_hide_symbol (struct bfd_link_info *info, #define PDR_SIZE 32 -bfd_boolean +bool _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, struct bfd_link_info *info) { asection *o; - bfd_boolean ret = FALSE; + bool ret = false; unsigned char *tdata; size_t i, skip; o = bfd_get_section_by_name (abfd, ".pdr"); if (! o) - return FALSE; + return false; if (o->size == 0) - return FALSE; + return false; if (o->size % PDR_SIZE != 0) - return FALSE; + return false; if (o->output_section != NULL && bfd_is_abs_section (o->output_section)) - return FALSE; + return false; tdata = bfd_zmalloc (o->size / PDR_SIZE); if (! tdata) - return FALSE; + return false; cookie->rels = _bfd_elf_link_read_relocs (abfd, o, NULL, NULL, info->keep_memory); if (!cookie->rels) { free (tdata); - return FALSE; + return false; } cookie->rel = cookie->rels; @@ -12976,7 +12976,7 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, if (o->rawsize == 0) o->rawsize = o->size; o->size -= skip * PDR_SIZE; - ret = TRUE; + ret = true; } else free (tdata); @@ -12987,15 +12987,15 @@ _bfd_mips_elf_discard_info (bfd *abfd, struct elf_reloc_cookie *cookie, return ret; } -bfd_boolean +bool _bfd_mips_elf_ignore_discarded_relocs (asection *sec) { if (strcmp (sec->name, ".pdr") == 0) - return TRUE; - return FALSE; + return true; + return false; } -bfd_boolean +bool _bfd_mips_elf_write_section (bfd *output_bfd, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, asection *sec, bfd_byte *contents) @@ -13004,10 +13004,10 @@ _bfd_mips_elf_write_section (bfd *output_bfd, int i; if (strcmp (sec->name, ".pdr") != 0) - return FALSE; + return false; if (mips_elf_section_data (sec)->u.tdata == NULL) - return FALSE; + return false; to = contents; end = contents + sec->size; @@ -13023,13 +13023,13 @@ _bfd_mips_elf_write_section (bfd *output_bfd, } bfd_set_section_contents (output_bfd, sec->output_section, contents, sec->output_offset, sec->size); - return TRUE; + return true; } /* microMIPS code retains local labels for linker relaxation. Omit them from output by default for clarity. */ -bfd_boolean +bool _bfd_mips_elf_is_target_special_symbol (bfd *abfd, asymbol *sym) { return _bfd_elf_is_local_label_name (abfd, sym->name); @@ -13044,7 +13044,7 @@ struct mips_elf_find_line struct ecoff_find_line i; }; -bfd_boolean +bool _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, bfd_vma offset, const char **filename_ptr, @@ -13060,7 +13060,7 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, dwarf_debug_sections, &elf_tdata (abfd)->dwarf2_find_line_info) == 1) - return TRUE; + return true; if (_bfd_dwarf1_find_nearest_line (abfd, symbols, section, offset, filename_ptr, functionname_ptr, @@ -13070,7 +13070,7 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, _bfd_elf_find_function (abfd, symbols, section, offset, *filename_ptr ? NULL : filename_ptr, functionname_ptr); - return TRUE; + return true; } msec = bfd_get_section_by_name (abfd, ".mdebug"); @@ -13101,13 +13101,13 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, if (fi == NULL) { msec->flags = origflags; - return FALSE; + return false; } if (! _bfd_mips_elf_read_ecoff_info (abfd, msec, &fi->d)) { msec->flags = origflags; - return FALSE; + return false; } /* Swap in the FDR information. */ @@ -13116,7 +13116,7 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, if (fi->d.fdr == NULL) { msec->flags = origflags; - return FALSE; + return false; } external_fdr_size = swap->external_fdr_size; fdr_ptr = fi->d.fdr; @@ -13141,7 +13141,7 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, line_ptr)) { msec->flags = origflags; - return TRUE; + return true; } msec->flags = origflags; @@ -13154,13 +13154,13 @@ _bfd_mips_elf_find_nearest_line (bfd *abfd, asymbol **symbols, line_ptr, discriminator_ptr); } -bfd_boolean +bool _bfd_mips_elf_find_inliner_info (bfd *abfd, const char **filename_ptr, const char **functionname_ptr, unsigned int *line_ptr) { - bfd_boolean found; + bool found; found = _bfd_dwarf2_find_inliner_info (abfd, filename_ptr, functionname_ptr, line_ptr, & elf_tdata (abfd)->dwarf2_find_line_info); @@ -13172,7 +13172,7 @@ _bfd_mips_elf_find_inliner_info (bfd *abfd, remember the bytes we are writing out, so that we can install the GP value in the section_processing routine. */ -bfd_boolean +bool _bfd_mips_elf_set_section_contents (bfd *abfd, sec_ptr section, const void *location, file_ptr offset, bfd_size_type count) @@ -13186,14 +13186,14 @@ _bfd_mips_elf_set_section_contents (bfd *abfd, sec_ptr section, size_t amt = sizeof (struct bfd_elf_section_data); section->used_by_bfd = bfd_zalloc (abfd, amt); if (elf_section_data (section) == NULL) - return FALSE; + return false; } c = mips_elf_section_data (section)->u.tdata; if (c == NULL) { c = bfd_zalloc (abfd, section->size); if (c == NULL) - return FALSE; + return false; mips_elf_section_data (section)->u.tdata = c; } @@ -13213,7 +13213,7 @@ _bfd_elf_mips_get_relocated_section_contents struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { bfd *input_bfd = link_order->u.indirect.section->owner; @@ -13263,7 +13263,7 @@ _bfd_elf_mips_get_relocated_section_contents lh = 0; else { - h = bfd_hash_lookup (&link_info->hash->table, "_gp", FALSE, FALSE); + h = bfd_hash_lookup (&link_info->hash->table, "_gp", false, false); lh = (struct bfd_link_hash_entry *) h; } lookup: @@ -13329,8 +13329,8 @@ _bfd_elf_mips_get_relocated_section_contents { bfd_vma off; static reloc_howto_type none_howto - = HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, - "unused", FALSE, 0, 0, FALSE); + = HOWTO (0, 0, 0, 0, false, 0, complain_overflow_dont, NULL, + "unused", false, 0, 0, false); off = ((*parent)->address * bfd_octets_per_byte (input_bfd, input_section)); @@ -13378,7 +13378,7 @@ _bfd_elf_mips_get_relocated_section_contents case bfd_reloc_undefined: (*link_info->callbacks->undefined_symbol) (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr), - input_bfd, input_section, (*parent)->address, TRUE); + input_bfd, input_section, (*parent)->address, true); break; case bfd_reloc_dangerous: BFD_ASSERT (error_message != NULL); @@ -13436,7 +13436,7 @@ _bfd_elf_mips_get_relocated_section_contents return NULL; } -static bfd_boolean +static bool mips_elf_relax_delete_bytes (bfd *abfd, asection *sec, bfd_vma addr, int count) { @@ -13503,7 +13503,7 @@ mips_elf_relax_delete_bytes (bfd *abfd, } } - return TRUE; + return true; } @@ -13782,7 +13782,7 @@ check_br32_dslot (bfd *abfd, bfd_byte *ptr) /* If PTR points to a 16-bit branch or jump with a 32-bit delay slot that doesn't fiddle with REG, then return TRUE, otherwise FALSE. */ -static bfd_boolean +static bool check_br16 (bfd *abfd, bfd_byte *ptr, unsigned long reg) { unsigned long opcode; @@ -13797,15 +13797,15 @@ check_br16 (bfd *abfd, bfd_byte *ptr, unsigned long reg) || (MATCH (opcode, jalr_insn_16_bd32) /* JALR16 */ && reg != JR16_REG (opcode) && reg != RA)) - return TRUE; + return true; - return FALSE; + return false; } /* If PTR points to a 32-bit branch or jump that doesn't fiddle with REG, then return TRUE, otherwise FALSE. */ -static bfd_boolean +static bool check_br32 (bfd *abfd, bfd_byte *ptr, unsigned long reg) { unsigned long opcode; @@ -13825,16 +13825,16 @@ check_br32 (bfd *abfd, bfd_byte *ptr, unsigned long reg) || ((MATCH (opcode, jalr_insn_32) || MATCH (opcode, beq_insn_32)) /* JALR, JALR.HB, BEQ, BNE */ && reg != OP32_SREG (opcode) && reg != OP32_TREG (opcode))) - return TRUE; + return true; - return FALSE; + return false; } /* If the instruction encoding at PTR and relocations [INTERNAL_RELOCS, IRELEND) at OFFSET indicate that there must be a compact branch there, then return TRUE, otherwise FALSE. */ -static bfd_boolean +static bool check_relocated_bzc (bfd *abfd, const bfd_byte *ptr, bfd_vma offset, const Elf_Internal_Rela *internal_relocs, const Elf_Internal_Rela *irelend) @@ -13844,14 +13844,14 @@ check_relocated_bzc (bfd *abfd, const bfd_byte *ptr, bfd_vma offset, opcode = bfd_get_micromips_32 (abfd, ptr); if (find_match (opcode, bzc_insns_32) < 0) - return FALSE; + return false; for (irel = internal_relocs; irel < irelend; irel++) if (irel->r_offset == offset && ELF32_R_TYPE (irel->r_info) == R_MICROMIPS_PC16_S1) - return TRUE; + return true; - return FALSE; + return false; } /* Bitsize checking. */ @@ -13860,12 +13860,12 @@ check_relocated_bzc (bfd *abfd, const bfd_byte *ptr, bfd_vma offset, - (1ULL << ((N) - 1))) == (val)) -bfd_boolean +bool _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { - bfd_boolean insn32 = mips_elf_hash_table (link_info)->insn32; + bool insn32 = mips_elf_hash_table (link_info)->insn32; Elf_Internal_Shdr *symtab_hdr; Elf_Internal_Rela *internal_relocs; Elf_Internal_Rela *irel, *irelend; @@ -13873,7 +13873,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, Elf_Internal_Sym *isymbuf = NULL; /* Assume nothing changes. */ - *again = FALSE; + *again = false; /* We don't have to do anything for a relocatable link, if this section does not have relocs, or if this is not a @@ -13883,7 +13883,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, || (sec->flags & SEC_RELOC) == 0 || sec->reloc_count == 0 || (sec->flags & SEC_CODE) == 0) - return TRUE; + return true; symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -13900,7 +13900,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, { unsigned long r_symndx = ELF32_R_SYM (irel->r_info); unsigned int r_type = ELF32_R_TYPE (irel->r_info); - bfd_boolean target_is_micromips_code_p; + bool target_is_micromips_code_p; unsigned long opcode; bfd_vma symval; bfd_vma pcrval; @@ -14020,7 +14020,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, out the offset). */ if (r_type == R_MICROMIPS_HI16 && MATCH (opcode, lui_insn)) { - bfd_boolean bzc = FALSE; + bool bzc = false; unsigned long nextopc; unsigned long reg; bfd_vma offset; @@ -14230,7 +14230,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, && MATCH (opcode, jal_insn_32_bd32)) { unsigned long n32opc; - bfd_boolean relaxed = FALSE; + bool relaxed = false; n32opc = bfd_get_micromips_32 (abfd, ptr + 4); @@ -14239,7 +14239,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, /* Replace delay slot 32-bit NOP with a 16-bit NOP. */ bfd_put_16 (abfd, nop_insn_16.match, ptr + 4); - relaxed = TRUE; + relaxed = true; } else if (find_match (n32opc, move_insns_32) >= 0) { @@ -14250,7 +14250,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, | MOVE16_RS_FIELD (MOVE32_RS (n32opc))), ptr + 4); - relaxed = TRUE; + relaxed = true; } /* Other 32-bit instructions relaxable to 16-bit instructions will be handled here later. */ @@ -14281,7 +14281,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, /* That will change things, so we should relax again. Note that this is not required, and it may be slow. */ - *again = TRUE; + *again = true; } } @@ -14312,7 +14312,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return TRUE; + return true; error_return: if (symtab_hdr->contents != (unsigned char *) isymbuf) @@ -14322,7 +14322,7 @@ _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, if (elf_section_data (sec)->relocs != internal_relocs) free (internal_relocs); - return FALSE; + return false; } /* Create a MIPS ELF linker hash table. */ @@ -14364,7 +14364,7 @@ _bfd_mips_vxworks_link_hash_table_create (bfd *abfd) struct mips_elf_link_hash_table *htab; htab = (struct mips_elf_link_hash_table *) ret; - htab->use_plts_and_copy_relocs = TRUE; + htab->use_plts_and_copy_relocs = true; } return ret; } @@ -14375,7 +14375,7 @@ _bfd_mips_vxworks_link_hash_table_create (bfd *abfd) void _bfd_mips_elf_use_plts_and_copy_relocs (struct bfd_link_info *info) { - mips_elf_hash_table (info)->use_plts_and_copy_relocs = TRUE; + mips_elf_hash_table (info)->use_plts_and_copy_relocs = true; } /* A function that the linker calls to select between all or only @@ -14384,9 +14384,9 @@ _bfd_mips_elf_use_plts_and_copy_relocs (struct bfd_link_info *info) Also record whether we have been configured for a GNU target. */ void -_bfd_mips_elf_linker_flags (struct bfd_link_info *info, bfd_boolean insn32, - bfd_boolean ignore_branch_isa, - bfd_boolean gnu_target) +_bfd_mips_elf_linker_flags (struct bfd_link_info *info, bool insn32, + bool ignore_branch_isa, + bool gnu_target) { mips_elf_hash_table (info)->insn32 = insn32; mips_elf_hash_table (info)->ignore_branch_isa = ignore_branch_isa; @@ -14397,7 +14397,7 @@ _bfd_mips_elf_linker_flags (struct bfd_link_info *info, bfd_boolean insn32, linker generated code for MIPSR6. */ void -_bfd_mips_elf_compact_branches (struct bfd_link_info *info, bfd_boolean on) +_bfd_mips_elf_compact_branches (struct bfd_link_info *info, bool on) { mips_elf_hash_table (info)->compact_branches = on; } @@ -14489,31 +14489,31 @@ static const struct mips_mach_extension mips_mach_extensions[] = /* Return true if bfd machine EXTENSION is an extension of machine BASE. */ -static bfd_boolean +static bool mips_mach_extends_p (unsigned long base, unsigned long extension) { size_t i; if (extension == base) - return TRUE; + return true; if (base == bfd_mach_mipsisa32 && mips_mach_extends_p (bfd_mach_mipsisa64, extension)) - return TRUE; + return true; if (base == bfd_mach_mipsisa32r2 && mips_mach_extends_p (bfd_mach_mipsisa64r2, extension)) - return TRUE; + return true; for (i = 0; i < ARRAY_SIZE (mips_mach_extensions); i++) if (extension == mips_mach_extensions[i].extension) { extension = mips_mach_extensions[i].base; if (extension == base) - return TRUE; + return true; } - return FALSE; + return false; } /* Return the BFD mach for each .MIPS.abiflags ISA Extension. */ @@ -14622,7 +14622,7 @@ update_mips_abiflags_isa (bfd *abfd, Elf_Internal_ABIFlags_v0 *abiflags) /* Return true if the given ELF header flags describe a 32-bit binary. */ -static bfd_boolean +static bool mips_32bit_flags_p (flagword flags) { return ((flags & EF_MIPS_32BITMODE) != 0 @@ -14686,7 +14686,7 @@ infer_mips_abiflags (bfd *abfd, Elf_Internal_ABIFlags_v0* abiflags) the .mdebug sections. We need to merge all instances of these sections together, not write them all out sequentially. */ -bfd_boolean +bool _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) { asection *o; @@ -14723,22 +14723,22 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) /* Sort the dynamic symbols so that those with GOT entries come after those without. */ if (!mips_elf_sort_hash_table (abfd, info)) - return FALSE; + return false; /* Create any scheduled LA25 stubs. */ hti.info = info; hti.output_bfd = abfd; - hti.error = FALSE; + hti.error = false; htab_traverse (htab->la25_stubs, mips_elf_create_la25_stub, &hti); if (hti.error) - return FALSE; + return false; /* Get a value for the GP register. */ if (elf_gp (abfd) == 0) { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, "_gp", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "_gp", false, false, true); if (h != NULL && h->type == bfd_link_hash_defined) elf_gp (abfd) = (h->u.def.value + h->u.def.section->output_section->vma @@ -14746,7 +14746,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) else if (htab->root.target_os == is_vxworks && (h = bfd_link_hash_lookup (info->hash, "_GLOBAL_OFFSET_TABLE_", - FALSE, FALSE, TRUE)) + false, false, true)) && h->type == bfd_link_hash_defined) elf_gp (abfd) = (h->u.def.section->output_section->vma + h->u.def.section->output_offset @@ -14844,7 +14844,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) memset (&ext, 0, sizeof (ext)); if (! bfd_get_section_contents (input_bfd, input_section, &ext, 0, sz)) - return FALSE; + return false; bfd_mips_elf32_swap_reginfo_in (input_bfd, &ext, &sub); @@ -14913,7 +14913,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) mdebug_handle = bfd_ecoff_debug_init (abfd, &debug, swap, info); if (mdebug_handle == NULL) - return FALSE; + return false; esym.jmptbl = 0; esym.cobol_main = 0; @@ -14938,7 +14938,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) esym.asym.value = last; if (!bfd_ecoff_debug_one_external (abfd, &debug, swap, secname[i], &esym)) - return FALSE; + return false; } for (p = o->map_head.link_order; p != NULL; p = p->next) @@ -14978,12 +14978,12 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) ecoff_debug_info structure, so we do that now. */ if (! _bfd_mips_elf_read_ecoff_info (input_bfd, input_section, &input_debug)) - return FALSE; + return false; if (! (bfd_ecoff_debug_accumulate (mdebug_handle, abfd, &debug, swap, input_bfd, &input_debug, input_swap, info))) - return FALSE; + return false; /* Loop through the external symbols. For each one with interesting information, try to find the symbol in @@ -15009,7 +15009,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) name = input_debug.ssext + ext.asym.iss; h = mips_elf_link_hash_lookup (mips_elf_hash_table (info), - name, FALSE, FALSE, TRUE); + name, false, false, true); if (h == NULL || h->esym.ifd != -2) continue; @@ -15055,13 +15055,13 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) flags); if (rtproc_sec == NULL || !bfd_set_section_alignment (rtproc_sec, 4)) - return FALSE; + return false; } if (! mips_elf_create_procedure_table (mdebug_handle, abfd, info, rtproc_sec, &debug)) - return FALSE; + return false; } /* Build the external symbol information. */ @@ -15069,11 +15069,11 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) einfo.info = info; einfo.debug = &debug; einfo.swap = swap; - einfo.failed = FALSE; + einfo.failed = false; mips_elf_link_hash_traverse (mips_elf_hash_table (info), mips_elf_output_extsym, &einfo); if (einfo.failed) - return FALSE; + return false; /* Set the size of the .mdebug section. */ o->size = bfd_ecoff_debug_size (abfd, &debug, swap); @@ -15140,7 +15140,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) /* xgettext:c-format */ (_("%pB: illegal section name `%pA'"), abfd, o); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } /* The linker script always combines .gptab.data and @@ -15164,7 +15164,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) amt = c * sizeof (Elf32_gptab); tab = bfd_malloc (amt); if (tab == NULL) - return FALSE; + return false; tab[0].gt_header.gt_current_g_value = elf_gp_size (abfd); tab[0].gt_header.gt_unused = 0; @@ -15200,7 +15200,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) Elf32_gptab int_gptab; unsigned long val; unsigned long add; - bfd_boolean exact; + bool exact; unsigned int look; if (! (bfd_get_section_contents @@ -15208,7 +15208,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) sizeof (Elf32_External_gptab)))) { free (tab); - return FALSE; + return false; } bfd_mips_elf32_swap_gptab_in (input_bfd, &ext_gptab, @@ -15216,14 +15216,14 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) val = int_gptab.gt_entry.gt_g_value; add = int_gptab.gt_entry.gt_bytes - last; - exact = FALSE; + exact = false; for (look = 1; look < c; look++) { if (tab[look].gt_entry.gt_g_value >= val) tab[look].gt_entry.gt_bytes += add; if (tab[look].gt_entry.gt_g_value == val) - exact = TRUE; + exact = true; } if (! exact) @@ -15237,7 +15237,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (new_tab == NULL) { free (tab); - return FALSE; + return false; } tab = new_tab; tab[c].gt_entry.gt_g_value = val; @@ -15280,7 +15280,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (ext_tab == NULL) { free (tab); - return FALSE; + return false; } for (j = 0; j < c; j++) @@ -15298,7 +15298,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) /* Invoke the regular ELF backend linker to do all the work. */ if (!bfd_elf_final_link (abfd, info)) - return FALSE; + return false; /* Now write out the computed sections. */ @@ -15313,11 +15313,11 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (!mips_elf_tdata (abfd)->abiflags_valid) { infer_mips_abiflags (abfd, abiflags); - mips_elf_tdata (abfd)->abiflags_valid = TRUE; + mips_elf_tdata (abfd)->abiflags_valid = true; } bfd_mips_elf_swap_abiflags_v0_out (abfd, abiflags, &ext); if (! bfd_set_section_contents (abfd, abiflags_sec, &ext, 0, sizeof ext)) - return FALSE; + return false; } if (reginfo_sec != NULL) @@ -15326,7 +15326,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) bfd_mips_elf32_swap_reginfo_out (abfd, ®info, &ext); if (! bfd_set_section_contents (abfd, reginfo_sec, &ext, 0, sizeof ext)) - return FALSE; + return false; } if (mdebug_sec != NULL) @@ -15335,7 +15335,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_ecoff_write_accumulated_debug (mdebug_handle, abfd, &debug, swap, info, mdebug_sec->filepos)) - return FALSE; + return false; bfd_ecoff_debug_free (mdebug_handle, abfd, &debug, swap, info); } @@ -15345,7 +15345,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_set_section_contents (abfd, gptab_data_sec, gptab_data_sec->contents, 0, gptab_data_sec->size)) - return FALSE; + return false; } if (gptab_bss_sec != NULL) @@ -15353,7 +15353,7 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_set_section_contents (abfd, gptab_bss_sec, gptab_bss_sec->contents, 0, gptab_bss_sec->size)) - return FALSE; + return false; } if (SGI_COMPAT (abfd)) @@ -15364,24 +15364,24 @@ _bfd_mips_elf_final_link (bfd *abfd, struct bfd_link_info *info) if (! bfd_set_section_contents (abfd, rtproc_sec, rtproc_sec->contents, 0, rtproc_sec->size)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Merge object file header flags from IBFD into OBFD. Raise an error if there are conflicting settings. */ -static bfd_boolean +static bool mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; struct mips_elf_obj_tdata *out_tdata = mips_elf_tdata (obfd); flagword old_flags; flagword new_flags; - bfd_boolean ok; + bool ok; new_flags = elf_elfheader (ibfd)->e_flags; elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_NOREORDER; @@ -15407,9 +15407,9 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) new_flags |= EF_MIPS_PIC | EF_MIPS_CPIC; if (new_flags == old_flags) - return TRUE; + return true; - ok = TRUE; + ok = true; if (((new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0) != ((old_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) != 0)) @@ -15417,7 +15417,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: warning: linking abicalls files with non-abicalls files"), ibfd); - ok = TRUE; + ok = true; } if (new_flags & (EF_MIPS_PIC | EF_MIPS_CPIC)) @@ -15434,7 +15434,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: linking 32-bit code with 64-bit code"), ibfd); - ok = FALSE; + ok = false; } else if (!mips_mach_extends_p (bfd_get_mach (ibfd), bfd_get_mach (obfd))) { @@ -15468,7 +15468,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) ibfd, bfd_printable_name (ibfd), bfd_printable_name (obfd)); - ok = FALSE; + ok = false; } } @@ -15492,7 +15492,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) ibfd, elf_mips_abi_name (ibfd), elf_mips_abi_name (obfd)); - ok = FALSE; + ok = false; } new_flags &= ~EF_MIPS_ABI; old_flags &= ~EF_MIPS_ABI; @@ -15517,7 +15517,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) ibfd, m16_mis ? "MIPS16" : "microMIPS", m16_mis ? "microMIPS" : "MIPS16"); - ok = FALSE; + ok = false; } elf_elfheader (obfd)->e_flags |= new_flags & EF_MIPS_ARCH_ASE; @@ -15536,7 +15536,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) ? "-mnan=2008" : "-mnan=legacy"), (old_flags & EF_MIPS_NAN2008 ? "-mnan=2008" : "-mnan=legacy")); - ok = FALSE; + ok = false; new_flags &= ~EF_MIPS_NAN2008; old_flags &= ~EF_MIPS_NAN2008; } @@ -15551,7 +15551,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) ? "-mfp64" : "-mfp32"), (old_flags & EF_MIPS_FP64 ? "-mfp64" : "-mfp32")); - ok = FALSE; + ok = false; new_flags &= ~EF_MIPS_FP64; old_flags &= ~EF_MIPS_FP64; } @@ -15564,7 +15564,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) (_("%pB: uses different e_flags (%#x) fields than previous modules " "(%#x)"), ibfd, new_flags, old_flags); - ok = FALSE; + ok = false; } return ok; @@ -15572,7 +15572,7 @@ mips_elf_merge_obj_e_flags (bfd *ibfd, struct bfd_link_info *info) /* Merge object attributes from IBFD into OBFD. Raise an error if there are conflicting attributes. */ -static bfd_boolean +static bool mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -15600,7 +15600,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) initialized. */ elf_known_obj_attributes_proc (obfd)[0].i = 1; - return TRUE; + return true; } /* Check for conflicting Tag_GNU_MIPS_ABI_FP attributes and merge @@ -15729,7 +15729,7 @@ mips_elf_merge_obj_attributes (bfd *ibfd, struct bfd_link_info *info) /* Merge object ABI flags from IBFD into OBFD. Raise an error if there are conflicting settings. */ -static bfd_boolean +static bool mips_elf_merge_obj_abiflags (bfd *ibfd, bfd *obfd) { obj_attribute *out_attr = elf_known_obj_attributes (obfd)[OBJ_ATTR_GNU]; @@ -15755,21 +15755,21 @@ mips_elf_merge_obj_abiflags (bfd *ibfd, bfd *obfd) out_tdata->abiflags.ases |= in_tdata->abiflags.ases; out_tdata->abiflags.flags1 |= in_tdata->abiflags.flags1; - return TRUE; + return true; } /* Merge backend specific data from an object file to the output object file when linking. */ -bfd_boolean +bool _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; struct mips_elf_obj_tdata *out_tdata; struct mips_elf_obj_tdata *in_tdata; - bfd_boolean null_input_bfd = TRUE; + bool null_input_bfd = true; asection *sec; - bfd_boolean ok; + bool ok; /* Check if we have the same endianness. */ if (! _bfd_generic_verify_endian_match (ibfd, info)) @@ -15777,11 +15777,11 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: endianness incompatible with that of the selected emulation"), ibfd); - return FALSE; + return false; } if (!is_mips_elf (ibfd) || !is_mips_elf (obfd)) - return TRUE; + return true; in_tdata = mips_elf_tdata (ibfd); out_tdata = mips_elf_tdata (obfd); @@ -15791,7 +15791,7 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: ABI is incompatible with that of the selected emulation"), ibfd); - return FALSE; + return false; } /* Check to see if the input BFD actually contains any sections. If not, @@ -15812,12 +15812,12 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) && strcmp (sec->name, ".data") && strcmp (sec->name, ".bss")))) { - null_input_bfd = FALSE; + null_input_bfd = false; break; } } if (null_input_bfd) - return TRUE; + return true; /* Populate abiflags using existing information. */ if (in_tdata->abiflags_valid) @@ -15869,19 +15869,19 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) else { infer_mips_abiflags (ibfd, &in_tdata->abiflags); - in_tdata->abiflags_valid = TRUE; + in_tdata->abiflags_valid = true; } if (!out_tdata->abiflags_valid) { /* Copy input abiflags if output abiflags are not already valid. */ out_tdata->abiflags = in_tdata->abiflags; - out_tdata->abiflags_valid = TRUE; + out_tdata->abiflags_valid = true; } if (! elf_flags_init (obfd)) { - elf_flags_init (obfd) = TRUE; + elf_flags_init (obfd) = true; elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags; elf_elfheader (obfd)->e_ident[EI_CLASS] = elf_elfheader (ibfd)->e_ident[EI_CLASS]; @@ -15893,13 +15893,13 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd), bfd_get_mach (ibfd))) - return FALSE; + return false; /* Update the ABI flags isa_level, isa_rev and isa_ext fields. */ update_mips_abiflags_isa (obfd, &out_tdata->abiflags); } - ok = TRUE; + ok = true; } else ok = mips_elf_merge_obj_e_flags (ibfd, info); @@ -15911,23 +15911,23 @@ _bfd_mips_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) if (!ok) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Function to keep MIPS specific file flags like as EF_MIPS_PIC. */ -bfd_boolean +bool _bfd_mips_elf_set_private_flags (bfd *abfd, flagword flags) { BFD_ASSERT (!elf_flags_init (abfd) || elf_elfheader (abfd)->e_flags == flags); elf_elfheader (abfd)->e_flags = flags; - elf_flags_init (abfd) = TRUE; - return TRUE; + elf_flags_init (abfd) = true; + return true; } char * @@ -16236,7 +16236,7 @@ get_mips_reg_size (int reg_size) : -1; } -bfd_boolean +bool _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = ptr; @@ -16352,7 +16352,7 @@ _bfd_mips_elf_print_private_bfd_data (bfd *abfd, void *ptr) fputc ('\n', file); } - return TRUE; + return true; } const struct bfd_elf_special_section _bfd_mips_elf_special_sections[] = @@ -16373,8 +16373,8 @@ const struct bfd_elf_special_section _bfd_mips_elf_special_sections[] = void _bfd_mips_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, unsigned int st_other, - bfd_boolean definition, - bfd_boolean dynamic ATTRIBUTE_UNUSED) + bool definition, + bool dynamic ATTRIBUTE_UNUSED) { if ((st_other & ~ELF_ST_VISIBILITY (-1)) != 0) { @@ -16392,13 +16392,13 @@ _bfd_mips_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, /* Decide whether an undefined symbol is special and can be ignored. This is the case for OPTIONAL symbols on IRIX. */ -bfd_boolean +bool _bfd_mips_elf_ignore_undef_symbol (struct elf_link_hash_entry *h) { return ELF_MIPS_IS_OPTIONAL (h->other) != 0; } -bfd_boolean +bool _bfd_mips_elf_common_definition (Elf_Internal_Sym *sym) { return (sym->st_shndx == SHN_COMMON @@ -16439,9 +16439,9 @@ _bfd_mips_elf_get_synthetic_symtab (bfd *abfd, static const char m16suffix[] = "@mips16plt"; static const char mipssuffix[] = "@plt"; - bfd_boolean (*slurp_relocs) (bfd *, asection *, asymbol **, bfd_boolean); + bool (*slurp_relocs) (bfd *, asection *, asymbol **, bool); const struct elf_backend_data *bed = get_elf_backend_data (abfd); - bfd_boolean micromips_p = MICROMIPS_P (abfd); + bool micromips_p = MICROMIPS_P (abfd); Elf_Internal_Shdr *hdr; bfd_byte *plt_data; bfd_vma plt_offset; @@ -16481,7 +16481,7 @@ _bfd_mips_elf_get_synthetic_symtab (bfd *abfd, return 0; slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table; - if (!(*slurp_relocs) (abfd, relplt, dynsyms, TRUE)) + if (!(*slurp_relocs) (abfd, relplt, dynsyms, true)) return -1; p = relplt->relocation; @@ -16682,14 +16682,14 @@ enum MIPS_LIBC_ABI_MAX }; -bfd_boolean +bool _bfd_mips_init_file_header (bfd *abfd, struct bfd_link_info *link_info) { struct mips_elf_link_hash_table *htab = NULL; Elf_Internal_Ehdr *i_ehdrp; if (!_bfd_elf_init_file_header (abfd, link_info)) - return FALSE; + return false; i_ehdrp = elf_elfheader (abfd); if (link_info) @@ -16715,7 +16715,7 @@ _bfd_mips_init_file_header (bfd *abfd, struct bfd_link_info *link_info) if it is the only hash section that will be created. */ if (link_info && link_info->emit_gnu_hash && !link_info->emit_hash) i_ehdrp->e_ident[EI_ABIVERSION] = MIPS_LIBC_ABI_XHASH; - return TRUE; + return true; } int diff --git a/bfd/elfxx-mips.h b/bfd/elfxx-mips.h index 04a5c3ba3f..1841729e93 100644 --- a/bfd/elfxx-mips.h +++ b/bfd/elfxx-mips.h @@ -22,60 +22,60 @@ #include "elf/internal.h" #include "elf/mips.h" -extern bfd_boolean _bfd_mips_elf_mkobject +extern bool _bfd_mips_elf_mkobject (bfd *); -extern bfd_boolean _bfd_mips_elf_new_section_hook +extern bool _bfd_mips_elf_new_section_hook (bfd *, asection *); extern void _bfd_mips_elf_symbol_processing (bfd *, asymbol *); extern unsigned int _bfd_mips_elf_eh_frame_address_size (bfd *, const asection *); -extern bfd_boolean _bfd_mips_elf_name_local_section_symbols +extern bool _bfd_mips_elf_name_local_section_symbols (bfd *); -extern bfd_boolean _bfd_mips_elf_section_processing +extern bool _bfd_mips_elf_section_processing (bfd *, Elf_Internal_Shdr *); -extern bfd_boolean _bfd_mips_elf_section_from_shdr +extern bool _bfd_mips_elf_section_from_shdr (bfd *, Elf_Internal_Shdr *, const char *, int); -extern bfd_boolean _bfd_mips_elf_fake_sections +extern bool _bfd_mips_elf_fake_sections (bfd *, Elf_Internal_Shdr *, asection *); -extern bfd_boolean _bfd_mips_elf_section_from_bfd_section +extern bool _bfd_mips_elf_section_from_bfd_section (bfd *, asection *, int *); -extern bfd_boolean _bfd_mips_elf_add_symbol_hook +extern bool _bfd_mips_elf_add_symbol_hook (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **, flagword *, asection **, bfd_vma *); extern int _bfd_mips_elf_link_output_symbol_hook (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_mips_elf_create_dynamic_sections +extern bool _bfd_mips_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_mips_elf_check_relocs +extern bool _bfd_mips_elf_check_relocs (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); -extern bfd_boolean _bfd_mips_elf_adjust_dynamic_symbol +extern bool _bfd_mips_elf_adjust_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_mips_elf_always_size_sections +extern bool _bfd_mips_elf_always_size_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_mips_elf_size_dynamic_sections +extern bool _bfd_mips_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); extern int _bfd_mips_elf_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **); -extern bfd_boolean _bfd_mips_elf_finish_dynamic_symbol +extern bool _bfd_mips_elf_finish_dynamic_symbol (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *); -extern bfd_boolean _bfd_mips_vxworks_finish_dynamic_symbol +extern bool _bfd_mips_vxworks_finish_dynamic_symbol (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *); -extern bfd_boolean _bfd_mips_elf_finish_dynamic_sections +extern bool _bfd_mips_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_mips_elf_sort_relocs_p +extern bool _bfd_mips_elf_sort_relocs_p (asection *); extern void _bfd_mips_final_write_processing (bfd *); -extern bfd_boolean _bfd_mips_elf_final_write_processing +extern bool _bfd_mips_elf_final_write_processing (bfd *); extern int _bfd_mips_elf_additional_program_headers (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_mips_elf_modify_segment_map +extern bool _bfd_mips_elf_modify_segment_map (bfd *, struct bfd_link_info *); extern asection * _bfd_mips_elf_gc_mark_hook (asection *, struct bfd_link_info *, Elf_Internal_Rela *, @@ -84,51 +84,51 @@ extern void _bfd_mips_elf_copy_indirect_symbol (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); extern void _bfd_mips_elf_hide_symbol - (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean); -extern bfd_boolean _bfd_mips_elf_ignore_discarded_relocs + (struct bfd_link_info *, struct elf_link_hash_entry *, bool); +extern bool _bfd_mips_elf_ignore_discarded_relocs (asection *); -extern bfd_boolean _bfd_mips_elf_is_target_special_symbol +extern bool _bfd_mips_elf_is_target_special_symbol (bfd *abfd, asymbol *sym); -extern bfd_boolean _bfd_mips_elf_find_nearest_line +extern bool _bfd_mips_elf_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); -extern bfd_boolean _bfd_mips_elf_find_inliner_info +extern bool _bfd_mips_elf_find_inliner_info (bfd *, const char **, const char **, unsigned int *); -extern bfd_boolean _bfd_mips_elf_set_section_contents +extern bool _bfd_mips_elf_set_section_contents (bfd *, asection *, const void *, file_ptr, bfd_size_type); extern bfd_byte *_bfd_elf_mips_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **); -extern bfd_boolean _bfd_mips_elf_relax_section + bfd_byte *, bool, asymbol **); +extern bool _bfd_mips_elf_relax_section (bfd *abfd, asection *sec, struct bfd_link_info *link_info, - bfd_boolean *again); + bool *again); extern struct bfd_link_hash_table *_bfd_mips_elf_link_hash_table_create (bfd *); extern struct bfd_link_hash_table *_bfd_mips_vxworks_link_hash_table_create (bfd *); -extern bfd_boolean _bfd_mips_elf_final_link +extern bool _bfd_mips_elf_final_link (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_mips_elf_merge_private_bfd_data +extern bool _bfd_mips_elf_merge_private_bfd_data (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_mips_elf_set_private_flags +extern bool _bfd_mips_elf_set_private_flags (bfd *, flagword); extern const char * _bfd_mips_fp_abi_string (int); -extern bfd_boolean _bfd_mips_elf_print_private_bfd_data +extern bool _bfd_mips_elf_print_private_bfd_data (bfd *, void *); -extern bfd_boolean _bfd_mips_elf_discard_info +extern bool _bfd_mips_elf_discard_info (bfd *, struct elf_reloc_cookie *, struct bfd_link_info *); -extern bfd_boolean _bfd_mips_elf_write_section +extern bool _bfd_mips_elf_write_section (bfd *, struct bfd_link_info *, asection *, bfd_byte *); -extern bfd_boolean _bfd_mips_elf_read_ecoff_info +extern bool _bfd_mips_elf_read_ecoff_info (bfd *, asection *, struct ecoff_debug_info *); extern void _bfd_mips_elf_reloc_unshuffle - (bfd *, int, bfd_boolean, bfd_byte *); + (bfd *, int, bool, bfd_byte *); extern void _bfd_mips_elf_reloc_shuffle - (bfd *, int, bfd_boolean, bfd_byte *); + (bfd *, int, bool, bfd_byte *); extern bfd_reloc_status_type _bfd_mips_elf_gprel16_with_gp - (bfd *, asymbol *, arelent *, asection *, bfd_boolean, void *, bfd_vma); + (bfd *, asymbol *, arelent *, asection *, bool, void *, bfd_vma); extern bfd_reloc_status_type _bfd_mips_elf32_gprel16_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); extern bfd_reloc_status_type _bfd_mips_elf_hi16_reloc @@ -144,31 +144,31 @@ extern unsigned long _bfd_elf_mips_mach extern bfd_vma _bfd_mips_elf_sign_extend (bfd_vma, int); extern void _bfd_mips_elf_merge_symbol_attribute - (struct elf_link_hash_entry *, unsigned int, bfd_boolean, bfd_boolean); + (struct elf_link_hash_entry *, unsigned int, bool, bool); extern char *_bfd_mips_elf_get_target_dtag (bfd_vma); -extern bfd_boolean _bfd_mips_elf_ignore_undef_symbol +extern bool _bfd_mips_elf_ignore_undef_symbol (struct elf_link_hash_entry *); extern void _bfd_mips_elf_use_plts_and_copy_relocs (struct bfd_link_info *); extern void _bfd_mips_elf_linker_flags - (struct bfd_link_info *, bfd_boolean, bfd_boolean, bfd_boolean); + (struct bfd_link_info *, bool, bool, bool); extern void _bfd_mips_elf_compact_branches - (struct bfd_link_info *, bfd_boolean); -extern bfd_boolean _bfd_mips_elf_init_stubs + (struct bfd_link_info *, bool); +extern bool _bfd_mips_elf_init_stubs (struct bfd_link_info *, asection *(*) (const char *, asection *, asection *)); extern bfd_vma _bfd_mips_elf_plt_sym_val (bfd_vma, const asection *, const arelent *rel); extern long _bfd_mips_elf_get_synthetic_symtab (bfd *, long, asymbol **, long, asymbol **, asymbol **); -extern bfd_boolean _bfd_mips_elf_gc_mark_extra_sections +extern bool _bfd_mips_elf_gc_mark_extra_sections (struct bfd_link_info *, elf_gc_mark_hook_fn); -extern bfd_boolean _bfd_mips_init_file_header +extern bool _bfd_mips_init_file_header (bfd *abfd, struct bfd_link_info *link_info); extern const struct bfd_elf_special_section _bfd_mips_elf_special_sections []; -extern bfd_boolean _bfd_mips_elf_common_definition (Elf_Internal_Sym *); +extern bool _bfd_mips_elf_common_definition (Elf_Internal_Sym *); extern int _bfd_mips_elf_compact_eh_encoding (struct bfd_link_info *); extern int _bfd_mips_elf_cant_unwind_opcode (struct bfd_link_info *); @@ -179,7 +179,7 @@ extern void _bfd_mips_elf_record_xhash_symbol /* MIPS ABI flags data access. For the disassembler. */ extern struct elf_internal_abiflags_v0 *bfd_mips_elf_get_abiflags (bfd *); -static inline bfd_boolean +static inline bool gprel16_reloc_p (unsigned int r_type) { return (r_type == R_MIPS_GPREL16 @@ -188,7 +188,7 @@ gprel16_reloc_p (unsigned int r_type) || r_type == R_MICROMIPS_GPREL7_S2); } -static inline bfd_boolean +static inline bool literal_reloc_p (int r_type) { return r_type == R_MIPS_LITERAL || r_type == R_MICROMIPS_LITERAL; @@ -205,4 +205,4 @@ literal_reloc_p (int r_type) #define elf_backend_compact_eh_encoding _bfd_mips_elf_compact_eh_encoding #define elf_backend_cant_unwind_opcode _bfd_mips_elf_cant_unwind_opcode #define elf_backend_record_xhash_symbol _bfd_mips_elf_record_xhash_symbol -#define elf_backend_always_renumber_dynsyms TRUE +#define elf_backend_always_renumber_dynsyms true diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 966e142be4..a81ebd4d6b 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -49,173 +49,173 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 3, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32 bit relocation. */ HOWTO (R_RISCV_32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64 bit relocation. */ HOWTO (R_RISCV_64, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocation against a local symbol in a shared object. */ HOWTO (R_RISCV_RELATIVE, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_RISCV_COPY, /* type */ 0, /* rightshift */ 0, /* this one is variable size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_RISCV_JUMP_SLOT, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_JUMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Dynamic TLS relocations. */ HOWTO (R_RISCV_TLS_DTPMOD32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_DTPMOD32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_RISCV_TLS_DTPMOD64, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_DTPMOD64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_RISCV_TLS_DTPREL32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_DTPREL32", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_RISCV_TLS_DTPREL64, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_DTPREL64", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_RISCV_TLS_TPREL32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_TPREL32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_RISCV_TLS_TPREL64, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_TPREL64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Reserved for future relocs that the dynamic linker must understand. */ EMPTY_HOWTO (12), @@ -228,407 +228,407 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_BRANCH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_BTYPE_IMM (-1U), /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 20-bit PC-relative jump offset. */ HOWTO (R_RISCV_JAL, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_JAL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_JTYPE_IMM (-1U), /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 32-bit PC-relative function call (AUIPC/JALR). */ HOWTO (R_RISCV_CALL, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U) | ((bfd_vma) ENCODE_ITYPE_IMM (-1U) << 32), /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Like R_RISCV_CALL, but not locally binding. */ HOWTO (R_RISCV_CALL_PLT, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_CALL_PLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U) | ((bfd_vma) ENCODE_ITYPE_IMM (-1U) << 32), /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* High 20 bits of 32-bit PC-relative GOT access. */ HOWTO (R_RISCV_GOT_HI20, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_GOT_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 20 bits of 32-bit PC-relative TLS IE GOT access. */ HOWTO (R_RISCV_TLS_GOT_HI20, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_GOT_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 20 bits of 32-bit PC-relative TLS GD GOT reference. */ HOWTO (R_RISCV_TLS_GD_HI20, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TLS_GD_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 20 bits of 32-bit PC-relative reference. */ HOWTO (R_RISCV_PCREL_HI20, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_PCREL_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U), /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* Low 12 bits of a 32-bit PC-relative load or add. */ HOWTO (R_RISCV_PCREL_LO12_I, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_PCREL_LO12_I", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_ITYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 12 bits of a 32-bit PC-relative store. */ HOWTO (R_RISCV_PCREL_LO12_S, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_PCREL_LO12_S", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_STYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 20 bits of 32-bit absolute address. */ HOWTO (R_RISCV_HI20, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_HI20", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 12 bits of 32-bit load or add. */ HOWTO (R_RISCV_LO12_I, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_LO12_I", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_ITYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 12 bits of 32-bit store. */ HOWTO (R_RISCV_LO12_S, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_LO12_S", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_STYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* High 20 bits of TLS LE thread pointer offset. */ HOWTO (R_RISCV_TPREL_HI20, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TPREL_HI20", /* name */ - TRUE, /* partial_inplace */ + true, /* partial_inplace */ 0, /* src_mask */ ENCODE_UTYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 12 bits of TLS LE thread pointer offset for loads and adds. */ HOWTO (R_RISCV_TPREL_LO12_I, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TPREL_LO12_I", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_ITYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Low 12 bits of TLS LE thread pointer offset for stores. */ HOWTO (R_RISCV_TPREL_LO12_S, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TPREL_LO12_S", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_STYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TLS LE thread pointer usage. May be relaxed. */ HOWTO (R_RISCV_TPREL_ADD, /* type */ 0, /* rightshift */ 3, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TPREL_ADD", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_ADD8, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_ADD8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_ADD16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_ADD16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_ADD32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_ADD32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_ADD64, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_ADD64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_SUB8, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_SUB8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_SUB16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_SUB16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_SUB32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_SUB32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 64-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_SUB64, /* type */ 0, /* rightshift */ 4, /* size */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_SUB64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ MINUS_ONE, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable hierarchy */ HOWTO (R_RISCV_GNU_VTINHERIT, /* type */ 0, /* rightshift */ 4, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_RISCV_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_RISCV_GNU_VTENTRY, /* type */ 0, /* rightshift */ 4, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_RISCV_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Indicates an alignment statement. The addend field encodes how many bytes of NOPs follow the statement. The desired alignment is the @@ -637,240 +637,240 @@ static reloc_howto_type howto_table[] = 0, /* rightshift */ 3, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_ALIGN", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8-bit PC-relative branch offset. */ HOWTO (R_RISCV_RVC_BRANCH, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_RVC_BRANCH", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_CBTYPE_IMM (-1U), /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* 11-bit PC-relative jump offset. */ HOWTO (R_RISCV_RVC_JUMP, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_RVC_JUMP", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_CJTYPE_IMM (-1U), /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* High 6 bits of 18-bit absolute address. */ HOWTO (R_RISCV_RVC_LUI, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_RVC_LUI", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_CITYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP-relative load. */ HOWTO (R_RISCV_GPREL_I, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_GPREL_I", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_ITYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GP-relative store. */ HOWTO (R_RISCV_GPREL_S, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_GPREL_S", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_STYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TP-relative TLS LE load. */ HOWTO (R_RISCV_TPREL_I, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TPREL_I", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_ITYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* TP-relative TLS LE store. */ HOWTO (R_RISCV_TPREL_S, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_TPREL_S", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ ENCODE_STYPE_IMM (-1U), /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* The paired relocation may be relaxed. */ HOWTO (R_RISCV_RELAX, /* type */ 0, /* rightshift */ 3, /* size */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_RELAX", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 6-bit in-place addition, for local label subtraction. */ HOWTO (R_RISCV_SUB6, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ riscv_elf_add_sub_reloc, /* special_function */ "R_RISCV_SUB6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x3f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 6-bit in-place setting, for local label subtraction. */ HOWTO (R_RISCV_SET6, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_SET6", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0x3f, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 8-bit in-place setting, for local label subtraction. */ HOWTO (R_RISCV_SET8, /* type */ 0, /* rightshift */ 0, /* size */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_SET8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 16-bit in-place setting, for local label subtraction. */ HOWTO (R_RISCV_SET16, /* type */ 0, /* rightshift */ 1, /* size */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_SET16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32-bit in-place setting, for local label subtraction. */ HOWTO (R_RISCV_SET32, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_SET32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* 32-bit PC relative. */ HOWTO (R_RISCV_32_PCREL, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* Relocation against a local ifunc symbol in a shared object. */ HOWTO (R_RISCV_IRELATIVE, /* type */ 0, /* rightshift */ 2, /* size */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_RISCV_IRELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; /* A mapping from BFD reloc types to RISC-V ELF reloc types. */ @@ -1071,7 +1071,7 @@ riscv_compare_subsets (const char *subset1, const char *subset2) `current` means we should insert the subset at the head of subset list, if needed. */ -bfd_boolean +bool riscv_lookup_subset (const riscv_subset_list_t *subset_list, const char *subset, riscv_subset_t **current) @@ -1086,13 +1086,13 @@ riscv_lookup_subset (const riscv_subset_list_t *subset_list, if (cmp == 0) { *current = s; - return TRUE; + return true; } else if (cmp > 0) break; } *current = pre_s; - return FALSE; + return false; } /* Add extension from ISA string to the last of the subset list. */ @@ -1155,14 +1155,14 @@ riscv_add_implicit_subset (riscv_subset_list_t *subset_list, Therefore, we won't output them to the output ISA string in the riscv_arch_str1, if the versions are unknown. */ -static bfd_boolean +static bool riscv_ext_dont_care_version (const char *subset) { if (strcmp (subset, "g") == 0 || strcmp (subset, "zicsr") == 0 || strcmp (subset, "zifencei") == 0) - return TRUE; - return FALSE; + return true; + return false; } /* We have to add all extensions from ISA string first, and then start to @@ -1179,7 +1179,7 @@ riscv_parse_add_subset (riscv_parse_subset_t *rps, const char *subset, int major, int minor, - bfd_boolean implicit) + bool implicit) { int major_version = major; int minor_version = minor; @@ -1252,9 +1252,9 @@ riscv_parsing_subset_version (riscv_parse_subset_t *rps, const char *p, int *major_version, int *minor_version, - bfd_boolean std_ext_p) + bool std_ext_p) { - bfd_boolean major_p = TRUE; + bool major_p = true; int version = 0; char np; @@ -1285,7 +1285,7 @@ riscv_parsing_subset_version (riscv_parse_subset_t *rps, } *major_version = version; - major_p = FALSE; + major_p = false; version = 0; } else if (ISDIGIT (*p)) @@ -1345,23 +1345,23 @@ riscv_parse_std_ext (riscv_parse_subset_t *rps, case 'i': p = riscv_parsing_subset_version (rps, march, ++p, &major_version, - &minor_version, TRUE); + &minor_version, true); riscv_parse_add_subset (rps, "i", major_version, - minor_version, FALSE); + minor_version, false); break; case 'e': p = riscv_parsing_subset_version (rps, march, ++p, &major_version, - &minor_version, TRUE); + &minor_version, true); riscv_parse_add_subset (rps, "e", major_version, - minor_version, FALSE); + minor_version, false); /* i-ext must be enabled. */ riscv_parse_add_subset (rps, "i", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, FALSE); + RISCV_UNKNOWN_VERSION, false); if (*rps->xlen > 32) { @@ -1375,22 +1375,22 @@ riscv_parse_std_ext (riscv_parse_subset_t *rps, case 'g': p = riscv_parsing_subset_version (rps, march, ++p, &major_version, - &minor_version, TRUE); + &minor_version, true); /* i-ext must be enabled. */ riscv_parse_add_subset (rps, "i", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, FALSE); + RISCV_UNKNOWN_VERSION, false); /* g-ext is used to add the implicit extensions, but will not be output to the ISA string. */ riscv_parse_add_subset (rps, "g", major_version, - minor_version, FALSE); + minor_version, false); for ( ; *std_exts != 'q'; std_exts++) { subset[0] = *std_exts; riscv_parse_add_subset (rps, subset, RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, FALSE); + RISCV_UNKNOWN_VERSION, false); } break; @@ -1434,10 +1434,10 @@ riscv_parse_std_ext (riscv_parse_subset_t *rps, subset[0] = std_ext; p = riscv_parsing_subset_version (rps, march, ++p, &major_version, - &minor_version, TRUE); + &minor_version, true); riscv_parse_add_subset (rps, subset, major_version, - minor_version, FALSE); + minor_version, false); } return p; @@ -1472,7 +1472,7 @@ typedef struct riscv_parse_config /* Predicate which is used for checking whether this is a "known" extension. For 'x', it always returns true since they are by definition non-standard and cannot be known. */ - bfd_boolean (*ext_valid_p) (const char *); + bool (*ext_valid_p) (const char *); } riscv_parse_config_t; /* Parsing function for prefixed extensions. @@ -1523,7 +1523,7 @@ riscv_parse_prefixed_ext (riscv_parse_subset_t *rps, end_of_version = riscv_parsing_subset_version (rps, march, q, &major_version, - &minor_version, FALSE); + &minor_version, false); *q = '\0'; if (end_of_version == NULL) @@ -1572,7 +1572,7 @@ riscv_parse_prefixed_ext (riscv_parse_subset_t *rps, riscv_parse_add_subset (rps, subset, major_version, - minor_version, FALSE); + minor_version, false); p += end_of_version - subset; free (subset); @@ -1614,7 +1614,7 @@ static const char * const riscv_std_h_ext_strtab[] = /* For the extension `ext`, search through the list of known extensions `known_exts` for a match, and return TRUE if found. */ -static bfd_boolean +static bool riscv_multi_letter_ext_valid_p (const char *ext, const char *const *known_exts) { @@ -1622,27 +1622,27 @@ riscv_multi_letter_ext_valid_p (const char *ext, for (i = 0; known_exts[i]; ++i) if (!strcmp (ext, known_exts[i])) - return TRUE; + return true; - return FALSE; + return false; } /* Predicator function for x-prefixed extensions. Anything goes, except the literal 'x'. */ -static bfd_boolean +static bool riscv_ext_x_valid_p (const char *arg) { if (!strcasecmp (arg, "x")) - return FALSE; + return false; - return TRUE; + return true; } /* Predicator functions for z-prefixed extensions. Only known z-extensions are permitted. */ -static bfd_boolean +static bool riscv_ext_z_valid_p (const char *arg) { return riscv_multi_letter_ext_valid_p (arg, riscv_std_z_ext_strtab); @@ -1651,7 +1651,7 @@ riscv_ext_z_valid_p (const char *arg) /* Predicator function for 's' prefixed extensions. Only known s-extensions are permitted. */ -static bfd_boolean +static bool riscv_ext_s_valid_p (const char *arg) { return riscv_multi_letter_ext_valid_p (arg, riscv_std_s_ext_strtab); @@ -1660,7 +1660,7 @@ riscv_ext_s_valid_p (const char *arg) /* Predicator function for 'h' prefixed extensions. Only known h-extensions are permitted. */ -static bfd_boolean +static bool riscv_ext_h_valid_p (const char *arg) { return riscv_multi_letter_ext_valid_p (arg, riscv_std_h_ext_strtab); @@ -1682,7 +1682,7 @@ static const riscv_parse_config_t parse_config[] = static void riscv_init_ext_order (void) { - static bfd_boolean inited = FALSE; + static bool inited = false; const char *std_base_exts = "eig"; const char *std_remain_exts = riscv_supported_std_ext (); const char *ext; @@ -1711,7 +1711,7 @@ riscv_init_ext_order (void) riscv_ext_order[(*ext - 'a')] = order--; } - inited = TRUE; + inited = true; } /* Add the implicit extensions. */ @@ -1729,46 +1729,46 @@ riscv_parse_add_implicit_subsets (riscv_parse_subset_t *rps) { riscv_parse_add_subset (rps, "zicsr", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); riscv_parse_add_subset (rps, "zifencei", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); } if ((riscv_lookup_subset (rps->subset_list, "q", &subset))) { riscv_parse_add_subset (rps, "d", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); riscv_parse_add_subset (rps, "f", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); riscv_parse_add_subset (rps, "zicsr", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); } else if ((riscv_lookup_subset (rps->subset_list, "d", &subset))) { riscv_parse_add_subset (rps, "f", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); riscv_parse_add_subset (rps, "zicsr", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); } else if ((riscv_lookup_subset (rps->subset_list, "f", &subset))) riscv_parse_add_subset (rps, "zicsr", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); if ((riscv_lookup_subset (rps->subset_list, "g", &subset))) { riscv_parse_add_subset (rps, "zicsr", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); riscv_parse_add_subset (rps, "zifencei", RISCV_UNKNOWN_VERSION, - RISCV_UNKNOWN_VERSION, TRUE); + RISCV_UNKNOWN_VERSION, true); } } @@ -1781,14 +1781,14 @@ riscv_parse_add_implicit_subsets (riscv_parse_subset_t *rps) `rps`: Hooks and status for parsing extensions. `arch`: Full ISA string. */ -bfd_boolean +bool riscv_parse_subset (riscv_parse_subset_t *rps, const char *arch) { riscv_subset_t *subset = NULL; const char *p; size_t i; - bfd_boolean no_conflict = TRUE; + bool no_conflict = true; for (p = arch; *p != '\0'; p++) { @@ -1797,7 +1797,7 @@ riscv_parse_subset (riscv_parse_subset_t *rps, rps->error_handler (_("-march=%s: ISA string cannot contain uppercase letters"), arch); - return FALSE; + return false; } } @@ -1823,7 +1823,7 @@ riscv_parse_subset (riscv_parse_subset_t *rps, rps->error_handler ( _("-march=%s: ISA string must begin with rv32 or rv64"), arch); - return FALSE; + return false; } /* Init the riscv_ext_order array to compare the order of extensions @@ -1834,7 +1834,7 @@ riscv_parse_subset (riscv_parse_subset_t *rps, p = riscv_parse_std_ext (rps, arch, p); if (p == NULL) - return FALSE; + return false; /* Parse the different classes of extensions in the specified order. */ for (i = 0; i < ARRAY_SIZE (parse_config); ++i) @@ -1842,14 +1842,14 @@ riscv_parse_subset (riscv_parse_subset_t *rps, p = riscv_parse_prefixed_ext (rps, arch, p, &parse_config[i]); if (p == NULL) - return FALSE; + return false; } if (*p != '\0') { rps->error_handler (_("-march=%s: unexpected ISA string at end: %s"), arch, p); - return FALSE; + return false; } /* Finally add implicit extensions according to the current @@ -1863,7 +1863,7 @@ riscv_parse_subset (riscv_parse_subset_t *rps, rps->error_handler (_("-march=%s: rv32e does not support the `f' extension"), arch); - no_conflict = FALSE; + no_conflict = false; } if (riscv_lookup_subset (rps->subset_list, "q", &subset) && *rps->xlen < 64) @@ -1871,7 +1871,7 @@ riscv_parse_subset (riscv_parse_subset_t *rps, rps->error_handler (_("-march=%s: rv32 does not support the `q' extension"), arch); - no_conflict = FALSE; + no_conflict = false; } return no_conflict; } diff --git a/bfd/elfxx-riscv.h b/bfd/elfxx-riscv.h index a676d5cf75..10b78ee491 100644 --- a/bfd/elfxx-riscv.h +++ b/bfd/elfxx-riscv.h @@ -58,7 +58,7 @@ riscv_add_subset (riscv_subset_list_t *, const char *, int, int); -extern bfd_boolean +extern bool riscv_lookup_subset (const riscv_subset_list_t *, const char *, riscv_subset_t **); @@ -74,7 +74,7 @@ typedef struct int *); } riscv_parse_subset_t; -extern bfd_boolean +extern bool riscv_parse_subset (riscv_parse_subset_t *, const char *); @@ -106,8 +106,8 @@ riscv_get_prefix_class (const char *); extern int riscv_compare_subsets (const char *, const char *); -extern bfd_boolean +extern bool bfd_elf32_riscv_restart_relax_sections (struct bfd_link_info *); -extern bfd_boolean +extern bool bfd_elf64_riscv_restart_relax_sections (struct bfd_link_info *); diff --git a/bfd/elfxx-sparc.c b/bfd/elfxx-sparc.c index f2ef9a3449..83f6ced098 100644 --- a/bfd/elfxx-sparc.c +++ b/bfd/elfxx-sparc.c @@ -209,106 +209,106 @@ sparc_elf_lox10_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, static reloc_howto_type _bfd_sparc_elf_howto_table[] = { - HOWTO(R_SPARC_NONE, 0,3, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_8, 0,0, 8,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_8", FALSE,0,0x000000ff,TRUE), - HOWTO(R_SPARC_16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_16", FALSE,0,0x0000ffff,TRUE), - HOWTO(R_SPARC_32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", FALSE,0,0xffffffff,TRUE), - HOWTO(R_SPARC_DISP8, 0,0, 8,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP8", FALSE,0,0x000000ff,TRUE), - HOWTO(R_SPARC_DISP16, 0,1,16,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP16", FALSE,0,0x0000ffff,TRUE), - HOWTO(R_SPARC_DISP32, 0,2,32,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", FALSE,0,0xffffffff,TRUE), - HOWTO(R_SPARC_WDISP30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP30", FALSE,0,0x3fffffff,TRUE), - HOWTO(R_SPARC_WDISP22, 2,2,22,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_HI22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HI22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_22, 0,2,22,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_13, 0,2,13,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_13", FALSE,0,0x00001fff,TRUE), - HOWTO(R_SPARC_LO10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LO10", FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_GOT10, 0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT10", FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_GOT13, 0,2,13,FALSE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_GOT13", FALSE,0,0x00001fff,TRUE), - HOWTO(R_SPARC_GOT22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_PC10, 0,2,10,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC10", FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_PC22, 10,2,22,TRUE, 0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PC22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_WPLT30, 2,2,30,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WPLT30", FALSE,0,0x3fffffff,TRUE), - HOWTO(R_SPARC_COPY, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_COPY", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_GLOB_DAT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_JMP_SLOT, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_RELATIVE, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_UA32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", FALSE,0,0xffffffff,TRUE), - HOWTO(R_SPARC_PLT32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT32", FALSE,0,0xffffffff,TRUE), - HOWTO(R_SPARC_HIPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_HIPLT22", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_LOPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_LOPLT10", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_PCPLT32, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT32", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_PCPLT22, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT22", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_PCPLT10, 0,0,00,FALSE,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT10", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_10, 0,2,10,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_10", FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_11, 0,2,11,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_11", FALSE,0,0x000007ff,TRUE), - HOWTO(R_SPARC_64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_64", FALSE,0,MINUS_ONE, TRUE), - HOWTO(R_SPARC_OLO10, 0,2,13,FALSE,0,complain_overflow_signed, sparc_elf_notsup_reloc, "R_SPARC_OLO10", FALSE,0,0x00001fff,TRUE), - HOWTO(R_SPARC_HH22, 42,2,22,FALSE,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_HH22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_HM10, 32,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HM10", FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_LM22, 10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LM22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_PC_HH22, 42,2,22,TRUE, 0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_PC_HH22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_PC_HM10, 32,2,10,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_HM10", FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_PC_LM22, 10,2,22,TRUE, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_LM22", FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_WDISP16, 2,2,16,TRUE, 0,complain_overflow_signed, sparc_elf_wdisp16_reloc,"R_SPARC_WDISP16", FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_WDISP19, 2,2,19,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP19", FALSE,0,0x0007ffff,TRUE), - HOWTO(R_SPARC_UNUSED_42, 0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UNUSED_42",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_7, 0,2, 7,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_7", FALSE,0,0x0000007f,TRUE), - HOWTO(R_SPARC_5, 0,2, 5,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_5", FALSE,0,0x0000001f,TRUE), - HOWTO(R_SPARC_6, 0,2, 6,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_6", FALSE,0,0x0000003f,TRUE), - HOWTO(R_SPARC_DISP64, 0,4,64,TRUE, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP64", FALSE,0,MINUS_ONE, TRUE), - HOWTO(R_SPARC_PLT64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT64", FALSE,0,MINUS_ONE, TRUE), - HOWTO(R_SPARC_HIX22, 0,4, 0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_HIX22", FALSE,0,MINUS_ONE, FALSE), - HOWTO(R_SPARC_LOX10, 0,4, 0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_LOX10", FALSE,0,MINUS_ONE, FALSE), - HOWTO(R_SPARC_H44, 22,2,22,FALSE,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_H44", FALSE,0,0x003fffff,FALSE), - HOWTO(R_SPARC_M44, 12,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_M44", FALSE,0,0x000003ff,FALSE), - HOWTO(R_SPARC_L44, 0,2,13,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_L44", FALSE,0,0x00000fff,FALSE), - HOWTO(R_SPARC_REGISTER, 0,4, 0,FALSE,0,complain_overflow_bitfield,sparc_elf_notsup_reloc, "R_SPARC_REGISTER",FALSE,0,MINUS_ONE, FALSE), - HOWTO(R_SPARC_UA64, 0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", FALSE,0,MINUS_ONE, TRUE), - HOWTO(R_SPARC_UA16, 0,1,16,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", FALSE,0,0x0000ffff,TRUE), - HOWTO(R_SPARC_TLS_GD_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_HI22",FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_TLS_GD_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_LO10",FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_TLS_GD_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_ADD",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_GD_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_CALL",FALSE,0,0x3fffffff,TRUE), - HOWTO(R_SPARC_TLS_LDM_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_HI22",FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_TLS_LDM_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_LO10",FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_TLS_LDM_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_ADD",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_LDM_CALL,2,2,30,TRUE,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_CALL",FALSE,0,0x3fffffff,TRUE), - HOWTO(R_SPARC_TLS_LDO_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_TLS_LDO_HIX22",FALSE,0,0x003fffff, FALSE), - HOWTO(R_SPARC_TLS_LDO_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LDO_LOX10",FALSE,0,0x000003ff, FALSE), - HOWTO(R_SPARC_TLS_LDO_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDO_ADD",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_IE_HI22,10,2,22,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_HI22",FALSE,0,0x003fffff,TRUE), - HOWTO(R_SPARC_TLS_IE_LO10,0,2,10,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LO10",FALSE,0,0x000003ff,TRUE), - HOWTO(R_SPARC_TLS_IE_LD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LD",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_IE_LDX,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LDX",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_IE_ADD,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_ADD",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_LE_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_TLS_LE_HIX22",FALSE,0,0x003fffff, FALSE), - HOWTO(R_SPARC_TLS_LE_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LE_LOX10",FALSE,0,0x000003ff, FALSE), - HOWTO(R_SPARC_TLS_DTPMOD32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD32",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_DTPMOD64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD64",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_DTPOFF32,0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF32",FALSE,0,0xffffffff,TRUE), - HOWTO(R_SPARC_TLS_DTPOFF64,0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF64",FALSE,0,MINUS_ONE,TRUE), - HOWTO(R_SPARC_TLS_TPOFF32,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF32",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_TLS_TPOFF64,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF64",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_GOTDATA_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_GOTDATA_HIX22",FALSE,0,0x003fffff, FALSE), - HOWTO(R_SPARC_GOTDATA_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_GOTDATA_LOX10",FALSE,0,0x000003ff, FALSE), - HOWTO(R_SPARC_GOTDATA_OP_HIX22,0,2,0,FALSE,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_GOTDATA_OP_HIX22",FALSE,0,0x003fffff, FALSE), - HOWTO(R_SPARC_GOTDATA_OP_LOX10,0,2,0,FALSE,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_GOTDATA_OP_LOX10",FALSE,0,0x000003ff, FALSE), - HOWTO(R_SPARC_GOTDATA_OP,0,0, 0,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOTDATA_OP",FALSE,0,0x00000000,TRUE), - HOWTO(R_SPARC_H34,12,2,22,FALSE,0,complain_overflow_unsigned,bfd_elf_generic_reloc,"R_SPARC_H34",FALSE,0,0x003fffff,FALSE), - HOWTO(R_SPARC_SIZE32,0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_SIZE32",FALSE,0,0xffffffff,TRUE), - HOWTO(R_SPARC_SIZE64,0,4,64,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_SIZE64",FALSE,0,MINUS_ONE, TRUE), - HOWTO(R_SPARC_WDISP10,2,2,10,TRUE, 0,complain_overflow_signed,sparc_elf_wdisp10_reloc,"R_SPARC_WDISP10",FALSE,0,0x00000000,TRUE), + HOWTO(R_SPARC_NONE, 0,3, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true), + HOWTO(R_SPARC_8, 0,0, 8,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_8", false,0,0x000000ff,true), + HOWTO(R_SPARC_16, 0,1,16,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_16", false,0,0x0000ffff,true), + HOWTO(R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", false,0,0xffffffff,true), + HOWTO(R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP8", false,0,0x000000ff,true), + HOWTO(R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP16", false,0,0x0000ffff,true), + HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", false,0,0xffffffff,true), + HOWTO(R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP30", false,0,0x3fffffff,true), + HOWTO(R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP22", false,0,0x003fffff,true), + HOWTO(R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HI22", false,0,0x003fffff,true), + HOWTO(R_SPARC_22, 0,2,22,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_22", false,0,0x003fffff,true), + HOWTO(R_SPARC_13, 0,2,13,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_13", false,0,0x00001fff,true), + HOWTO(R_SPARC_LO10, 0,2,10,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LO10", false,0,0x000003ff,true), + HOWTO(R_SPARC_GOT10, 0,2,10,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT10", false,0,0x000003ff,true), + HOWTO(R_SPARC_GOT13, 0,2,13,false,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_GOT13", false,0,0x00001fff,true), + HOWTO(R_SPARC_GOT22, 10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOT22", false,0,0x003fffff,true), + HOWTO(R_SPARC_PC10, 0,2,10,true, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC10", false,0,0x000003ff,true), + HOWTO(R_SPARC_PC22, 10,2,22,true, 0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PC22", false,0,0x003fffff,true), + HOWTO(R_SPARC_WPLT30, 2,2,30,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WPLT30", false,0,0x3fffffff,true), + HOWTO(R_SPARC_COPY, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_COPY", false,0,0x00000000,true), + HOWTO(R_SPARC_GLOB_DAT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GLOB_DAT",false,0,0x00000000,true), + HOWTO(R_SPARC_JMP_SLOT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",false,0,0x00000000,true), + HOWTO(R_SPARC_RELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",false,0,0x00000000,true), + HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true), + HOWTO(R_SPARC_PLT32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT32", false,0,0xffffffff,true), + HOWTO(R_SPARC_HIPLT22, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_HIPLT22", false,0,0x00000000,true), + HOWTO(R_SPARC_LOPLT10, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_LOPLT10", false,0,0x00000000,true), + HOWTO(R_SPARC_PCPLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT32", false,0,0x00000000,true), + HOWTO(R_SPARC_PCPLT22, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT22", false,0,0x00000000,true), + HOWTO(R_SPARC_PCPLT10, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT10", false,0,0x00000000,true), + HOWTO(R_SPARC_10, 0,2,10,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_10", false,0,0x000003ff,true), + HOWTO(R_SPARC_11, 0,2,11,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_11", false,0,0x000007ff,true), + HOWTO(R_SPARC_64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_64", false,0,MINUS_ONE, true), + HOWTO(R_SPARC_OLO10, 0,2,13,false,0,complain_overflow_signed, sparc_elf_notsup_reloc, "R_SPARC_OLO10", false,0,0x00001fff,true), + HOWTO(R_SPARC_HH22, 42,2,22,false,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_HH22", false,0,0x003fffff,true), + HOWTO(R_SPARC_HM10, 32,2,10,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HM10", false,0,0x000003ff,true), + HOWTO(R_SPARC_LM22, 10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_LM22", false,0,0x003fffff,true), + HOWTO(R_SPARC_PC_HH22, 42,2,22,true, 0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_PC_HH22", false,0,0x003fffff,true), + HOWTO(R_SPARC_PC_HM10, 32,2,10,true, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_HM10", false,0,0x000003ff,true), + HOWTO(R_SPARC_PC_LM22, 10,2,22,true, 0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_PC_LM22", false,0,0x003fffff,true), + HOWTO(R_SPARC_WDISP16, 2,2,16,true, 0,complain_overflow_signed, sparc_elf_wdisp16_reloc,"R_SPARC_WDISP16", false,0,0x00000000,true), + HOWTO(R_SPARC_WDISP19, 2,2,19,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP19", false,0,0x0007ffff,true), + HOWTO(R_SPARC_UNUSED_42, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_UNUSED_42",false,0,0x00000000,true), + HOWTO(R_SPARC_7, 0,2, 7,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_7", false,0,0x0000007f,true), + HOWTO(R_SPARC_5, 0,2, 5,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_5", false,0,0x0000001f,true), + HOWTO(R_SPARC_6, 0,2, 6,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_6", false,0,0x0000003f,true), + HOWTO(R_SPARC_DISP64, 0,4,64,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP64", false,0,MINUS_ONE, true), + HOWTO(R_SPARC_PLT64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT64", false,0,MINUS_ONE, true), + HOWTO(R_SPARC_HIX22, 0,4, 0,false,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_HIX22", false,0,MINUS_ONE, false), + HOWTO(R_SPARC_LOX10, 0,4, 0,false,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_LOX10", false,0,MINUS_ONE, false), + HOWTO(R_SPARC_H44, 22,2,22,false,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_H44", false,0,0x003fffff,false), + HOWTO(R_SPARC_M44, 12,2,10,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_M44", false,0,0x000003ff,false), + HOWTO(R_SPARC_L44, 0,2,13,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_L44", false,0,0x00000fff,false), + HOWTO(R_SPARC_REGISTER, 0,4, 0,false,0,complain_overflow_bitfield,sparc_elf_notsup_reloc, "R_SPARC_REGISTER",false,0,MINUS_ONE, false), + HOWTO(R_SPARC_UA64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", false,0,MINUS_ONE, true), + HOWTO(R_SPARC_UA16, 0,1,16,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", false,0,0x0000ffff,true), + HOWTO(R_SPARC_TLS_GD_HI22,10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_HI22",false,0,0x003fffff,true), + HOWTO(R_SPARC_TLS_GD_LO10,0,2,10,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_LO10",false,0,0x000003ff,true), + HOWTO(R_SPARC_TLS_GD_ADD,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_ADD",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_GD_CALL,2,2,30,true,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_GD_CALL",false,0,0x3fffffff,true), + HOWTO(R_SPARC_TLS_LDM_HI22,10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_HI22",false,0,0x003fffff,true), + HOWTO(R_SPARC_TLS_LDM_LO10,0,2,10,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_LO10",false,0,0x000003ff,true), + HOWTO(R_SPARC_TLS_LDM_ADD,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_ADD",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_LDM_CALL,2,2,30,true,0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_TLS_LDM_CALL",false,0,0x3fffffff,true), + HOWTO(R_SPARC_TLS_LDO_HIX22,0,2,0,false,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_TLS_LDO_HIX22",false,0,0x003fffff, false), + HOWTO(R_SPARC_TLS_LDO_LOX10,0,2,0,false,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LDO_LOX10",false,0,0x000003ff, false), + HOWTO(R_SPARC_TLS_LDO_ADD,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_LDO_ADD",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_IE_HI22,10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_HI22",false,0,0x003fffff,true), + HOWTO(R_SPARC_TLS_IE_LO10,0,2,10,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LO10",false,0,0x000003ff,true), + HOWTO(R_SPARC_TLS_IE_LD,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LD",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_IE_LDX,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_LDX",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_IE_ADD,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_IE_ADD",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_LE_HIX22,0,2,0,false,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_TLS_LE_HIX22",false,0,0x003fffff, false), + HOWTO(R_SPARC_TLS_LE_LOX10,0,2,0,false,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_TLS_LE_LOX10",false,0,0x000003ff, false), + HOWTO(R_SPARC_TLS_DTPMOD32,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD32",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_DTPMOD64,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_DTPMOD64",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_DTPOFF32,0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF32",false,0,0xffffffff,true), + HOWTO(R_SPARC_TLS_DTPOFF64,0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_TLS_DTPOFF64",false,0,MINUS_ONE,true), + HOWTO(R_SPARC_TLS_TPOFF32,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF32",false,0,0x00000000,true), + HOWTO(R_SPARC_TLS_TPOFF64,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_TLS_TPOFF64",false,0,0x00000000,true), + HOWTO(R_SPARC_GOTDATA_HIX22,0,2,0,false,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_GOTDATA_HIX22",false,0,0x003fffff, false), + HOWTO(R_SPARC_GOTDATA_LOX10,0,2,0,false,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_GOTDATA_LOX10",false,0,0x000003ff, false), + HOWTO(R_SPARC_GOTDATA_OP_HIX22,0,2,0,false,0,complain_overflow_bitfield,sparc_elf_hix22_reloc,"R_SPARC_GOTDATA_OP_HIX22",false,0,0x003fffff, false), + HOWTO(R_SPARC_GOTDATA_OP_LOX10,0,2,0,false,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_GOTDATA_OP_LOX10",false,0,0x000003ff, false), + HOWTO(R_SPARC_GOTDATA_OP,0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_GOTDATA_OP",false,0,0x00000000,true), + HOWTO(R_SPARC_H34,12,2,22,false,0,complain_overflow_unsigned,bfd_elf_generic_reloc,"R_SPARC_H34",false,0,0x003fffff,false), + HOWTO(R_SPARC_SIZE32,0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_SIZE32",false,0,0xffffffff,true), + HOWTO(R_SPARC_SIZE64,0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc,"R_SPARC_SIZE64",false,0,MINUS_ONE, true), + HOWTO(R_SPARC_WDISP10,2,2,10,true, 0,complain_overflow_signed,sparc_elf_wdisp10_reloc,"R_SPARC_WDISP10",false,0,0x00000000,true), }; static reloc_howto_type sparc_jmp_irel_howto = - HOWTO(R_SPARC_JMP_IREL, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_IREL",FALSE,0,0x00000000,TRUE); + HOWTO(R_SPARC_JMP_IREL, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_IREL",false,0,0x00000000,true); static reloc_howto_type sparc_irelative_howto = - HOWTO(R_SPARC_IRELATIVE, 0,0,00,FALSE,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_IRELATIVE",FALSE,0,0x00000000,TRUE); + HOWTO(R_SPARC_IRELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_IRELATIVE",false,0,0x00000000,true); static reloc_howto_type sparc_vtinherit_howto = - HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,FALSE,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", FALSE,0, 0, FALSE); + HOWTO (R_SPARC_GNU_VTINHERIT, 0,2,0,false,0,complain_overflow_dont, NULL, "R_SPARC_GNU_VTINHERIT", false,0, 0, false); static reloc_howto_type sparc_vtentry_howto = - HOWTO (R_SPARC_GNU_VTENTRY, 0,2,0,FALSE,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_SPARC_GNU_VTENTRY", FALSE,0,0, FALSE); + HOWTO (R_SPARC_GNU_VTENTRY, 0,2,0,false,0,complain_overflow_dont, _bfd_elf_rel_vtable_reloc_fn,"R_SPARC_GNU_VTENTRY", false,0,0, false); static reloc_howto_type sparc_rev32_howto = - HOWTO(R_SPARC_REV32, 0,2,32,FALSE,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", FALSE,0,0xffffffff,TRUE); + HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true); reloc_howto_type * _bfd_sparc_elf_reloc_type_lookup (bfd *abfd, @@ -650,7 +650,7 @@ _bfd_sparc_elf_info_to_howto_ptr (bfd *abfd ATTRIBUTE_UNUSED, #define SPARC_ELF_R_TYPE(r_info) \ ((r_info) & 0xff) -bfd_boolean +bool _bfd_sparc_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, Elf_Internal_Rela *dst) { @@ -659,9 +659,9 @@ _bfd_sparc_elf_info_to_howto (bfd *abfd, arelent *cache_ptr, if ((cache_ptr->howto = _bfd_sparc_elf_info_to_howto_ptr (abfd, r_type)) == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } @@ -717,7 +717,7 @@ struct _bfd_sparc_elf_obj_tdata char *local_got_tls_type; /* TRUE if TLS GD relocs has been seen for this object. */ - bfd_boolean has_tlsgd; + bool has_tlsgd; }; #define _bfd_sparc_elf_tdata(abfd) \ @@ -731,7 +731,7 @@ struct _bfd_sparc_elf_obj_tdata && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == SPARC_ELF_DATA) -bfd_boolean +bool _bfd_sparc_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, sizeof (struct _bfd_sparc_elf_obj_tdata), @@ -1070,7 +1070,7 @@ elf_sparc_local_htab_eq (const void *ptr1, const void *ptr2) static struct elf_link_hash_entry * elf_sparc_get_local_sym_hash (struct _bfd_sparc_elf_link_hash_table *htab, bfd *abfd, const Elf_Internal_Rela *rel, - bfd_boolean create) + bool create) { struct _bfd_sparc_elf_link_hash_entry e, *ret; asection *sec = abfd->sections; @@ -1204,7 +1204,7 @@ _bfd_sparc_elf_link_hash_table_create (bfd *abfd) .rela.bss sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -bfd_boolean +bool _bfd_sparc_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { @@ -1214,12 +1214,12 @@ _bfd_sparc_elf_create_dynamic_sections (bfd *dynobj, BFD_ASSERT (htab != NULL); if (!_bfd_elf_create_dynamic_sections (dynobj, info)) - return FALSE; + return false; if (htab->elf.target_os == is_vxworks) { if (!elf_vxworks_create_dynamic_sections (dynobj, info, &htab->srelplt2)) - return FALSE; + return false; if (bfd_link_pic (info)) { htab->plt_header_size @@ -1240,10 +1240,10 @@ _bfd_sparc_elf_create_dynamic_sections (bfd *dynobj, || (!bfd_link_pic (info) && !htab->elf.srelbss)) abort (); - return TRUE; + return true; } -static bfd_boolean +static bool create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) { const struct elf_backend_data *bed = get_elf_backend_data (abfd); @@ -1252,7 +1252,7 @@ create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) asection *s; if (htab->irelifunc != NULL || htab->iplt != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; pltflags = flags | SEC_ALLOC | SEC_CODE | SEC_LOAD; @@ -1260,17 +1260,17 @@ create_ifunc_sections (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_with_flags (abfd, ".iplt", pltflags); if (s == NULL || !bfd_set_section_alignment (s, bed->plt_alignment)) - return FALSE; + return false; htab->iplt = s; s = bfd_make_section_with_flags (abfd, ".rela.iplt", flags | SEC_READONLY); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->irelplt = s; - return TRUE; + return true; } /* Copy the extra info we tack onto an elf_link_hash_entry. */ @@ -1333,7 +1333,7 @@ sparc_elf_tls_transition (struct bfd_link_info *info, bfd *abfd, allocate space in the global offset table or procedure linkage table. */ -bfd_boolean +bool _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -1344,10 +1344,10 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel_end; asection *sreloc; int num_relocs; - bfd_boolean checked_tlsgd = FALSE; + bool checked_tlsgd = false; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = _bfd_sparc_elf_hash_table (info); BFD_ASSERT (htab != NULL); @@ -1366,7 +1366,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (htab->elf.dynobj == NULL) htab->elf.dynobj = abfd; if (!create_ifunc_sections (htab->elf.dynobj, info)) - return FALSE; + return false; rel_end = relocs + num_relocs; for (rel = relocs; rel < rel_end; rel++) @@ -1384,7 +1384,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } isym = NULL; @@ -1394,14 +1394,14 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; /* Check relocation against local STT_GNU_IFUNC symbol. */ if (ELF_ST_TYPE (isym->st_info) == STT_GNU_IFUNC) { - h = elf_sparc_get_local_sym_hash (htab, abfd, rel, TRUE); + h = elf_sparc_get_local_sym_hash (htab, abfd, rel, true); if (h == NULL) - return FALSE; + return false; /* Fake a STT_GNU_IFUNC symbol. */ h->type = STT_GNU_IFUNC; @@ -1441,15 +1441,15 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_ADD || ELF32_R_TYPE (relt->r_info) == R_SPARC_TLS_GD_CALL) break; - checked_tlsgd = TRUE; + checked_tlsgd = true; _bfd_sparc_elf_tdata (abfd)->has_tlsgd = relt < rel_end; } break; case R_SPARC_TLS_GD_LO10: case R_SPARC_TLS_GD_ADD: case R_SPARC_TLS_GD_CALL: - checked_tlsgd = TRUE; - _bfd_sparc_elf_tdata (abfd)->has_tlsgd = TRUE; + checked_tlsgd = true; + _bfd_sparc_elf_tdata (abfd)->has_tlsgd = true; break; } @@ -1525,7 +1525,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; _bfd_sparc_elf_local_got_tls_type (abfd) = (char *) (local_got_refcounts + symtab_hdr->sh_info); @@ -1555,7 +1555,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h ? h->root.root.string : ""); - return FALSE; + return false; } if (h != NULL) @@ -1567,7 +1567,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (!htab->elf.sgot && !_bfd_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; if (eh != NULL) { @@ -1586,8 +1586,8 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* Essentially R_SPARC_WPLT30 relocs against __tls_get_addr. */ h = (struct elf_link_hash_entry *) - bfd_link_hash_lookup (info->hash, "__tls_get_addr", FALSE, - FALSE, TRUE); + bfd_link_hash_lookup (info->hash, "__tls_get_addr", false, + false, true); BFD_ASSERT (h != NULL); /* Fall through */ @@ -1624,7 +1624,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* It does not make sense to have a procedure linkage table entry for a local symbol. */ bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } h->needs_plt = 1; @@ -1747,10 +1747,10 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { sreloc = _bfd_elf_make_dynamic_reloc_section (sec, htab->elf.dynobj, htab->word_align_power, - abfd, /*rela?*/ TRUE); + abfd, /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -1781,7 +1781,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -1798,12 +1798,12 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_SPARC_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; case R_SPARC_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; case R_SPARC_REGISTER: @@ -1815,7 +1815,7 @@ _bfd_sparc_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } asection * @@ -1845,7 +1845,7 @@ _bfd_sparc_elf_gc_mark_hook (asection *sec, gc marked when processing the other reloc. That lets us handle __tls_get_addr here. */ h = elf_link_hash_lookup (elf_hash_table (info), "__tls_get_addr", - FALSE, FALSE, TRUE); + false, false, true); BFD_ASSERT (h != NULL); h->mark = 1; if (h->is_weakalias) @@ -1874,7 +1874,7 @@ sparc_elf_find_reloc_at_ofs (Elf_Internal_Rela *rel, /* Remove undefined weak symbol from the dynamic symbol table if it is resolved to 0. */ -bfd_boolean +bool _bfd_sparc_elf_fixup_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1886,7 +1886,7 @@ _bfd_sparc_elf_fixup_symbol (struct bfd_link_info *info, _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, h->dynstr_index); } - return TRUE; + return true; } /* Adjust a symbol defined by a dynamic object and referenced by a @@ -1895,7 +1895,7 @@ _bfd_sparc_elf_fixup_symbol (struct bfd_link_info *info, change the definition to something the rest of the link can understand. */ -bfd_boolean +bool _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1944,7 +1944,7 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -1958,7 +1958,7 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1969,18 +1969,18 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -1988,7 +1988,7 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -2027,17 +2027,17 @@ _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) { struct bfd_link_info *info; struct _bfd_sparc_elf_link_hash_table *htab; struct _bfd_sparc_elf_link_hash_entry *eh; struct elf_dyn_relocs *p; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = _bfd_sparc_elf_hash_table (info); @@ -2059,7 +2059,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h) @@ -2088,7 +2088,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) (((bfd_vma)1 << 31) << 1) : 0x400000)) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (SPARC_ELF_WORD_BYTES(htab) == 8 @@ -2162,7 +2162,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) else if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = _bfd_sparc_elf_hash_entry(h)->tls_type; /* Undefined weak syms won't yet be marked as dynamic. */ @@ -2172,7 +2172,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->elf.sgot; @@ -2208,7 +2208,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -2279,7 +2279,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) as dynamic symbols in PIEs for dynamic non-GOT non-PLT reloations. */ if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } else @@ -2292,7 +2292,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -2318,7 +2318,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -2339,7 +2339,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void * inf) sreloc->size += p->count * SPARC_ELF_RELA_BYTES (htab); } - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for @@ -2364,7 +2364,7 @@ allocate_local_dynrelocs (void **slot, void *inf) /* Return true if the dynamic symbol for a given section should be omitted when creating a shared library. */ -bfd_boolean +bool _bfd_sparc_elf_omit_section_dynsym (bfd *output_bfd, struct bfd_link_info *info, asection *p) @@ -2373,14 +2373,14 @@ _bfd_sparc_elf_omit_section_dynsym (bfd *output_bfd, against the _GLOBAL_OFFSET_TABLE_ symbol emitted in PIC mode can be turned into relocations against the .got symbol. */ if (strcmp (p->name, ".got") == 0) - return FALSE; + return false; return _bfd_elf_omit_section_dynsym_default (output_bfd, info, p); } /* Set the sizes of the dynamic sections. */ -bfd_boolean +bool _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -2578,7 +2578,7 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, at the beginning, and we don't want garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } if (elf_hash_table (info)->dynamic_sections_created) @@ -2592,8 +2592,8 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, _bfd_elf_add_dynamic_entry (info, TAG, VAL) if (!_bfd_elf_maybe_vxworks_add_dynamic_tags (output_bfd, info, - TRUE)) - return FALSE; + true)) + return false; if (ABI_64_P (output_bfd)) { @@ -2613,12 +2613,12 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, struct elf_link_local_dynamic_entry *entry, *e; if (!add_dynamic_entry (DT_SPARC_REGISTER, 0)) - return FALSE; + return false; entry = (struct elf_link_local_dynamic_entry *) bfd_hash_allocate (&info->hash->table, sizeof (*entry)); if (entry == NULL) - return FALSE; + return false; /* We cheat here a little bit: the symbol will not be local, so we put it at the end of the dynlocal linked list. We will fix it @@ -2627,7 +2627,7 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, entry->isym.st_size = 0; if (*app_regs [reg].name != '\0') entry->isym.st_name - = _bfd_elf_strtab_add (dynstr, app_regs[reg].name, FALSE); + = _bfd_elf_strtab_add (dynstr, app_regs[reg].name, false); else entry->isym.st_name = 0; entry->isym.st_other = 0; @@ -2653,10 +2653,10 @@ _bfd_sparc_elf_size_dynamic_sections (bfd *output_bfd, } #undef add_dynamic_entry - return TRUE; + return true; } -bfd_boolean +bool _bfd_sparc_elf_new_section_hook (bfd *abfd, asection *sec) { if (!sec->used_by_bfd) @@ -2666,26 +2666,26 @@ _bfd_sparc_elf_new_section_hook (bfd *abfd, asection *sec) sdata = bfd_zalloc (abfd, amt); if (sdata == NULL) - return FALSE; + return false; sec->used_by_bfd = sdata; } return _bfd_elf_new_section_hook (abfd, sec); } -bfd_boolean +bool _bfd_sparc_elf_relax_section (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_section *section, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, - bfd_boolean *again) + bool *again) { if (bfd_link_relocatable (link_info)) (*link_info->callbacks->einfo) (_("%P%F: --relax and -r may not be used together\n")); - *again = FALSE; + *again = false; sec_do_relax (section) = 1; - return TRUE; + return true; } /* Return the base VMA address which should be subtracted from real addresses @@ -2739,13 +2739,13 @@ gdopoff (struct bfd_link_info *info, bfd_vma address) _GLOBAL_OFFSET_TABLE_ and thus the offset may be calculated by a sethi, xor sequence. */ -static bfd_boolean +static bool gdop_relative_offset_ok (struct bfd_link_info *info, struct elf_link_hash_entry *h, bfd_vma address ATTRIBUTE_UNUSED) { if (!SYMBOL_REFERENCES_LOCAL (info, h)) - return FALSE; + return false; /* If H is undefined, ADDRESS will be zero. We can't allow a relative offset to "zero" when producing PIEs or shared libs. Note that to get here with an undefined symbol it must also be @@ -2754,11 +2754,11 @@ gdop_relative_offset_ok (struct bfd_link_info *info, && h != NULL && (h->root.type == bfd_link_hash_undefweak || h->root.type == bfd_link_hash_undefined)) - return FALSE; + return false; #ifdef BFD64 return gdopoff (info, address) + ((bfd_vma) 1 << 32) < (bfd_vma) 2 << 32; #else - return TRUE; + return true; #endif } @@ -2783,7 +2783,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, Elf_Internal_Rela *rel; Elf_Internal_Rela *relend; int num_relocs; - bfd_boolean is_vxworks_tls; + bool is_vxworks_tls; htab = _bfd_sparc_elf_hash_table (info); BFD_ASSERT (htab != NULL); @@ -2821,10 +2821,10 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, asection *sec; bfd_vma relocation, off; bfd_reloc_status_type r; - bfd_boolean is_plt = FALSE; - bfd_boolean unresolved_reloc; - bfd_boolean resolved_to_zero; - bfd_boolean relative_reloc; + bool is_plt = false; + bool unresolved_reloc; + bool resolved_to_zero; + bool relative_reloc; r_type = SPARC_ELF_R_TYPE (rel->r_info); if (r_type == R_SPARC_GNU_VTINHERIT @@ -2834,7 +2834,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, if (r_type < 0 || r_type >= (int) R_SPARC_max_std) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } howto = _bfd_sparc_elf_howto_table + r_type; @@ -2842,7 +2842,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -2854,7 +2854,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, { /* Relocate against local STT_GNU_IFUNC symbol. */ h = elf_sparc_get_local_sym_hash (htab, input_bfd, - rel, FALSE); + rel, false); if (h == NULL) abort (); @@ -2865,7 +2865,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, } else { - bfd_boolean warned, ignored; + bool warned, ignored; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2922,7 +2922,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, howto->name, h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } plt_sec = htab->elf.splt; @@ -3023,7 +3023,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, _bfd_sparc_elf_howto_table[r_type].name, name, __FUNCTION__); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -3095,10 +3095,10 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, if (htab->elf.sgot == NULL) abort (); - relative_reloc = FALSE; + relative_reloc = false; if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -3132,7 +3132,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, && !h->forced_local && h->root.type != bfd_link_hash_undefweak && bfd_link_pic (info)) - relative_reloc = TRUE; + relative_reloc = true; else SPARC_ELF_PUT_WORD (htab, output_bfd, relocation, htab->elf.sgot->contents + off); @@ -3140,7 +3140,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -3159,7 +3159,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, /* For a local symbol in PIC mode, we need to generate a R_SPARC_RELATIVE reloc for the dynamic linker. */ if (bfd_link_pic (info)) - relative_reloc = TRUE; + relative_reloc = true; else SPARC_ELF_PUT_WORD (htab, output_bfd, relocation, htab->elf.sgot->contents + off); @@ -3240,11 +3240,11 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, relocation = (htab->elf.splt->output_section->vma + htab->elf.splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_type == R_SPARC_PLT32 || r_type == R_SPARC_PLT64) { r_type = r_type == R_SPARC_PLT32 ? R_SPARC_32 : R_SPARC_64; - is_plt = TRUE; + is_plt = true; goto r_sparc_plt32; } break; @@ -3318,7 +3318,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, || h->root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate = FALSE; + bool skip, relocate = false; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -3326,15 +3326,15 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, BFD_ASSERT (sreloc != NULL); - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -3376,7 +3376,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, FIXME: Add code tracking needed dynamic relocs as e.g. i386 has. */ if (h->dynindx == -1) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; break; } @@ -3417,7 +3417,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -3446,7 +3446,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, (_("%pB: probably compiled without -fPIC?"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -3582,7 +3582,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, abort (); relocation = htab->elf.sgot->output_offset + off - got_base; - unresolved_reloc = FALSE; + unresolved_reloc = false; howto = _bfd_sparc_elf_howto_table + r_type; break; @@ -3723,8 +3723,8 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, } h = (struct elf_link_hash_entry *) - bfd_link_hash_lookup (info->hash, "__tls_get_addr", FALSE, - FALSE, TRUE); + bfd_link_hash_lookup (info->hash, "__tls_get_addr", false, + false, true); BFD_ASSERT (h != NULL); r_type = R_SPARC_WPLT30; howto = _bfd_sparc_elf_howto_table + r_type; @@ -4101,7 +4101,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, symtab_hdr->sh_link, sym->st_name); if (name == NULL) - return FALSE; + return false; if (*name == '\0') name = bfd_section_name (sec); } @@ -4114,7 +4114,7 @@ _bfd_sparc_elf_relocate_section (bfd *output_bfd, } } - return TRUE; + return true; } /* Build a VxWorks PLT entry. PLT_INDEX is the index of the PLT entry @@ -4213,7 +4213,7 @@ sparc_vxworks_build_plt_entry (bfd *output_bfd, struct bfd_link_info *info, /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -bfd_boolean +bool _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -4222,7 +4222,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd, struct _bfd_sparc_elf_link_hash_table *htab; const struct elf_backend_data *bed; struct _bfd_sparc_elf_link_hash_entry *eh; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; htab = _bfd_sparc_elf_hash_table (info); BFD_ASSERT (htab != NULL); @@ -4286,7 +4286,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd, } else { - bfd_boolean ifunc = FALSE; + bool ifunc = false; /* Fill in the entry in the procedure linkage table. */ rela_index = SPARC_ELF_BUILD_PLT_ENTRY (htab, output_bfd, splt, @@ -4300,7 +4300,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd, && h->def_regular && h->type == STT_GNU_IFUNC)) { - ifunc = TRUE; + ifunc = true; BFD_ASSERT (h == NULL || (h->type == STT_GNU_IFUNC && h->def_regular @@ -4413,7 +4413,7 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd, + plt->output_offset + h->plt.offset), htab->elf.sgot->contents + (h->got.offset & ~(bfd_vma) 1)); - return TRUE; + return true; } if (bfd_link_pic (info) && SYMBOL_REFERENCES_LOCAL (info, h)) @@ -4467,12 +4467,12 @@ _bfd_sparc_elf_finish_dynamic_symbol (bfd *output_bfd, && (h == htab->elf.hgot || h == htab->elf.hplt)))) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bfd *dynobj, asection *sdyn, asection *splt ATTRIBUTE_UNUSED) @@ -4482,7 +4482,7 @@ sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bfd_byte *dyncon, *dynconend; size_t dynsize; int stt_regidx = -1; - bfd_boolean abi_64_p; + bool abi_64_p; htab = _bfd_sparc_elf_hash_table (info); BFD_ASSERT (htab != NULL); @@ -4493,7 +4493,7 @@ sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, for (dyncon = sdyn->contents; dyncon < dynconend; dyncon += dynsize) { Elf_Internal_Dyn dyn; - bfd_boolean size; + bool size; bed->s->swap_dyn_in (dynobj, dyncon, &dyn); @@ -4518,7 +4518,7 @@ sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, stt_regidx = _bfd_elf_link_lookup_local_dynindx (info, output_bfd, -1); if (stt_regidx == -1) - return FALSE; + return false; } dyn.d_un.d_val = stt_regidx++; bed->s->swap_dyn_out (output_bfd, &dyn, dyncon); @@ -4531,15 +4531,15 @@ sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, { case DT_PLTGOT: s = htab->elf.splt; - size = FALSE; + size = false; break; case DT_PLTRELSZ: s = htab->elf.srelplt; - size = TRUE; + size = true; break; case DT_JMPREL: s = htab->elf.srelplt; - size = FALSE; + size = false; break; default: continue; @@ -4557,7 +4557,7 @@ sparc_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bed->s->swap_dyn_out (output_bfd, &dyn, dyncon); } } - return TRUE; + return true; } /* Install the first PLT entry in a VxWorks executable and make sure that @@ -4674,7 +4674,7 @@ finish_local_dynamic_symbol (void **slot, void *inf) here since undefined weak symbol may not be dynamic and may not be called for _bfd_sparc_elf_finish_dynamic_symbol. */ -static bfd_boolean +static bool pie_finish_undefweak_symbol (struct bfd_hash_entry *bh, void *inf) { @@ -4683,13 +4683,13 @@ pie_finish_undefweak_symbol (struct bfd_hash_entry *bh, if (h->root.type != bfd_link_hash_undefweak || h->dynindx != -1) - return TRUE; + return true; return _bfd_sparc_elf_finish_dynamic_symbol (info->output_bfd, info, h, NULL); } -bfd_boolean +bool _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { bfd *dynobj; @@ -4728,7 +4728,7 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i BFD_ASSERT (splt != NULL && sdyn != NULL); if (!sparc_finish_dyn (output_bfd, info, dynobj, sdyn, splt)) - return FALSE; + return false; /* Initialize the contents of the .plt section. */ if (splt->size > 0) @@ -4779,13 +4779,13 @@ _bfd_sparc_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *i bfd_hash_traverse (&info->hash->table, pie_finish_undefweak_symbol, info); - return TRUE; + return true; } /* Set the right machine number for a SPARC ELF file. */ -bfd_boolean +bool _bfd_sparc_elf_object_p (bfd *abfd) { obj_attribute *attrs = elf_known_obj_attributes (abfd)[OBJ_ATTR_GNU]; @@ -4878,7 +4878,7 @@ _bfd_sparc_elf_object_p (bfd *abfd) return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc_v8plus); else - return FALSE; + return false; } else if (elf_elfheader (abfd)->e_flags & EF_SPARC_LEDATA) return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, @@ -4913,7 +4913,7 @@ _bfd_sparc_elf_plt_sym_val (bfd_vma i, const asection *plt, const arelent *rel) /* Merge backend specific data from an object file to the output object file when linking. */ -bfd_boolean +bool _bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -4929,7 +4929,7 @@ _bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) initialized. */ elf_known_obj_attributes_proc (obfd)[0].i = 1; - return TRUE; + return true; } in_attrs = elf_known_obj_attributes (ibfd)[OBJ_ATTR_GNU]; @@ -4950,5 +4950,5 @@ _bfd_sparc_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) /* Merge Tag_compatibility attributes and any common GNU ones. */ _bfd_elf_merge_object_attributes (ibfd, info); - return TRUE; + return true; } diff --git a/bfd/elfxx-sparc.h b/bfd/elfxx-sparc.h index 18f5a60ce8..17fa8688cf 100644 --- a/bfd/elfxx-sparc.h +++ b/bfd/elfxx-sparc.h @@ -92,50 +92,50 @@ extern reloc_howto_type *_bfd_sparc_elf_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); extern reloc_howto_type *_bfd_sparc_elf_reloc_name_lookup (bfd *, const char *); -extern bfd_boolean _bfd_sparc_elf_info_to_howto +extern bool _bfd_sparc_elf_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *); extern reloc_howto_type *_bfd_sparc_elf_info_to_howto_ptr (bfd*, unsigned int); -extern bfd_boolean _bfd_sparc_elf_mkobject +extern bool _bfd_sparc_elf_mkobject (bfd *); extern struct bfd_link_hash_table *_bfd_sparc_elf_link_hash_table_create (bfd *); -extern bfd_boolean _bfd_sparc_elf_create_dynamic_sections +extern bool _bfd_sparc_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); extern void _bfd_sparc_elf_copy_indirect_symbol (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_sparc_elf_check_relocs +extern bool _bfd_sparc_elf_check_relocs (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); extern asection *_bfd_sparc_elf_gc_mark_hook (asection *, struct bfd_link_info *, Elf_Internal_Rela *, struct elf_link_hash_entry *, Elf_Internal_Sym *); -extern bfd_boolean _bfd_sparc_elf_adjust_dynamic_symbol +extern bool _bfd_sparc_elf_adjust_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_sparc_elf_omit_section_dynsym +extern bool _bfd_sparc_elf_omit_section_dynsym (bfd *, struct bfd_link_info *, asection *); -extern bfd_boolean _bfd_sparc_elf_size_dynamic_sections +extern bool _bfd_sparc_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_sparc_elf_new_section_hook +extern bool _bfd_sparc_elf_new_section_hook (bfd *, asection *); -extern bfd_boolean _bfd_sparc_elf_relax_section - (bfd *, struct bfd_section *, struct bfd_link_info *, bfd_boolean *); +extern bool _bfd_sparc_elf_relax_section + (bfd *, struct bfd_section *, struct bfd_link_info *, bool *); extern int _bfd_sparc_elf_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, Elf_Internal_Rela *, Elf_Internal_Sym *, asection **); -extern bfd_boolean _bfd_sparc_elf_finish_dynamic_symbol +extern bool _bfd_sparc_elf_finish_dynamic_symbol (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *sym); -extern bfd_boolean _bfd_sparc_elf_finish_dynamic_sections +extern bool _bfd_sparc_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_sparc_elf_fixup_symbol +extern bool _bfd_sparc_elf_fixup_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_sparc_elf_object_p +extern bool _bfd_sparc_elf_object_p (bfd *); extern bfd_vma _bfd_sparc_elf_plt_sym_val (bfd_vma, const asection *, const arelent *); -extern bfd_boolean _bfd_sparc_elf_merge_private_bfd_data +extern bool _bfd_sparc_elf_merge_private_bfd_data (bfd *, struct bfd_link_info *); diff --git a/bfd/elfxx-target.h b/bfd/elfxx-target.h index c930b767bf..4c6b1f2034 100644 --- a/bfd/elfxx-target.h +++ b/bfd/elfxx-target.h @@ -130,13 +130,13 @@ #define elf_backend_extern_protected_data 0 #endif #ifndef elf_backend_always_renumber_dynsyms -#define elf_backend_always_renumber_dynsyms FALSE +#define elf_backend_always_renumber_dynsyms false #endif #ifndef elf_backend_linux_prpsinfo32_ugid16 -#define elf_backend_linux_prpsinfo32_ugid16 FALSE +#define elf_backend_linux_prpsinfo32_ugid16 false #endif #ifndef elf_backend_linux_prpsinfo64_ugid16 -#define elf_backend_linux_prpsinfo64_ugid16 FALSE +#define elf_backend_linux_prpsinfo64_ugid16 false #endif #ifndef elf_backend_stack_align #define elf_backend_stack_align 16 @@ -408,10 +408,10 @@ #endif #ifndef elf_backend_collect -#define elf_backend_collect FALSE +#define elf_backend_collect false #endif #ifndef elf_backend_type_change_ok -#define elf_backend_type_change_ok FALSE +#define elf_backend_type_change_ok false #endif #ifndef elf_backend_sym_is_global diff --git a/bfd/elfxx-tilegx.c b/bfd/elfxx-tilegx.c index ace9595076..28a1a43a96 100644 --- a/bfd/elfxx-tilegx.c +++ b/bfd/elfxx-tilegx.c @@ -74,348 +74,348 @@ static reloc_howto_type tilegx_elf_howto_table [] = 0, /* rightshift */ 3, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_NONE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #ifdef BFD64 /* A 64 bit absolute relocation. */ HOWTO (R_TILEGX_64, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_64", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffffffffffffULL, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #endif /* A 32 bit absolute relocation. */ HOWTO (R_TILEGX_32, /* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_32", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit absolute relocation. */ HOWTO (R_TILEGX_16, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_bitfield, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_16", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* An 8 bit absolute relocation. */ HOWTO (R_TILEGX_8, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_unsigned, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_8", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ #ifdef BFD64 /* A 64 bit pc-relative relocation. */ HOWTO (R_TILEGX_64_PCREL,/* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 64, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffffffffffffULL, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ #endif /* A 32 bit pc-relative relocation. */ HOWTO (R_TILEGX_32_PCREL,/* type */ 0, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 32, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_32_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffffffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit pc-relative relocation. */ HOWTO (R_TILEGX_16_PCREL,/* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_16_PCREL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* An 8 bit pc-relative relocation. */ HOWTO (R_TILEGX_8_PCREL, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 8, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_8_PCREL",/* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xff, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ /* A 16 bit relocation without overflow. */ HOWTO (R_TILEGX_HW0, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_HW0", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit relocation without overflow. */ HOWTO (R_TILEGX_HW1, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_HW1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit relocation without overflow. */ HOWTO (R_TILEGX_HW2, /* type */ 32, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_HW2", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit relocation without overflow. */ HOWTO (R_TILEGX_HW3, /* type */ 48, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_HW3", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit relocation with overflow. */ HOWTO (R_TILEGX_HW0_LAST, /* type */ 0, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_HW0_LAST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit relocation with overflow. */ HOWTO (R_TILEGX_HW1_LAST, /* type */ 16, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_HW1_LAST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* A 16 bit relocation with overflow. */ HOWTO (R_TILEGX_HW2_LAST, /* type */ 32, /* rightshift */ 1, /* size (0 = byte, 1 = short, 2 = long) */ 16, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_HW2_LAST", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0xffff, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ HOWTO (R_TILEGX_COPY, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_COPY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEGX_GLOB_DAT, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_GLOB_DAT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEGX_JMP_SLOT, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_JMP_SLOT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEGX_RELATIVE, /* type */ 0, /* rightshift */ 0, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_RELATIVE", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEGX_BROFF_X1, /* type */ TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 17, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed, /* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_BROFF_X1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEGX_JUMPOFF_X1, /* type */ TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_JUMPOFF_X1", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ HOWTO (R_TILEGX_JUMPOFF_X1_PLT, /* type */ TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_JUMPOFF_X1_PLT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ #define TILEGX_IMM_HOWTO(name, size, bitsize) \ - HOWTO (name, 0, size, bitsize, FALSE, 0, \ + HOWTO (name, 0, size, bitsize, false, 0, \ complain_overflow_signed, bfd_elf_generic_reloc, \ - #name, FALSE, 0, -1, FALSE) + #name, false, 0, -1, false) #define TILEGX_UIMM_HOWTO(name, size, bitsize) \ - HOWTO (name, 0, size, bitsize, FALSE, 0, \ + HOWTO (name, 0, size, bitsize, false, 0, \ complain_overflow_unsigned, bfd_elf_generic_reloc, \ - #name, FALSE, 0, -1, FALSE) + #name, false, 0, -1, false) TILEGX_IMM_HOWTO(R_TILEGX_IMM8_X0, 0, 8), TILEGX_IMM_HOWTO(R_TILEGX_IMM8_Y0, 0, 8), @@ -435,9 +435,9 @@ static reloc_howto_type tilegx_elf_howto_table [] = TILEGX_UIMM_HOWTO(R_TILEGX_SHAMT_Y1, 0, 6), #define TILEGX_IMM16_HOWTO(name, rshift) \ - HOWTO (name, rshift, 1, 16, FALSE, 0, \ + HOWTO (name, rshift, 1, 16, false, 0, \ complain_overflow_dont, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, FALSE) + #name, false, 0, 0xffff, false) TILEGX_IMM16_HOWTO (R_TILEGX_IMM16_X0_HW0, 0), TILEGX_IMM16_HOWTO (R_TILEGX_IMM16_X1_HW0, 0), @@ -449,9 +449,9 @@ static reloc_howto_type tilegx_elf_howto_table [] = TILEGX_IMM16_HOWTO (R_TILEGX_IMM16_X1_HW3, 48), #define TILEGX_IMM16_HOWTO_LAST(name, rshift) \ - HOWTO (name, rshift, 1, 16, FALSE, 0, \ + HOWTO (name, rshift, 1, 16, false, 0, \ complain_overflow_signed, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, FALSE) + #name, false, 0, 0xffff, false) TILEGX_IMM16_HOWTO_LAST (R_TILEGX_IMM16_X0_HW0_LAST, 0), TILEGX_IMM16_HOWTO_LAST (R_TILEGX_IMM16_X1_HW0_LAST, 0), @@ -463,9 +463,9 @@ static reloc_howto_type tilegx_elf_howto_table [] = /* PC-relative offsets. */ #define TILEGX_IMM16_HOWTO_PCREL(name, rshift) \ - HOWTO (name, rshift, 1, 16, TRUE, 0, \ + HOWTO (name, rshift, 1, 16, true, 0, \ complain_overflow_dont, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, TRUE) + #name, false, 0, 0xffff, true) TILEGX_IMM16_HOWTO_PCREL (R_TILEGX_IMM16_X0_HW0_PCREL, 0), TILEGX_IMM16_HOWTO_PCREL (R_TILEGX_IMM16_X1_HW0_PCREL, 0), @@ -477,9 +477,9 @@ static reloc_howto_type tilegx_elf_howto_table [] = TILEGX_IMM16_HOWTO_PCREL (R_TILEGX_IMM16_X1_HW3_PCREL, 48), #define TILEGX_IMM16_HOWTO_LAST_PCREL(name, rshift) \ - HOWTO (name, rshift, 1, 16, TRUE, 0, \ + HOWTO (name, rshift, 1, 16, true, 0, \ complain_overflow_signed, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, TRUE) + #name, false, 0, 0xffff, true) TILEGX_IMM16_HOWTO_LAST_PCREL (R_TILEGX_IMM16_X0_HW0_LAST_PCREL, 0), TILEGX_IMM16_HOWTO_LAST_PCREL (R_TILEGX_IMM16_X1_HW0_LAST_PCREL, 0), @@ -524,9 +524,9 @@ static reloc_howto_type tilegx_elf_howto_table [] = EMPTY_HOWTO (91), #define TILEGX_IMM16_HOWTO_TLS_IE(name, rshift) \ - HOWTO (name, rshift, 1, 16, FALSE, 0, \ + HOWTO (name, rshift, 1, 16, false, 0, \ complain_overflow_dont, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, TRUE) + #name, false, 0, 0xffff, true) TILEGX_IMM16_HOWTO_TLS_IE (R_TILEGX_IMM16_X0_HW0_TLS_IE, 0), TILEGX_IMM16_HOWTO_TLS_IE (R_TILEGX_IMM16_X1_HW0_TLS_IE, 0), @@ -539,9 +539,9 @@ static reloc_howto_type tilegx_elf_howto_table [] = TILEGX_IMM16_HOWTO_LAST_PCREL (R_TILEGX_IMM16_X1_HW2_LAST_PLT_PCREL, 32), #define TILEGX_IMM16_HOWTO_LAST_TLS_IE(name, rshift) \ - HOWTO (name, rshift, 1, 16, FALSE, 0, \ + HOWTO (name, rshift, 1, 16, false, 0, \ complain_overflow_signed, bfd_elf_generic_reloc, \ - #name, FALSE, 0, 0xffff, TRUE) + #name, false, 0, 0xffff, true) TILEGX_IMM16_HOWTO_LAST_TLS_IE (R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE, 0), TILEGX_IMM16_HOWTO_LAST_TLS_IE (R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE, 0), @@ -550,39 +550,39 @@ static reloc_howto_type tilegx_elf_howto_table [] = EMPTY_HOWTO (104), EMPTY_HOWTO (105), - HOWTO(R_TILEGX_TLS_DTPMOD64, 0, 0, 0, FALSE, 0, complain_overflow_dont, + HOWTO(R_TILEGX_TLS_DTPMOD64, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_TILEGX_TLS_DTPMOD64", - FALSE, 0, 0, TRUE), - HOWTO(R_TILEGX_TLS_DTPOFF64, 0, 4, 64, FALSE, 0, complain_overflow_bitfield, + false, 0, 0, true), + HOWTO(R_TILEGX_TLS_DTPOFF64, 0, 4, 64, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_TILEGX_TLS_DTPOFF64", - FALSE, 0, -1, TRUE), - HOWTO(R_TILEGX_TLS_TPOFF64, 0, 0, 0, FALSE, 0, complain_overflow_dont, + false, 0, -1, true), + HOWTO(R_TILEGX_TLS_TPOFF64, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_TILEGX_TLS_TPOFF64", - FALSE, 0, 0, TRUE), + false, 0, 0, true), - HOWTO(R_TILEGX_TLS_DTPMOD32, 0, 0, 0, FALSE, 0, complain_overflow_dont, + HOWTO(R_TILEGX_TLS_DTPMOD32, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_TILEGX_TLS_DTPMOD32", - FALSE, 0, 0, TRUE), - HOWTO(R_TILEGX_TLS_DTPOFF32, 0, 4, 32, FALSE, 0, complain_overflow_bitfield, + false, 0, 0, true), + HOWTO(R_TILEGX_TLS_DTPOFF32, 0, 4, 32, false, 0, complain_overflow_bitfield, bfd_elf_generic_reloc, "R_TILEGX_TLS_DTPOFF32", - FALSE, 0, -1, TRUE), - HOWTO(R_TILEGX_TLS_TPOFF32, 0, 0, 0, FALSE, 0, complain_overflow_dont, + false, 0, -1, true), + HOWTO(R_TILEGX_TLS_TPOFF32, 0, 0, 0, false, 0, complain_overflow_dont, bfd_elf_generic_reloc, "R_TILEGX_TLS_TPOFF32", - FALSE, 0, 0, TRUE), + false, 0, 0, true), HOWTO (R_TILEGX_TLS_GD_CALL, /* type */ TILEGX_LOG2_BUNDLE_ALIGNMENT_IN_BYTES, /* rightshift */ 2, /* size (0 = byte, 1 = short, 2 = long) */ 27, /* bitsize */ - TRUE, /* pc_relative */ + true, /* pc_relative */ 0, /* bitpos */ complain_overflow_signed,/* complain_on_overflow */ bfd_elf_generic_reloc, /* special_function */ "R_TILEGX_TLS_GD_CALL", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ -1, /* dst_mask */ - TRUE), /* pcrel_offset */ + true), /* pcrel_offset */ TILEGX_IMM_HOWTO(R_TILEGX_IMM8_X0_TLS_GD_ADD, 0, 8), TILEGX_IMM_HOWTO(R_TILEGX_IMM8_X1_TLS_GD_ADD, 0, 8), @@ -602,30 +602,30 @@ static reloc_howto_type tilegx_elf_howto_table2 [] = 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ NULL, /* special_function */ "R_TILEGX_GNU_VTINHERIT", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ /* GNU extension to record C++ vtable member usage */ HOWTO (R_TILEGX_GNU_VTENTRY, /* type */ 0, /* rightshift */ 4, /* size (0 = byte, 1 = short, 2 = long) */ 0, /* bitsize */ - FALSE, /* pc_relative */ + false, /* pc_relative */ 0, /* bitpos */ complain_overflow_dont, /* complain_on_overflow */ _bfd_elf_rel_vtable_reloc_fn, /* special_function */ "R_TILEGX_GNU_VTENTRY", /* name */ - FALSE, /* partial_inplace */ + false, /* partial_inplace */ 0, /* src_mask */ 0, /* dst_mask */ - FALSE), /* pcrel_offset */ + false), /* pcrel_offset */ }; @@ -834,7 +834,7 @@ struct tilegx_elf_link_hash_table /* Whether LE transition has been disabled for some of the sections. */ - bfd_boolean disable_le_transition; + bool disable_le_transition; }; @@ -927,7 +927,7 @@ tilegx_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -bfd_boolean +bool tilegx_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, arelent *cache_ptr, Elf_Internal_Rela *dst) @@ -947,9 +947,9 @@ tilegx_info_to_howto_rela (bfd *abfd ATTRIBUTE_UNUSED, _bfd_error_handler (_("%pB: unsupported relocation type %#x"), abfd, r_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } typedef tilegx_bundle_bits (*tilegx_create_func)(int); @@ -1275,7 +1275,7 @@ tilegx_plt_entry_build (bfd *output_bfd, bfd_signed_vma dist_got0 = dist_got_entry - got_offset; /* Check whether we can use the short plt entry with 16-bit offset. */ - bfd_boolean short_plt_entry = + bool short_plt_entry = (dist_got_entry <= 0x7fff && dist_got0 >= -0x8000); const tilegx_bundle_bits *plt_entry = (tilegx_bundle_bits *) @@ -1411,7 +1411,7 @@ tilegx_elf_link_hash_table_create (bfd *abfd) /* Create the .got section. */ -static bfd_boolean +static bool tilegx_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) { flagword flags; @@ -1422,7 +1422,7 @@ tilegx_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) /* This function may be called more than once. */ if (htab->sgot != NULL) - return TRUE; + return true; flags = bed->dynamic_sec_flags; @@ -1433,13 +1433,13 @@ tilegx_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) | SEC_READONLY)); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->srelgot = s; s = s_got = bfd_make_section_anyway_with_flags (abfd, ".got", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgot = s; /* The first bit of the global offset table is the header. */ @@ -1450,7 +1450,7 @@ tilegx_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) s = bfd_make_section_anyway_with_flags (abfd, ".got.plt", flags); if (s == NULL || !bfd_set_section_alignment (s, bed->s->log_file_align)) - return FALSE; + return false; htab->sgotplt = s; /* Reserve room for the header. */ @@ -1467,22 +1467,22 @@ tilegx_elf_create_got_section (bfd *abfd, struct bfd_link_info *info) "_GLOBAL_OFFSET_TABLE_"); elf_hash_table (info)->hgot = h; if (h == NULL) - return FALSE; + return false; } - return TRUE; + return true; } /* Create .plt, .rela.plt, .got, .got.plt, .rela.got, .dynbss, and .rela.bss sections in DYNOBJ, and set up shortcuts to them in our hash table. */ -bfd_boolean +bool tilegx_elf_create_dynamic_sections (bfd *dynobj, struct bfd_link_info *info) { if (!tilegx_elf_create_got_section (dynobj, info)) - return FALSE; + return false; return _bfd_elf_create_dynamic_sections (dynobj, info); } @@ -1574,7 +1574,7 @@ tilegx_tls_translate_to_ie (int r_type) static int tilegx_elf_tls_transition (struct bfd_link_info *info, int r_type, - int is_local, bfd_boolean disable_le_transition) + int is_local, bool disable_le_transition) { if (!bfd_link_executable (info)) return r_type; @@ -1589,7 +1589,7 @@ tilegx_elf_tls_transition (struct bfd_link_info *info, int r_type, allocate space in the global offset table or procedure linkage table. */ -bfd_boolean +bool tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, asection *sec, const Elf_Internal_Rela *relocs) { @@ -1600,10 +1600,10 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Rela *rel_end; asection *sreloc; int num_relocs; - bfd_boolean has_tls_gd_or_ie = FALSE, has_tls_add = FALSE; + bool has_tls_gd_or_ie = false, has_tls_add = false; if (bfd_link_relocatable (info)) - return TRUE; + return true; htab = tilegx_elf_hash_table (info); symtab_hdr = &elf_tdata (abfd)->symtab_hdr; @@ -1632,13 +1632,13 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { case R_TILEGX_TLS_GD_CALL: case R_TILEGX_TLS_IE_LOAD: - has_tls_gd_or_ie = TRUE; + has_tls_gd_or_ie = true; break; case R_TILEGX_IMM8_X0_TLS_ADD: case R_TILEGX_IMM8_Y0_TLS_ADD: case R_TILEGX_IMM8_X1_TLS_ADD: case R_TILEGX_IMM8_Y1_TLS_ADD: - has_tls_add = TRUE; + has_tls_add = true; break; } } @@ -1661,7 +1661,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ _bfd_error_handler (_("%pB: bad symbol index: %d"), abfd, r_symndx); - return FALSE; + return false; } if (r_symndx < symtab_hdr->sh_info) @@ -1743,7 +1743,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, local_got_refcounts = ((bfd_signed_vma *) bfd_zalloc (abfd, size)); if (local_got_refcounts == NULL) - return FALSE; + return false; elf_local_got_refcounts (abfd) = local_got_refcounts; _bfd_tilegx_elf_local_got_tls_type (abfd) = (char *) (local_got_refcounts + symtab_hdr->sh_info); @@ -1766,7 +1766,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, /* xgettext:c-format */ (_("%pB: `%s' accessed both as normal and thread local symbol"), abfd, h ? h->root.root.string : ""); - return FALSE; + return false; } } @@ -1782,7 +1782,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (htab->elf.sgot == NULL) { if (!tilegx_elf_create_got_section (htab->elf.dynobj, info)) - return FALSE; + return false; } break; @@ -1795,9 +1795,9 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, if (! _bfd_generic_link_add_one_symbol (info, abfd, "__tls_get_addr", 0, bfd_und_section_ptr, 0, - NULL, FALSE, FALSE, + NULL, false, false, &bh)) - return FALSE; + return false; h = (struct elf_link_hash_entry *) bh; } else @@ -1957,10 +1957,10 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, { sreloc = _bfd_elf_make_dynamic_reloc_section (sec, htab->elf.dynobj, htab->word_align_power, abfd, - /*rela?*/ TRUE); + /*rela?*/ true); if (sreloc == NULL) - return FALSE; + return false; } /* If this is a global symbol, we count the number of @@ -1980,7 +1980,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, isym = bfd_sym_from_r_symndx (&htab->elf.sym_cache, abfd, r_symndx); if (isym == NULL) - return FALSE; + return false; s = bfd_section_from_elf_index (abfd, isym->st_shndx); if (s == NULL) @@ -1997,7 +1997,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, p = ((struct elf_dyn_relocs *) bfd_alloc (htab->elf.dynobj, amt)); if (p == NULL) - return FALSE; + return false; p->next = *head; *head = p; p->sec = sec; @@ -2014,12 +2014,12 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, case R_TILEGX_GNU_VTINHERIT: if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset)) - return FALSE; + return false; break; case R_TILEGX_GNU_VTENTRY: if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_addend)) - return FALSE; + return false; break; default: @@ -2027,7 +2027,7 @@ tilegx_elf_check_relocs (bfd *abfd, struct bfd_link_info *info, } } - return TRUE; + return true; } @@ -2066,8 +2066,8 @@ tilegx_elf_gc_mark_hook (asection *sec, if (! _bfd_generic_link_add_one_symbol (info, sec->owner, "__tls_get_addr", 0, bfd_und_section_ptr, - 0, NULL, FALSE, - FALSE, &bh)) + 0, NULL, false, + false, &bh)) return NULL; h = (struct elf_link_hash_entry *) bh; BFD_ASSERT (h != NULL); @@ -2087,7 +2087,7 @@ tilegx_elf_gc_mark_hook (asection *sec, change the definition to something the rest of the link can understand. */ -bfd_boolean +bool tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2128,7 +2128,7 @@ tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else h->plt.offset = (bfd_vma) -1; @@ -2142,7 +2142,7 @@ tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info, BFD_ASSERT (def->root.type == bfd_link_hash_defined); h->root.u.def.section = def->root.u.def.section; h->root.u.def.value = def->root.u.def.value; - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -2153,18 +2153,18 @@ tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (bfd_link_pic (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT, we don't need to generate a copy reloc. */ if (!h->non_got_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc) { h->non_got_ref = 0; - return TRUE; + return true; } /* If we don't find any dynamic relocs in read-only sections, then @@ -2172,7 +2172,7 @@ tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } /* We must allocate the symbol in our .dynbss section, which will @@ -2211,7 +2211,7 @@ tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *info, /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -2219,7 +2219,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_dyn_relocs *p; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; info = (struct bfd_link_info *) inf; htab = tilegx_elf_hash_table (info); @@ -2234,7 +2234,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, bfd_link_pic (info), h)) @@ -2293,7 +2293,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) else if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = tilegx_elf_hash_entry(h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -2302,7 +2302,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->elf.sgot; @@ -2325,7 +2325,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -2365,7 +2365,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } } } @@ -2388,7 +2388,7 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !h->forced_local) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } /* If that succeeded, we know we'll be keeping all the @@ -2409,13 +2409,13 @@ allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) sreloc->size += p->count * TILEGX_ELF_RELA_BYTES (htab); } - return TRUE; + return true; } /* Return true if the dynamic symbol for a given section should be omitted when creating a shared library. */ -bfd_boolean +bool tilegx_elf_omit_section_dynsym (bfd *output_bfd, struct bfd_link_info *info, asection *p) @@ -2424,12 +2424,12 @@ tilegx_elf_omit_section_dynsym (bfd *output_bfd, against the _GLOBAL_OFFSET_TABLE_ symbol emitted in PIC mode can be turned into relocations against the .got symbol. */ if (strcmp (p->name, ".got") == 0) - return FALSE; + return false; return _bfd_elf_omit_section_dynsym_default (output_bfd, info, p); } -bfd_boolean +bool tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info) { @@ -2545,7 +2545,7 @@ tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, struct elf_link_hash_entry *got; got = elf_link_hash_lookup (elf_hash_table (info), "_GLOBAL_OFFSET_TABLE_", - FALSE, FALSE, FALSE); + false, false, false); /* Don't allocate .got.plt section if there are no GOT nor PLT entries and there is no refeence to _GLOBAL_OFFSET_TABLE_. */ @@ -2616,10 +2616,10 @@ tilegx_elf_size_dynamic_sections (bfd *output_bfd ATTRIBUTE_UNUSED, at the beginning, and we don't want garbage. */ s->contents = (bfd_byte *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } - return _bfd_elf_add_dynamic_tags (output_bfd, info, TRUE); + return _bfd_elf_add_dynamic_tags (output_bfd, info, true); } /* Return the base VMA address which should be subtracted from real addresses @@ -2832,7 +2832,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, for (; rel < relend; rel++) { int r_type, tls_type; - bfd_boolean is_tls_iele, is_tls_le; + bool is_tls_iele, is_tls_le; reloc_howto_type *howto; unsigned long r_symndx; struct elf_link_hash_entry *h; @@ -2843,9 +2843,9 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, bfd_reloc_status_type r; const char *name; bfd_vma off; - bfd_boolean is_plt = FALSE; - bfd_boolean resolved_to_zero; - bfd_boolean unresolved_reloc; + bool is_plt = false; + bool resolved_to_zero; + bool unresolved_reloc; r_type = TILEGX_ELF_R_TYPE (rel->r_info); if (r_type == R_TILEGX_GNU_VTINHERIT @@ -2862,7 +2862,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, h = NULL; sym = NULL; sec = NULL; - unresolved_reloc = FALSE; + unresolved_reloc = false; if (r_symndx < symtab_hdr->sh_info) { sym = local_syms + r_symndx; @@ -2871,8 +2871,8 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } else { - bfd_boolean warned ATTRIBUTE_UNUSED; - bfd_boolean ignored ATTRIBUTE_UNUSED; + bool warned ATTRIBUTE_UNUSED; + bool ignored ATTRIBUTE_UNUSED; RELOC_FOR_GLOBAL_SYMBOL (info, input_bfd, input_section, rel, r_symndx, symtab_hdr, sym_hashes, @@ -2953,8 +2953,8 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, /* GD -> GD */ h = (struct elf_link_hash_entry *) - bfd_link_hash_lookup (info->hash, "__tls_get_addr", FALSE, - FALSE, TRUE); + bfd_link_hash_lookup (info->hash, "__tls_get_addr", false, + false, true); BFD_ASSERT (h != NULL); r_type = R_TILEGX_JUMPOFF_X1_PLT; howto = tilegx_elf_howto_table + r_type; @@ -2964,10 +2964,10 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, || r_type == R_TILEGX_IMM8_Y0_TLS_ADD || r_type == R_TILEGX_IMM8_Y1_TLS_ADD) { - bfd_boolean is_pipe0 = + bool is_pipe0 = (r_type == R_TILEGX_IMM8_X0_TLS_ADD || r_type == R_TILEGX_IMM8_Y0_TLS_ADD); - bfd_boolean is_X0X1 = + bool is_X0X1 = (r_type == R_TILEGX_IMM8_X0_TLS_ADD || r_type == R_TILEGX_IMM8_X1_TLS_ADD); int dest_begin = is_pipe0 ? 0 : 31; @@ -3035,7 +3035,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { const bfd_byte *mask = NULL; const bfd_byte *add_insn = NULL; - bfd_boolean is_64bit = ABI_64_P (output_bfd); + bool is_64bit = ABI_64_P (output_bfd); switch (r_type) { @@ -3116,7 +3116,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (h != NULL) { - bfd_boolean dyn; + bool dyn; off = h->got.offset; BFD_ASSERT (off != (bfd_vma) -1); @@ -3150,7 +3150,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } else - unresolved_reloc = FALSE; + unresolved_reloc = false; } else { @@ -3224,7 +3224,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, relocation = (htab->elf.splt->output_section->vma + htab->elf.splt->output_offset + h->plt.offset); - unresolved_reloc = FALSE; + unresolved_reloc = false; break; case R_TILEGX_64_PCREL: @@ -3313,7 +3313,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, || h->root.type == bfd_link_hash_undefined))) { Elf_Internal_Rela outrel; - bfd_boolean skip, relocate = FALSE; + bool skip, relocate = false; /* When generating a shared object, these relocations are copied into the output file to be resolved at run @@ -3321,15 +3321,15 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, BFD_ASSERT (sreloc != NULL); - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); @@ -3345,7 +3345,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, FIXME: Add code tracking needed dynamic relocs as e.g. i386 has. */ if (h->dynindx == -1) - skip = TRUE, relocate = TRUE; + skip = true, relocate = true; break; } @@ -3386,7 +3386,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, else if (sec == NULL || sec->owner == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else { @@ -3415,7 +3415,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, (_("%pB: probably compiled without -fPIC?"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -3442,17 +3442,17 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, if (!bfd_link_executable (info)) { Elf_Internal_Rela outrel; - bfd_boolean skip; + bool skip; BFD_ASSERT (sreloc != NULL); - skip = FALSE; + skip = false; outrel.r_offset = _bfd_elf_section_offset (output_bfd, info, input_section, rel->r_offset); if (outrel.r_offset == (bfd_vma) -1) - skip = TRUE; + skip = true; else if (outrel.r_offset == (bfd_vma) -2) - skip = TRUE; + skip = true; outrel.r_offset += (input_section->output_section->vma + input_section->output_offset); if (skip) @@ -3534,14 +3534,14 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, { Elf_Internal_Rela outrel; int indx = 0; - bfd_boolean need_relocs = FALSE; + bool need_relocs = false; if (htab->elf.srelgot == NULL) abort (); if (h != NULL) { - bfd_boolean dyn; + bool dyn; dyn = htab->elf.dynamic_sections_created; if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, @@ -3560,7 +3560,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak)) - need_relocs = TRUE; + need_relocs = true; switch (r_type) { @@ -3644,7 +3644,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, abort (); relocation = off - got_base; - unresolved_reloc = FALSE; + unresolved_reloc = false; howto = tilegx_elf_howto_table + r_type; break; @@ -3735,7 +3735,7 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, case bfd_reloc_undefined: (*info->callbacks->undefined_symbol) - (info, name, input_bfd, input_section, rel->r_offset, TRUE); + (info, name, input_bfd, input_section, rel->r_offset, true); break; case bfd_reloc_outofrange: @@ -3761,13 +3761,13 @@ tilegx_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, } } - return TRUE; + return true; } /* Finish up dynamic symbol handling. We set the contents of various dynamic sections here. */ -bfd_boolean +bool tilegx_elf_finish_dynamic_symbol (bfd *output_bfd, struct bfd_link_info *info, struct elf_link_hash_entry *h, @@ -3907,12 +3907,12 @@ tilegx_elf_finish_dynamic_symbol (bfd *output_bfd, || (h == htab->elf.hgot || h == htab->elf.hplt)) sym->st_shndx = SHN_ABS; - return TRUE; + return true; } /* Finish up the dynamic sections. */ -static bfd_boolean +static bool tilegx_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bfd *dynobj, asection *sdyn, asection *splt ATTRIBUTE_UNUSED) @@ -3955,10 +3955,10 @@ tilegx_finish_dyn (bfd *output_bfd, struct bfd_link_info *info, bed->s->swap_dyn_out (output_bfd, &dyn, dyncon); } - return TRUE; + return true; } -bfd_boolean +bool tilegx_elf_finish_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -3976,7 +3976,7 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd, if (elf_hash_table (info)->dynamic_sections_created) { asection *splt; - bfd_boolean ret; + bool ret; splt = htab->elf.splt; BFD_ASSERT (splt != NULL && sdyn != NULL); @@ -4015,7 +4015,7 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd, { _bfd_error_handler (_("discarded output section: `%pA'"), htab->elf.sgotplt); - return FALSE; + return false; } if (htab->elf.sgotplt->size > 0) @@ -4050,7 +4050,7 @@ tilegx_elf_finish_dynamic_sections (bfd *output_bfd, } } - return TRUE; + return true; } @@ -4112,7 +4112,7 @@ tilegx_additional_program_headers (bfd *abfd, } -bfd_boolean +bool _bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -4126,8 +4126,8 @@ _bfd_tilegx_elf_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info) (_("%pB: cannot link together %s and %s objects"), ibfd, targ1, targ2); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/bfd/elfxx-tilegx.h b/bfd/elfxx-tilegx.h index ffcd59c85e..5d3648b309 100644 --- a/bfd/elfxx-tilegx.h +++ b/bfd/elfxx-tilegx.h @@ -40,23 +40,23 @@ tilegx_elf_copy_indirect_symbol (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); -extern bfd_boolean +extern bool tilegx_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool tilegx_elf_check_relocs (bfd *, struct bfd_link_info *, asection *, const Elf_Internal_Rela *); -extern bfd_boolean +extern bool tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -extern bfd_boolean +extern bool tilegx_elf_omit_section_dynsym (bfd *, struct bfd_link_info *, asection *); -extern bfd_boolean +extern bool tilegx_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); extern int @@ -76,20 +76,20 @@ tilegx_elf_gc_mark_hook (asection *, extern bfd_vma tilegx_elf_plt_sym_val (bfd_vma, const asection *, const arelent *); -extern bfd_boolean +extern bool tilegx_info_to_howto_rela (bfd *, arelent *, Elf_Internal_Rela *); extern int tilegx_additional_program_headers (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool tilegx_elf_finish_dynamic_symbol (bfd *, struct bfd_link_info *, struct elf_link_hash_entry *, Elf_Internal_Sym *); -extern bfd_boolean +extern bool tilegx_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean +extern bool _bfd_tilegx_elf_merge_private_bfd_data (bfd *, struct bfd_link_info *); diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index 81c1e5c7fa..62d516aab8 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -31,7 +31,7 @@ #define ELF64_DYNAMIC_INTERPRETER "/lib/ld64.so.1" #define ELFX32_DYNAMIC_INTERPRETER "/lib/ldx32.so.1" -bfd_boolean +bool _bfd_x86_elf_mkobject (bfd *abfd) { return bfd_elf_allocate_object (abfd, @@ -82,7 +82,7 @@ _bfd_x86_elf_dtpoff_base (struct bfd_link_info *info) /* Allocate space in .plt, .got and associated reloc sections for dynamic relocs. */ -static bfd_boolean +static bool elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) { struct bfd_link_info *info; @@ -90,11 +90,11 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) struct elf_x86_link_hash_entry *eh; struct elf_dyn_relocs *p; unsigned int plt_entry_size; - bfd_boolean resolved_to_zero; + bool resolved_to_zero; const struct elf_backend_data *bed; if (h->root.type == bfd_link_hash_indirect) - return TRUE; + return true; eh = (struct elf_x86_link_hash_entry *) h; @@ -102,7 +102,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) bed = get_elf_backend_data (info->output_bfd); htab = elf_x86_hash_table (info, bed->target_id); if (htab == NULL) - return FALSE; + return false; plt_entry_size = htab->plt.plt_entry_size; @@ -136,7 +136,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) (htab->plt.has_plt0 * plt_entry_size), htab->got_entry_size, - TRUE)) + true)) { asection *s = htab->plt_second; if (h->plt.offset != (bfd_vma) -1 && s != NULL) @@ -148,10 +148,10 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) s->size += htab->non_lazy_plt->plt_entry_size; } - return TRUE; + return true; } else - return FALSE; + return false; } /* Don't create the PLT entry if there are only function pointer relocations which can be resolved at run-time. */ @@ -159,7 +159,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && (h->plt.refcount > 0 || eh->plt_got.refcount > 0)) { - bfd_boolean use_plt_got = eh->plt_got.refcount > 0; + bool use_plt_got = eh->plt_got.refcount > 0; /* Make sure this symbol is output as a dynamic symbol. Undefined weak syms won't yet be marked as dynamic. */ @@ -169,7 +169,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && h->root.type == bfd_link_hash_undefweak) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } if (bfd_link_pic (info) @@ -178,7 +178,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) asection *s = htab->elf.splt; asection *second_s = htab->plt_second; asection *got_s = htab->plt_got; - bfd_boolean use_plt; + bool use_plt; /* If this is the first .plt entry, make room for the special first entry. The .plt section is used by prelink to undo @@ -203,7 +203,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) NB: If PLT is PC-relative, we can use the .plt in PIE for function address. */ if (h->def_regular) - use_plt = FALSE; + use_plt = false; else if (htab->pcrel_plt) use_plt = ! bfd_link_dll (info); else @@ -308,7 +308,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) else if (h->got.refcount > 0) { asection *s; - bfd_boolean dyn; + bool dyn; int tls_type = elf_x86_hash_entry (h)->tls_type; /* Make sure this symbol is output as a dynamic symbol. @@ -319,7 +319,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && h->root.type == bfd_link_hash_undefweak) { if (! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } s = htab->elf.sgot; @@ -375,7 +375,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) h->got.offset = (bfd_vma) -1; if (h->dyn_relocs == NULL) - return TRUE; + return true; /* In the shared -Bsymbolic case, discard space allocated for dynamic pc-relative relocs against symbols which turn out to be @@ -451,7 +451,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) non-PLT reloations. */ if (h->dyn_relocs != NULL && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } else h->dyn_relocs = NULL; @@ -459,7 +459,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) else if (h->dynindx == -1 && !h->forced_local && !bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; } else if (bfd_link_executable (info) && (h->needs_copy || eh->needs_copy) @@ -504,7 +504,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) && !resolved_to_zero && h->root.type == bfd_link_hash_undefweak && ! bfd_elf_link_record_dynamic_symbol (info, h)) - return FALSE; + return false; /* If that succeeded, we know we'll be keeping all the relocs. */ @@ -528,7 +528,7 @@ elf_x86_allocate_dynrelocs (struct elf_link_hash_entry *h, void *inf) sreloc->size += p->count * htab->sizeof_reloc; } - return TRUE; + return true; } /* Allocate space in .plt, .got and associated reloc sections for @@ -555,7 +555,7 @@ elf_x86_allocate_local_dynreloc (void **slot, void *inf) struct elf_link_hash_entry * _bfd_elf_x86_get_local_sym_hash (struct elf_x86_link_hash_table *htab, bfd *abfd, const Elf_Internal_Rela *rel, - bfd_boolean create) + bool create) { struct elf_x86_link_hash_entry e, *ret; asection *sec = abfd->sections; @@ -683,13 +683,13 @@ elf_x86_link_hash_table_free (bfd *obfd) _bfd_elf_link_hash_table_free (obfd); } -static bfd_boolean +static bool elf_i386_is_reloc_section (const char *secname) { return startswith (secname, ".rel"); } -static bfd_boolean +static bool elf_x86_64_is_reloc_section (const char *secname) { return startswith (secname, ".rela"); @@ -722,7 +722,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd) { ret->is_reloc_section = elf_x86_64_is_reloc_section; ret->got_entry_size = 8; - ret->pcrel_plt = TRUE; + ret->pcrel_plt = true; ret->tls_get_addr = "__tls_get_addr"; } if (ABI_64_P (abfd)) @@ -747,7 +747,7 @@ _bfd_x86_elf_link_hash_table_create (bfd *abfd) ret->is_reloc_section = elf_i386_is_reloc_section; ret->sizeof_reloc = sizeof (Elf32_External_Rel); ret->got_entry_size = 4; - ret->pcrel_plt = FALSE; + ret->pcrel_plt = false; ret->pointer_r_type = R_386_32; ret->dynamic_interpreter = ELF32_DYNAMIC_INTERPRETER; ret->dynamic_interpreter_size @@ -796,7 +796,7 @@ elf_x86_linker_defined (struct bfd_link_info *info, const char *name) struct elf_link_hash_entry *h; h = elf_link_hash_lookup (elf_hash_table (info), name, - FALSE, FALSE, FALSE); + false, false, false); if (h == NULL) return; @@ -823,7 +823,7 @@ elf_x86_hide_linker_defined (struct bfd_link_info *info, struct elf_link_hash_entry *h; h = elf_link_hash_lookup (elf_hash_table (info), name, - FALSE, FALSE, FALSE); + false, false, false); if (h == NULL) return; @@ -832,10 +832,10 @@ elf_x86_hide_linker_defined (struct bfd_link_info *info, if (ELF_ST_VISIBILITY (h->other) == STV_INTERNAL || ELF_ST_VISIBILITY (h->other) == STV_HIDDEN) - _bfd_elf_link_hash_hide_symbol (info, h, TRUE); + _bfd_elf_link_hash_hide_symbol (info, h, true); } -bfd_boolean +bool _bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) { if (!bfd_link_relocatable (info)) @@ -850,7 +850,7 @@ _bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) h = elf_link_hash_lookup (elf_hash_table (info), htab->tls_get_addr, - FALSE, FALSE, FALSE); + false, false, false); if (h != NULL) { elf_x86_hash_entry (h)->tls_get_addr = 1; @@ -890,7 +890,7 @@ _bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) return _bfd_elf_link_check_relocs (abfd, info); } -bfd_boolean +bool _bfd_elf_x86_valid_reloc_p (asection *input_section, struct bfd_link_info *info, struct elf_x86_link_hash_table *htab, @@ -898,11 +898,11 @@ _bfd_elf_x86_valid_reloc_p (asection *input_section, struct elf_link_hash_entry *h, Elf_Internal_Sym *sym, Elf_Internal_Shdr *symtab_hdr, - bfd_boolean *no_dynreloc_p) + bool *no_dynreloc_p) { - bfd_boolean valid_p = TRUE; + bool valid_p = true; - *no_dynreloc_p = FALSE; + *no_dynreloc_p = false; /* Check If relocation against non-preemptible absolute symbol is valid in PIC. FIXME: Can't use SYMBOL_REFERENCES_LOCAL_P since @@ -955,7 +955,7 @@ _bfd_elf_x86_valid_reloc_p (asection *input_section, || r_type == R_386_8); if (valid_p) - *no_dynreloc_p = TRUE; + *no_dynreloc_p = true; else { const char *name; @@ -986,21 +986,21 @@ _bfd_elf_x86_valid_reloc_p (asection *input_section, /* Set the sizes of the dynamic sections. */ -bfd_boolean +bool _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info) { struct elf_x86_link_hash_table *htab; bfd *dynobj; asection *s; - bfd_boolean relocs; + bool relocs; bfd *ibfd; const struct elf_backend_data *bed = get_elf_backend_data (output_bfd); htab = elf_x86_hash_table (info, bed->target_id); if (htab == NULL) - return FALSE; + return false; dynobj = htab->elf.dynobj; if (dynobj == NULL) abort (); @@ -1237,10 +1237,10 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd, /* We now have determined the sizes of the various dynamic sections. Allocate memory for them. */ - relocs = FALSE; + relocs = false; for (s = dynobj->sections; s != NULL; s = s->next) { - bfd_boolean strip_section = TRUE; + bool strip_section = true; if ((s->flags & SEC_LINKER_CREATED) == 0) continue; @@ -1255,7 +1255,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd, It's too late to tell BFD to get rid of the symbols. */ if (htab->elf.hplt != NULL) - strip_section = FALSE; + strip_section = false; } else if (s == htab->elf.sgotplt || s == htab->elf.iplt @@ -1275,7 +1275,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd, if (s->size != 0 && s != htab->elf.srelplt && s != htab->srelplt2) - relocs = TRUE; + relocs = true; /* We use the reloc_count field as a counter if we need to copy relocs into the output file. */ @@ -1321,7 +1321,7 @@ _bfd_x86_elf_size_dynamic_sections (bfd *output_bfd, reloc instead of garbage. */ s->contents = (unsigned char *) bfd_zalloc (dynobj, s->size); if (s->contents == NULL) - return FALSE; + return false; } if (htab->plt_eh_frame != NULL @@ -1578,7 +1578,7 @@ _bfd_x86_elf_finish_dynamic_sections (bfd *output_bfd, } -bfd_boolean +bool _bfd_x86_elf_always_size_sections (bfd *output_bfd, struct bfd_link_info *info) { @@ -1590,7 +1590,7 @@ _bfd_x86_elf_always_size_sections (bfd *output_bfd, tlsbase = elf_link_hash_lookup (elf_hash_table (info), "_TLS_MODULE_BASE_", - FALSE, FALSE, FALSE); + false, false, false); if (tlsbase && tlsbase->type == STT_TLS) { @@ -1601,13 +1601,13 @@ _bfd_x86_elf_always_size_sections (bfd *output_bfd, htab = elf_x86_hash_table (info, bed->target_id); if (htab == NULL) - return FALSE; + return false; if (!(_bfd_generic_link_add_one_symbol (info, output_bfd, "_TLS_MODULE_BASE_", BSF_LOCAL, - tls_sec, 0, NULL, FALSE, + tls_sec, 0, NULL, false, bed->collect, &bh))) - return FALSE; + return false; htab->tls_module_base = bh; @@ -1615,18 +1615,18 @@ _bfd_x86_elf_always_size_sections (bfd *output_bfd, tlsbase->def_regular = 1; tlsbase->other = STV_HIDDEN; tlsbase->root.linker_def = 1; - (*bed->elf_backend_hide_symbol) (info, tlsbase, TRUE); + (*bed->elf_backend_hide_symbol) (info, tlsbase, true); } } - return TRUE; + return true; } void _bfd_x86_elf_merge_symbol_attribute (struct elf_link_hash_entry *h, unsigned int st_other, - bfd_boolean definition, - bfd_boolean dynamic ATTRIBUTE_UNUSED) + bool definition, + bool dynamic ATTRIBUTE_UNUSED) { if (definition) { @@ -1682,7 +1682,7 @@ _bfd_x86_elf_copy_indirect_symbol (struct bfd_link_info *info, /* Remove undefined weak symbol from the dynamic symbol table if it is resolved to 0. */ -bfd_boolean +bool _bfd_x86_elf_fixup_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1693,7 +1693,7 @@ _bfd_x86_elf_fixup_symbol (struct bfd_link_info *info, _bfd_elf_strtab_delref (elf_hash_table (info)->dynstr, h->dynstr_index); } - return TRUE; + return true; } /* Change the STT_GNU_IFUNC symbol defined in position-dependent @@ -1790,13 +1790,13 @@ _bfd_x86_elf_link_report_relative_reloc /* Return TRUE if symbol should be hashed in the `.gnu.hash' section. */ -bfd_boolean +bool _bfd_x86_elf_hash_symbol (struct elf_link_hash_entry *h) { if (h->plt.offset != (bfd_vma) -1 && !h->def_regular && !h->pointer_equality_needed) - return FALSE; + return false; return _bfd_elf_hash_symbol (h); } @@ -1807,7 +1807,7 @@ _bfd_x86_elf_hash_symbol (struct elf_link_hash_entry *h) change the definition to something the rest of the link can understand. */ -bfd_boolean +bool _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -1863,7 +1863,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->plt.offset = (bfd_vma) -1; h->needs_plt = 0; } - return TRUE; + return true; } /* If this is a function, put it in the procedure linkage table. We @@ -1886,7 +1886,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->needs_plt = 0; } - return TRUE; + return true; } else /* It's possible that we incorrectly decided a .plt reloc was needed @@ -1915,7 +1915,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info, h->non_got_ref = def->non_got_ref; eh->needs_copy = def->needs_copy; } - return TRUE; + return true; } /* This is a reference to a symbol defined by a dynamic object which @@ -1926,24 +1926,24 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info, For such cases we need not do anything here; the relocations will be handled correctly by relocate_section. */ if (!bfd_link_executable (info)) - return TRUE; + return true; /* If there are no references to this symbol that do not use the GOT nor R_386_GOTOFF relocation, we don't need to generate a copy reloc. NB: gotoff_ref is always 0 for x86-64. */ if (!h->non_got_ref && !eh->gotoff_ref) - return TRUE; + return true; /* If -z nocopyreloc was given, we won't generate them either. */ if (info->nocopyreloc || SYMBOL_NO_COPYRELOC (info, eh)) { h->non_got_ref = 0; - return TRUE; + return true; } htab = elf_x86_hash_table (info, bed->target_id); if (htab == NULL) - return FALSE; + return false; /* If there aren't any dynamic relocs in read-only sections nor R_386_GOTOFF relocation, then we can keep the dynamic relocs and @@ -1961,7 +1961,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info, if (!_bfd_elf_readonly_dynrelocs (h)) { h->non_got_ref = 0; - return TRUE; + return true; } } @@ -2000,7 +2000,7 @@ _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *info, void _bfd_x86_elf_hide_symbol (struct bfd_link_info *info, struct elf_link_hash_entry *h, - bfd_boolean force_local) + bool force_local) { if (h->root.type == bfd_link_hash_undefweak && info->nointerp @@ -2022,7 +2022,7 @@ _bfd_x86_elf_hide_symbol (struct bfd_link_info *info, SYMBOL_REFERENCES_LOCAL, but it also checks version script. It works in check_relocs. */ -bfd_boolean +bool _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info, struct elf_link_hash_entry *h) { @@ -2031,10 +2031,10 @@ _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info, = (struct elf_x86_link_hash_table *) info->hash; if (eh->local_ref > 1) - return TRUE; + return true; if (eh->local_ref == 1) - return FALSE; + return false; /* Unversioned symbols defined in regular objects can be forced local by linker version script. A weak undefined symbol is forced local @@ -2054,11 +2054,11 @@ _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *info, && _bfd_elf_link_hide_sym_by_version (info, h))) { eh->local_ref = 2; - return TRUE; + return true; } eh->local_ref = 1; - return FALSE; + return false; } /* Return the section that should be marked against GC for a given @@ -2107,7 +2107,7 @@ elf_x86_64_get_plt_got_vma (struct elf_x86_plt *plt_p, return plt_p->sec->vma + offset + off + plt_p->plt_got_insn_size; } -static bfd_boolean +static bool elf_i386_valid_plt_reloc_p (unsigned int type) { return (type == R_386_JUMP_SLOT @@ -2115,7 +2115,7 @@ elf_i386_valid_plt_reloc_p (unsigned int type) || type == R_386_IRELATIVE); } -static bfd_boolean +static bool elf_x86_64_valid_plt_reloc_p (unsigned int type) { return (type == R_X86_64_JUMP_SLOT @@ -2143,7 +2143,7 @@ _bfd_x86_elf_get_synthetic_symtab (bfd *abfd, const struct elf_backend_data *bed; bfd_vma (*get_plt_got_vma) (struct elf_x86_plt *, bfd_vma, bfd_vma, bfd_vma); - bfd_boolean (*valid_plt_reloc_p) (unsigned int); + bool (*valid_plt_reloc_p) (unsigned int); dynrelbuf = NULL; if (count == 0) @@ -2373,7 +2373,7 @@ _bfd_x86_elf_parse_gnu_properties (bfd *abfd, unsigned int type, return TRUE if APROP is updated. Otherwise, return TRUE if BPROP should be merged with ABFD. */ -bfd_boolean +bool _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, bfd *abfd ATTRIBUTE_UNUSED, bfd *bbfd ATTRIBUTE_UNUSED, @@ -2381,7 +2381,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, elf_property *bprop) { unsigned int number, features; - bfd_boolean updated = FALSE; + bool updated = false; const struct elf_backend_data *bed; struct elf_x86_link_hash_table *htab; unsigned int pr_type = aprop != NULL ? aprop->pr_type : bprop->pr_type; @@ -2398,7 +2398,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, /* Remove this property since the other input file doesn't have it. */ aprop->pr_kind = property_remove; - updated = TRUE; + updated = true; } } else @@ -2443,7 +2443,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, if (aprop->u.number == 0) { aprop->pr_kind = property_remove; - updated = TRUE; + updated = true; } else updated = number != (unsigned int) aprop->u.number; @@ -2458,7 +2458,7 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, { /* Remove APROP if all bits are empty. */ aprop->pr_kind = property_remove; - updated = TRUE; + updated = true; } } else @@ -2538,14 +2538,14 @@ _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *info, } else { - updated = TRUE; + updated = true; bprop->u.number = features; } } else if (aprop != NULL) { aprop->pr_kind = property_remove; - updated = TRUE; + updated = true; } } return updated; @@ -2566,11 +2566,11 @@ bfd * _bfd_x86_elf_link_setup_gnu_properties (struct bfd_link_info *info, struct elf_x86_init_table *init_table) { - bfd_boolean normal_target; - bfd_boolean lazy_plt; + bool normal_target; + bool lazy_plt; asection *sec, *pltsec; bfd *dynobj; - bfd_boolean use_ibt_plt; + bool use_ibt_plt; unsigned int plt_alignment, features, isa_level; struct elf_x86_link_hash_table *htab; bfd *pbfd; @@ -2710,12 +2710,12 @@ _bfd_x86_elf_link_setup_gnu_properties const char *lam_u57_msg = NULL; const char *missing; elf_property_list *p; - bfd_boolean missing_ibt, missing_shstk; - bfd_boolean missing_lam_u48, missing_lam_u57; - bfd_boolean check_ibt + bool missing_ibt, missing_shstk; + bool missing_lam_u48, missing_lam_u57; + bool check_ibt = (htab->params->cet_report && (htab->params->cet_report & prop_report_ibt)); - bfd_boolean check_shstk + bool check_shstk = (htab->params->cet_report && (htab->params->cet_report & prop_report_shstk)); @@ -2886,7 +2886,7 @@ _bfd_x86_elf_link_setup_gnu_properties if (htab->non_lazy_plt != NULL && (!htab->plt.has_plt0 || pltsec == NULL)) { - lazy_plt = FALSE; + lazy_plt = false; if (bfd_link_pic (info)) htab->plt.plt_entry = htab->non_lazy_plt->pic_plt_entry; else @@ -2901,7 +2901,7 @@ _bfd_x86_elf_link_setup_gnu_properties } else { - lazy_plt = TRUE; + lazy_plt = true; if (bfd_link_pic (info)) { htab->plt.plt0_entry = htab->lazy_plt->pic_plt0_entry; diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h index 7a5b9e070a..db11327e96 100644 --- a/bfd/elfxx-x86.h +++ b/bfd/elfxx-x86.h @@ -19,7 +19,7 @@ MA 02110-1301, USA. */ /* Don't generate unused section symbols. */ -#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS FALSE +#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS false #include "sysdep.h" #include "bfd.h" @@ -508,7 +508,7 @@ struct elf_x86_link_hash_table bfd_vma (*r_info) (bfd_vma, bfd_vma); bfd_vma (*r_sym) (bfd_vma); - bfd_boolean (*is_reloc_section) (const char *); + bool (*is_reloc_section) (const char *); unsigned int sizeof_reloc; unsigned int got_entry_size; unsigned int pointer_r_type; @@ -592,7 +592,7 @@ struct elf_x86_plt && elf_tdata (bfd) != NULL \ && elf_object_id (bfd) == (htab)->elf.hash_table_id) -extern bfd_boolean _bfd_x86_elf_mkobject +extern bool _bfd_x86_elf_mkobject (bfd *); extern void _bfd_x86_elf_set_tls_module_base @@ -601,12 +601,12 @@ extern void _bfd_x86_elf_set_tls_module_base extern bfd_vma _bfd_x86_elf_dtpoff_base (struct bfd_link_info *); -extern bfd_boolean _bfd_x86_elf_readonly_dynrelocs +extern bool _bfd_x86_elf_readonly_dynrelocs (struct elf_link_hash_entry *, void *); extern struct elf_link_hash_entry * _bfd_elf_x86_get_local_sym_hash (struct elf_x86_link_hash_table *, bfd *, const Elf_Internal_Rela *, - bfd_boolean); + bool); extern hashval_t _bfd_x86_elf_local_htab_hash (const void *); @@ -623,43 +623,43 @@ extern struct bfd_link_hash_table * _bfd_x86_elf_link_hash_table_create extern int _bfd_x86_elf_compare_relocs (const void *, const void *); -extern bfd_boolean _bfd_x86_elf_link_check_relocs +extern bool _bfd_x86_elf_link_check_relocs (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_elf_x86_valid_reloc_p +extern bool _bfd_elf_x86_valid_reloc_p (asection *, struct bfd_link_info *, struct elf_x86_link_hash_table *, const Elf_Internal_Rela *, struct elf_link_hash_entry *, - Elf_Internal_Sym *, Elf_Internal_Shdr *, bfd_boolean *); + Elf_Internal_Sym *, Elf_Internal_Shdr *, bool *); -extern bfd_boolean _bfd_x86_elf_size_dynamic_sections +extern bool _bfd_x86_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); extern struct elf_x86_link_hash_table *_bfd_x86_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_x86_elf_always_size_sections +extern bool _bfd_x86_elf_always_size_sections (bfd *, struct bfd_link_info *); extern void _bfd_x86_elf_merge_symbol_attribute - (struct elf_link_hash_entry *, unsigned int, bfd_boolean, bfd_boolean); + (struct elf_link_hash_entry *, unsigned int, bool, bool); extern void _bfd_x86_elf_copy_indirect_symbol (struct bfd_link_info *, struct elf_link_hash_entry *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_x86_elf_fixup_symbol +extern bool _bfd_x86_elf_fixup_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); -extern bfd_boolean _bfd_x86_elf_hash_symbol +extern bool _bfd_x86_elf_hash_symbol (struct elf_link_hash_entry *); -extern bfd_boolean _bfd_x86_elf_adjust_dynamic_symbol +extern bool _bfd_x86_elf_adjust_dynamic_symbol (struct bfd_link_info *, struct elf_link_hash_entry *); extern void _bfd_x86_elf_hide_symbol - (struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean); + (struct bfd_link_info *, struct elf_link_hash_entry *, bool); -extern bfd_boolean _bfd_x86_elf_link_symbol_references_local +extern bool _bfd_x86_elf_link_symbol_references_local (struct bfd_link_info *, struct elf_link_hash_entry *); extern asection * _bfd_x86_elf_gc_mark_hook @@ -673,7 +673,7 @@ extern long _bfd_x86_elf_get_synthetic_symtab extern enum elf_property_kind _bfd_x86_elf_parse_gnu_properties (bfd *, unsigned int, bfd_byte *, unsigned int); -extern bfd_boolean _bfd_x86_elf_merge_gnu_properties +extern bool _bfd_x86_elf_merge_gnu_properties (struct bfd_link_info *, bfd *, bfd *, elf_property *, elf_property *); extern void _bfd_x86_elf_link_fixup_gnu_properties diff --git a/bfd/format.c b/bfd/format.c index 43bb34135e..5d08d1d642 100644 --- a/bfd/format.c +++ b/bfd/format.c @@ -55,7 +55,7 @@ FUNCTION bfd_check_format SYNOPSIS - bfd_boolean bfd_check_format (bfd *abfd, bfd_format format); + bool bfd_check_format (bfd *abfd, bfd_format format); DESCRIPTION Verify if the file attached to the BFD @var{abfd} is compatible @@ -88,7 +88,7 @@ DESCRIPTION more than one backend recognised the file format. */ -bfd_boolean +bool bfd_check_format (bfd *abfd, bfd_format format) { return bfd_check_format_matches (abfd, format, NULL); @@ -118,7 +118,7 @@ struct bfd_preserve subset of the bfd state works in practice. This function stores the subset. */ -static bfd_boolean +static bool bfd_preserve_save (bfd *abfd, struct bfd_preserve *preserve, bfd_cleanup cleanup) { @@ -134,7 +134,7 @@ bfd_preserve_save (bfd *abfd, struct bfd_preserve *preserve, preserve->build_id = abfd->build_id; preserve->cleanup = cleanup; if (preserve->marker == NULL) - return FALSE; + return false; return bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc, sizeof (struct section_hash_entry)); @@ -206,7 +206,7 @@ FUNCTION bfd_check_format_matches SYNOPSIS - bfd_boolean bfd_check_format_matches + bool bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching); DESCRIPTION @@ -221,7 +221,7 @@ DESCRIPTION should free it. */ -bfd_boolean +bool bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) { extern const bfd_target binary_vec; @@ -244,7 +244,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) || (unsigned int) abfd->format >= (unsigned int) bfd_type_end) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (abfd->format != bfd_unknown) @@ -257,7 +257,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) amt = sizeof (*matching_vector) * 2 * _bfd_target_vector_entries; matching_vector = (const bfd_target **) bfd_malloc (amt); if (!matching_vector) - return FALSE; + return false; } /* Presume the answer is yes. */ @@ -498,7 +498,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) We can not set this flag until after checking the format, because it will interfere with creation of BFD sections. */ if (abfd->direction == both_direction) - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; free (matching_vector); if (preserve_match.marker != NULL) @@ -506,7 +506,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) bfd_preserve_finish (abfd, &preserve); /* File position has moved, BTW. */ - return TRUE; + return true; } if (match_count == 0) @@ -522,7 +522,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) if (preserve_match.marker != NULL) bfd_preserve_finish (abfd, &preserve_match); bfd_preserve_restore (abfd, &preserve); - return FALSE; + return false; } /* Restore original target type and format. */ @@ -549,7 +549,7 @@ bfd_check_format_matches (bfd *abfd, bfd_format format, char ***matching) if (preserve_match.marker != NULL) bfd_preserve_finish (abfd, &preserve_match); bfd_preserve_restore (abfd, &preserve); - return FALSE; + return false; } /* @@ -557,7 +557,7 @@ FUNCTION bfd_set_format SYNOPSIS - bfd_boolean bfd_set_format (bfd *abfd, bfd_format format); + bool bfd_set_format (bfd *abfd, bfd_format format); DESCRIPTION This function sets the file format of the BFD @var{abfd} to the @@ -566,14 +566,14 @@ DESCRIPTION is not open for writing, then an error occurs. */ -bfd_boolean +bool bfd_set_format (bfd *abfd, bfd_format format) { if (bfd_read_p (abfd) || (unsigned int) abfd->format >= (unsigned int) bfd_type_end) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (abfd->format != bfd_unknown) @@ -585,10 +585,10 @@ bfd_set_format (bfd *abfd, bfd_format format) if (!BFD_SEND_FMT (abfd, _bfd_set_format, (abfd))) { abfd->format = bfd_unknown; - return FALSE; + return false; } - return TRUE; + return true; } /* diff --git a/bfd/genlink.h b/bfd/genlink.h index d07f39f850..92ee8b61a9 100644 --- a/bfd/genlink.h +++ b/bfd/genlink.h @@ -43,7 +43,7 @@ struct generic_link_hash_entry { struct bfd_link_hash_entry root; /* Whether this symbol has been written out. */ - bfd_boolean written; + bool written; /* Symbol from input BFD. */ asymbol *sym; }; @@ -66,7 +66,7 @@ struct generic_link_hash_table #define _bfd_generic_link_hash_traverse(table, func, info) \ (bfd_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \ + (bool (*) (struct bfd_link_hash_entry *, void *)) (func), \ (info))) /* Get the generic link hash table from the info structure. This is @@ -83,7 +83,7 @@ struct generic_link_hash_table /* Add the symbols of input_bfd to the symbols being built for output_bfd. */ -extern bfd_boolean _bfd_generic_link_output_symbols +extern bool _bfd_generic_link_output_symbols (bfd *, bfd *, struct bfd_link_info *, size_t *); /* This structure is used to pass information to @@ -100,7 +100,7 @@ struct generic_write_global_symbol_info /* Write out a single global symbol. This is expected to be called via _bfd_generic_link_hash_traverse. The second argument must actually be a struct generic_write_global_symbol_info *. */ -extern bfd_boolean _bfd_generic_link_write_global_symbol +extern bool _bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *, void *); /* Generic link hash table entry creation routine. */ diff --git a/bfd/hash.c b/bfd/hash.c index 81c941efef..0093d63fd9 100644 --- a/bfd/hash.c +++ b/bfd/hash.c @@ -364,7 +364,7 @@ static unsigned long bfd_default_hash_table_size = DEFAULT_SIZE; /* Create a new hash table, given a number of entries. */ -bfd_boolean +bool bfd_hash_table_init_n (struct bfd_hash_table *table, struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -379,14 +379,14 @@ bfd_hash_table_init_n (struct bfd_hash_table *table, if (alloc / sizeof (struct bfd_hash_entry *) != size) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } table->memory = (void *) objalloc_create (); if (table->memory == NULL) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } table->table = (struct bfd_hash_entry **) objalloc_alloc ((struct objalloc *) table->memory, alloc); @@ -394,7 +394,7 @@ bfd_hash_table_init_n (struct bfd_hash_table *table, { bfd_hash_table_free (table); bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } memset ((void *) table->table, 0, alloc); table->size = size; @@ -402,12 +402,12 @@ bfd_hash_table_init_n (struct bfd_hash_table *table, table->count = 0; table->frozen = 0; table->newfunc = newfunc; - return TRUE; + return true; } /* Create a new hash table with the default number of entries. */ -bfd_boolean +bool bfd_hash_table_init (struct bfd_hash_table *table, struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -457,8 +457,8 @@ bfd_hash_hash (const char *string, unsigned int *lenp) struct bfd_hash_entry * bfd_hash_lookup (struct bfd_hash_table *table, const char *string, - bfd_boolean create, - bfd_boolean copy) + bool create, + bool copy) { unsigned long hash; struct bfd_hash_entry *hashp; @@ -643,7 +643,7 @@ bfd_hash_newfunc (struct bfd_hash_entry *entry, void bfd_hash_traverse (struct bfd_hash_table *table, - bfd_boolean (*func) (struct bfd_hash_entry *, void *), + bool (*func) (struct bfd_hash_entry *, void *), void * info) { unsigned int i; @@ -715,7 +715,7 @@ struct bfd_strtab_hash struct strtab_hash_entry *last; /* Whether to precede strings with a two byte length, as in the XCOFF .debug section. */ - bfd_boolean xcoff; + bool xcoff; }; /* Routine to create an entry in a strtab. */ @@ -777,7 +777,7 @@ _bfd_stringtab_init (void) table->size = 0; table->first = NULL; table->last = NULL; - table->xcoff = FALSE; + table->xcoff = false; return table; } @@ -793,7 +793,7 @@ _bfd_xcoff_stringtab_init (void) ret = _bfd_stringtab_init (); if (ret != NULL) - ret->xcoff = TRUE; + ret->xcoff = true; return ret; } @@ -814,14 +814,14 @@ _bfd_stringtab_free (struct bfd_strtab_hash *table) bfd_size_type _bfd_stringtab_add (struct bfd_strtab_hash *tab, const char *str, - bfd_boolean hash, - bfd_boolean copy) + bool hash, + bool copy) { struct strtab_hash_entry *entry; if (hash) { - entry = strtab_hash_lookup (tab, str, TRUE, copy); + entry = strtab_hash_lookup (tab, str, true, copy); if (entry == NULL) return (bfd_size_type) -1; } @@ -878,10 +878,10 @@ _bfd_stringtab_size (struct bfd_strtab_hash *tab) /* Write out a strtab. ABFD must already be at the right location in the file. */ -bfd_boolean +bool _bfd_stringtab_emit (bfd *abfd, struct bfd_strtab_hash *tab) { - bfd_boolean xcoff; + bool xcoff; struct strtab_hash_entry *entry; xcoff = tab->xcoff; @@ -901,12 +901,12 @@ _bfd_stringtab_emit (bfd *abfd, struct bfd_strtab_hash *tab) /* The output length includes the null byte. */ bfd_put_16 (abfd, (bfd_vma) len, buf); if (bfd_bwrite ((void *) buf, (bfd_size_type) 2, abfd) != 2) - return FALSE; + return false; } if (bfd_bwrite ((void *) str, (bfd_size_type) len, abfd) != len) - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/bfd/i386aout.c b/bfd/i386aout.c index 9995a41aa1..5a38cad8f0 100644 --- a/bfd/i386aout.c +++ b/bfd/i386aout.c @@ -47,7 +47,7 @@ /* Set the machine type correctly. */ -static bfd_boolean +static bool i386aout_write_object_contents (bfd *abfd) { struct external_exec exec_bytes; @@ -59,7 +59,7 @@ i386aout_write_object_contents (bfd *abfd) WRITE_HEADERS (abfd, execp); - return TRUE; + return true; } #define MY_write_object_contents i386aout_write_object_contents diff --git a/bfd/i386lynx.c b/bfd/i386lynx.c index 732897dbae..c477e661c8 100644 --- a/bfd/i386lynx.c +++ b/bfd/i386lynx.c @@ -51,29 +51,29 @@ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 \ || bfd_bwrite (&exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, \ abfd) != EXEC_BYTES_SIZE) \ - return FALSE; \ + return false; \ /* Now write out reloc info, followed by syms and strings */ \ \ if (bfd_get_symcount (abfd) != 0) \ { \ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) \ != 0) \ - return FALSE; \ + return false; \ \ - if (! NAME(aout,write_syms) (abfd)) return FALSE; \ + if (! NAME(aout,write_syms) (abfd)) return false; \ \ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) \ != 0) \ - return FALSE; \ + return false; \ \ if (!NAME(lynx,squirt_out_relocs) (abfd, obj_textsec (abfd))) \ - return FALSE; \ + return false; \ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) \ != 0) \ return 0; \ \ if (!NAME(lynx,squirt_out_relocs) (abfd, obj_datasec (abfd))) \ - return FALSE; \ + return false; \ } \ } #endif @@ -86,7 +86,7 @@ char *lynx_core_file_failing_command (); int lynx_core_file_failing_signal (); -bfd_boolean lynx_core_file_matches_executable_p (); +bool lynx_core_file_matches_executable_p (); const bfd_target *lynx_core_file_p (); #define MY_core_file_failing_command lynx_core_file_failing_command @@ -367,7 +367,7 @@ NAME(lynx,swap_std_reloc_in) (bfd *abfd, /* Reloc hackery */ -static bfd_boolean +static bool NAME(lynx,slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) @@ -379,10 +379,10 @@ NAME(lynx,slurp_reloc_table) (bfd *abfd, size_t each_size; if (asect->relocation) - return TRUE; + return true; if (asect->flags & SEC_CONSTRUCTOR) - return TRUE; + return true; if (asect == obj_datasec (abfd)) { @@ -397,11 +397,11 @@ NAME(lynx,slurp_reloc_table) (bfd *abfd, } bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; doit: if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0) - return FALSE; + return false; each_size = obj_reloc_entry_size (abfd); count = reloc_size / each_size; @@ -409,13 +409,13 @@ NAME(lynx,slurp_reloc_table) (bfd *abfd, reloc_cache = (arelent *) bfd_zmalloc (count * sizeof (arelent)); if (!reloc_cache && count != 0) - return FALSE; + return false; relocs = _bfd_alloc_and_read (abfd, reloc_size, reloc_size); if (!relocs && reloc_size != 0) { free (reloc_cache); - return FALSE; + return false; } if (each_size == RELOC_EXT_SIZE) @@ -447,14 +447,14 @@ NAME(lynx,slurp_reloc_table) (bfd *abfd, bfd_release (abfd, relocs); asect->relocation = reloc_cache; asect->reloc_count = count; - return TRUE; + return true; } /* Write out a relocation section into an object file. */ -static bfd_boolean +static bool NAME(lynx,squirt_out_relocs) (bfd *abfd, asection *section) { arelent **generic; @@ -464,14 +464,14 @@ NAME(lynx,squirt_out_relocs) (bfd *abfd, asection *section) bfd_size_type natsize; if (count == 0) - return TRUE; + return true; each_size = obj_reloc_entry_size (abfd); natsize = count; natsize *= each_size; native = (unsigned char *) bfd_zalloc (abfd, natsize); if (!native) - return FALSE; + return false; generic = section->orelocation; @@ -493,11 +493,11 @@ NAME(lynx,squirt_out_relocs) (bfd *abfd, asection *section) if (bfd_bwrite (native, natsize, abfd) != natsize) { bfd_release (abfd, native); - return FALSE; + return false; } bfd_release (abfd, native); - return TRUE; + return true; } /* This is stupid. This function should be a boolean predicate */ diff --git a/bfd/i386msdos.c b/bfd/i386msdos.c index 6254b2aa2e..349e8d2bd5 100644 --- a/bfd/i386msdos.c +++ b/bfd/i386msdos.c @@ -33,7 +33,7 @@ #define EXE_LOAD_LOW 0xffff #define EXE_PAGE_SIZE 512 -static bfd_boolean +static bool msdos_mkobject (bfd *abfd) { bfd_default_set_arch_mach (abfd, bfd_arch_i386, bfd_mach_i386_i8086); @@ -124,7 +124,7 @@ msdos_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, return 0; } -static bfd_boolean +static bool msdos_write_object_contents (bfd *abfd) { static char hdr[EXE_PAGE_SIZE]; @@ -157,7 +157,7 @@ msdos_write_object_contents (bfd *abfd) if (high_vma > (bfd_vma)0xffff) { bfd_set_error(bfd_error_file_too_big); - return FALSE; + return false; } /* Constants. */ @@ -181,12 +181,12 @@ msdos_write_object_contents (bfd *abfd) if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 || bfd_bwrite (hdr, (bfd_size_type) sizeof(hdr), abfd) != sizeof(hdr)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool msdos_set_section_contents (bfd *abfd, sec_ptr section, const void *location, @@ -195,7 +195,7 @@ msdos_set_section_contents (bfd *abfd, { if (count == 0) - return TRUE; + return true; section->filepos = EXE_PAGE_SIZE + bfd_section_vma (section); @@ -203,10 +203,10 @@ msdos_set_section_contents (bfd *abfd, { if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/bfd/ihex.c b/bfd/ihex.c index 13dd106817..93a703a175 100644 --- a/bfd/ihex.c +++ b/bfd/ihex.c @@ -160,44 +160,44 @@ struct ihex_data_struct static void ihex_init (void) { - static bfd_boolean inited; + static bool inited; if (! inited) { - inited = TRUE; + inited = true; hex_init (); } } /* Create an ihex object. */ -static bfd_boolean +static bool ihex_mkobject (bfd *abfd) { struct ihex_data_struct *tdata; tdata = (struct ihex_data_struct *) bfd_alloc (abfd, sizeof (* tdata)); if (tdata == NULL) - return FALSE; + return false; abfd->tdata.ihex_data = tdata; tdata->head = NULL; tdata->tail = NULL; - return TRUE; + return true; } /* Read a byte from a BFD. Set *ERRORPTR if an error occurred. Return EOF on error or end of file. */ static INLINE int -ihex_get_byte (bfd *abfd, bfd_boolean *errorptr) +ihex_get_byte (bfd *abfd, bool *errorptr) { bfd_byte c; if (bfd_bread (&c, (bfd_size_type) 1, abfd) != 1) { if (bfd_get_error () != bfd_error_file_truncated) - *errorptr = TRUE; + *errorptr = true; return EOF; } @@ -207,7 +207,7 @@ ihex_get_byte (bfd *abfd, bfd_boolean *errorptr) /* Report a problem in an Intel Hex file. */ static void -ihex_bad_byte (bfd *abfd, unsigned int lineno, int c, bfd_boolean error) +ihex_bad_byte (bfd *abfd, unsigned int lineno, int c, bool error) { if (c == EOF) { @@ -236,14 +236,14 @@ ihex_bad_byte (bfd *abfd, unsigned int lineno, int c, bfd_boolean error) /* Read an Intel hex file and turn it into sections. We create a new section for each contiguous set of bytes. */ -static bfd_boolean +static bool ihex_scan (bfd *abfd) { bfd_vma segbase; bfd_vma extbase; asection *sec; unsigned int lineno; - bfd_boolean error; + bool error; bfd_byte *buf = NULL; size_t bufsize; int c; @@ -257,7 +257,7 @@ ihex_scan (bfd *abfd) extbase = 0; sec = NULL; lineno = 1; - error = FALSE; + error = false; bufsize = 0; while ((c = ihex_get_byte (abfd, &error)) != EOF) @@ -382,7 +382,7 @@ ihex_scan (bfd *abfd) if (abfd->start_address == 0) abfd->start_address = addr; free (buf); - return TRUE; + return true; case 2: /* An extended address record. */ @@ -474,11 +474,11 @@ ihex_scan (bfd *abfd) goto error_return; free (buf); - return TRUE; + return true; error_return: free (buf); - return FALSE; + return false; } /* Try to recognize an Intel Hex file. */ @@ -539,21 +539,21 @@ ihex_object_p (bfd *abfd) /* Read the contents of a section in an Intel Hex file. */ -static bfd_boolean +static bool ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents) { int c; bfd_byte *p; bfd_byte *buf = NULL; size_t bufsize; - bfd_boolean error; + bool error; if (bfd_seek (abfd, section->filepos, SEEK_SET) != 0) goto error_return; p = contents; bufsize = 0; - error = FALSE; + error = false; while ((c = ihex_get_byte (abfd, &error)) != EOF) { unsigned char hdr[8]; @@ -600,7 +600,7 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents) { /* We've read everything in the section. */ free (buf); - return TRUE; + return true; } /* Skip the checksum. */ @@ -617,16 +617,16 @@ ihex_read_section (bfd *abfd, asection *section, bfd_byte *contents) } free (buf); - return TRUE; + return true; error_return: free (buf); - return FALSE; + return false; } /* Get the contents of a section in an Intel Hex file. */ -static bfd_boolean +static bool ihex_get_section_contents (bfd *abfd, asection *section, void * location, @@ -637,21 +637,21 @@ ihex_get_section_contents (bfd *abfd, { section->used_by_bfd = bfd_alloc (abfd, section->size); if (section->used_by_bfd == NULL) - return FALSE; + return false; if (! ihex_read_section (abfd, section, (bfd_byte *) section->used_by_bfd)) - return FALSE; + return false; } memcpy (location, (bfd_byte *) section->used_by_bfd + offset, (size_t) count); - return TRUE; + return true; } /* Set the contents of a section in an Intel Hex file. */ -static bfd_boolean +static bool ihex_set_section_contents (bfd *abfd, asection *section, const void * location, @@ -665,15 +665,15 @@ ihex_set_section_contents (bfd *abfd, if (count == 0 || (section->flags & SEC_ALLOC) == 0 || (section->flags & SEC_LOAD) == 0) - return TRUE; + return true; n = (struct ihex_data_list *) bfd_alloc (abfd, sizeof (* n)); if (n == NULL) - return FALSE; + return false; data = (bfd_byte *) bfd_alloc (abfd, count); if (data == NULL) - return FALSE; + return false; memcpy (data, location, (size_t) count); n->data = data; @@ -704,12 +704,12 @@ ihex_set_section_contents (bfd *abfd, tdata->tail = n; } - return TRUE; + return true; } /* Write a record out to an Intel Hex file. */ -static bfd_boolean +static bool ihex_write_record (bfd *abfd, size_t count, unsigned int addr, @@ -746,14 +746,14 @@ ihex_write_record (bfd *abfd, total = 9 + count * 2 + 4; if (bfd_bwrite (buf, (bfd_size_type) total, abfd) != total) - return FALSE; + return false; - return TRUE; + return true; } /* Write out an Intel Hex file. */ -static bfd_boolean +static bool ihex_write_object_contents (bfd *abfd) { bfd_vma segbase; @@ -786,7 +786,7 @@ ihex_write_object_contents (bfd *abfd) " out of range for Intel Hex file"), abfd, (uint64_t) where); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } where &= 0xffffffff; #endif @@ -816,7 +816,7 @@ ihex_write_object_contents (bfd *abfd) addr[0] = (bfd_byte)(segbase >> 12) & 0xff; addr[1] = (bfd_byte)(segbase >> 4) & 0xff; if (! ihex_write_record (abfd, 2, 0, 2, addr)) - return FALSE; + return false; } else { @@ -831,7 +831,7 @@ ihex_write_object_contents (bfd *abfd) addr[0] = 0; addr[1] = 0; if (! ihex_write_record (abfd, 2, 0, 2, addr)) - return FALSE; + return false; segbase = 0; } @@ -844,12 +844,12 @@ ihex_write_object_contents (bfd *abfd) " out of range for Intel Hex file"), abfd, (uint64_t) where); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } addr[0] = (bfd_byte)(extbase >> 24) & 0xff; addr[1] = (bfd_byte)(extbase >> 16) & 0xff; if (! ihex_write_record (abfd, 2, 0, 4, addr)) - return FALSE; + return false; } } @@ -860,7 +860,7 @@ ihex_write_object_contents (bfd *abfd) now = 0x10000 - rec_addr; if (! ihex_write_record (abfd, now, rec_addr, 0, p)) - return FALSE; + return false; where += now; p += now; @@ -882,7 +882,7 @@ ihex_write_object_contents (bfd *abfd) startbuf[2] = (bfd_byte)(start >> 8) & 0xff; startbuf[3] = (bfd_byte)start & 0xff; if (! ihex_write_record (abfd, 4, 0, 3, startbuf)) - return FALSE; + return false; } else { @@ -891,20 +891,20 @@ ihex_write_object_contents (bfd *abfd) startbuf[2] = (bfd_byte)(start >> 8) & 0xff; startbuf[3] = (bfd_byte)start & 0xff; if (! ihex_write_record (abfd, 4, 0, 5, startbuf)) - return FALSE; + return false; } } if (! ihex_write_record (abfd, 0, 0, 1, NULL)) - return FALSE; + return false; - return TRUE; + return true; } /* Set the architecture for the output file. The architecture is irrelevant, so we ignore errors about unknown architectures. */ -static bfd_boolean +static bool ihex_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach) @@ -912,9 +912,9 @@ ihex_set_arch_mach (bfd *abfd, if (! bfd_default_set_arch_mach (abfd, arch, mach)) { if (arch != bfd_arch_unknown) - return FALSE; + return false; } - return TRUE; + return true; } /* Get the size of the headers, for the linker. */ diff --git a/bfd/libaout.h b/bfd/libaout.h index 0528cc6f9a..0c379160b9 100644 --- a/bfd/libaout.h +++ b/bfd/libaout.h @@ -102,7 +102,7 @@ struct aout_link_hash_entry { struct bfd_link_hash_entry root; /* Whether this symbol has been written out. */ - bfd_boolean written; + bool written; /* Symbol index in output file. */ int indx; }; @@ -125,7 +125,7 @@ struct aout_link_hash_table #define aout_link_hash_traverse(table, func, info) \ (bfd_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \ + (bool (*) (struct bfd_link_hash_entry *, void *)) (func), \ (info))) /* Get the a.out link hash table from the info structure. This is @@ -164,7 +164,7 @@ struct aout_backend_data /* Callback for setting the page and segment sizes, if they can't be trivially determined from the architecture. */ - bfd_boolean (*set_sizes) (bfd *); + bool (*set_sizes) (bfd *); /* zmagic files only. For go32, the length of the exec header contributes to the size of the text section in the file for alignment purposes but @@ -173,39 +173,39 @@ struct aout_backend_data /* Callback from the add symbols phase of the linker code to handle a dynamic object. */ - bfd_boolean (*add_dynamic_symbols) + bool (*add_dynamic_symbols) (bfd *, struct bfd_link_info *, struct external_nlist **, bfd_size_type *, char **); /* Callback from the add symbols phase of the linker code to handle adding a single symbol to the global linker hash table. */ - bfd_boolean (*add_one_symbol) + bool (*add_one_symbol) (struct bfd_link_info *, bfd *, const char *, flagword, - asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean, + asection *, bfd_vma, const char *, bool, bool, struct bfd_link_hash_entry **); /* Called to handle linking a dynamic object. */ - bfd_boolean (*link_dynamic_object) + bool (*link_dynamic_object) (struct bfd_link_info *, bfd *); /* Called for each global symbol being written out by the linker. This should write out the dynamic symbol information. */ - bfd_boolean (*write_dynamic_symbol) + bool (*write_dynamic_symbol) (bfd *, struct bfd_link_info *, struct aout_link_hash_entry *); /* If this callback is not NULL, the linker calls it for each reloc. RELOC is a pointer to the unswapped reloc. If *SKIP is set to TRUE, the reloc will be skipped. *RELOCATION may be changed to change the effects of the relocation. */ - bfd_boolean (*check_dynamic_reloc) + bool (*check_dynamic_reloc) (struct bfd_link_info *info, bfd *input_bfd, asection *input_section, struct aout_link_hash_entry *h, - void * reloc, bfd_byte *contents, bfd_boolean *skip, + void * reloc, bfd_byte *contents, bool *skip, bfd_vma *relocation); /* Called at the end of a link to finish up any dynamic linking information. */ - bfd_boolean (*finish_dynamic_link) (bfd *, struct bfd_link_info *); + bool (*finish_dynamic_link) (bfd *, struct bfd_link_info *); }; #define aout_backend_info(abfd) \ ((const struct aout_backend_data *)((abfd)->xvec->backend_data)) @@ -470,41 +470,41 @@ struct aout_section_data_struct /* Prototype declarations for functions defined in aoutx.h. */ -extern bfd_boolean NAME (aout, squirt_out_relocs) +extern bool NAME (aout, squirt_out_relocs) (bfd *, asection *); -extern bfd_boolean NAME (aout, make_sections) +extern bool NAME (aout, make_sections) (bfd *); extern bfd_cleanup NAME (aout, some_aout_object_p) (bfd *, struct internal_exec *, bfd_cleanup (*) (bfd *)); -extern bfd_boolean NAME (aout, mkobject) +extern bool NAME (aout, mkobject) (bfd *); extern enum machine_type NAME (aout, machine_type) - (enum bfd_architecture, unsigned long, bfd_boolean *); + (enum bfd_architecture, unsigned long, bool *); -extern bfd_boolean NAME (aout, set_arch_mach) +extern bool NAME (aout, set_arch_mach) (bfd *, enum bfd_architecture, unsigned long); -extern bfd_boolean NAME (aout, new_section_hook) +extern bool NAME (aout, new_section_hook) (bfd *, asection *); -extern bfd_boolean NAME (aout, set_section_contents) +extern bool NAME (aout, set_section_contents) (bfd *, sec_ptr, const void *, file_ptr, bfd_size_type); extern asymbol * NAME (aout, make_empty_symbol) (bfd *); -extern bfd_boolean NAME (aout, translate_symbol_table) +extern bool NAME (aout, translate_symbol_table) (bfd *, aout_symbol_type *, struct external_nlist *, bfd_size_type, - char *, bfd_size_type, bfd_boolean); + char *, bfd_size_type, bool); -extern bfd_boolean NAME (aout, slurp_symbol_table) +extern bool NAME (aout, slurp_symbol_table) (bfd *); -extern bfd_boolean NAME (aout, write_syms) +extern bool NAME (aout, write_syms) (bfd *); extern void NAME (aout, reclaim_symbol_table) @@ -530,7 +530,7 @@ extern reloc_howto_type * NAME (aout, reloc_type_lookup) extern reloc_howto_type * NAME (aout, reloc_name_lookup) (bfd *, const char *); -extern bfd_boolean NAME (aout, slurp_reloc_table) +extern bool NAME (aout, slurp_reloc_table) (bfd *, sec_ptr, asymbol **); extern long NAME (aout, canonicalize_reloc) @@ -551,20 +551,20 @@ extern void NAME (aout, print_symbol) extern void NAME (aout, get_symbol_info) (bfd *, asymbol *, symbol_info *); -extern bfd_boolean NAME (aout, find_nearest_line) +extern bool NAME (aout, find_nearest_line) (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); extern long NAME (aout, read_minisymbols) - (bfd *, bfd_boolean, void * *, unsigned int *); + (bfd *, bool, void * *, unsigned int *); extern asymbol * NAME (aout, minisymbol_to_symbol) - (bfd *, bfd_boolean, const void *, asymbol *); + (bfd *, bool, const void *, asymbol *); extern int NAME (aout, sizeof_headers) (bfd *, struct bfd_link_info *); -extern bfd_boolean NAME (aout, adjust_sizes_and_vmas) +extern bool NAME (aout, adjust_sizes_and_vmas) (bfd *); extern void NAME (aout, swap_exec_header_in) @@ -576,7 +576,7 @@ extern void NAME (aout, swap_exec_header_out) extern struct bfd_hash_entry * NAME (aout, link_hash_newfunc) (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); -extern bfd_boolean NAME (aout, link_hash_table_init) +extern bool NAME (aout, link_hash_table_init) (struct aout_link_hash_table *, bfd *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -586,14 +586,14 @@ extern bfd_boolean NAME (aout, link_hash_table_init) extern struct bfd_link_hash_table * NAME (aout, link_hash_table_create) (bfd *); -extern bfd_boolean NAME (aout, link_add_symbols) +extern bool NAME (aout, link_add_symbols) (bfd *, struct bfd_link_info *); -extern bfd_boolean NAME (aout, final_link) +extern bool NAME (aout, final_link) (bfd *, struct bfd_link_info *, void (*) (bfd *, file_ptr *, file_ptr *, file_ptr *)); -extern bfd_boolean NAME (aout, bfd_free_cached_info) +extern bool NAME (aout, bfd_free_cached_info) (bfd *); #define aout_32_find_inliner_info _bfd_nosymbols_find_inliner_info @@ -636,28 +636,28 @@ extern bfd_boolean NAME (aout, bfd_free_cached_info) if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 \ || bfd_bwrite (& exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, \ abfd) != EXEC_BYTES_SIZE) \ - return FALSE; \ + return false; \ /* Now write out reloc info, followed by syms and strings. */ \ \ if (bfd_get_outsymbols (abfd) != NULL \ && bfd_get_symcount (abfd) != 0) \ { \ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0)\ - return FALSE; \ + return false; \ \ if (! NAME (aout, write_syms) (abfd)) \ - return FALSE; \ + return false; \ } \ \ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF (execp)), SEEK_SET) != 0) \ - return FALSE; \ + return false; \ if (!NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd))) \ - return FALSE; \ + return false; \ \ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0) \ - return FALSE; \ + return false; \ if (!NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd))) \ - return FALSE; \ + return false; \ } #endif diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h index 62b1cee0af..ebcc27dcbd 100644 --- a/bfd/libbfd-in.h +++ b/bfd/libbfd-in.h @@ -135,21 +135,21 @@ extern bfd * _bfd_create_empty_archive_element_shell (bfd *) ATTRIBUTE_HIDDEN; extern bfd * _bfd_look_for_bfd_in_cache (bfd *, file_ptr) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_add_bfd_to_archive_cache +extern bool _bfd_add_bfd_to_archive_cache (bfd *, file_ptr, bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_mkarchive +extern bool _bfd_generic_mkarchive (bfd *) ATTRIBUTE_HIDDEN; extern char *_bfd_append_relative_path (bfd *, char *) ATTRIBUTE_HIDDEN; extern bfd_cleanup bfd_generic_archive_p (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean bfd_slurp_armap +extern bool bfd_slurp_armap (bfd *) ATTRIBUTE_HIDDEN; #define bfd_slurp_bsd_armap bfd_slurp_armap #define bfd_slurp_coff_armap bfd_slurp_armap -extern bfd_boolean _bfd_archive_64_bit_slurp_armap +extern bool _bfd_archive_64_bit_slurp_armap (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_archive_64_bit_write_armap +extern bool _bfd_archive_64_bit_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; #define _bfd_archive_64_bit_slurp_extended_name_table \ _bfd_slurp_extended_name_table @@ -169,13 +169,13 @@ extern bfd_boolean _bfd_archive_64_bit_write_armap bfd_generic_stat_arch_elt #define _bfd_archive_64_bit_update_armap_timestamp _bfd_bool_bfd_true -extern bfd_boolean _bfd_slurp_extended_name_table +extern bool _bfd_slurp_extended_name_table (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_construct_extended_name_table - (bfd *, bfd_boolean, char **, bfd_size_type *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_write_archive_contents +extern bool _bfd_construct_extended_name_table + (bfd *, bool, char **, bfd_size_type *) ATTRIBUTE_HIDDEN; +extern bool _bfd_write_archive_contents (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_compute_and_write_armap +extern bool _bfd_compute_and_write_armap (bfd *, unsigned int) ATTRIBUTE_HIDDEN; extern bfd *_bfd_get_elt_at_filepos (bfd *, file_ptr) ATTRIBUTE_HIDDEN; @@ -183,30 +183,30 @@ extern bfd *_bfd_generic_get_elt_at_index (bfd *, symindex) ATTRIBUTE_HIDDEN; extern bfd * _bfd_new_bfd (void) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_free_cached_info +extern bool _bfd_free_cached_info (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_false +extern bool _bfd_bool_bfd_false (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_asymbol_false +extern bool _bfd_bool_bfd_asymbol_false (bfd *, asymbol *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_false_error +extern bool _bfd_bool_bfd_false_error (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_link_false_error +extern bool _bfd_bool_bfd_link_false_error (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_true +extern bool _bfd_bool_bfd_true (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_link_true +extern bool _bfd_bool_bfd_link_true (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_bfd_true +extern bool _bfd_bool_bfd_bfd_true (bfd *, bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_uint_true +extern bool _bfd_bool_bfd_uint_true (bfd *, unsigned int) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_asection_bfd_asection_true +extern bool _bfd_bool_bfd_asection_bfd_asection_true (bfd *, asection *, bfd *, asection *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_asymbol_bfd_asymbol_true +extern bool _bfd_bool_bfd_asymbol_bfd_asymbol_true (bfd *, asymbol *, bfd *, asymbol *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_ptr_true +extern bool _bfd_bool_bfd_ptr_true (bfd *, void *) ATTRIBUTE_HIDDEN; extern void *_bfd_ptr_bfd_null_error (bfd *) ATTRIBUTE_HIDDEN; @@ -238,26 +238,26 @@ extern void bfd_bsd_truncate_arname extern void bfd_gnu_truncate_arname (bfd *, const char *, char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bsd_write_armap +extern bool _bfd_bsd_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_coff_write_armap +extern bool _bfd_coff_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; extern void *_bfd_generic_read_ar_hdr (bfd *) ATTRIBUTE_HIDDEN; extern void _bfd_ar_spacepad (char *, size_t, const char *, long) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ar_sizepad +extern bool _bfd_ar_sizepad (char *, size_t, bfd_size_type) ATTRIBUTE_HIDDEN; extern void *_bfd_generic_read_ar_hdr_mag (bfd *, const char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_write_ar_hdr +extern bool _bfd_generic_write_ar_hdr (bfd *, bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bsd44_write_ar_hdr +extern bool _bfd_bsd44_write_ar_hdr (bfd *, bfd *) ATTRIBUTE_HIDDEN; extern bfd * bfd_generic_openr_next_archived_file @@ -275,15 +275,15 @@ extern int bfd_generic_stat_arch_elt BFD_JUMP_TABLE_GENERIC (_bfd_generic). */ #define _bfd_generic_close_and_cleanup _bfd_archive_close_and_cleanup -extern bfd_boolean _bfd_archive_close_and_cleanup +extern bool _bfd_archive_close_and_cleanup (bfd *) ATTRIBUTE_HIDDEN; extern void _bfd_unlink_from_archive_parent (bfd *) ATTRIBUTE_HIDDEN; #define _bfd_generic_bfd_free_cached_info _bfd_bool_bfd_true -extern bfd_boolean _bfd_generic_new_section_hook +extern bool _bfd_generic_new_section_hook (bfd *, asection *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_get_section_contents +extern bool _bfd_generic_get_section_contents (bfd *, asection *, void *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_get_section_contents_in_window +extern bool _bfd_generic_get_section_contents_in_window (bfd *, asection *, bfd_window *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; /* Generic routines to use for BFD_JUMP_TABLE_COPY. Use @@ -300,7 +300,7 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window #define _bfd_generic_bfd_copy_private_header_data _bfd_bool_bfd_bfd_true #define _bfd_generic_bfd_print_private_bfd_data _bfd_bool_bfd_ptr_true -extern bfd_boolean _bfd_generic_init_private_section_data +extern bool _bfd_generic_init_private_section_data (bfd *, asection *, bfd *, asection *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; @@ -311,7 +311,7 @@ extern char *_bfd_nocore_core_file_failing_command (bfd *) ATTRIBUTE_HIDDEN; extern int _bfd_nocore_core_file_failing_signal (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nocore_core_file_matches_executable_p +extern bool _bfd_nocore_core_file_matches_executable_p (bfd *, bfd *) ATTRIBUTE_HIDDEN; extern int _bfd_nocore_core_file_pid (bfd *) ATTRIBUTE_HIDDEN; @@ -321,14 +321,14 @@ extern int _bfd_nocore_core_file_pid #define _bfd_noarchive_slurp_armap _bfd_bool_bfd_false_error #define _bfd_noarchive_slurp_extended_name_table _bfd_bool_bfd_false_error -extern bfd_boolean _bfd_noarchive_construct_extended_name_table +extern bool _bfd_noarchive_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; extern void _bfd_noarchive_truncate_arname (bfd *, const char *, char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_noarchive_write_armap +extern bool _bfd_noarchive_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; #define _bfd_noarchive_read_ar_hdr _bfd_ptr_bfd_null_error -extern bfd_boolean _bfd_noarchive_write_ar_hdr +extern bool _bfd_noarchive_write_ar_hdr (bfd *, bfd *) ATTRIBUTE_HIDDEN; extern bfd * _bfd_noarchive_openr_next_archived_file @@ -344,7 +344,7 @@ extern bfd * _bfd_noarchive_get_elt_at_index #define _bfd_archive_bsd_slurp_armap bfd_slurp_bsd_armap #define _bfd_archive_bsd_slurp_extended_name_table \ _bfd_slurp_extended_name_table -extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table +extern bool _bfd_archive_bsd_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname #define _bfd_archive_bsd_write_armap _bfd_bsd_write_armap @@ -355,7 +355,7 @@ extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table #define _bfd_archive_bsd_get_elt_at_index _bfd_generic_get_elt_at_index #define _bfd_archive_bsd_generic_stat_arch_elt \ bfd_generic_stat_arch_elt -extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp +extern bool _bfd_archive_bsd_update_armap_timestamp (bfd *) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style @@ -364,7 +364,7 @@ extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp #define _bfd_archive_coff_slurp_armap bfd_slurp_coff_armap #define _bfd_archive_coff_slurp_extended_name_table \ _bfd_slurp_extended_name_table -extern bfd_boolean _bfd_archive_coff_construct_extended_name_table +extern bool _bfd_archive_coff_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname #define _bfd_archive_coff_write_armap _bfd_coff_write_armap @@ -383,7 +383,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table #define _bfd_archive_bsd44_slurp_armap bfd_slurp_bsd_armap #define _bfd_archive_bsd44_slurp_extended_name_table \ _bfd_slurp_extended_name_table -extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table +extern bool _bfd_archive_bsd44_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; #define _bfd_archive_bsd44_truncate_arname bfd_bsd_truncate_arname #define _bfd_archive_bsd44_write_armap _bfd_bsd_write_armap @@ -401,7 +401,7 @@ extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_vms_lib). Some of them are irrelevant. */ -extern bfd_boolean _bfd_vms_lib_write_archive_contents +extern bool _bfd_vms_lib_write_archive_contents (bfd *) ATTRIBUTE_HIDDEN; #define _bfd_vms_lib_slurp_armap _bfd_noarchive_slurp_armap #define _bfd_vms_lib_slurp_extended_name_table \ @@ -430,9 +430,9 @@ extern bfd_cleanup _bfd_vms_lib_alpha_archive_p (bfd *) ATTRIBUTE_HIDDEN; extern bfd_cleanup _bfd_vms_lib_ia64_archive_p (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_vms_lib_alpha_mkarchive +extern bool _bfd_vms_lib_alpha_mkarchive (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_vms_lib_ia64_mkarchive +extern bool _bfd_vms_lib_ia64_mkarchive (bfd *) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol @@ -447,27 +447,27 @@ extern void _bfd_nosymbols_print_symbol extern void _bfd_nosymbols_get_symbol_info (bfd *, asymbol *, symbol_info *) ATTRIBUTE_HIDDEN; extern const char * _bfd_nosymbols_get_symbol_version_string - (bfd *, asymbol *, bfd_boolean, bfd_boolean *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_bfd_is_local_label_name + (bfd *, asymbol *, bool, bool *) ATTRIBUTE_HIDDEN; +extern bool _bfd_nosymbols_bfd_is_local_label_name (bfd *, const char *) ATTRIBUTE_HIDDEN; #define _bfd_nosymbols_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false extern alent *_bfd_nosymbols_get_lineno (bfd *, asymbol *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_find_nearest_line +extern bool _bfd_nosymbols_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_find_line +extern bool _bfd_nosymbols_find_line (bfd *, asymbol **, asymbol *, const char **, unsigned int *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_find_inliner_info +extern bool _bfd_nosymbols_find_inliner_info (bfd *, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN; extern asymbol *_bfd_nosymbols_bfd_make_debug_symbol (bfd *, void *, unsigned long) ATTRIBUTE_HIDDEN; extern long _bfd_nosymbols_read_minisymbols - (bfd *, bfd_boolean, void **, unsigned int *) ATTRIBUTE_HIDDEN; + (bfd *, bool, void **, unsigned int *) ATTRIBUTE_HIDDEN; extern asymbol *_bfd_nosymbols_minisymbol_to_symbol - (bfd *, bfd_boolean, const void *, asymbol *) ATTRIBUTE_HIDDEN; + (bfd *, bool, const void *, asymbol *) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */ @@ -486,16 +486,16 @@ extern reloc_howto_type *_bfd_norelocs_bfd_reloc_name_lookup /* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not be written. Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite). */ -extern bfd_boolean _bfd_nowrite_set_arch_mach +extern bool _bfd_nowrite_set_arch_mach (bfd *, enum bfd_architecture, unsigned long) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nowrite_set_section_contents +extern bool _bfd_nowrite_set_section_contents (bfd *, asection *, const void *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; /* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use BFD_JUMP_TABLE_WRITE (_bfd_generic). */ #define _bfd_generic_set_arch_mach bfd_default_set_arch_mach -extern bfd_boolean _bfd_generic_set_section_contents +extern bool _bfd_generic_set_section_contents (bfd *, asection *, const void *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not @@ -505,18 +505,18 @@ extern int _bfd_nolink_sizeof_headers (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; extern bfd_byte *_bfd_nolink_bfd_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_bfd_relax_section - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *) ATTRIBUTE_HIDDEN; + bfd_byte *, bool, asymbol **) ATTRIBUTE_HIDDEN; +extern bool _bfd_nolink_bfd_relax_section + (bfd *, asection *, struct bfd_link_info *, bool *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_gc_sections _bfd_bool_bfd_link_false_error -extern bfd_boolean _bfd_nolink_bfd_lookup_section_flags +extern bool _bfd_nolink_bfd_lookup_section_flags (struct bfd_link_info *, struct flag_info *, asection *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_merge_sections _bfd_bool_bfd_link_false_error -extern bfd_boolean _bfd_nolink_bfd_is_group_section +extern bool _bfd_nolink_bfd_is_group_section (bfd *, const asection *) ATTRIBUTE_HIDDEN; extern const char *_bfd_nolink_bfd_group_name (bfd *, const asection *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_bfd_discard_group +extern bool _bfd_nolink_bfd_discard_group (bfd *, asection *) ATTRIBUTE_HIDDEN; extern struct bfd_link_hash_table *_bfd_nolink_bfd_link_hash_table_create (bfd *) ATTRIBUTE_HIDDEN; @@ -527,11 +527,11 @@ extern void _bfd_nolink_bfd_copy_link_hash_symbol_type (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_final_link _bfd_bool_bfd_link_false_error -extern bfd_boolean _bfd_nolink_bfd_link_split_section +extern bool _bfd_nolink_bfd_link_split_section (bfd *, struct bfd_section *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_section_already_linked +extern bool _bfd_nolink_section_already_linked (bfd *, asection *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_bfd_define_common_symbol +extern bool _bfd_nolink_bfd_define_common_symbol (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_link_hide_symbol \ @@ -556,22 +556,22 @@ extern long _bfd_nodynamic_canonicalize_dynamic_reloc /* Generic routine to determine of the given symbol is a local label. */ -extern bfd_boolean bfd_generic_is_local_label_name +extern bool bfd_generic_is_local_label_name (bfd *, const char *) ATTRIBUTE_HIDDEN; /* Generic minisymbol routines. */ extern long _bfd_generic_read_minisymbols - (bfd *, bfd_boolean, void **, unsigned int *) ATTRIBUTE_HIDDEN; + (bfd *, bool, void **, unsigned int *) ATTRIBUTE_HIDDEN; extern asymbol *_bfd_generic_minisymbol_to_symbol - (bfd *, bfd_boolean, const void *, asymbol *) ATTRIBUTE_HIDDEN; + (bfd *, bool, const void *, asymbol *) ATTRIBUTE_HIDDEN; /* Find the nearest line using .stab/.stabstr sections. */ -extern bfd_boolean _bfd_stab_section_find_nearest_line - (bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *, +extern bool _bfd_stab_section_find_nearest_line + (bfd *, asymbol **, asection *, bfd_vma, bool *, const char **, const char **, unsigned int *, void **) ATTRIBUTE_HIDDEN; /* Find the nearest line using DWARF 1 debugging information. */ -extern bfd_boolean _bfd_dwarf1_find_nearest_line +extern bool _bfd_dwarf1_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN; @@ -597,14 +597,14 @@ extern bfd_signed_vma _bfd_dwarf2_find_symbol_bias (asymbol **, void **) ATTRIBUTE_HIDDEN; /* Find inliner info after calling bfd_find_nearest_line. */ -extern bfd_boolean _bfd_dwarf2_find_inliner_info +extern bool _bfd_dwarf2_find_inliner_info (bfd *, const char **, const char **, unsigned int *, void **) ATTRIBUTE_HIDDEN; /* Read DWARF 2 debugging information. */ -extern bfd_boolean _bfd_dwarf2_slurp_debug_info +extern bool _bfd_dwarf2_slurp_debug_info (bfd *, bfd *, const struct dwarf_debug_section *, asymbol **, void **, - bfd_boolean) ATTRIBUTE_HIDDEN; + bool) ATTRIBUTE_HIDDEN; /* Clean up the data used to handle DWARF 2 debugging information. */ extern void _bfd_dwarf2_cleanup_debug_info @@ -621,7 +621,7 @@ extern struct bfd_hash_entry *_bfd_link_hash_newfunc const char *string) ATTRIBUTE_HIDDEN; /* Initialize a bfd_link_hash_table. */ -extern bfd_boolean _bfd_link_hash_table_init +extern bool _bfd_link_hash_table_init (struct bfd_link_hash_table *, bfd *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -637,24 +637,24 @@ extern void _bfd_generic_link_hash_table_free (bfd *) ATTRIBUTE_HIDDEN; /* Generic add symbol routine. */ -extern bfd_boolean _bfd_generic_link_add_symbols +extern bool _bfd_generic_link_add_symbols (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; /* Generic archive add symbol routine. */ -extern bfd_boolean _bfd_generic_link_add_archive_symbols +extern bool _bfd_generic_link_add_archive_symbols (bfd *, struct bfd_link_info *, - bfd_boolean (*) (bfd *, struct bfd_link_info *, + bool (*) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, - bfd_boolean *)) ATTRIBUTE_HIDDEN; + bool *)) ATTRIBUTE_HIDDEN; /* Forward declaration to avoid prototype errors. */ typedef struct bfd_link_hash_entry _bfd_link_hash_entry; /* Generic routine to add a single symbol. */ -extern bfd_boolean _bfd_generic_link_add_one_symbol +extern bool _bfd_generic_link_add_one_symbol (struct bfd_link_info *, bfd *, const char *name, flagword, - asection *, bfd_vma, const char *, bfd_boolean copy, - bfd_boolean constructor, struct bfd_link_hash_entry **) ATTRIBUTE_HIDDEN; + asection *, bfd_vma, const char *, bool copy, + bool constructor, struct bfd_link_hash_entry **) ATTRIBUTE_HIDDEN; /* Generic routine to mark section as supplying symbols only. */ extern void _bfd_generic_link_just_syms @@ -666,22 +666,22 @@ extern void _bfd_generic_copy_link_hash_symbol_type ATTRIBUTE_HIDDEN; /* Generic link routine. */ -extern bfd_boolean _bfd_generic_final_link +extern bool _bfd_generic_final_link (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_link_split_section +extern bool _bfd_generic_link_split_section (bfd *, struct bfd_section *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_section_already_linked +extern bool _bfd_generic_section_already_linked (bfd *, asection *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; /* Generic reloc_link_order processing routine. */ -extern bfd_boolean _bfd_generic_reloc_link_order +extern bool _bfd_generic_reloc_link_order (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *) ATTRIBUTE_HIDDEN; /* Default link order processing routine. */ -extern bfd_boolean _bfd_default_link_order +extern bool _bfd_default_link_order (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *) ATTRIBUTE_HIDDEN; @@ -704,24 +704,24 @@ extern bfd_reloc_status_type _bfd_clear_contents /* Link stabs in sections in the first pass. */ -extern bfd_boolean _bfd_link_section_stabs +extern bool _bfd_link_section_stabs (bfd *, struct stab_info *, asection *, asection *, void **, bfd_size_type *) ATTRIBUTE_HIDDEN; /* Eliminate stabs for discarded functions and symbols. */ -extern bfd_boolean _bfd_discard_section_stabs - (bfd *, asection *, void *, bfd_boolean (*) (bfd_vma, void *), void *) +extern bool _bfd_discard_section_stabs + (bfd *, asection *, void *, bool (*) (bfd_vma, void *), void *) ATTRIBUTE_HIDDEN; /* Write out the .stab section when linking stabs in sections. */ -extern bfd_boolean _bfd_write_section_stabs +extern bool _bfd_write_section_stabs (bfd *, struct stab_info *, asection *, void **, bfd_byte *) ATTRIBUTE_HIDDEN; /* Write out the .stabstr string table when linking stabs in sections. */ -extern bfd_boolean _bfd_write_stab_strings +extern bool _bfd_write_stab_strings (bfd *, struct stab_info *) ATTRIBUTE_HIDDEN; /* Find an offset within a .stab section when linking stabs in @@ -732,18 +732,18 @@ extern bfd_vma _bfd_stab_section_offset /* Register a SEC_MERGE section as a candidate for merging. */ -extern bfd_boolean _bfd_add_merge_section +extern bool _bfd_add_merge_section (bfd *, void **, asection *, void **) ATTRIBUTE_HIDDEN; /* Attempt to merge SEC_MERGE sections. */ -extern bfd_boolean _bfd_merge_sections +extern bool _bfd_merge_sections (bfd *, struct bfd_link_info *, void *, void (*) (bfd *, asection *)) ATTRIBUTE_HIDDEN; /* Write out a merged section. */ -extern bfd_boolean _bfd_write_merged_section +extern bool _bfd_write_merged_section (bfd *, asection *, void *) ATTRIBUTE_HIDDEN; /* Find an offset within a modified SEC_MERGE section. */ @@ -773,11 +773,11 @@ extern bfd_size_type _bfd_stringtab_size /* Add a string to a string table. */ extern bfd_size_type _bfd_stringtab_add - (struct bfd_strtab_hash *, const char *, bfd_boolean hash, bfd_boolean copy) + (struct bfd_strtab_hash *, const char *, bool hash, bool copy) ATTRIBUTE_HIDDEN; /* Write out a string table. */ -extern bfd_boolean _bfd_stringtab_emit +extern bool _bfd_stringtab_emit (bfd *, struct bfd_strtab_hash *) ATTRIBUTE_HIDDEN; /* Macros to tell if bfds are read or write enabled. @@ -838,15 +838,15 @@ extern const bfd_target *const *const bfd_associated_vector ATTRIBUTE_HIDDEN; struct ecoff_find_line; #endif -extern bfd_boolean _bfd_ecoff_locate_line +extern bool _bfd_ecoff_locate_line (bfd *, asection *, bfd_vma, struct ecoff_debug_info * const, const struct ecoff_debug_swap * const, struct ecoff_find_line *, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ecoff_get_accumulated_pdr +extern bool _bfd_ecoff_get_accumulated_pdr (void *, bfd_byte *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ecoff_get_accumulated_sym +extern bool _bfd_ecoff_get_accumulated_sym (void *, bfd_byte *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ecoff_get_accumulated_ss +extern bool _bfd_ecoff_get_accumulated_ss (void *, bfd_byte *) ATTRIBUTE_HIDDEN; extern bfd_vma _bfd_get_gp_value @@ -858,10 +858,10 @@ extern void _bfd_set_gp_value other common header files. */ #ifndef _bfd_sh_align_load_span -extern bfd_boolean _bfd_sh_align_load_span +extern bool _bfd_sh_align_load_span (bfd *, asection *, bfd_byte *, - bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma), - void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *) ATTRIBUTE_HIDDEN; + bool (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma), + void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bool *) ATTRIBUTE_HIDDEN; #endif /* This is the shape of the elements inside the already_linked hash @@ -882,11 +882,11 @@ struct bfd_section_already_linked extern struct bfd_section_already_linked_hash_entry * bfd_section_already_linked_table_lookup (const char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean bfd_section_already_linked_table_insert +extern bool bfd_section_already_linked_table_insert (struct bfd_section_already_linked_hash_entry *, asection *) ATTRIBUTE_HIDDEN; extern void bfd_section_already_linked_table_traverse - (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *, + (bool (*) (struct bfd_section_already_linked_hash_entry *, void *), void *) ATTRIBUTE_HIDDEN; extern bfd_vma _bfd_read_unsigned_leb128 @@ -894,7 +894,7 @@ extern bfd_vma _bfd_read_unsigned_leb128 extern bfd_signed_vma _bfd_read_signed_leb128 (bfd *, bfd_byte *, unsigned int *) ATTRIBUTE_HIDDEN; extern bfd_vma _bfd_safe_read_leb128 - (bfd *, bfd_byte *, unsigned int *, bfd_boolean, const bfd_byte * const) + (bfd *, bfd_byte *, unsigned int *, bool, const bfd_byte * const) ATTRIBUTE_HIDDEN; extern bfd_byte * _bfd_write_unsigned_leb128 (bfd_byte *, bfd_byte *, bfd_vma) ATTRIBUTE_HIDDEN; diff --git a/bfd/libbfd.c b/bfd/libbfd.c index 4f3dd5ad53..9db14c3c22 100644 --- a/bfd/libbfd.c +++ b/bfd/libbfd.c @@ -40,30 +40,30 @@ DESCRIPTION completeness. */ -bfd_boolean +bool _bfd_bool_bfd_false (bfd *abfd ATTRIBUTE_UNUSED) { - return FALSE; + return false; } -bfd_boolean +bool _bfd_bool_bfd_asymbol_false (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym ATTRIBUTE_UNUSED) { - return FALSE; + return false; } /* A routine which is used in target vectors for unsupported operations. */ -bfd_boolean +bool _bfd_bool_bfd_false_error (bfd *ignore ATTRIBUTE_UNUSED) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } -bfd_boolean +bool _bfd_bool_bfd_link_false_error (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED) { @@ -73,56 +73,56 @@ _bfd_bool_bfd_link_false_error (bfd *abfd, /* A routine which is used in target vectors for supported operations which do not actually do anything. */ -bfd_boolean +bool _bfd_bool_bfd_true (bfd *ignore ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool _bfd_bool_bfd_link_true (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool _bfd_bool_bfd_bfd_true (bfd *ibfd ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool _bfd_bool_bfd_uint_true (bfd *abfd ATTRIBUTE_UNUSED, unsigned int flags ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool _bfd_bool_bfd_asection_bfd_asection_true (bfd *ibfd ATTRIBUTE_UNUSED, asection *isec ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, asection *osec ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool _bfd_bool_bfd_asymbol_bfd_asymbol_true (bfd *ibfd ATTRIBUTE_UNUSED, asymbol *isym ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, asymbol *osym ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool _bfd_bool_bfd_ptr_true (bfd *abfd ATTRIBUTE_UNUSED, void *ptr ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* A routine which is used in target vectors for unsupported @@ -206,13 +206,13 @@ _bfd_norelocs_set_reloc (bfd *abfd ATTRIBUTE_UNUSED, /* Do nothing. */ } -bfd_boolean +bool _bfd_nocore_core_file_matches_executable_p (bfd *ignore_core_bfd ATTRIBUTE_UNUSED, bfd *ignore_exec_bfd ATTRIBUTE_UNUSED) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* Routine to handle core_file_failing_command entry point for targets @@ -336,7 +336,7 @@ INTERNAL_FUNCTION bfd_write_bigendian_4byte_int SYNOPSIS - bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int); + bool bfd_write_bigendian_4byte_int (bfd *, unsigned int); DESCRIPTION Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big @@ -344,7 +344,7 @@ DESCRIPTION archives. */ -bfd_boolean +bool bfd_write_bigendian_4byte_int (bfd *abfd, unsigned int i) { bfd_byte buffer[4]; @@ -822,7 +822,7 @@ bfd_putl64 (bfd_uint64_t data ATTRIBUTE_UNUSED, void *p ATTRIBUTE_UNUSED) } void -bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p) +bfd_put_bits (bfd_uint64_t data, void *p, int bits, bool big_p) { bfd_byte *addr = (bfd_byte *) p; int i; @@ -842,7 +842,7 @@ bfd_put_bits (bfd_uint64_t data, void *p, int bits, bfd_boolean big_p) } bfd_uint64_t -bfd_get_bits (const void *p, int bits, bfd_boolean big_p) +bfd_get_bits (const void *p, int bits, bool big_p) { const bfd_byte *addr = (const bfd_byte *) p; bfd_uint64_t data; @@ -866,7 +866,7 @@ bfd_get_bits (const void *p, int bits, bfd_boolean big_p) /* Default implementation */ -bfd_boolean +bool _bfd_generic_get_section_contents (bfd *abfd, sec_ptr section, void *location, @@ -875,7 +875,7 @@ _bfd_generic_get_section_contents (bfd *abfd, { bfd_size_type sz; if (count == 0) - return TRUE; + return true; if (section->compress_status != COMPRESS_SECTION_NONE) { @@ -884,7 +884,7 @@ _bfd_generic_get_section_contents (bfd *abfd, (_("%pB: unable to get decompressed section %pA"), abfd, section); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* We do allow reading of a section after bfd_final_link has @@ -904,17 +904,17 @@ _bfd_generic_get_section_contents (bfd *abfd, > arelt_size (abfd)))) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bread (location, count, abfd) != count) - return FALSE; + return false; - return TRUE; + return true; } -bfd_boolean +bool _bfd_generic_get_section_contents_in_window (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr section ATTRIBUTE_UNUSED, @@ -926,7 +926,7 @@ _bfd_generic_get_section_contents_in_window bfd_size_type sz; if (count == 0) - return TRUE; + return true; if (abfd->xvec->_bfd_get_section_contents != _bfd_generic_get_section_contents) { @@ -938,13 +938,13 @@ _bfd_generic_get_section_contents_in_window bfd_free_window (w); w->i = bfd_zmalloc (sizeof (bfd_window_internal)); if (w->i == NULL) - return FALSE; + return false; w->i->data = bfd_malloc (count); if (w->i->data == NULL) { free (w->i); w->i = NULL; - return FALSE; + return false; } w->i->mapped = 0; w->i->refcount = 1; @@ -963,9 +963,9 @@ _bfd_generic_get_section_contents_in_window && ((ufile_ptr) section->filepos + offset + count > arelt_size (abfd))) || ! bfd_get_file_window (abfd, section->filepos + offset, count, w, - TRUE)) - return FALSE; - return TRUE; + true)) + return false; + return true; #else abort (); #endif @@ -975,7 +975,7 @@ _bfd_generic_get_section_contents_in_window NEW sections is disallowed. It is useful in patching existing sections in read-write files, though. See other set_section_contents functions to see why it doesn't work for new sections. */ -bfd_boolean +bool _bfd_generic_set_section_contents (bfd *abfd, sec_ptr section, const void *location, @@ -983,13 +983,13 @@ _bfd_generic_set_section_contents (bfd *abfd, bfd_size_type count) { if (count == 0) - return TRUE; + return true; if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; - return TRUE; + return true; } /* @@ -1018,7 +1018,7 @@ bfd_log2 (bfd_vma x) return result; } -bfd_boolean +bool bfd_generic_is_local_label_name (bfd *abfd, const char *name) { char locals_prefix = (bfd_get_symbol_leading_char (abfd) == '_') ? 'L' : '.'; @@ -1094,7 +1094,7 @@ bfd_vma _bfd_safe_read_leb128 (bfd *abfd ATTRIBUTE_UNUSED, bfd_byte *data, unsigned int *length_return, - bfd_boolean sign, + bool sign, const bfd_byte * const end) { bfd_vma result = 0; @@ -1182,12 +1182,12 @@ _bfd_write_unsigned_leb128 (bfd_byte *p, bfd_byte *end, bfd_vma val) return p; } -bfd_boolean +bool _bfd_generic_init_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED, asection *isec ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, asection *osec ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED) { - return TRUE; + return true; } diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 9cb079e830..f1d25d0ab1 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -140,21 +140,21 @@ extern bfd * _bfd_create_empty_archive_element_shell (bfd *) ATTRIBUTE_HIDDEN; extern bfd * _bfd_look_for_bfd_in_cache (bfd *, file_ptr) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_add_bfd_to_archive_cache +extern bool _bfd_add_bfd_to_archive_cache (bfd *, file_ptr, bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_mkarchive +extern bool _bfd_generic_mkarchive (bfd *) ATTRIBUTE_HIDDEN; extern char *_bfd_append_relative_path (bfd *, char *) ATTRIBUTE_HIDDEN; extern bfd_cleanup bfd_generic_archive_p (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean bfd_slurp_armap +extern bool bfd_slurp_armap (bfd *) ATTRIBUTE_HIDDEN; #define bfd_slurp_bsd_armap bfd_slurp_armap #define bfd_slurp_coff_armap bfd_slurp_armap -extern bfd_boolean _bfd_archive_64_bit_slurp_armap +extern bool _bfd_archive_64_bit_slurp_armap (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_archive_64_bit_write_armap +extern bool _bfd_archive_64_bit_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; #define _bfd_archive_64_bit_slurp_extended_name_table \ _bfd_slurp_extended_name_table @@ -174,13 +174,13 @@ extern bfd_boolean _bfd_archive_64_bit_write_armap bfd_generic_stat_arch_elt #define _bfd_archive_64_bit_update_armap_timestamp _bfd_bool_bfd_true -extern bfd_boolean _bfd_slurp_extended_name_table +extern bool _bfd_slurp_extended_name_table (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_construct_extended_name_table - (bfd *, bfd_boolean, char **, bfd_size_type *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_write_archive_contents +extern bool _bfd_construct_extended_name_table + (bfd *, bool, char **, bfd_size_type *) ATTRIBUTE_HIDDEN; +extern bool _bfd_write_archive_contents (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_compute_and_write_armap +extern bool _bfd_compute_and_write_armap (bfd *, unsigned int) ATTRIBUTE_HIDDEN; extern bfd *_bfd_get_elt_at_filepos (bfd *, file_ptr) ATTRIBUTE_HIDDEN; @@ -188,30 +188,30 @@ extern bfd *_bfd_generic_get_elt_at_index (bfd *, symindex) ATTRIBUTE_HIDDEN; extern bfd * _bfd_new_bfd (void) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_free_cached_info +extern bool _bfd_free_cached_info (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_false +extern bool _bfd_bool_bfd_false (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_asymbol_false +extern bool _bfd_bool_bfd_asymbol_false (bfd *, asymbol *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_false_error +extern bool _bfd_bool_bfd_false_error (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_link_false_error +extern bool _bfd_bool_bfd_link_false_error (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_true +extern bool _bfd_bool_bfd_true (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_link_true +extern bool _bfd_bool_bfd_link_true (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_bfd_true +extern bool _bfd_bool_bfd_bfd_true (bfd *, bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_uint_true +extern bool _bfd_bool_bfd_uint_true (bfd *, unsigned int) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_asection_bfd_asection_true +extern bool _bfd_bool_bfd_asection_bfd_asection_true (bfd *, asection *, bfd *, asection *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_asymbol_bfd_asymbol_true +extern bool _bfd_bool_bfd_asymbol_bfd_asymbol_true (bfd *, asymbol *, bfd *, asymbol *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bool_bfd_ptr_true +extern bool _bfd_bool_bfd_ptr_true (bfd *, void *) ATTRIBUTE_HIDDEN; extern void *_bfd_ptr_bfd_null_error (bfd *) ATTRIBUTE_HIDDEN; @@ -243,26 +243,26 @@ extern void bfd_bsd_truncate_arname extern void bfd_gnu_truncate_arname (bfd *, const char *, char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bsd_write_armap +extern bool _bfd_bsd_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_coff_write_armap +extern bool _bfd_coff_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; extern void *_bfd_generic_read_ar_hdr (bfd *) ATTRIBUTE_HIDDEN; extern void _bfd_ar_spacepad (char *, size_t, const char *, long) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ar_sizepad +extern bool _bfd_ar_sizepad (char *, size_t, bfd_size_type) ATTRIBUTE_HIDDEN; extern void *_bfd_generic_read_ar_hdr_mag (bfd *, const char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_write_ar_hdr +extern bool _bfd_generic_write_ar_hdr (bfd *, bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_bsd44_write_ar_hdr +extern bool _bfd_bsd44_write_ar_hdr (bfd *, bfd *) ATTRIBUTE_HIDDEN; extern bfd * bfd_generic_openr_next_archived_file @@ -280,15 +280,15 @@ extern int bfd_generic_stat_arch_elt BFD_JUMP_TABLE_GENERIC (_bfd_generic). */ #define _bfd_generic_close_and_cleanup _bfd_archive_close_and_cleanup -extern bfd_boolean _bfd_archive_close_and_cleanup +extern bool _bfd_archive_close_and_cleanup (bfd *) ATTRIBUTE_HIDDEN; extern void _bfd_unlink_from_archive_parent (bfd *) ATTRIBUTE_HIDDEN; #define _bfd_generic_bfd_free_cached_info _bfd_bool_bfd_true -extern bfd_boolean _bfd_generic_new_section_hook +extern bool _bfd_generic_new_section_hook (bfd *, asection *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_get_section_contents +extern bool _bfd_generic_get_section_contents (bfd *, asection *, void *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_get_section_contents_in_window +extern bool _bfd_generic_get_section_contents_in_window (bfd *, asection *, bfd_window *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; /* Generic routines to use for BFD_JUMP_TABLE_COPY. Use @@ -305,7 +305,7 @@ extern bfd_boolean _bfd_generic_get_section_contents_in_window #define _bfd_generic_bfd_copy_private_header_data _bfd_bool_bfd_bfd_true #define _bfd_generic_bfd_print_private_bfd_data _bfd_bool_bfd_ptr_true -extern bfd_boolean _bfd_generic_init_private_section_data +extern bool _bfd_generic_init_private_section_data (bfd *, asection *, bfd *, asection *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; @@ -316,7 +316,7 @@ extern char *_bfd_nocore_core_file_failing_command (bfd *) ATTRIBUTE_HIDDEN; extern int _bfd_nocore_core_file_failing_signal (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nocore_core_file_matches_executable_p +extern bool _bfd_nocore_core_file_matches_executable_p (bfd *, bfd *) ATTRIBUTE_HIDDEN; extern int _bfd_nocore_core_file_pid (bfd *) ATTRIBUTE_HIDDEN; @@ -326,14 +326,14 @@ extern int _bfd_nocore_core_file_pid #define _bfd_noarchive_slurp_armap _bfd_bool_bfd_false_error #define _bfd_noarchive_slurp_extended_name_table _bfd_bool_bfd_false_error -extern bfd_boolean _bfd_noarchive_construct_extended_name_table +extern bool _bfd_noarchive_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; extern void _bfd_noarchive_truncate_arname (bfd *, const char *, char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_noarchive_write_armap +extern bool _bfd_noarchive_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int) ATTRIBUTE_HIDDEN; #define _bfd_noarchive_read_ar_hdr _bfd_ptr_bfd_null_error -extern bfd_boolean _bfd_noarchive_write_ar_hdr +extern bool _bfd_noarchive_write_ar_hdr (bfd *, bfd *) ATTRIBUTE_HIDDEN; extern bfd * _bfd_noarchive_openr_next_archived_file @@ -349,7 +349,7 @@ extern bfd * _bfd_noarchive_get_elt_at_index #define _bfd_archive_bsd_slurp_armap bfd_slurp_bsd_armap #define _bfd_archive_bsd_slurp_extended_name_table \ _bfd_slurp_extended_name_table -extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table +extern bool _bfd_archive_bsd_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname #define _bfd_archive_bsd_write_armap _bfd_bsd_write_armap @@ -360,7 +360,7 @@ extern bfd_boolean _bfd_archive_bsd_construct_extended_name_table #define _bfd_archive_bsd_get_elt_at_index _bfd_generic_get_elt_at_index #define _bfd_archive_bsd_generic_stat_arch_elt \ bfd_generic_stat_arch_elt -extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp +extern bool _bfd_archive_bsd_update_armap_timestamp (bfd *) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style @@ -369,7 +369,7 @@ extern bfd_boolean _bfd_archive_bsd_update_armap_timestamp #define _bfd_archive_coff_slurp_armap bfd_slurp_coff_armap #define _bfd_archive_coff_slurp_extended_name_table \ _bfd_slurp_extended_name_table -extern bfd_boolean _bfd_archive_coff_construct_extended_name_table +extern bool _bfd_archive_coff_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname #define _bfd_archive_coff_write_armap _bfd_coff_write_armap @@ -388,7 +388,7 @@ extern bfd_boolean _bfd_archive_coff_construct_extended_name_table #define _bfd_archive_bsd44_slurp_armap bfd_slurp_bsd_armap #define _bfd_archive_bsd44_slurp_extended_name_table \ _bfd_slurp_extended_name_table -extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table +extern bool _bfd_archive_bsd44_construct_extended_name_table (bfd *, char **, bfd_size_type *, const char **) ATTRIBUTE_HIDDEN; #define _bfd_archive_bsd44_truncate_arname bfd_bsd_truncate_arname #define _bfd_archive_bsd44_write_armap _bfd_bsd_write_armap @@ -406,7 +406,7 @@ extern bfd_boolean _bfd_archive_bsd44_construct_extended_name_table archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_vms_lib). Some of them are irrelevant. */ -extern bfd_boolean _bfd_vms_lib_write_archive_contents +extern bool _bfd_vms_lib_write_archive_contents (bfd *) ATTRIBUTE_HIDDEN; #define _bfd_vms_lib_slurp_armap _bfd_noarchive_slurp_armap #define _bfd_vms_lib_slurp_extended_name_table \ @@ -435,9 +435,9 @@ extern bfd_cleanup _bfd_vms_lib_alpha_archive_p (bfd *) ATTRIBUTE_HIDDEN; extern bfd_cleanup _bfd_vms_lib_ia64_archive_p (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_vms_lib_alpha_mkarchive +extern bool _bfd_vms_lib_alpha_mkarchive (bfd *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_vms_lib_ia64_mkarchive +extern bool _bfd_vms_lib_ia64_mkarchive (bfd *) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol @@ -452,27 +452,27 @@ extern void _bfd_nosymbols_print_symbol extern void _bfd_nosymbols_get_symbol_info (bfd *, asymbol *, symbol_info *) ATTRIBUTE_HIDDEN; extern const char * _bfd_nosymbols_get_symbol_version_string - (bfd *, asymbol *, bfd_boolean, bfd_boolean *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_bfd_is_local_label_name + (bfd *, asymbol *, bool, bool *) ATTRIBUTE_HIDDEN; +extern bool _bfd_nosymbols_bfd_is_local_label_name (bfd *, const char *) ATTRIBUTE_HIDDEN; #define _bfd_nosymbols_bfd_is_target_special_symbol _bfd_bool_bfd_asymbol_false extern alent *_bfd_nosymbols_get_lineno (bfd *, asymbol *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_find_nearest_line +extern bool _bfd_nosymbols_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_find_line +extern bool _bfd_nosymbols_find_line (bfd *, asymbol **, asymbol *, const char **, unsigned int *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nosymbols_find_inliner_info +extern bool _bfd_nosymbols_find_inliner_info (bfd *, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN; extern asymbol *_bfd_nosymbols_bfd_make_debug_symbol (bfd *, void *, unsigned long) ATTRIBUTE_HIDDEN; extern long _bfd_nosymbols_read_minisymbols - (bfd *, bfd_boolean, void **, unsigned int *) ATTRIBUTE_HIDDEN; + (bfd *, bool, void **, unsigned int *) ATTRIBUTE_HIDDEN; extern asymbol *_bfd_nosymbols_minisymbol_to_symbol - (bfd *, bfd_boolean, const void *, asymbol *) ATTRIBUTE_HIDDEN; + (bfd *, bool, const void *, asymbol *) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */ @@ -491,16 +491,16 @@ extern reloc_howto_type *_bfd_norelocs_bfd_reloc_name_lookup /* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not be written. Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite). */ -extern bfd_boolean _bfd_nowrite_set_arch_mach +extern bool _bfd_nowrite_set_arch_mach (bfd *, enum bfd_architecture, unsigned long) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nowrite_set_section_contents +extern bool _bfd_nowrite_set_section_contents (bfd *, asection *, const void *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; /* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use BFD_JUMP_TABLE_WRITE (_bfd_generic). */ #define _bfd_generic_set_arch_mach bfd_default_set_arch_mach -extern bfd_boolean _bfd_generic_set_section_contents +extern bool _bfd_generic_set_section_contents (bfd *, asection *, const void *, file_ptr, bfd_size_type) ATTRIBUTE_HIDDEN; /* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not @@ -510,18 +510,18 @@ extern int _bfd_nolink_sizeof_headers (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; extern bfd_byte *_bfd_nolink_bfd_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_bfd_relax_section - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *) ATTRIBUTE_HIDDEN; + bfd_byte *, bool, asymbol **) ATTRIBUTE_HIDDEN; +extern bool _bfd_nolink_bfd_relax_section + (bfd *, asection *, struct bfd_link_info *, bool *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_gc_sections _bfd_bool_bfd_link_false_error -extern bfd_boolean _bfd_nolink_bfd_lookup_section_flags +extern bool _bfd_nolink_bfd_lookup_section_flags (struct bfd_link_info *, struct flag_info *, asection *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_merge_sections _bfd_bool_bfd_link_false_error -extern bfd_boolean _bfd_nolink_bfd_is_group_section +extern bool _bfd_nolink_bfd_is_group_section (bfd *, const asection *) ATTRIBUTE_HIDDEN; extern const char *_bfd_nolink_bfd_group_name (bfd *, const asection *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_bfd_discard_group +extern bool _bfd_nolink_bfd_discard_group (bfd *, asection *) ATTRIBUTE_HIDDEN; extern struct bfd_link_hash_table *_bfd_nolink_bfd_link_hash_table_create (bfd *) ATTRIBUTE_HIDDEN; @@ -532,11 +532,11 @@ extern void _bfd_nolink_bfd_copy_link_hash_symbol_type (bfd *, struct bfd_link_hash_entry *, struct bfd_link_hash_entry *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_final_link _bfd_bool_bfd_link_false_error -extern bfd_boolean _bfd_nolink_bfd_link_split_section +extern bool _bfd_nolink_bfd_link_split_section (bfd *, struct bfd_section *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_section_already_linked +extern bool _bfd_nolink_section_already_linked (bfd *, asection *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_nolink_bfd_define_common_symbol +extern bool _bfd_nolink_bfd_define_common_symbol (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *) ATTRIBUTE_HIDDEN; #define _bfd_nolink_bfd_link_hide_symbol \ @@ -561,22 +561,22 @@ extern long _bfd_nodynamic_canonicalize_dynamic_reloc /* Generic routine to determine of the given symbol is a local label. */ -extern bfd_boolean bfd_generic_is_local_label_name +extern bool bfd_generic_is_local_label_name (bfd *, const char *) ATTRIBUTE_HIDDEN; /* Generic minisymbol routines. */ extern long _bfd_generic_read_minisymbols - (bfd *, bfd_boolean, void **, unsigned int *) ATTRIBUTE_HIDDEN; + (bfd *, bool, void **, unsigned int *) ATTRIBUTE_HIDDEN; extern asymbol *_bfd_generic_minisymbol_to_symbol - (bfd *, bfd_boolean, const void *, asymbol *) ATTRIBUTE_HIDDEN; + (bfd *, bool, const void *, asymbol *) ATTRIBUTE_HIDDEN; /* Find the nearest line using .stab/.stabstr sections. */ -extern bfd_boolean _bfd_stab_section_find_nearest_line - (bfd *, asymbol **, asection *, bfd_vma, bfd_boolean *, +extern bool _bfd_stab_section_find_nearest_line + (bfd *, asymbol **, asection *, bfd_vma, bool *, const char **, const char **, unsigned int *, void **) ATTRIBUTE_HIDDEN; /* Find the nearest line using DWARF 1 debugging information. */ -extern bfd_boolean _bfd_dwarf1_find_nearest_line +extern bool _bfd_dwarf1_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN; @@ -602,14 +602,14 @@ extern bfd_signed_vma _bfd_dwarf2_find_symbol_bias (asymbol **, void **) ATTRIBUTE_HIDDEN; /* Find inliner info after calling bfd_find_nearest_line. */ -extern bfd_boolean _bfd_dwarf2_find_inliner_info +extern bool _bfd_dwarf2_find_inliner_info (bfd *, const char **, const char **, unsigned int *, void **) ATTRIBUTE_HIDDEN; /* Read DWARF 2 debugging information. */ -extern bfd_boolean _bfd_dwarf2_slurp_debug_info +extern bool _bfd_dwarf2_slurp_debug_info (bfd *, bfd *, const struct dwarf_debug_section *, asymbol **, void **, - bfd_boolean) ATTRIBUTE_HIDDEN; + bool) ATTRIBUTE_HIDDEN; /* Clean up the data used to handle DWARF 2 debugging information. */ extern void _bfd_dwarf2_cleanup_debug_info @@ -626,7 +626,7 @@ extern struct bfd_hash_entry *_bfd_link_hash_newfunc const char *string) ATTRIBUTE_HIDDEN; /* Initialize a bfd_link_hash_table. */ -extern bfd_boolean _bfd_link_hash_table_init +extern bool _bfd_link_hash_table_init (struct bfd_link_hash_table *, bfd *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -642,24 +642,24 @@ extern void _bfd_generic_link_hash_table_free (bfd *) ATTRIBUTE_HIDDEN; /* Generic add symbol routine. */ -extern bfd_boolean _bfd_generic_link_add_symbols +extern bool _bfd_generic_link_add_symbols (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; /* Generic archive add symbol routine. */ -extern bfd_boolean _bfd_generic_link_add_archive_symbols +extern bool _bfd_generic_link_add_archive_symbols (bfd *, struct bfd_link_info *, - bfd_boolean (*) (bfd *, struct bfd_link_info *, + bool (*) (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, - bfd_boolean *)) ATTRIBUTE_HIDDEN; + bool *)) ATTRIBUTE_HIDDEN; /* Forward declaration to avoid prototype errors. */ typedef struct bfd_link_hash_entry _bfd_link_hash_entry; /* Generic routine to add a single symbol. */ -extern bfd_boolean _bfd_generic_link_add_one_symbol +extern bool _bfd_generic_link_add_one_symbol (struct bfd_link_info *, bfd *, const char *name, flagword, - asection *, bfd_vma, const char *, bfd_boolean copy, - bfd_boolean constructor, struct bfd_link_hash_entry **) ATTRIBUTE_HIDDEN; + asection *, bfd_vma, const char *, bool copy, + bool constructor, struct bfd_link_hash_entry **) ATTRIBUTE_HIDDEN; /* Generic routine to mark section as supplying symbols only. */ extern void _bfd_generic_link_just_syms @@ -671,22 +671,22 @@ extern void _bfd_generic_copy_link_hash_symbol_type ATTRIBUTE_HIDDEN; /* Generic link routine. */ -extern bfd_boolean _bfd_generic_final_link +extern bool _bfd_generic_final_link (bfd *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_link_split_section +extern bool _bfd_generic_link_split_section (bfd *, struct bfd_section *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_generic_section_already_linked +extern bool _bfd_generic_section_already_linked (bfd *, asection *, struct bfd_link_info *) ATTRIBUTE_HIDDEN; /* Generic reloc_link_order processing routine. */ -extern bfd_boolean _bfd_generic_reloc_link_order +extern bool _bfd_generic_reloc_link_order (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *) ATTRIBUTE_HIDDEN; /* Default link order processing routine. */ -extern bfd_boolean _bfd_default_link_order +extern bool _bfd_default_link_order (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *) ATTRIBUTE_HIDDEN; @@ -709,24 +709,24 @@ extern bfd_reloc_status_type _bfd_clear_contents /* Link stabs in sections in the first pass. */ -extern bfd_boolean _bfd_link_section_stabs +extern bool _bfd_link_section_stabs (bfd *, struct stab_info *, asection *, asection *, void **, bfd_size_type *) ATTRIBUTE_HIDDEN; /* Eliminate stabs for discarded functions and symbols. */ -extern bfd_boolean _bfd_discard_section_stabs - (bfd *, asection *, void *, bfd_boolean (*) (bfd_vma, void *), void *) +extern bool _bfd_discard_section_stabs + (bfd *, asection *, void *, bool (*) (bfd_vma, void *), void *) ATTRIBUTE_HIDDEN; /* Write out the .stab section when linking stabs in sections. */ -extern bfd_boolean _bfd_write_section_stabs +extern bool _bfd_write_section_stabs (bfd *, struct stab_info *, asection *, void **, bfd_byte *) ATTRIBUTE_HIDDEN; /* Write out the .stabstr string table when linking stabs in sections. */ -extern bfd_boolean _bfd_write_stab_strings +extern bool _bfd_write_stab_strings (bfd *, struct stab_info *) ATTRIBUTE_HIDDEN; /* Find an offset within a .stab section when linking stabs in @@ -737,18 +737,18 @@ extern bfd_vma _bfd_stab_section_offset /* Register a SEC_MERGE section as a candidate for merging. */ -extern bfd_boolean _bfd_add_merge_section +extern bool _bfd_add_merge_section (bfd *, void **, asection *, void **) ATTRIBUTE_HIDDEN; /* Attempt to merge SEC_MERGE sections. */ -extern bfd_boolean _bfd_merge_sections +extern bool _bfd_merge_sections (bfd *, struct bfd_link_info *, void *, void (*) (bfd *, asection *)) ATTRIBUTE_HIDDEN; /* Write out a merged section. */ -extern bfd_boolean _bfd_write_merged_section +extern bool _bfd_write_merged_section (bfd *, asection *, void *) ATTRIBUTE_HIDDEN; /* Find an offset within a modified SEC_MERGE section. */ @@ -778,11 +778,11 @@ extern bfd_size_type _bfd_stringtab_size /* Add a string to a string table. */ extern bfd_size_type _bfd_stringtab_add - (struct bfd_strtab_hash *, const char *, bfd_boolean hash, bfd_boolean copy) + (struct bfd_strtab_hash *, const char *, bool hash, bool copy) ATTRIBUTE_HIDDEN; /* Write out a string table. */ -extern bfd_boolean _bfd_stringtab_emit +extern bool _bfd_stringtab_emit (bfd *, struct bfd_strtab_hash *) ATTRIBUTE_HIDDEN; /* Macros to tell if bfds are read or write enabled. @@ -843,15 +843,15 @@ extern const bfd_target *const *const bfd_associated_vector ATTRIBUTE_HIDDEN; struct ecoff_find_line; #endif -extern bfd_boolean _bfd_ecoff_locate_line +extern bool _bfd_ecoff_locate_line (bfd *, asection *, bfd_vma, struct ecoff_debug_info * const, const struct ecoff_debug_swap * const, struct ecoff_find_line *, const char **, const char **, unsigned int *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ecoff_get_accumulated_pdr +extern bool _bfd_ecoff_get_accumulated_pdr (void *, bfd_byte *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ecoff_get_accumulated_sym +extern bool _bfd_ecoff_get_accumulated_sym (void *, bfd_byte *) ATTRIBUTE_HIDDEN; -extern bfd_boolean _bfd_ecoff_get_accumulated_ss +extern bool _bfd_ecoff_get_accumulated_ss (void *, bfd_byte *) ATTRIBUTE_HIDDEN; extern bfd_vma _bfd_get_gp_value @@ -863,10 +863,10 @@ extern void _bfd_set_gp_value other common header files. */ #ifndef _bfd_sh_align_load_span -extern bfd_boolean _bfd_sh_align_load_span +extern bool _bfd_sh_align_load_span (bfd *, asection *, bfd_byte *, - bfd_boolean (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma), - void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bfd_boolean *) ATTRIBUTE_HIDDEN; + bool (*) (bfd *, asection *, void *, bfd_byte *, bfd_vma), + void *, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, bool *) ATTRIBUTE_HIDDEN; #endif /* This is the shape of the elements inside the already_linked hash @@ -887,11 +887,11 @@ struct bfd_section_already_linked extern struct bfd_section_already_linked_hash_entry * bfd_section_already_linked_table_lookup (const char *) ATTRIBUTE_HIDDEN; -extern bfd_boolean bfd_section_already_linked_table_insert +extern bool bfd_section_already_linked_table_insert (struct bfd_section_already_linked_hash_entry *, asection *) ATTRIBUTE_HIDDEN; extern void bfd_section_already_linked_table_traverse - (bfd_boolean (*) (struct bfd_section_already_linked_hash_entry *, + (bool (*) (struct bfd_section_already_linked_hash_entry *, void *), void *) ATTRIBUTE_HIDDEN; extern bfd_vma _bfd_read_unsigned_leb128 @@ -899,7 +899,7 @@ extern bfd_vma _bfd_read_unsigned_leb128 extern bfd_signed_vma _bfd_read_signed_leb128 (bfd *, bfd_byte *, unsigned int *) ATTRIBUTE_HIDDEN; extern bfd_vma _bfd_safe_read_leb128 - (bfd *, bfd_byte *, unsigned int *, bfd_boolean, const bfd_byte * const) + (bfd *, bfd_byte *, unsigned int *, bool, const bfd_byte * const) ATTRIBUTE_HIDDEN; extern bfd_byte * _bfd_write_unsigned_leb128 (bfd_byte *, bfd_byte *, bfd_vma) ATTRIBUTE_HIDDEN; @@ -966,7 +966,7 @@ _bfd_malloc_and_read (bfd *abfd, bfd_size_type asize, bfd_size_type rsize) return NULL; } /* Extracted from libbfd.c. */ -bfd_boolean bfd_write_bigendian_4byte_int (bfd *, unsigned int); +bool bfd_write_bigendian_4byte_int (bfd *, unsigned int); unsigned int bfd_log2 (bfd_vma x); @@ -1011,9 +1011,9 @@ struct _bfd_window_internal { unsigned mapped : 1; /* 1 = mmap, 0 = malloc */ }; /* Extracted from cache.c. */ -bfd_boolean bfd_cache_init (bfd *abfd); +bool bfd_cache_init (bfd *abfd); -bfd_boolean bfd_cache_close (bfd *abfd); +bool bfd_cache_close (bfd *abfd); FILE* bfd_open_file (bfd *abfd); @@ -3417,19 +3417,19 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", reloc_howto_type *bfd_default_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code); -bfd_boolean bfd_generic_relax_section +bool bfd_generic_relax_section (bfd *abfd, asection *section, struct bfd_link_info *, - bfd_boolean *); + bool *); -bfd_boolean bfd_generic_gc_sections +bool bfd_generic_gc_sections (bfd *, struct bfd_link_info *); -bfd_boolean bfd_generic_lookup_section_flags +bool bfd_generic_lookup_section_flags (struct bfd_link_info *, struct flag_info *, asection *); -bfd_boolean bfd_generic_merge_sections +bool bfd_generic_merge_sections (bfd *, struct bfd_link_info *); bfd_byte *bfd_generic_get_relocated_section_contents @@ -3437,7 +3437,7 @@ bfd_byte *bfd_generic_get_relocated_section_contents struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols); void _bfd_generic_set_reloc @@ -3446,7 +3446,7 @@ void _bfd_generic_set_reloc arelent **relptr, unsigned int count); -bfd_boolean _bfd_unrecognized_reloc +bool _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type); @@ -3456,15 +3456,15 @@ extern const bfd_arch_info_type bfd_default_arch_struct; const bfd_arch_info_type *bfd_default_compatible (const bfd_arch_info_type *a, const bfd_arch_info_type *b); -bfd_boolean bfd_default_scan +bool bfd_default_scan (const struct bfd_arch_info *info, const char *string); void *bfd_arch_default_fill (bfd_size_type count, - bfd_boolean is_bigendian, - bfd_boolean code); + bool is_bigendian, + bool code); /* Extracted from linker.c. */ -bfd_boolean _bfd_generic_verify_endian_match +bool _bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info); #ifdef __cplusplus diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h index 851e832ae2..ae24b012da 100644 --- a/bfd/libcoff-in.h +++ b/bfd/libcoff-in.h @@ -80,7 +80,7 @@ typedef struct coff_tdata _bfd_coff_get_external_symbols. */ void * external_syms; /* If this is TRUE, the external_syms may not be freed. */ - bfd_boolean keep_syms; + bool keep_syms; /* The string table. May be NULL. Read by _bfd_coff_read_string_table. */ @@ -88,9 +88,9 @@ typedef struct coff_tdata /* The length of the strings table. For error checking. */ bfd_size_type strings_len; /* If this is TRUE, the strings may not be freed. */ - bfd_boolean keep_strings; + bool keep_strings; /* If this is TRUE, the strings have been written out already. */ - bfd_boolean strings_written; + bool strings_written; /* Is this a PE format coff file? */ int pe; @@ -116,7 +116,7 @@ typedef struct coff_tdata flagword flags; /* Is this a GO32 coff file? */ - bfd_boolean go32; + bool go32; /* A stub (extra data prepended before the COFF image) and its size. Used by coff-go32-exe, it contains executable data that loads the @@ -137,13 +137,13 @@ typedef struct pe_tdata /* The timestamp to insert into the output file. If the timestamp is -1 then the current time is used. */ int timestamp; - bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *); + bool (*in_reloc_p) (bfd *, reloc_howto_type *); flagword real_flags; /* Build-id info. */ struct { - bfd_boolean (*after_write_object_contents) (bfd *); + bool (*after_write_object_contents) (bfd *); const char *style; asection *sec; } build_id; @@ -159,10 +159,10 @@ struct xcoff_tdata coff_data_type coff; /* TRUE if this is an XCOFF64 file. */ - bfd_boolean xcoff64; + bool xcoff64; /* TRUE if a large a.out header should be generated. */ - bfd_boolean full_aouthdr; + bool full_aouthdr; /* TOC value. */ bfd_vma toc; @@ -300,7 +300,7 @@ struct coff_reloc_cookie #define coff_link_hash_traverse(table, func, info) \ (bfd_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \ + (bool (*) (struct bfd_link_hash_entry *, void *)) (func), \ (info))) /* Get the COFF linker hash table from a link_info structure. */ @@ -318,26 +318,26 @@ extern long coff_canonicalize_symtab (bfd *, asymbol **); extern int coff_count_linenumbers (bfd *); -extern bfd_boolean coff_renumber_symbols +extern bool coff_renumber_symbols (bfd *, int *); extern void coff_mangle_symbols (bfd *); -extern bfd_boolean coff_write_symbols +extern bool coff_write_symbols (bfd *); -extern bfd_boolean coff_write_alien_symbol +extern bool coff_write_alien_symbol (bfd *, asymbol *, struct internal_syment *, union internal_auxent *, bfd_vma *, bfd_size_type *, asection **, bfd_size_type *); -extern bfd_boolean coff_write_linenumbers +extern bool coff_write_linenumbers (bfd *); extern alent *coff_get_lineno (bfd *, asymbol *); extern asymbol *coff_section_symbol (bfd *, char *); -extern bfd_boolean _bfd_coff_get_external_symbols +extern bool _bfd_coff_get_external_symbols (bfd *); extern const char *_bfd_coff_read_string_table (bfd *); -extern bfd_boolean _bfd_coff_free_symbols +extern bool _bfd_coff_free_symbols (bfd *); extern struct coff_ptr_struct *coff_get_normalized_symtab (bfd *); @@ -351,32 +351,32 @@ extern void coff_get_symbol_info (bfd *, asymbol *, symbol_info *ret); #define coff_get_symbol_version_string \ _bfd_nosymbols_get_symbol_version_string -extern bfd_boolean _bfd_coff_is_local_label_name +extern bool _bfd_coff_is_local_label_name (bfd *, const char *); extern asymbol *coff_bfd_make_debug_symbol (bfd *, void *, unsigned long); -extern bfd_boolean coff_find_nearest_line +extern bool coff_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); #define coff_find_line _bfd_nosymbols_find_line struct dwarf_debug_section; -extern bfd_boolean coff_find_nearest_line_with_names +extern bool coff_find_nearest_line_with_names (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, const struct dwarf_debug_section *); -extern bfd_boolean coff_find_inliner_info +extern bool coff_find_inliner_info (bfd *, const char **, const char **, unsigned int *); extern int coff_sizeof_headers (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_coff_reloc16_relax_section - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *); +extern bool bfd_coff_reloc16_relax_section + (bfd *, asection *, struct bfd_link_info *, bool *); extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **); + bfd_byte *, bool, asymbol **); extern bfd_vma bfd_coff_reloc16_get_value (arelent *, struct bfd_link_info *, asection *); extern void bfd_perform_slip (bfd *, unsigned int, asection *, bfd_vma); -extern bfd_boolean _bfd_coff_close_and_cleanup +extern bool _bfd_coff_close_and_cleanup (bfd *); /* Functions and types in cofflink.c. */ @@ -476,11 +476,11 @@ struct coff_final_link_info /* Output BFD. */ bfd *output_bfd; /* Used to indicate failure in traversal routine. */ - bfd_boolean failed; + bool failed; /* If doing "task linking" set only during the time when we want the global symbol writer to convert the storage class of defined global symbols from global to static. */ - bfd_boolean global_to_static; + bool global_to_static; /* Hash table for long symbol names. */ struct bfd_strtab_hash *strtab; /* When doing a relocatable link, an array of information kept for @@ -554,7 +554,7 @@ struct coff_section_alignment_entry extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); -extern bfd_boolean _bfd_coff_link_hash_table_init +extern bool _bfd_coff_link_hash_table_init (struct coff_link_hash_table *, bfd *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -564,30 +564,30 @@ extern struct bfd_link_hash_table *_bfd_coff_link_hash_table_create (bfd *); extern const char *_bfd_coff_internal_syment_name (bfd *, const struct internal_syment *, char *); -extern bfd_boolean _bfd_coff_section_already_linked +extern bool _bfd_coff_section_already_linked (bfd *, asection *, struct bfd_link_info *); -extern bfd_boolean _bfd_coff_link_add_symbols +extern bool _bfd_coff_link_add_symbols (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_coff_final_link +extern bool _bfd_coff_final_link (bfd *, struct bfd_link_info *); extern struct internal_reloc *_bfd_coff_read_internal_relocs - (bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean, + (bfd *, asection *, bool, bfd_byte *, bool, struct internal_reloc *); -extern bfd_boolean _bfd_coff_generic_relocate_section +extern bool _bfd_coff_generic_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); -extern bfd_boolean _bfd_coff_write_global_sym +extern bool _bfd_coff_write_global_sym (struct bfd_hash_entry *, void *); -extern bfd_boolean _bfd_coff_write_task_globals +extern bool _bfd_coff_write_task_globals (struct coff_link_hash_entry *, void *); -extern bfd_boolean _bfd_coff_link_input_bfd +extern bool _bfd_coff_link_input_bfd (struct coff_final_link_info *, bfd *); -extern bfd_boolean _bfd_coff_reloc_link_order +extern bool _bfd_coff_reloc_link_order (bfd *, struct coff_final_link_info *, asection *, struct bfd_link_order *); -extern bfd_boolean bfd_coff_gc_sections +extern bool bfd_coff_gc_sections (bfd *, struct bfd_link_info *); extern const char *bfd_coff_group_name (bfd *, const asection *); @@ -607,12 +607,12 @@ extern long _bfd_xcoff_canonicalize_dynamic_reloc (bfd *, arelent **, asymbol **); extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create (bfd *); -extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols +extern bool _bfd_xcoff_bfd_link_add_symbols (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_xcoff_bfd_final_link +extern bool _bfd_xcoff_bfd_final_link (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_xcoff_define_common_symbol +extern bool _bfd_xcoff_define_common_symbol (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean _bfd_ppc_xcoff_relocate_section +extern bool _bfd_ppc_xcoff_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); diff --git a/bfd/libcoff.h b/bfd/libcoff.h index f2ce3c5e0c..6dc68d1a39 100644 --- a/bfd/libcoff.h +++ b/bfd/libcoff.h @@ -84,7 +84,7 @@ typedef struct coff_tdata _bfd_coff_get_external_symbols. */ void * external_syms; /* If this is TRUE, the external_syms may not be freed. */ - bfd_boolean keep_syms; + bool keep_syms; /* The string table. May be NULL. Read by _bfd_coff_read_string_table. */ @@ -92,9 +92,9 @@ typedef struct coff_tdata /* The length of the strings table. For error checking. */ bfd_size_type strings_len; /* If this is TRUE, the strings may not be freed. */ - bfd_boolean keep_strings; + bool keep_strings; /* If this is TRUE, the strings have been written out already. */ - bfd_boolean strings_written; + bool strings_written; /* Is this a PE format coff file? */ int pe; @@ -120,7 +120,7 @@ typedef struct coff_tdata flagword flags; /* Is this a GO32 coff file? */ - bfd_boolean go32; + bool go32; /* A stub (extra data prepended before the COFF image) and its size. Used by coff-go32-exe, it contains executable data that loads the @@ -141,13 +141,13 @@ typedef struct pe_tdata /* The timestamp to insert into the output file. If the timestamp is -1 then the current time is used. */ int timestamp; - bfd_boolean (*in_reloc_p) (bfd *, reloc_howto_type *); + bool (*in_reloc_p) (bfd *, reloc_howto_type *); flagword real_flags; /* Build-id info. */ struct { - bfd_boolean (*after_write_object_contents) (bfd *); + bool (*after_write_object_contents) (bfd *); const char *style; asection *sec; } build_id; @@ -163,10 +163,10 @@ struct xcoff_tdata coff_data_type coff; /* TRUE if this is an XCOFF64 file. */ - bfd_boolean xcoff64; + bool xcoff64; /* TRUE if a large a.out header should be generated. */ - bfd_boolean full_aouthdr; + bool full_aouthdr; /* TOC value. */ bfd_vma toc; @@ -304,7 +304,7 @@ struct coff_reloc_cookie #define coff_link_hash_traverse(table, func, info) \ (bfd_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \ + (bool (*) (struct bfd_link_hash_entry *, void *)) (func), \ (info))) /* Get the COFF linker hash table from a link_info structure. */ @@ -322,26 +322,26 @@ extern long coff_canonicalize_symtab (bfd *, asymbol **); extern int coff_count_linenumbers (bfd *); -extern bfd_boolean coff_renumber_symbols +extern bool coff_renumber_symbols (bfd *, int *); extern void coff_mangle_symbols (bfd *); -extern bfd_boolean coff_write_symbols +extern bool coff_write_symbols (bfd *); -extern bfd_boolean coff_write_alien_symbol +extern bool coff_write_alien_symbol (bfd *, asymbol *, struct internal_syment *, union internal_auxent *, bfd_vma *, bfd_size_type *, asection **, bfd_size_type *); -extern bfd_boolean coff_write_linenumbers +extern bool coff_write_linenumbers (bfd *); extern alent *coff_get_lineno (bfd *, asymbol *); extern asymbol *coff_section_symbol (bfd *, char *); -extern bfd_boolean _bfd_coff_get_external_symbols +extern bool _bfd_coff_get_external_symbols (bfd *); extern const char *_bfd_coff_read_string_table (bfd *); -extern bfd_boolean _bfd_coff_free_symbols +extern bool _bfd_coff_free_symbols (bfd *); extern struct coff_ptr_struct *coff_get_normalized_symtab (bfd *); @@ -355,32 +355,32 @@ extern void coff_get_symbol_info (bfd *, asymbol *, symbol_info *ret); #define coff_get_symbol_version_string \ _bfd_nosymbols_get_symbol_version_string -extern bfd_boolean _bfd_coff_is_local_label_name +extern bool _bfd_coff_is_local_label_name (bfd *, const char *); extern asymbol *coff_bfd_make_debug_symbol (bfd *, void *, unsigned long); -extern bfd_boolean coff_find_nearest_line +extern bool coff_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); #define coff_find_line _bfd_nosymbols_find_line struct dwarf_debug_section; -extern bfd_boolean coff_find_nearest_line_with_names +extern bool coff_find_nearest_line_with_names (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, const struct dwarf_debug_section *); -extern bfd_boolean coff_find_inliner_info +extern bool coff_find_inliner_info (bfd *, const char **, const char **, unsigned int *); extern int coff_sizeof_headers (bfd *, struct bfd_link_info *); -extern bfd_boolean bfd_coff_reloc16_relax_section - (bfd *, asection *, struct bfd_link_info *, bfd_boolean *); +extern bool bfd_coff_reloc16_relax_section + (bfd *, asection *, struct bfd_link_info *, bool *); extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents (bfd *, struct bfd_link_info *, struct bfd_link_order *, - bfd_byte *, bfd_boolean, asymbol **); + bfd_byte *, bool, asymbol **); extern bfd_vma bfd_coff_reloc16_get_value (arelent *, struct bfd_link_info *, asection *); extern void bfd_perform_slip (bfd *, unsigned int, asection *, bfd_vma); -extern bfd_boolean _bfd_coff_close_and_cleanup +extern bool _bfd_coff_close_and_cleanup (bfd *); /* Functions and types in cofflink.c. */ @@ -480,11 +480,11 @@ struct coff_final_link_info /* Output BFD. */ bfd *output_bfd; /* Used to indicate failure in traversal routine. */ - bfd_boolean failed; + bool failed; /* If doing "task linking" set only during the time when we want the global symbol writer to convert the storage class of defined global symbols from global to static. */ - bfd_boolean global_to_static; + bool global_to_static; /* Hash table for long symbol names. */ struct bfd_strtab_hash *strtab; /* When doing a relocatable link, an array of information kept for @@ -558,7 +558,7 @@ struct coff_section_alignment_entry extern struct bfd_hash_entry *_bfd_coff_link_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); -extern bfd_boolean _bfd_coff_link_hash_table_init +extern bool _bfd_coff_link_hash_table_init (struct coff_link_hash_table *, bfd *, struct bfd_hash_entry *(*) (struct bfd_hash_entry *, struct bfd_hash_table *, @@ -568,30 +568,30 @@ extern struct bfd_link_hash_table *_bfd_coff_link_hash_table_create (bfd *); extern const char *_bfd_coff_internal_syment_name (bfd *, const struct internal_syment *, char *); -extern bfd_boolean _bfd_coff_section_already_linked +extern bool _bfd_coff_section_already_linked (bfd *, asection *, struct bfd_link_info *); -extern bfd_boolean _bfd_coff_link_add_symbols +extern bool _bfd_coff_link_add_symbols (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_coff_final_link +extern bool _bfd_coff_final_link (bfd *, struct bfd_link_info *); extern struct internal_reloc *_bfd_coff_read_internal_relocs - (bfd *, asection *, bfd_boolean, bfd_byte *, bfd_boolean, + (bfd *, asection *, bool, bfd_byte *, bool, struct internal_reloc *); -extern bfd_boolean _bfd_coff_generic_relocate_section +extern bool _bfd_coff_generic_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); extern struct bfd_hash_entry *_bfd_coff_debug_merge_hash_newfunc (struct bfd_hash_entry *, struct bfd_hash_table *, const char *); -extern bfd_boolean _bfd_coff_write_global_sym +extern bool _bfd_coff_write_global_sym (struct bfd_hash_entry *, void *); -extern bfd_boolean _bfd_coff_write_task_globals +extern bool _bfd_coff_write_task_globals (struct coff_link_hash_entry *, void *); -extern bfd_boolean _bfd_coff_link_input_bfd +extern bool _bfd_coff_link_input_bfd (struct coff_final_link_info *, bfd *); -extern bfd_boolean _bfd_coff_reloc_link_order +extern bool _bfd_coff_reloc_link_order (bfd *, struct coff_final_link_info *, asection *, struct bfd_link_order *); -extern bfd_boolean bfd_coff_gc_sections +extern bool bfd_coff_gc_sections (bfd *, struct bfd_link_info *); extern const char *bfd_coff_group_name (bfd *, const asection *); @@ -611,13 +611,13 @@ extern long _bfd_xcoff_canonicalize_dynamic_reloc (bfd *, arelent **, asymbol **); extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create (bfd *); -extern bfd_boolean _bfd_xcoff_bfd_link_add_symbols +extern bool _bfd_xcoff_bfd_link_add_symbols (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_xcoff_bfd_final_link +extern bool _bfd_xcoff_bfd_final_link (bfd *, struct bfd_link_info *); -extern bfd_boolean _bfd_xcoff_define_common_symbol +extern bool _bfd_xcoff_define_common_symbol (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean _bfd_ppc_xcoff_relocate_section +extern bool _bfd_ppc_xcoff_relocate_section (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); /* Extracted from coffcode.h. */ @@ -657,7 +657,7 @@ typedef struct coff_ptr_struct } u; /* Selector for the union above. */ - bfd_boolean is_sym; + bool is_sym; } combined_entry_type; @@ -675,7 +675,7 @@ typedef struct coff_symbol_struct struct lineno_cache_entry *lineno; /* Have the line numbers been relocated yet ? */ - bfd_boolean done_lineno; + bool done_lineno; } coff_symbol_type; /* COFF symbol classifications. */ @@ -737,14 +737,14 @@ typedef struct unsigned int _bfd_relsz; unsigned int _bfd_linesz; unsigned int _bfd_filnmlen; - bfd_boolean _bfd_coff_long_filenames; + bool _bfd_coff_long_filenames; - bfd_boolean _bfd_coff_long_section_names; - bfd_boolean (*_bfd_coff_set_long_section_names) + bool _bfd_coff_long_section_names; + bool (*_bfd_coff_set_long_section_names) (bfd *, int); unsigned int _bfd_coff_default_section_alignment_power; - bfd_boolean _bfd_coff_force_symnames_in_strings; + bool _bfd_coff_force_symnames_in_strings; unsigned int _bfd_coff_debug_string_prefix_length; unsigned int _bfd_coff_max_nscns; @@ -760,32 +760,32 @@ typedef struct void (*_bfd_coff_swap_reloc_in) (bfd *abfd, void *, void *); - bfd_boolean (*_bfd_coff_bad_format_hook) + bool (*_bfd_coff_bad_format_hook) (bfd *, void *); - bfd_boolean (*_bfd_coff_set_arch_mach_hook) + bool (*_bfd_coff_set_arch_mach_hook) (bfd *, void *); void * (*_bfd_coff_mkobject_hook) (bfd *, void *, void *); - bfd_boolean (*_bfd_styp_to_sec_flags_hook) + bool (*_bfd_styp_to_sec_flags_hook) (bfd *, void *, const char *, asection *, flagword *); void (*_bfd_set_alignment_hook) (bfd *, asection *, void *); - bfd_boolean (*_bfd_coff_slurp_symbol_table) + bool (*_bfd_coff_slurp_symbol_table) (bfd *); - bfd_boolean (*_bfd_coff_symname_in_debug) + bool (*_bfd_coff_symname_in_debug) (bfd *, struct internal_syment *); - bfd_boolean (*_bfd_coff_pointerize_aux_hook) + bool (*_bfd_coff_pointerize_aux_hook) (bfd *, combined_entry_type *, combined_entry_type *, unsigned int, combined_entry_type *); - bfd_boolean (*_bfd_coff_print_aux) + bool (*_bfd_coff_print_aux) (bfd *, FILE *, combined_entry_type *, combined_entry_type *, combined_entry_type *, unsigned int); @@ -800,13 +800,13 @@ typedef struct enum coff_symbol_classification (*_bfd_coff_classify_symbol) (bfd *, struct internal_syment *); - bfd_boolean (*_bfd_coff_compute_section_file_positions) + bool (*_bfd_coff_compute_section_file_positions) (bfd *); - bfd_boolean (*_bfd_coff_start_final_link) + bool (*_bfd_coff_start_final_link) (bfd *, struct bfd_link_info *); - bfd_boolean (*_bfd_coff_relocate_section) + bool (*_bfd_coff_relocate_section) (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, struct internal_reloc *, struct internal_syment *, asection **); @@ -814,22 +814,22 @@ typedef struct (bfd *, asection *, struct internal_reloc *, struct coff_link_hash_entry *, struct internal_syment *, bfd_vma *); - bfd_boolean (*_bfd_coff_adjust_symndx) + bool (*_bfd_coff_adjust_symndx) (bfd *, struct bfd_link_info *, bfd *, asection *, - struct internal_reloc *, bfd_boolean *); + struct internal_reloc *, bool *); - bfd_boolean (*_bfd_coff_link_add_one_symbol) + bool (*_bfd_coff_link_add_one_symbol) (struct bfd_link_info *, bfd *, const char *, flagword, - asection *, bfd_vma, const char *, bfd_boolean, bfd_boolean, + asection *, bfd_vma, const char *, bool, bool, struct bfd_link_hash_entry **); - bfd_boolean (*_bfd_coff_link_output_has_begun) + bool (*_bfd_coff_link_output_has_begun) (bfd *, struct coff_final_link_info *); - bfd_boolean (*_bfd_coff_final_link_postscript) + bool (*_bfd_coff_final_link_postscript) (bfd *, struct coff_final_link_info *); - bfd_boolean (*_bfd_coff_print_pdata) + bool (*_bfd_coff_print_pdata) (bfd *, void *); } bfd_coff_backend_data; diff --git a/bfd/libecoff.h b/bfd/libecoff.h index 80873ea9dd..c7eaba533b 100644 --- a/bfd/libecoff.h +++ b/bfd/libecoff.h @@ -47,7 +47,7 @@ struct ecoff_backend_data /* TRUE if the .rdata section is part of the text segment, as on the Alpha. FALSE if .rdata is part of the data segment, as on the MIPS. */ - bfd_boolean rdata_in_text; + bool rdata_in_text; /* Bitsize of constructor entries. */ unsigned int constructor_bitsize; /* Reloc to use for constructor entries. */ @@ -65,10 +65,10 @@ struct ecoff_backend_data void (*adjust_reloc_out) (bfd *, const arelent *, struct internal_reloc *); /* Relocate section contents while linking. */ - bfd_boolean (*relocate_section) + bool (*relocate_section) (bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *, void *); /* Do final adjustments to filehdr and aouthdr. */ - bfd_boolean (*adjust_headers) + bool (*adjust_headers) (bfd *, struct internal_filehdr *, struct internal_aouthdr *); /* Read an element from an archive at a given file position. This is needed because OSF/1 3.2 uses a weird archive format. */ @@ -78,7 +78,7 @@ struct ecoff_backend_data /* ECOFF targets don't support COFF long section names, so this macro is provided to use as an initialiser for the related members of the embedded bfd_coff_backend_data struct. */ -#define ECOFF_NO_LONG_SECTION_NAMES (FALSE), _bfd_ecoff_no_long_sections +#define ECOFF_NO_LONG_SECTION_NAMES (false), _bfd_ecoff_no_long_sections /* This is the target specific information kept for ECOFF files. */ @@ -132,11 +132,11 @@ typedef struct ecoff_tdata asection **symndx_to_section; /* TRUE if this BFD was written by the backend linker. */ - bfd_boolean linker; + bool linker; /* TRUE if a warning that multiple global pointer values are needed in the output binary was issued already. */ - bfd_boolean issued_multiple_gp_warning; + bool issued_multiple_gp_warning; /* Used by find_nearest_line entry point. The structure could be included directly in this one, but there's no point to wasting @@ -146,7 +146,7 @@ typedef struct ecoff_tdata /* Whether the .rdata section is in the text segment for this particular ECOFF file. This is not valid until ecoff_compute_section_file_positions is called. */ - bfd_boolean rdata_in_text; + bool rdata_in_text; } ecoff_data_type; @@ -161,7 +161,7 @@ typedef struct ecoff_symbol_struct FDR *fdr; /* TRUE if this is a local symbol rather than an external one. */ - bfd_boolean local; + bool local; /* A pointer to the unswapped hidden information for this symbol. This is either a struct sym_ext or a struct ext_ext, depending on @@ -224,27 +224,27 @@ struct ecoff_link_hash_table }; /* Make an ECOFF object. */ -extern bfd_boolean _bfd_ecoff_mkobject (bfd *); +extern bool _bfd_ecoff_mkobject (bfd *); /* Read in the ECOFF symbolic debugging information. */ -extern bfd_boolean _bfd_ecoff_slurp_symbolic_info +extern bool _bfd_ecoff_slurp_symbolic_info (bfd *, asection *, struct ecoff_debug_info *); /* Generic ECOFF BFD backend vectors. */ -extern bfd_boolean _bfd_ecoff_write_object_contents (bfd *); +extern bool _bfd_ecoff_write_object_contents (bfd *); #define _bfd_ecoff_close_and_cleanup _bfd_generic_close_and_cleanup #define _bfd_ecoff_bfd_free_cached_info _bfd_generic_bfd_free_cached_info -extern bfd_boolean _bfd_ecoff_new_section_hook +extern bool _bfd_ecoff_new_section_hook (bfd *, asection *); -extern bfd_boolean _bfd_ecoff_get_section_contents +extern bool _bfd_ecoff_get_section_contents (bfd *, asection *, void * location, file_ptr, bfd_size_type); #define _bfd_ecoff_bfd_link_split_section _bfd_generic_link_split_section #define _bfd_ecoff_bfd_link_check_relocs _bfd_generic_link_check_relocs -extern bfd_boolean _bfd_ecoff_bfd_copy_private_bfd_data +extern bool _bfd_ecoff_bfd_copy_private_bfd_data (bfd *, bfd *); #define _bfd_ecoff_bfd_copy_private_section_data \ _bfd_generic_bfd_copy_private_section_data @@ -262,12 +262,12 @@ extern bfd_boolean _bfd_ecoff_bfd_copy_private_bfd_data _bfd_generic_bfd_merge_private_bfd_data #define _bfd_ecoff_bfd_set_private_flags _bfd_generic_bfd_set_private_flags -extern bfd_boolean _bfd_ecoff_slurp_armap (bfd *); +extern bool _bfd_ecoff_slurp_armap (bfd *); #define _bfd_ecoff_slurp_extended_name_table _bfd_slurp_extended_name_table #define _bfd_ecoff_construct_extended_name_table \ _bfd_archive_bsd_construct_extended_name_table #define _bfd_ecoff_truncate_arname bfd_dont_truncate_arname -extern bfd_boolean _bfd_ecoff_write_armap +extern bool _bfd_ecoff_write_armap (bfd *, unsigned int, struct orl *, unsigned int, int); #define _bfd_ecoff_read_ar_hdr _bfd_generic_read_ar_hdr #define _bfd_ecoff_write_ar_hdr _bfd_generic_write_ar_hdr @@ -287,10 +287,10 @@ extern void _bfd_ecoff_get_symbol_info (bfd *, asymbol *, symbol_info *); #define _bfd_ecoff_get_symbol_version_string \ _bfd_nosymbols_get_symbol_version_string -extern bfd_boolean _bfd_ecoff_bfd_is_local_label_name +extern bool _bfd_ecoff_bfd_is_local_label_name (bfd *, const char *); #define _bfd_ecoff_get_lineno _bfd_nosymbols_get_lineno -extern bfd_boolean _bfd_ecoff_find_nearest_line +extern bool _bfd_ecoff_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); #define _bfd_ecoff_find_line _bfd_nosymbols_find_line @@ -304,9 +304,9 @@ extern long _bfd_ecoff_canonicalize_reloc (bfd *, asection *, arelent **, asymbol **); /* ecoff_bfd_reloc_type_lookup defined by backend. */ -extern bfd_boolean _bfd_ecoff_set_arch_mach +extern bool _bfd_ecoff_set_arch_mach (bfd *, enum bfd_architecture, unsigned long); -extern bfd_boolean _bfd_ecoff_set_section_contents +extern bool _bfd_ecoff_set_section_contents (bfd *, asection *, const void * location, file_ptr, bfd_size_type); extern int _bfd_ecoff_sizeof_headers (bfd *, struct bfd_link_info *); @@ -314,12 +314,12 @@ extern int _bfd_ecoff_sizeof_headers (bfd *, struct bfd_link_info *); /* ecoff_bfd_relax_section defined by backend. */ extern struct bfd_link_hash_table *_bfd_ecoff_bfd_link_hash_table_create (bfd *); -extern bfd_boolean _bfd_ecoff_bfd_link_add_symbols +extern bool _bfd_ecoff_bfd_link_add_symbols (bfd *, struct bfd_link_info *); #define _bfd_ecoff_bfd_link_just_syms _bfd_generic_link_just_syms #define _bfd_ecoff_bfd_copy_link_hash_symbol_type \ _bfd_generic_copy_link_hash_symbol_type -extern bfd_boolean _bfd_ecoff_bfd_final_link +extern bool _bfd_ecoff_bfd_final_link (bfd *, struct bfd_link_info *); /* Hook functions for the generic COFF section reading code. */ @@ -327,13 +327,13 @@ extern bfd_boolean _bfd_ecoff_bfd_final_link extern void * _bfd_ecoff_mkobject_hook (bfd *, void *, void *); extern void _bfd_ecoff_set_alignment_hook (bfd *, asection *, void *); -extern bfd_boolean _bfd_ecoff_set_arch_mach_hook +extern bool _bfd_ecoff_set_arch_mach_hook (bfd *, void *); -extern bfd_boolean _bfd_ecoff_no_long_sections +extern bool _bfd_ecoff_no_long_sections (bfd *abfd, int enable); -extern bfd_boolean _bfd_ecoff_styp_to_sec_flags +extern bool _bfd_ecoff_styp_to_sec_flags (bfd *, void *, const char *, asection *, flagword *); -extern bfd_boolean _bfd_ecoff_slurp_symbol_table (bfd *); +extern bool _bfd_ecoff_slurp_symbol_table (bfd *); /* ECOFF auxiliary information swapping routines. These are the same for all ECOFF targets, so they are defined in ecofflink.c. */ diff --git a/bfd/libpei.h b/bfd/libpei.h index 43e27284eb..4de0c9fd04 100644 --- a/bfd/libpei.h +++ b/bfd/libpei.h @@ -338,34 +338,36 @@ #define coff_final_link_postscript _bfd_XXi_final_link_postscript #endif -void _bfd_XXi_swap_sym_in (bfd *, void *, void *); -unsigned _bfd_XXi_swap_sym_out (bfd *, void *, void *); -void _bfd_XXi_swap_aux_in (bfd *, void *, int, int, int, int, void *); -unsigned _bfd_XXi_swap_aux_out (bfd *, void *, int, int, int, int, void *); -void _bfd_XXi_swap_lineno_in (bfd *, void *, void *); -unsigned _bfd_XXi_swap_lineno_out (bfd *, void *, void *); -void _bfd_XXi_swap_aouthdr_in (bfd *, void *, void *); -unsigned _bfd_XXi_swap_aouthdr_out (bfd *, void *, void *); -unsigned _bfd_XXi_swap_scnhdr_out (bfd *, void *, void *); -bfd_boolean _bfd_XX_print_private_bfd_data_common (bfd *, void *); -bfd_boolean _bfd_XX_bfd_copy_private_bfd_data_common (bfd *, bfd *); -void _bfd_XX_get_symbol_info (bfd *, asymbol *, symbol_info *); -bfd_boolean _bfd_XXi_final_link_postscript (bfd *, struct coff_final_link_info *); -void _bfd_XXi_swap_debugdir_in (bfd *, void *, void *); -unsigned _bfd_XXi_swap_debugdir_out (bfd *, void *, void *); -unsigned _bfd_XXi_write_codeview_record (bfd *, file_ptr, CODEVIEW_INFO *); -CODEVIEW_INFO * _bfd_XXi_slurp_codeview_record (bfd * abfd, file_ptr where, unsigned long length, CODEVIEW_INFO *cvinfo); +void _bfd_XXi_swap_sym_in (bfd *, void *, void *); +unsigned _bfd_XXi_swap_sym_out (bfd *, void *, void *); +void _bfd_XXi_swap_aux_in (bfd *, void *, int, int, int, int, void *); +unsigned _bfd_XXi_swap_aux_out (bfd *, void *, int, int, int, int, void *); +void _bfd_XXi_swap_lineno_in (bfd *, void *, void *); +unsigned _bfd_XXi_swap_lineno_out (bfd *, void *, void *); +void _bfd_XXi_swap_aouthdr_in (bfd *, void *, void *); +unsigned _bfd_XXi_swap_aouthdr_out (bfd *, void *, void *); +unsigned _bfd_XXi_swap_scnhdr_out (bfd *, void *, void *); +bool _bfd_XX_print_private_bfd_data_common (bfd *, void *); +bool _bfd_XX_bfd_copy_private_bfd_data_common (bfd *, bfd *); +void _bfd_XX_get_symbol_info (bfd *, asymbol *, symbol_info *); +bool _bfd_XXi_final_link_postscript (bfd *, struct coff_final_link_info *); +void _bfd_XXi_swap_debugdir_in (bfd *, void *, void *); +unsigned _bfd_XXi_swap_debugdir_out (bfd *, void *, void *); +unsigned _bfd_XXi_write_codeview_record (bfd *, file_ptr, CODEVIEW_INFO *); +CODEVIEW_INFO *_bfd_XXi_slurp_codeview_record + (bfd * abfd, file_ptr where, unsigned long length, CODEVIEW_INFO *cvinfo); /* The following are needed only for ONE of pe or pei, but don't otherwise vary; peicode.h fixes up ifdefs but we provide the prototype. */ -unsigned _bfd_XX_only_swap_filehdr_out (bfd *, void *, void *); -unsigned _bfd_XXi_only_swap_filehdr_out (bfd *, void *, void *); -bfd_boolean _bfd_XX_bfd_copy_private_section_data (bfd *, asection *, bfd *, asection *); +unsigned _bfd_XX_only_swap_filehdr_out (bfd *, void *, void *); +unsigned _bfd_XXi_only_swap_filehdr_out (bfd *, void *, void *); +bool _bfd_XX_bfd_copy_private_section_data + (bfd *, asection *, bfd *, asection *); -bfd_boolean _bfd_pe_print_ce_compressed_pdata (bfd *, void *); -bfd_boolean _bfd_pe64_print_ce_compressed_pdata (bfd *, void *); -bfd_boolean _bfd_pex64_print_ce_compressed_pdata (bfd *, void *); -bfd_boolean _bfd_pep_print_ce_compressed_pdata (bfd *, void *); +bool _bfd_pe_print_ce_compressed_pdata (bfd *, void *); +bool _bfd_pe64_print_ce_compressed_pdata (bfd *, void *); +bool _bfd_pex64_print_ce_compressed_pdata (bfd *, void *); +bool _bfd_pep_print_ce_compressed_pdata (bfd *, void *); diff --git a/bfd/libxcoff.h b/bfd/libxcoff.h index bffdee2559..cca9c21803 100644 --- a/bfd/libxcoff.h +++ b/bfd/libxcoff.h @@ -63,11 +63,11 @@ struct xcoff_backend_data_rec 2 : XCOFF64. */ unsigned long _xcoff_ldhdr_version; - bfd_boolean (* _xcoff_put_symbol_name) + bool (* _xcoff_put_symbol_name) (struct bfd_link_info *, struct bfd_strtab_hash *, struct internal_syment *, const char *); - bfd_boolean (* _xcoff_put_ldsymbol_name) + bool (* _xcoff_put_ldsymbol_name) (bfd *, struct xcoff_loader_info *, struct internal_ldsym *, const char *); @@ -79,8 +79,8 @@ struct xcoff_backend_data_rec /* Line number and relocation overflow. XCOFF32 overflows to another section when the line number or the relocation count exceeds 0xffff. XCOFF64 does not overflow. */ - bfd_boolean (*_xcoff_is_lineno_count_overflow) (bfd *, bfd_vma); - bfd_boolean (*_xcoff_is_reloc_count_overflow) (bfd *, bfd_vma); + bool (*_xcoff_is_lineno_count_overflow) (bfd *, bfd_vma); + bool (*_xcoff_is_reloc_count_overflow) (bfd *, bfd_vma); /* Loader section symbol and relocation table offset XCOFF32 is after the .loader header @@ -97,8 +97,8 @@ struct xcoff_backend_data_rec /* rtinit. */ unsigned int _xcoff_rtinit_size; - bfd_boolean (*_xcoff_generate_rtinit) - (bfd *, const char *, const char *, bfd_boolean); + bool (*_xcoff_generate_rtinit) + (bfd *, const char *, const char *, bool); }; /* Look up an entry in an XCOFF link hash table. */ @@ -111,7 +111,7 @@ struct xcoff_backend_data_rec #define xcoff_link_hash_traverse(table, func, info) \ (bfd_link_hash_traverse \ (&(table)->root, \ - (bfd_boolean (*) (struct bfd_link_hash_entry *, void *)) (func), \ + (bool (*) (struct bfd_link_hash_entry *, void *)) (func), \ (info))) /* Get the XCOFF link hash table from the info structure. This is @@ -210,20 +210,20 @@ struct xcoff_backend_data_rec #endif #define N_ONES(n) (((((bfd_vma) 1 << ((n) - 1)) - 1) << 1) | 1) -typedef bfd_boolean xcoff_reloc_function (bfd *, asection *, bfd *, +typedef bool xcoff_reloc_function (bfd *, asection *, bfd *, struct internal_reloc *, struct internal_syment *, struct reloc_howto_struct *, bfd_vma, bfd_vma, bfd_vma *, bfd_byte *); -typedef bfd_boolean xcoff_complain_function (bfd *, bfd_vma, bfd_vma, +typedef bool xcoff_complain_function (bfd *, bfd_vma, bfd_vma, struct reloc_howto_struct *); extern xcoff_reloc_function *const xcoff_calculate_relocation[]; extern xcoff_complain_function *const xcoff_complain_overflow[]; -#define XCOFF_NO_LONG_SECTION_NAMES (FALSE), bfd_coff_set_long_section_names_disallowed +#define XCOFF_NO_LONG_SECTION_NAMES (false), bfd_coff_set_long_section_names_disallowed /* Relocation functions */ extern xcoff_reloc_function xcoff_reloc_type_noop; @@ -247,7 +247,7 @@ struct xcoff_dwsect_name { const char *name; /* True if size must be prepended. */ - bfd_boolean def_size; + bool def_size; }; /* Number of entries in the array. The number is known and public so that user diff --git a/bfd/linker.c b/bfd/linker.c index 6f6e684292..c350cd3fd1 100644 --- a/bfd/linker.c +++ b/bfd/linker.c @@ -402,20 +402,20 @@ SUBSUBSECTION file at the end of <>. */ -static bfd_boolean generic_link_add_object_symbols +static bool generic_link_add_object_symbols (bfd *, struct bfd_link_info *); -static bfd_boolean generic_link_check_archive_element +static bool generic_link_check_archive_element (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, - bfd_boolean *); -static bfd_boolean generic_link_add_symbol_list + bool *); +static bool generic_link_add_symbol_list (bfd *, struct bfd_link_info *, bfd_size_type count, asymbol **); -static bfd_boolean generic_add_output_symbol +static bool generic_add_output_symbol (bfd *, size_t *psymalloc, asymbol *); -static bfd_boolean default_data_link_order +static bool default_data_link_order (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *); -static bfd_boolean default_indirect_link_order +static bool default_indirect_link_order (bfd *, struct bfd_link_info *, asection *, struct bfd_link_order *, - bfd_boolean); + bool); /* The link hash table structure is defined in bfdlink.h. It provides a base hash table which the backend specific hash tables are built @@ -455,7 +455,7 @@ _bfd_link_hash_newfunc (struct bfd_hash_entry *entry, /* Initialize a link hash table. The BFD argument is the one responsible for creating this table. */ -bfd_boolean +bool _bfd_link_hash_table_init (struct bfd_link_hash_table *table, bfd *abfd ATTRIBUTE_UNUSED, @@ -464,7 +464,7 @@ _bfd_link_hash_table_init const char *), unsigned int entsize) { - bfd_boolean ret; + bool ret; BFD_ASSERT (!abfd->is_linker_output && !abfd->link.hash); table->undefs = NULL; @@ -477,7 +477,7 @@ _bfd_link_hash_table_init /* Arrange for destruction of this hash table on closing ABFD. */ table->hash_table_free = _bfd_generic_link_hash_table_free; abfd->link.hash = table; - abfd->is_linker_output = TRUE; + abfd->is_linker_output = true; } return ret; } @@ -502,9 +502,9 @@ _bfd_link_hash_table_init struct bfd_link_hash_entry * bfd_link_hash_lookup (struct bfd_link_hash_table *table, const char *string, - bfd_boolean create, - bfd_boolean copy, - bfd_boolean follow) + bool create, + bool copy, + bool follow) { struct bfd_link_hash_entry *ret; @@ -532,9 +532,9 @@ struct bfd_link_hash_entry * bfd_wrapped_link_hash_lookup (bfd *abfd, struct bfd_link_info *info, const char *string, - bfd_boolean create, - bfd_boolean copy, - bfd_boolean follow) + bool create, + bool copy, + bool follow) { size_t amt; @@ -553,7 +553,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, #undef WRAP #define WRAP "__wrap_" - if (bfd_hash_lookup (info->wrap_hash, l, FALSE, FALSE) != NULL) + if (bfd_hash_lookup (info->wrap_hash, l, false, false) != NULL) { char *n; struct bfd_link_hash_entry *h; @@ -570,7 +570,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, n[1] = '\0'; strcat (n, WRAP); strcat (n, l); - h = bfd_link_hash_lookup (info->hash, n, create, TRUE, follow); + h = bfd_link_hash_lookup (info->hash, n, create, true, follow); free (n); return h; } @@ -581,7 +581,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, if (*l == '_' && startswith (l, REAL) && bfd_hash_lookup (info->wrap_hash, l + sizeof REAL - 1, - FALSE, FALSE) != NULL) + false, false) != NULL) { char *n; struct bfd_link_hash_entry *h; @@ -598,7 +598,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd, n[0] = prefix; n[1] = '\0'; strcat (n, l + sizeof REAL - 1); - h = bfd_link_hash_lookup (info->hash, n, create, TRUE, follow); + h = bfd_link_hash_lookup (info->hash, n, create, true, follow); free (n); return h; } @@ -627,7 +627,7 @@ unwrap_hash_lookup (struct bfd_link_info *info, { l += sizeof WRAP - 1; - if (bfd_hash_lookup (info->wrap_hash, l, FALSE, FALSE) != NULL) + if (bfd_hash_lookup (info->wrap_hash, l, false, false) != NULL) { char save = 0; if (l - (sizeof WRAP - 1) != h->root.string) @@ -636,7 +636,7 @@ unwrap_hash_lookup (struct bfd_link_info *info, save = *l; *(char *) l = *h->root.string; } - h = bfd_link_hash_lookup (info->hash, l, FALSE, FALSE, FALSE); + h = bfd_link_hash_lookup (info->hash, l, false, false, false); if (save) *(char *) l = save; } @@ -654,7 +654,7 @@ unwrap_hash_lookup (struct bfd_link_info *info, void bfd_link_hash_traverse (struct bfd_link_hash_table *htab, - bfd_boolean (*func) (struct bfd_link_hash_entry *, void *), + bool (*func) (struct bfd_link_hash_entry *, void *), void *info) { unsigned int i; @@ -751,7 +751,7 @@ _bfd_generic_link_hash_newfunc (struct bfd_hash_entry *entry, /* Set local fields. */ ret = (struct generic_link_hash_entry *) entry; - ret->written = FALSE; + ret->written = false; ret->sym = NULL; } @@ -789,7 +789,7 @@ _bfd_generic_link_hash_table_free (bfd *obfd) bfd_hash_table_free (&ret->root.table); free (ret); obfd->link.hash = NULL; - obfd->is_linker_output = FALSE; + obfd->is_linker_output = false; } /* Grab the symbols for an object file when doing a generic link. We @@ -799,7 +799,7 @@ _bfd_generic_link_hash_table_free (bfd *obfd) the hash table pointing to different instances of the symbol structure. */ -bfd_boolean +bool bfd_generic_link_read_symbols (bfd *abfd) { if (bfd_get_outsymbols (abfd) == NULL) @@ -809,17 +809,17 @@ bfd_generic_link_read_symbols (bfd *abfd) symsize = bfd_get_symtab_upper_bound (abfd); if (symsize < 0) - return FALSE; + return false; abfd->outsymbols = bfd_alloc (abfd, symsize); if (bfd_get_outsymbols (abfd) == NULL && symsize != 0) - return FALSE; + return false; symcount = bfd_canonicalize_symtab (abfd, bfd_get_outsymbols (abfd)); if (symcount < 0) - return FALSE; + return false; abfd->symcount = symcount; } - return TRUE; + return true; } /* Indicate that we are only retrieving symbol values from this @@ -848,10 +848,10 @@ _bfd_generic_copy_link_hash_symbol_type (bfd *abfd ATTRIBUTE_UNUSED, /* Generic function to add symbols from an object file to the global hash table. */ -bfd_boolean +bool _bfd_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean ret; + bool ret; switch (bfd_get_format (abfd)) { @@ -864,7 +864,7 @@ _bfd_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info) break; default: bfd_set_error (bfd_error_wrong_format); - ret = FALSE; + ret = false; } return ret; @@ -872,7 +872,7 @@ _bfd_generic_link_add_symbols (bfd *abfd, struct bfd_link_info *info) /* Add symbols from an object file to the global hash table. */ -static bfd_boolean +static bool generic_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { @@ -880,7 +880,7 @@ generic_link_add_object_symbols (bfd *abfd, struct bfd_symbol **outsyms; if (!bfd_generic_link_read_symbols (abfd)) - return FALSE; + return false; symcount = _bfd_generic_link_get_symcount (abfd); outsyms = _bfd_generic_link_get_symbols (abfd); return generic_link_add_symbol_list (abfd, info, symcount, outsyms); @@ -901,15 +901,14 @@ generic_link_add_object_symbols (bfd *abfd, those symbols instead if it does so. CHECKFN should only return FALSE if some sort of error occurs. */ -bfd_boolean +bool _bfd_generic_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info, - bfd_boolean (*checkfn) (bfd *, struct bfd_link_info *, - struct bfd_link_hash_entry *, const char *, - bfd_boolean *)) + bool (*checkfn) (bfd *, struct bfd_link_info *, + struct bfd_link_hash_entry *, const char *, bool *)) { - bfd_boolean loop; + bool loop; bfd_size_type amt; unsigned char *included; @@ -917,18 +916,18 @@ _bfd_generic_link_add_archive_symbols { /* An empty archive is a special case. */ if (bfd_openr_next_archived_file (abfd, NULL) == NULL) - return TRUE; + return true; bfd_set_error (bfd_error_no_armap); - return FALSE; + return false; } amt = bfd_ardata (abfd)->symdef_count; if (amt == 0) - return TRUE; + return true; amt *= sizeof (*included); included = (unsigned char *) bfd_zmalloc (amt); if (included == NULL) - return FALSE; + return false; do { @@ -937,10 +936,10 @@ _bfd_generic_link_add_archive_symbols carsym *arsym; unsigned int indx; file_ptr last_ar_offset = -1; - bfd_boolean needed = FALSE; + bool needed = false; bfd *element = NULL; - loop = FALSE; + loop = false; arsyms = bfd_ardata (abfd)->symdefs; arsym_end = arsyms + bfd_ardata (abfd)->symdef_count; for (arsym = arsyms, indx = 0; arsym < arsym_end; arsym++, indx++) @@ -960,13 +959,13 @@ _bfd_generic_link_add_archive_symbols goto error_return; h = bfd_link_hash_lookup (info->hash, arsym->name, - FALSE, FALSE, TRUE); + false, false, true); if (h == NULL && info->pei386_auto_import && startswith (arsym->name, "__imp_")) h = bfd_link_hash_lookup (info->hash, arsym->name + 6, - FALSE, FALSE, TRUE); + false, false, true); if (h == NULL) continue; @@ -1012,34 +1011,34 @@ _bfd_generic_link_add_archive_symbols while (arsyms[mark].file_offset == last_ar_offset); if (undefs_tail != info->hash->undefs_tail) - loop = TRUE; + loop = true; } } } while (loop); free (included); - return TRUE; + return true; error_return: free (included); - return FALSE; + return false; } /* See if we should include an archive element. */ -static bfd_boolean +static bool generic_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h, const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded) + bool *pneeded) { asymbol **pp, **ppend; - *pneeded = FALSE; + *pneeded = false; if (!bfd_generic_link_read_symbols (abfd)) - return FALSE; + return false; pp = _bfd_generic_link_get_symbols (abfd); ppend = pp + _bfd_generic_link_get_symcount (abfd); @@ -1059,8 +1058,8 @@ generic_link_check_archive_element (bfd *abfd, symbol (type bfd_link_hash_undefweak) is not considered to be a reference when pulling files out of an archive. See the SVR4 ABI, p. 4-27. */ - h = bfd_link_hash_lookup (info->hash, bfd_asymbol_name (p), FALSE, - FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, bfd_asymbol_name (p), false, + false, true); if (h == NULL || (h->type != bfd_link_hash_undefined && h->type != bfd_link_hash_common)) @@ -1075,11 +1074,11 @@ generic_link_check_archive_element (bfd *abfd, /* P is not a common symbol, or an undefined reference was created from outside BFD such as from a linker -u option. This object file defines the symbol, so pull it in. */ - *pneeded = TRUE; + *pneeded = true; if (!(*info->callbacks ->add_archive_element) (info, abfd, bfd_asymbol_name (p), &abfd)) - return FALSE; + return false; /* Potentially, the add_archive_element hook may have set a substitute BFD for us. */ return bfd_link_add_symbols (abfd, info); @@ -1106,7 +1105,7 @@ generic_link_check_archive_element (bfd *abfd, bfd_hash_allocate (&info->hash->table, sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) - return FALSE; + return false; size = bfd_asymbol_value (p); h->u.c.size = size; @@ -1135,14 +1134,14 @@ generic_link_check_archive_element (bfd *abfd, } /* This archive element is not needed. */ - return TRUE; + return true; } /* Add the symbols from an object file to the global hash table. ABFD is the object file. INFO is the linker information. SYMBOL_COUNT is the number of symbols. SYMBOLS is the list of symbols. */ -static bfd_boolean +static bool generic_link_add_symbol_list (bfd *abfd, struct bfd_link_info *info, bfd_size_type symbol_count, @@ -1192,8 +1191,8 @@ generic_link_add_symbol_list (bfd *abfd, bh = NULL; if (! (_bfd_generic_link_add_one_symbol (info, abfd, name, p->flags, bfd_asymbol_section (p), - p->value, string, FALSE, FALSE, &bh))) - return FALSE; + p->value, string, false, false, &bh))) + return false; h = (struct generic_link_hash_entry *) bh; /* If this is a constructor symbol, and the linker didn't do @@ -1240,7 +1239,7 @@ generic_link_add_symbol_list (bfd *abfd, } } - return TRUE; + return true; } /* We use a state table to deal with adding symbols from an object @@ -1373,7 +1372,7 @@ hash_entry_bfd (struct bfd_link_hash_entry *h) entry; if *HASHP is not NULL, the caller has already looked up the hash table entry, and stored it in *HASHP. */ -bfd_boolean +bool _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, bfd *abfd, const char *name, @@ -1381,14 +1380,14 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, asection *section, bfd_vma value, const char *string, - bfd_boolean copy, - bfd_boolean collect, + bool copy, + bool collect, struct bfd_link_hash_entry **hashp) { enum link_row row; struct bfd_link_hash_entry *h; struct bfd_link_hash_entry *inh = NULL; - bfd_boolean cycle; + bool cycle; BFD_ASSERT (section != NULL); @@ -1399,10 +1398,10 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, /* Create the indirect symbol here. This is for the benefit of the plugin "notice" function. STRING is the name of the symbol we want to indirect to. */ - inh = bfd_wrapped_link_hash_lookup (abfd, info, string, TRUE, - copy, FALSE); + inh = bfd_wrapped_link_hash_lookup (abfd, info, string, true, + copy, false); if (inh == NULL) - return FALSE; + return false; } else if ((flags & BSF_WARNING) != 0) row = WARN_ROW; @@ -1435,24 +1434,24 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, else { if (row == UNDEF_ROW || row == UNDEFW_ROW) - h = bfd_wrapped_link_hash_lookup (abfd, info, name, TRUE, copy, FALSE); + h = bfd_wrapped_link_hash_lookup (abfd, info, name, true, copy, false); else - h = bfd_link_hash_lookup (info->hash, name, TRUE, copy, FALSE); + h = bfd_link_hash_lookup (info->hash, name, true, copy, false); if (h == NULL) { if (hashp != NULL) *hashp = NULL; - return FALSE; + return false; } } if (info->notice_all || (info->notice_hash != NULL - && bfd_hash_lookup (info->notice_hash, name, FALSE, FALSE) != NULL)) + && bfd_hash_lookup (info->notice_hash, name, false, false) != NULL)) { if (! (*info->callbacks->notice) (info, h, inh, abfd, section, value, flags)) - return FALSE; + return false; } if (hashp != NULL) @@ -1467,7 +1466,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, /* Treat symbols defined by early linker script pass as undefined. */ if (h->ldscript_def) prev = bfd_link_hash_undefined; - cycle = FALSE; + cycle = false; action = link_action[(int) row][prev]; switch (action) { @@ -1573,7 +1572,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, bfd_hash_allocate (&info->hash->table, sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) - return FALSE; + return false; h->u.c.size = value; @@ -1680,7 +1679,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, redefine sym@@ver. Of course if there exists sym -> sym@@ver then this also redefines sym. */ h = h->u.i.link; - cycle = TRUE; + cycle = true; break; } if (strcmp (h->u.i.link->root.string, string) == 0) @@ -1707,7 +1706,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, (_("%pB: indirect symbol `%s' to `%s' is a loop"), abfd, name, string); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (inh->type == bfd_link_hash_new) { @@ -1723,7 +1722,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, /* ??? If inh->type == bfd_link_hash_undefweak this converts inh to bfd_link_hash_undefined. */ row = UNDEF_ROW; - cycle = TRUE; + cycle = true; } h->type = bfd_link_hash_indirect; @@ -1757,7 +1756,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, case CYCLE: /* Try again with the referenced symbol. */ h = h->u.i.link; - cycle = TRUE; + cycle = true; break; case REFC: @@ -1765,7 +1764,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, if (h->u.undef.next == NULL && info->hash->undefs_tail != h) h->u.undef.next = h; h = h->u.i.link; - cycle = TRUE; + cycle = true; break; case WARN: @@ -1791,7 +1790,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, ((*info->hash->table.newfunc) (NULL, &info->hash->table, h->root.string))); if (sub == NULL) - return FALSE; + return false; *sub = *h; sub->type = bfd_link_hash_warning; sub->u.i.link = h; @@ -1804,7 +1803,7 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, w = (char *) bfd_hash_allocate (&info->hash->table, len); if (w == NULL) - return FALSE; + return false; memcpy (w, string, len); sub->u.i.warning = w; } @@ -1820,12 +1819,12 @@ _bfd_generic_link_add_one_symbol (struct bfd_link_info *info, } while (cycle); - return TRUE; + return true; } /* Generic final link routine. */ -bfd_boolean +bool _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) { bfd *sub; @@ -1842,12 +1841,12 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) for (o = abfd->sections; o != NULL; o = o->next) for (p = o->map_head.link_order; p != NULL; p = p->next) if (p->type == bfd_indirect_link_order) - p->u.indirect.section->linker_mark = TRUE; + p->u.indirect.section->linker_mark = true; /* Build the output symbol table. */ for (sub = info->input_bfds; sub != NULL; sub = sub->link.next) if (! _bfd_generic_link_output_symbols (abfd, sub, info, &outsymalloc)) - return FALSE; + return false; /* Accumulate the global symbols. */ wginfo.info = info; @@ -1861,7 +1860,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) shouldn't really need one, since we have SYMCOUNT, but some old code still expects one. */ if (! generic_add_output_symbol (abfd, &outsymalloc, NULL)) - return FALSE; + return false; if (bfd_link_relocatable (info)) { @@ -1888,10 +1887,10 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) relsize = bfd_get_reloc_upper_bound (input_bfd, input_section); if (relsize < 0) - return FALSE; + return false; relocs = (arelent **) bfd_malloc (relsize); if (!relocs && relsize != 0) - return FALSE; + return false; symbols = _bfd_generic_link_get_symbols (input_bfd); reloc_count = bfd_canonicalize_reloc (input_bfd, input_section, @@ -1899,7 +1898,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) symbols); free (relocs); if (reloc_count < 0) - return FALSE; + return false; BFD_ASSERT ((unsigned long) reloc_count == input_section->reloc_count); o->reloc_count += reloc_count; @@ -1913,7 +1912,7 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) amt *= sizeof (arelent *); o->orelocation = (struct reloc_cache_entry **) bfd_alloc (abfd, amt); if (!o->orelocation) - return FALSE; + return false; o->flags |= SEC_RELOC; /* Reset the count so that it can be used as an index when putting in the output relocs. */ @@ -1932,26 +1931,26 @@ _bfd_generic_final_link (bfd *abfd, struct bfd_link_info *info) case bfd_section_reloc_link_order: case bfd_symbol_reloc_link_order: if (! _bfd_generic_reloc_link_order (abfd, info, o, p)) - return FALSE; + return false; break; case bfd_indirect_link_order: - if (! default_indirect_link_order (abfd, info, o, p, TRUE)) - return FALSE; + if (! default_indirect_link_order (abfd, info, o, p, true)) + return false; break; default: if (! _bfd_default_link_order (abfd, info, o, p)) - return FALSE; + return false; break; } } } - return TRUE; + return true; } /* Add an output symbol to the output BFD. */ -static bfd_boolean +static bool generic_add_output_symbol (bfd *output_bfd, size_t *psymalloc, asymbol *sym) { if (bfd_get_symcount (output_bfd) >= *psymalloc) @@ -1967,7 +1966,7 @@ generic_add_output_symbol (bfd *output_bfd, size_t *psymalloc, asymbol *sym) amt *= sizeof (asymbol *); newsyms = (asymbol **) bfd_realloc (bfd_get_outsymbols (output_bfd), amt); if (newsyms == NULL) - return FALSE; + return false; output_bfd->outsymbols = newsyms; } @@ -1975,12 +1974,12 @@ generic_add_output_symbol (bfd *output_bfd, size_t *psymalloc, asymbol *sym) if (sym != NULL) ++output_bfd->symcount; - return TRUE; + return true; } /* Handle the symbols for an input BFD. */ -bfd_boolean +bool _bfd_generic_link_output_symbols (bfd *output_bfd, bfd *input_bfd, struct bfd_link_info *info, @@ -1990,7 +1989,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, asymbol **sym_end; if (!bfd_generic_link_read_symbols (input_bfd)) - return FALSE; + return false; /* Create a filename symbol if we are supposed to. */ if (info->create_object_symbols_section != NULL) @@ -2005,7 +2004,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, newsym = bfd_make_empty_symbol (input_bfd); if (!newsym) - return FALSE; + return false; newsym->name = bfd_get_filename (input_bfd); newsym->value = 0; newsym->flags = BSF_LOCAL | BSF_FILE; @@ -2013,7 +2012,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, if (! generic_add_output_symbol (output_bfd, psymalloc, newsym)) - return FALSE; + return false; break; } @@ -2028,7 +2027,7 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, { asymbol *sym; struct generic_link_hash_entry *h; - bfd_boolean output; + bool output; h = NULL; sym = *sym_ptr; @@ -2059,11 +2058,11 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, h = ((struct generic_link_hash_entry *) bfd_wrapped_link_hash_lookup (output_bfd, info, bfd_asymbol_name (sym), - FALSE, FALSE, TRUE)); + false, false, true)); else h = _bfd_generic_link_hash_lookup (_bfd_generic_hash_table (info), bfd_asymbol_name (sym), - FALSE, FALSE, TRUE); + false, false, true); if (h != NULL) { @@ -2126,8 +2125,8 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, && (info->strip == strip_all || (info->strip == strip_some && bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym), - FALSE, FALSE) == NULL))) - output = FALSE; + false, false) == NULL))) + output = false; else if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0) { /* If this symbol is marked as occurring now, rather @@ -2136,50 +2135,50 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, better way. */ if (bfd_asymbol_bfd (sym) == input_bfd && (sym->flags & BSF_NOT_AT_END) != 0) - output = TRUE; + output = true; else - output = FALSE; + output = false; } else if ((sym->flags & BSF_KEEP) != 0) - output = TRUE; + output = true; else if (bfd_is_ind_section (sym->section)) - output = FALSE; + output = false; else if ((sym->flags & BSF_DEBUGGING) != 0) { if (info->strip == strip_none) - output = TRUE; + output = true; else - output = FALSE; + output = false; } else if (bfd_is_und_section (sym->section) || bfd_is_com_section (sym->section)) - output = FALSE; + output = false; else if ((sym->flags & BSF_LOCAL) != 0) { if ((sym->flags & BSF_WARNING) != 0) - output = FALSE; + output = false; else { switch (info->discard) { default: case discard_all: - output = FALSE; + output = false; break; case discard_sec_merge: - output = TRUE; + output = true; if (bfd_link_relocatable (info) || ! (sym->section->flags & SEC_MERGE)) break; /* FALLTHROUGH */ case discard_l: if (bfd_is_local_label (input_bfd, sym)) - output = FALSE; + output = false; else - output = TRUE; + output = true; break; case discard_none: - output = TRUE; + output = true; break; } } @@ -2187,16 +2186,16 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, else if ((sym->flags & BSF_CONSTRUCTOR)) { if (info->strip != strip_all) - output = TRUE; + output = true; else - output = FALSE; + output = false; } else if (sym->flags == 0 && (sym->section->owner->flags & BFD_PLUGIN) != 0) /* LTO doesn't set symbol information. We get here with the generic linker for a symbol that was "common" but no longer needs to be global. */ - output = FALSE; + output = false; else abort (); @@ -2206,18 +2205,18 @@ _bfd_generic_link_output_symbols (bfd *output_bfd, if (!bfd_is_abs_section (sym->section) && bfd_section_removed_from_list (output_bfd, sym->section->output_section)) - output = FALSE; + output = false; if (output) { if (! generic_add_output_symbol (output_bfd, psymalloc, sym)) - return FALSE; + return false; if (h != NULL) - h->written = TRUE; + h->written = true; } } - return TRUE; + return true; } /* Set the section and value of a generic BFD symbol based on a linker @@ -2284,7 +2283,7 @@ set_symbol_from_hash (asymbol *sym, struct bfd_link_hash_entry *h) /* Write out a global symbol, if it hasn't already been written out. This is called for each symbol in the hash table. */ -bfd_boolean +bool _bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *h, void *data) { @@ -2293,15 +2292,15 @@ _bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *h, asymbol *sym; if (h->written) - return TRUE; + return true; - h->written = TRUE; + h->written = true; if (wginfo->info->strip == strip_all || (wginfo->info->strip == strip_some && bfd_hash_lookup (wginfo->info->keep_hash, h->root.root.string, - FALSE, FALSE) == NULL)) - return TRUE; + false, false) == NULL)) + return true; if (h->sym != NULL) sym = h->sym; @@ -2309,7 +2308,7 @@ _bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *h, { sym = bfd_make_empty_symbol (wginfo->output_bfd); if (!sym) - return FALSE; + return false; sym->name = h->root.root.string; sym->flags = 0; } @@ -2325,12 +2324,12 @@ _bfd_generic_link_write_global_symbol (struct generic_link_hash_entry *h, abort (); } - return TRUE; + return true; } /* Create a relocation. */ -bfd_boolean +bool _bfd_generic_reloc_link_order (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2345,14 +2344,14 @@ _bfd_generic_reloc_link_order (bfd *abfd, r = (arelent *) bfd_alloc (abfd, sizeof (arelent)); if (r == NULL) - return FALSE; + return false; r->address = link_order->offset; r->howto = bfd_reloc_type_lookup (abfd, link_order->u.reloc.p->reloc); if (r->howto == 0) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Get the symbol to use for the relocation. */ @@ -2365,14 +2364,14 @@ _bfd_generic_reloc_link_order (bfd *abfd, h = ((struct generic_link_hash_entry *) bfd_wrapped_link_hash_lookup (abfd, info, link_order->u.reloc.p->u.name, - FALSE, FALSE, TRUE)); + false, false, true)); if (h == NULL || ! h->written) { (*info->callbacks->unattached_reloc) (info, link_order->u.reloc.p->u.name, NULL, NULL, 0); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } r->sym_ptr_ptr = &h->sym; } @@ -2386,13 +2385,13 @@ _bfd_generic_reloc_link_order (bfd *abfd, bfd_size_type size; bfd_reloc_status_type rstat; bfd_byte *buf; - bfd_boolean ok; + bool ok; file_ptr loc; size = bfd_get_reloc_size (r->howto); buf = (bfd_byte *) bfd_zmalloc (size); if (buf == NULL && size != 0) - return FALSE; + return false; rstat = _bfd_relocate_contents (r->howto, abfd, (bfd_vma) link_order->u.reloc.p->addend, buf); @@ -2417,7 +2416,7 @@ _bfd_generic_reloc_link_order (bfd *abfd, ok = bfd_set_section_contents (abfd, sec, buf, loc, size); free (buf); if (! ok) - return FALSE; + return false; r->addend = 0; } @@ -2425,7 +2424,7 @@ _bfd_generic_reloc_link_order (bfd *abfd, sec->orelocation[sec->reloc_count] = r; ++sec->reloc_count; - return TRUE; + return true; } /* Allocate a new link_order for a section. */ @@ -2455,7 +2454,7 @@ bfd_new_link_order (bfd *abfd, asection *section) the reloc_link_order types here, since they depend upon the details of how the particular backends generates relocs. */ -bfd_boolean +bool _bfd_default_link_order (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2470,7 +2469,7 @@ _bfd_default_link_order (bfd *abfd, abort (); case bfd_indirect_link_order: return default_indirect_link_order (abfd, info, sec, link_order, - FALSE); + false); case bfd_data_link_order: return default_data_link_order (abfd, info, sec, link_order); } @@ -2478,7 +2477,7 @@ _bfd_default_link_order (bfd *abfd, /* Default routine to handle a bfd_data_link_order. */ -static bfd_boolean +static bool default_data_link_order (bfd *abfd, struct bfd_link_info *info, asection *sec, @@ -2488,13 +2487,13 @@ default_data_link_order (bfd *abfd, size_t fill_size; bfd_byte *fill; file_ptr loc; - bfd_boolean result; + bool result; BFD_ASSERT ((sec->flags & SEC_HAS_CONTENTS) != 0); size = link_order->size; if (size == 0) - return TRUE; + return true; fill = link_order->u.data.contents; fill_size = link_order->u.data.size; @@ -2503,14 +2502,14 @@ default_data_link_order (bfd *abfd, fill = abfd->arch_info->fill (size, info->big_endian, (sec->flags & SEC_CODE) != 0); if (fill == NULL) - return FALSE; + return false; } else if (fill_size < size) { bfd_byte *p; fill = (bfd_byte *) bfd_malloc (size); if (fill == NULL) - return FALSE; + return false; p = fill; if (fill_size == 1) memset (p, (int) link_order->u.data.contents[0], (size_t) size); @@ -2539,12 +2538,12 @@ default_data_link_order (bfd *abfd, /* Default routine to handle a bfd_indirect_link_order. */ -static bfd_boolean +static bool default_indirect_link_order (bfd *output_bfd, struct bfd_link_info *info, asection *output_section, struct bfd_link_order *link_order, - bfd_boolean generic_linker) + bool generic_linker) { asection *input_section; bfd *input_bfd; @@ -2558,7 +2557,7 @@ default_indirect_link_order (bfd *output_bfd, input_section = link_order->u.indirect.section; input_bfd = input_section->owner; if (input_section->size == 0) - return TRUE; + return true; BFD_ASSERT (input_section->output_section == output_section); BFD_ASSERT (input_section->output_offset == link_order->offset); @@ -2578,7 +2577,7 @@ default_indirect_link_order (bfd *output_bfd, (_("attempt to do relocatable link with %s input and %s output"), bfd_get_target (input_bfd), bfd_get_target (output_bfd)); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } if (! generic_linker) @@ -2591,7 +2590,7 @@ default_indirect_link_order (bfd *output_bfd, a specific linker, presumably because we are linking different types of object files together. */ if (!bfd_generic_link_read_symbols (input_bfd)) - return FALSE; + return false; /* Since we have been called by a specific linker, rather than the generic linker, the values of the symbols will not be @@ -2623,11 +2622,11 @@ default_indirect_link_order (bfd *output_bfd, else if (bfd_is_und_section (bfd_asymbol_section (sym))) h = bfd_wrapped_link_hash_lookup (output_bfd, info, bfd_asymbol_name (sym), - FALSE, FALSE, TRUE); + false, false, true); else h = bfd_link_hash_lookup (info->hash, bfd_asymbol_name (sym), - FALSE, FALSE, TRUE); + false, false, true); if (h != NULL) set_symbol_from_hash (sym, h); } @@ -2673,11 +2672,11 @@ default_indirect_link_order (bfd *output_bfd, goto error_return; free (contents); - return TRUE; + return true; error_return: free (contents); - return FALSE; + return false; } /* A little routine to count the number of relocs in a link_order @@ -2705,7 +2704,7 @@ FUNCTION bfd_link_split_section SYNOPSIS - bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); + bool bfd_link_split_section (bfd *abfd, asection *sec); DESCRIPTION Return nonzero if @var{sec} should be split during a @@ -2717,11 +2716,11 @@ DESCRIPTION */ -bfd_boolean +bool _bfd_generic_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec ATTRIBUTE_UNUSED) { - return FALSE; + return false; } /* @@ -2729,9 +2728,9 @@ FUNCTION bfd_section_already_linked SYNOPSIS - bfd_boolean bfd_section_already_linked (bfd *abfd, - asection *sec, - struct bfd_link_info *info); + bool bfd_section_already_linked (bfd *abfd, + asection *sec, + struct bfd_link_info *info); DESCRIPTION Check if @var{data} has been already linked during a reloceatable @@ -2761,12 +2760,11 @@ static struct bfd_hash_table _bfd_section_already_linked_table; void bfd_section_already_linked_table_traverse - (bfd_boolean (*func) (struct bfd_section_already_linked_hash_entry *, - void *), void *info) + (bool (*func) (struct bfd_section_already_linked_hash_entry *, void *), + void *info) { bfd_hash_traverse (&_bfd_section_already_linked_table, - (bfd_boolean (*) (struct bfd_hash_entry *, - void *)) func, + (bool (*) (struct bfd_hash_entry *, void *)) func, info); } @@ -2775,10 +2773,10 @@ bfd_section_already_linked_table_lookup (const char *name) { return ((struct bfd_section_already_linked_hash_entry *) bfd_hash_lookup (&_bfd_section_already_linked_table, name, - TRUE, FALSE)); + true, false)); } -bfd_boolean +bool bfd_section_already_linked_table_insert (struct bfd_section_already_linked_hash_entry *already_linked_list, asection *sec) @@ -2790,11 +2788,11 @@ bfd_section_already_linked_table_insert l = (struct bfd_section_already_linked *) bfd_hash_allocate (&_bfd_section_already_linked_table, sizeof *l); if (l == NULL) - return FALSE; + return false; l->sec = sec; l->next = already_linked_list->entry; already_linked_list->entry = l; - return TRUE; + return true; } static struct bfd_hash_entry * @@ -2814,7 +2812,7 @@ already_linked_newfunc (struct bfd_hash_entry *entry ATTRIBUTE_UNUSED, return &ret->root; } -bfd_boolean +bool bfd_section_already_linked_table_init (void) { return bfd_hash_table_init_n (&_bfd_section_already_linked_table, @@ -2832,7 +2830,7 @@ bfd_section_already_linked_table_free (void) /* Report warnings as appropriate for duplicate section SEC. Return FALSE if we decide to keep SEC after all. */ -bfd_boolean +bool _bfd_handle_already_linked (asection *sec, struct bfd_section_already_linked *l, struct bfd_link_info *info) @@ -2853,7 +2851,7 @@ _bfd_handle_already_linked (asection *sec, && (l->sec->owner->flags & BFD_PLUGIN) != 0) { l->sec = sec; - return FALSE; + return false; } break; @@ -2916,12 +2914,12 @@ _bfd_handle_already_linked (asection *sec, which we are really going to use. */ sec->output_section = bfd_abs_section_ptr; sec->kept_section = l->sec; - return TRUE; + return true; } /* This is used on non-ELF inputs. */ -bfd_boolean +bool _bfd_generic_section_already_linked (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, struct bfd_link_info *info) @@ -2931,11 +2929,11 @@ _bfd_generic_section_already_linked (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_section_already_linked_hash_entry *already_linked_list; if ((sec->flags & SEC_LINK_ONCE) == 0) - return FALSE; + return false; /* The generic linker doesn't handle section groups. */ if ((sec->flags & SEC_GROUP) != 0) - return FALSE; + return false; /* FIXME: When doing a relocatable link, we may have trouble copying relocations in other sections that refer to local symbols @@ -2965,7 +2963,7 @@ _bfd_generic_section_already_linked (bfd *abfd ATTRIBUTE_UNUSED, /* This is the first section with this name. Record it. */ if (!bfd_section_already_linked_table_insert (already_linked_list, sec)) info->callbacks->einfo (_("%F%P: already_linked_table: %E\n")); - return FALSE; + return false; } /* Choose a neighbouring section to S in OBFD that will be output, or @@ -3040,7 +3038,7 @@ _bfd_nearby_section (bfd *obfd, asection *s, bfd_vma addr) /* Convert symbols in excluded output sections to use a kept section. */ -static bfd_boolean +static bool fix_syms (struct bfd_link_hash_entry *h, void *data) { bfd *obfd = (bfd *) data; @@ -3063,7 +3061,7 @@ fix_syms (struct bfd_link_hash_entry *h, void *data) } } - return TRUE; + return true; } void @@ -3077,7 +3075,7 @@ FUNCTION bfd_generic_define_common_symbol SYNOPSIS - bfd_boolean bfd_generic_define_common_symbol + bool bfd_generic_define_common_symbol (bfd *output_bfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h); @@ -3090,7 +3088,7 @@ DESCRIPTION . */ -bfd_boolean +bool bfd_generic_define_common_symbol (bfd *output_bfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct bfd_link_hash_entry *h) @@ -3133,7 +3131,7 @@ bfd_generic_define_common_symbol (bfd *output_bfd, it is no longer a common section. */ section->flags |= SEC_ALLOC; section->flags &= ~(SEC_IS_COMMON | SEC_HAS_CONTENTS); - return TRUE; + return true; } /* @@ -3186,7 +3184,7 @@ bfd_generic_define_start_stop (struct bfd_link_info *info, { struct bfd_link_hash_entry *h; - h = bfd_link_hash_lookup (info->hash, symbol, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, symbol, false, false, true); if (h != NULL && !h->ldscript_def && (h->type == bfd_link_hash_undefined @@ -3207,7 +3205,7 @@ FUNCTION SYNOPSIS struct bfd_elf_version_tree * bfd_find_version_for_sym (struct bfd_elf_version_tree *verdefs, - const char *sym_name, bfd_boolean *hide); + const char *sym_name, bool *hide); DESCRIPTION Search an elf version script tree for symbol versioning @@ -3220,7 +3218,7 @@ DESCRIPTION struct bfd_elf_version_tree * bfd_find_version_for_sym (struct bfd_elf_version_tree *verdefs, const char *sym_name, - bfd_boolean *hide) + bool *hide) { struct bfd_elf_version_tree *t; struct bfd_elf_version_tree *local_ver, *global_ver, *exist_ver; @@ -3300,7 +3298,7 @@ bfd_find_version_for_sym (struct bfd_elf_version_tree *verdefs, if (local_ver != NULL) { - *hide = TRUE; + *hide = true; return local_ver; } @@ -3312,7 +3310,7 @@ FUNCTION bfd_hide_sym_by_version SYNOPSIS - bfd_boolean bfd_hide_sym_by_version + bool bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name); DESCRIPTION @@ -3321,11 +3319,11 @@ DESCRIPTION */ -bfd_boolean +bool bfd_hide_sym_by_version (struct bfd_elf_version_tree *verdefs, const char *sym_name) { - bfd_boolean hidden = FALSE; + bool hidden = false; bfd_find_version_for_sym (verdefs, sym_name, &hidden); return hidden; } @@ -3335,7 +3333,7 @@ FUNCTION bfd_link_check_relocs SYNOPSIS - bfd_boolean bfd_link_check_relocs + bool bfd_link_check_relocs (bfd *abfd, struct bfd_link_info *info); DESCRIPTION @@ -3345,7 +3343,7 @@ DESCRIPTION This is the external entry point to this code. */ -bfd_boolean +bool bfd_link_check_relocs (bfd *abfd, struct bfd_link_info *info) { return BFD_SEND (abfd, _bfd_link_check_relocs, (abfd, info)); @@ -3356,7 +3354,7 @@ FUNCTION _bfd_generic_link_check_relocs SYNOPSIS - bfd_boolean _bfd_generic_link_check_relocs + bool _bfd_generic_link_check_relocs (bfd *abfd, struct bfd_link_info *info); DESCRIPTION @@ -3366,11 +3364,11 @@ DESCRIPTION outside the BFD library. */ -bfd_boolean +bool _bfd_generic_link_check_relocs (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* @@ -3378,7 +3376,7 @@ FUNCTION bfd_merge_private_bfd_data SYNOPSIS - bfd_boolean bfd_merge_private_bfd_data + bool bfd_merge_private_bfd_data (bfd *ibfd, struct bfd_link_info *info); DESCRIPTION @@ -3399,7 +3397,7 @@ INTERNAL_FUNCTION _bfd_generic_verify_endian_match SYNOPSIS - bfd_boolean _bfd_generic_verify_endian_match + bool _bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info); DESCRIPTION @@ -3408,7 +3406,7 @@ DESCRIPTION TRUE for a match, otherwise returns FALSE and emits an error. */ -bfd_boolean +bool _bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info) { bfd *obfd = info->output_bfd; @@ -3424,10 +3422,10 @@ _bfd_generic_verify_endian_match (bfd *ibfd, struct bfd_link_info *info) _bfd_error_handler (_("%pB: compiled for a little endian system " "and target is big endian"), ibfd); bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } - return TRUE; + return true; } int @@ -3437,11 +3435,11 @@ _bfd_nolink_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, return 0; } -bfd_boolean +bool _bfd_nolink_bfd_relax_section (bfd *abfd, asection *section ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, - bfd_boolean *again ATTRIBUTE_UNUSED) + bool *again ATTRIBUTE_UNUSED) { return _bfd_bool_bfd_false_error (abfd); } @@ -3452,13 +3450,13 @@ _bfd_nolink_bfd_get_relocated_section_contents struct bfd_link_info *link_info ATTRIBUTE_UNUSED, struct bfd_link_order *link_order ATTRIBUTE_UNUSED, bfd_byte *data ATTRIBUTE_UNUSED, - bfd_boolean relocatable ATTRIBUTE_UNUSED, + bool relocatable ATTRIBUTE_UNUSED, asymbol **symbols ATTRIBUTE_UNUSED) { return (bfd_byte *) _bfd_ptr_bfd_null_error (abfd); } -bfd_boolean +bool _bfd_nolink_bfd_lookup_section_flags (struct bfd_link_info *info ATTRIBUTE_UNUSED, struct flag_info *flaginfo ATTRIBUTE_UNUSED, @@ -3467,7 +3465,7 @@ _bfd_nolink_bfd_lookup_section_flags return _bfd_bool_bfd_false_error (section->owner); } -bfd_boolean +bool _bfd_nolink_bfd_is_group_section (bfd *abfd, const asection *sec ATTRIBUTE_UNUSED) { @@ -3481,7 +3479,7 @@ _bfd_nolink_bfd_group_name (bfd *abfd, return _bfd_ptr_bfd_null_error (abfd); } -bfd_boolean +bool _bfd_nolink_bfd_discard_group (bfd *abfd, asection *sec ATTRIBUTE_UNUSED) { return _bfd_bool_bfd_false_error (abfd); @@ -3507,13 +3505,13 @@ _bfd_nolink_bfd_copy_link_hash_symbol_type { } -bfd_boolean +bool _bfd_nolink_bfd_link_split_section (bfd *abfd, asection *sec ATTRIBUTE_UNUSED) { return _bfd_bool_bfd_false_error (abfd); } -bfd_boolean +bool _bfd_nolink_section_already_linked (bfd *abfd, asection *sec ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) @@ -3521,7 +3519,7 @@ _bfd_nolink_section_already_linked (bfd *abfd, return _bfd_bool_bfd_false_error (abfd); } -bfd_boolean +bool _bfd_nolink_bfd_define_common_symbol (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, diff --git a/bfd/mach-o-aarch64.c b/bfd/mach-o-aarch64.c index 15cea2d485..36c1f984bf 100644 --- a/bfd/mach-o-aarch64.c +++ b/bfd/mach-o-aarch64.c @@ -53,13 +53,13 @@ bfd_mach_o_arm64_core_p (bfd *abfd) BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_ARM64); } -static bfd_boolean +static bool bfd_mach_o_arm64_mkobject (bfd *abfd) { bfd_mach_o_data_struct *mdata; if (!bfd_mach_o_mkobject_init (abfd)) - return FALSE; + return false; mdata = bfd_mach_o_get_data (abfd); mdata->header.magic = BFD_MACH_O_MH_MAGIC; @@ -68,7 +68,7 @@ bfd_mach_o_arm64_mkobject (bfd *abfd) mdata->header.byteorder = BFD_ENDIAN_LITTLE; mdata->header.version = 1; - return TRUE; + return true; } /* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */ @@ -77,76 +77,76 @@ bfd_mach_o_arm64_mkobject (bfd *abfd) static reloc_howto_type arm64_howto_table[]= { /* 0 */ - HOWTO (BFD_RELOC_64, 0, 4, 64, FALSE, 0, + HOWTO (BFD_RELOC_64, 0, 4, 64, false, 0, complain_overflow_bitfield, NULL, "64", - FALSE, MINUS_ONE, MINUS_ONE, FALSE), - HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0, + false, MINUS_ONE, MINUS_ONE, false), + HOWTO (BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO (BFD_RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0, + false, 0xffff, 0xffff, false), + HOWTO (BFD_RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield, NULL, "8", - FALSE, 0xff, 0xff, FALSE), + false, 0xff, 0xff, false), /* 4 */ - HOWTO (BFD_RELOC_64_PCREL, 0, 4, 64, TRUE, 0, + HOWTO (BFD_RELOC_64_PCREL, 0, 4, 64, true, 0, complain_overflow_bitfield, NULL, "DISP64", - FALSE, MINUS_ONE, MINUS_ONE, TRUE), - HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, + false, MINUS_ONE, MINUS_ONE, true), + HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "DISP32", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0, + false, 0xffffffff, 0xffffffff, true), + HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, complain_overflow_bitfield, NULL, "DISP16", - FALSE, 0xffff, 0xffff, TRUE), - HOWTO (BFD_RELOC_AARCH64_CALL26, 0, 2, 26, TRUE, 0, + false, 0xffff, 0xffff, true), + HOWTO (BFD_RELOC_AARCH64_CALL26, 0, 2, 26, true, 0, complain_overflow_bitfield, NULL, "BRANCH26", - FALSE, 0x03ffffff, 0x03ffffff, TRUE), + false, 0x03ffffff, 0x03ffffff, true), /* 8 */ - HOWTO (BFD_RELOC_AARCH64_ADR_HI21_PCREL, 12, 2, 21, TRUE, 0, + HOWTO (BFD_RELOC_AARCH64_ADR_HI21_PCREL, 12, 2, 21, true, 0, complain_overflow_signed, NULL, "PAGE21", - FALSE, 0x1fffff, 0x1fffff, TRUE), - HOWTO (BFD_RELOC_AARCH64_LDST16_LO12, 1, 2, 12, TRUE, 0, + false, 0x1fffff, 0x1fffff, true), + HOWTO (BFD_RELOC_AARCH64_LDST16_LO12, 1, 2, 12, true, 0, complain_overflow_signed, NULL, "PGOFF12", - FALSE, 0xffe, 0xffe, TRUE), - HOWTO (BFD_RELOC_MACH_O_ARM64_ADDEND, 0, 2, 32, FALSE, 0, + false, 0xffe, 0xffe, true), + HOWTO (BFD_RELOC_MACH_O_ARM64_ADDEND, 0, 2, 32, false, 0, complain_overflow_signed, NULL, "ADDEND", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO (BFD_RELOC_MACH_O_SUBTRACTOR32, 0, 2, 32, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO (BFD_RELOC_MACH_O_SUBTRACTOR32, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "SUBTRACTOR32", - FALSE, 0xffffffff, 0xffffffff, FALSE), + false, 0xffffffff, 0xffffffff, false), /* 12 */ - HOWTO (BFD_RELOC_MACH_O_SUBTRACTOR64, 0, 4, 64, FALSE, 0, + HOWTO (BFD_RELOC_MACH_O_SUBTRACTOR64, 0, 4, 64, false, 0, complain_overflow_bitfield, NULL, "SUBTRACTOR64", - FALSE, MINUS_ONE, MINUS_ONE, FALSE), - HOWTO (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21, 12, 2, 21, TRUE, 0, + false, MINUS_ONE, MINUS_ONE, false), + HOWTO (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGE21, 12, 2, 21, true, 0, complain_overflow_signed, NULL, "GOT_LD_PG21", - FALSE, 0x1fffff, 0x1fffff, TRUE), - HOWTO (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, 1, 2, 12, TRUE, 0, + false, 0x1fffff, 0x1fffff, true), + HOWTO (BFD_RELOC_MACH_O_ARM64_GOT_LOAD_PAGEOFF12, 1, 2, 12, true, 0, complain_overflow_signed, NULL, "GOT_LD_PGOFF12", - FALSE, 0xffe, 0xffe, TRUE), - HOWTO (BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, 0, 2, 32, TRUE, 0, + false, 0xffe, 0xffe, true), + HOWTO (BFD_RELOC_MACH_O_ARM64_POINTER_TO_GOT, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "PTR_TO_GOT", - FALSE, 0xffffffff, 0xffffffff, TRUE), + false, 0xffffffff, 0xffffffff, true), }; -static bfd_boolean +static bool bfd_mach_o_arm64_canonicalize_one_reloc (bfd * abfd, struct mach_o_reloc_info_external * raw, arelent * res, @@ -159,7 +159,7 @@ bfd_mach_o_arm64_canonicalize_one_reloc (bfd * abfd, if (res->address & BFD_MACH_O_SR_SCATTERED) { /* Only non-scattered relocations. */ - return FALSE; + return false; } /* The value and info fields have to be extracted dependent on target @@ -173,13 +173,13 @@ bfd_mach_o_arm64_canonicalize_one_reloc (bfd * abfd, res->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; res->addend = reloc.r_value; res->howto = &arm64_howto_table[10]; - return TRUE; + return true; } - return FALSE; + return false; } if (!bfd_mach_o_canonicalize_non_scattered_reloc (abfd, &reloc, res, syms)) - return FALSE; + return false; switch (reloc.r_type) { @@ -188,90 +188,90 @@ bfd_mach_o_arm64_canonicalize_one_reloc (bfd * abfd, { case 0: /* len = 0, pcrel = 0 */ res->howto = &arm64_howto_table[3]; - return TRUE; + return true; case 2: /* len = 1, pcrel = 0 */ res->howto = &arm64_howto_table[2]; - return TRUE; + return true; case 3: /* len = 1, pcrel = 1 */ res->howto = &arm64_howto_table[6]; - return TRUE; + return true; case 4: /* len = 2, pcrel = 0 */ res->howto = &arm64_howto_table[1]; - return TRUE; + return true; case 5: /* len = 2, pcrel = 1 */ res->howto = &arm64_howto_table[5]; - return TRUE; + return true; case 6: /* len = 3, pcrel = 0 */ res->howto = &arm64_howto_table[0]; - return TRUE; + return true; case 7: /* len = 3, pcrel = 1 */ res->howto = &arm64_howto_table[4]; - return TRUE; + return true; default: - return FALSE; + return false; } break; case BFD_MACH_O_ARM64_RELOC_SUBTRACTOR: if (reloc.r_pcrel) - return FALSE; + return false; switch (reloc.r_length) { case 2: res->howto = &arm64_howto_table[11]; - return TRUE; + return true; case 3: res->howto = &arm64_howto_table[12]; - return TRUE; + return true; default: - return FALSE; + return false; } break; case BFD_MACH_O_ARM64_RELOC_BRANCH26: if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm64_howto_table[7]; - return TRUE; + return true; } break; case BFD_MACH_O_ARM64_RELOC_PAGE21: if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm64_howto_table[8]; - return TRUE; + return true; } break; case BFD_MACH_O_ARM64_RELOC_PAGEOFF12: if (reloc.r_length == 2 && reloc.r_pcrel == 0) { res->howto = &arm64_howto_table[9]; - return TRUE; + return true; } break; case BFD_MACH_O_ARM64_RELOC_GOT_LOAD_PAGE21: if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm64_howto_table[13]; - return TRUE; + return true; } break; case BFD_MACH_O_ARM64_RELOC_GOT_LOAD_PAGEOFF12: if (reloc.r_length == 2 && reloc.r_pcrel == 0) { res->howto = &arm64_howto_table[14]; - return TRUE; + return true; } break; case BFD_MACH_O_ARM64_RELOC_POINTER_TO_GOT: if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm64_howto_table[15]; - return TRUE; + return true; } break; default: break; } - return FALSE; + return false; } static reloc_howto_type * diff --git a/bfd/mach-o-arm.c b/bfd/mach-o-arm.c index 0b89178830..094eac6bac 100644 --- a/bfd/mach-o-arm.c +++ b/bfd/mach-o-arm.c @@ -51,13 +51,13 @@ bfd_mach_o_arm_core_p (bfd *abfd) BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_ARM); } -static bfd_boolean +static bool bfd_mach_o_arm_mkobject (bfd *abfd) { bfd_mach_o_data_struct *mdata; if (!bfd_mach_o_mkobject_init (abfd)) - return FALSE; + return false; mdata = bfd_mach_o_get_data (abfd); mdata->header.magic = BFD_MACH_O_MH_MAGIC; @@ -66,87 +66,87 @@ bfd_mach_o_arm_mkobject (bfd *abfd) mdata->header.byteorder = BFD_ENDIAN_LITTLE; mdata->header.version = 1; - return TRUE; + return true; } static reloc_howto_type arm_howto_table[]= { /* 0 */ - HOWTO (BFD_RELOC_32, 0, 2, 32, FALSE, 0, + HOWTO (BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO (BFD_RELOC_16, 0, 1, 16, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO (BFD_RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO (BFD_RELOC_8, 0, 0, 8, FALSE, 0, + false, 0xffff, 0xffff, false), + HOWTO (BFD_RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield, NULL, "8", - FALSE, 0xff, 0xff, FALSE), - HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, + false, 0xff, 0xff, false), + HOWTO (BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "DISP32", - FALSE, 0xffffffff, 0xffffffff, TRUE), + false, 0xffffffff, 0xffffffff, true), /* 4 */ - HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0, + HOWTO (BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, complain_overflow_bitfield, NULL, "DISP16", - FALSE, 0xffff, 0xffff, TRUE), - HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 2, 32, FALSE, 0, + false, 0xffff, 0xffff, true), + HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "SECTDIFF_32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 2, 32, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "LSECTDIFF_32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 32, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "PAIR_32", - FALSE, 0xffffffff, 0xffffffff, FALSE), + false, 0xffffffff, 0xffffffff, false), /* 8 */ - HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 1, 16, FALSE, 0, + HOWTO (BFD_RELOC_MACH_O_SECTDIFF, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "SECTDIFF_16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 1, 16, FALSE, 0, + false, 0xffff, 0xffff, false), + HOWTO (BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "LSECTDIFF_16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 1, 16, FALSE, 0, + false, 0xffff, 0xffff, false), + HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "PAIR_16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO (BFD_RELOC_ARM_PCREL_CALL, 2, 2, 24, TRUE, 0, + false, 0xffff, 0xffff, false), + HOWTO (BFD_RELOC_ARM_PCREL_CALL, 2, 2, 24, true, 0, complain_overflow_signed, NULL, "BR24", - FALSE, 0x00ffffff, 0x00ffffff, TRUE), + false, 0x00ffffff, 0x00ffffff, true), /* 12 */ - HOWTO (BFD_RELOC_ARM_MOVW, 0, 2, 16, FALSE, 0, + HOWTO (BFD_RELOC_ARM_MOVW, 0, 2, 16, false, 0, complain_overflow_dont, NULL, "MOVW", - FALSE, 0x000f0fff, 0x000f0fff, FALSE), - HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 16, FALSE, 0, + false, 0x000f0fff, 0x000f0fff, false), + HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 16, false, 0, complain_overflow_bitfield, NULL, "PAIR_W", - FALSE, 0x000f0fff, 0x000f0fff, FALSE), - HOWTO (BFD_RELOC_ARM_MOVT, 0, 2, 16, FALSE, 0, + false, 0x000f0fff, 0x000f0fff, false), + HOWTO (BFD_RELOC_ARM_MOVT, 0, 2, 16, false, 0, complain_overflow_bitfield, NULL, "MOVT", - FALSE, 0x000f0fff, 0x000f0fff, FALSE), - HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 16, FALSE, 0, + false, 0x000f0fff, 0x000f0fff, false), + HOWTO (BFD_RELOC_MACH_O_PAIR, 0, 2, 16, false, 0, complain_overflow_bitfield, NULL, "PAIR_T", - FALSE, 0x000f0fff, 0x000f0fff, FALSE), + false, 0x000f0fff, 0x000f0fff, false), /* 16 */ - HOWTO (BFD_RELOC_THUMB_PCREL_BLX, 2, 2, 24, TRUE, 0, + HOWTO (BFD_RELOC_THUMB_PCREL_BLX, 2, 2, 24, true, 0, complain_overflow_signed, NULL, "TBR22", - FALSE, 0x07ff2fff, 0x07ff2fff, TRUE) + false, 0x07ff2fff, 0x07ff2fff, true) }; -static bfd_boolean +static bool bfd_mach_o_arm_canonicalize_one_reloc (bfd * abfd, struct mach_o_reloc_info_external * raw, arelent * res, @@ -158,7 +158,7 @@ bfd_mach_o_arm_canonicalize_one_reloc (bfd * abfd, if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms)) { fprintf (stderr, "ARm 1\n"); - return FALSE; + return false; } if (reloc.r_scattered) @@ -171,69 +171,69 @@ fprintf (stderr, "ARm 1\n"); { _bfd_error_handler (_("\ malformed mach-o ARM reloc pair: reloc is first reloc")); - return FALSE; + return false; } if (reloc.r_length == 2) { res->howto = &arm_howto_table[7]; res->address = res[-1].address; - return TRUE; + return true; } else if (reloc.r_length == 1) { res->howto = &arm_howto_table[10]; res->address = res[-1].address; - return TRUE; + return true; } _bfd_error_handler (_("\ malformed mach-o ARM reloc pair: invalid length: %d"), reloc.r_length); - return FALSE; + return false; case BFD_MACH_O_ARM_RELOC_SECTDIFF: if (reloc.r_length == 2) { res->howto = &arm_howto_table[5]; - return TRUE; + return true; } else if (reloc.r_length == 1) { res->howto = &arm_howto_table[8]; - return TRUE; + return true; } _bfd_error_handler (_("\ malformed mach-o ARM sectdiff reloc: invalid length: %d"), reloc.r_length); - return FALSE; + return false; case BFD_MACH_O_ARM_RELOC_LOCAL_SECTDIFF: if (reloc.r_length == 2) { res->howto = &arm_howto_table[6]; - return TRUE; + return true; } else if (reloc.r_length == 1) { res->howto = &arm_howto_table[9]; - return TRUE; + return true; } _bfd_error_handler (_("\ malformed mach-o ARM local sectdiff reloc: invalid length: %d"), reloc.r_length); - return FALSE; + return false; case BFD_MACH_O_ARM_RELOC_HALF_SECTDIFF: switch (reloc.r_length) { case 2: /* :lower16: for movw arm. */ res->howto = &arm_howto_table[12]; - return TRUE; + return true; case 3: /* :upper16: for movt arm. */ res->howto = &arm_howto_table[14]; - return TRUE; + return true; } _bfd_error_handler (_("\ malformed mach-o ARM half sectdiff reloc: invalid length: %d"), reloc.r_length); - return FALSE; + return false; default: break; @@ -248,24 +248,24 @@ malformed mach-o ARM half sectdiff reloc: invalid length: %d"), { case 0: /* len = 0, pcrel = 0 */ res->howto = &arm_howto_table[2]; - return TRUE; + return true; case 2: /* len = 1, pcrel = 0 */ res->howto = &arm_howto_table[1]; - return TRUE; + return true; case 3: /* len = 1, pcrel = 1 */ res->howto = &arm_howto_table[4]; - return TRUE; + return true; case 4: /* len = 2, pcrel = 0 */ res->howto = &arm_howto_table[0]; - return TRUE; + return true; case 5: /* len = 2, pcrel = 1 */ res->howto = &arm_howto_table[3]; - return TRUE; + return true; default: _bfd_error_handler (_("\ malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"), reloc.r_length, reloc.r_pcrel); - return FALSE; + return false; } break; @@ -273,7 +273,7 @@ malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"), if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm_howto_table[11]; - return TRUE; + return true; } break; @@ -281,7 +281,7 @@ malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"), if (reloc.r_length == 2 && reloc.r_pcrel == 1) { res->howto = &arm_howto_table[16]; - return TRUE; + return true; } break; @@ -291,10 +291,10 @@ malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"), { case 0: /* :lower16: for movw arm. */ res->howto = &arm_howto_table[12]; - return TRUE; + return true; case 1: /* :upper16: for movt arm. */ res->howto = &arm_howto_table[14]; - return TRUE; + return true; } break; @@ -307,7 +307,7 @@ malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"), /* This reloc contains the other half in its r_address field. */ res[-1].addend += (res->address & 0xffff) << 16; res->address = res[-1].address; - return TRUE; + return true; } else if (res[-1].howto == &arm_howto_table[14] && reloc.r_length == 1) @@ -317,7 +317,7 @@ malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"), /* This reloc contains the other half in its r_address field. */ res[-1].addend += res->address & 0xffff; res->address = res[-1].address; - return TRUE; + return true; } break; @@ -328,7 +328,7 @@ malformed mach-o ARM vanilla reloc: invalid length: %d (pcrel: %d)"), _bfd_error_handler (_("\ malformed mach-o ARM reloc: unknown reloc type: %d"), reloc.r_length); - return FALSE; + return false; } static reloc_howto_type * diff --git a/bfd/mach-o-i386.c b/bfd/mach-o-i386.c index d8efcfe1d4..99acdf4dea 100644 --- a/bfd/mach-o-i386.c +++ b/bfd/mach-o-i386.c @@ -42,13 +42,13 @@ bfd_mach_o_i386_core_p (bfd *abfd) BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_I386); } -static bfd_boolean +static bool bfd_mach_o_i386_mkobject (bfd *abfd) { bfd_mach_o_data_struct *mdata; if (!bfd_mach_o_mkobject_init (abfd)) - return FALSE; + return false; mdata = bfd_mach_o_get_data (abfd); mdata->header.magic = BFD_MACH_O_MH_MAGIC; @@ -57,61 +57,61 @@ bfd_mach_o_i386_mkobject (bfd *abfd) mdata->header.byteorder = BFD_ENDIAN_LITTLE; mdata->header.version = 1; - return TRUE; + return true; } static reloc_howto_type i386_howto_table[]= { /* 0 */ - HOWTO(BFD_RELOC_32, 0, 2, 32, FALSE, 0, + HOWTO(BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(BFD_RELOC_16, 0, 1, 16, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO(BFD_RELOC_16, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO(BFD_RELOC_8, 0, 0, 8, FALSE, 0, + false, 0xffff, 0xffff, false), + HOWTO(BFD_RELOC_8, 0, 0, 8, false, 0, complain_overflow_bitfield, NULL, "8", - FALSE, 0xff, 0xff, FALSE), - HOWTO(BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, + false, 0xff, 0xff, false), + HOWTO(BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "DISP32", - FALSE, 0xffffffff, 0xffffffff, TRUE), + false, 0xffffffff, 0xffffffff, true), /* 4 */ - HOWTO(BFD_RELOC_16_PCREL, 0, 1, 16, TRUE, 0, + HOWTO(BFD_RELOC_16_PCREL, 0, 1, 16, true, 0, complain_overflow_bitfield, NULL, "DISP16", - FALSE, 0xffff, 0xffff, TRUE), - HOWTO(BFD_RELOC_MACH_O_SECTDIFF, 0, 2, 32, FALSE, 0, + false, 0xffff, 0xffff, true), + HOWTO(BFD_RELOC_MACH_O_SECTDIFF, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "SECTDIFF_32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 2, 32, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO(BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "LSECTDIFF_32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(BFD_RELOC_MACH_O_PAIR, 0, 2, 32, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO(BFD_RELOC_MACH_O_PAIR, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "PAIR_32", - FALSE, 0xffffffff, 0xffffffff, FALSE), + false, 0xffffffff, 0xffffffff, false), /* 8 */ - HOWTO(BFD_RELOC_MACH_O_SECTDIFF, 0, 1, 16, FALSE, 0, + HOWTO(BFD_RELOC_MACH_O_SECTDIFF, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "SECTDIFF_16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO(BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 1, 16, FALSE, 0, + false, 0xffff, 0xffff, false), + HOWTO(BFD_RELOC_MACH_O_LOCAL_SECTDIFF, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "LSECTDIFF_16", - FALSE, 0xffff, 0xffff, FALSE), - HOWTO(BFD_RELOC_MACH_O_PAIR, 0, 1, 16, FALSE, 0, + false, 0xffff, 0xffff, false), + HOWTO(BFD_RELOC_MACH_O_PAIR, 0, 1, 16, false, 0, complain_overflow_bitfield, NULL, "PAIR_16", - FALSE, 0xffff, 0xffff, FALSE), + false, 0xffff, 0xffff, false), }; -static bfd_boolean +static bool bfd_mach_o_i386_canonicalize_one_reloc (bfd * abfd, struct mach_o_reloc_info_external * raw, arelent * res, @@ -121,7 +121,7 @@ bfd_mach_o_i386_canonicalize_one_reloc (bfd * abfd, bfd_mach_o_reloc_info reloc; if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms)) - return FALSE; + return false; if (reloc.r_scattered) { @@ -130,44 +130,44 @@ bfd_mach_o_i386_canonicalize_one_reloc (bfd * abfd, case BFD_MACH_O_GENERIC_RELOC_PAIR: /* PR 21813: Check for a corrupt PAIR reloc at the start. */ if (res == res_base) - return FALSE; + return false; if (reloc.r_length == 2) { res->howto = &i386_howto_table[7]; res->address = res[-1].address; - return TRUE; + return true; } else if (reloc.r_length == 1) { res->howto = &i386_howto_table[10]; res->address = res[-1].address; - return TRUE; + return true; } - return FALSE; + return false; case BFD_MACH_O_GENERIC_RELOC_SECTDIFF: if (reloc.r_length == 2) { res->howto = &i386_howto_table[5]; - return TRUE; + return true; } else if (reloc.r_length == 1) { res->howto = &i386_howto_table[8]; - return TRUE; + return true; } - return FALSE; + return false; case BFD_MACH_O_GENERIC_RELOC_LOCAL_SECTDIFF: if (reloc.r_length == 2) { res->howto = &i386_howto_table[6]; - return TRUE; + return true; } else if (reloc.r_length == 1) { res->howto = &i386_howto_table[9]; - return TRUE; + return true; } - return FALSE; + return false; default: break; } @@ -181,30 +181,30 @@ bfd_mach_o_i386_canonicalize_one_reloc (bfd * abfd, { case 0: /* len = 0, pcrel = 0 */ res->howto = &i386_howto_table[2]; - return TRUE; + return true; case 2: /* len = 1, pcrel = 0 */ res->howto = &i386_howto_table[1]; - return TRUE; + return true; case 3: /* len = 1, pcrel = 1 */ res->howto = &i386_howto_table[4]; - return TRUE; + return true; case 4: /* len = 2, pcrel = 0 */ res->howto = &i386_howto_table[0]; - return TRUE; + return true; case 5: /* len = 2, pcrel = 1 */ res->howto = &i386_howto_table[3]; - return TRUE; + return true; default: - return FALSE; + return false; } default: break; } } - return FALSE; + return false; } -static bfd_boolean +static bool bfd_mach_o_i386_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) { rinfo->r_address = rel->address; @@ -257,9 +257,9 @@ bfd_mach_o_i386_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) rinfo->r_value = rel->addend; break; default: - return FALSE; + return false; } - return TRUE; + return true; } static reloc_howto_type * @@ -281,7 +281,7 @@ bfd_mach_o_i386_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -static bfd_boolean +static bool bfd_mach_o_i386_print_thread (bfd *abfd, bfd_mach_o_thread_flavour *thread, void *vfile, char *buf) { @@ -291,7 +291,7 @@ bfd_mach_o_i386_print_thread (bfd *abfd, bfd_mach_o_thread_flavour *thread, { case BFD_MACH_O_x86_THREAD_STATE: if (thread->size < (8 + 16 * 4)) - return FALSE; + return false; fprintf (file, " x86_THREAD_STATE:\n"); fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n", (unsigned long)bfd_get_32 (abfd, buf + 0), @@ -316,18 +316,18 @@ bfd_mach_o_i386_print_thread (bfd *abfd, bfd_mach_o_thread_flavour *thread, (unsigned long)bfd_get_32 (abfd, buf + 60), (unsigned long)bfd_get_32 (abfd, buf + 64), (unsigned long)bfd_get_32 (abfd, buf + 68)); - return TRUE; + return true; case BFD_MACH_O_x86_FLOAT_STATE: if (thread->size < 8) - return FALSE; + return false; fprintf (file, " x86_FLOAT_STATE:\n"); fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n", (unsigned long)bfd_get_32 (abfd, buf + 0), (unsigned long)bfd_get_32 (abfd, buf + 4)); - return TRUE; + return true; case BFD_MACH_O_x86_EXCEPTION_STATE: if (thread->size < 8 + 3 * 4) - return FALSE; + return false; fprintf (file, " x86_EXCEPTION_STATE:\n"); fprintf (file, " flavor: 0x%08lx count: 0x%08lx\n", (unsigned long)bfd_get_32 (abfd, buf + 0), @@ -336,11 +336,11 @@ bfd_mach_o_i386_print_thread (bfd *abfd, bfd_mach_o_thread_flavour *thread, (unsigned long)bfd_get_32 (abfd, buf + 8), (unsigned long)bfd_get_32 (abfd, buf + 12), (unsigned long)bfd_get_32 (abfd, buf + 16)); - return TRUE; + return true; default: break; } - return FALSE; + return false; } static const mach_o_section_name_xlat text_section_names_xlat[] = diff --git a/bfd/mach-o-x86-64.c b/bfd/mach-o-x86-64.c index b8d485a3fd..84a6c06342 100644 --- a/bfd/mach-o-x86-64.c +++ b/bfd/mach-o-x86-64.c @@ -42,13 +42,13 @@ bfd_mach_o_x86_64_core_p (bfd *abfd) BFD_MACH_O_MH_CORE, BFD_MACH_O_CPU_TYPE_X86_64); } -static bfd_boolean +static bool bfd_mach_o_x86_64_mkobject (bfd *abfd) { bfd_mach_o_data_struct *mdata; if (!bfd_mach_o_mkobject_init (abfd)) - return FALSE; + return false; mdata = bfd_mach_o_get_data (abfd); mdata->header.magic = BFD_MACH_O_MH_MAGIC_64; @@ -58,7 +58,7 @@ bfd_mach_o_x86_64_mkobject (bfd *abfd) mdata->header.byteorder = BFD_ENDIAN_LITTLE; mdata->header.version = 2; - return TRUE; + return true; } /* In case we're on a 32-bit machine, construct a 64-bit "-1" value. */ @@ -67,64 +67,64 @@ bfd_mach_o_x86_64_mkobject (bfd *abfd) static reloc_howto_type x86_64_howto_table[]= { /* 0 */ - HOWTO(BFD_RELOC_64, 0, 4, 64, FALSE, 0, + HOWTO(BFD_RELOC_64, 0, 4, 64, false, 0, complain_overflow_bitfield, NULL, "64", - FALSE, MINUS_ONE, MINUS_ONE, FALSE), - HOWTO(BFD_RELOC_32, 0, 2, 32, FALSE, 0, + false, MINUS_ONE, MINUS_ONE, false), + HOWTO(BFD_RELOC_32, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(BFD_RELOC_32_PCREL, 0, 2, 32, TRUE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO(BFD_RELOC_32_PCREL, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "DISP32", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_1, 0, 2, 32, TRUE, 0, + false, 0xffffffff, 0xffffffff, true), + HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_1, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "DISP32_1", - FALSE, 0xffffffff, 0xffffffff, TRUE), + false, 0xffffffff, 0xffffffff, true), /* 4 */ - HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_2, 0, 2, 32, TRUE, 0, + HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_2, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "DISP32_2", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_4, 0, 2, 32, TRUE, 0, + false, 0xffffffff, 0xffffffff, true), + HOWTO(BFD_RELOC_MACH_O_X86_64_PCREL32_4, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "DISP32_4", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(BFD_RELOC_MACH_O_X86_64_BRANCH32, 0, 2, 32, TRUE, 0, + false, 0xffffffff, 0xffffffff, true), + HOWTO(BFD_RELOC_MACH_O_X86_64_BRANCH32, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "BRANCH32", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(BFD_RELOC_MACH_O_X86_64_GOT_LOAD, 0, 2, 32, TRUE, 0, + false, 0xffffffff, 0xffffffff, true), + HOWTO(BFD_RELOC_MACH_O_X86_64_GOT_LOAD, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "GOT_LOAD", - FALSE, 0xffffffff, 0xffffffff, TRUE), + false, 0xffffffff, 0xffffffff, true), /* 8 */ - HOWTO(BFD_RELOC_MACH_O_SUBTRACTOR32, 0, 2, 32, FALSE, 0, + HOWTO(BFD_RELOC_MACH_O_SUBTRACTOR32, 0, 2, 32, false, 0, complain_overflow_bitfield, NULL, "SUBTRACTOR32", - FALSE, 0xffffffff, 0xffffffff, FALSE), - HOWTO(BFD_RELOC_MACH_O_SUBTRACTOR64, 0, 4, 64, FALSE, 0, + false, 0xffffffff, 0xffffffff, false), + HOWTO(BFD_RELOC_MACH_O_SUBTRACTOR64, 0, 4, 64, false, 0, complain_overflow_bitfield, NULL, "SUBTRACTOR64", - FALSE, MINUS_ONE, MINUS_ONE, FALSE), - HOWTO(BFD_RELOC_MACH_O_X86_64_GOT, 0, 2, 32, TRUE, 0, + false, MINUS_ONE, MINUS_ONE, false), + HOWTO(BFD_RELOC_MACH_O_X86_64_GOT, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "GOT", - FALSE, 0xffffffff, 0xffffffff, TRUE), - HOWTO(BFD_RELOC_MACH_O_X86_64_BRANCH8, 0, 0, 8, TRUE, 0, + false, 0xffffffff, 0xffffffff, true), + HOWTO(BFD_RELOC_MACH_O_X86_64_BRANCH8, 0, 0, 8, true, 0, complain_overflow_bitfield, NULL, "BRANCH8", - FALSE, 0xff, 0xff, TRUE), + false, 0xff, 0xff, true), /* 12 */ - HOWTO(BFD_RELOC_MACH_O_X86_64_TLV, 0, 2, 32, TRUE, 0, + HOWTO(BFD_RELOC_MACH_O_X86_64_TLV, 0, 2, 32, true, 0, complain_overflow_bitfield, NULL, "TLV", - FALSE, 0xffffffff, 0xffffffff, TRUE), + false, 0xffffffff, 0xffffffff, true), }; -static bfd_boolean +static bool bfd_mach_o_x86_64_canonicalize_one_reloc (bfd * abfd, struct mach_o_reloc_info_external * raw, arelent * res, @@ -134,111 +134,111 @@ bfd_mach_o_x86_64_canonicalize_one_reloc (bfd * abfd, bfd_mach_o_reloc_info reloc; if (!bfd_mach_o_pre_canonicalize_one_reloc (abfd, raw, &reloc, res, syms)) - return FALSE; + return false; /* On x86-64, scattered relocs are not used. */ if (reloc.r_scattered) - return FALSE; + return false; switch (reloc.r_type) { case BFD_MACH_O_X86_64_RELOC_UNSIGNED: if (reloc.r_pcrel) - return FALSE; + return false; switch (reloc.r_length) { case 2: res->howto = &x86_64_howto_table[1]; - return TRUE; + return true; case 3: res->howto = &x86_64_howto_table[0]; - return TRUE; + return true; default: - return FALSE; + return false; } case BFD_MACH_O_X86_64_RELOC_SIGNED: if (reloc.r_length == 2 && reloc.r_pcrel) { res->howto = &x86_64_howto_table[2]; - return TRUE; + return true; } break; case BFD_MACH_O_X86_64_RELOC_BRANCH: if (!reloc.r_pcrel) - return FALSE; + return false; switch (reloc.r_length) { case 2: res->howto = &x86_64_howto_table[6]; - return TRUE; + return true; default: - return FALSE; + return false; } break; case BFD_MACH_O_X86_64_RELOC_GOT_LOAD: if (reloc.r_length == 2 && reloc.r_pcrel && reloc.r_extern) { res->howto = &x86_64_howto_table[7]; - return TRUE; + return true; } break; case BFD_MACH_O_X86_64_RELOC_GOT: if (reloc.r_length == 2 && reloc.r_pcrel && reloc.r_extern) { res->howto = &x86_64_howto_table[10]; - return TRUE; + return true; } break; case BFD_MACH_O_X86_64_RELOC_SUBTRACTOR: if (reloc.r_pcrel) - return FALSE; + return false; switch (reloc.r_length) { case 2: res->howto = &x86_64_howto_table[8]; - return TRUE; + return true; case 3: res->howto = &x86_64_howto_table[9]; - return TRUE; + return true; default: - return FALSE; + return false; } break; case BFD_MACH_O_X86_64_RELOC_SIGNED_1: if (reloc.r_length == 2 && reloc.r_pcrel) { res->howto = &x86_64_howto_table[3]; - return TRUE; + return true; } break; case BFD_MACH_O_X86_64_RELOC_SIGNED_2: if (reloc.r_length == 2 && reloc.r_pcrel) { res->howto = &x86_64_howto_table[4]; - return TRUE; + return true; } break; case BFD_MACH_O_X86_64_RELOC_SIGNED_4: if (reloc.r_length == 2 && reloc.r_pcrel) { res->howto = &x86_64_howto_table[5]; - return TRUE; + return true; } break; case BFD_MACH_O_X86_64_RELOC_TLV: if (reloc.r_length == 2 && reloc.r_pcrel && reloc.r_extern) { res->howto = &x86_64_howto_table[12]; - return TRUE; + return true; } break; default: - return FALSE; + return false; } - return FALSE; + return false; } -static bfd_boolean +static bool bfd_mach_o_x86_64_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) { rinfo->r_address = rel->address; @@ -306,7 +306,7 @@ bfd_mach_o_x86_64_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) rinfo->r_length = 2; break; default: - return FALSE; + return false; } if ((*rel->sym_ptr_ptr)->flags & BSF_SECTION_SYM) { @@ -319,7 +319,7 @@ bfd_mach_o_x86_64_swap_reloc_out (arelent *rel, bfd_mach_o_reloc_info *rinfo) rinfo->r_extern = 1; rinfo->r_value = (*rel->sym_ptr_ptr)->udata.i; } - return TRUE; + return true; } static reloc_howto_type * @@ -343,14 +343,14 @@ bfd_mach_o_x86_64_bfd_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED, return NULL; } -static bfd_boolean +static bool bfd_mach_o_section_type_valid_for_x86_64 (unsigned long val) { if (val == BFD_MACH_O_S_NON_LAZY_SYMBOL_POINTERS || val == BFD_MACH_O_S_LAZY_SYMBOL_POINTERS || val == BFD_MACH_O_S_SYMBOL_STUBS) - return FALSE; - return TRUE; + return false; + return true; } /* We want to bump the alignment of some sections. */ diff --git a/bfd/mach-o.c b/bfd/mach-o.c index 695b15811c..60121c4ef4 100644 --- a/bfd/mach-o.c +++ b/bfd/mach-o.c @@ -38,7 +38,7 @@ #define FILE_ALIGN(off, algn) \ (((off) + ((file_ptr) 1 << (algn)) - 1) & ((file_ptr) -1U << (algn))) -static bfd_boolean +static bool bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd); unsigned int @@ -52,36 +52,36 @@ bfd_mach_o_version (bfd *abfd) return mdata->header.version; } -bfd_boolean +bool bfd_mach_o_valid (bfd *abfd) { if (abfd == NULL || abfd->xvec == NULL) - return FALSE; + return false; if (abfd->xvec->flavour != bfd_target_mach_o_flavour) - return FALSE; + return false; if (bfd_mach_o_get_data (abfd) == NULL) - return FALSE; - return TRUE; + return false; + return true; } -static INLINE bfd_boolean +static INLINE bool mach_o_wide_p (bfd_mach_o_header *header) { switch (header->version) { case 1: - return FALSE; + return false; case 2: - return TRUE; + return true; default: BFD_FAIL (); - return FALSE; + return false; } } -static INLINE bfd_boolean +static INLINE bool bfd_mach_o_wide_p (bfd *abfd) { return mach_o_wide_p (&bfd_mach_o_get_data (abfd)->header); @@ -551,7 +551,7 @@ bfd_mach_o_append_command (bfd *abfd, bfd_mach_o_load_command *cmd) /* Copy any private info we understand from the input symbol to the output symbol. */ -bfd_boolean +bool bfd_mach_o_bfd_copy_private_symbol_data (bfd *ibfd ATTRIBUTE_UNUSED, asymbol *isymbol, bfd *obfd ATTRIBUTE_UNUSED, @@ -566,13 +566,13 @@ bfd_mach_o_bfd_copy_private_symbol_data (bfd *ibfd ATTRIBUTE_UNUSED, os->n_desc = is->n_desc; os->symbol.udata.i = is->symbol.udata.i; - return TRUE; + return true; } /* Copy any private info we understand from the input section to the output section. */ -bfd_boolean +bool bfd_mach_o_bfd_copy_private_section_data (bfd *ibfd, asection *isection, bfd *obfd, asection *osection) { @@ -581,7 +581,7 @@ bfd_mach_o_bfd_copy_private_section_data (bfd *ibfd, asection *isection, if (ibfd->xvec->flavour != bfd_target_mach_o_flavour || obfd->xvec->flavour != bfd_target_mach_o_flavour) - return TRUE; + return true; BFD_ASSERT (is != NULL && os != NULL); @@ -590,7 +590,7 @@ bfd_mach_o_bfd_copy_private_section_data (bfd *ibfd, asection *isection, os->reserved2 = is->reserved2; os->reserved3 = is->reserved3; - return TRUE; + return true; } static const char * @@ -688,7 +688,7 @@ cpusubtype (unsigned long cpu_type, unsigned long cpu_subtype, char *buffer) return buffer; } -bfd_boolean +bool bfd_mach_o_bfd_print_private_bfd_data (bfd *abfd, void *ptr) { FILE * file = (FILE *) ptr; @@ -707,13 +707,13 @@ bfd_mach_o_bfd_print_private_bfd_data (bfd *abfd, void *ptr) fprintf (file, _(" flags: %#lx\n"), (long) mdata->header.flags); fprintf (file, _(" version: %x\n"), mdata->header.version); - return TRUE; + return true; } /* Copy any private info we understand from the input bfd to the output bfd. */ -bfd_boolean +bool bfd_mach_o_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd) { bfd_mach_o_data_struct *imdata; @@ -722,7 +722,7 @@ bfd_mach_o_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd) if (bfd_get_flavour (ibfd) != bfd_target_mach_o_flavour || bfd_get_flavour (obfd) != bfd_target_mach_o_flavour) - return TRUE; + return true; BFD_ASSERT (bfd_mach_o_valid (ibfd)); BFD_ASSERT (bfd_mach_o_valid (obfd)); @@ -761,7 +761,7 @@ bfd_mach_o_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd) /* Command is copied. */ ocmd = bfd_alloc (obfd, sizeof (bfd_mach_o_load_command)); if (ocmd == NULL) - return FALSE; + return false; /* Copy common fields. */ ocmd->type = icmd->type; @@ -849,23 +849,23 @@ bfd_mach_o_bfd_copy_private_header_data (bfd *ibfd, bfd *obfd) bfd_mach_o_append_command (obfd, ocmd); } - return TRUE; + return true; } /* This allows us to set up to 32 bits of flags (unless we invent some fiendish scheme to subdivide). For now, we'll just set the file flags without error checking - just overwrite. */ -bfd_boolean +bool bfd_mach_o_bfd_set_private_flags (bfd *abfd, flagword flags) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); if (!mdata) - return FALSE; + return false; mdata->header.flags = flags; - return TRUE; + return true; } /* Count the total number of symbols. */ @@ -1239,7 +1239,7 @@ bfd_mach_o_pad_command (bfd *abfd, unsigned int len) return 0; } -static bfd_boolean +static bool bfd_mach_o_write_header (bfd *abfd, bfd_mach_o_header *header) { struct mach_o_header_external raw; @@ -1261,12 +1261,12 @@ bfd_mach_o_write_header (bfd *abfd, bfd_mach_o_header *header) if (bfd_seek (abfd, 0, SEEK_SET) != 0 || bfd_bwrite (&raw, size, abfd) != size) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_thread (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_thread_command *cmd = &command->command.thread; @@ -1289,15 +1289,15 @@ bfd_mach_o_write_thread (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; offset += cmd->flavours[i].size + sizeof (raw); } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_dylinker (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dylinker_command *cmd = &command->command.dylinker; @@ -1308,19 +1308,19 @@ bfd_mach_o_write_dylinker (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; namelen = strlen (cmd->name_str) + 1; if (bfd_bwrite (cmd->name_str, namelen, abfd) != namelen) - return FALSE; + return false; if (bfd_mach_o_pad_command (abfd, namelen) < 0) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_dylib (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dylib_command *cmd = &command->command.dylib; @@ -1334,19 +1334,19 @@ bfd_mach_o_write_dylib (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; namelen = strlen (cmd->name_str) + 1; if (bfd_bwrite (cmd->name_str, namelen, abfd) != namelen) - return FALSE; + return false; if (bfd_mach_o_pad_command (abfd, namelen) < 0) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_main (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_main_command *cmd = &command->command.main; @@ -1357,12 +1357,12 @@ bfd_mach_o_write_main (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_dyld_info (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dyld_info_command *cmd = &command->command.dyld_info; @@ -1381,39 +1381,39 @@ bfd_mach_o_write_dyld_info (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; if (cmd->rebase_size != 0) if (bfd_seek (abfd, cmd->rebase_off, SEEK_SET) != 0 || (bfd_bwrite (cmd->rebase_content, cmd->rebase_size, abfd) != cmd->rebase_size)) - return FALSE; + return false; if (cmd->bind_size != 0) if (bfd_seek (abfd, cmd->bind_off, SEEK_SET) != 0 || (bfd_bwrite (cmd->bind_content, cmd->bind_size, abfd) != cmd->bind_size)) - return FALSE; + return false; if (cmd->weak_bind_size != 0) if (bfd_seek (abfd, cmd->weak_bind_off, SEEK_SET) != 0 || (bfd_bwrite (cmd->weak_bind_content, cmd->weak_bind_size, abfd) != cmd->weak_bind_size)) - return FALSE; + return false; if (cmd->lazy_bind_size != 0) if (bfd_seek (abfd, cmd->lazy_bind_off, SEEK_SET) != 0 || (bfd_bwrite (cmd->lazy_bind_content, cmd->lazy_bind_size, abfd) != cmd->lazy_bind_size)) - return FALSE; + return false; if (cmd->export_size != 0) if (bfd_seek (abfd, cmd->export_off, SEEK_SET) != 0 || (bfd_bwrite (cmd->export_content, cmd->export_size, abfd) != cmd->export_size)) - return FALSE; + return false; - return TRUE; + return true; } long @@ -1461,7 +1461,7 @@ bfd_mach_o_swap_in_non_scattered_reloc (bfd *abfd, bfd_mach_o_reloc_info *rel, /* Set syms_ptr_ptr and addend of RES. */ -bfd_boolean +bool bfd_mach_o_canonicalize_non_scattered_reloc (bfd *abfd, bfd_mach_o_reloc_info *reloc, arelent *res, asymbol **syms) @@ -1503,7 +1503,7 @@ bfd_mach_o_canonicalize_non_scattered_reloc (bfd *abfd, { _bfd_error_handler (_("\ malformed mach-o reloc: section index is greater than the number of sections")); - return FALSE; + return false; } /* A section number. */ @@ -1524,7 +1524,7 @@ malformed mach-o reloc: section index is greater than the number of sections")); the PPC swap_reloc_in routine. */ res->sym_ptr_ptr = sym; - return TRUE; + return true; } /* Do most of the work for canonicalize_relocs on RAW: create internal @@ -1535,7 +1535,7 @@ malformed mach-o reloc: section index is greater than the number of sections")); (like arm64) don't follow the generic rules (symnum is a value for the non-scattered relocation ADDEND). */ -bfd_boolean +bool bfd_mach_o_pre_canonicalize_one_reloc (bfd *abfd, struct mach_o_reloc_info_external *raw, bfd_mach_o_reloc_info *reloc, @@ -1595,14 +1595,14 @@ bfd_mach_o_pre_canonicalize_one_reloc (bfd *abfd, if (!bfd_mach_o_canonicalize_non_scattered_reloc (abfd, reloc, res, syms)) - return FALSE; + return false; } /* We have set up a reloc with all the information present, so the swapper can modify address, value and addend fields, if necessary, to convey information in the generic BFD reloc that is mach-o specific. */ - return TRUE; + return true; } static int @@ -1804,7 +1804,7 @@ bfd_mach_o_swap_out_non_scattered_reloc (bfd *abfd, unsigned char *fields, fields[3] = info; } -static bfd_boolean +static bool bfd_mach_o_write_relocs (bfd *abfd, bfd_mach_o_section *section) { unsigned int i; @@ -1814,13 +1814,13 @@ bfd_mach_o_write_relocs (bfd *abfd, bfd_mach_o_section *section) sec = section->bfdsection; if (sec->reloc_count == 0) - return TRUE; + return true; if (bed->_bfd_mach_o_swap_reloc_out == NULL) - return TRUE; + return true; if (bfd_seek (abfd, section->reloff, SEEK_SET) != 0) - return FALSE; + return false; /* Convert and write. */ entries = section->bfdsection->orelocation; @@ -1832,7 +1832,7 @@ bfd_mach_o_write_relocs (bfd *abfd, bfd_mach_o_section *section) /* Convert relocation to an intermediate representation. */ if (!(*bed->_bfd_mach_o_swap_reloc_out) (rel, pinfo)) - return FALSE; + return false; /* Lower the relocation info. */ if (pinfo->r_scattered) @@ -1857,12 +1857,12 @@ bfd_mach_o_write_relocs (bfd *abfd, bfd_mach_o_section *section) if (bfd_bwrite (&raw, BFD_MACH_O_RELENT_SIZE, abfd) != BFD_MACH_O_RELENT_SIZE) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_section_32 (bfd *abfd, bfd_mach_o_section *section) { struct mach_o_section_32_external raw; @@ -1881,12 +1881,12 @@ bfd_mach_o_write_section_32 (bfd *abfd, bfd_mach_o_section *section) if (bfd_bwrite (&raw, BFD_MACH_O_SECTION_SIZE, abfd) != BFD_MACH_O_SECTION_SIZE) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_section_64 (bfd *abfd, bfd_mach_o_section *section) { struct mach_o_section_64_external raw; @@ -1906,12 +1906,12 @@ bfd_mach_o_write_section_64 (bfd *abfd, bfd_mach_o_section *section) if (bfd_bwrite (&raw, BFD_MACH_O_SECTION_64_SIZE, abfd) != BFD_MACH_O_SECTION_64_SIZE) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) { struct mach_o_segment_command_32_external raw; @@ -1922,7 +1922,7 @@ bfd_mach_o_write_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) for (sec = seg->sect_head; sec != NULL; sec = sec->next) if (!bfd_mach_o_write_relocs (abfd, sec)) - return FALSE; + return false; memcpy (raw.segname, seg->segname, 16); bfd_h_put_32 (abfd, seg->vmaddr, raw.vmaddr); @@ -1936,16 +1936,16 @@ bfd_mach_o_write_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; for (sec = seg->sect_head; sec != NULL; sec = sec->next) if (!bfd_mach_o_write_section_32 (abfd, sec)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) { struct mach_o_segment_command_64_external raw; @@ -1956,7 +1956,7 @@ bfd_mach_o_write_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) for (sec = seg->sect_head; sec != NULL; sec = sec->next) if (!bfd_mach_o_write_relocs (abfd, sec)) - return FALSE; + return false; memcpy (raw.segname, seg->segname, 16); bfd_h_put_64 (abfd, seg->vmaddr, raw.vmaddr); @@ -1970,16 +1970,16 @@ bfd_mach_o_write_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; for (sec = seg->sect_head; sec != NULL; sec = sec->next) if (!bfd_mach_o_write_section_64 (abfd, sec)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -1991,17 +1991,17 @@ bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym) /* Write the symbols first. */ if (bfd_seek (abfd, sym->symoff, SEEK_SET) != 0) - return FALSE; + return false; strtab = _bfd_stringtab_init (); if (strtab == NULL) - return FALSE; + return false; if (sym->nsyms > 0) /* Although we don't strictly need to do this, for compatibility with Darwin system tools, actually output an empty string for the index 0 entry. */ - _bfd_stringtab_add (strtab, "", TRUE, FALSE); + _bfd_stringtab_add (strtab, "", true, false); for (i = 0; i < sym->nsyms; i++) { @@ -2013,7 +2013,7 @@ bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym) str_index = 0; else { - str_index = _bfd_stringtab_add (strtab, s->symbol.name, TRUE, FALSE); + str_index = _bfd_stringtab_add (strtab, s->symbol.name, true, false); if (str_index == (bfd_size_type) -1) goto err; @@ -2061,19 +2061,19 @@ bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym) /* Pad string table. */ padlen = bfd_mach_o_pad4 (abfd, sym->strsize); if (padlen < 0) - return FALSE; + return false; mdata->filelen += padlen; sym->strsize += padlen; - return TRUE; + return true; err: _bfd_stringtab_free (strtab); sym->strsize = 0; - return FALSE; + return false; } -static bfd_boolean +static bool bfd_mach_o_write_symtab (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_symtab_command *sym = &command->command.symtab; @@ -2089,9 +2089,9 @@ bfd_mach_o_write_symtab (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0 || bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; - return TRUE; + return true; } /* Count the number of indirect symbols in the image. @@ -2123,7 +2123,7 @@ bfd_mach_o_count_indirect_symbols (bfd *abfd, bfd_mach_o_data_struct *mdata) /* Create the dysymtab. */ -static bfd_boolean +static bool bfd_mach_o_build_dysymtab (bfd *abfd, bfd_mach_o_dysymtab_command *cmd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -2137,7 +2137,7 @@ bfd_mach_o_build_dysymtab (bfd *abfd, bfd_mach_o_dysymtab_command *cmd) { _bfd_error_handler (_("sorry: modtab, toc and extrefsyms are not yet" " implemented for dysymtab commands.")); - return FALSE; + return false; } cmd->ilocalsym = 0; @@ -2187,12 +2187,12 @@ bfd_mach_o_build_dysymtab (bfd *abfd, bfd_mach_o_dysymtab_command *cmd) mdata->filelen = FILE_ALIGN (mdata->filelen, 2); cmd->indirectsymoff = mdata->filelen; if (_bfd_mul_overflow (cmd->nindirectsyms, 4, &amt)) - return FALSE; + return false; mdata->filelen += amt; cmd->indirect_syms = bfd_zalloc (abfd, amt); if (cmd->indirect_syms == NULL) - return FALSE; + return false; n = 0; for (i = 0; i < mdata->nsects; ++i) @@ -2232,13 +2232,13 @@ bfd_mach_o_build_dysymtab (bfd *abfd, bfd_mach_o_dysymtab_command *cmd) } } - return TRUE; + return true; } /* Write a dysymtab command. TODO: Possibly coalesce writes of smaller objects. */ -static bfd_boolean +static bool bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dysymtab_command *cmd = &command->command.dysymtab; @@ -2250,7 +2250,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) unsigned int i; if (bfd_seek (abfd, cmd->modtaboff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->nmodtab; i++) { @@ -2285,7 +2285,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) &w.objc_module_info_size); if (bfd_bwrite ((void *) &w, sizeof (w), abfd) != sizeof (w)) - return FALSE; + return false; } else { @@ -2308,7 +2308,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) &n.objc_module_info_size); if (bfd_bwrite ((void *) &n, sizeof (n), abfd) != sizeof (n)) - return FALSE; + return false; } } } @@ -2318,7 +2318,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) unsigned int i; if (bfd_seek (abfd, cmd->tocoff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->ntoc; i++) { @@ -2329,7 +2329,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) bfd_h_put_32 (abfd, toc->module_index, &raw.module_index); if (bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; } } @@ -2338,7 +2338,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) unsigned int i; if (bfd_seek (abfd, cmd->indirectsymoff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->nindirectsyms; ++i) { @@ -2346,7 +2346,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) bfd_h_put_32 (abfd, cmd->indirect_syms[i], &raw); if (bfd_bwrite (raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; } } @@ -2355,7 +2355,7 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) unsigned int i; if (bfd_seek (abfd, cmd->extrefsymoff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->nextrefsyms; i++) { @@ -2379,13 +2379,13 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) bfd_h_put_32 (abfd, v, raw); if (bfd_bwrite (raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; } } /* The command. */ if (bfd_seek (abfd, command->offset + BFD_MACH_O_LC_SIZE, SEEK_SET) != 0) - return FALSE; + return false; else { struct mach_o_dysymtab_command_external raw; @@ -2410,10 +2410,10 @@ bfd_mach_o_write_dysymtab (bfd *abfd, bfd_mach_o_load_command *command) bfd_h_put_32 (abfd, cmd->nlocrel, &raw.nlocrel); if (bfd_bwrite (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; } - return TRUE; + return true; } static unsigned @@ -2488,14 +2488,14 @@ bfd_mach_o_cf_symbols (const void *a, const void *b) (by name) */ -static bfd_boolean +static bool bfd_mach_o_mangle_symbols (bfd *abfd) { unsigned long i; asymbol **symbols = bfd_get_outsymbols (abfd); if (symbols == NULL || bfd_get_symcount (abfd) == 0) - return TRUE; + return true; for (i = 0; i < bfd_get_symcount (abfd); i++) { @@ -2558,13 +2558,13 @@ bfd_mach_o_mangle_symbols (bfd *abfd) s->symbol.udata.i = i; /* renumber. */ } - return TRUE; + return true; } /* We build a flat table of sections, which can be re-ordered if necessary. Fill in the section number and other mach-o-specific data. */ -static bfd_boolean +static bool bfd_mach_o_mangle_sections (bfd *abfd, bfd_mach_o_data_struct *mdata) { asection *sec; @@ -2578,21 +2578,21 @@ bfd_mach_o_mangle_sections (bfd *abfd, bfd_mach_o_data_struct *mdata) doing. */ if (mdata->nsects == nsect && (mdata->nsects == 0 || mdata->sections != NULL)) - return TRUE; + return true; /* We need to check that this can be done... */ if (nsect > 255) { _bfd_error_handler (_("mach-o: there are too many sections (%u)" " maximum is 255,\n"), nsect); - return FALSE; + return false; } mdata->nsects = nsect; amt = mdata->nsects * sizeof (bfd_mach_o_section *); mdata->sections = bfd_alloc (abfd, amt); if (mdata->sections == NULL) - return FALSE; + return false; /* Create Mach-O sections. Section type, attribute and align should have been set when the @@ -2616,10 +2616,10 @@ bfd_mach_o_mangle_sections (bfd *abfd, bfd_mach_o_data_struct *mdata) sec->target_index = ++target_index; } - return TRUE; + return true; } -bfd_boolean +bool bfd_mach_o_write_contents (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -2630,12 +2630,12 @@ bfd_mach_o_write_contents (bfd *abfd) /* Make the commands, if not already present. */ if (!abfd->output_has_begun && !bfd_mach_o_build_commands (abfd)) - return FALSE; - abfd->output_has_begun = TRUE; + return false; + abfd->output_has_begun = true; /* Write the header. */ if (!bfd_mach_o_write_header (abfd, &mdata->header)) - return FALSE; + return false; /* First pass: allocate the linkedit segment. */ for (cmd = mdata->first_command; cmd != NULL; cmd = cmd->next) @@ -2718,12 +2718,12 @@ bfd_mach_o_write_contents (bfd *abfd) /* Build the dysymtab. */ if (dysymtab != NULL) if (!bfd_mach_o_build_dysymtab (abfd, dysymtab)) - return FALSE; + return false; /* Write symtab and strtab. */ if (symtab != NULL) if (!bfd_mach_o_write_symtab_content (abfd, symtab)) - return FALSE; + return false; /* Adjust linkedit size. */ if (linkedit != NULL) @@ -2752,56 +2752,56 @@ bfd_mach_o_write_contents (bfd *abfd) if (bfd_seek (abfd, cmd->offset, SEEK_SET) != 0 || bfd_bwrite (&raw, BFD_MACH_O_LC_SIZE, abfd) != 8) - return FALSE; + return false; switch (cmd->type) { case BFD_MACH_O_LC_SEGMENT: if (!bfd_mach_o_write_segment_32 (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_SEGMENT_64: if (!bfd_mach_o_write_segment_64 (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_SYMTAB: if (!bfd_mach_o_write_symtab (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_DYSYMTAB: if (!bfd_mach_o_write_dysymtab (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_THREAD: case BFD_MACH_O_LC_UNIXTHREAD: if (!bfd_mach_o_write_thread (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_LOAD_DYLIB: if (!bfd_mach_o_write_dylib (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_LOAD_DYLINKER: if (!bfd_mach_o_write_dylinker (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_MAIN: if (!bfd_mach_o_write_main (abfd, cmd)) - return FALSE; + return false; break; case BFD_MACH_O_LC_DYLD_INFO: if (!bfd_mach_o_write_dyld_info (abfd, cmd)) - return FALSE; + return false; break; default: _bfd_error_handler (_("unable to write unknown load command %#x"), cmd->type); - return FALSE; + return false; } } - return TRUE; + return true; } static void @@ -2838,7 +2838,7 @@ bfd_mach_o_set_section_flags_from_bfd (bfd *abfd ATTRIBUTE_UNUSED, s->flags = BFD_MACH_O_S_REGULAR; } -static bfd_boolean +static bool bfd_mach_o_build_obj_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -2943,10 +2943,10 @@ bfd_mach_o_build_obj_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg) mdata->filelen += sec->reloc_count * BFD_MACH_O_RELENT_SIZE; } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_build_exec_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -2982,7 +2982,7 @@ bfd_mach_o_build_exec_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg) (_("section address (%#" PRIx64 ") " "below start of segment (%#" PRIx64 ")"), (uint64_t) s->addr, (uint64_t) vma); - return FALSE; + return false; } vma = s->addr + s->size; @@ -3038,7 +3038,7 @@ bfd_mach_o_build_exec_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg) /* Relocs shouldn't appear in non-object files. */ if (s->bfdsection->reloc_count != 0) - return FALSE; + return false; } /* Set maxprot. */ @@ -3053,13 +3053,13 @@ bfd_mach_o_build_exec_seg_command (bfd *abfd, bfd_mach_o_segment_command *seg) seg->filesize = (seg->filesize + pagemask) & ~pagemask; mdata->filelen = (mdata->filelen + pagemask) & ~pagemask; - return TRUE; + return true; } /* Layout the commands: set commands size and offset, set ncmds and sizeofcmds fields in header. */ -static bfd_boolean +static bool bfd_mach_o_layout_commands (bfd_mach_o_data_struct *mdata) { unsigned wide = mach_o_wide_p (&mdata->header); @@ -3067,7 +3067,7 @@ bfd_mach_o_layout_commands (bfd_mach_o_data_struct *mdata) ufile_ptr offset; bfd_mach_o_load_command *cmd; unsigned int align; - bfd_boolean ret = TRUE; + bool ret = true; hdrlen = wide ? BFD_MACH_O_HEADER_64_SIZE : BFD_MACH_O_HEADER_SIZE; align = wide ? 8 - 1 : 4 - 1; @@ -3123,7 +3123,7 @@ bfd_mach_o_layout_commands (bfd_mach_o_data_struct *mdata) _bfd_error_handler (_("unable to layout unknown load command %#x"), cmd->type); - ret = FALSE; + ret = false; break; } @@ -3149,7 +3149,7 @@ bfd_mach_o_init_segment (bfd_mach_o_data_struct *mdata, /* Init segment command. */ cmd->type = wide ? BFD_MACH_O_LC_SEGMENT_64 : BFD_MACH_O_LC_SEGMENT; - cmd->type_required = FALSE; + cmd->type_required = false; strcpy (seg->segname, segname); seg->nsects = nbr_sect; @@ -3170,7 +3170,7 @@ bfd_mach_o_init_segment (bfd_mach_o_data_struct *mdata, TODO: Other file formats, rebuilding symtab/dysymtab commands for strip and copy functionality. */ -bfd_boolean +bool bfd_mach_o_build_commands (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -3185,7 +3185,7 @@ bfd_mach_o_build_commands (bfd *abfd) /* Return now if already built. */ if (mdata->header.ncmds != 0) - return TRUE; + return true; /* Fill in the file type, if not already set. */ if (mdata->header.filetype == 0) @@ -3203,12 +3203,12 @@ bfd_mach_o_build_commands (bfd *abfd) since that depends on properly numbered sections. */ if (mdata->nsects == 0 || mdata->sections == NULL) if (! bfd_mach_o_mangle_sections (abfd, mdata)) - return FALSE; + return false; /* Order the symbol table, fill-in/check mach-o specific fields and partition out any indirect symbols. */ if (!bfd_mach_o_mangle_symbols (abfd)) - return FALSE; + return false; /* Segment commands. */ if (mdata->header.filetype == BFD_MACH_O_MH_OBJECT) @@ -3274,7 +3274,7 @@ bfd_mach_o_build_commands (bfd *abfd) /* Create commands for segments (and symtabs), prepend them. */ commands = bfd_zalloc (abfd, nbr_commands * sizeof (bfd_mach_o_load_command)); if (commands == NULL) - return FALSE; + return false; for (i = 0; i < nbr_commands - 1; i++) commands[i].next = &commands[i + 1]; commands[nbr_commands - 1].next = mdata->first_command; @@ -3325,7 +3325,7 @@ bfd_mach_o_build_commands (bfd *abfd) bfd_mach_o_load_command *cmd = &commands[symtab_idx]; cmd->type = BFD_MACH_O_LC_SYMTAB; - cmd->type_required = FALSE; + cmd->type_required = false; } /* If required, setup symtab command, see comment above about the quality @@ -3335,7 +3335,7 @@ bfd_mach_o_build_commands (bfd *abfd) bfd_mach_o_load_command *cmd = &commands[dysymtab_idx]; cmd->type = BFD_MACH_O_LC_DYSYMTAB; - cmd->type_required = FALSE; + cmd->type_required = false; } /* Create the main command. */ @@ -3344,7 +3344,7 @@ bfd_mach_o_build_commands (bfd *abfd) bfd_mach_o_load_command *cmd = &commands[main_idx]; cmd->type = BFD_MACH_O_LC_MAIN; - cmd->type_required = TRUE; + cmd->type_required = true; cmd->command.main.entryoff = 0; cmd->command.main.stacksize = 0; @@ -3352,7 +3352,7 @@ bfd_mach_o_build_commands (bfd *abfd) /* Layout commands. */ if (! bfd_mach_o_layout_commands (mdata)) - return FALSE; + return false; /* So, now we have sized the commands and the filelen set to that. Now we can build the segment command and set the section file offsets. */ @@ -3361,7 +3361,7 @@ bfd_mach_o_build_commands (bfd *abfd) for (i = 0; i < nbr_segcmd; i++) if (!bfd_mach_o_build_obj_seg_command (abfd, &commands[i].command.segment)) - return FALSE; + return false; } else { @@ -3373,7 +3373,7 @@ bfd_mach_o_build_commands (bfd *abfd) bfd_mach_o_segment_command *seg = &commands[i].command.segment; if (!bfd_mach_o_build_exec_seg_command (abfd, seg)) - return FALSE; + return false; if (seg->vmaddr + seg->vmsize > maxvma) maxvma = seg->vmaddr + seg->vmsize; @@ -3393,12 +3393,12 @@ bfd_mach_o_build_commands (bfd *abfd) bfd_get_start_address (abfd) - commands[1].command.segment.vmaddr; } - return TRUE; + return true; } /* Set the contents of a section. */ -bfd_boolean +bool bfd_mach_o_set_section_contents (bfd *abfd, asection *section, const void * location, @@ -3410,17 +3410,17 @@ bfd_mach_o_set_section_contents (bfd *abfd, /* Trying to write the first section contents will trigger the creation of the load commands if they are not already present. */ if (!abfd->output_has_begun && !bfd_mach_o_build_commands (abfd)) - return FALSE; + return false; if (count == 0) - return TRUE; + return true; pos = section->filepos + offset; if (bfd_seek (abfd, pos, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; - return TRUE; + return true; } int @@ -3446,7 +3446,7 @@ bfd_mach_o_make_empty_symbol (bfd *abfd) return new_symbol; } -static bfd_boolean +static bool bfd_mach_o_read_header (bfd *abfd, file_ptr hdr_off, bfd_mach_o_header *header) { struct mach_o_header_external raw; @@ -3456,7 +3456,7 @@ bfd_mach_o_read_header (bfd *abfd, file_ptr hdr_off, bfd_mach_o_header *header) /* Just read the magic number. */ if (bfd_seek (abfd, hdr_off, SEEK_SET) != 0 || bfd_bread (raw.magic, sizeof (raw.magic), abfd) != 4) - return FALSE; + return false; if (bfd_getb32 (raw.magic) == BFD_MACH_O_MH_MAGIC) { @@ -3489,7 +3489,7 @@ bfd_mach_o_read_header (bfd *abfd, file_ptr hdr_off, bfd_mach_o_header *header) else { header->byteorder = BFD_ENDIAN_UNKNOWN; - return FALSE; + return false; } /* Once the size of the header is known, read the full header. */ @@ -3498,7 +3498,7 @@ bfd_mach_o_read_header (bfd *abfd, file_ptr hdr_off, bfd_mach_o_header *header) if (bfd_seek (abfd, hdr_off, SEEK_SET) != 0 || bfd_bread (&raw, size, abfd) != size) - return FALSE; + return false; header->cputype = (*get32) (raw.cputype); header->cpusubtype = (*get32) (raw.cpusubtype); @@ -3512,10 +3512,10 @@ bfd_mach_o_read_header (bfd *abfd, file_ptr hdr_off, bfd_mach_o_header *header) else header->reserved = 0; - return TRUE; + return true; } -bfd_boolean +bool bfd_mach_o_new_section_hook (bfd *abfd, asection *sec) { bfd_mach_o_section *s; @@ -3529,7 +3529,7 @@ bfd_mach_o_new_section_hook (bfd *abfd, asection *sec) s = (bfd_mach_o_section *) bfd_zalloc (abfd, sizeof (*s)); if (s == NULL) - return FALSE; + return false; sec->used_by_bfd = s; s->bfdsection = sec; @@ -3724,7 +3724,7 @@ bfd_mach_o_read_section (bfd *abfd, unsigned long prot, unsigned int wide) return bfd_mach_o_read_section_32 (abfd, prot); } -static bfd_boolean +static bool bfd_mach_o_read_symtab_symbol (bfd *abfd, bfd_mach_o_symtab_command *sym, bfd_mach_o_asymbol *s, @@ -3752,7 +3752,7 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, /* xgettext:c-format */ (_("bfd_mach_o_read_symtab_symbol: unable to read %d bytes at %u"), symwidth, symoff); - return FALSE; + return false; } stroff = bfd_h_get_32 (abfd, raw.n_strx); @@ -3772,7 +3772,7 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, (_("bfd_mach_o_read_symtab_symbol: name out of range (%lu >= %u)"), stroff, sym->strsize); - return FALSE; + return false; } s->symbol.the_bfd = abfd; @@ -3879,10 +3879,10 @@ bfd_mach_o_read_symtab_symbol (bfd *abfd, } } - return TRUE; + return true; } -bfd_boolean +bool bfd_mach_o_read_symtab_strtab (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -3890,11 +3890,11 @@ bfd_mach_o_read_symtab_strtab (bfd *abfd) /* Fail if there is no symtab. */ if (sym == NULL) - return FALSE; + return false; /* Success if already loaded. */ if (sym->strtab) - return TRUE; + return true; if (abfd->flags & BFD_IN_MEMORY) { @@ -3905,7 +3905,7 @@ bfd_mach_o_read_symtab_strtab (bfd *abfd) if ((sym->stroff + sym->strsize) > b->size) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } sym->strtab = (char *) b->buffer + sym->stroff; } @@ -3913,22 +3913,22 @@ bfd_mach_o_read_symtab_strtab (bfd *abfd) { /* See PR 21840 for a reproducer. */ if ((sym->strsize + 1) == 0) - return FALSE; + return false; if (bfd_seek (abfd, sym->stroff, SEEK_SET) != 0) - return FALSE; + return false; sym->strtab = (char *) _bfd_alloc_and_read (abfd, sym->strsize + 1, sym->strsize); if (sym->strtab == NULL) - return FALSE; + return false; /* Zero terminate the string table. */ sym->strtab[sym->strsize] = 0; } - return TRUE; + return true; } -bfd_boolean +bool bfd_mach_o_read_symtab_symbols (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -3939,7 +3939,7 @@ bfd_mach_o_read_symtab_symbols (bfd *abfd) if (sym == NULL || sym->nsyms == 0 || sym->symbols) /* Return now if there are no symbols or if already loaded. */ - return TRUE; + return true; filesize = bfd_get_file_size (abfd); if (filesize != 0) @@ -3953,7 +3953,7 @@ bfd_mach_o_read_symtab_symbols (bfd *abfd) { bfd_set_error (bfd_error_file_truncated); sym->nsyms = 0; - return FALSE; + return false; } } if (_bfd_mul_overflow (sym->nsyms, sizeof (bfd_mach_o_asymbol), &amt) @@ -3961,7 +3961,7 @@ bfd_mach_o_read_symtab_symbols (bfd *abfd) { bfd_set_error (bfd_error_no_memory); sym->nsyms = 0; - return FALSE; + return false; } if (!bfd_mach_o_read_symtab_strtab (abfd)) @@ -3971,13 +3971,13 @@ bfd_mach_o_read_symtab_symbols (bfd *abfd) if (!bfd_mach_o_read_symtab_symbol (abfd, sym, &sym->symbols[i], i)) goto fail; - return TRUE; + return true; fail: bfd_release (abfd, sym->symbols); sym->symbols = NULL; sym->nsyms = 0; - return FALSE; + return false; } static const char * @@ -4025,7 +4025,7 @@ bfd_mach_o_alloc_and_read (bfd *abfd, file_ptr filepos, size_t size) return _bfd_alloc_and_read (abfd, size, size); } -static bfd_boolean +static bool bfd_mach_o_read_dylinker (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dylinker_command *cmd = &command->command.dylinker; @@ -4034,13 +4034,13 @@ bfd_mach_o_read_dylinker (bfd *abfd, bfd_mach_o_load_command *command) unsigned int namelen; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; nameoff = bfd_h_get_32 (abfd, raw.str); if (nameoff > command->len) - return FALSE; + return false; cmd->name_offset = nameoff; namelen = command->len - nameoff; @@ -4049,7 +4049,7 @@ bfd_mach_o_read_dylinker (bfd *abfd, bfd_mach_o_load_command *command) return cmd->name_str != NULL; } -static bfd_boolean +static bool bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -4060,7 +4060,7 @@ bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) file_ptr pos; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; switch (command->type) { case BFD_MACH_O_LC_LOAD_DYLIB: @@ -4072,15 +4072,15 @@ bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) break; default: BFD_FAIL (); - return FALSE; + return false; } if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; nameoff = bfd_h_get_32 (abfd, raw.name); if (nameoff > command->len) - return FALSE; + return false; cmd->timestamp = bfd_h_get_32 (abfd, raw.timestamp); cmd->current_version = bfd_h_get_32 (abfd, raw.current_version); cmd->compatibility_version = bfd_h_get_32 (abfd, raw.compatibility_version); @@ -4092,7 +4092,7 @@ bfd_mach_o_read_dylib (bfd *abfd, bfd_mach_o_load_command *command) return cmd->name_str != NULL; } -static bfd_boolean +static bool bfd_mach_o_read_prebound_dylib (bfd *abfd, bfd_mach_o_load_command *command) { @@ -4104,19 +4104,19 @@ bfd_mach_o_read_prebound_dylib (bfd *abfd, unsigned char *str; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; nameoff = bfd_h_get_32 (abfd, raw.name); modoff = bfd_h_get_32 (abfd, raw.linked_modules); if (nameoff > command->len || modoff > command->len) - return FALSE; + return false; str_len = command->len - sizeof (raw); str = _bfd_alloc_and_read (abfd, str_len, str_len); if (str == NULL) - return FALSE; + return false; cmd->name_offset = command->offset + nameoff; cmd->nmodules = bfd_h_get_32 (abfd, raw.nmodules); @@ -4124,10 +4124,10 @@ bfd_mach_o_read_prebound_dylib (bfd *abfd, cmd->name_str = (char *)str + nameoff - (sizeof (raw) + BFD_MACH_O_LC_SIZE); cmd->linked_modules = str + modoff - (sizeof (raw) + BFD_MACH_O_LC_SIZE); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_prebind_cksum (bfd *abfd, bfd_mach_o_load_command *command) { @@ -4135,15 +4135,15 @@ bfd_mach_o_read_prebind_cksum (bfd *abfd, struct mach_o_prebind_cksum_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->cksum = bfd_get_32 (abfd, raw.cksum); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_twolevel_hints (bfd *abfd, bfd_mach_o_load_command *command) { @@ -4151,16 +4151,16 @@ bfd_mach_o_read_twolevel_hints (bfd *abfd, struct mach_o_twolevel_hints_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->offset = bfd_get_32 (abfd, raw.offset); cmd->nhints = bfd_get_32 (abfd, raw.nhints); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_fvmlib (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_fvmlib_command *fvm = &command->command.fvmlib; @@ -4169,13 +4169,13 @@ bfd_mach_o_read_fvmlib (bfd *abfd, bfd_mach_o_load_command *command) unsigned int namelen; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; nameoff = bfd_h_get_32 (abfd, raw.name); if (nameoff > command->len) - return FALSE; + return false; fvm->minor_version = bfd_h_get_32 (abfd, raw.minor_version); fvm->header_addr = bfd_h_get_32 (abfd, raw.header_addr); @@ -4186,7 +4186,7 @@ bfd_mach_o_read_fvmlib (bfd *abfd, bfd_mach_o_load_command *command) return fvm->name_str != NULL; } -static bfd_boolean +static bool bfd_mach_o_read_thread (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -4209,27 +4209,27 @@ bfd_mach_o_read_thread (bfd *abfd, bfd_mach_o_load_command *command) if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; count = bfd_h_get_32 (abfd, raw.count); if (count > (unsigned) -1 / 4 || command->len - (offset + sizeof (raw)) < count * 4) - return FALSE; + return false; offset += sizeof (raw) + count * 4; nflavours++; } if (nflavours == 0 || offset != command->len) - return FALSE; + return false; /* Allocate threads. */ if (_bfd_mul_overflow (nflavours, sizeof (bfd_mach_o_thread_flavour), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cmd->flavours = bfd_alloc (abfd, amt); if (cmd->flavours == NULL) - return FALSE; + return false; cmd->nflavours = nflavours; offset = 8; @@ -4238,7 +4238,7 @@ bfd_mach_o_read_thread (bfd *abfd, bfd_mach_o_load_command *command) { if (bfd_seek (abfd, command->offset + offset, SEEK_SET) != 0 || bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->flavours[nflavours].flavour = bfd_h_get_32 (abfd, raw.flavour); cmd->flavours[nflavours].offset = command->offset + offset + sizeof (raw); @@ -4276,7 +4276,7 @@ bfd_mach_o_read_thread (bfd *abfd, bfd_mach_o_load_command *command) snamelen = strlen (prefix) + 1 + 20 + 1 + strlen (flavourstr) + 1; sname = bfd_alloc (abfd, snamelen); if (sname == NULL) - return FALSE; + return false; for (;;) { @@ -4297,10 +4297,10 @@ bfd_mach_o_read_thread (bfd *abfd, bfd_mach_o_load_command *command) cmd->section = bfdsec; } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, ufile_ptr filesize) { @@ -4313,9 +4313,9 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, struct mach_o_dysymtab_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->ilocalsym = bfd_h_get_32 (abfd, raw.ilocalsym); cmd->nlocalsym = bfd_h_get_32 (abfd, raw.nlocalsym); @@ -4348,20 +4348,20 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, || cmd->nmodtab > (filesize - cmd->modtaboff) / module_len) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (_bfd_mul_overflow (cmd->nmodtab, sizeof (bfd_mach_o_dylib_module), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cmd->dylib_module = bfd_alloc (abfd, amt); if (cmd->dylib_module == NULL) - return FALSE; + return false; if (bfd_seek (abfd, cmd->modtaboff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->nmodtab; i++) { @@ -4370,7 +4370,7 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, unsigned char buf[56]; if (bfd_bread ((void *) buf, module_len, abfd) != module_len) - return FALSE; + return false; module->module_name_idx = bfd_h_get_32 (abfd, buf + 0); module->iextdefsym = bfd_h_get_32 (abfd, buf + 4); @@ -4410,27 +4410,27 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, || cmd->ntoc > (filesize - cmd->tocoff) / sizeof (raw)) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (_bfd_mul_overflow (cmd->ntoc, sizeof (bfd_mach_o_dylib_table_of_content), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cmd->dylib_toc = bfd_alloc (abfd, amt); if (cmd->dylib_toc == NULL) - return FALSE; + return false; if (bfd_seek (abfd, cmd->tocoff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->ntoc; i++) { bfd_mach_o_dylib_table_of_content *toc = &cmd->dylib_toc[i]; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; toc->symbol_index = bfd_h_get_32 (abfd, raw.symbol_index); toc->module_index = bfd_h_get_32 (abfd, raw.module_index); @@ -4446,19 +4446,19 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, || cmd->nindirectsyms > (filesize - cmd->indirectsymoff) / 4) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (_bfd_mul_overflow (cmd->nindirectsyms, sizeof (unsigned int), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cmd->indirect_syms = bfd_alloc (abfd, amt); if (cmd->indirect_syms == NULL) - return FALSE; + return false; if (bfd_seek (abfd, cmd->indirectsymoff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->nindirectsyms; i++) { @@ -4466,7 +4466,7 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, unsigned int *is = &cmd->indirect_syms[i]; if (bfd_bread (raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; *is = bfd_h_get_32 (abfd, raw); } @@ -4482,20 +4482,20 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, || cmd->nextrefsyms > (filesize - cmd->extrefsymoff) / 4) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (_bfd_mul_overflow (cmd->nextrefsyms, sizeof (bfd_mach_o_dylib_reference), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cmd->ext_refs = bfd_alloc (abfd, amt); if (cmd->ext_refs == NULL) - return FALSE; + return false; if (bfd_seek (abfd, cmd->extrefsymoff, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < cmd->nextrefsyms; i++) { @@ -4503,7 +4503,7 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, bfd_mach_o_dylib_reference *ref = &cmd->ext_refs[i]; if (bfd_bread (raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; /* Fields isym and flags are written as bit-fields, thus we need a specific processing for endianness. */ @@ -4522,13 +4522,13 @@ bfd_mach_o_read_dysymtab (bfd *abfd, bfd_mach_o_load_command *command, } if (mdata->dysymtab) - return FALSE; + return false; mdata->dysymtab = cmd; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_symtab (bfd *abfd, bfd_mach_o_load_command *command, ufile_ptr filesize) { @@ -4539,9 +4539,9 @@ bfd_mach_o_read_symtab (bfd *abfd, bfd_mach_o_load_command *command, BFD_ASSERT (command->type == BFD_MACH_O_LC_SYMTAB); if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; symtab->symoff = bfd_h_get_32 (abfd, raw.symoff); symtab->nsyms = bfd_h_get_32 (abfd, raw.nsyms); @@ -4556,19 +4556,19 @@ bfd_mach_o_read_symtab (bfd *abfd, bfd_mach_o_load_command *command, || symtab->strsize > filesize - symtab->stroff) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (symtab->nsyms != 0) abfd->flags |= HAS_SYMS; if (mdata->symtab) - return FALSE; + return false; mdata->symtab = symtab; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_uuid (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_uuid_command *cmd = &command->command.uuid; @@ -4576,30 +4576,30 @@ bfd_mach_o_read_uuid (bfd *abfd, bfd_mach_o_load_command *command) BFD_ASSERT (command->type == BFD_MACH_O_LC_UUID); if (command->len < 16 + 8) - return FALSE; + return false; if (bfd_bread (cmd->uuid, 16, abfd) != 16) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_linkedit (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_linkedit_command *cmd = &command->command.linkedit; struct mach_o_linkedit_data_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->dataoff = bfd_get_32 (abfd, raw.dataoff); cmd->datasize = bfd_get_32 (abfd, raw.datasize); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_str (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_str_command *cmd = &command->command.str; @@ -4607,13 +4607,13 @@ bfd_mach_o_read_str (bfd *abfd, bfd_mach_o_load_command *command) unsigned long off; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; off = bfd_get_32 (abfd, raw.str); if (off > command->len) - return FALSE; + return false; cmd->stroff = command->offset + off; cmd->str_len = command->len - off; @@ -4622,7 +4622,7 @@ bfd_mach_o_read_str (bfd *abfd, bfd_mach_o_load_command *command) return cmd->str != NULL; } -static bfd_boolean +static bool bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd) { /* Read rebase content. */ @@ -4631,7 +4631,7 @@ bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd) cmd->rebase_content = bfd_mach_o_alloc_and_read (abfd, cmd->rebase_off, cmd->rebase_size); if (cmd->rebase_content == NULL) - return FALSE; + return false; } /* Read bind content. */ @@ -4640,7 +4640,7 @@ bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd) cmd->bind_content = bfd_mach_o_alloc_and_read (abfd, cmd->bind_off, cmd->bind_size); if (cmd->bind_content == NULL) - return FALSE; + return false; } /* Read weak bind content. */ @@ -4649,7 +4649,7 @@ bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd) cmd->weak_bind_content = bfd_mach_o_alloc_and_read (abfd, cmd->weak_bind_off, cmd->weak_bind_size); if (cmd->weak_bind_content == NULL) - return FALSE; + return false; } /* Read lazy bind content. */ @@ -4658,7 +4658,7 @@ bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd) cmd->lazy_bind_content = bfd_mach_o_alloc_and_read (abfd, cmd->lazy_bind_off, cmd->lazy_bind_size); if (cmd->lazy_bind_content == NULL) - return FALSE; + return false; } /* Read export content. */ @@ -4667,22 +4667,22 @@ bfd_mach_o_read_dyld_content (bfd *abfd, bfd_mach_o_dyld_info_command *cmd) cmd->export_content = bfd_mach_o_alloc_and_read (abfd, cmd->export_off, cmd->export_size); if (cmd->export_content == NULL) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_dyld_info (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_dyld_info_command *cmd = &command->command.dyld_info; struct mach_o_dyld_info_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->rebase_off = bfd_get_32 (abfd, raw.rebase_off); cmd->rebase_size = bfd_get_32 (abfd, raw.rebase_size); @@ -4699,76 +4699,76 @@ bfd_mach_o_read_dyld_info (bfd *abfd, bfd_mach_o_load_command *command) cmd->export_off = bfd_get_32 (abfd, raw.export_off); cmd->export_size = bfd_get_32 (abfd, raw.export_size); cmd->export_content = NULL; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_version_min (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_version_min_command *cmd = &command->command.version_min; struct mach_o_version_min_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->version = bfd_get_32 (abfd, raw.version); cmd->sdk = bfd_get_32 (abfd, raw.sdk); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_encryption_info (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_encryption_info_command *cmd = &command->command.encryption_info; struct mach_o_encryption_info_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->cryptoff = bfd_get_32 (abfd, raw.cryptoff); cmd->cryptsize = bfd_get_32 (abfd, raw.cryptsize); cmd->cryptid = bfd_get_32 (abfd, raw.cryptid); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_encryption_info_64 (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_encryption_info_command *cmd = &command->command.encryption_info; struct mach_o_encryption_info_64_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->cryptoff = bfd_get_32 (abfd, raw.cryptoff); cmd->cryptsize = bfd_get_32 (abfd, raw.cryptsize); cmd->cryptid = bfd_get_32 (abfd, raw.cryptid); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_main (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_main_command *cmd = &command->command.main; struct mach_o_entry_point_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->entryoff = bfd_get_64 (abfd, raw.entryoff); cmd->stacksize = bfd_get_64 (abfd, raw.stacksize); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_source_version (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_source_version_command *cmd = &command->command.source_version; @@ -4776,9 +4776,9 @@ bfd_mach_o_read_source_version (bfd *abfd, bfd_mach_o_load_command *command) bfd_uint64_t ver; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; ver = bfd_get_64 (abfd, raw.version); /* Note: we use a serie of shift to avoid shift > 32 (for which gcc @@ -4793,45 +4793,45 @@ bfd_mach_o_read_source_version (bfd *abfd, bfd_mach_o_load_command *command) cmd->b = ver & 0x3ff; ver >>= 10; cmd->a = ver & 0xffffff; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_note (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_note_command *cmd = &command->command.note; struct mach_o_note_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; memcpy (cmd->data_owner, raw.data_owner, 16); cmd->offset = bfd_get_64 (abfd, raw.offset); cmd->size = bfd_get_64 (abfd, raw.size); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_build_version (bfd *abfd, bfd_mach_o_load_command *command) { bfd_mach_o_build_version_command *cmd = &command->command.build_version; struct mach_o_build_version_command_external raw; if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; cmd->platform = bfd_get_32 (abfd, raw.platform); cmd->minos = bfd_get_32 (abfd, raw.minos); cmd->sdk = bfd_get_32 (abfd, raw.sdk); cmd->ntools = bfd_get_32 (abfd, raw.ntools); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_segment (bfd *abfd, bfd_mach_o_load_command *command, unsigned int wide) @@ -4846,9 +4846,9 @@ bfd_mach_o_read_segment (bfd *abfd, BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT_64); if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; memcpy (seg->segname, raw.segname, 16); seg->segname[16] = '\0'; @@ -4869,9 +4869,9 @@ bfd_mach_o_read_segment (bfd *abfd, BFD_ASSERT (command->type == BFD_MACH_O_LC_SEGMENT); if (command->len < sizeof (raw) + 8) - return FALSE; + return false; if (bfd_bread (&raw, sizeof (raw), abfd) != sizeof (raw)) - return FALSE; + return false; memcpy (seg->segname, raw.segname, 16); seg->segname[16] = '\0'; @@ -4894,28 +4894,28 @@ bfd_mach_o_read_segment (bfd *abfd, sec = bfd_mach_o_read_section (abfd, seg->initprot, wide); if (sec == NULL) - return FALSE; + return false; bfd_mach_o_append_section_to_segment (seg, bfd_mach_o_get_mach_o_section (sec)); } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_read_segment_32 (bfd *abfd, bfd_mach_o_load_command *command) { return bfd_mach_o_read_segment (abfd, command, 0); } -static bfd_boolean +static bool bfd_mach_o_read_segment_64 (bfd *abfd, bfd_mach_o_load_command *command) { return bfd_mach_o_read_segment (abfd, command, 1); } -static bfd_boolean +static bool bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command, ufile_ptr filesize) { @@ -4926,41 +4926,41 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command, /* Read command type and length. */ if (bfd_seek (abfd, mdata->hdr_offset + command->offset, SEEK_SET) != 0 || bfd_bread (&raw, BFD_MACH_O_LC_SIZE, abfd) != BFD_MACH_O_LC_SIZE) - return FALSE; + return false; cmd = bfd_h_get_32 (abfd, raw.cmd); command->type = cmd & ~BFD_MACH_O_LC_REQ_DYLD; command->type_required = (cmd & BFD_MACH_O_LC_REQ_DYLD) != 0; command->len = bfd_h_get_32 (abfd, raw.cmdsize); if (command->len < 8 || command->len % 4 != 0) - return FALSE; + return false; switch (command->type) { case BFD_MACH_O_LC_SEGMENT: if (!bfd_mach_o_read_segment_32 (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_SEGMENT_64: if (!bfd_mach_o_read_segment_64 (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_SYMTAB: if (!bfd_mach_o_read_symtab (abfd, command, filesize)) - return FALSE; + return false; break; case BFD_MACH_O_LC_SYMSEG: break; case BFD_MACH_O_LC_THREAD: case BFD_MACH_O_LC_UNIXTHREAD: if (!bfd_mach_o_read_thread (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_LOAD_DYLINKER: case BFD_MACH_O_LC_ID_DYLINKER: case BFD_MACH_O_LC_DYLD_ENVIRONMENT: if (!bfd_mach_o_read_dylinker (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_LOAD_DYLIB: case BFD_MACH_O_LC_LAZY_LOAD_DYLIB: @@ -4969,16 +4969,16 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command, case BFD_MACH_O_LC_REEXPORT_DYLIB: case BFD_MACH_O_LC_LOAD_UPWARD_DYLIB: if (!bfd_mach_o_read_dylib (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_PREBOUND_DYLIB: if (!bfd_mach_o_read_prebound_dylib (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_LOADFVMLIB: case BFD_MACH_O_LC_IDFVMLIB: if (!bfd_mach_o_read_fvmlib (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_IDENT: case BFD_MACH_O_LC_FVMFILE: @@ -4992,23 +4992,23 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command, case BFD_MACH_O_LC_SUB_CLIENT: case BFD_MACH_O_LC_RPATH: if (!bfd_mach_o_read_str (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_DYSYMTAB: if (!bfd_mach_o_read_dysymtab (abfd, command, filesize)) - return FALSE; + return false; break; case BFD_MACH_O_LC_PREBIND_CKSUM: if (!bfd_mach_o_read_prebind_cksum (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_TWOLEVEL_HINTS: if (!bfd_mach_o_read_twolevel_hints (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_UUID: if (!bfd_mach_o_read_uuid (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_CODE_SIGNATURE: case BFD_MACH_O_LC_SEGMENT_SPLIT_INFO: @@ -5019,56 +5019,56 @@ bfd_mach_o_read_command (bfd *abfd, bfd_mach_o_load_command *command, case BFD_MACH_O_LC_DYLD_EXPORTS_TRIE: case BFD_MACH_O_LC_DYLD_CHAINED_FIXUPS: if (!bfd_mach_o_read_linkedit (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_ENCRYPTION_INFO: if (!bfd_mach_o_read_encryption_info (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_ENCRYPTION_INFO_64: if (!bfd_mach_o_read_encryption_info_64 (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_DYLD_INFO: if (!bfd_mach_o_read_dyld_info (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_VERSION_MIN_MACOSX: case BFD_MACH_O_LC_VERSION_MIN_IPHONEOS: case BFD_MACH_O_LC_VERSION_MIN_WATCHOS: case BFD_MACH_O_LC_VERSION_MIN_TVOS: if (!bfd_mach_o_read_version_min (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_MAIN: if (!bfd_mach_o_read_main (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_SOURCE_VERSION: if (!bfd_mach_o_read_source_version (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_LINKER_OPTIONS: break; case BFD_MACH_O_LC_NOTE: if (!bfd_mach_o_read_note (abfd, command)) - return FALSE; + return false; break; case BFD_MACH_O_LC_BUILD_VERSION: if (!bfd_mach_o_read_build_version (abfd, command)) - return FALSE; + return false; break; default: command->len = 0; _bfd_error_handler (_("%pB: unknown load command %#x"), abfd, command->type); - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_flatten_sections (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -5094,11 +5094,11 @@ bfd_mach_o_flatten_sections (bfd *abfd) if (_bfd_mul_overflow (mdata->nsects, sizeof (bfd_mach_o_section *), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } mdata->sections = bfd_alloc (abfd, amt); if (mdata->sections == NULL && mdata->nsects != 0) - return FALSE; + return false; /* Fill the array. */ csect = 0; @@ -5117,10 +5117,10 @@ bfd_mach_o_flatten_sections (bfd *abfd) mdata->sections[csect++] = sec; } } - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_scan_start_address (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -5144,13 +5144,13 @@ bfd_mach_o_scan_start_address (bfd *abfd) { abfd->start_address = main_cmd->entryoff + (text_sect->addr - text_sect->offset); - return TRUE; + return true; } } /* An object file has no start address, so do not fail if not found. */ if (thr == NULL) - return TRUE; + return true; /* FIXME: create a subtarget hook ? */ for (i = 0; i < thr->nflavours; i++) @@ -5162,7 +5162,7 @@ bfd_mach_o_scan_start_address (bfd *abfd) if (bfd_seek (abfd, thr->flavours[i].offset + 40, SEEK_SET) != 0 || bfd_bread (buf, 4, abfd) != 4) - return FALSE; + return false; abfd->start_address = bfd_h_get_32 (abfd, buf); } @@ -5173,7 +5173,7 @@ bfd_mach_o_scan_start_address (bfd *abfd) if (bfd_seek (abfd, thr->flavours[i].offset + 0, SEEK_SET) != 0 || bfd_bread (buf, 4, abfd) != 4) - return FALSE; + return false; abfd->start_address = bfd_h_get_32 (abfd, buf); } @@ -5184,7 +5184,7 @@ bfd_mach_o_scan_start_address (bfd *abfd) if (bfd_seek (abfd, thr->flavours[i].offset + 0, SEEK_SET) != 0 || bfd_bread (buf, 8, abfd) != 8) - return FALSE; + return false; abfd->start_address = bfd_h_get_64 (abfd, buf); } @@ -5195,16 +5195,16 @@ bfd_mach_o_scan_start_address (bfd *abfd) if (bfd_seek (abfd, thr->flavours[i].offset + (16 * 8), SEEK_SET) != 0 || bfd_bread (buf, 8, abfd) != 8) - return FALSE; + return false; abfd->start_address = bfd_h_get_64 (abfd, buf); } } - return TRUE; + return true; } -bfd_boolean +bool bfd_mach_o_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long machine) @@ -5216,12 +5216,12 @@ bfd_mach_o_set_arch_mach (bfd *abfd, if (arch != bed->arch && arch != bfd_arch_unknown && bed->arch != bfd_arch_unknown) - return FALSE; + return false; return bfd_default_set_arch_mach (abfd, arch, machine); } -static bfd_boolean +static bool bfd_mach_o_scan (bfd *abfd, bfd_mach_o_header *header, bfd_mach_o_data_struct *mdata) @@ -5261,7 +5261,7 @@ bfd_mach_o_scan (bfd *abfd, /* xgettext:c-format */ (_("bfd_mach_o_scan: unknown architecture 0x%lx/0x%lx"), header->cputype, header->cpusubtype); - return FALSE; + return false; } bfd_set_arch_mach (abfd, cpu_type, cpu_subtype); @@ -5281,17 +5281,17 @@ bfd_mach_o_scan (bfd *abfd, if (header->ncmds > (filesize - hdrsize) / BFD_MACH_O_LC_SIZE) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (_bfd_mul_overflow (header->ncmds, sizeof (bfd_mach_o_load_command), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cmd = bfd_alloc (abfd, amt); if (cmd == NULL) - return FALSE; + return false; for (i = 0; i < header->ncmds; i++) { @@ -5308,27 +5308,27 @@ bfd_mach_o_scan (bfd *abfd, } if (!bfd_mach_o_read_command (abfd, cur, filesize)) - return FALSE; + return false; } } /* Sections should be flatten before scanning start address. */ if (!bfd_mach_o_flatten_sections (abfd)) - return FALSE; + return false; if (!bfd_mach_o_scan_start_address (abfd)) - return FALSE; + return false; - return TRUE; + return true; } -bfd_boolean +bool bfd_mach_o_mkobject_init (bfd *abfd) { bfd_mach_o_data_struct *mdata = NULL; mdata = bfd_zalloc (abfd, sizeof (bfd_mach_o_data_struct)); if (mdata == NULL) - return FALSE; + return false; abfd->tdata.mach_o_data = mdata; mdata->header.magic = 0; @@ -5345,16 +5345,16 @@ bfd_mach_o_mkobject_init (bfd *abfd) mdata->sections = NULL; mdata->dyn_reloc_cache = NULL; - return TRUE; + return true; } -static bfd_boolean +static bool bfd_mach_o_gen_mkobject (bfd *abfd) { bfd_mach_o_data_struct *mdata; if (!bfd_mach_o_mkobject_init (abfd)) - return FALSE; + return false; mdata = bfd_mach_o_get_data (abfd); mdata->header.magic = BFD_MACH_O_MH_MAGIC; @@ -5363,7 +5363,7 @@ bfd_mach_o_gen_mkobject (bfd *abfd) mdata->header.byteorder = abfd->xvec->byteorder; mdata->header.version = 1; - return TRUE; + return true; } bfd_cleanup @@ -5565,7 +5565,7 @@ bfd_mach_o_fat_archive_p (bfd *abfd) ARCH_TYPE/ARCH_SUBTYPE and corresponding entry in header is ENTRY. Set arelt_data and origin fields too. */ -static bfd_boolean +static bool bfd_mach_o_fat_member_init (bfd *abfd, enum bfd_architecture arch_type, unsigned long arch_subtype, @@ -5590,16 +5590,16 @@ bfd_mach_o_fat_member_init (bfd *abfd, filename = bfd_set_filename (abfd, buf); } if (!filename) - return FALSE; + return false; areltdata = bfd_zmalloc (sizeof (struct areltdata)); if (areltdata == NULL) - return FALSE; + return false; areltdata->parsed_size = entry->size; abfd->arelt_data = areltdata; abfd->iostream = NULL; abfd->origin = entry->offset; - return TRUE; + return true; } bfd * @@ -5744,11 +5744,11 @@ bfd_mach_o_fat_extract (bfd *abfd, return NULL; } -static bfd_boolean +static bool bfd_mach_o_fat_close_and_cleanup (bfd *abfd) { _bfd_unlink_from_archive_parent (abfd); - return TRUE; + return true; } int @@ -5994,13 +5994,13 @@ bfd_mach_o_lookup_uuid_command (bfd *abfd) bfd_mach_o_load_command *uuid_cmd = NULL; int ncmd = bfd_mach_o_lookup_command (abfd, BFD_MACH_O_LC_UUID, &uuid_cmd); if (ncmd != 1 || uuid_cmd == NULL) - return FALSE; + return false; return &uuid_cmd->command.uuid; } /* Return true if ABFD is a dSYM file and its UUID matches UUID_CMD. */ -static bfd_boolean +static bool bfd_mach_o_dsym_for_uuid_p (bfd *abfd, const bfd_mach_o_uuid_command *uuid_cmd) { bfd_mach_o_uuid_command *dsym_uuid_cmd; @@ -6009,22 +6009,22 @@ bfd_mach_o_dsym_for_uuid_p (bfd *abfd, const bfd_mach_o_uuid_command *uuid_cmd) BFD_ASSERT (uuid_cmd); if (!bfd_check_format (abfd, bfd_object)) - return FALSE; + return false; if (bfd_get_flavour (abfd) != bfd_target_mach_o_flavour || bfd_mach_o_get_data (abfd) == NULL || bfd_mach_o_get_data (abfd)->header.filetype != BFD_MACH_O_MH_DSYM) - return FALSE; + return false; dsym_uuid_cmd = bfd_mach_o_lookup_uuid_command (abfd); if (dsym_uuid_cmd == NULL) - return FALSE; + return false; if (memcmp (uuid_cmd->uuid, dsym_uuid_cmd->uuid, sizeof (uuid_cmd->uuid)) != 0) - return FALSE; + return false; - return TRUE; + return true; } /* Find a BFD in DSYM_FILENAME which matches ARCH and UUID_CMD. @@ -6105,7 +6105,7 @@ bfd_mach_o_follow_dsym (bfd *abfd) return dsym_bfd; } -bfd_boolean +bool bfd_mach_o_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, @@ -6117,7 +6117,7 @@ bfd_mach_o_find_nearest_line (bfd *abfd, { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); if (mdata == NULL) - return FALSE; + return false; switch (mdata->header.filetype) { case BFD_MACH_O_MH_OBJECT: @@ -6138,12 +6138,12 @@ bfd_mach_o_find_nearest_line (bfd *abfd, if (! _bfd_dwarf2_slurp_debug_info (abfd, mdata->dsym_bfd, dwarf_debug_sections, symbols, &mdata->dwarf2_find_line_info, - FALSE)) - return FALSE; + false)) + return false; } break; default: - return FALSE; + return false; } return _bfd_dwarf2_find_nearest_line (abfd, symbols, NULL, section, offset, filename_ptr, functionname_ptr, @@ -6152,7 +6152,7 @@ bfd_mach_o_find_nearest_line (bfd *abfd, &mdata->dwarf2_find_line_info); } -bfd_boolean +bool bfd_mach_o_close_and_cleanup (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -6189,7 +6189,7 @@ bfd_mach_o_close_and_cleanup (bfd *abfd) return _bfd_generic_close_and_cleanup (abfd); } -bfd_boolean +bool bfd_mach_o_free_cached_info (bfd *abfd) { bfd_mach_o_data_struct *mdata = bfd_mach_o_get_data (abfd); @@ -6202,7 +6202,7 @@ bfd_mach_o_free_cached_info (bfd *abfd) asect->relocation = NULL; } - return TRUE; + return true; } #define bfd_mach_o_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup diff --git a/bfd/mach-o.h b/bfd/mach-o.h index ddc202428c..104e705410 100644 --- a/bfd/mach-o.h +++ b/bfd/mach-o.h @@ -591,7 +591,7 @@ typedef struct bfd_mach_o_load_command /* Type and required flag. */ bfd_mach_o_load_command_type type; - bfd_boolean type_required; + bool type_required; /* Offset and length in the file. */ unsigned int offset; @@ -677,24 +677,24 @@ bfd_mach_o_xlat_name; #define bfd_mach_o_get_mach_o_section(sec) \ ((bfd_mach_o_section *)(sec)->used_by_bfd) -bfd_boolean bfd_mach_o_valid (bfd *); -bfd_boolean bfd_mach_o_mkobject_init (bfd *); +bool bfd_mach_o_valid (bfd *); +bool bfd_mach_o_mkobject_init (bfd *); bfd_cleanup bfd_mach_o_object_p (bfd *); bfd_cleanup bfd_mach_o_core_p (bfd *); bfd_cleanup bfd_mach_o_fat_archive_p (bfd *); bfd *bfd_mach_o_fat_openr_next_archived_file (bfd *, bfd *); -bfd_boolean bfd_mach_o_set_arch_mach (bfd *, enum bfd_architecture, - unsigned long); -int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, bfd_mach_o_load_command **); -bfd_boolean bfd_mach_o_new_section_hook (bfd *, asection *); -bfd_boolean bfd_mach_o_write_contents (bfd *); -bfd_boolean bfd_mach_o_bfd_copy_private_symbol_data (bfd *, asymbol *, - bfd *, asymbol *); -bfd_boolean bfd_mach_o_bfd_copy_private_section_data (bfd *, asection *, - bfd *, asection *); -bfd_boolean bfd_mach_o_bfd_copy_private_header_data (bfd *, bfd *); -bfd_boolean bfd_mach_o_bfd_set_private_flags (bfd *, flagword); -bfd_boolean bfd_mach_o_bfd_print_private_bfd_data (bfd *, void *); +bool bfd_mach_o_set_arch_mach (bfd *, enum bfd_architecture, unsigned long); +int bfd_mach_o_lookup_command (bfd *, bfd_mach_o_load_command_type, + bfd_mach_o_load_command **); +bool bfd_mach_o_new_section_hook (bfd *, asection *); +bool bfd_mach_o_write_contents (bfd *); +bool bfd_mach_o_bfd_copy_private_symbol_data (bfd *, asymbol *, + bfd *, asymbol *); +bool bfd_mach_o_bfd_copy_private_section_data (bfd *, asection *, + bfd *, asection *); +bool bfd_mach_o_bfd_copy_private_header_data (bfd *, bfd *); +bool bfd_mach_o_bfd_set_private_flags (bfd *, flagword); +bool bfd_mach_o_bfd_print_private_bfd_data (bfd *, void *); long bfd_mach_o_get_symtab_upper_bound (bfd *); long bfd_mach_o_canonicalize_symtab (bfd *, asymbol **); long bfd_mach_o_get_synthetic_symtab (bfd *, long, asymbol **, long, @@ -711,13 +711,13 @@ unsigned long bfd_mach_o_stack_addr (enum bfd_mach_o_cpu_type); int bfd_mach_o_core_fetch_environment (bfd *, unsigned char **, unsigned int *); char *bfd_mach_o_core_file_failing_command (bfd *); int bfd_mach_o_core_file_failing_signal (bfd *); -bfd_boolean bfd_mach_o_core_file_matches_executable_p (bfd *, bfd *); +bool bfd_mach_o_core_file_matches_executable_p (bfd *, bfd *); bfd *bfd_mach_o_fat_extract (bfd *, bfd_format , const bfd_arch_info_type *); bfd_cleanup bfd_mach_o_header_p (bfd *, file_ptr, bfd_mach_o_filetype, bfd_mach_o_cpu_type); -bfd_boolean bfd_mach_o_build_commands (bfd *); -bfd_boolean bfd_mach_o_set_section_contents (bfd *, asection *, const void *, - file_ptr, bfd_size_type); +bool bfd_mach_o_build_commands (bfd *); +bool bfd_mach_o_set_section_contents (bfd *, asection *, const void *, + file_ptr, bfd_size_type); unsigned int bfd_mach_o_version (bfd *); unsigned int bfd_mach_o_get_section_type_from_name (bfd *, const char *); @@ -725,29 +725,29 @@ unsigned int bfd_mach_o_get_section_attribute_from_name (const char *); void bfd_mach_o_convert_section_name_to_bfd (bfd *, const char *, const char *, const char **, flagword *); -bfd_boolean bfd_mach_o_find_nearest_line (bfd *, asymbol **, +bool bfd_mach_o_find_nearest_line (bfd *, asymbol **, asection *, bfd_vma, const char **, const char **, unsigned int *, unsigned int *); #define bfd_mach_o_find_line _bfd_nosymbols_find_line -bfd_boolean bfd_mach_o_close_and_cleanup (bfd *); -bfd_boolean bfd_mach_o_free_cached_info (bfd *); +bool bfd_mach_o_close_and_cleanup (bfd *); +bool bfd_mach_o_free_cached_info (bfd *); unsigned int bfd_mach_o_section_get_nbr_indirect (bfd *, bfd_mach_o_section *); unsigned int bfd_mach_o_section_get_entry_size (bfd *, bfd_mach_o_section *); -bfd_boolean bfd_mach_o_read_symtab_symbols (bfd *); -bfd_boolean bfd_mach_o_read_symtab_strtab (bfd *abfd); +bool bfd_mach_o_read_symtab_symbols (bfd *); +bool bfd_mach_o_read_symtab_strtab (bfd *abfd); bfd_vma bfd_mach_o_get_base_address (bfd *); void bfd_mach_o_swap_in_non_scattered_reloc (bfd *, bfd_mach_o_reloc_info *, unsigned char *); -bfd_boolean bfd_mach_o_canonicalize_non_scattered_reloc (bfd *, bfd_mach_o_reloc_info *, arelent *, asymbol **); -bfd_boolean bfd_mach_o_pre_canonicalize_one_reloc (bfd *, struct mach_o_reloc_info_external *, bfd_mach_o_reloc_info *, arelent *, asymbol **); +bool bfd_mach_o_canonicalize_non_scattered_reloc (bfd *, bfd_mach_o_reloc_info *, arelent *, asymbol **); +bool bfd_mach_o_pre_canonicalize_one_reloc (bfd *, struct mach_o_reloc_info_external *, bfd_mach_o_reloc_info *, arelent *, asymbol **); /* A placeholder in case we need to suppress emitting the dysymtab for some reason (e.g. compatibility with older system versions). */ -#define bfd_mach_o_should_emit_dysymtab(x) TRUE +#define bfd_mach_o_should_emit_dysymtab(x) true extern const bfd_mach_o_xlat_name bfd_mach_o_section_attribute_name[]; extern const bfd_mach_o_xlat_name bfd_mach_o_section_type_name[]; @@ -781,13 +781,13 @@ typedef struct bfd_mach_o_backend_data { enum bfd_architecture arch; bfd_vma page_size; - bfd_boolean (*_bfd_mach_o_canonicalize_one_reloc) + bool (*_bfd_mach_o_canonicalize_one_reloc) (bfd *, struct mach_o_reloc_info_external *, arelent *, asymbol **, arelent *); - bfd_boolean (*_bfd_mach_o_swap_reloc_out)(arelent *, bfd_mach_o_reloc_info *); - bfd_boolean (*_bfd_mach_o_print_thread)(bfd *, bfd_mach_o_thread_flavour *, + bool (*_bfd_mach_o_swap_reloc_out)(arelent *, bfd_mach_o_reloc_info *); + bool (*_bfd_mach_o_print_thread)(bfd *, bfd_mach_o_thread_flavour *, void *, char *); const mach_o_segment_name_xlat *segsec_names_xlat; - bfd_boolean (*bfd_mach_o_section_type_valid_for_target) (unsigned long); + bool (*bfd_mach_o_section_type_valid_for_target) (unsigned long); } bfd_mach_o_backend_data; diff --git a/bfd/merge.c b/bfd/merge.c index fd5971cc4c..b7a895d30b 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -70,7 +70,7 @@ struct sec_merge_hash /* Entity size. */ unsigned int entsize; /* Are entries fixed size or zero terminated strings? */ - bfd_boolean strings; + bool strings; }; struct sec_merge_info @@ -135,7 +135,7 @@ sec_merge_hash_newfunc (struct bfd_hash_entry *entry, static struct sec_merge_hash_entry * sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string, - unsigned int alignment, bfd_boolean create) + unsigned int alignment, bool create) { const unsigned char *s; unsigned long hash; @@ -233,7 +233,7 @@ sec_merge_hash_lookup (struct sec_merge_hash *table, const char *string, /* Create a new hash table. */ static struct sec_merge_hash * -sec_merge_init (unsigned int entsize, bfd_boolean strings) +sec_merge_init (unsigned int entsize, bool strings) { struct sec_merge_hash *table; @@ -266,7 +266,7 @@ sec_merge_add (struct sec_merge_hash *tab, const char *str, { struct sec_merge_hash_entry *entry; - entry = sec_merge_hash_lookup (tab, str, alignment, TRUE); + entry = sec_merge_hash_lookup (tab, str, alignment, true); if (entry == NULL) return NULL; @@ -284,7 +284,7 @@ sec_merge_add (struct sec_merge_hash *tab, const char *str, return entry; } -static bfd_boolean +static bool sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry, unsigned char *contents, file_ptr offset) { @@ -302,7 +302,7 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry, pad = (char *) bfd_zmalloc (pad_len); if (pad == NULL) - return FALSE; + return false; for (; entry != NULL && entry->secinfo == secinfo; entry = entry->next) { @@ -349,17 +349,17 @@ sec_merge_emit (bfd *abfd, struct sec_merge_hash_entry *entry, } free (pad); - return TRUE; + return true; err: free (pad); - return FALSE; + return false; } /* Register a SEC_MERGE section as a candidate for merging. This function is called for all non-dynamic SEC_MERGE input sections. */ -bfd_boolean +bool _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, void **psecinfo) { @@ -378,15 +378,15 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, if (sec->size == 0 || (sec->flags & SEC_EXCLUDE) != 0 || sec->entsize == 0) - return TRUE; + return true; if (sec->size % sec->entsize != 0) - return TRUE; + return true; if ((sec->flags & SEC_RELOC) != 0) { /* We aren't prepared to handle relocations in merged sections. */ - return TRUE; + return true; } #ifndef CHAR_BIT @@ -394,7 +394,7 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, #endif alignment_power = sec->alignment_power * opb; if (alignment_power >= sizeof (align) * CHAR_BIT) - return TRUE; + return true; align = 1u << alignment_power; if ((sec->entsize < align @@ -409,7 +409,7 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, of alignment. For non-string constants, alignment must be smaller than or equal to entity size and entity size must be integer multiple of alignment. */ - return TRUE; + return true; } for (sinfo = (struct sec_merge_info *) *psinfo; sinfo; sinfo = sinfo->next) @@ -468,28 +468,28 @@ _bfd_add_merge_section (bfd *abfd, void **psinfo, asection *sec, if (! bfd_get_full_section_contents (sec->owner, sec, &contents)) goto error_return; - return TRUE; + return true; error_return: *psecinfo = NULL; - return FALSE; + return false; } /* Record one section into the hash table. */ -static bfd_boolean +static bool record_section (struct sec_merge_info *sinfo, struct sec_merge_sec_info *secinfo) { asection *sec = secinfo->sec; struct sec_merge_hash_entry *entry; - bfd_boolean nul; + bool nul; unsigned char *p, *end; bfd_vma mask, eltalign; unsigned int align, i; align = sec->alignment_power; end = secinfo->contents + sec->size; - nul = FALSE; + nul = false; mask = ((bfd_vma) 1 << align) - 1; if (sec->flags & SEC_STRINGS) { @@ -510,7 +510,7 @@ record_section (struct sec_merge_info *sinfo, { if (!nul && !((p - secinfo->contents) & mask)) { - nul = TRUE; + nul = true; entry = sec_merge_add (sinfo->htab, "", (unsigned) mask + 1, secinfo); if (! entry) @@ -530,7 +530,7 @@ record_section (struct sec_merge_info *sinfo, break; if (!nul && !((p - secinfo->contents) & mask)) { - nul = TRUE; + nul = true; entry = sec_merge_add (sinfo->htab, (char *) p, (unsigned) mask + 1, secinfo); if (! entry) @@ -551,12 +551,12 @@ record_section (struct sec_merge_info *sinfo, } } - return TRUE; + return true; error_return: for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) *secinfo->psecinfo = NULL; - return FALSE; + return false; } /* qsort comparison function. Won't ever return zero as all entries @@ -732,7 +732,7 @@ merge_strings (struct sec_merge_info *sinfo) /* This function is called once after all SEC_MERGE sections are registered with _bfd_merge_section. */ -bfd_boolean +bool _bfd_merge_sections (bfd *abfd, struct bfd_link_info *info ATTRIBUTE_UNUSED, void *xsinfo, @@ -765,7 +765,7 @@ _bfd_merge_sections (bfd *abfd, else { if (!record_section (sinfo, secinfo)) - return FALSE; + return false; if (align) { unsigned int opb = bfd_octets_per_byte (abfd, secinfo->sec); @@ -783,7 +783,7 @@ _bfd_merge_sections (bfd *abfd, { secinfo = merge_strings (sinfo); if (!secinfo) - return FALSE; + return false; } else { @@ -822,12 +822,12 @@ _bfd_merge_sections (bfd *abfd, secinfo->sec->flags |= SEC_EXCLUDE | SEC_KEEP; } - return TRUE; + return true; } /* Write out the merged section. */ -bfd_boolean +bool _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo) { struct sec_merge_sec_info *secinfo; @@ -838,10 +838,10 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo) secinfo = (struct sec_merge_sec_info *) psecinfo; if (!secinfo) - return FALSE; + return false; if (secinfo->first_str == NULL) - return TRUE; + return true; /* FIXME: octets_per_byte. */ hdr = &elf_section_data (sec->output_section)->this_hdr; @@ -859,14 +859,14 @@ _bfd_write_merged_section (bfd *output_bfd, asection *sec, void *psecinfo) contents = NULL; pos = sec->output_section->filepos + sec->output_offset; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0) - return FALSE; + return false; } if (! sec_merge_emit (output_bfd, secinfo->first_str, contents, sec->output_offset)) - return FALSE; + return false; - return TRUE; + return true; } /* Adjust an address in the SEC_MERGE section. Given OFFSET within @@ -928,7 +928,7 @@ _bfd_merged_section_offset (bfd *output_bfd ATTRIBUTE_UNUSED, asection **psec, { p = secinfo->contents + (offset / sec->entsize) * sec->entsize; } - entry = sec_merge_hash_lookup (secinfo->htab, (char *) p, 0, FALSE); + entry = sec_merge_hash_lookup (secinfo->htab, (char *) p, 0, false); if (!entry) { if (! secinfo->htab->strings) diff --git a/bfd/mmo.c b/bfd/mmo.c index 53883a3184..40aff31591 100644 --- a/bfd/mmo.c +++ b/bfd/mmo.c @@ -307,7 +307,7 @@ struct mmo_data_struct /* When we're reading bytes recursively, check this occasionally. Also holds write errors. */ - bfd_boolean have_error; + bool have_error; /* Max symbol length that may appear in the lop_stab table. Note that this table might just hold a subset of symbols for not-really large @@ -334,10 +334,10 @@ struct mmo_data_struct /* Whether we've calculated symbol consistency requirement yet. We do this when-needed, which must be at some time after all section contents is known. */ - bfd_boolean symbol_consistency_override_calculated; + bool symbol_consistency_override_calculated; /* Whether to consistency-check symbol values, in particular "Main". */ - bfd_boolean ignore_symbol_consistency; + bool ignore_symbol_consistency; }; typedef struct mmo_data_struct tdata_type; @@ -358,7 +358,7 @@ struct mmo_section_data_struct struct mmo_write_sec_info { asection *reg_section; - bfd_boolean retval; + bool retval; }; /* Used when trying to find a section corresponding to addr. */ @@ -368,7 +368,7 @@ struct mmo_find_sec_info bfd_vma addr; }; -static bfd_boolean mmo_bfd_copy_private_bfd_data (bfd *, bfd *); +static bool mmo_bfd_copy_private_bfd_data (bfd *, bfd *); static void mmo_write_section_unless_reg_contents (bfd *, asection *, void *); static void mmo_find_sec_w_addr (bfd *, asection *, void *); static void mmo_find_sec_w_addr_grow (bfd *, asection *, void *); @@ -377,8 +377,8 @@ static void mmo_get_symbol_info (bfd *, asymbol *, symbol_info *); static void mmo_print_symbol (bfd *, void *, asymbol *, bfd_print_symbol_type); static void mmo_init (void); -static bfd_boolean mmo_mkobject (bfd *); -static bfd_boolean mmo_scan (bfd *); +static bool mmo_mkobject (bfd *); +static bool mmo_scan (bfd *); static asection *mmo_decide_section (bfd *, bfd_vma); static asection *mmo_get_generic_spec_data_section (bfd *, int); static asection *mmo_get_spec_section (bfd *, int); @@ -388,48 +388,47 @@ static void mmo_xore_32 (asection *, bfd_vma vma, unsigned int); static void mmo_xore_16 (asection *, bfd_vma vma, unsigned int); static bfd_cleanup mmo_object_p (bfd *); static void mmo_map_set_sizes (bfd *, asection *, void *); -static bfd_boolean mmo_get_symbols (bfd *); -static bfd_boolean mmo_create_symbol (bfd *, const char *, bfd_vma, - enum mmo_sym_type, unsigned int); -static bfd_boolean mmo_get_section_contents (bfd *, asection *, void *, - file_ptr, bfd_size_type); +static bool mmo_get_symbols (bfd *); +static bool mmo_create_symbol (bfd *, const char *, bfd_vma, + enum mmo_sym_type, unsigned int); +static bool mmo_get_section_contents (bfd *, asection *, void *, + file_ptr, bfd_size_type); static long mmo_get_symtab_upper_bound (bfd *); static long mmo_canonicalize_symtab (bfd *, asymbol **); static void mmo_get_symbol_info (bfd *, asymbol *, symbol_info *); static void mmo_print_symbol (bfd *, void *, asymbol *, bfd_print_symbol_type); -static bfd_boolean mmo_set_section_contents (bfd *, sec_ptr, const void *, - file_ptr, bfd_size_type); +static bool mmo_set_section_contents (bfd *, sec_ptr, const void *, + file_ptr, bfd_size_type); static int mmo_sizeof_headers (bfd *, struct bfd_link_info *); -static bfd_boolean mmo_internal_write_header (bfd *); -static bfd_boolean mmo_internal_write_post (bfd *, int, asection *); -static bfd_boolean mmo_internal_add_3_sym (bfd *, struct mmo_symbol_trie *, +static bool mmo_internal_write_header (bfd *); +static bool mmo_internal_write_post (bfd *, int, asection *); +static bool mmo_internal_add_3_sym (bfd *, struct mmo_symbol_trie *, const struct mmo_symbol *); static unsigned int mmo_internal_3_length (bfd *, struct mmo_symbol_trie *); static void mmo_internal_3_dump (bfd *, struct mmo_symbol_trie *); static void mmo_beb128_out (bfd *, int, int); -static bfd_boolean mmo_internal_write_section (bfd *, asection *); +static bool mmo_internal_write_section (bfd *, asection *); static void mmo_write_tetra (bfd *, unsigned int); static void mmo_write_tetra_raw (bfd *, unsigned int); static void mmo_write_octa (bfd *, bfd_vma); static void mmo_write_octa_raw (bfd *, bfd_vma); -static bfd_boolean mmo_write_chunk (bfd *, const bfd_byte *, unsigned int); -static bfd_boolean mmo_flush_chunk (bfd *); -static bfd_boolean mmo_write_loc_chunk (bfd *, bfd_vma, const bfd_byte *, - unsigned int, bfd_vma *); -static bfd_boolean mmo_write_chunk_list (bfd *, mmo_data_list_type *); -static bfd_boolean mmo_write_loc_chunk_list (bfd *, mmo_data_list_type *); -static bfd_boolean mmo_write_symbols_and_terminator (bfd *); +static bool mmo_write_chunk (bfd *, const bfd_byte *, unsigned int); +static bool mmo_flush_chunk (bfd *); +static bool mmo_write_loc_chunk (bfd *, bfd_vma, const bfd_byte *, + unsigned int, bfd_vma *); +static bool mmo_write_chunk_list (bfd *, mmo_data_list_type *); +static bool mmo_write_loc_chunk_list (bfd *, mmo_data_list_type *); +static bool mmo_write_symbols_and_terminator (bfd *); static flagword mmo_sec_flags_from_bfd_flags (flagword); static flagword bfd_sec_flags_from_mmo_flags (flagword); static bfd_byte mmo_get_byte (bfd *); static void mmo_write_byte (bfd *, bfd_byte); -static bfd_boolean mmo_new_section_hook (bfd *, asection *); +static bool mmo_new_section_hook (bfd *, asection *); static int mmo_sort_mmo_symbols (const void *, const void *); -static bfd_boolean mmo_write_object_contents (bfd *); -static bfd_boolean mmo_write_section_description (bfd *, asection *); -static bfd_boolean mmo_has_leading_or_trailing_zero_tetra_p (bfd *, - asection *); +static bool mmo_write_object_contents (bfd *); +static bool mmo_write_section_description (bfd *, asection *); +static bool mmo_has_leading_or_trailing_zero_tetra_p (bfd *, asection *); static const char valid_mmo_symbol_character_set[] = @@ -491,11 +490,11 @@ mmo_make_section (bfd *abfd, const char *secname) static void mmo_init (void) { - static bfd_boolean inited = FALSE; + static bool inited = false; if (inited) return; - inited = TRUE; + inited = true; } /* Check whether an existing file is an mmo file. */ @@ -568,7 +567,7 @@ mmo_object_p (bfd *abfd) /* Set up the mmo tdata information. */ -static bfd_boolean +static bool mmo_mkobject (bfd *abfd) { mmo_init (); @@ -581,7 +580,7 @@ mmo_mkobject (bfd *abfd) initialize most. */ tdata_type *tdata = (tdata_type *) bfd_zalloc (abfd, sizeof (tdata_type)); if (tdata == NULL) - return FALSE; + return false; created = time (NULL); bfd_put_32 (abfd, created, tdata->created); @@ -589,10 +588,10 @@ mmo_mkobject (bfd *abfd) abfd->tdata.mmo_data = tdata; } - return TRUE; + return true; } -static bfd_boolean +static bool mmo_section_has_contents (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *p ATTRIBUTE_UNUSED) { /* The point is to match what --extract-symbols does (well, negated). */ @@ -606,7 +605,7 @@ mmo_section_has_contents (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void *p ATT known. However, calculating symbol consistency at the time the private BFD data is initialized is too late for some uses. */ -static bfd_boolean +static bool mmo_ignore_symbol_consistency (bfd *abfd) { if (!abfd->tdata.mmo_data->symbol_consistency_override_calculated) @@ -614,25 +613,25 @@ mmo_ignore_symbol_consistency (bfd *abfd) abfd->tdata.mmo_data->ignore_symbol_consistency = bfd_sections_find_if (abfd, mmo_section_has_contents, NULL) == NULL; - abfd->tdata.mmo_data->symbol_consistency_override_calculated = TRUE; + abfd->tdata.mmo_data->symbol_consistency_override_calculated = true; } return abfd->tdata.mmo_data->ignore_symbol_consistency; } -static bfd_boolean +static bool mmo_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { if (bfd_get_flavour (ibfd) != bfd_target_mmo_flavour || bfd_get_flavour (obfd) != bfd_target_mmo_flavour) - return TRUE; + return true; /* Copy the time the copied-from file was created. If people want the time the file was last *modified*, they have that in the normal file information. */ memcpy (obfd->tdata.mmo_data->created, ibfd->tdata.mmo_data->created, sizeof (obfd->tdata.mmo_data->created)); - return TRUE; + return true; } /* Helper functions for mmo_decide_section, used through @@ -786,7 +785,7 @@ mmo_write_tetra_raw (bfd *abfd, unsigned int value) bfd_put_32 (abfd, value, buf); if (bfd_bwrite (buf, 4, abfd) != 4) - abfd->tdata.mmo_data->have_error = TRUE; + abfd->tdata.mmo_data->have_error = true; } /* Write a 32-bit word to output file; lop_quote if necessary. */ @@ -821,10 +820,10 @@ mmo_write_octa_raw (bfd *abfd, bfd_vma value) /* Write quoted contents. Intended to be called multiple times in sequence, followed by a call to mmo_flush_chunk. */ -static INLINE bfd_boolean +static INLINE bool mmo_write_chunk (bfd *abfd, const bfd_byte *loc, unsigned int len) { - bfd_boolean retval = TRUE; + bool retval = true; struct mmo_data_struct *mmop = abfd->tdata.mmo_data; /* Fill up a tetra from bytes remaining from a previous chunk. */ @@ -866,14 +865,14 @@ mmo_write_chunk (bfd *abfd, const bfd_byte *loc, unsigned int len) } if (! retval) - mmop->have_error = TRUE; + mmop->have_error = true; return retval; } /* Flush remaining bytes, from a previous mmo_write_chunk, zero-padded to 4 bytes. */ -static INLINE bfd_boolean +static INLINE bool mmo_flush_chunk (bfd *abfd) { if (abfd->tdata.mmo_data->byte_no != 0) @@ -890,12 +889,12 @@ mmo_flush_chunk (bfd *abfd) /* Same, but from a list. */ -static INLINE bfd_boolean +static INLINE bool mmo_write_chunk_list (bfd *abfd, mmo_data_list_type *datap) { for (; datap != NULL; datap = datap->next) if (! mmo_write_chunk (abfd, datap->data, datap->size)) - return FALSE; + return false; return mmo_flush_chunk (abfd); } @@ -904,7 +903,7 @@ mmo_write_chunk_list (bfd *abfd, mmo_data_list_type *datap) mmo_flush_chunk after calling this function. The location is only output if different than *LAST_VMAP, which is updated after this call. */ -static bfd_boolean +static bool mmo_write_loc_chunk (bfd *abfd, bfd_vma vma, const bfd_byte *loc, unsigned int len, bfd_vma *last_vmap) { @@ -953,7 +952,7 @@ mmo_write_loc_chunk (bfd *abfd, bfd_vma vma, const bfd_byte *loc, " address %#" PRIx64 ""), abfd, (uint64_t) vma); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* We always write the location as 64 bits; no use saving bytes @@ -971,7 +970,7 @@ mmo_write_loc_chunk (bfd *abfd, bfd_vma vma, const bfd_byte *loc, /* Same, but from a list. */ -static INLINE bfd_boolean +static INLINE bool mmo_write_loc_chunk_list (bfd *abfd, mmo_data_list_type *datap) { /* Get an address different than the address of the first chunk. */ @@ -980,7 +979,7 @@ mmo_write_loc_chunk_list (bfd *abfd, mmo_data_list_type *datap) for (; datap != NULL; datap = datap->next) if (! mmo_write_loc_chunk (abfd, datap->where, datap->data, datap->size, &last_vma)) - return FALSE; + return false; return mmo_flush_chunk (abfd); } @@ -1177,7 +1176,7 @@ mmo_get_byte (bfd *abfd) if (! abfd->tdata.mmo_data->have_error && bfd_bread (abfd->tdata.mmo_data->buf, 4, abfd) != 4) { - abfd->tdata.mmo_data->have_error = TRUE; + abfd->tdata.mmo_data->have_error = true; /* A value somewhat safe against tripping on some inconsistency when mopping up after this error. */ @@ -1201,13 +1200,13 @@ mmo_write_byte (bfd *abfd, bfd_byte value) { if (! abfd->tdata.mmo_data->have_error && bfd_bwrite (abfd->tdata.mmo_data->buf, 4, abfd) != 4) - abfd->tdata.mmo_data->have_error = TRUE; + abfd->tdata.mmo_data->have_error = true; } } /* Create a symbol. */ -static bfd_boolean +static bool mmo_create_symbol (bfd *abfd, const char *symname, bfd_vma addr, enum mmo_sym_type sym_type, unsigned int serno) { @@ -1215,11 +1214,11 @@ mmo_create_symbol (bfd *abfd, const char *symname, bfd_vma addr, enum n = (struct mmo_symbol *) bfd_alloc (abfd, sizeof (struct mmo_symbol)); if (n == NULL) - return FALSE; + return false; n->name = bfd_alloc (abfd, strlen (symname) + 1); if (n->name == NULL) - return FALSE; + return false; strcpy (n->name, symname); @@ -1249,15 +1248,15 @@ mmo_create_symbol (bfd *abfd, const char *symname, bfd_vma addr, enum " is not `Main'\n"), abfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - return TRUE; + return true; } /* Read in symbols. */ -static bfd_boolean +static bool mmo_get_symbols (bfd *abfd) { /* @@ -1363,7 +1362,7 @@ SUBSECTION /* Check first if we have a bad hair day. */ if (abfd->tdata.mmo_data->have_error) - return FALSE; + return false; if (m & MMO3_LEFT) /* Traverse left trie. */ @@ -1396,8 +1395,8 @@ SUBSECTION " 0x%02X 0x%02X after symbol name starting with `%s'\n"), abfd, c, c2, abfd->tdata.mmo_data->lop_stab_symbol); bfd_set_error (bfd_error_bad_value); - abfd->tdata.mmo_data->have_error = TRUE; - return FALSE; + abfd->tdata.mmo_data->have_error = true; + return false; } else c = c2; @@ -1451,7 +1450,7 @@ SUBSECTION abfd->tdata.mmo_data->lop_stab_symbol + 1, addr, sym_type, serno)) - abfd->tdata.mmo_data->have_error = TRUE; + abfd->tdata.mmo_data->have_error = true; } if (m & MMO3_MIDDLE) @@ -1581,12 +1580,12 @@ mmo_map_set_sizes (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, /* Read the mmo file and turn it into sections. */ -static bfd_boolean +static bool mmo_scan (bfd *abfd) { unsigned int i; unsigned int lineno = 1; - bfd_boolean error = FALSE; + bool error = false; bfd_vma vma = 0; asection *sec = NULL; asection *non_spec_sec = NULL; @@ -2061,7 +2060,7 @@ mmo_scan (bfd *abfd) bfd_set_error (bfd_error_bad_value); error_return: - error = TRUE; + error = true; done: /* Mark the .text and .data section with their normal attribute if they contain anything. This is not redundant wrt. mmo_decide_section, @@ -2072,14 +2071,14 @@ mmo_scan (bfd *abfd) && (bfd_section_flags (sec) & SEC_HAS_CONTENTS) && !bfd_set_section_flags (sec, (bfd_section_flags (sec) | SEC_ALLOC | SEC_LOAD | SEC_CODE))) - error = TRUE; + error = true; sec = bfd_get_section_by_name (abfd, MMO_DATA_SECTION_NAME); if (sec != NULL && (bfd_section_flags (sec) & SEC_HAS_CONTENTS) && !bfd_set_section_flags (sec, (bfd_section_flags (sec) | SEC_ALLOC | SEC_LOAD | SEC_DATA))) - error = TRUE; + error = true; /* Free whatever resources we took. */ for (i = 0; i < sizeof (file_names) / sizeof (file_names[0]); i++) @@ -2090,7 +2089,7 @@ mmo_scan (bfd *abfd) /* A hook to set up object file dependent section information. For mmo, we point out the shape of allocated section contents. */ -static bfd_boolean +static bool mmo_new_section_hook (bfd *abfd, asection *newsect) { if (!newsect->used_by_bfd) @@ -2100,7 +2099,7 @@ mmo_new_section_hook (bfd *abfd, asection *newsect) newsect->used_by_bfd = bfd_zalloc (abfd, sizeof (struct mmo_section_data_struct)); if (!newsect->used_by_bfd) - return FALSE; + return false; } /* Always align to at least 32-bit words. */ @@ -2111,7 +2110,7 @@ mmo_new_section_hook (bfd *abfd, asection *newsect) /* We already have section contents loaded for sections that have contents. */ -static bfd_boolean +static bool mmo_get_section_contents (bfd *abfd ATTRIBUTE_UNUSED, asection *sec, void * location, @@ -2134,7 +2133,7 @@ mmo_get_section_contents (bfd *abfd ATTRIBUTE_UNUSED, while (loc == NULL && (chunk_size /= 2) != 0); if (chunk_size == 0) - return FALSE; + return false; memcpy (location, loc, chunk_size); @@ -2142,7 +2141,7 @@ mmo_get_section_contents (bfd *abfd ATTRIBUTE_UNUSED, bytes_to_do -= chunk_size; offset += chunk_size; } - return TRUE; + return true; } /* Return the amount of memory needed to read the symbol table. */ @@ -2322,19 +2321,19 @@ mmo_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, /* Write the (section-neutral) file preamble. */ -static bfd_boolean +static bool mmo_internal_write_header (bfd *abfd) { const char lop_pre_bfd[] = { LOP, LOP_PRE, 1, 1}; if (bfd_bwrite (lop_pre_bfd, 4, abfd) != 4) - return FALSE; + return false; /* Copy creation time of original file. */ if (bfd_bwrite (abfd->tdata.mmo_data->created, 4, abfd) != 4) - return FALSE; + return false; - return TRUE; + return true; } /* Write the LOP_POST record, with global register initializations. @@ -2342,7 +2341,7 @@ mmo_internal_write_header (bfd *abfd) registers at DATA. The Z = 255 field is filled in with the start-address. */ -static bfd_boolean +static bool mmo_internal_write_post (bfd *abfd, int z, asection *sec) { int i; @@ -2354,7 +2353,7 @@ mmo_internal_write_post (bfd *abfd, int z, asection *sec) bfd_byte *data = mmo_get_loc (sec, i * 8, 8); if (bfd_bwrite (data, 8, abfd) != 8) - return FALSE; + return false; } /* For Z == $255, we always emit the start location; supposedly Main, @@ -2425,25 +2424,25 @@ bfd_sec_flags_from_mmo_flags (flagword flags) /* Return TRUE iff the leading or trailing tetrabyte in SEC is defined and is 0. */ -static bfd_boolean +static bool mmo_has_leading_or_trailing_zero_tetra_p (bfd *abfd, asection *sec) { bfd_vma secaddr = bfd_section_vma (sec); if (sec->size < 4) - return FALSE; + return false; if (bfd_get_32 (abfd, mmo_get_loc (sec, secaddr, 4)) == 0 && bfd_get_32 (abfd, mmo_get_loc (sec, secaddr + sec->size - 4, 4)) == 0) - return TRUE; + return true; - return FALSE; + return false; } /* Write a section. */ -static bfd_boolean +static bool mmo_internal_write_section (bfd *abfd, asection *sec) { /* We do it differently depending on what section this is: @@ -2473,7 +2472,7 @@ mmo_internal_write_section (bfd *abfd, asection *sec) || mmo_has_leading_or_trailing_zero_tetra_p (abfd, sec))) { if (!mmo_write_section_description (abfd, sec)) - return FALSE; + return false; } /* FIXME: Output source file name and line number. */ @@ -2492,7 +2491,7 @@ mmo_internal_write_section (bfd *abfd, asection *sec) || mmo_has_leading_or_trailing_zero_tetra_p (abfd, sec))) { if (!mmo_write_section_description (abfd, sec)) - return FALSE; + return false; } return mmo_write_loc_chunk_list (abfd, mmo_section_data (sec)->head); @@ -2503,7 +2502,7 @@ mmo_internal_write_section (bfd *abfd, asection *sec) /* This would normally be an abort call since this can't happen, but we don't do that. */ bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } else if (startswith (sec->name, MMIX_OTHER_SPEC_SECTION_PREFIX)) { @@ -2519,7 +2518,7 @@ mmo_internal_write_section (bfd *abfd, asection *sec) && sec->size != 0) { if (!mmo_write_section_description (abfd, sec)) - return FALSE; + return false; /* Writing a LOP_LOC ends the LOP_SPEC data, and makes data actually loaded. */ @@ -2532,12 +2531,12 @@ mmo_internal_write_section (bfd *abfd, asection *sec) } /* Some section without contents. */ - return TRUE; + return true; } /* Write the description of a section, extended-mmo-style. */ -static bfd_boolean +static bool mmo_write_section_description (bfd *abfd, asection *sec) { /* Keep the following document-comment formatted the way it is. */ @@ -2645,12 +2644,12 @@ EXAMPLE mmo_sec_flags_from_bfd_flags (bfd_section_flags (sec))); mmo_write_octa (abfd, sec->size); mmo_write_octa (abfd, bfd_section_vma (sec)); - return TRUE; + return true; } /* We save up all data before output. */ -static bfd_boolean +static bool mmo_set_section_contents (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr sec, const void *location, file_ptr offset, bfd_size_type bytes_to_do) @@ -2670,7 +2669,7 @@ mmo_set_section_contents (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr sec, while (loc == NULL && (chunk_size /= 2) != 0); if (chunk_size == 0) - return FALSE; + return false; memcpy (loc, location, chunk_size); @@ -2678,12 +2677,12 @@ mmo_set_section_contents (bfd *abfd ATTRIBUTE_UNUSED, sec_ptr sec, bytes_to_do -= chunk_size; offset += chunk_size; } - return TRUE; + return true; } /* Add a symbol to a trie-tree. */ -static bfd_boolean +static bool mmo_internal_add_3_sym (bfd *abfd, struct mmo_symbol_trie *rootp, const struct mmo_symbol *symp) { @@ -2735,11 +2734,11 @@ mmo_internal_add_3_sym (bfd *abfd, struct mmo_symbol_trie *rootp, (_("%pB: invalid symbol table: duplicate symbol `%s'\n"), abfd, trie->sym.name); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } memcpy (&trie->sym, symp, sizeof *symp); - return TRUE; + return true; } /* Find out the length of the serialized version of a trie in bytes. */ @@ -2907,7 +2906,7 @@ mmo_internal_3_dump (bfd *abfd, struct mmo_symbol_trie *trie) /* Write symbols in mmo format. Also write the lop_end terminator. */ -static bfd_boolean +static bool mmo_write_symbols_and_terminator (bfd *abfd) { int count = bfd_get_symcount (abfd); @@ -2936,7 +2935,7 @@ mmo_write_symbols_and_terminator (bfd *abfd) symbols. Make sure we have room for it. */ table = bfd_alloc (abfd, (count + 1) * sizeof (asymbol *)); if (table == NULL) - return FALSE; + return false; if (count != 0) memcpy (table, orig_table, count * sizeof (asymbol *)); @@ -2980,7 +2979,7 @@ mmo_write_symbols_and_terminator (bfd *abfd) " than the start address %s\n"), abfd, vmas_main, vmas_start); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } break; } @@ -3050,7 +3049,7 @@ mmo_write_symbols_and_terminator (bfd *abfd) sym.serno = serno++; if (! mmo_internal_add_3_sym (abfd, &root, &sym)) - return FALSE; + return false; } } } @@ -3093,7 +3092,7 @@ mmo_write_symbols_and_terminator (bfd *abfd) root.right = NULL; if (! mmo_internal_add_3_sym (abfd, &root, &sym)) - return FALSE; + return false; root.symchar = ':'; root.middle = root.left; @@ -3109,7 +3108,7 @@ mmo_write_symbols_and_terminator (bfd *abfd) /* Put out the lop_stab mark. */ bfd_put_32 (abfd, (LOP << 24) | (LOP_STAB << 16), buf); if (bfd_bwrite (buf, 4, abfd) != 4) - return FALSE; + return false; /* Dump out symbols. */ mmo_internal_3_dump (abfd, &root); @@ -3126,7 +3125,7 @@ mmo_write_symbols_and_terminator (bfd *abfd) abfd, trie_len, (abfd->tdata.mmo_data->byte_no + 3)/4); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Dump out remaining bytes in the buffer and handle I/O errors by @@ -3139,7 +3138,7 @@ mmo_write_symbols_and_terminator (bfd *abfd) if (abfd->tdata.mmo_data->have_error || bfd_bwrite (abfd->tdata.mmo_data->buf, 4, abfd) != 4) - return FALSE; + return false; } bfd_put_32 (abfd, (LOP << 24) | (LOP_END << 16) | trie_len, buf); @@ -3178,7 +3177,7 @@ mmo_write_section_unless_reg_contents (bfd *abfd, asection *sec, void *p) " contents\n"), abfd, sec); bfd_set_error (bfd_error_bad_value); - infop->retval = FALSE; + infop->retval = false; return; } @@ -3191,23 +3190,23 @@ mmo_write_section_unless_reg_contents (bfd *abfd, asection *sec, void *p) /* Do the actual output of a file. Assumes mmo_set_section_contents is already called. */ -static bfd_boolean +static bool mmo_write_object_contents (bfd *abfd) { struct mmo_write_sec_info wsecinfo; /* First, there are a few words of preamble. */ if (! mmo_internal_write_header (abfd)) - return FALSE; + return false; wsecinfo.reg_section = NULL; - wsecinfo.retval = TRUE; + wsecinfo.retval = true; bfd_map_over_sections (abfd, mmo_write_section_unless_reg_contents, &wsecinfo); if (! wsecinfo.retval) - return FALSE; + return false; if (wsecinfo.reg_section != NULL) { @@ -3241,15 +3240,15 @@ mmo_write_object_contents (bfd *abfd) " length %" PRId64 ": %#" PRIx64), abfd, (int64_t) sec->size, (uint64_t) sec->vma); - return FALSE; + return false; } if (! mmo_internal_write_post (abfd, z, sec)) - return FALSE; + return false; } else if (! mmo_internal_write_post (abfd, 255, NULL)) - return FALSE; + return false; return mmo_write_symbols_and_terminator (abfd); } diff --git a/bfd/netbsd.h b/bfd/netbsd.h index 41162bb5d4..adaa91a36a 100644 --- a/bfd/netbsd.h +++ b/bfd/netbsd.h @@ -64,7 +64,7 @@ #define MY_entry_is_text_address 1 #define MY_write_object_contents MY (write_object_contents) -static bfd_boolean MY (write_object_contents) (bfd *); +static bool MY (write_object_contents) (bfd *); #define MY_text_includes_header 1 @@ -74,7 +74,7 @@ static bfd_boolean MY (write_object_contents) (bfd *); Section contents have already been written. We write the file header, symbols, and relocation. */ -static bfd_boolean +static bool MY (write_object_contents) (bfd *abfd) { struct external_exec exec_bytes; @@ -110,5 +110,5 @@ MY (write_object_contents) (bfd *abfd) WRITE_HEADERS (abfd, execp); - return TRUE; + return true; } diff --git a/bfd/opncls.c b/bfd/opncls.c index 30ef9fd537..26faaa6c9a 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -135,7 +135,7 @@ _bfd_delete_bfd (bfd *abfd) /* Free objalloc memory. */ -bfd_boolean +bool _bfd_free_cached_info (bfd *abfd) { if (abfd->memory) @@ -159,7 +159,7 @@ _bfd_free_cached_info (bfd *abfd) size_t len = strlen (filename) + 1; char *copy = bfd_malloc (len); if (copy == NULL) - return FALSE; + return false; memcpy (copy, filename, len); abfd->filename = copy; } @@ -174,7 +174,7 @@ _bfd_free_cached_info (bfd *abfd) abfd->memory = NULL; } - return TRUE; + return true; } /* @@ -280,14 +280,14 @@ bfd_fopen (const char *filename, const char *target, const char *mode, int fd) _bfd_delete_bfd (nbfd); return NULL; } - nbfd->opened_once = TRUE; + nbfd->opened_once = true; /* If we opened the file by name, mark it cacheable; we can close it and reopen it later. However, if a file descriptor was provided, then it may have been opened with special flags that make it unsafe to close and reopen the file. */ if (fd == -1) - (void) bfd_set_cacheable (nbfd, TRUE); + (void) bfd_set_cacheable (nbfd, true); return nbfd; } @@ -783,7 +783,7 @@ FUNCTION bfd_close SYNOPSIS - bfd_boolean bfd_close (bfd *abfd); + bool bfd_close (bfd *abfd); DESCRIPTION Close a BFD. If the BFD was open for writing, then pending @@ -800,13 +800,13 @@ RETURNS <> is returned if all is ok, otherwise <>. */ -bfd_boolean +bool bfd_close (bfd *abfd) { if (bfd_write_p (abfd)) { if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd))) - return FALSE; + return false; } return bfd_close_all_done (abfd); @@ -817,7 +817,7 @@ FUNCTION bfd_close_all_done SYNOPSIS - bfd_boolean bfd_close_all_done (bfd *); + bool bfd_close_all_done (bfd *); DESCRIPTION Close a BFD. Differs from <> since it does not @@ -834,13 +834,13 @@ RETURNS <> is returned if all is ok, otherwise <>. */ -bfd_boolean +bool bfd_close_all_done (bfd *abfd) { - bfd_boolean ret; + bool ret; if (! BFD_SEND (abfd, _close_and_cleanup, (abfd))) - return FALSE; + return false; ret = abfd->iovec->bclose (abfd) == 0; @@ -896,7 +896,7 @@ FUNCTION bfd_make_writable SYNOPSIS - bfd_boolean bfd_make_writable (bfd *abfd); + bool bfd_make_writable (bfd *abfd); DESCRIPTION Takes a BFD as created by <> and converts it @@ -908,7 +908,7 @@ RETURNS <> is returned if all is ok, otherwise <>. */ -bfd_boolean +bool bfd_make_writable (bfd *abfd) { struct bfd_in_memory *bim; @@ -916,12 +916,12 @@ bfd_make_writable (bfd *abfd) if (abfd->direction != no_direction) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } bim = (struct bfd_in_memory *) bfd_malloc (sizeof (struct bfd_in_memory)); if (bim == NULL) - return FALSE; /* bfd_error already set. */ + return false; /* bfd_error already set. */ abfd->iostream = bim; /* bfd_bwrite will grow these as needed. */ bim->size = 0; @@ -933,7 +933,7 @@ bfd_make_writable (bfd *abfd) abfd->direction = write_direction; abfd->where = 0; - return TRUE; + return true; } /* @@ -941,7 +941,7 @@ FUNCTION bfd_make_readable SYNOPSIS - bfd_boolean bfd_make_readable (bfd *abfd); + bool bfd_make_readable (bfd *abfd); DESCRIPTION Takes a BFD as created by <> and @@ -953,20 +953,20 @@ DESCRIPTION RETURNS <> is returned if all is ok, otherwise <>. */ -bfd_boolean +bool bfd_make_readable (bfd *abfd) { if (abfd->direction != write_direction || !(abfd->flags & BFD_IN_MEMORY)) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (! BFD_SEND_FMT (abfd, _bfd_write_contents, (abfd))) - return FALSE; + return false; if (! BFD_SEND (abfd, _close_and_cleanup, (abfd))) - return FALSE; + return false; abfd->arch_info = &bfd_default_arch_struct; @@ -974,15 +974,15 @@ bfd_make_readable (bfd *abfd) abfd->format = bfd_unknown; abfd->my_archive = NULL; abfd->origin = 0; - abfd->opened_once = FALSE; - abfd->output_has_begun = FALSE; + abfd->opened_once = false; + abfd->output_has_begun = false; abfd->section_count = 0; abfd->usrdata = NULL; - abfd->cacheable = FALSE; + abfd->cacheable = false; abfd->flags |= BFD_IN_MEMORY; - abfd->mtime_set = FALSE; + abfd->mtime_set = false; - abfd->target_defaulted = TRUE; + abfd->target_defaulted = true; abfd->direction = read_direction; abfd->sections = 0; abfd->symcount = 0; @@ -992,7 +992,7 @@ bfd_make_readable (bfd *abfd) bfd_section_list_clear (abfd); bfd_check_format (abfd, bfd_object); - return TRUE; + return true; } /* @@ -1332,7 +1332,7 @@ INTERNAL_FUNCTION separate_debug_file_exists SYNOPSIS - bfd_boolean separate_debug_file_exists + bool separate_debug_file_exists (char *name, void *crc32_p); DESCRIPTION @@ -1344,7 +1344,7 @@ DESCRIPTION this routine is used as a @code{check_func_type} function. */ -static bfd_boolean +static bool separate_debug_file_exists (const char *name, void *crc32_p) { unsigned char buffer[8 * 1024]; @@ -1360,7 +1360,7 @@ separate_debug_file_exists (const char *name, void *crc32_p) f = _bfd_real_fopen (name, FOPEN_RB); if (f == NULL) - return FALSE; + return false; while ((count = fread (buffer, 1, sizeof (buffer), f)) > 0) file_crc = bfd_calc_gnu_debuglink_crc32 (file_crc, buffer, count); @@ -1375,14 +1375,14 @@ INTERNAL_FUNCTION separate_alt_debug_file_exists SYNOPSIS - bfd_boolean separate_alt_debug_file_exists + bool separate_alt_debug_file_exists (char *name, void *unused); DESCRIPTION Checks to see if @var{name} is a file. */ -static bfd_boolean +static bool separate_alt_debug_file_exists (const char *name, void *unused ATTRIBUTE_UNUSED) { FILE *f; @@ -1391,11 +1391,11 @@ separate_alt_debug_file_exists (const char *name, void *unused ATTRIBUTE_UNUSED) f = _bfd_real_fopen (name, FOPEN_RB); if (f == NULL) - return FALSE; + return false; fclose (f); - return TRUE; + return true; } /* @@ -1404,7 +1404,7 @@ INTERNAL_FUNCTION SYNOPSIS char *find_separate_debug_file - (bfd *abfd, const char *dir, bfd_boolean include_dirs, + (bfd *abfd, const char *dir, bool include_dirs, get_func_type get, check_func_type check, void *data); DESCRIPTION @@ -1427,16 +1427,16 @@ RETURNS Returns NULL if no valid file could be found. */ -typedef char * (* get_func_type) (bfd *, void *); -typedef bfd_boolean (* check_func_type) (const char *, void *); +typedef char * (*get_func_type) (bfd *, void *); +typedef bool (*check_func_type) (const char *, void *); static char * -find_separate_debug_file (bfd * abfd, - const char * debug_file_directory, - bfd_boolean include_dirs, - get_func_type get_func, +find_separate_debug_file (bfd *abfd, + const char *debug_file_directory, + bool include_dirs, + get_func_type get_func, check_func_type check_func, - void * func_data) + void *func_data) { char *base; char *dir; @@ -1616,7 +1616,7 @@ bfd_follow_gnu_debuglink (bfd *abfd, const char *dir) { unsigned long crc32; - return find_separate_debug_file (abfd, dir, TRUE, + return find_separate_debug_file (abfd, dir, true, bfd_get_debug_link_info_1, separate_debug_file_exists, &crc32); } @@ -1663,7 +1663,7 @@ RETURNS char * bfd_follow_gnu_debugaltlink (bfd *abfd, const char *dir) { - return find_separate_debug_file (abfd, dir, TRUE, + return find_separate_debug_file (abfd, dir, true, get_alt_debug_link_info_shim, separate_alt_debug_file_exists, NULL); @@ -1741,7 +1741,7 @@ FUNCTION bfd_fill_in_gnu_debuglink_section SYNOPSIS - bfd_boolean bfd_fill_in_gnu_debuglink_section + bool bfd_fill_in_gnu_debuglink_section (bfd *abfd, struct bfd_section *sect, const char *filename); DESCRIPTION @@ -1755,7 +1755,7 @@ RETURNS and bfd_error is set. */ -bfd_boolean +bool bfd_fill_in_gnu_debuglink_section (bfd *abfd, struct bfd_section *sect, const char *filename) @@ -1772,7 +1772,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd, if (abfd == NULL || sect == NULL || filename == NULL) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* Make sure that we can read the file. @@ -1785,7 +1785,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd, if (handle == NULL) { bfd_set_error (bfd_error_system_call); - return FALSE; + return false; } crc32 = 0; @@ -1807,7 +1807,7 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd, if (contents == NULL) { /* XXX Should we delete the section from the bfd ? */ - return FALSE; + return false; } crc_offset = debuglink_size - 4; @@ -1820,10 +1820,10 @@ bfd_fill_in_gnu_debuglink_section (bfd *abfd, { /* XXX Should we delete the section from the bfd ? */ free (contents); - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -1996,7 +1996,7 @@ INTERNAL_FUNCTION check_build_id_file SYNOPSIS - bfd_boolean check_build_id_file (char *name, void *buildid_p); + bool check_build_id_file (char *name, void *buildid_p); DESCRIPTION Checks to see if @var{name} is a readable file and if its build-id @@ -2008,33 +2008,33 @@ RETURNS @var{build_id_p} (which is really a @code{struct bfd_build_id **}). */ -static bfd_boolean +static bool check_build_id_file (const char *name, void *buildid_p) { struct bfd_build_id *orig_build_id; struct bfd_build_id *build_id; bfd * file; - bfd_boolean result; + bool result; BFD_ASSERT (name); BFD_ASSERT (buildid_p); file = bfd_openr (name, NULL); if (file == NULL) - return FALSE; + return false; /* If the file is an archive, process all of its elements. */ if (! bfd_check_format (file, bfd_object)) { bfd_close (file); - return FALSE; + return false; } build_id = get_build_id (file); if (build_id == NULL) { bfd_close (file); - return FALSE; + return false; } orig_build_id = *(struct bfd_build_id **) buildid_p; @@ -2080,7 +2080,7 @@ bfd_follow_build_id_debuglink (bfd *abfd, const char *dir) { struct bfd_build_id *build_id; - return find_separate_debug_file (abfd, dir, FALSE, + return find_separate_debug_file (abfd, dir, false, get_build_id_name, check_build_id_file, &build_id); } diff --git a/bfd/pc532-mach.c b/bfd/pc532-mach.c index 33a4bd0325..ff149709e6 100644 --- a/bfd/pc532-mach.c +++ b/bfd/pc532-mach.c @@ -77,7 +77,7 @@ reloc_howto_type *MY_bfd_reloc_type_lookup (bfd *abfd, bfd_reloc_code_real_type code); -static bfd_boolean +static bool MY(write_object_contents) (bfd *abfd) { struct external_exec exec_bytes; @@ -100,7 +100,7 @@ MY(write_object_contents) (bfd *abfd) WRITE_HEADERS (abfd, execp); - return TRUE; + return true; } #define MY_write_object_contents MY(write_object_contents) diff --git a/bfd/pdp11.c b/bfd/pdp11.c index 8992f4e543..75ddf2038c 100644 --- a/bfd/pdp11.c +++ b/bfd/pdp11.c @@ -145,7 +145,7 @@ struct pdp11_external_nlist #define MY_entry_is_text_address 1 #define MY_write_object_contents MY(write_object_contents) -static bfd_boolean MY(write_object_contents) (bfd *); +static bool MY(write_object_contents) (bfd *); #define MY_text_includes_header 1 #define MY_BFD_TARGET @@ -275,23 +275,25 @@ struct aout_final_link_info /* Copy of the link_info.separate_code boolean to select the output format with separate instruction and data spaces selected by --imagic */ -static bfd_boolean separate_i_d = FALSE; +static bool separate_i_d = false; reloc_howto_type howto_table_pdp11[] = { /* type rs size bsz pcrel bitpos ovrf sf name part_inpl readmask setmask pcdone */ -HOWTO( 0, 0, 1, 16, FALSE, 0, complain_overflow_signed,0,"16", TRUE, 0x0000ffff,0x0000ffff, FALSE), -HOWTO( 1, 0, 1, 16, TRUE, 0, complain_overflow_signed,0,"DISP16", TRUE, 0x0000ffff,0x0000ffff, FALSE), -HOWTO( 2, 0, 2, 32, FALSE, 0, complain_overflow_signed,0,"32", TRUE, 0x0000ffff,0x0000ffff, FALSE), +HOWTO( 0, 0, 1, 16, false, 0, complain_overflow_signed,0,"16", true, 0x0000ffff,0x0000ffff, false), +HOWTO( 1, 0, 1, 16, true, 0, complain_overflow_signed,0,"DISP16", true, 0x0000ffff,0x0000ffff, false), +HOWTO( 2, 0, 2, 32, false, 0, complain_overflow_signed,0,"32", true, 0x0000ffff,0x0000ffff, false), }; #define TABLE_SIZE(TABLE) (sizeof(TABLE)/sizeof(TABLE[0])) -static bfd_boolean aout_link_check_archive_element (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, const char *, bfd_boolean *); -static bfd_boolean aout_link_add_object_symbols (bfd *, struct bfd_link_info *); -static bfd_boolean aout_link_add_symbols (bfd *, struct bfd_link_info *); -static bfd_boolean aout_link_write_symbols (struct aout_final_link_info *, bfd *); +static bool aout_link_check_archive_element (bfd *, struct bfd_link_info *, + struct bfd_link_hash_entry *, + const char *, bool *); +static bool aout_link_add_object_symbols (bfd *, struct bfd_link_info *); +static bool aout_link_add_symbols (bfd *, struct bfd_link_info *); +static bool aout_link_write_symbols (struct aout_final_link_info *, bfd *); reloc_howto_type * @@ -366,21 +368,21 @@ pdp11_aout_write_headers (bfd *abfd, struct internal_exec *execp) NAME (aout, swap_exec_header_out) (abfd, execp, & exec_bytes); if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bwrite ((void *) &exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, abfd) != EXEC_BYTES_SIZE) - return FALSE; + return false; /* Now write out reloc info, followed by syms and strings. */ if (bfd_get_outsymbols (abfd) != NULL && bfd_get_symcount (abfd) != 0) { if (bfd_seek (abfd, (file_ptr) (N_SYMOFF (execp)), SEEK_SET) != 0) - return FALSE; + return false; if (! NAME (aout, write_syms) (abfd)) - return FALSE; + return false; } if (obj_textsec (abfd)->reloc_count > 0 @@ -390,17 +392,17 @@ pdp11_aout_write_headers (bfd *abfd, struct internal_exec *execp) || !NAME (aout, squirt_out_relocs) (abfd, obj_textsec (abfd)) || bfd_seek (abfd, (file_ptr) (N_DRELOFF (execp)), SEEK_SET) != 0 || !NAME (aout, squirt_out_relocs) (abfd, obj_datasec (abfd))) - return FALSE; + return false; } - return TRUE; + return true; } /* Write an object file. Section contents have already been written. We write the file header, symbols, and relocation. */ -static bfd_boolean +static bool MY(write_object_contents) (bfd *abfd) { struct internal_exec *execp = exec_hdr (abfd); @@ -485,16 +487,16 @@ NAME (aout, swap_exec_header_out) (bfd *abfd, /* Make all the section for an a.out file. */ -bfd_boolean +bool NAME (aout, make_sections) (bfd *abfd) { if (obj_textsec (abfd) == NULL && bfd_make_section (abfd, ".text") == NULL) - return FALSE; + return false; if (obj_datasec (abfd) == NULL && bfd_make_section (abfd, ".data") == NULL) - return FALSE; + return false; if (obj_bsssec (abfd) == NULL && bfd_make_section (abfd, ".bss") == NULL) - return FALSE; - return TRUE; + return false; + return true; } /* Some a.out variant thinks that the file open in ABFD @@ -699,7 +701,7 @@ NAME (aout, some_aout_object_p) (bfd *abfd, /* Initialize ABFD for use with a.out files. */ -bfd_boolean +bool NAME (aout, mkobject) (bfd *abfd) { struct aout_data_struct *rawptr; @@ -711,7 +713,7 @@ NAME (aout, mkobject) (bfd *abfd) rawptr = bfd_zalloc (abfd, amt); if (rawptr == NULL) - return FALSE; + return false; abfd->tdata.aout_data = rawptr; exec_hdr (abfd) = &(rawptr->e); @@ -720,7 +722,7 @@ NAME (aout, mkobject) (bfd *abfd) obj_datasec (abfd) = NULL; obj_bsssec (abfd) = NULL; - return TRUE; + return true; } /* Keep track of machine architecture and machine type for @@ -734,12 +736,12 @@ NAME (aout, mkobject) (bfd *abfd) enum machine_type NAME (aout, machine_type) (enum bfd_architecture arch, unsigned long machine, - bfd_boolean *unknown) + bool *unknown) { enum machine_type arch_flags; arch_flags = M_UNKNOWN; - *unknown = TRUE; + *unknown = true; switch (arch) { @@ -796,11 +798,11 @@ NAME (aout, machine_type) (enum bfd_architecture arch, case bfd_arch_pdp11: /* TODO: arch_flags = M_PDP11; */ - *unknown = FALSE; + *unknown = false; break; case bfd_arch_vax: - *unknown = FALSE; + *unknown = false; break; default: @@ -808,7 +810,7 @@ NAME (aout, machine_type) (enum bfd_architecture arch, } if (arch_flags != M_UNKNOWN) - *unknown = FALSE; + *unknown = false; return arch_flags; } @@ -817,21 +819,21 @@ NAME (aout, machine_type) (enum bfd_architecture arch, values ARCH and MACHINE. Verify that @ABFD's format can support the architecture required. */ -bfd_boolean +bool NAME (aout, set_arch_mach) (bfd *abfd, enum bfd_architecture arch, unsigned long machine) { if (! bfd_default_set_arch_mach (abfd, arch, machine)) - return FALSE; + return false; if (arch != bfd_arch_unknown) { - bfd_boolean unknown; + bool unknown; NAME (aout, machine_type) (arch, machine, &unknown); if (unknown) - return FALSE; + return false; } obj_reloc_entry_size (abfd) = RELOC_SIZE; @@ -905,7 +907,7 @@ adjust_z_magic (bfd *abfd, struct internal_exec *execp) file_ptr text_end; const struct aout_backend_data *abdp; /* TRUE if text includes exec header. */ - bfd_boolean ztih; + bool ztih; asection *text = obj_textsec (abfd); asection *data = obj_datasec (abfd); asection *bss = obj_bsssec (abfd); @@ -1085,16 +1087,16 @@ adjust_i_magic (bfd *abfd, struct internal_exec *execp) N_SET_MAGIC (execp, IMAGIC); } -bfd_boolean +bool NAME (aout, adjust_sizes_and_vmas) (bfd *abfd) { struct internal_exec *execp = exec_hdr (abfd); if (! NAME (aout, make_sections) (abfd)) - return FALSE; + return false; if (adata (abfd).magic != undecided_magic) - return TRUE; + return true; execp->a_text = align_power (obj_textsec (abfd)->size, obj_textsec (abfd)->alignment_power); @@ -1172,12 +1174,12 @@ NAME (aout, adjust_sizes_and_vmas) (bfd *abfd) obj_bsssec (abfd)->vma, execp->a_bss); #endif - return TRUE; + return true; } /* Called by the BFD in response to a bfd_make_section request. */ -bfd_boolean +bool NAME (aout, new_section_hook) (bfd *abfd, asection *newsect) { /* Align to double at least. */ @@ -1209,7 +1211,7 @@ NAME (aout, new_section_hook) (bfd *abfd, asection *newsect) return _bfd_generic_new_section_hook (abfd, newsect); } -bfd_boolean +bool NAME (aout, set_section_contents) (bfd *abfd, sec_ptr section, const void * location, @@ -1219,13 +1221,13 @@ NAME (aout, set_section_contents) (bfd *abfd, if (! abfd->output_has_begun) { if (! NAME (aout, adjust_sizes_and_vmas) (abfd)) - return FALSE; + return false; } if (section == obj_bsssec (abfd)) { bfd_set_error (bfd_error_no_contents); - return FALSE; + return false; } if (section != obj_textsec (abfd) @@ -1236,22 +1238,22 @@ NAME (aout, set_section_contents) (bfd *abfd, (_("%pB: can not represent section `%pA' in a.out object file format"), abfd, section); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } if (count != 0) { if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; } - return TRUE; + return true; } /* Read the external symbols from an a.out file. */ -static bfd_boolean +static bool aout_get_external_symbols (bfd *abfd) { if (obj_aout_external_syms (abfd) == NULL) @@ -1266,26 +1268,26 @@ aout_get_external_symbols (bfd *abfd) { obj_aout_external_syms (abfd) = NULL; obj_aout_external_sym_count (abfd) = count; - return TRUE; + return true; } #ifdef USE_MMAP if (! bfd_get_file_window (abfd, obj_sym_filepos (abfd), exec_hdr (abfd)->a_syms, - &obj_aout_sym_window (abfd), TRUE)) - return FALSE; + &obj_aout_sym_window (abfd), true)) + return false; syms = (struct external_nlist *) obj_aout_sym_window (abfd).data; #else /* We allocate using malloc to make the values easy to free later on. If we put them on the objalloc it might not be possible to free them. */ if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0) - return FALSE; + return false; syms = (struct external_nlist *) _bfd_malloc_and_read (abfd, count * EXTERNAL_NLIST_SIZE, count * EXTERNAL_NLIST_SIZE); if (syms == NULL) - return FALSE; + return false; #endif obj_aout_external_syms (abfd) = syms; @@ -1303,7 +1305,7 @@ aout_get_external_symbols (bfd *abfd) /* Get the size of the strings. */ if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0 || bfd_bread ((void *) string_chars, amt, abfd) != amt) - return FALSE; + return false; stringsize = H_GET_32 (abfd, string_chars); if (stringsize == 0) stringsize = 1; @@ -1311,15 +1313,15 @@ aout_get_external_symbols (bfd *abfd) || (size_t) stringsize != stringsize) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } #ifdef USE_MMAP if (stringsize >= BYTES_IN_LONG) { if (! bfd_get_file_window (abfd, obj_str_filepos (abfd), stringsize + 1, - &obj_aout_string_window (abfd), TRUE)) - return FALSE; + &obj_aout_string_window (abfd), true)) + return false; strings = (char *) obj_aout_string_window (abfd).data; } else @@ -1327,7 +1329,7 @@ aout_get_external_symbols (bfd *abfd) { strings = (char *) bfd_malloc (stringsize + 1); if (strings == NULL) - return FALSE; + return false; if (stringsize >= BYTES_IN_LONG) { @@ -1337,7 +1339,7 @@ aout_get_external_symbols (bfd *abfd) if (bfd_bread (strings + BYTES_IN_LONG, amt, abfd) != amt) { free (strings); - return FALSE; + return false; } } } @@ -1351,7 +1353,7 @@ aout_get_external_symbols (bfd *abfd) obj_aout_external_string_size (abfd) = stringsize; } - return TRUE; + return true; } /* Translate an a.out symbol into a BFD symbol. The desc, other, type @@ -1359,7 +1361,7 @@ aout_get_external_symbols (bfd *abfd) nlist structure. This function is responsible for setting symbol->flags and symbol->section, and adjusting symbol->value. */ -static bfd_boolean +static bool translate_from_native_sym_flags (bfd *abfd, aout_symbol_type *cache_ptr) { @@ -1399,7 +1401,7 @@ translate_from_native_sym_flags (bfd *abfd, cache_ptr->symbol.section = sec; cache_ptr->symbol.value -= sec->vma; - return TRUE; + return true; } /* Get the default visibility. This does not apply to all types, so @@ -1450,12 +1452,12 @@ translate_from_native_sym_flags (bfd *abfd, break; } - return TRUE; + return true; } /* Set the fields of SYM_POINTER according to CACHE_PTR. */ -static bfd_boolean +static bool translate_to_native_sym_flags (bfd *abfd, asymbol *cache_ptr, struct external_nlist *sym_pointer) @@ -1482,7 +1484,7 @@ translate_to_native_sym_flags (bfd *abfd, (_("%pB: can not represent section for symbol `%s' in a.out object file format"), abfd, name); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } if (sec->output_section != NULL) @@ -1510,7 +1512,7 @@ translate_to_native_sym_flags (bfd *abfd, (_("%pB: can not represent section `%pA' in a.out object file format"), abfd, sec); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } /* Turn the symbol from section relative to absolute again */ @@ -1523,7 +1525,7 @@ translate_to_native_sym_flags (bfd *abfd, PUT_WORD(abfd, value, sym_pointer->e_value); - return TRUE; + return true; } /* Native-level interface to symbols. */ @@ -1543,14 +1545,14 @@ NAME (aout, make_empty_symbol) (bfd *abfd) /* Translate a set of external symbols into internal symbols. */ -bfd_boolean +bool NAME (aout, translate_symbol_table) (bfd *abfd, aout_symbol_type *in, struct external_nlist *ext, bfd_size_type count, char *str, bfd_size_type strsize, - bfd_boolean dynamic) + bool dynamic) { struct external_nlist *ext_end; @@ -1578,7 +1580,7 @@ NAME (aout, translate_symbol_table) (bfd *abfd, (_("%pB: invalid string offset %" PRIu64 " >= %" PRIu64), abfd, (uint64_t) x, (uint64_t) strsize); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } ovly = H_GET_8 (abfd, ext->e_ovly); @@ -1587,7 +1589,7 @@ NAME (aout, translate_symbol_table) (bfd *abfd, _bfd_error_handler (_("%pB: symbol indicates overlay (not supported)"), abfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } in->symbol.value = GET_WORD (abfd, ext->e_value); @@ -1599,20 +1601,20 @@ NAME (aout, translate_symbol_table) (bfd *abfd, in->symbol.udata.p = NULL; if (! translate_from_native_sym_flags (abfd, in)) - return FALSE; + return false; if (dynamic) in->symbol.flags |= BSF_DYNAMIC; } - return TRUE; + return true; } /* We read the symbols into a buffer, which is discarded when this function exits. We read the strings into a buffer large enough to hold them all plus all the cached symbol entries. */ -bfd_boolean +bool NAME (aout, slurp_symbol_table) (bfd *abfd) { struct external_nlist *old_external_syms; @@ -1621,18 +1623,18 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) /* If there's no work to be done, don't do any. */ if (obj_aout_symbols (abfd) != NULL) - return TRUE; + return true; old_external_syms = obj_aout_external_syms (abfd); if (! aout_get_external_symbols (abfd)) - return FALSE; + return false; cached_size = obj_aout_external_sym_count (abfd); cached_size *= sizeof (aout_symbol_type); cached = bfd_zmalloc (cached_size); if (cached == NULL && cached_size != 0) - return FALSE; + return false; /* Convert from external symbol information to internal. */ if (! (NAME (aout, translate_symbol_table) @@ -1641,10 +1643,10 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) obj_aout_external_sym_count (abfd), obj_aout_external_strings (abfd), obj_aout_external_string_size (abfd), - FALSE))) + false))) { free (cached); - return FALSE; + return false; } abfd->symcount = obj_aout_external_sym_count (abfd); @@ -1666,7 +1668,7 @@ NAME (aout, slurp_symbol_table) (bfd *abfd) obj_aout_external_syms (abfd) = NULL; } - return TRUE; + return true; } /* We use a hash table when writing out symbols so that we only write @@ -1685,9 +1687,9 @@ static inline bfd_size_type add_to_stringtab (bfd *abfd, struct bfd_strtab_hash *tab, const char *str, - bfd_boolean copy) + bool copy) { - bfd_boolean hash; + bool hash; bfd_size_type str_index; /* An index of 0 always means the empty string. */ @@ -1696,9 +1698,9 @@ add_to_stringtab (bfd *abfd, /* Don't hash if BFD_TRADITIONAL_FORMAT is set, because SunOS dbx doesn't understand a hashed string table. */ - hash = TRUE; + hash = true; if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0) - hash = FALSE; + hash = false; str_index = _bfd_stringtab_add (tab, str, hash, copy); @@ -1713,7 +1715,7 @@ add_to_stringtab (bfd *abfd, /* Write out a strtab. ABFD is already at the right location in the file. */ -static bfd_boolean +static bool emit_stringtab (bfd *abfd, struct bfd_strtab_hash *tab) { bfd_byte buffer[BYTES_IN_LONG]; @@ -1722,12 +1724,12 @@ emit_stringtab (bfd *abfd, struct bfd_strtab_hash *tab) H_PUT_32 (abfd, _bfd_stringtab_size (tab) + BYTES_IN_LONG, buffer); if (bfd_bwrite ((void *) buffer, (bfd_size_type) BYTES_IN_LONG, abfd) != BYTES_IN_LONG) - return FALSE; + return false; return _bfd_stringtab_emit (abfd, tab); } -bfd_boolean +bool NAME (aout, write_syms) (bfd *abfd) { unsigned int count ; @@ -1736,7 +1738,7 @@ NAME (aout, write_syms) (bfd *abfd) strtab = _bfd_stringtab_init (); if (strtab == NULL) - return FALSE; + return false; for (count = 0; count < bfd_get_symcount (abfd); count++) { @@ -1744,7 +1746,7 @@ NAME (aout, write_syms) (bfd *abfd) bfd_size_type indx; struct external_nlist nsp; - indx = add_to_stringtab (abfd, strtab, g->name, FALSE); + indx = add_to_stringtab (abfd, strtab, g->name, false); if (indx == (bfd_size_type) -1) goto error_return; PUT_WORD (abfd, indx, nsp.e_strx); @@ -1779,11 +1781,11 @@ NAME (aout, write_syms) (bfd *abfd) _bfd_stringtab_free (strtab); - return TRUE; + return true; error_return: _bfd_stringtab_free (strtab); - return FALSE; + return false; } @@ -1938,7 +1940,7 @@ pdp11_aout_swap_reloc_in (bfd * abfd, /* Read and swap the relocs for a section. */ -bfd_boolean +bool NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) { bfd_byte *rptr; @@ -1951,10 +1953,10 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) arelent *cache_ptr; if (asect->relocation) - return TRUE; + return true; if (asect->flags & SEC_CONSTRUCTOR) - return TRUE; + return true; if (asect == obj_datasec (abfd)) reloc_size = exec_hdr(abfd)->a_drsize; @@ -1965,14 +1967,14 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) else { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (bfd_seek (abfd, asect->rel_filepos, SEEK_SET) != 0) - return FALSE; + return false; relocs = _bfd_malloc_and_read (abfd, reloc_size, reloc_size); if (relocs == NULL && reloc_size != 0) - return FALSE; + return false; each_size = obj_reloc_entry_size (abfd); count = reloc_size / each_size; @@ -1995,7 +1997,7 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) reloc_cache = bfd_zmalloc (count * sizeof (arelent)); if (reloc_cache == NULL && count != 0) - return FALSE; + return false; cache_ptr = reloc_cache; @@ -2026,12 +2028,12 @@ NAME (aout, slurp_reloc_table) (bfd *abfd, sec_ptr asect, asymbol **symbols) asect->relocation = reloc_cache; asect->reloc_count = cache_ptr - reloc_cache; - return TRUE; + return true; } /* Write out a relocation section into an object file. */ -bfd_boolean +bool NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) { arelent **generic; @@ -2042,7 +2044,7 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) natsize = section->size; native = bfd_zalloc (abfd, natsize); if (!native) - return FALSE; + return false; generic = section->orelocation; if (generic != NULL) @@ -2058,7 +2060,7 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) _bfd_error_handler (_("%pB: attempt to write out " "unknown reloc type"), abfd); bfd_release (abfd, native); - return FALSE; + return false; } r = native + (*generic)->address; pdp11_aout_swap_reloc_out (abfd, *generic, r); @@ -2070,11 +2072,11 @@ NAME (aout, squirt_out_relocs) (bfd *abfd, asection *section) if (bfd_bwrite ((void *) native, natsize, abfd) != natsize) { bfd_release (abfd, native); - return FALSE; + return false; } bfd_release (abfd, native); - return TRUE; + return true; } /* This is stupid. This function should be a boolean predicate. */ @@ -2245,7 +2247,7 @@ NAME (aout, print_symbol) (bfd * abfd, long NAME (aout, read_minisymbols) (bfd *abfd, - bfd_boolean dynamic, + bool dynamic, void * *minisymsp, unsigned int *sizep) { @@ -2278,7 +2280,7 @@ NAME (aout, read_minisymbols) (bfd *abfd, asymbol * NAME (aout, minisymbol_to_symbol) (bfd *abfd, - bfd_boolean dynamic, + bool dynamic, const void * minisym, asymbol *sym) { @@ -2296,7 +2298,7 @@ NAME (aout, minisymbol_to_symbol) (bfd *abfd, (bfd_size_type) 1, obj_aout_external_strings (abfd), obj_aout_external_string_size (abfd), - FALSE))) + false))) return NULL; return sym; @@ -2306,7 +2308,7 @@ NAME (aout, minisymbol_to_symbol) (bfd *abfd, and return the name of the source file and the line nearest to the wanted location. */ -bfd_boolean +bool NAME (aout, find_nearest_line) (bfd *abfd, asymbol **symbols, asection *section, @@ -2461,7 +2463,7 @@ NAME (aout, find_nearest_line) (bfd *abfd, buf = bfd_malloc ((bfd_size_type) filelen + funclen + 3); adata (abfd).line_buf = buf; if (buf == NULL) - return FALSE; + return false; } if (main_file_name != NULL) @@ -2493,7 +2495,7 @@ NAME (aout, find_nearest_line) (bfd *abfd, { /* PR binutils/20892: In a corrupt input file func can be empty. */ * functionname_ptr = NULL; - return TRUE; + return true; } /* The caller expects a symbol name. We actually have a function name, without the leading underscore. Put the @@ -2513,7 +2515,7 @@ NAME (aout, find_nearest_line) (bfd *abfd, *functionname_ptr = buf; } - return TRUE; + return true; } int @@ -2526,13 +2528,13 @@ NAME (aout, sizeof_headers) (bfd *abfd, /* Free all information we have cached for this BFD. We can always read it again later if we need it. */ -bfd_boolean +bool NAME (aout, bfd_free_cached_info) (bfd *abfd) { asection *o; if (bfd_get_format (abfd) != bfd_object) - return TRUE; + return true; #define BFCI_FREE(x) do { free (x); x = NULL; } while (0) BFCI_FREE (obj_aout_symbols (abfd)); @@ -2550,7 +2552,7 @@ NAME (aout, bfd_free_cached_info) (bfd *abfd) BFCI_FREE (o->relocation); #undef BFCI_FREE - return TRUE; + return true; } /* Routine to create an entry in an a.out link hash table. */ @@ -2575,7 +2577,7 @@ NAME (aout, link_hash_newfunc) (struct bfd_hash_entry *entry, if (ret) { /* Set local fields. */ - ret->written = FALSE; + ret->written = false; ret->indx = -1; } @@ -2584,7 +2586,7 @@ NAME (aout, link_hash_newfunc) (struct bfd_hash_entry *entry, /* Initialize an a.out link hash table. */ -bfd_boolean +bool NAME (aout, link_hash_table_init) (struct aout_link_hash_table *table, bfd *abfd, struct bfd_hash_entry *(*newfunc) (struct bfd_hash_entry *, @@ -2618,7 +2620,7 @@ NAME (aout, link_hash_table_create) (bfd *abfd) /* Free up the internal symbols read from an a.out file. */ -static bfd_boolean +static bool aout_link_free_symbols (bfd *abfd) { if (obj_aout_external_syms (abfd) != NULL) @@ -2640,13 +2642,13 @@ aout_link_free_symbols (bfd *abfd) #endif obj_aout_external_strings (abfd) = NULL; } - return TRUE; + return true; } /* Given an a.out BFD, add symbols to the global hash table as appropriate. */ -bfd_boolean +bool NAME (aout, link_add_symbols) (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -2658,25 +2660,25 @@ NAME (aout, link_add_symbols) (bfd *abfd, struct bfd_link_info *info) (abfd, info, aout_link_check_archive_element); default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } /* Add symbols from an a.out object file. */ -static bfd_boolean +static bool aout_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { if (! aout_get_external_symbols (abfd)) - return FALSE; + return false; if (! aout_link_add_symbols (abfd, info)) - return FALSE; + return false; if (! info->keep_memory) { if (! aout_link_free_symbols (abfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Look through the internal symbols to see if this object file should @@ -2686,17 +2688,17 @@ aout_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) known symbol but we do not include the object file in the link (unless there is some other reason to include it). */ -static bfd_boolean +static bool aout_link_check_ar_symbols (bfd *abfd, struct bfd_link_info *info, - bfd_boolean *pneeded, + bool *pneeded, bfd **subsbfd) { struct external_nlist *p; struct external_nlist *pend; char *strings; - *pneeded = FALSE; + *pneeded = false; /* Look through all the symbols. */ p = obj_aout_external_syms (abfd); @@ -2716,7 +2718,7 @@ aout_link_check_ar_symbols (bfd *abfd, || type == N_FN) continue; - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, name, false, false, true); /* We are only interested in symbols that are currently undefined or common. */ @@ -2748,8 +2750,8 @@ aout_link_check_ar_symbols (bfd *abfd, if (!(*info->callbacks ->add_archive_element) (info, abfd, name, subsbfd)) continue; - *pneeded = TRUE; - return TRUE; + *pneeded = true; + return true; } if (type == (N_UNDF | N_EXT)) @@ -2775,9 +2777,9 @@ aout_link_check_ar_symbols (bfd *abfd, option in the linker. */ if (!(*info->callbacks ->add_archive_element) (info, abfd, name, subsbfd)) - return FALSE; - *pneeded = TRUE; - return TRUE; + return false; + *pneeded = true; + return true; } /* Turn the current link symbol into a common symbol. It is already on the undefs list. */ @@ -2785,7 +2787,7 @@ aout_link_check_ar_symbols (bfd *abfd, h->u.c.p = bfd_hash_allocate (&info->hash->table, sizeof (struct bfd_link_hash_common_entry)); if (h->u.c.p == NULL) - return FALSE; + return false; h->u.c.size = value; @@ -2813,7 +2815,7 @@ aout_link_check_ar_symbols (bfd *abfd, } /* We do not need this object file. */ - return TRUE; + return true; } /* Check a single archive element to see if we need to include it in @@ -2821,22 +2823,22 @@ aout_link_check_ar_symbols (bfd *abfd, needed in the link or not. This is called from _bfd_generic_link_add_archive_symbols. */ -static bfd_boolean +static bool aout_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded) + bool *pneeded) { bfd *oldbfd; - bfd_boolean needed; + bool needed; if (!aout_get_external_symbols (abfd)) - return FALSE; + return false; oldbfd = abfd; if (!aout_link_check_ar_symbols (abfd, info, pneeded, &abfd)) - return FALSE; + return false; needed = *pneeded; if (needed) @@ -2847,36 +2849,35 @@ aout_link_check_archive_element (bfd *abfd, { if (!info->keep_memory && !aout_link_free_symbols (oldbfd)) - return FALSE; + return false; if (!aout_get_external_symbols (abfd)) - return FALSE; + return false; } if (!aout_link_add_symbols (abfd, info)) - return FALSE; + return false; } if (!info->keep_memory || !needed) { if (!aout_link_free_symbols (abfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Add all symbols from an object file to the hash table. */ -static bfd_boolean +static bool aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { - bfd_boolean (*add_one_symbol) + bool (*add_one_symbol) (struct bfd_link_info *, bfd *, const char *, flagword, asection *, - bfd_vma, const char *, bfd_boolean, bfd_boolean, - struct bfd_link_hash_entry **); + bfd_vma, const char *, bool, bool, struct bfd_link_hash_entry **); struct external_nlist *syms; bfd_size_type sym_count; char *strings; - bfd_boolean copy; + bool copy; struct aout_link_hash_entry **sym_hash; struct external_nlist *p; struct external_nlist *pend; @@ -2885,15 +2886,15 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) sym_count = obj_aout_external_sym_count (abfd); strings = obj_aout_external_strings (abfd); if (info->keep_memory) - copy = FALSE; + copy = false; else - copy = TRUE; + copy = true; if (aout_backend_info (abfd)->add_dynamic_symbols != NULL) { if (! ((*aout_backend_info (abfd)->add_dynamic_symbols) (abfd, info, &syms, &sym_count, &strings))) - return FALSE; + return false; } /* We keep a list of the linker hash table entries that correspond @@ -2903,7 +2904,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) sym_hash = bfd_alloc (abfd, sym_count * sizeof (struct aout_link_hash_entry *)); if (sym_hash == NULL && sym_count != 0) - return FALSE; + return false; obj_aout_sym_hashes (abfd) = sym_hash; add_one_symbol = aout_backend_info (abfd)->add_one_symbol; @@ -2927,7 +2928,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) /* PR 19629: Corrupt binaries can contain illegal string offsets. */ if (GET_WORD (abfd, p->e_strx) >= obj_aout_external_string_size (abfd)) - return FALSE; + return false; name = strings + GET_WORD (abfd, p->e_strx); /* Ignore debugging symbols. */ @@ -2983,9 +2984,9 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } if (! ((*add_one_symbol) - (info, abfd, name, flags, section, value, string, copy, FALSE, + (info, abfd, name, flags, section, value, string, copy, false, (struct bfd_link_hash_entry **) sym_hash))) - return FALSE; + return false; /* Restrict the maximum alignment of a common symbol based on the architecture, since a.out has no way to represent @@ -3008,7 +3009,7 @@ aout_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } } - return TRUE; + return true; } /* Look up an entry in an the header file hash table. */ @@ -3048,7 +3049,7 @@ aout_link_includes_newfunc (struct bfd_hash_entry *entry, /* Write out a symbol that was not associated with an a.out input object. */ -static bfd_boolean +static bool aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) { struct aout_link_hash_entry *h = (struct aout_link_hash_entry *) bh; @@ -3064,7 +3065,7 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) { h = (struct aout_link_hash_entry *) h->root.u.i.link; if (h->root.type == bfd_link_hash_new) - return TRUE; + return true; } output_bfd = flaginfo->output_bfd; @@ -3080,28 +3081,28 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) } if (h->written) - return TRUE; + return true; - h->written = TRUE; + h->written = true; /* An indx of -2 means the symbol must be written. */ if (h->indx != -2 && (flaginfo->info->strip == strip_all || (flaginfo->info->strip == strip_some && bfd_hash_lookup (flaginfo->info->keep_hash, h->root.root.string, - FALSE, FALSE) == NULL))) - return TRUE; + false, false) == NULL))) + return true; switch (h->root.type) { default: abort (); /* Avoid variable not initialized warnings. */ - return TRUE; + return true; case bfd_link_hash_new: /* This can happen for set symbols when sets are not being built. */ - return TRUE; + return true; case bfd_link_hash_undefined: type = N_UNDF | N_EXT; val = 0; @@ -3140,13 +3141,13 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) case bfd_link_hash_warning: /* FIXME: Ignore these for now. The circumstances under which they should be written out are not clear to me. */ - return TRUE; + return true; } H_PUT_8 (output_bfd, type, outsym.e_type); H_PUT_8 (output_bfd, 0, outsym.e_ovly); indx = add_to_stringtab (output_bfd, flaginfo->strtab, h->root.root.string, - FALSE); + false); if (indx == (bfd_size_type) -1) /* FIXME: No way to handle errors. */ abort (); @@ -3165,12 +3166,12 @@ aout_link_write_other_symbol (struct bfd_hash_entry *bh, void *data) h->indx = obj_aout_external_sym_count (output_bfd); ++obj_aout_external_sym_count (output_bfd); - return TRUE; + return true; } /* Handle a link order which is supposed to generate a reloc. */ -static bfd_boolean +static bool aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, asection *o, struct bfd_link_order *p) @@ -3205,7 +3206,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, r_extern = 1; h = ((struct aout_link_hash_entry *) bfd_wrapped_link_hash_lookup (flaginfo->output_bfd, flaginfo->info, - pr->u.name, FALSE, FALSE, TRUE)); + pr->u.name, false, false, true)); if (h != NULL && h->indx >= 0) r_index = h->indx; @@ -3216,9 +3217,9 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, here. I don't think that will ever matter for a global symbol. */ h->indx = -2; - h->written = FALSE; + h->written = false; if (!aout_link_write_other_symbol (&h->root.root, flaginfo)) - return FALSE; + return false; r_index = h->indx; } else @@ -3233,7 +3234,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, if (howto == 0) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (o == obj_textsec (flaginfo->output_bfd)) @@ -3303,12 +3304,12 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, bfd_size_type size; bfd_reloc_status_type r; bfd_byte *buf; - bfd_boolean ok; + bool ok; size = bfd_get_reloc_size (howto); buf = bfd_zmalloc (size); if (buf == NULL && size != 0) - return FALSE; + return false; r = MY_relocate_contents (howto, flaginfo->output_bfd, pr->addend, buf); switch (r) @@ -3334,13 +3335,13 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, size); free (buf); if (! ok) - return FALSE; + return false; } rel_size = obj_reloc_entry_size (flaginfo->output_bfd); if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0 || bfd_bwrite (rel_ptr, rel_size, flaginfo->output_bfd) != rel_size) - return FALSE; + return false; *reloff_ptr += rel_size; @@ -3351,7 +3352,7 @@ aout_link_reloc_link_order (struct aout_final_link_info *flaginfo, || (*reloff_ptr <= obj_datasec (flaginfo->output_bfd)->rel_filepos))); - return TRUE; + return true; } /* Get the section corresponding to a reloc index. */ @@ -3370,7 +3371,7 @@ aout_reloc_type_to_section (bfd *abfd, int type) } } -static bfd_boolean +static bool pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, bfd *input_bfd, asection *input_section, @@ -3378,12 +3379,11 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, bfd_size_type rel_size, bfd_byte *contents) { - bfd_boolean (*check_dynamic_reloc) + bool (*check_dynamic_reloc) (struct bfd_link_info *, bfd *, asection *, - struct aout_link_hash_entry *, void *, bfd_byte *, bfd_boolean *, - bfd_vma *); + struct aout_link_hash_entry *, void *, bfd_byte *, bool *, bfd_vma *); bfd *output_bfd; - bfd_boolean relocatable; + bool relocatable; struct external_nlist *syms; char *strings; struct aout_link_hash_entry **sym_hashes; @@ -3441,7 +3441,7 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, _bfd_error_handler (_("%pB: unsupported relocation type"), input_bfd); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -3496,10 +3496,10 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, if (h->indx < 0) { h->indx = -2; - h->written = FALSE; + h->written = false; if (!aout_link_write_other_symbol (&h->root.root, flaginfo)) - return FALSE; + return false; } r_index = h->indx; } @@ -3561,11 +3561,11 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, } else { - bfd_boolean hundef; + bool hundef; /* We are generating an executable, and must do a full relocation. */ - hundef = FALSE; + hundef = false; if (r_extern) { h = sym_hashes[r_index]; @@ -3583,7 +3583,7 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, relocation = 0; else { - hundef = TRUE; + hundef = true; relocation = 0; } } @@ -3601,12 +3601,12 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, if (check_dynamic_reloc != NULL) { - bfd_boolean skip; + bool skip; if (! ((*check_dynamic_reloc) (flaginfo->info, input_bfd, input_section, h, (void *) rel, contents, &skip, &relocation))) - return FALSE; + return false; if (skip) continue; } @@ -3624,7 +3624,7 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, name = strings + GET_WORD (input_bfd, syms[r_index].e_strx); (*flaginfo->info->callbacks->undefined_symbol) (flaginfo->info, name, input_bfd, input_section, - r_addr, TRUE); + r_addr, true); } r = MY_final_link_relocate (howto, @@ -3665,12 +3665,12 @@ pdp11_aout_link_input_section (struct aout_final_link_info *flaginfo, } } - return TRUE; + return true; } /* Link an a.out section into the output file. */ -static bfd_boolean +static bool aout_link_input_section (struct aout_final_link_info *flaginfo, bfd *input_bfd, asection *input_section, @@ -3685,7 +3685,7 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, if (! bfd_get_section_contents (input_bfd, input_section, (void *) flaginfo->contents, (file_ptr) 0, input_size)) - return FALSE; + return false; /* Read in the relocs if we haven't already done it. */ if (aout_section_data (input_section) != NULL @@ -3698,7 +3698,7 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, { if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0 || bfd_bread (relocs, rel_size, input_bfd) != rel_size) - return FALSE; + return false; } } @@ -3706,7 +3706,7 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, if (! pdp11_aout_link_input_section (flaginfo, input_bfd, input_section, (bfd_byte *) relocs, rel_size, flaginfo->contents)) - return FALSE; + return false; /* Write out the section contents. */ if (! bfd_set_section_contents (flaginfo->output_bfd, @@ -3714,16 +3714,16 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, (void *) flaginfo->contents, (file_ptr) input_section->output_offset, input_size)) - return FALSE; + return false; /* If we are producing relocatable output, the relocs were modified, and we now write them out. */ if (bfd_link_relocatable (flaginfo->info) && rel_size > 0) { if (bfd_seek (flaginfo->output_bfd, *reloff_ptr, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bwrite (relocs, rel_size, flaginfo->output_bfd) != rel_size) - return FALSE; + return false; *reloff_ptr += rel_size; /* Assert that the relocs have not run into the symbols, and @@ -3735,12 +3735,12 @@ aout_link_input_section (struct aout_final_link_info *flaginfo, <= obj_datasec (flaginfo->output_bfd)->rel_filepos))); } - return TRUE; + return true; } /* Link an a.out input BFD into the output file. */ -static bfd_boolean +static bool aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) { BFD_ASSERT (bfd_get_format (input_bfd) == bfd_object); @@ -3754,12 +3754,12 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) /* Get the symbols. We probably have them already, unless flaginfo->info->keep_memory is FALSE. */ if (! aout_get_external_symbols (input_bfd)) - return FALSE; + return false; /* Write out the symbols and get a map of the new indices. The map is placed into flaginfo->symbol_map. */ if (! aout_link_write_symbols (flaginfo, input_bfd)) - return FALSE; + return false; /* Relocate and write out the sections. These functions use the symbol map created by aout_link_write_symbols. The linker_mark @@ -3771,7 +3771,7 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) obj_textsec (input_bfd), &flaginfo->treloff, exec_hdr (input_bfd)->a_trsize)) - return FALSE; + return false; } if (obj_datasec (input_bfd)->linker_mark) { @@ -3779,7 +3779,7 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) obj_datasec (input_bfd), &flaginfo->dreloff, exec_hdr (input_bfd)->a_drsize)) - return FALSE; + return false; } /* If we are not keeping memory, we don't need the symbols any @@ -3788,10 +3788,10 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) if (! flaginfo->info->keep_memory) { if (! aout_link_free_symbols (input_bfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Do the final link step. This is called on the output BFD. The @@ -3801,13 +3801,13 @@ aout_link_input_bfd (struct aout_final_link_info *flaginfo, bfd *input_bfd) of bfd_link_order structures which list all the input sections for the output section. */ -bfd_boolean +bool NAME (aout, final_link) (bfd *abfd, struct bfd_link_info *info, void (*callback) (bfd *, file_ptr *, file_ptr *, file_ptr *)) { struct aout_final_link_info aout_info; - bfd_boolean includes_hash_initialized = FALSE; + bool includes_hash_initialized = false; bfd *sub; bfd_size_type trsize, drsize; bfd_size_type max_contents_size; @@ -3815,7 +3815,7 @@ NAME (aout, final_link) (bfd *abfd, bfd_size_type max_sym_count; struct bfd_link_order *p; asection *o; - bfd_boolean have_link_order_relocs; + bool have_link_order_relocs; if (bfd_link_pic (info)) abfd->flags |= DYNAMIC; @@ -3833,7 +3833,7 @@ NAME (aout, final_link) (bfd *abfd, sizeof (struct aout_link_includes_entry), 251)) goto error_return; - includes_hash_initialized = TRUE; + includes_hash_initialized = true; /* Figure out the largest section size. Also, if generating relocatable output, count the relocs. */ @@ -3953,7 +3953,7 @@ NAME (aout, final_link) (bfd *abfd, struct aout_link_hash_entry *h; h = aout_link_hash_lookup (aout_hash_table (info), "__DYNAMIC", - FALSE, FALSE, FALSE); + false, false, false); if (h != NULL) aout_link_write_other_symbol (&h->root.root, &aout_info); } @@ -3980,7 +3980,7 @@ NAME (aout, final_link) (bfd *abfd, We use the output_has_begun field of the input BFDs to see whether we have already handled it. */ for (sub = info->input_bfds; sub != NULL; sub = sub->link.next) - sub->output_has_begun = FALSE; + sub->output_has_begun = false; /* Mark all sections which are to be included in the link. This will normally be every section. We need to do this so that we @@ -3990,10 +3990,10 @@ NAME (aout, final_link) (bfd *abfd, { for (p = o->map_head.link_order; p != NULL; p = p->next) if (p->type == bfd_indirect_link_order) - p->u.indirect.section->linker_mark = TRUE; + p->u.indirect.section->linker_mark = true; } - have_link_order_relocs = FALSE; + have_link_order_relocs = false; for (o = abfd->sections; o != NULL; o = o->next) { for (p = o->map_head.link_order; @@ -4011,13 +4011,13 @@ NAME (aout, final_link) (bfd *abfd, { if (! aout_link_input_bfd (&aout_info, input_bfd)) goto error_return; - input_bfd->output_has_begun = TRUE; + input_bfd->output_has_begun = true; } } else if (p->type == bfd_section_reloc_link_order || p->type == bfd_symbol_reloc_link_order) /* These are handled below. */ - have_link_order_relocs = TRUE; + have_link_order_relocs = true; else { if (! _bfd_default_link_order (abfd, info, o, p)) @@ -4064,7 +4064,7 @@ NAME (aout, final_link) (bfd *abfd, if (includes_hash_initialized) { bfd_hash_table_free (&aout_info.includes.root); - includes_hash_initialized = FALSE; + includes_hash_initialized = false; } /* Finish up any dynamic linking we may be doing. */ @@ -4117,7 +4117,7 @@ NAME (aout, final_link) (bfd *abfd, } } - return TRUE; + return true; error_return: free (aout_info.contents); @@ -4126,13 +4126,13 @@ NAME (aout, final_link) (bfd *abfd, free (aout_info.output_syms); if (includes_hash_initialized) bfd_hash_table_free (&aout_info.includes.root); - return FALSE; + return false; } /* Adjust and write out the symbols for an a.out file. Set the new symbol indices into a symbol_map. */ -static bfd_boolean +static bool aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) { bfd *output_bfd; @@ -4146,8 +4146,8 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) struct external_nlist *sym_end; struct aout_link_hash_entry **sym_hash; int *symbol_map; - bfd_boolean pass; - bfd_boolean skip_next; + bool pass; + bool skip_next; output_bfd = flaginfo->output_bfd; sym_count = obj_aout_external_sym_count (input_bfd); @@ -4162,16 +4162,16 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) && (strip != strip_some || bfd_hash_lookup (flaginfo->info->keep_hash, bfd_get_filename (input_bfd), - FALSE, FALSE) != NULL) + false, false) != NULL) && discard != discard_all) { H_PUT_8 (output_bfd, N_TEXT, outsym->e_type); H_PUT_8 (output_bfd, 0, outsym->e_ovly); H_PUT_16 (output_bfd, 0, outsym->e_desc); strtab_index = add_to_stringtab (output_bfd, flaginfo->strtab, - bfd_get_filename (input_bfd), FALSE); + bfd_get_filename (input_bfd), false); if (strtab_index == (bfd_size_type) -1) - return FALSE; + return false; PUT_WORD (output_bfd, strtab_index, outsym->e_strx); PUT_WORD (output_bfd, (bfd_section_vma (obj_textsec (input_bfd)->output_section) @@ -4181,8 +4181,8 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) ++outsym; } - pass = FALSE; - skip_next = FALSE; + pass = false; + skip_next = false; sym = obj_aout_external_syms (input_bfd); sym_end = sym + sym_count; sym_hash = obj_aout_sym_hashes (input_bfd); @@ -4193,10 +4193,10 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) const char *name; int type; struct aout_link_hash_entry *h; - bfd_boolean skip; + bool skip; asection *symsec; bfd_vma val = 0; - bfd_boolean copy; + bool copy; /* We set *symbol_map to 0 above for all symbols. If it has already been set to -1 for this symbol, it means that we are @@ -4220,14 +4220,14 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) /* Pass this symbol through. It is the target of an indirect or warning symbol. */ val = GET_WORD (input_bfd, sym->e_value); - pass = FALSE; + pass = false; } else if (skip_next) { /* Skip this symbol, which is the target of an indirect symbol that we have changed to no longer be an indirect symbol. */ - skip_next = FALSE; + skip_next = false; continue; } else @@ -4269,34 +4269,34 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) { if ((type & N_TYPE) == N_INDR || type == N_WARNING) - skip_next = TRUE; + skip_next = true; *symbol_map = h->indx; continue; } /* See if we are stripping this symbol. */ - skip = FALSE; + skip = false; switch (strip) { case strip_none: break; case strip_debugger: if (is_stab (type, name)) - skip = TRUE; + skip = true; break; case strip_some: - if (bfd_hash_lookup (flaginfo->info->keep_hash, name, FALSE, FALSE) - == NULL) - skip = TRUE; + if (bfd_hash_lookup (flaginfo->info->keep_hash, name, + false, false) == NULL) + skip = true; break; case strip_all: - skip = TRUE; + skip = true; break; } if (skip) { if (h != NULL) - h->written = TRUE; + h->written = true; continue; } @@ -4351,7 +4351,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) the indirect symbol was defined, we output it with the correct definition so the debugger will understand it. */ - pass = TRUE; + pass = true; val = GET_WORD (input_bfd, sym->e_value); symsec = NULL; } @@ -4362,7 +4362,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) a case we do not want to output the next symbol, which is the target of the indirection. */ if ((type & N_TYPE) == N_INDR) - skip_next = TRUE; + skip_next = true; symsec = NULL; @@ -4454,7 +4454,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) it is a local symbol see if we should discard it. */ if (h != NULL) { - h->written = TRUE; + h->written = true; h->indx = obj_aout_external_sym_count (output_bfd); } else if ((type & N_TYPE) != N_SETT @@ -4470,15 +4470,15 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) case discard_l: if (!is_stab (type, name) && bfd_is_local_label_name (input_bfd, name)) - skip = TRUE; + skip = true; break; case discard_all: - skip = TRUE; + skip = true; break; } if (skip) { - pass = FALSE; + pass = false; continue; } } @@ -4536,9 +4536,9 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) symbol. */ copy = ! flaginfo->info->keep_memory; incl_entry = aout_link_includes_lookup (&flaginfo->includes, - name, TRUE, copy); + name, true, copy); if (incl_entry == NULL) - return FALSE; + return false; for (t = incl_entry->totals; t != NULL; t = t->next) if (t->total == val) break; @@ -4549,7 +4549,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) t = bfd_hash_allocate (&flaginfo->includes.root, sizeof *t); if (t == NULL) - return FALSE; + return false; t->total = val; t->next = incl_entry->totals; incl_entry->totals = t; @@ -4594,7 +4594,7 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) H_PUT_8 (output_bfd, type, outsym->e_type); H_PUT_8 (output_bfd, H_GET_8 (input_bfd, sym->e_ovly), outsym->e_ovly); H_PUT_16 (output_bfd, H_GET_16 (input_bfd, sym->e_desc), outsym->e_desc); - copy = FALSE; + copy = false; if (! flaginfo->info->keep_memory) { /* name points into a string table which we are going to @@ -4603,12 +4603,12 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) if (h != NULL) name = h->root.root.string; else - copy = TRUE; + copy = true; } strtab_index = add_to_stringtab (output_bfd, flaginfo->strtab, name, copy); if (strtab_index == (bfd_size_type) -1) - return FALSE; + return false; PUT_WORD (output_bfd, strtab_index, outsym->e_strx); PUT_WORD (output_bfd, val, outsym->e_value); *symbol_map = obj_aout_external_sym_count (output_bfd); @@ -4622,15 +4622,15 @@ aout_link_write_symbols (struct aout_final_link_info *flaginfo, bfd *input_bfd) bfd_size_type size; if (bfd_seek (output_bfd, flaginfo->symoff, SEEK_SET) != 0) - return FALSE; + return false; size = outsym - flaginfo->output_syms; size *= EXTERNAL_NLIST_SIZE; if (bfd_bwrite ((void *) flaginfo->output_syms, size, output_bfd) != size) - return FALSE; + return false; flaginfo->symoff += size; } - return TRUE; + return true; } /* Write out a symbol that was not associated with an a.out input diff --git a/bfd/pe-arm.c b/bfd/pe-arm.c index bb188fb2c2..0e1199dc12 100644 --- a/bfd/pe-arm.c +++ b/bfd/pe-arm.c @@ -29,7 +29,7 @@ #endif #define COFF_WITH_PE -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #define COFF_LONG_SECTION_NAMES #define COFF_SECTION_ALIGNMENT_ENTRIES \ diff --git a/bfd/pe-i386.c b/bfd/pe-i386.c index 416d0dfabc..b6164a04c5 100644 --- a/bfd/pe-i386.c +++ b/bfd/pe-i386.c @@ -27,7 +27,7 @@ #define TARGET_NAME_BIG "pe-bigobj-i386" #define COFF_WITH_PE #define COFF_WITH_PE_BIGOBJ -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #define TARGET_UNDERSCORE '_' #define COFF_LONG_SECTION_NAMES #define COFF_SUPPORT_GNU_LINKONCE diff --git a/bfd/pe-mcore.c b/bfd/pe-mcore.c index ddffe6dd7a..e3492bf037 100644 --- a/bfd/pe-mcore.c +++ b/bfd/pe-mcore.c @@ -29,7 +29,7 @@ #endif #define COFF_WITH_PE -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #define COFF_LONG_SECTION_NAMES #define MCORE_PE diff --git a/bfd/pe-sh.c b/bfd/pe-sh.c index 17d51171d5..d99b2472a7 100644 --- a/bfd/pe-sh.c +++ b/bfd/pe-sh.c @@ -24,7 +24,7 @@ #define TARGET_SHL_SYM sh_pe_le_vec #define TARGET_SHL_NAME "pe-shl" #define COFF_WITH_PE -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #define TARGET_UNDERSCORE '_' #define COFF_LONG_SECTION_NAMES diff --git a/bfd/pe-x86_64.c b/bfd/pe-x86_64.c index 771651aba8..5a777bbf4c 100644 --- a/bfd/pe-x86_64.c +++ b/bfd/pe-x86_64.c @@ -32,7 +32,7 @@ #define COFF_WITH_PE #define COFF_WITH_pex64 #define COFF_WITH_PE_BIGOBJ -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #if defined (USE_MINGW64_LEADING_UNDERSCORES) #define TARGET_UNDERSCORE '_' #else @@ -64,11 +64,11 @@ /* The function pex64_bfd_print_pdata is implemented in pei-x86_64.c source, but has be extended to also handle pe objects. */ -extern bfd_boolean pex64_bfd_print_pdata (bfd *, void *); +extern bool pex64_bfd_print_pdata (bfd *, void *); #define bfd_pe_print_pdata pex64_bfd_print_pdata -static bfd_boolean +static bool pex64_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { if (bfd_link_pde (info) @@ -79,14 +79,14 @@ pex64_link_add_symbols (bfd *abfd, struct bfd_link_info *info) __executable_start for __ImageBase to support R_AMD64_IMAGEBASE relocation which is relative to __ImageBase. */ struct bfd_link_hash_entry *h, *hi; - hi = bfd_link_hash_lookup (info->hash, "__ImageBase", TRUE, FALSE, - FALSE); + hi = bfd_link_hash_lookup (info->hash, "__ImageBase", true, false, + false); if (hi->type == bfd_link_hash_new || hi->type == bfd_link_hash_undefined || hi->type == bfd_link_hash_undefweak) { h = bfd_link_hash_lookup (info->hash, "__executable_start", - TRUE, FALSE, TRUE); + true, false, true); hi->type = bfd_link_hash_indirect; hi->u.i.link = h; } diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 14daf4f6e5..e7f1311b91 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -218,7 +218,7 @@ _bfd_XXi_swap_sym_in (bfd * abfd, void * ext1, void * in1) #endif } -static bfd_boolean +static bool abs_finder (bfd * abfd ATTRIBUTE_UNUSED, asection * sec, void * data) { bfd_vma abs_val = * (bfd_vma *) data; @@ -1237,7 +1237,7 @@ static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] = N_("Reserved") }; -static bfd_boolean +static bool pe_print_idata (bfd * abfd, void * vfile) { FILE *file = (FILE *) vfile; @@ -1261,12 +1261,12 @@ pe_print_idata (bfd * abfd, void * vfile) /* Maybe the extra header isn't there. Look for the section. */ section = bfd_get_section_by_name (abfd, ".idata"); if (section == NULL) - return TRUE; + return true; addr = section->vma; datasize = section->size; if (datasize == 0) - return TRUE; + return true; } else { @@ -1282,14 +1282,14 @@ pe_print_idata (bfd * abfd, void * vfile) { fprintf (file, _("\nThere is an import table, but the section containing it could not be found\n")); - return TRUE; + return true; } else if (!(section->flags & SEC_HAS_CONTENTS)) { fprintf (file, _("\nThere is an import table in %s, but that section has no contents\n"), section->name); - return TRUE; + return true; } } @@ -1311,7 +1311,7 @@ pe_print_idata (bfd * abfd, void * vfile) if (!bfd_malloc_and_get_section (abfd, section, &data)) { free (data); - return FALSE; + return false; } adj = section->vma - extra->ImageBase; @@ -1510,10 +1510,10 @@ pe_print_idata (bfd * abfd, void * vfile) free (data); - return TRUE; + return true; } -static bfd_boolean +static bool pe_print_edata (bfd * abfd, void * vfile) { FILE *file = (FILE *) vfile; @@ -1550,13 +1550,13 @@ pe_print_edata (bfd * abfd, void * vfile) /* Maybe the extra header isn't there. Look for the section. */ section = bfd_get_section_by_name (abfd, ".edata"); if (section == NULL) - return TRUE; + return true; addr = section->vma; dataoff = 0; datasize = section->size; if (datasize == 0) - return TRUE; + return true; } else { @@ -1570,14 +1570,14 @@ pe_print_edata (bfd * abfd, void * vfile) { fprintf (file, _("\nThere is an export table, but the section containing it could not be found\n")); - return TRUE; + return true; } else if (!(section->flags & SEC_HAS_CONTENTS)) { fprintf (file, _("\nThere is an export table in %s, but that section has no contents\n"), section->name); - return TRUE; + return true; } dataoff = addr - section->vma; @@ -1588,7 +1588,7 @@ pe_print_edata (bfd * abfd, void * vfile) fprintf (file, _("\nThere is an export table in %s, but it does not fit into that section\n"), section->name); - return TRUE; + return true; } } @@ -1599,7 +1599,7 @@ pe_print_edata (bfd * abfd, void * vfile) /* xgettext:c-format */ _("\nThere is an export table in %s, but it is too small (%d)\n"), section->name, (int) datasize); - return TRUE; + return true; } /* xgettext:c-format */ @@ -1608,11 +1608,11 @@ pe_print_edata (bfd * abfd, void * vfile) data = (bfd_byte *) bfd_malloc (datasize); if (data == NULL) - return FALSE; + return false; if (! bfd_get_section_contents (abfd, section, data, (file_ptr) dataoff, datasize)) - return FALSE; + return false; /* Go get Export Directory Table. */ edt.export_flags = bfd_get_32 (abfd, data + 0); @@ -1786,7 +1786,7 @@ pe_print_edata (bfd * abfd, void * vfile) free (data); - return TRUE; + return true; } /* This really is architecture dependent. On IA-64, a .pdata entry @@ -1801,7 +1801,7 @@ pe_print_edata (bfd * abfd, void * vfile) This is the version for uncompressed data. */ -static bfd_boolean +static bool pe_print_pdata (bfd * abfd, void * vfile) { #if defined(COFF_WITH_pep) && !defined(COFF_WITH_pex64) @@ -1820,7 +1820,7 @@ pe_print_pdata (bfd * abfd, void * vfile) if (section == NULL || coff_section_data (abfd, section) == NULL || pei_section_data (abfd, section) == NULL) - return TRUE; + return true; stop = pei_section_data (abfd, section)->virt_size; if ((stop % onaline) != 0) @@ -1842,7 +1842,7 @@ pe_print_pdata (bfd * abfd, void * vfile) datasize = section->size; if (datasize == 0) - return TRUE; + return true; /* PR 17512: file: 002-193900-0.004. */ if (datasize < stop) @@ -1850,13 +1850,13 @@ pe_print_pdata (bfd * abfd, void * vfile) /* xgettext:c-format */ fprintf (file, _("Virtual size of .pdata section (%ld) larger than real size (%ld)\n"), (long) stop, (long) datasize); - return FALSE; + return false; } if (! bfd_malloc_and_get_section (abfd, section, &data)) { free (data); - return FALSE; + return false; } start = 0; @@ -1908,7 +1908,7 @@ pe_print_pdata (bfd * abfd, void * vfile) free (data); - return TRUE; + return true; #undef PDATA_ROW_SIZE } @@ -1973,7 +1973,7 @@ cleanup_syms (sym_cache *psc) /* This is the version for "compressed" pdata. */ -bfd_boolean +bool _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) { # define PDATA_ROW_SIZE (2 * 4) @@ -1989,7 +1989,7 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) if (section == NULL || coff_section_data (abfd, section) == NULL || pei_section_data (abfd, section) == NULL) - return TRUE; + return true; stop = pei_section_data (abfd, section)->virt_size; if ((stop % onaline) != 0) @@ -2007,12 +2007,12 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) datasize = section->size; if (datasize == 0) - return TRUE; + return true; if (! bfd_malloc_and_get_section (abfd, section, &data)) { free (data); - return FALSE; + return false; } start = 0; @@ -2087,7 +2087,7 @@ _bfd_XX_print_ce_compressed_pdata (bfd * abfd, void * vfile) cleanup_syms (& cache); - return TRUE; + return true; #undef PDATA_ROW_SIZE } @@ -2110,7 +2110,7 @@ static const char * const tbl[] = "UNKNOWN", /* MUST be last. */ }; -static bfd_boolean +static bool pe_print_reloc (bfd * abfd, void * vfile) { FILE *file = (FILE *) vfile; @@ -2119,7 +2119,7 @@ pe_print_reloc (bfd * abfd, void * vfile) bfd_byte *p, *end; if (section == NULL || section->size == 0 || !(section->flags & SEC_HAS_CONTENTS)) - return TRUE; + return true; fprintf (file, _("\n\nPE File Base Relocations (interpreted .reloc section contents)\n")); @@ -2127,7 +2127,7 @@ pe_print_reloc (bfd * abfd, void * vfile) if (! bfd_malloc_and_get_section (abfd, section, &data)) { free (data); - return FALSE; + return false; } p = data; @@ -2190,7 +2190,7 @@ pe_print_reloc (bfd * abfd, void * vfile) free (data); - return TRUE; + return true; } /* A data structure describing the regions of a .rsrc section. @@ -2215,13 +2215,13 @@ rsrc_print_resource_directory (FILE * , bfd *, unsigned int, bfd_byte *, or section_end + 1 upon failure. */ static bfd_byte * -rsrc_print_resource_entries (FILE * file, - bfd * abfd, - unsigned int indent, - bfd_boolean is_name, - bfd_byte * data, - rsrc_regions * regions, - bfd_vma rva_bias) +rsrc_print_resource_entries (FILE *file, + bfd *abfd, + unsigned int indent, + bool is_name, + bfd_byte *data, + rsrc_regions *regions, + bfd_vma rva_bias) { unsigned long entry, addr, size; bfd_byte * leaf; @@ -2377,7 +2377,7 @@ rsrc_print_resource_directory (FILE * file, { bfd_byte * entry_end; - entry_end = rsrc_print_resource_entries (file, abfd, indent + 1, TRUE, + entry_end = rsrc_print_resource_entries (file, abfd, indent + 1, true, data, regions, rva_bias); data += 8; highest_data = max (highest_data, entry_end); @@ -2389,7 +2389,7 @@ rsrc_print_resource_directory (FILE * file, { bfd_byte * entry_end; - entry_end = rsrc_print_resource_entries (file, abfd, indent + 1, FALSE, + entry_end = rsrc_print_resource_entries (file, abfd, indent + 1, false, data, regions, rva_bias); data += 8; highest_data = max (highest_data, entry_end); @@ -2404,7 +2404,7 @@ rsrc_print_resource_directory (FILE * file, reproduce the resources, windres does that. Instead we dump the tables in a human readable format. */ -static bfd_boolean +static bool rsrc_print_section (bfd * abfd, void * vfile) { bfd_vma rva_bias; @@ -2417,24 +2417,24 @@ rsrc_print_section (bfd * abfd, void * vfile) pe = pe_data (abfd); if (pe == NULL) - return TRUE; + return true; section = bfd_get_section_by_name (abfd, ".rsrc"); if (section == NULL) - return TRUE; + return true; if (!(section->flags & SEC_HAS_CONTENTS)) - return TRUE; + return true; datasize = section->size; if (datasize == 0) - return TRUE; + return true; rva_bias = section->vma - pe->pe_opthdr.ImageBase; if (! bfd_malloc_and_get_section (abfd, section, & data)) { free (data); - return FALSE; + return false; } regions.section_start = data; @@ -2489,7 +2489,7 @@ rsrc_print_section (bfd * abfd, void * vfile) (int) (regions.resource_start - regions.section_start)); free (regions.section_start); - return TRUE; + return true; } #define IMAGE_NUMBEROF_DEBUG_TYPES 17 @@ -2515,7 +2515,7 @@ static char * debug_type_names[IMAGE_NUMBEROF_DEBUG_TYPES] = "Repro", }; -static bfd_boolean +static bool pe_print_debugdata (bfd * abfd, void * vfile) { FILE *file = (FILE *) vfile; @@ -2530,7 +2530,7 @@ pe_print_debugdata (bfd * abfd, void * vfile) bfd_size_type size = extra->DataDirectory[PE_DEBUG_DATA].Size; if (size == 0) - return TRUE; + return true; addr += extra->ImageBase; for (section = abfd->sections; section != NULL; section = section->next) @@ -2543,21 +2543,21 @@ pe_print_debugdata (bfd * abfd, void * vfile) { fprintf (file, _("\nThere is a debug directory, but the section containing it could not be found\n")); - return TRUE; + return true; } else if (!(section->flags & SEC_HAS_CONTENTS)) { fprintf (file, _("\nThere is a debug directory in %s, but that section has no contents\n"), section->name); - return TRUE; + return true; } else if (section->size < size) { fprintf (file, _("\nError: section %s contains the debug data starting address but it is too small\n"), section->name); - return FALSE; + return false; } fprintf (file, _("\nThere is a debug directory in %s at 0x%lx\n\n"), @@ -2568,7 +2568,7 @@ pe_print_debugdata (bfd * abfd, void * vfile) if (size > (section->size - dataoff)) { fprintf (file, _("The debug data size field in the data directory is too big for the section")); - return FALSE; + return false; } fprintf (file, @@ -2578,7 +2578,7 @@ pe_print_debugdata (bfd * abfd, void * vfile) if (!bfd_malloc_and_get_section (abfd, section, &data)) { free (data); - return FALSE; + return false; } for (i = 0; i < size / sizeof (struct external_IMAGE_DEBUG_DIRECTORY); i++) @@ -2631,10 +2631,10 @@ pe_print_debugdata (bfd * abfd, void * vfile) fprintf (file, _("The debug directory size is not a multiple of the debug directory entry size\n")); - return TRUE; + return true; } -static bfd_boolean +static bool pe_is_repro (bfd * abfd) { pe_data_type *pe = pe_data (abfd); @@ -2643,13 +2643,13 @@ pe_is_repro (bfd * abfd) bfd_byte *data = 0; bfd_size_type dataoff; unsigned int i; - bfd_boolean res = FALSE; + bool res = false; bfd_vma addr = extra->DataDirectory[PE_DEBUG_DATA].VirtualAddress; bfd_size_type size = extra->DataDirectory[PE_DEBUG_DATA].Size; if (size == 0) - return FALSE; + return false; addr += extra->ImageBase; for (section = abfd->sections; section != NULL; section = section->next) @@ -2662,20 +2662,20 @@ pe_is_repro (bfd * abfd) || (!(section->flags & SEC_HAS_CONTENTS)) || (section->size < size)) { - return FALSE; + return false; } dataoff = addr - section->vma; if (size > (section->size - dataoff)) { - return FALSE; + return false; } if (!bfd_malloc_and_get_section (abfd, section, &data)) { free (data); - return FALSE; + return false; } for (i = 0; i < size / sizeof (struct external_IMAGE_DEBUG_DIRECTORY); i++) @@ -2688,7 +2688,7 @@ pe_is_repro (bfd * abfd) if (idd.Type == PE_IMAGE_DEBUG_TYPE_REPRO) { - res = TRUE; + res = true; break; } } @@ -2700,7 +2700,7 @@ pe_is_repro (bfd * abfd) /* Print out the program headers. */ -bfd_boolean +bool _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) { FILE *file = (FILE *) vfile; @@ -2884,10 +2884,10 @@ _bfd_XX_print_private_bfd_data_common (bfd * abfd, void * vfile) rsrc_print_section (abfd, vfile); - return TRUE; + return true; } -static bfd_boolean +static bool is_vma_in_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sect, void *obj) { bfd_vma addr = * (bfd_vma *) obj; @@ -2903,7 +2903,7 @@ find_section_by_vma (bfd *abfd, bfd_vma addr) /* Copy any private info we understand from the input bfd to the output bfd. */ -bfd_boolean +bool _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd) { pe_data_type *ipe, *ope; @@ -2911,7 +2911,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd) /* One day we may try to grok other private data. */ if (ibfd->xvec->flavour != bfd_target_coff_flavour || obfd->xvec->flavour != bfd_target_coff_flavour) - return TRUE; + return true; ipe = pe_data (ibfd); ope = pe_data (obfd); @@ -2963,7 +2963,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd) "extends across section boundary at %" PRIx64), obfd, ope->pe_opthdr.DataDirectory[PE_DEBUG_DATA].Size, (uint64_t) addr, (uint64_t) section->vma); - return FALSE; + return false; } if (section && bfd_malloc_and_get_section (obfd, section, &data)) @@ -2998,23 +2998,23 @@ _bfd_XX_bfd_copy_private_bfd_data_common (bfd * ibfd, bfd * obfd) { _bfd_error_handler (_("failed to update file offsets in debug directory")); free (data); - return FALSE; + return false; } free (data); } else if (section) { _bfd_error_handler (_("%pB: failed to read debug data section"), obfd); - return FALSE; + return false; } } - return TRUE; + return true; } /* Copy private section data. */ -bfd_boolean +bool _bfd_XX_bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, @@ -3022,7 +3022,7 @@ _bfd_XX_bfd_copy_private_section_data (bfd *ibfd, { if (bfd_get_flavour (ibfd) != bfd_target_coff_flavour || bfd_get_flavour (obfd) != bfd_target_coff_flavour) - return TRUE; + return true; if (coff_section_data (ibfd, isec) != NULL && pei_section_data (ibfd, isec) != NULL) @@ -3032,7 +3032,7 @@ _bfd_XX_bfd_copy_private_section_data (bfd *ibfd, size_t amt = sizeof (struct coff_section_tdata); osec->used_by_bfd = bfd_zalloc (obfd, amt); if (osec->used_by_bfd == NULL) - return FALSE; + return false; } if (pei_section_data (obfd, osec) == NULL) @@ -3040,7 +3040,7 @@ _bfd_XX_bfd_copy_private_section_data (bfd *ibfd, size_t amt = sizeof (struct pei_section_tdata); coff_section_data (obfd, osec)->tdata = bfd_zalloc (obfd, amt); if (coff_section_data (obfd, osec)->tdata == NULL) - return FALSE; + return false; } pei_section_data (obfd, osec)->virt_size = @@ -3049,7 +3049,7 @@ _bfd_XX_bfd_copy_private_section_data (bfd *ibfd, pei_section_data (ibfd, isec)->pe_flags; } - return TRUE; + return true; } void @@ -3083,12 +3083,12 @@ static bfd_byte * rsrc_count_directory (bfd *, bfd_byte *, bfd_byte *, bfd_byte *, bfd_vma); static bfd_byte * -rsrc_count_entries (bfd * abfd, - bfd_boolean is_name, - bfd_byte * datastart, - bfd_byte * data, - bfd_byte * dataend, - bfd_vma rva_bias) +rsrc_count_entries (bfd *abfd, + bool is_name, + bfd_byte *datastart, + bfd_byte *data, + bfd_byte *dataend, + bfd_vma rva_bias) { unsigned long entry, addr, size; @@ -3205,14 +3205,14 @@ typedef struct rsrc_leaf typedef struct rsrc_entry { - bfd_boolean is_name; + bool is_name; union { unsigned int id; struct rsrc_string name; } name_id; - bfd_boolean is_dir; + bool is_dir; union { struct rsrc_directory * directory; @@ -3228,14 +3228,14 @@ rsrc_parse_directory (bfd *, rsrc_directory *, bfd_byte *, bfd_byte *, bfd_byte *, bfd_vma, rsrc_entry *); static bfd_byte * -rsrc_parse_entry (bfd * abfd, - bfd_boolean is_name, - rsrc_entry * entry, - bfd_byte * datastart, - bfd_byte * data, - bfd_byte * dataend, - bfd_vma rva_bias, - rsrc_directory * parent) +rsrc_parse_entry (bfd *abfd, + bool is_name, + rsrc_entry *entry, + bfd_byte *datastart, + bfd_byte * data, + bfd_byte *dataend, + bfd_vma rva_bias, + rsrc_directory *parent) { unsigned long val, addr, size; @@ -3272,7 +3272,7 @@ rsrc_parse_entry (bfd * abfd, if (HighBitSet (val)) { - entry->is_dir = TRUE; + entry->is_dir = true; entry->value.directory = bfd_malloc (sizeof * entry->value.directory); if (entry->value.directory == NULL) return dataend; @@ -3283,7 +3283,7 @@ rsrc_parse_entry (bfd * abfd, dataend, rva_bias, entry); } - entry->is_dir = FALSE; + entry->is_dir = false; entry->value.leaf = bfd_malloc (sizeof * entry->value.leaf); if (entry->value.leaf == NULL) return dataend; @@ -3306,15 +3306,15 @@ rsrc_parse_entry (bfd * abfd, } static bfd_byte * -rsrc_parse_entries (bfd * abfd, - rsrc_dir_chain * chain, - bfd_boolean is_name, - bfd_byte * highest_data, - bfd_byte * datastart, - bfd_byte * data, - bfd_byte * dataend, - bfd_vma rva_bias, - rsrc_directory * parent) +rsrc_parse_entries (bfd *abfd, + rsrc_dir_chain *chain, + bool is_name, + bfd_byte *highest_data, + bfd_byte *datastart, + bfd_byte *data, + bfd_byte *dataend, + bfd_vma rva_bias, + rsrc_directory *parent) { unsigned int i; rsrc_entry * entry; @@ -3382,11 +3382,11 @@ rsrc_parse_directory (bfd * abfd, data += 16; - highest_data = rsrc_parse_entries (abfd, & table->names, TRUE, data, + highest_data = rsrc_parse_entries (abfd, & table->names, true, data, datastart, data, dataend, rva_bias, table); data += table->names.num_entries * 8; - highest_data = rsrc_parse_entries (abfd, & table->ids, FALSE, highest_data, + highest_data = rsrc_parse_entries (abfd, & table->ids, false, highest_data, datastart, data, dataend, rva_bias, table); data += table->ids.num_entries * 8; @@ -3593,7 +3593,7 @@ u16_mbtouc (wchar_t * puc, const unsigned short * s, unsigned int n) /* Perform a comparison of two entries. */ static signed int -rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) +rsrc_cmp (bool is_name, rsrc_entry * a, rsrc_entry * b) { signed int res; bfd_byte * astring; @@ -3685,7 +3685,7 @@ rsrc_print_name (char * buffer, rsrc_string string) static const char * rsrc_resource_name (rsrc_entry *entry, rsrc_directory *dir, char *buffer) { - bfd_boolean is_string = FALSE; + bool is_string = false; buffer[0] = 0; @@ -3708,7 +3708,7 @@ rsrc_resource_name (rsrc_entry *entry, rsrc_directory *dir, char *buffer) case 3: strcat (buffer, " (ICON)"); break; case 4: strcat (buffer, " (MENU)"); break; case 5: strcat (buffer, " (DIALOG)"); break; - case 6: strcat (buffer, " (STRING)"); is_string = TRUE; break; + case 6: strcat (buffer, " (STRING)"); is_string = true; break; case 7: strcat (buffer, " (FONTDIR)"); break; case 8: strcat (buffer, " (FONT)"); break; case 9: strcat (buffer, " (ACCELERATOR)"); break; @@ -3772,7 +3772,7 @@ rsrc_resource_name (rsrc_entry *entry, rsrc_directory *dir, char *buffer) them and return FALSE. Otherwise we copy any strings from B into A and then return TRUE. */ -static bfd_boolean +static bool rsrc_merge_string_entries (rsrc_entry * a ATTRIBUTE_UNUSED, rsrc_entry * b ATTRIBUTE_UNUSED) { @@ -3821,11 +3821,11 @@ rsrc_merge_string_entries (rsrc_entry * a ATTRIBUTE_UNUSED, && !a->parent->entry->is_name) _bfd_error_handler (_(".rsrc merge failure: duplicate string resource: %d"), ((a->parent->entry->name_id.id - 1) << 4) + i); - return FALSE; + return false; } if (copy_needed == 0) - return TRUE; + return true; /* If we reach here then A and B must both have non-colliding strings. (We never get string resources with fully empty string tables). @@ -3833,7 +3833,7 @@ rsrc_merge_string_entries (rsrc_entry * a ATTRIBUTE_UNUSED, in B's strings. */ new_data = bfd_malloc (a->value.leaf->size + copy_needed); if (new_data == NULL) - return FALSE; + return false; nstring = new_data; astring = a->value.leaf->data; @@ -3870,7 +3870,7 @@ rsrc_merge_string_entries (rsrc_entry * a ATTRIBUTE_UNUSED, a->value.leaf->data = new_data; a->value.leaf->size += copy_needed; - return TRUE; + return true; } static void rsrc_merge (rsrc_entry *, rsrc_entry *); @@ -3880,21 +3880,21 @@ static void rsrc_merge (rsrc_entry *, rsrc_entry *); with lists and we want to handle matches specially. */ static void -rsrc_sort_entries (rsrc_dir_chain * chain, - bfd_boolean is_name, - rsrc_directory * dir) +rsrc_sort_entries (rsrc_dir_chain *chain, + bool is_name, + rsrc_directory *dir) { rsrc_entry * entry; rsrc_entry * next; rsrc_entry ** points_to_entry; - bfd_boolean swapped; + bool swapped; if (chain->num_entries < 2) return; do { - swapped = FALSE; + swapped = false; points_to_entry = & chain->first_entry; entry = * points_to_entry; next = entry->next_entry; @@ -3910,7 +3910,7 @@ rsrc_sort_entries (rsrc_dir_chain * chain, * points_to_entry = next; points_to_entry = & next->next_entry; next = entry->next_entry; - swapped = TRUE; + swapped = true; } else if (cmp == 0) { @@ -3950,7 +3950,7 @@ rsrc_sort_entries (rsrc_dir_chain * chain, * points_to_entry = next; points_to_entry = & next->next_entry; next = entry->next_entry; - swapped = TRUE; + swapped = true; } else { @@ -4105,8 +4105,8 @@ rsrc_merge (struct rsrc_entry * a, struct rsrc_entry * b) rsrc_attach_chain (& adir->ids, & bdir->ids); /* Now sort A's entries. */ - rsrc_sort_entries (& adir->names, TRUE, adir); - rsrc_sort_entries (& adir->ids, FALSE, adir); + rsrc_sort_entries (& adir->names, true, adir); + rsrc_sort_entries (& adir->ids, false, adir); } /* Check the .rsrc section. If it contains multiple concatenated @@ -4273,7 +4273,7 @@ rsrc_process_section (bfd * abfd, for (indx = 0; indx < num_resource_sets; indx++) rsrc_attach_chain (& new_table.names, & type_tables[indx].names); - rsrc_sort_entries (& new_table.names, TRUE, & new_table); + rsrc_sort_entries (& new_table.names, true, & new_table); /* Chain the ID entries onto the table. */ new_table.ids.first_entry = NULL; @@ -4282,7 +4282,7 @@ rsrc_process_section (bfd * abfd, for (indx = 0; indx < num_resource_sets; indx++) rsrc_attach_chain (& new_table.ids, & type_tables[indx].ids); - rsrc_sort_entries (& new_table.ids, FALSE, & new_table); + rsrc_sort_entries (& new_table.ids, false, & new_table); /* Step four: Create new contents for the .rsrc section. */ /* Step four point one: Compute the size of each region of the .rsrc section. @@ -4324,12 +4324,12 @@ rsrc_process_section (bfd * abfd, /* Handle the .idata section and other things that need symbol table access. */ -bfd_boolean +bool _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) { struct coff_link_hash_entry *h1; struct bfd_link_info *info = pfinfo->info; - bfd_boolean result = TRUE; + bool result = true; /* There are a few fields that need to be filled in now while we have symbol table access. @@ -4340,7 +4340,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) /* The import directory. This is the address of .idata$2, with size of .idata$2 + .idata$3. */ h1 = coff_link_hash_lookup (coff_hash_table (info), - ".idata$2", FALSE, FALSE, TRUE); + ".idata$2", false, false, true); if (h1 != NULL) { /* PR ld/2729: We cannot rely upon all the output sections having been @@ -4359,11 +4359,11 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) _bfd_error_handler (_("%pB: unable to fill in DataDictionary[1] because .idata$2 is missing"), abfd); - result = FALSE; + result = false; } h1 = coff_link_hash_lookup (coff_hash_table (info), - ".idata$4", FALSE, FALSE, TRUE); + ".idata$4", false, false, true); if (h1 != NULL && (h1->root.type == bfd_link_hash_defined || h1->root.type == bfd_link_hash_defweak) @@ -4379,13 +4379,13 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) _bfd_error_handler (_("%pB: unable to fill in DataDictionary[1] because .idata$4 is missing"), abfd); - result = FALSE; + result = false; } /* The import address table. This is the size/address of .idata$5. */ h1 = coff_link_hash_lookup (coff_hash_table (info), - ".idata$5", FALSE, FALSE, TRUE); + ".idata$5", false, false, true); if (h1 != NULL && (h1->root.type == bfd_link_hash_defined || h1->root.type == bfd_link_hash_defweak) @@ -4400,11 +4400,11 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) _bfd_error_handler (_("%pB: unable to fill in DataDictionary[12] because .idata$5 is missing"), abfd); - result = FALSE; + result = false; } h1 = coff_link_hash_lookup (coff_hash_table (info), - ".idata$6", FALSE, FALSE, TRUE); + ".idata$6", false, false, true); if (h1 != NULL && (h1->root.type == bfd_link_hash_defined || h1->root.type == bfd_link_hash_defweak) @@ -4420,13 +4420,13 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) _bfd_error_handler (_("%pB: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE (12)] because .idata$6 is missing"), abfd); - result = FALSE; + result = false; } } else { h1 = coff_link_hash_lookup (coff_hash_table (info), - "__IAT_start__", FALSE, FALSE, TRUE); + "__IAT_start__", false, false, true); if (h1 != NULL && (h1->root.type == bfd_link_hash_defined || h1->root.type == bfd_link_hash_defweak) @@ -4441,7 +4441,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) + h1->root.u.def.section->output_offset); h1 = coff_link_hash_lookup (coff_hash_table (info), - "__IAT_end__", FALSE, FALSE, TRUE); + "__IAT_end__", false, false, true); if (h1 != NULL && (h1->root.type == bfd_link_hash_defined || h1->root.type == bfd_link_hash_defweak) @@ -4462,7 +4462,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) _bfd_error_handler (_("%pB: unable to fill in DataDictionary[PE_IMPORT_ADDRESS_TABLE(12)]" " because .idata$6 is missing"), abfd); - result = FALSE; + result = false; } } } @@ -4470,7 +4470,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) h1 = coff_link_hash_lookup (coff_hash_table (info), (bfd_get_symbol_leading_char (abfd) != 0 ? "__tls_used" : "_tls_used"), - FALSE, FALSE, TRUE); + false, false, true); if (h1 != NULL) { if ((h1->root.type == bfd_link_hash_defined @@ -4487,7 +4487,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) _bfd_error_handler (_("%pB: unable to fill in DataDictionary[9] because __tls_used is missing"), abfd); - result = FALSE; + result = false; } /* According to PECOFF sepcifications by Microsoft version 8.2 the TLS data directory consists of 4 pointers, followed @@ -4527,7 +4527,7 @@ _bfd_XXi_final_link_postscript (bfd * abfd, struct coff_final_link_info *pfinfo) free (tmp_data); } else - result = FALSE; + result = false; } } #endif diff --git a/bfd/pef.c b/bfd/pef.c index c9304115f6..f55e532b6f 100644 --- a/bfd/pef.c +++ b/bfd/pef.c @@ -254,10 +254,10 @@ bfd_pef_convert_architecture (unsigned long architecture, *type = bfd_arch_m68k; } -static bfd_boolean +static bool bfd_pef_mkobject (bfd *abfd ATTRIBUTE_UNUSED) { - return TRUE; + return true; } static const char *bfd_pef_section_name (bfd_pef_section *section) diff --git a/bfd/pei-arm.c b/bfd/pei-arm.c index f8425f0024..216b94509a 100644 --- a/bfd/pei-arm.c +++ b/bfd/pei-arm.c @@ -30,7 +30,7 @@ #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE -#define PCRELOFFSET TRUE +#define PCRELOFFSET true /* Long section names not allowed in executable images, only object files. */ #define COFF_LONG_SECTION_NAMES 0 diff --git a/bfd/pei-i386.c b/bfd/pei-i386.c index d8ff0859f4..e2c52911e5 100644 --- a/bfd/pei-i386.c +++ b/bfd/pei-i386.c @@ -25,7 +25,7 @@ #define TARGET_NAME "pei-i386" #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #define TARGET_UNDERSCORE '_' /* Long section names not allowed in executable images, only object files. */ #define COFF_LONG_SECTION_NAMES 0 diff --git a/bfd/pei-ia64.c b/bfd/pei-ia64.c index 4c0d284508..3c9ef3ac33 100644 --- a/bfd/pei-ia64.c +++ b/bfd/pei-ia64.c @@ -30,7 +30,7 @@ #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE #define COFF_WITH_pep -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #define TARGET_UNDERSCORE '_' /* Long section names not allowed in executable images, only object files. */ #define COFF_LONG_SECTION_NAMES 0 diff --git a/bfd/pei-mcore.c b/bfd/pei-mcore.c index fca682822e..1212908484 100644 --- a/bfd/pei-mcore.c +++ b/bfd/pei-mcore.c @@ -30,7 +30,7 @@ #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE -#define PCRELOFFSET TRUE +#define PCRELOFFSET true /* Long section names not allowed in executable images, only object files. */ #define COFF_LONG_SECTION_NAMES 0 diff --git a/bfd/pei-sh.c b/bfd/pei-sh.c index b94d978841..943936c81f 100644 --- a/bfd/pei-sh.c +++ b/bfd/pei-sh.c @@ -26,7 +26,7 @@ #define IMAGE_BASE NT_IMAGE_BASE #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #define TARGET_UNDERSCORE '_' /* Long section names not allowed in executable images, only object files. */ #define COFF_LONG_SECTION_NAMES 0 diff --git a/bfd/pei-x86_64.c b/bfd/pei-x86_64.c index 85c0ca2113..883ad9cf5c 100644 --- a/bfd/pei-x86_64.c +++ b/bfd/pei-x86_64.c @@ -28,7 +28,7 @@ #define COFF_IMAGE_WITH_PE #define COFF_WITH_PE #define COFF_WITH_pex64 -#define PCRELOFFSET TRUE +#define PCRELOFFSET true #if defined (USE_MINGW64_LEADING_UNDERSCORES) #define TARGET_UNDERSCORE '_' #else @@ -98,7 +98,7 @@ pex64_get_runtime_function (bfd *abfd, struct pex64_runtime_function *rf, /* Swap in unwind info header. */ -static bfd_boolean +static bool pex64_get_unwind_info (bfd *abfd, struct pex64_unwind_info *ui, void *data, void *data_end) { @@ -110,7 +110,7 @@ pex64_get_unwind_info (bfd *abfd, struct pex64_unwind_info *ui, memset (ui, 0, sizeof (struct pex64_unwind_info)); if (ex_dta >= ex_dta_end || ex_dta + 4 >= ex_dta_end) - return FALSE; + return false; ui->Version = PEX64_UWI_VERSION (ex_ui->Version_Flags); ui->Flags = PEX64_UWI_FLAGS (ex_ui->Version_Flags); @@ -125,28 +125,28 @@ pex64_get_unwind_info (bfd *abfd, struct pex64_unwind_info *ui, ex_dta += ui->SizeOfBlock; if (ex_dta >= ex_dta_end) - return FALSE; + return false; switch (ui->Flags) { case UNW_FLAG_CHAININFO: if (ex_dta + 12 >= ex_dta_end) - return FALSE; + return false; ui->rva_BeginAddress = bfd_get_32 (abfd, ex_dta + 0); ui->rva_EndAddress = bfd_get_32 (abfd, ex_dta + 4); ui->rva_UnwindData = bfd_get_32 (abfd, ex_dta + 8); ui->SizeOfBlock += 12; - return TRUE; + return true; case UNW_FLAG_EHANDLER: case UNW_FLAG_UHANDLER: case UNW_FLAG_FHANDLER: if (ex_dta + 4 >= ex_dta_end) - return FALSE; + return false; ui->rva_ExceptionHandler = bfd_get_32 (abfd, ex_dta); ui->SizeOfBlock += 4; - return TRUE; + return true; default: - return TRUE; + return true; } } @@ -168,7 +168,7 @@ pex64_xdata_print_uwd_codes (FILE *file, bfd *abfd, If an FP reg is used, the any unwind code taking an offset must only be used after the FP reg is established in the prolog. But there are counter examples of that in system dlls... */ - save_allowed = TRUE; + save_allowed = true; i = 0; @@ -225,7 +225,7 @@ pex64_xdata_print_uwd_codes (FILE *file, bfd *abfd, { const bfd_byte *dta = ui->rawUnwindCodes + 2 * i; unsigned int info = PEX64_UNWCODE_INFO (dta[1]); - int unexpected = FALSE; + int unexpected = false; fprintf (file, "\t pc+0x%02x: ", (unsigned int) dta[0]); @@ -269,7 +269,7 @@ pex64_xdata_print_uwd_codes (FILE *file, bfd *abfd, pex_regs[ui->FrameRegister], (unsigned int) ui->FrameOffset * 16, info); unexpected = ui->FrameRegister == 0; - save_allowed = FALSE; + save_allowed = false; break; case UWOP_SAVE_NONVOL: @@ -312,7 +312,7 @@ pex64_xdata_print_uwd_codes (FILE *file, bfd *abfd, else if (ui->Version == 2) { fprintf (file, "epilog %02x %01x", dta[0], info); - unexpected = TRUE; + unexpected = true; } break; @@ -549,7 +549,7 @@ sort_xdata_arr (const void *l, const void *r) /* Display unwind tables for x86-64. */ -static bfd_boolean +static bool pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section) { FILE *file = (FILE *) vfile; @@ -567,13 +567,13 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section) int seen_error = 0; bfd_vma *xdata_arr = NULL; int xdata_arr_cnt; - bfd_boolean virt_size_is_zero = FALSE; + bool virt_size_is_zero = false; /* Sanity checks. */ if (pdata_section == NULL || coff_section_data (abfd, pdata_section) == NULL || pei_section_data (abfd, pdata_section) == NULL) - return TRUE; + return true; stop = pei_section_data (abfd, pdata_section)->virt_size; if ((stop % onaline) != 0) @@ -588,14 +588,14 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section) if (stop) fprintf (file, _("Warning: %s section size is zero\n"), pdata_section->name); - return TRUE; + return true; } /* virt_size might be zero for objects. */ if (stop == 0 && strcmp (abfd->xvec->name, "pe-x86-64") == 0) { stop = datasize; - virt_size_is_zero = TRUE; + virt_size_is_zero = true; } else if (datasize < stop) { @@ -817,7 +817,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section) free (xdata_arr); free (xdata); - return TRUE; + return true; } struct pex64_paps @@ -828,7 +828,7 @@ struct pex64_paps }; /* Functionn prototype. */ -bfd_boolean pex64_bfd_print_pdata (bfd *, void *); +bool pex64_bfd_print_pdata (bfd *, void *); /* Helper function for bfd_map_over_section. */ static void @@ -842,7 +842,7 @@ pex64_print_all_pdata_sections (bfd *abfd, asection *pdata, void *arg) } } -bfd_boolean +bool pex64_bfd_print_pdata (bfd *abfd, void *vfile) { asection *pdata_section = bfd_get_section_by_name (abfd, ".pdata"); diff --git a/bfd/peicode.h b/bfd/peicode.h index 4fcbac6704..c84b135e1e 100644 --- a/bfd/peicode.h +++ b/bfd/peicode.h @@ -56,7 +56,7 @@ #include "libpei.h" -static bfd_boolean (*pe_saved_coff_bfd_print_private_bfd_data) (bfd *, void *) = +static bool (*pe_saved_coff_bfd_print_private_bfd_data) (bfd *, void *) = #ifndef coff_bfd_print_private_bfd_data NULL; #else @@ -64,10 +64,10 @@ static bfd_boolean (*pe_saved_coff_bfd_print_private_bfd_data) (bfd *, void *) = #undef coff_bfd_print_private_bfd_data #endif -static bfd_boolean pe_print_private_bfd_data (bfd *, void *); +static bool pe_print_private_bfd_data (bfd *, void *); #define coff_bfd_print_private_bfd_data pe_print_private_bfd_data -static bfd_boolean (*pe_saved_coff_bfd_copy_private_bfd_data) (bfd *, bfd *) = +static bool (*pe_saved_coff_bfd_copy_private_bfd_data) (bfd *, bfd *) = #ifndef coff_bfd_copy_private_bfd_data NULL; #else @@ -75,7 +75,7 @@ static bfd_boolean (*pe_saved_coff_bfd_copy_private_bfd_data) (bfd *, bfd *) = #undef coff_bfd_copy_private_bfd_data #endif -static bfd_boolean pe_bfd_copy_private_bfd_data (bfd *, bfd *); +static bool pe_bfd_copy_private_bfd_data (bfd *, bfd *); #define coff_bfd_copy_private_bfd_data pe_bfd_copy_private_bfd_data #define coff_mkobject pe_mkobject @@ -253,7 +253,7 @@ coff_swap_scnhdr_in (bfd * abfd, void * ext, void * in) #endif } -static bfd_boolean +static bool pe_mkobject (bfd * abfd) { pe_data_type *pe; @@ -262,7 +262,7 @@ pe_mkobject (bfd * abfd) abfd->tdata.pe_obj_data = (struct pe_tdata *) bfd_zalloc (abfd, amt); if (abfd->tdata.pe_obj_data == 0) - return FALSE; + return false; pe = pe_data (abfd); @@ -290,7 +290,7 @@ pe_mkobject (bfd * abfd) pe->dos_message[15] = 0x0; memset (& pe->pe_opthdr, 0, sizeof pe->pe_opthdr); - return TRUE; + return true; } /* Create the COFF backend specific information. */ @@ -349,16 +349,16 @@ pe_mkobject_hook (bfd * abfd, return (void *) pe; } -static bfd_boolean +static bool pe_print_private_bfd_data (bfd *abfd, void * vfile) { FILE *file = (FILE *) vfile; if (!_bfd_XX_print_private_bfd_data_common (abfd, vfile)) - return FALSE; + return false; if (pe_saved_coff_bfd_print_private_bfd_data == NULL) - return TRUE; + return true; fputc ('\n', file); @@ -368,7 +368,7 @@ pe_print_private_bfd_data (bfd *abfd, void * vfile) /* Copy any private info we understand from the input bfd to the output bfd. */ -static bfd_boolean +static bool pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { /* PR binutils/716: Copy the large address aware flag. @@ -380,12 +380,12 @@ pe_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) pe_data (obfd)->real_flags |= IMAGE_FILE_LARGE_ADDRESS_AWARE; if (!_bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)) - return FALSE; + return false; if (pe_saved_coff_bfd_copy_private_bfd_data) return pe_saved_coff_bfd_copy_private_bfd_data (ibfd, obfd); - return TRUE; + return true; } #define coff_bfd_copy_private_section_data \ @@ -520,7 +520,7 @@ pe_ILF_save_relocs (pe_ILF_vars * vars, abort (); coff_section_data (vars->abfd, sec)->relocs = vars->int_reltab; - coff_section_data (vars->abfd, sec)->keep_relocs = TRUE; + coff_section_data (vars->abfd, sec)->keep_relocs = true; sec->relocation = vars->reltab; sec->reloc_count = vars->relcount; @@ -589,7 +589,7 @@ pe_ILF_make_a_symbol (pe_ILF_vars * vars, ent->u.syment.n_sclass = sclass; ent->u.syment.n_scnum = section->target_index; ent->u.syment._n._n_n._n_offset = (bfd_hostptr_t) sym; - ent->is_sym = TRUE; + ent->is_sym = true; sym->symbol.the_bfd = vars->abfd; sym->symbol.name = vars->string_ptr; @@ -762,7 +762,7 @@ static const jump_table jtab[] = /* Build a full BFD from the information supplied in a ILF object. */ -static bfd_boolean +static bool pe_ILF_build_a_bfd (bfd * abfd, unsigned int magic, char * symbol_name, @@ -795,13 +795,13 @@ pe_ILF_build_a_bfd (bfd * abfd, /* xgettext:c-format */ _bfd_error_handler (_("%pB: unhandled import type; %x"), abfd, import_type); - return FALSE; + return false; default: /* xgettext:c-format */ _bfd_error_handler (_("%pB: unrecognized import type; %x"), abfd, import_type); - return FALSE; + return false; } switch (import_name_type) @@ -816,7 +816,7 @@ pe_ILF_build_a_bfd (bfd * abfd, /* xgettext:c-format */ _bfd_error_handler (_("%pB: unrecognized import name type; %x"), abfd, import_name_type); - return FALSE; + return false; } /* Initialise local variables. @@ -829,7 +829,7 @@ pe_ILF_build_a_bfd (bfd * abfd, vars.bim = (struct bfd_in_memory *) bfd_malloc ((bfd_size_type) sizeof (*vars.bim)); if (vars.bim == NULL) - return FALSE; + return false; ptr = (bfd_byte *) bfd_zmalloc ((bfd_size_type) ILF_DATA_SIZE); vars.bim->buffer = ptr; @@ -1114,22 +1114,22 @@ pe_ILF_build_a_bfd (bfd * abfd, obj_raw_syment_count (abfd) = vars.sym_index; obj_coff_external_syms (abfd) = (void *) vars.esym_table; - obj_coff_keep_syms (abfd) = TRUE; + obj_coff_keep_syms (abfd) = true; obj_convert (abfd) = vars.sym_table; obj_conv_table_size (abfd) = vars.sym_index; obj_coff_strings (abfd) = vars.string_table; - obj_coff_keep_strings (abfd) = TRUE; + obj_coff_keep_strings (abfd) = true; abfd->flags |= HAS_SYMS; - return TRUE; + return true; error_return: free (vars.bim->buffer); free (vars.bim); - return FALSE; + return false; } /* We have detected a Image Library Format archive element. diff --git a/bfd/plugin.c b/bfd/plugin.c index d1767b0134..c4f2be8999 100644 --- a/bfd/plugin.c +++ b/bfd/plugin.c @@ -130,7 +130,7 @@ struct plugin_list_entry ld_plugin_claim_file_handler claim_file; ld_plugin_all_symbols_read_handler all_symbols_read; ld_plugin_all_symbols_read_handler cleanup_handler; - bfd_boolean has_symbol_type; + bool has_symbol_type; struct plugin_list_entry *next; @@ -184,7 +184,7 @@ static enum ld_plugin_status add_symbols_v2 (void *handle, int nsyms, const struct ld_plugin_symbol *syms) { - current_plugin->has_symbol_type = TRUE; + current_plugin->has_symbol_type = true; return add_symbols (handle, nsyms, syms); } @@ -249,18 +249,18 @@ try_claim (bfd *abfd) return claimed; } -static bfd_boolean -try_load_plugin (const char * pname, - struct plugin_list_entry * plugin_list_iter, - bfd * abfd, - bfd_boolean build_list_p) +static bool +try_load_plugin (const char *pname, + struct plugin_list_entry *plugin_list_iter, + bfd *abfd, + bool build_list_p) { void *plugin_handle; struct ld_plugin_tv tv[5]; int i; ld_plugin_onload onload; enum ld_plugin_status status; - bfd_boolean result = FALSE; + bool result = false; /* NB: Each object is independent. Reuse the previous plugin from the last run will lead to wrong result. */ @@ -280,7 +280,7 @@ try_load_plugin (const char * pname, if (! build_list_p) _bfd_error_handler ("Failed to load plugin '%s', reason: %s\n", pname, dlerror ()); - return FALSE; + return false; } if (plugin_list_iter == NULL) @@ -348,7 +348,7 @@ try_load_plugin (const char * pname, goto short_circuit; abfd->plugin_format = bfd_plugin_yes; - result = TRUE; + result = true; short_circuit: dlclose (plugin_handle); @@ -370,7 +370,7 @@ bfd_plugin_set_plugin (const char *p) /* Return TRUE if a plugin library is used. */ -bfd_boolean +bool bfd_plugin_specified_p (void) { return plugin_list != NULL; @@ -378,19 +378,19 @@ bfd_plugin_specified_p (void) /* Return TRUE if ABFD can be claimed by linker LTO plugin. */ -bfd_boolean +bool bfd_link_plugin_object_p (bfd *abfd) { if (ld_plugin_object_p) return ld_plugin_object_p (abfd) != NULL; - return FALSE; + return false; } extern const bfd_target plugin_vec; /* Return TRUE if TARGET is a pointer to plugin_vec. */ -bfd_boolean +bool bfd_plugin_target_p (const bfd_target *target) { return target == &plugin_vec; @@ -452,7 +452,7 @@ build_plugin_list (bfd *abfd) full_name = concat (plugin_dir, "/", ent->d_name, NULL); if (stat (full_name, &st) == 0 && S_ISREG (st.st_mode)) - (void) try_load_plugin (full_name, NULL, abfd, TRUE); + (void) try_load_plugin (full_name, NULL, abfd, true); free (full_name); } closedir (d); @@ -464,26 +464,26 @@ build_plugin_list (bfd *abfd) has_plugin_list = plugin_list != NULL; } -static bfd_boolean +static bool load_plugin (bfd *abfd) { struct plugin_list_entry *plugin_list_iter; if (plugin_name) - return try_load_plugin (plugin_name, plugin_list, abfd, FALSE); + return try_load_plugin (plugin_name, plugin_list, abfd, false); if (plugin_program_name == NULL) - return FALSE; + return false; build_plugin_list (abfd); for (plugin_list_iter = plugin_list; plugin_list_iter; plugin_list_iter = plugin_list_iter->next) - if (try_load_plugin (NULL, plugin_list_iter, abfd,FALSE)) - return TRUE; + if (try_load_plugin (NULL, plugin_list_iter, abfd, false)) + return true; - return FALSE; + return false; } @@ -502,45 +502,45 @@ bfd_plugin_object_p (bfd *abfd) /* Copy any private info we understand from the input bfd to the output bfd. */ -static bfd_boolean +static bool bfd_plugin_bfd_copy_private_bfd_data (bfd *ibfd ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED) { BFD_ASSERT (0); - return TRUE; + return true; } /* Copy any private info we understand from the input section to the output section. */ -static bfd_boolean +static bool bfd_plugin_bfd_copy_private_section_data (bfd *ibfd ATTRIBUTE_UNUSED, asection *isection ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, asection *osection ATTRIBUTE_UNUSED) { BFD_ASSERT (0); - return TRUE; + return true; } /* Copy any private info we understand from the input symbol to the output symbol. */ -static bfd_boolean +static bool bfd_plugin_bfd_copy_private_symbol_data (bfd *ibfd ATTRIBUTE_UNUSED, asymbol *isymbol ATTRIBUTE_UNUSED, bfd *obfd ATTRIBUTE_UNUSED, asymbol *osymbol ATTRIBUTE_UNUSED) { BFD_ASSERT (0); - return TRUE; + return true; } -static bfd_boolean +static bool bfd_plugin_bfd_print_private_bfd_data (bfd *abfd ATTRIBUTE_UNUSED, PTR ptr ATTRIBUTE_UNUSED) { BFD_ASSERT (0); - return TRUE; + return true; } static char * diff --git a/bfd/plugin.h b/bfd/plugin.h index 373541a5ed..ce3fe5818e 100644 --- a/bfd/plugin.h +++ b/bfd/plugin.h @@ -24,9 +24,9 @@ void bfd_plugin_set_program_name (const char *); int bfd_plugin_open_input (bfd *, struct ld_plugin_input_file *); void bfd_plugin_set_plugin (const char *); -bfd_boolean bfd_plugin_target_p (const bfd_target *); -bfd_boolean bfd_plugin_specified_p (void); -bfd_boolean bfd_link_plugin_object_p (bfd *); +bool bfd_plugin_target_p (const bfd_target *); +bool bfd_plugin_specified_p (void); +bool bfd_link_plugin_object_p (bfd *); void register_ld_plugin_object_p (bfd_cleanup (*object_p) (bfd *)); typedef struct plugin_data_struct diff --git a/bfd/ppcboot.c b/bfd/ppcboot.c index 5cdd7adbbd..4768de3018 100644 --- a/bfd/ppcboot.c +++ b/bfd/ppcboot.c @@ -97,7 +97,7 @@ typedef struct ppcboot_data /* Create a ppcboot object. Invoked via bfd_set_format. */ -static bfd_boolean +static bool ppcboot_mkobject (bfd *abfd) { if (!ppcboot_get_tdata (abfd)) @@ -106,12 +106,12 @@ ppcboot_mkobject (bfd *abfd) ppcboot_set_tdata (abfd, bfd_zalloc (abfd, amt)); } - return TRUE; + return true; } /* Set the architecture to PowerPC */ -static bfd_boolean +static bool ppcboot_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long machine) @@ -120,7 +120,7 @@ ppcboot_set_arch_mach (bfd *abfd, arch = bfd_arch_powerpc; else if (arch != bfd_arch_powerpc) - return FALSE; + return false; return bfd_default_set_arch_mach (abfd, arch, machine); } @@ -217,7 +217,7 @@ ppcboot_object_p (bfd *abfd) /* Get contents of the only section. */ -static bfd_boolean +static bool ppcboot_get_section_contents (bfd *abfd, asection *section ATTRIBUTE_UNUSED, void * location, @@ -226,8 +226,8 @@ ppcboot_get_section_contents (bfd *abfd, { if (bfd_seek (abfd, offset + (file_ptr) sizeof (ppcboot_hdr_t), SEEK_SET) != 0 || bfd_bread (location, count, abfd) != count) - return FALSE; - return TRUE; + return false; + return true; } @@ -280,7 +280,7 @@ ppcboot_canonicalize_symtab (bfd *abfd, asymbol **alocation) syms = (asymbol *) bfd_alloc (abfd, amt); if (syms == NULL) - return FALSE; + return false; /* Start symbol. */ syms[0].the_bfd = abfd; @@ -340,7 +340,7 @@ ppcboot_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED, /* Write section contents of a ppcboot file. */ -static bfd_boolean +static bool ppcboot_set_section_contents (bfd *abfd, asection *sec, const void * data, @@ -363,7 +363,7 @@ ppcboot_set_section_contents (bfd *abfd, for (s = abfd->sections; s != NULL; s = s->next) s->filepos = s->vma - low; - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; } return _bfd_generic_set_section_contents (abfd, sec, data, offset, size); @@ -380,7 +380,7 @@ ppcboot_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, /* Print out the program headers. */ -static bfd_boolean +static bool ppcboot_bfd_print_private_bfd_data (bfd *abfd, void * farg) { FILE *f = (FILE *)farg; @@ -445,7 +445,7 @@ ppcboot_bfd_print_private_bfd_data (bfd *abfd, void * farg) } fprintf (f, "\n"); - return TRUE; + return true; } diff --git a/bfd/reloc.c b/bfd/reloc.c index 6fae17760f..2eb0758a82 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -384,8 +384,8 @@ DESCRIPTION This is used to fill in an empty howto entry in an array. .#define EMPTY_HOWTO(C) \ -. HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ -. NULL, FALSE, 0, 0, FALSE) +. HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \ +. NULL, false, 0, 0, false) . */ @@ -520,7 +520,7 @@ FUNCTION bfd_reloc_offset_in_range SYNOPSIS - bfd_boolean bfd_reloc_offset_in_range + bool bfd_reloc_offset_in_range (reloc_howto_type *howto, bfd *abfd, asection *section, @@ -535,7 +535,7 @@ DESCRIPTION /* HOWTO describes a relocation, at offset OCTET. Return whether the relocation field is within SECTION of ABFD. */ -bfd_boolean +bool bfd_reloc_offset_in_range (reloc_howto_type *howto, bfd *abfd, asection *section, @@ -8205,7 +8205,7 @@ bfd_reloc_name_lookup (bfd *abfd, const char *reloc_name) } static reloc_howto_type bfd_howto_32 = -HOWTO (0, 00, 2, 32, FALSE, 0, complain_overflow_dont, 0, "VRT32", FALSE, 0xffffffff, 0xffffffff, TRUE); +HOWTO (0, 00, 2, 32, false, 0, complain_overflow_dont, 0, "VRT32", false, 0xffffffff, 0xffffffff, true); /* INTERNAL_FUNCTION @@ -8256,29 +8256,29 @@ INTERNAL_FUNCTION bfd_generic_relax_section SYNOPSIS - bfd_boolean bfd_generic_relax_section + bool bfd_generic_relax_section (bfd *abfd, asection *section, struct bfd_link_info *, - bfd_boolean *); + bool *); DESCRIPTION Provides default handling for relaxing for back ends which don't do relaxing. */ -bfd_boolean +bool bfd_generic_relax_section (bfd *abfd ATTRIBUTE_UNUSED, asection *section ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED, - bfd_boolean *again) + bool *again) { if (bfd_link_relocatable (link_info)) (*link_info->callbacks->einfo) (_("%P%F: --relax and -r may not be used together\n")); - *again = FALSE; - return TRUE; + *again = false; + return true; } /* @@ -8286,7 +8286,7 @@ INTERNAL_FUNCTION bfd_generic_gc_sections SYNOPSIS - bfd_boolean bfd_generic_gc_sections + bool bfd_generic_gc_sections (bfd *, struct bfd_link_info *); DESCRIPTION @@ -8294,11 +8294,11 @@ DESCRIPTION don't do section gc -- i.e., does nothing. */ -bfd_boolean +bool bfd_generic_gc_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* @@ -8306,7 +8306,7 @@ INTERNAL_FUNCTION bfd_generic_lookup_section_flags SYNOPSIS - bfd_boolean bfd_generic_lookup_section_flags + bool bfd_generic_lookup_section_flags (struct bfd_link_info *, struct flag_info *, asection *); DESCRIPTION @@ -8315,7 +8315,7 @@ DESCRIPTION Returns FALSE if the section should be omitted, otherwise TRUE. */ -bfd_boolean +bool bfd_generic_lookup_section_flags (struct bfd_link_info *info ATTRIBUTE_UNUSED, struct flag_info *flaginfo, asection *section ATTRIBUTE_UNUSED) @@ -8323,9 +8323,9 @@ bfd_generic_lookup_section_flags (struct bfd_link_info *info ATTRIBUTE_UNUSED, if (flaginfo != NULL) { _bfd_error_handler (_("INPUT_SECTION_FLAGS are not supported")); - return FALSE; + return false; } - return TRUE; + return true; } /* @@ -8333,7 +8333,7 @@ INTERNAL_FUNCTION bfd_generic_merge_sections SYNOPSIS - bfd_boolean bfd_generic_merge_sections + bool bfd_generic_merge_sections (bfd *, struct bfd_link_info *); DESCRIPTION @@ -8341,11 +8341,11 @@ DESCRIPTION which don't have SEC_MERGE support -- i.e., does nothing. */ -bfd_boolean +bool bfd_generic_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, struct bfd_link_info *link_info ATTRIBUTE_UNUSED) { - return TRUE; + return true; } /* @@ -8358,7 +8358,7 @@ SYNOPSIS struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols); DESCRIPTION @@ -8372,7 +8372,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { bfd *input_bfd = link_order->u.indirect.section->owner; @@ -8443,8 +8443,8 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, { bfd_vma off; static reloc_howto_type none_howto - = HOWTO (0, 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, - "unused", FALSE, 0, 0, FALSE); + = HOWTO (0, 0, 0, 0, false, 0, complain_overflow_dont, NULL, + "unused", false, 0, 0, false); off = ((*parent)->address * bfd_octets_per_byte (input_bfd, input_section)); @@ -8479,7 +8479,7 @@ bfd_generic_get_relocated_section_contents (bfd *abfd, case bfd_reloc_undefined: (*link_info->callbacks->undefined_symbol) (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr), - input_bfd, input_section, (*parent)->address, TRUE); + input_bfd, input_section, (*parent)->address, true); break; case bfd_reloc_dangerous: BFD_ASSERT (error_message != NULL); @@ -8567,7 +8567,7 @@ INTERNAL_FUNCTION _bfd_unrecognized_reloc SYNOPSIS - bfd_boolean _bfd_unrecognized_reloc + bool _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type); @@ -8578,7 +8578,7 @@ DESCRIPTION Returns FALSE so that it can be called from a return statement. */ -bfd_boolean +bool _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type) { /* xgettext:c-format */ @@ -8590,7 +8590,7 @@ _bfd_unrecognized_reloc (bfd * abfd, sec_ptr section, unsigned int r_type) BFD_VERSION_STRING); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } reloc_howto_type * diff --git a/bfd/reloc16.c b/bfd/reloc16.c index c6ec1c220a..5a80eb6411 100644 --- a/bfd/reloc16.c +++ b/bfd/reloc16.c @@ -63,7 +63,7 @@ bfd_coff_reloc16_get_value (arelent *reloc, the generic symbols. */ h = bfd_wrapped_link_hash_lookup (input_section->owner, link_info, bfd_asymbol_name (symbol), - FALSE, FALSE, TRUE); + false, false, true); if (h != (struct bfd_link_hash_entry *) NULL && (h->type == bfd_link_hash_defined || h->type == bfd_link_hash_defweak)) @@ -81,7 +81,7 @@ bfd_coff_reloc16_get_value (arelent *reloc, { (*link_info->callbacks->undefined_symbol) (link_info, bfd_asymbol_name (symbol), - input_section->owner, input_section, reloc->address, TRUE); + input_section->owner, input_section, reloc->address, true); value = 0; } } @@ -136,11 +136,11 @@ bfd_perform_slip (bfd *abfd, } } -bfd_boolean +bool bfd_coff_reloc16_relax_section (bfd *abfd, asection *input_section, struct bfd_link_info *link_info, - bfd_boolean *again) + bool *again) { /* Get enough memory to hold the stuff. */ bfd *input_bfd = input_section->owner; @@ -156,14 +156,14 @@ bfd_coff_reloc16_relax_section (bfd *abfd, /* We only do global relaxation once. It is not safe to do it multiple times (see discussion of the "shrinks" array below). */ - *again = FALSE; + *again = false; if (reloc_size < 0) - return FALSE; + return false; reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size); if (!reloc_vector && reloc_size > 0) - return FALSE; + return false; /* Get the relocs and think about them. */ reloc_count = @@ -172,7 +172,7 @@ bfd_coff_reloc16_relax_section (bfd *abfd, if (reloc_count < 0) { free (reloc_vector); - return FALSE; + return false; } /* The reloc16.c and related relaxing code is very simple, the price @@ -236,7 +236,7 @@ bfd_coff_reloc16_relax_section (bfd *abfd, input_section->rawsize = input_section->size; input_section->size -= shrink; free ((char *) reloc_vector); - return TRUE; + return true; } bfd_byte * @@ -245,7 +245,7 @@ bfd_coff_reloc16_get_relocated_section_contents struct bfd_link_info *link_info, struct bfd_link_order *link_order, bfd_byte *data, - bfd_boolean relocatable, + bool relocatable, asymbol **symbols) { /* Get enough memory to hold the stuff. */ diff --git a/bfd/rs6000-core.c b/bfd/rs6000-core.c index 1c19060a5d..74bde846de 100644 --- a/bfd/rs6000-core.c +++ b/bfd/rs6000-core.c @@ -278,27 +278,26 @@ typedef union saying that they are missing. */ bfd_cleanup rs6000coff_core_p (bfd *abfd); -bfd_boolean rs6000coff_core_file_matches_executable_p (bfd *core_bfd, - bfd *exec_bfd); +bool rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd); char * rs6000coff_core_file_failing_command (bfd *abfd); int rs6000coff_core_file_failing_signal (bfd *abfd); /* Try to read into CORE the header from the core file associated with ABFD. Return success. */ -static bfd_boolean +static bool read_hdr (bfd *abfd, CoreHdr *core) { bfd_size_type size; if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; + return false; /* Read the leading portion that old and new core dump structures have in common. */ size = CORE_COMMONSZ; if (bfd_bread (core, size, abfd) != size) - return FALSE; + return false; /* Read the trailing portion of the structure. */ if (CORE_NEW (*core)) @@ -697,7 +696,7 @@ rs6000coff_core_p (bfd *abfd) /* Return `TRUE' if given core is from the given executable. */ -bfd_boolean +bool rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) { CoreHdr core; @@ -705,11 +704,11 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) char *path, *s; size_t alloc; const char *str1, *str2; - bfd_boolean ret; + bool ret; file_ptr c_loader; if (!read_hdr (core_bfd, &core)) - return FALSE; + return false; if (CORE_NEW (core)) c_loader = CNEW_LOADER (core.new_dump); @@ -724,12 +723,12 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) size = (int) ((LdInfo *) 0)->l32.ldinfo_filename; if (bfd_seek (core_bfd, c_loader + size, SEEK_SET) != 0) - return FALSE; + return false; alloc = 100; path = bfd_malloc ((bfd_size_type) alloc); if (path == NULL) - return FALSE; + return false; s = path; while (1) @@ -737,7 +736,7 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) if (bfd_bread (s, (bfd_size_type) 1, core_bfd) != 1) { free (path); - return FALSE; + return false; } if (*s == '\0') break; @@ -751,7 +750,7 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) if (n == NULL) { free (path); - return FALSE; + return false; } s = n + (path - s); path = n; @@ -766,9 +765,9 @@ rs6000coff_core_file_matches_executable_p (bfd *core_bfd, bfd *exec_bfd) str2 = str2 != NULL ? str2 + 1 : bfd_get_filename (exec_bfd); if (strcmp (str1, str2) == 0) - ret = TRUE; + ret = true; else - ret = FALSE; + ret = false; free (path); diff --git a/bfd/section.c b/bfd/section.c index 059b6fa2e5..a35348833d 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -609,7 +609,7 @@ CODE_FRAGMENT .{ . return sec->userdata; .} -.static inline bfd_boolean +.static inline bool .bfd_is_com_section (const asection *sec) .{ . return (sec->flags & SEC_IS_COMMON) != 0; @@ -619,33 +619,33 @@ CODE_FRAGMENT . because not all callers use the return value. A macro implementation . would use a comma expression, eg: "((ptr)->foo = val, TRUE)" and some . compilers will complain about comma expressions that have no effect. *} -.static inline bfd_boolean +.static inline bool .bfd_set_section_userdata (asection *sec, void *val) .{ . sec->userdata = val; -. return TRUE; +. return true; .} . -.static inline bfd_boolean +.static inline bool .bfd_set_section_vma (asection *sec, bfd_vma val) .{ . sec->vma = sec->lma = val; -. sec->user_set_vma = TRUE; -. return TRUE; +. sec->user_set_vma = true; +. return true; .} . -.static inline bfd_boolean +.static inline bool .bfd_set_section_lma (asection *sec, bfd_vma val) .{ . sec->lma = val; -. return TRUE; +. return true; .} . -.static inline bfd_boolean +.static inline bool .bfd_set_section_alignment (asection *sec, unsigned int val) .{ . sec->alignment_power = val; -. return TRUE; +. return true; .} . .{* These sections are global, and are managed by BFD. The application @@ -667,25 +667,25 @@ CODE_FRAGMENT .{* Pointer to the indirect section. *} .#define bfd_ind_section_ptr (&_bfd_std_section[3]) . -.static inline bfd_boolean +.static inline bool .bfd_is_und_section (const asection *sec) .{ . return sec == bfd_und_section_ptr; .} . -.static inline bfd_boolean +.static inline bool .bfd_is_abs_section (const asection *sec) .{ . return sec == bfd_abs_section_ptr; .} . -.static inline bfd_boolean +.static inline bool .bfd_is_ind_section (const asection *sec) .{ . return sec == bfd_ind_section_ptr; .} . -.static inline bfd_boolean +.static inline bool .bfd_is_const_section (const asection *sec) .{ . return (sec >= _bfd_std_section @@ -694,7 +694,7 @@ CODE_FRAGMENT .} . .{* Return TRUE if input section SEC has been discarded. *} -.static inline bfd_boolean +.static inline bool .discarded_section (const asection *sec) .{ . return (!bfd_is_abs_section (sec) @@ -812,12 +812,12 @@ bfd_section_hash_newfunc (struct bfd_hash_entry *entry, is useful for things like relocs which are relative to the base of a section. */ -bfd_boolean +bool _bfd_generic_new_section_hook (bfd *abfd, asection *newsect) { newsect->symbol = bfd_make_empty_symbol (abfd); if (newsect->symbol == NULL) - return FALSE; + return false; newsect->symbol->name = newsect->name; newsect->symbol->value = 0; @@ -825,7 +825,7 @@ _bfd_generic_new_section_hook (bfd *abfd, asection *newsect) newsect->symbol->flags = BSF_SECTION_SYM; newsect->symbol_ptr_ptr = &newsect->symbol; - return TRUE; + return true; } unsigned int _bfd_section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */ @@ -898,7 +898,7 @@ bfd_get_section_by_name (bfd *abfd, const char *name) { struct section_hash_entry *sh; - sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE); + sh = section_hash_lookup (&abfd->section_htab, name, false, false); if (sh != NULL) return &sh->section; @@ -982,7 +982,7 @@ SYNOPSIS asection *bfd_get_section_by_name_if (bfd *abfd, const char *name, - bfd_boolean (*func) (bfd *abfd, asection *sect, void *obj), + bool (*func) (bfd *abfd, asection *sect, void *obj), void *obj); DESCRIPTION @@ -1000,15 +1000,13 @@ DESCRIPTION asection * bfd_get_section_by_name_if (bfd *abfd, const char *name, - bfd_boolean (*operation) (bfd *, - asection *, - void *), + bool (*operation) (bfd *, asection *, void *), void *user_storage) { struct section_hash_entry *sh; unsigned long hash; - sh = section_hash_lookup (&abfd->section_htab, name, FALSE, FALSE); + sh = section_hash_lookup (&abfd->section_htab, name, false, false); if (sh == NULL) return NULL; @@ -1061,7 +1059,7 @@ bfd_get_unique_section_name (bfd *abfd, const char *templat, int *count) abort (); sprintf (sname + len, ".%d", num++); } - while (section_hash_lookup (&abfd->section_htab, sname, FALSE, FALSE)); + while (section_hash_lookup (&abfd->section_htab, sname, false, false)); if (count != NULL) *count = num; @@ -1116,7 +1114,7 @@ bfd_make_section_old_way (bfd *abfd, const char *name) { struct section_hash_entry *sh; - sh = section_hash_lookup (&abfd->section_htab, name, TRUE, FALSE); + sh = section_hash_lookup (&abfd->section_htab, name, true, false); if (sh == NULL) return NULL; @@ -1171,7 +1169,7 @@ bfd_make_section_anyway_with_flags (bfd *abfd, const char *name, return NULL; } - sh = section_hash_lookup (&abfd->section_htab, name, TRUE, FALSE); + sh = section_hash_lookup (&abfd->section_htab, name, true, false); if (sh == NULL) return NULL; @@ -1256,7 +1254,7 @@ bfd_make_section_with_flags (bfd *abfd, const char *name, || strcmp (name, BFD_IND_SECTION_NAME) == 0) return NULL; - sh = section_hash_lookup (&abfd->section_htab, name, TRUE, FALSE); + sh = section_hash_lookup (&abfd->section_htab, name, true, false); if (sh == NULL) return NULL; @@ -1297,7 +1295,7 @@ FUNCTION bfd_set_section_flags SYNOPSIS - bfd_boolean bfd_set_section_flags (asection *sec, flagword flags); + bool bfd_set_section_flags (asection *sec, flagword flags); DESCRIPTION Set the attributes of the section @var{sec} to the value @var{flags}. @@ -1311,11 +1309,11 @@ DESCRIPTION */ -bfd_boolean +bool bfd_set_section_flags (asection *section, flagword flags) { section->flags = flags; - return TRUE; + return true; } /* @@ -1389,7 +1387,7 @@ FUNCTION SYNOPSIS asection *bfd_sections_find_if (bfd *abfd, - bfd_boolean (*operation) (bfd *abfd, asection *sect, void *obj), + bool (*operation) (bfd *abfd, asection *sect, void *obj), void *obj); DESCRIPTION @@ -1405,7 +1403,7 @@ DESCRIPTION asection * bfd_sections_find_if (bfd *abfd, - bfd_boolean (*operation) (bfd *, asection *, void *), + bool (*operation) (bfd *, asection *, void *), void *user_storage) { asection *sect; @@ -1422,7 +1420,7 @@ FUNCTION bfd_set_section_size SYNOPSIS - bfd_boolean bfd_set_section_size (asection *sec, bfd_size_type val); + bool bfd_set_section_size (asection *sec, bfd_size_type val); DESCRIPTION Set @var{sec} to the size @var{val}. If the operation is @@ -1434,7 +1432,7 @@ DESCRIPTION */ -bfd_boolean +bool bfd_set_section_size (asection *sec, bfd_size_type val) { /* Once you've started writing to any section you cannot create or change @@ -1443,11 +1441,11 @@ bfd_set_section_size (asection *sec, bfd_size_type val) if (sec->owner == NULL || sec->owner->output_has_begun) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } sec->size = val; - return TRUE; + return true; } /* @@ -1455,7 +1453,7 @@ FUNCTION bfd_set_section_contents SYNOPSIS - bfd_boolean bfd_set_section_contents + bool bfd_set_section_contents (bfd *abfd, asection *section, const void *data, file_ptr offset, bfd_size_type count); @@ -1481,7 +1479,7 @@ DESCRIPTION */ -bfd_boolean +bool bfd_set_section_contents (bfd *abfd, sec_ptr section, const void *location, @@ -1493,7 +1491,7 @@ bfd_set_section_contents (bfd *abfd, if (!(bfd_section_flags (section) & SEC_HAS_CONTENTS)) { bfd_set_error (bfd_error_no_contents); - return FALSE; + return false; } sz = section->size; @@ -1502,13 +1500,13 @@ bfd_set_section_contents (bfd *abfd, || count != (size_t) count) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (!bfd_write_p (abfd)) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* Record a copy of the data in memory if desired. */ @@ -1519,11 +1517,11 @@ bfd_set_section_contents (bfd *abfd, if (BFD_SEND (abfd, _bfd_set_section_contents, (abfd, section, location, offset, count))) { - abfd->output_has_begun = TRUE; - return TRUE; + abfd->output_has_begun = true; + return true; } - return FALSE; + return false; } /* @@ -1531,7 +1529,7 @@ FUNCTION bfd_get_section_contents SYNOPSIS - bfd_boolean bfd_get_section_contents + bool bfd_get_section_contents (bfd *abfd, asection *section, void *location, file_ptr offset, bfd_size_type count); @@ -1548,7 +1546,7 @@ DESCRIPTION <>. */ -bfd_boolean +bool bfd_get_section_contents (bfd *abfd, sec_ptr section, void *location, @@ -1560,7 +1558,7 @@ bfd_get_section_contents (bfd *abfd, if (section->flags & SEC_CONSTRUCTOR) { memset (location, 0, (size_t) count); - return TRUE; + return true; } if (abfd->direction != write_direction && section->rawsize != 0) @@ -1572,17 +1570,17 @@ bfd_get_section_contents (bfd *abfd, || count != (size_t) count) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (count == 0) /* Don't bother. */ - return TRUE; + return true; if ((section->flags & SEC_HAS_CONTENTS) == 0) { memset (location, 0, (size_t) count); - return TRUE; + return true; } if ((section->flags & SEC_IN_MEMORY) != 0) @@ -1594,11 +1592,11 @@ bfd_get_section_contents (bfd *abfd, error code. */ section->flags &= ~ SEC_IN_MEMORY; bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } memmove (location, section->contents + offset, (size_t) count); - return TRUE; + return true; } return BFD_SEND (abfd, _bfd_get_section_contents, @@ -1610,7 +1608,7 @@ FUNCTION bfd_malloc_and_get_section SYNOPSIS - bfd_boolean bfd_malloc_and_get_section + bool bfd_malloc_and_get_section (bfd *abfd, asection *section, bfd_byte **buf); DESCRIPTION @@ -1618,7 +1616,7 @@ DESCRIPTION into a buffer, *@var{buf}, malloc'd by this function. */ -bfd_boolean +bool bfd_malloc_and_get_section (bfd *abfd, sec_ptr sec, bfd_byte **buf) { *buf = NULL; @@ -1629,7 +1627,7 @@ FUNCTION bfd_copy_private_section_data SYNOPSIS - bfd_boolean bfd_copy_private_section_data + bool bfd_copy_private_section_data (bfd *ibfd, asection *isec, bfd *obfd, asection *osec); DESCRIPTION @@ -1651,17 +1649,17 @@ FUNCTION bfd_generic_is_group_section SYNOPSIS - bfd_boolean bfd_generic_is_group_section (bfd *, const asection *sec); + bool bfd_generic_is_group_section (bfd *, const asection *sec); DESCRIPTION Returns TRUE if @var{sec} is a member of a group. */ -bfd_boolean +bool bfd_generic_is_group_section (bfd *abfd ATTRIBUTE_UNUSED, const asection *sec ATTRIBUTE_UNUSED) { - return FALSE; + return false; } /* @@ -1687,20 +1685,20 @@ FUNCTION bfd_generic_discard_group SYNOPSIS - bfd_boolean bfd_generic_discard_group (bfd *abfd, asection *group); + bool bfd_generic_discard_group (bfd *abfd, asection *group); DESCRIPTION Remove all members of @var{group} from the output. */ -bfd_boolean +bool bfd_generic_discard_group (bfd *abfd ATTRIBUTE_UNUSED, asection *group ATTRIBUTE_UNUSED) { - return TRUE; + return true; } -bfd_boolean +bool _bfd_nowrite_set_section_contents (bfd *abfd, sec_ptr section ATTRIBUTE_UNUSED, const void *location ATTRIBUTE_UNUSED, diff --git a/bfd/simple.c b/bfd/simple.c index c84e49f12e..2e5366d6f3 100644 --- a/bfd/simple.c +++ b/bfd/simple.c @@ -40,7 +40,7 @@ simple_dummy_undefined_symbol (struct bfd_link_info *link_info ATTRIBUTE_UNUSED, bfd *abfd ATTRIBUTE_UNUSED, asection *section ATTRIBUTE_UNUSED, bfd_vma address ATTRIBUTE_UNUSED, - bfd_boolean fatal ATTRIBUTE_UNUSED) + bool fatal ATTRIBUTE_UNUSED) { } diff --git a/bfd/som.c b/bfd/som.c index 01bcd16cc1..5719b202c3 100644 --- a/bfd/som.c +++ b/bfd/som.c @@ -33,12 +33,12 @@ static bfd_reloc_status_type hppa_som_reloc (bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **); -static bfd_boolean som_mkobject (bfd *); -static bfd_boolean som_is_space (asection *); -static bfd_boolean som_is_subspace (asection *); +static bool som_mkobject (bfd *); +static bool som_is_space (asection *); +static bool som_is_subspace (asection *); static int compare_subspaces (const void *, const void *); static uint32_t som_compute_checksum (struct som_external_header *); -static bfd_boolean som_build_and_write_symbol_table (bfd *); +static bool som_build_and_write_symbol_table (bfd *); static unsigned int som_slurp_symbol_table (bfd *); /* Magic not defined in standard HP-UX header files until 8.0. */ @@ -637,7 +637,7 @@ static const int comp3_opcodes[] = #endif #define SOM_HOWTO(TYPE, NAME) \ - HOWTO(TYPE, 0, 0, 32, FALSE, 0, 0, hppa_som_reloc, NAME, FALSE, 0, 0, FALSE) + HOWTO(TYPE, 0, 0, 32, false, 0, 0, hppa_som_reloc, NAME, false, 0, 0, false) static reloc_howto_type som_hppa_howto_table[] = { @@ -2069,7 +2069,7 @@ som_object_setup (bfd *abfd, BFD sections which correspond to spaces will overlap the sections for the associated subspaces. */ -static bfd_boolean +static bool setup_sections (bfd *abfd, struct som_header *file_hdr, unsigned long current_offset) @@ -2371,12 +2371,12 @@ setup_sections (bfd *abfd, free (space_strings); free (subspace_sections); - return TRUE; + return true; error_return: free (space_strings); free (subspace_sections); - return FALSE; + return false; } @@ -2527,21 +2527,21 @@ som_object_p (bfd *abfd) /* Create a SOM object. */ -static bfd_boolean +static bool som_mkobject (bfd *abfd) { /* Allocate memory to hold backend information. */ abfd->tdata.som_data = bfd_zalloc (abfd, (bfd_size_type) sizeof (struct som_data_struct)); if (abfd->tdata.som_data == NULL) - return FALSE; - return TRUE; + return false; + return true; } /* Initialize some information in the file header. This routine makes not attempt at doing the right thing for a full executable; it is only meant to handle relocatable objects. */ -static bfd_boolean +static bool som_prep_headers (bfd *abfd) { struct som_header *file_hdr; @@ -2551,7 +2551,7 @@ som_prep_headers (bfd *abfd) /* Make and attach a file header to the BFD. */ file_hdr = bfd_zalloc (abfd, amt); if (file_hdr == NULL) - return FALSE; + return false; obj_som_file_hdr (abfd) = file_hdr; if (abfd->flags & (EXEC_P | DYNAMIC)) @@ -2560,7 +2560,7 @@ som_prep_headers (bfd *abfd) amt = sizeof (struct som_exec_auxhdr); obj_som_exec_hdr (abfd) = bfd_zalloc (abfd, amt); if (obj_som_exec_hdr (abfd) == NULL) - return FALSE; + return false; if (abfd->flags & D_PAGED) file_hdr->a_magic = DEMAND_MAGIC; @@ -2602,7 +2602,7 @@ som_prep_headers (bfd *abfd) amt = sizeof (struct som_space_dictionary_record); som_section_data (section)->space_dict = bfd_zalloc (abfd, amt); if (som_section_data (section)->space_dict == NULL) - return FALSE; + return false; /* Set space attributes. Note most attributes of SOM spaces are set based on the subspaces it contains. */ som_section_data (section)->space_dict->loader_fix_index = -1; @@ -2624,7 +2624,7 @@ som_prep_headers (bfd *abfd) amt = sizeof (struct som_subspace_dictionary_record); som_section_data (section)->subspace_dict = bfd_zalloc (abfd, amt); if (som_section_data (section)->subspace_dict == NULL) - return FALSE; + return false; /* Set subspace attributes. Basic stuff is done here, additional attributes are filled in later as more information becomes @@ -2659,56 +2659,56 @@ som_prep_headers (bfd *abfd) som_section_data (section)->copy_data->dup_common; } } - return TRUE; + return true; } /* Return TRUE if the given section is a SOM space, FALSE otherwise. */ -static bfd_boolean +static bool som_is_space (asection *section) { /* If no copy data is available, then it's neither a space nor a subspace. */ if (som_section_data (section)->copy_data == NULL) - return FALSE; + return false; /* If the containing space isn't the same as the given section, then this isn't a space. */ if (som_section_data (section)->copy_data->container != section && (som_section_data (section)->copy_data->container->output_section != section)) - return FALSE; + return false; /* OK. Must be a space. */ - return TRUE; + return true; } /* Return TRUE if the given section is a SOM subspace, FALSE otherwise. */ -static bfd_boolean +static bool som_is_subspace (asection *section) { /* If no copy data is available, then it's neither a space nor a subspace. */ if (som_section_data (section)->copy_data == NULL) - return FALSE; + return false; /* If the containing space is the same as the given section, then this isn't a subspace. */ if (som_section_data (section)->copy_data->container == section || (som_section_data (section)->copy_data->container->output_section == section)) - return FALSE; + return false; /* OK. Must be a subspace. */ - return TRUE; + return true; } /* Return TRUE if the given space contains the given subspace. It is safe to assume space really is a space, and subspace really is a subspace. */ -static bfd_boolean +static bool som_is_container (asection *space, asection *subspace) { return (som_section_data (subspace)->copy_data->container == space) @@ -2796,7 +2796,7 @@ compare_subspaces (const void *arg1, const void *arg2) /* Perform various work in preparation for emitting the fixup stream. */ -static bfd_boolean +static bool som_prep_for_fixups (bfd *abfd, asymbol **syms, unsigned long num_syms) { unsigned long i; @@ -2805,7 +2805,7 @@ som_prep_for_fixups (bfd *abfd, asymbol **syms, unsigned long num_syms) size_t amt; if (num_syms == 0) - return TRUE; + return true; /* Most SOM relocations involving a symbol have a length which is dependent on the index of the symbol. So symbols which are @@ -2880,11 +2880,11 @@ som_prep_for_fixups (bfd *abfd, asymbol **syms, unsigned long num_syms) if (_bfd_mul_overflow (num_syms, sizeof (asymbol *), &amt)) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } sorted_syms = bfd_zalloc (abfd, amt); if (sorted_syms == NULL) - return FALSE; + return false; memcpy (sorted_syms, syms, num_syms * sizeof (asymbol *)); qsort (sorted_syms, num_syms, sizeof (asymbol *), compare_syms); obj_som_sorted_syms (abfd) = sorted_syms; @@ -2900,10 +2900,10 @@ som_prep_for_fixups (bfd *abfd, asymbol **syms, unsigned long num_syms) else som_symbol_data (sorted_syms[i])->index = i; } - return TRUE; + return true; } -static bfd_boolean +static bool som_write_fixups (bfd *abfd, unsigned long current_offset, unsigned int *total_reloc_sizep) @@ -2972,7 +2972,7 @@ som_write_fixups (bfd *abfd, for this subspace in preparation for writing out its fixup stream. */ if (bfd_seek (abfd, current_offset + total_reloc_size, SEEK_SET) != 0) - return FALSE; + return false; /* Buffer space has already been allocated. Just perform some initialization here. */ @@ -3011,7 +3011,7 @@ som_write_fixups (bfd *abfd, { amt = p - tmp_space; if (bfd_bwrite ((void *) tmp_space, amt, abfd) != amt) - return FALSE; + return false; p = tmp_space; som_initialize_reloc_queue (reloc_queue); @@ -3296,7 +3296,7 @@ som_write_fixups (bfd *abfd, /* Scribble out the relocations. */ amt = p - tmp_space; if (bfd_bwrite ((void *) tmp_space, amt, abfd) != amt) - return FALSE; + return false; p = tmp_space; total_reloc_size += subspace_reloc_size; @@ -3306,12 +3306,12 @@ som_write_fixups (bfd *abfd, section = section->next; } *total_reloc_sizep = total_reloc_size; - return TRUE; + return true; } /* Write out the space/subspace string table. */ -static bfd_boolean +static bool som_write_space_strings (bfd *abfd, unsigned long current_offset, unsigned int *string_sizep) @@ -3327,12 +3327,12 @@ som_write_space_strings (bfd *abfd, bfd_size_type res; if (tmp_space == NULL) - return FALSE; + return false; /* Seek to the start of the space strings in preparation for writing them out. */ if (bfd_seek (abfd, (file_ptr) current_offset, SEEK_SET) != 0) - return FALSE; + return false; /* Walk through all the spaces and subspaces (order is not important) building up and writing string table entries for their names. */ @@ -3357,7 +3357,7 @@ som_write_space_strings (bfd *abfd, /* Flush buffer before refilling or reallocating. */ amt = p - tmp_space; if (bfd_bwrite ((void *) &tmp_space[0], amt, abfd) != amt) - return FALSE; + return false; /* Reallocate if now empty buffer still too small. */ if (5 + length > tmp_space_size) @@ -3413,14 +3413,14 @@ som_write_space_strings (bfd *abfd, res = bfd_bwrite ((void *) &tmp_space[0], amt, abfd); free (tmp_space); if (res != amt) - return FALSE; + return false; *string_sizep = strings_size; - return TRUE; + return true; } /* Write out the symbol string table. */ -static bfd_boolean +static bool som_write_symbol_strings (bfd *abfd, unsigned long current_offset, asymbol **syms, @@ -3439,7 +3439,7 @@ som_write_symbol_strings (bfd *abfd, bfd_size_type res; if (tmp_space == NULL) - return FALSE; + return false; /* This gets a bit gruesome because of the compilation unit. The strings within the compilation unit are part of the symbol @@ -3451,7 +3451,7 @@ som_write_symbol_strings (bfd *abfd, /* Seek to the start of the space strings in preparation for writing them out. */ if (bfd_seek (abfd, (file_ptr) current_offset, SEEK_SET) != 0) - return FALSE; + return false; if (compilation_unit) { @@ -3488,7 +3488,7 @@ som_write_symbol_strings (bfd *abfd, /* Flush buffer before refilling or reallocating. */ amt = p - tmp_space; if (bfd_bwrite ((void *) &tmp_space[0], amt, abfd) != amt) - return FALSE; + return false; /* Reallocate if now empty buffer still too small. */ if (5 + length > tmp_space_size) @@ -3543,7 +3543,7 @@ som_write_symbol_strings (bfd *abfd, /* Flush buffer before refilling or reallocating. */ amt = p - tmp_space; if (bfd_bwrite ((void *) &tmp_space[0], amt, abfd) != amt) - return FALSE; + return false; /* Reallocate if now empty buffer still too small. */ if (5 + length > tmp_space_size) @@ -3589,17 +3589,17 @@ som_write_symbol_strings (bfd *abfd, res = bfd_bwrite ((void *) &tmp_space[0], amt, abfd); free (tmp_space); if (res != amt) - return FALSE; + return false; *string_sizep = strings_size; - return TRUE; + return true; } /* Compute variable information to be placed in the SOM headers, space/subspace dictionaries, relocation streams, etc. Begin writing parts of the object file. */ -static bfd_boolean +static bool som_begin_writing (bfd *abfd) { unsigned long current_offset = 0; @@ -3645,7 +3645,7 @@ som_begin_writing (bfd *abfd) bfd_size_type len; if (bfd_seek (abfd, (file_ptr) current_offset, SEEK_SET) != 0) - return FALSE; + return false; /* Write the aux_id structure and the string length. */ len = sizeof (struct som_external_string_auxhdr); @@ -3654,7 +3654,7 @@ som_begin_writing (bfd *abfd) som_swap_string_auxhdr_out (obj_som_version_hdr (abfd), &ext_string_auxhdr); if (bfd_bwrite (&ext_string_auxhdr, len, abfd) != len) - return FALSE; + return false; /* Write the version string. */ len = obj_som_version_hdr (abfd)->header_id.length - 4; @@ -3662,7 +3662,7 @@ som_begin_writing (bfd *abfd) current_offset += len; if (bfd_bwrite ((void *) obj_som_version_hdr (abfd)->string, len, abfd) != len) - return FALSE; + return false; } if (obj_som_copyright_hdr (abfd) != NULL) @@ -3671,7 +3671,7 @@ som_begin_writing (bfd *abfd) bfd_size_type len; if (bfd_seek (abfd, (file_ptr) current_offset, SEEK_SET) != 0) - return FALSE; + return false; /* Write the aux_id structure and the string length. */ len = sizeof (struct som_external_string_auxhdr); @@ -3680,7 +3680,7 @@ som_begin_writing (bfd *abfd) som_swap_string_auxhdr_out (obj_som_copyright_hdr (abfd), &ext_string_auxhdr); if (bfd_bwrite (&ext_string_auxhdr, len, abfd) != len) - return FALSE; + return false; /* Write the copyright string. */ len = obj_som_copyright_hdr (abfd)->header_id.length - 4; @@ -3688,7 +3688,7 @@ som_begin_writing (bfd *abfd) current_offset += len; if (bfd_bwrite ((void *) obj_som_copyright_hdr (abfd)->string, len, abfd) != len) - return FALSE; + return false; } /* Next comes the initialization pointers; we have no initialization @@ -3738,7 +3738,7 @@ som_begin_writing (bfd *abfd) /* Scribble out the space strings. */ if (! som_write_space_strings (abfd, current_offset, &strings_size)) - return FALSE; + return false; /* Record total string table size in the header and update the current offset. */ @@ -3935,9 +3935,9 @@ som_begin_writing (bfd *abfd) if (abfd->flags & (EXEC_P | DYNAMIC)) current_offset = SOM_ALIGN (current_offset, PA_PAGESIZE); if (bfd_seek (abfd, (file_ptr) current_offset - 1, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bwrite ((void *) "", (bfd_size_type) 1, abfd) != 1) - return FALSE; + return false; obj_som_file_hdr (abfd)->unloadable_sp_size = current_offset - obj_som_file_hdr (abfd)->unloadable_sp_location; @@ -3949,12 +3949,12 @@ som_begin_writing (bfd *abfd) /* Done. Store the total size of the SOM so far. */ obj_som_file_hdr (abfd)->som_length = current_offset; - return TRUE; + return true; } /* Finally, scribble out the various headers to the disk. */ -static bfd_boolean +static bool som_finish_writing (bfd *abfd) { int num_spaces = som_count_spaces (abfd); @@ -4011,7 +4011,7 @@ som_finish_writing (bfd *abfd) if (! som_write_symbol_strings (abfd, current_offset, syms, num_syms, &strings_size, obj_som_compilation_unit (abfd))) - return FALSE; + return false; /* Record total string table size in header and update the current offset. */ @@ -4022,7 +4022,7 @@ som_finish_writing (bfd *abfd) if (!som_prep_for_fixups (abfd, bfd_get_outsymbols (abfd), bfd_get_symcount (abfd))) - return FALSE; + return false; /* At the end of the file is the fixup stream which starts on a word boundary. */ @@ -4033,7 +4033,7 @@ som_finish_writing (bfd *abfd) /* Write the fixups and update fields in subspace headers which relate to the fixup stream. */ if (! som_write_fixups (abfd, current_offset, &total_reloc_size)) - return FALSE; + return false; /* Record the total size of the fixup stream in the file header. */ obj_som_file_hdr (abfd)->fixup_request_total = total_reloc_size; @@ -4044,7 +4044,7 @@ som_finish_writing (bfd *abfd) /* Now that the symbol table information is complete, build and write the symbol table. */ if (! som_build_and_write_symbol_table (abfd)) - return FALSE; + return false; /* Subspaces are written first so that we can set up information about them in their containing spaces as the subspace is written. */ @@ -4052,7 +4052,7 @@ som_finish_writing (bfd *abfd) /* Seek to the start of the subspace dictionary records. */ location = obj_som_file_hdr (abfd)->subspace_location; if (bfd_seek (abfd, location, SEEK_SET) != 0) - return FALSE; + return false; section = abfd->sections; /* Now for each loadable space write out records for its subspaces. */ @@ -4104,7 +4104,7 @@ som_finish_writing (bfd *abfd) (som_section_data (subsection)->subspace_dict, &ext_subspace_dict); amt = sizeof (struct som_subspace_dictionary_record); if (bfd_bwrite (&ext_subspace_dict, amt, abfd) != amt) - return FALSE; + return false; } /* Goto the next section. */ section = section->next; @@ -4162,7 +4162,7 @@ som_finish_writing (bfd *abfd) (som_section_data (subsection)->subspace_dict, &ext_subspace_dict); amt = sizeof (struct som_subspace_dictionary_record); if (bfd_bwrite (&ext_subspace_dict, amt, abfd) != amt) - return FALSE; + return false; } /* Goto the next section. */ section = section->next; @@ -4175,7 +4175,7 @@ som_finish_writing (bfd *abfd) dictionary records. */ location = obj_som_file_hdr (abfd)->space_location; if (bfd_seek (abfd, location, SEEK_SET) != 0) - return FALSE; + return false; section = abfd->sections; for (i = 0; i < num_spaces; i++) @@ -4191,7 +4191,7 @@ som_finish_writing (bfd *abfd) &ext_space_dict); amt = sizeof (struct som_external_space_dictionary_record); if (bfd_bwrite (&ext_space_dict, amt, abfd) != amt) - return FALSE; + return false; /* Goto the next section. */ section = section->next; @@ -4204,14 +4204,14 @@ som_finish_writing (bfd *abfd) location = obj_som_file_hdr (abfd)->compiler_location; if (bfd_seek (abfd, location, SEEK_SET) != 0) - return FALSE; + return false; som_swap_compilation_unit_out (obj_som_compilation_unit (abfd), &ext_comp_unit); amt = sizeof (struct som_external_compilation_unit); if (bfd_bwrite (&ext_comp_unit, amt, abfd) != amt) - return FALSE; + return false; } /* Setting of the system_id has to happen very late now that copying of @@ -4233,10 +4233,10 @@ som_finish_writing (bfd *abfd) /* Only thing left to do is write out the file header. It is always at location zero. Seek there and write it. */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; + return false; amt = sizeof (struct som_external_header); if (bfd_bwrite (&ext_header, amt, abfd) != amt) - return FALSE; + return false; /* Now write the exec header. */ if (abfd->flags & (EXEC_P | DYNAMIC)) @@ -4266,20 +4266,20 @@ som_finish_writing (bfd *abfd) || exec_header->exec_dfile + exec_header->exec_dsize > som_length) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } som_swap_exec_auxhdr_out (exec_header, &ext_exec_header); if (bfd_seek (abfd, obj_som_file_hdr (abfd)->aux_header_location, SEEK_SET) != 0) - return FALSE; + return false; amt = sizeof (ext_exec_header); if (bfd_bwrite (&ext_exec_header, amt, abfd) != amt) - return FALSE; + return false; } - return TRUE; + return true; } /* Compute and return the checksum for a SOM file header. */ @@ -4413,9 +4413,9 @@ som_bfd_derive_misc_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, /* The secondary_def field is for "weak" symbols. */ if (sym->flags & BSF_WEAK) - info->secondary_def = TRUE; + info->secondary_def = true; else - info->secondary_def = FALSE; + info->secondary_def = false; /* The is_comdat, is_common and dup_common fields provide various flavors of common. @@ -4459,7 +4459,7 @@ som_bfd_derive_misc_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, /* Build and write, in one big chunk, the entire symbol table for this BFD. */ -static bfd_boolean +static bool som_build_and_write_symbol_table (bfd *abfd) { unsigned int num_syms = bfd_get_symcount (abfd); @@ -4477,7 +4477,7 @@ som_build_and_write_symbol_table (bfd *abfd) &amt)) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } som_symtab = bfd_zmalloc (amt); if (som_symtab == NULL && num_syms != 0) @@ -4526,16 +4526,16 @@ som_build_and_write_symbol_table (bfd *abfd) goto error_return; free (som_symtab); - return TRUE; + return true; error_return: free (som_symtab); - return FALSE; + return false; } /* Write an object in SOM format. */ -static bfd_boolean +static bool som_write_object_contents (bfd *abfd) { if (! abfd->output_has_begun) @@ -4543,7 +4543,7 @@ som_write_object_contents (bfd *abfd) /* Set up fixed parts of the file, space, and subspace headers. Notify the world that output has begun. */ som_prep_headers (abfd); - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; /* Start writing the object file. This include all the string tables, fixup streams, and other portions of the object file. */ som_begin_writing (abfd); @@ -4554,7 +4554,7 @@ som_write_object_contents (bfd *abfd) /* Read and save the string table associated with the given BFD. */ -static bfd_boolean +static bool som_slurp_string_table (bfd *abfd) { char *stringtab; @@ -4562,7 +4562,7 @@ som_slurp_string_table (bfd *abfd) /* Use the saved version if its available. */ if (obj_som_stringtab (abfd) != NULL) - return TRUE; + return true; /* I don't think this can currently happen, and I'm not sure it should really be an error, but it's better than getting unpredictable results @@ -4570,20 +4570,20 @@ som_slurp_string_table (bfd *abfd) if (obj_som_stringtab_size (abfd) == 0) { bfd_set_error (bfd_error_no_symbols); - return FALSE; + return false; } /* Allocate and read in the string table. */ if (bfd_seek (abfd, obj_som_str_filepos (abfd), SEEK_SET) != 0) - return FALSE; + return false; amt = obj_som_stringtab_size (abfd); stringtab = (char *) _bfd_malloc_and_read (abfd, amt, amt); if (stringtab == NULL) - return FALSE; + return false; /* Save our results and return success. */ obj_som_stringtab (abfd) = stringtab; - return TRUE; + return true; } /* Return the amount of data (in bytes) required to hold the symbol @@ -4824,12 +4824,12 @@ som_slurp_symbol_table (bfd *abfd) obj_som_symtab (abfd) = symbase; successful_return: free (buf); - return (TRUE); + return true; error_return: free (symbase); free (buf); - return FALSE; + return false; } /* Canonicalize a SOM symbol table. Return the number of entries @@ -4902,7 +4902,7 @@ som_print_symbol (bfd *abfd, } } -static bfd_boolean +static bool som_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name) { @@ -4928,7 +4928,7 @@ som_set_reloc_info (unsigned char *fixup, arelent *internal_relocs, asection *section, asymbol **symbols, - bfd_boolean just_count) + bool just_count) { unsigned int op, varname, deallocate_contents = 0; unsigned char *end_fixups = &fixup[end]; @@ -5263,11 +5263,11 @@ som_set_reloc_info (unsigned char *fixup, set to TRUE to indicate it only needs a count of the number of actual relocations. */ -static bfd_boolean +static bool som_slurp_reloc_table (bfd *abfd, asection *section, asymbol **symbols, - bfd_boolean just_count) + bool just_count) { unsigned char *external_relocs; unsigned int fixup_stream_size; @@ -5278,7 +5278,7 @@ som_slurp_reloc_table (bfd *abfd, fixup_stream_size = som_section_data (section)->reloc_size; /* If there were no relocations, then there is nothing to do. */ if (section->reloc_count == 0) - return TRUE; + return true; /* If reloc_count is -1, then the relocation stream has not been parsed. We must do so now to know how many relocations exist. */ @@ -5287,44 +5287,44 @@ som_slurp_reloc_table (bfd *abfd, /* Read in the external forms. */ if (bfd_seek (abfd, obj_som_reloc_filepos (abfd) + section->rel_filepos, SEEK_SET) != 0) - return FALSE; + return false; amt = fixup_stream_size; external_relocs = _bfd_malloc_and_read (abfd, amt, amt); if (external_relocs == NULL) - return FALSE; + return false; /* Let callers know how many relocations found. also save the relocation stream as we will need it again. */ section->reloc_count = som_set_reloc_info (external_relocs, fixup_stream_size, - NULL, NULL, NULL, TRUE); + NULL, NULL, NULL, true); som_section_data (section)->reloc_stream = external_relocs; } /* If the caller only wanted a count, then return now. */ if (just_count) - return TRUE; + return true; num_relocs = section->reloc_count; external_relocs = som_section_data (section)->reloc_stream; /* Return saved information about the relocations if it is available. */ if (section->relocation != NULL) - return TRUE; + return true; if (_bfd_mul_overflow (num_relocs, sizeof (arelent), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } internal_relocs = bfd_zalloc (abfd, amt); if (internal_relocs == NULL) - return FALSE; + return false; /* Process and internalize the relocations. */ som_set_reloc_info (external_relocs, fixup_stream_size, - internal_relocs, section, symbols, FALSE); + internal_relocs, section, symbols, false); /* We're done with the external relocations. Free them. */ free (external_relocs); @@ -5332,7 +5332,7 @@ som_slurp_reloc_table (bfd *abfd, /* Save our results and return success. */ section->relocation = internal_relocs; - return TRUE; + return true; } /* Return the number of bytes required to store the relocation @@ -5345,7 +5345,7 @@ som_get_reloc_upper_bound (bfd *abfd, sec_ptr asect) and parse it to determine how many relocations exist. */ if (asect->flags & SEC_RELOC) { - if (! som_slurp_reloc_table (abfd, asect, NULL, TRUE)) + if (! som_slurp_reloc_table (abfd, asect, NULL, true)) return -1; return (asect->reloc_count + 1) * sizeof (arelent *); } @@ -5368,7 +5368,7 @@ som_canonicalize_reloc (bfd *abfd, arelent *tblptr; int count; - if (! som_slurp_reloc_table (abfd, section, symbols, FALSE)) + if (! som_slurp_reloc_table (abfd, section, symbols, false)) return -1; count = section->reloc_count; @@ -5385,7 +5385,7 @@ extern const bfd_target hppa_som_vec; /* A hook to set up object file dependent section information. */ -static bfd_boolean +static bool som_new_section_hook (bfd *abfd, asection *newsect) { if (!newsect->used_by_bfd) @@ -5394,7 +5394,7 @@ som_new_section_hook (bfd *abfd, asection *newsect) newsect->used_by_bfd = bfd_zalloc (abfd, amt); if (!newsect->used_by_bfd) - return FALSE; + return false; } newsect->alignment_power = 3; @@ -5405,7 +5405,7 @@ som_new_section_hook (bfd *abfd, asection *newsect) /* Copy any private info we understand from the input symbol to the output symbol. */ -static bfd_boolean +static bool som_bfd_copy_private_symbol_data (bfd *ibfd, asymbol *isymbol, bfd *obfd, @@ -5417,20 +5417,20 @@ som_bfd_copy_private_symbol_data (bfd *ibfd, /* One day we may try to grok other private data. */ if (ibfd->xvec->flavour != bfd_target_som_flavour || obfd->xvec->flavour != bfd_target_som_flavour) - return FALSE; + return false; /* The only private information we need to copy is the argument relocation bits. */ output_symbol->tc_data.ap.hppa_arg_reloc = input_symbol->tc_data.ap.hppa_arg_reloc; - return TRUE; + return true; } /* Copy any private info we understand from the input section to the output section. */ -static bfd_boolean +static bool som_bfd_copy_private_section_data (bfd *ibfd, asection *isection, bfd *obfd, @@ -5442,12 +5442,12 @@ som_bfd_copy_private_section_data (bfd *ibfd, if (ibfd->xvec->flavour != bfd_target_som_flavour || obfd->xvec->flavour != bfd_target_som_flavour || (!som_is_space (isection) && !som_is_subspace (isection))) - return TRUE; + return true; amt = sizeof (struct som_copyable_section_data_struct); som_section_data (osection)->copy_data = bfd_zalloc (obfd, amt); if (som_section_data (osection)->copy_data == NULL) - return FALSE; + return false; memcpy (som_section_data (osection)->copy_data, som_section_data (isection)->copy_data, @@ -5464,39 +5464,39 @@ som_bfd_copy_private_section_data (bfd *ibfd, /* User has specified a subspace without its containing space. */ _bfd_error_handler (_("%pB[%pA]: no output section for space %pA"), obfd, osection, som_section_data (osection)->copy_data->container); - return FALSE; + return false; } } - return TRUE; + return true; } /* Copy any private info we understand from the input bfd to the output bfd. */ -static bfd_boolean +static bool som_bfd_copy_private_bfd_data (bfd *ibfd, bfd *obfd) { /* One day we may try to grok other private data. */ if (ibfd->xvec->flavour != bfd_target_som_flavour || obfd->xvec->flavour != bfd_target_som_flavour) - return TRUE; + return true; /* Allocate some memory to hold the data we need. */ obj_som_exec_data (obfd) = bfd_zalloc (obfd, (bfd_size_type) sizeof (struct som_exec_data)); if (obj_som_exec_data (obfd) == NULL) - return FALSE; + return false; /* Now copy the data. */ memcpy (obj_som_exec_data (obfd), obj_som_exec_data (ibfd), sizeof (struct som_exec_data)); - return TRUE; + return true; } /* Display the SOM header. */ -static bfd_boolean +static bool som_bfd_print_private_bfd_data (bfd *abfd, void *farg) { struct som_exec_auxhdr *exec_header; @@ -5538,13 +5538,13 @@ som_bfd_print_private_bfd_data (bfd *abfd, void *farg) fprintf (f, " bss initializer %#lx\n", (long) exec_header->exec_bfill); } - return TRUE; + return true; } /* Set backend info for sections which can not be described in the BFD data structures. */ -bfd_boolean +bool bfd_som_set_section_attributes (asection *section, int defined, int private, @@ -5558,20 +5558,20 @@ bfd_som_set_section_attributes (asection *section, som_section_data (section)->copy_data = bfd_zalloc (section->owner, amt); if (som_section_data (section)->copy_data == NULL) - return FALSE; + return false; } som_section_data (section)->copy_data->sort_key = sort_key; som_section_data (section)->copy_data->is_defined = defined; som_section_data (section)->copy_data->is_private = private; som_section_data (section)->copy_data->container = section; som_section_data (section)->copy_data->space_number = spnum; - return TRUE; + return true; } /* Set backend info for subsections which can not be described in the BFD data structures. */ -bfd_boolean +bool bfd_som_set_subsection_attributes (asection *section, asection *container, int access_ctr, @@ -5588,7 +5588,7 @@ bfd_som_set_subsection_attributes (asection *section, som_section_data (section)->copy_data = bfd_zalloc (section->owner, amt); if (som_section_data (section)->copy_data == NULL) - return FALSE; + return false; } som_section_data (section)->copy_data->sort_key = sort_key; som_section_data (section)->copy_data->access_control_bits = access_ctr; @@ -5597,7 +5597,7 @@ bfd_som_set_subsection_attributes (asection *section, som_section_data (section)->copy_data->is_comdat = comdat; som_section_data (section)->copy_data->is_common = common; som_section_data (section)->copy_data->dup_common = dup_common; - return TRUE; + return true; } /* Set the full SOM symbol type. SOM needs far more symbol information @@ -5615,7 +5615,7 @@ bfd_som_set_symbol_type (asymbol *symbol, unsigned int type) /* Attach an auxiliary header to the BFD backend so that it may be written into the object file. */ -bfd_boolean +bool bfd_som_attach_aux_hdr (bfd *abfd, int type, char *string) { size_t amt; @@ -5630,7 +5630,7 @@ bfd_som_attach_aux_hdr (bfd *abfd, int type, char *string) amt = sizeof (struct som_string_auxhdr) + len + pad; obj_som_version_hdr (abfd) = bfd_zalloc (abfd, amt); if (!obj_som_version_hdr (abfd)) - return FALSE; + return false; obj_som_version_hdr (abfd)->header_id.type = VERSION_AUX_ID; obj_som_version_hdr (abfd)->header_id.length = 4 + len + pad; obj_som_version_hdr (abfd)->string_length = len; @@ -5647,20 +5647,20 @@ bfd_som_attach_aux_hdr (bfd *abfd, int type, char *string) amt = sizeof (struct som_string_auxhdr) + len + pad; obj_som_copyright_hdr (abfd) = bfd_zalloc (abfd, amt); if (!obj_som_copyright_hdr (abfd)) - return FALSE; + return false; obj_som_copyright_hdr (abfd)->header_id.type = COPYRIGHT_AUX_ID; obj_som_copyright_hdr (abfd)->header_id.length = len + pad + 4; obj_som_copyright_hdr (abfd)->string_length = len; memcpy (obj_som_copyright_hdr (abfd)->string, string, len); memset (obj_som_copyright_hdr (abfd)->string + len, 0, pad); } - return TRUE; + return true; } /* Attach a compilation unit header to the BFD backend so that it may be written into the object file. */ -bfd_boolean +bool bfd_som_attach_compilation_unit (bfd *abfd, const char *name, const char *language_name, @@ -5672,14 +5672,14 @@ bfd_som_attach_compilation_unit (bfd *abfd, n = (struct som_compilation_unit *) bfd_zalloc (abfd, (bfd_size_type) sizeof (*n)); if (n == NULL) - return FALSE; + return false; #define STRDUP(f) \ if (f != NULL) \ { \ n->f.name = bfd_alloc (abfd, (bfd_size_type) strlen (f) + 1); \ if (n->f.name == NULL) \ - return FALSE; \ + return false; \ strcpy (n->f.name, f); \ } @@ -5692,10 +5692,10 @@ bfd_som_attach_compilation_unit (bfd *abfd, obj_som_compilation_unit (abfd) = n; - return TRUE; + return true; } -static bfd_boolean +static bool som_get_section_contents (bfd *abfd, sec_ptr section, void *location, @@ -5703,15 +5703,15 @@ som_get_section_contents (bfd *abfd, bfd_size_type count) { if (count == 0 || ((section->flags & SEC_HAS_CONTENTS) == 0)) - return TRUE; + return true; if ((bfd_size_type) (offset+count) > section->size || bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) != 0 || bfd_bread (location, count, abfd) != count) - return FALSE; /* On error. */ - return TRUE; + return false; /* On error. */ + return true; } -static bfd_boolean +static bool som_set_section_contents (bfd *abfd, sec_ptr section, const void *location, @@ -5723,7 +5723,7 @@ som_set_section_contents (bfd *abfd, /* Set up fixed parts of the file, space, and subspace headers. Notify the world that output has begun. */ som_prep_headers (abfd); - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; /* Start writing the object file. This include all the string tables, fixup streams, and other portions of the object file. */ som_begin_writing (abfd); @@ -5733,20 +5733,20 @@ som_set_section_contents (bfd *abfd, are not generated at run time by the OS). */ if (!som_is_subspace (section) || ((section->flags & SEC_HAS_CONTENTS) == 0)) - return TRUE; + return true; /* Seek to the proper offset within the object file and write the data. */ offset += som_section_data (section)->subspace_dict->file_loc_init_value; if (bfd_seek (abfd, offset, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bwrite (location, count, abfd) != count) - return FALSE; - return TRUE; + return false; + return true; } -static bfd_boolean +static bool som_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long machine) @@ -5755,7 +5755,7 @@ som_set_arch_mach (bfd *abfd, return bfd_default_set_arch_mach (abfd, arch, machine); } -static bfd_boolean +static bool som_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, @@ -5765,7 +5765,7 @@ som_find_nearest_line (bfd *abfd, unsigned int *line_ptr, unsigned int *discriminator_ptr) { - bfd_boolean found; + bool found; asymbol *func; bfd_vma low_func; asymbol **p; @@ -5777,13 +5777,13 @@ som_find_nearest_line (bfd *abfd, & found, filename_ptr, functionname_ptr, line_ptr, & somdata (abfd).line_info)) - return FALSE; + return false; if (found) - return TRUE; + return true; if (symbols == NULL) - return FALSE; + return false; /* Fallback: find function name from symbols table. */ func = NULL; @@ -5804,13 +5804,13 @@ som_find_nearest_line (bfd *abfd, } if (func == NULL) - return FALSE; + return false; *filename_ptr = NULL; *functionname_ptr = bfd_asymbol_name (func); *line_ptr = 0; - return TRUE; + return true; } static int @@ -5902,7 +5902,7 @@ som_get_symbol_info (bfd *ignore_abfd ATTRIBUTE_UNUSED, /* Count the number of symbols in the archive symbol table. Necessary so that we can allocate space for all the carsyms at once. */ -static bfd_boolean +static bool som_bfd_count_ar_symbols (bfd *abfd, struct som_lst_header *lst_header, symindex *count) @@ -5919,7 +5919,7 @@ som_bfd_count_ar_symbols (bfd *abfd, if (_bfd_mul_overflow (lst_header->hash_size, 4, &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } hash_table = _bfd_malloc_and_read (abfd, amt, amt); if (hash_table == NULL && lst_header->hash_size != 0) @@ -5980,17 +5980,17 @@ som_bfd_count_ar_symbols (bfd *abfd, } } free (hash_table); - return TRUE; + return true; error_return: free (hash_table); - return FALSE; + return false; } /* Fill in the canonical archive symbols (SYMS) from the archive described by ABFD and LST_HEADER. */ -static bfd_boolean +static bool som_bfd_fill_in_ar_symbols (bfd *abfd, struct som_lst_header *lst_header, carsym **syms) @@ -6010,7 +6010,7 @@ som_bfd_fill_in_ar_symbols (bfd *abfd, if (_bfd_mul_overflow (lst_header->hash_size, 4, &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } hash_table = _bfd_malloc_and_read (abfd, amt, amt); if (hash_table == NULL && lst_header->hash_size != 0) @@ -6154,17 +6154,17 @@ som_bfd_fill_in_ar_symbols (bfd *abfd, archive symbol table. */ free (hash_table); free (som_dict); - return TRUE; + return true; error_return: free (hash_table); free (som_dict); - return FALSE; + return false; } /* Read in the LST from the archive. */ -static bfd_boolean +static bool som_slurp_armap (bfd *abfd) { struct som_external_lst_header ext_lst_header; @@ -6178,29 +6178,29 @@ som_slurp_armap (bfd *abfd) /* Special cases. */ if (i == 0) - return TRUE; + return true; if (i != 16) - return FALSE; + return false; if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0) - return FALSE; + return false; /* For archives without .o files there is no symbol table. */ if (! startswith (nextname, "/ ")) { - abfd->has_armap = FALSE; - return TRUE; + abfd->has_armap = false; + return true; } /* Read in and sanity check the archive header. */ amt = sizeof (struct ar_hdr); if (bfd_bread ((void *) &ar_header, amt, abfd) != amt) - return FALSE; + return false; if (strncmp (ar_header.ar_fmag, ARFMAG, 2)) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } /* How big is the archive symbol table entry? */ @@ -6209,7 +6209,7 @@ som_slurp_armap (bfd *abfd) if (errno != 0) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } /* Save off the file offset of the first real user data. */ @@ -6219,7 +6219,7 @@ som_slurp_armap (bfd *abfd) in just a minute. */ amt = sizeof (struct som_external_lst_header); if (bfd_bread ((void *) &ext_lst_header, amt, abfd) != amt) - return FALSE; + return false; som_swap_lst_header_in (&ext_lst_header, &lst_header); @@ -6227,42 +6227,42 @@ som_slurp_armap (bfd *abfd) if (lst_header.a_magic != LIBMAGIC) { bfd_set_error (bfd_error_malformed_archive); - return FALSE; + return false; } /* Count the number of symbols in the library symbol table. */ if (! som_bfd_count_ar_symbols (abfd, &lst_header, &ardata->symdef_count)) - return FALSE; + return false; /* Get back to the start of the library symbol table. */ if (bfd_seek (abfd, (ardata->first_file_filepos - parsed_size + sizeof (struct som_external_lst_header)), SEEK_SET) != 0) - return FALSE; + return false; /* Initialize the cache and allocate space for the library symbols. */ ardata->cache = 0; if (_bfd_mul_overflow (ardata->symdef_count, sizeof (carsym), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } ardata->symdefs = bfd_alloc (abfd, amt); if (!ardata->symdefs) - return FALSE; + return false; /* Now fill in the canonical archive symbols. */ if (! som_bfd_fill_in_ar_symbols (abfd, &lst_header, &ardata->symdefs)) - return FALSE; + return false; /* Seek back to the "first" file in the archive. Note the "first" file may be the extended name table. */ if (bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET) != 0) - return FALSE; + return false; /* Notify the generic archive code that we have a symbol map. */ - abfd->has_armap = TRUE; - return TRUE; + abfd->has_armap = true; + return true; } /* Begin preparing to write a SOM library symbol table. @@ -6270,7 +6270,7 @@ som_slurp_armap (bfd *abfd) As part of the prep work we need to determine the number of symbols and the size of the associated string section. */ -static bfd_boolean +static bool som_bfd_prep_for_ar_write (bfd *abfd, unsigned int *num_syms, unsigned int *stringsize) @@ -6299,7 +6299,7 @@ som_bfd_prep_for_ar_write (bfd *abfd, to it. It's a little slimey to grab the symbols via obj_som_symtab, but doing so avoids allocating lots of extra memory. */ if (! som_slurp_symbol_table (curr_bfd)) - return FALSE; + return false; sym = obj_som_symtab (curr_bfd); curr_count = bfd_get_symcount (curr_bfd); @@ -6338,7 +6338,7 @@ som_bfd_prep_for_ar_write (bfd *abfd, curr_bfd = curr_bfd->archive_next; } - return TRUE; + return true; } /* Hash a symbol name based on the hashing algorithm presented in the @@ -6360,7 +6360,7 @@ som_bfd_ar_symbol_hash (asymbol *symbol) /* Do the bulk of the work required to write the SOM library symbol table. */ -static bfd_boolean +static bool som_bfd_ar_write_symbol_stuff (bfd *abfd, unsigned int nsyms, unsigned int string_size, @@ -6382,7 +6382,7 @@ som_bfd_ar_write_symbol_stuff (bfd *abfd, if (_bfd_mul_overflow (hash_size, 4, &amt)) { bfd_set_error (bfd_error_no_memory); - return FALSE; + return false; } hash_table = bfd_zmalloc (amt); if (hash_table == NULL && hash_size != 0) @@ -6612,7 +6612,7 @@ som_bfd_ar_write_symbol_stuff (bfd *abfd, free (last_hash_entry); free (lst_syms); free (strings); - return TRUE; + return true; error_return: free (hash_table); @@ -6621,14 +6621,14 @@ som_bfd_ar_write_symbol_stuff (bfd *abfd, free (lst_syms); free (strings); - return FALSE; + return false; } /* Write out the LST for the archive. You'll never believe this is really how armaps are handled in SOM... */ -static bfd_boolean +static bool som_write_armap (bfd *abfd, unsigned int elength, struct orl *map ATTRIBUTE_UNUSED, @@ -6649,7 +6649,7 @@ som_write_armap (bfd *abfd, if (stat (bfd_get_filename (abfd), &statbuf) != 0) { bfd_set_error (bfd_error_system_call); - return FALSE; + return false; } /* Fudge factor. */ bfd_ardata (abfd)->armap_timestamp = statbuf.st_mtime + 60; @@ -6701,7 +6701,7 @@ som_write_armap (bfd *abfd, /* Count how many symbols we will have on the hash chains and the size of the associated string table. */ if (! som_bfd_prep_for_ar_write (abfd, &nsyms, &stringsize)) - return FALSE; + return false; lst_size += sizeof (struct som_external_lst_symbol_record) * nsyms; @@ -6746,25 +6746,25 @@ som_write_armap (bfd *abfd, /* Scribble out the ar header. */ amt = sizeof (struct ar_hdr); if (bfd_bwrite ((void *) &hdr, amt, abfd) != amt) - return FALSE; + return false; /* Now scribble out the lst header. */ amt = sizeof (struct som_external_lst_header); if (bfd_bwrite ((void *) &lst, amt, abfd) != amt) - return FALSE; + return false; /* Build and write the armap. */ if (!som_bfd_ar_write_symbol_stuff (abfd, nsyms, stringsize, lst, elength)) - return FALSE; + return false; /* Done. */ - return TRUE; + return true; } /* Free all information we have cached for this BFD. We can always read it again later if we need it. */ -static bfd_boolean +static bool som_bfd_free_cached_info (bfd *abfd) { if (bfd_get_format (abfd) == bfd_object) @@ -6792,7 +6792,7 @@ som_bfd_free_cached_info (bfd *abfd) /* Linker support functions. */ -static bfd_boolean +static bool som_bfd_link_split_section (bfd *abfd ATTRIBUTE_UNUSED, asection *sec) { return som_is_subspace (sec) && sec->size > 240000; diff --git a/bfd/som.h b/bfd/som.h index a0995745db..40ce004eac 100644 --- a/bfd/som.h +++ b/bfd/som.h @@ -231,13 +231,20 @@ struct som_section_data_struct #define R_HPPA_END_TRY R_END_TRY /* Exported functions, mostly for use by GAS. */ -bfd_boolean bfd_som_set_section_attributes (asection *, int, int, unsigned int, int); -bfd_boolean bfd_som_set_subsection_attributes (asection *, asection *, int, unsigned int, int, int, int, int); -void bfd_som_set_symbol_type (asymbol *, unsigned int); -bfd_boolean bfd_som_attach_aux_hdr (bfd *, int, char *); -int ** hppa_som_gen_reloc_type (bfd *, int, int, enum hppa_reloc_field_selector_type_alt, int, asymbol *); -bfd_boolean bfd_som_attach_compilation_unit (bfd *, const char *, const char *, const char *, const char *); -asection * bfd_section_from_som_symbol (bfd *abfd, struct som_external_symbol_dictionary_record *symbol); +bool bfd_som_set_section_attributes + (asection *, int, int, unsigned int, int); +bool bfd_som_set_subsection_attributes + (asection *, asection *, int, unsigned int, int, int, int, int); +void bfd_som_set_symbol_type + (asymbol *, unsigned int); +bool bfd_som_attach_aux_hdr + (bfd *, int, char *); +int **hppa_som_gen_reloc_type + (bfd *, int, int, enum hppa_reloc_field_selector_type_alt, int, asymbol *); +bool bfd_som_attach_compilation_unit + (bfd *, const char *, const char *, const char *, const char *); +asection *bfd_section_from_som_symbol + (bfd *abfd, struct som_external_symbol_dictionary_record *symbol); #ifdef __cplusplus } diff --git a/bfd/srec.c b/bfd/srec.c index 92faf3dc82..3ddb3c56e3 100644 --- a/bfd/srec.c +++ b/bfd/srec.c @@ -134,7 +134,7 @@ unsigned int _bfd_srec_len = DEFAULT_CHUNK; /* The type of srec output (free or forced to S3). This variable can be modified by objcopy's --srec-forceS3 parameter. */ -bfd_boolean _bfd_srec_forceS3 = FALSE; +bool _bfd_srec_forceS3 = false; /* When writing an S-record file, the S-records can not be output as they are seen. This structure is used to hold them in memory. */ @@ -178,18 +178,18 @@ tdata_type; static void srec_init (void) { - static bfd_boolean inited = FALSE; + static bool inited = false; if (! inited) { - inited = TRUE; + inited = true; hex_init (); } } /* Set up the S-record tdata information. */ -static bfd_boolean +static bool srec_mkobject (bfd *abfd) { tdata_type *tdata; @@ -198,7 +198,7 @@ srec_mkobject (bfd *abfd) tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type)); if (tdata == NULL) - return FALSE; + return false; abfd->tdata.srec_data = tdata; tdata->type = 1; @@ -208,21 +208,21 @@ srec_mkobject (bfd *abfd) tdata->symtail = NULL; tdata->csymbols = NULL; - return TRUE; + return true; } /* Read a byte from an S record file. Set *ERRORPTR if an error occurred. Return EOF on error or end of file. */ static int -srec_get_byte (bfd *abfd, bfd_boolean *errorptr) +srec_get_byte (bfd *abfd, bool *errorptr) { bfd_byte c; if (bfd_bread (&c, (bfd_size_type) 1, abfd) != 1) { if (bfd_get_error () != bfd_error_file_truncated) - *errorptr = TRUE; + *errorptr = true; return EOF; } @@ -237,7 +237,7 @@ static void srec_bad_byte (bfd *abfd, unsigned int lineno, int c, - bfd_boolean error) + bool error) { if (c == EOF) { @@ -265,14 +265,14 @@ srec_bad_byte (bfd *abfd, /* Add a new symbol found in an S-record file. */ -static bfd_boolean +static bool srec_new_symbol (bfd *abfd, const char *name, bfd_vma val) { struct srec_symbol *n; n = (struct srec_symbol *) bfd_alloc (abfd, sizeof (* n)); if (n == NULL) - return FALSE; + return false; n->name = name; n->val = val; @@ -286,18 +286,18 @@ srec_new_symbol (bfd *abfd, const char *name, bfd_vma val) ++abfd->symcount; - return TRUE; + return true; } /* Read the S record file and turn it into sections. We create a new section for each contiguous set of bytes. */ -static bfd_boolean +static bool srec_scan (bfd *abfd) { int c; unsigned int lineno = 1; - bfd_boolean error = FALSE; + bool error = false; bfd_byte *buf = NULL; size_t bufsize = 0; asection *sec = NULL; @@ -618,7 +618,7 @@ srec_scan (bfd *abfd) } free (buf); - return TRUE; + return true; } } break; @@ -629,12 +629,12 @@ srec_scan (bfd *abfd) goto error_return; free (buf); - return TRUE; + return true; error_return: free (symbuf); free (buf); - return FALSE; + return false; } /* Check whether an existing file is an S-record file. */ @@ -709,12 +709,12 @@ symbolsrec_object_p (bfd *abfd) /* Read in the contents of a section in an S-record file. */ -static bfd_boolean +static bool srec_read_section (bfd *abfd, asection *section, bfd_byte *contents) { int c; bfd_size_type sofar = 0; - bfd_boolean error = FALSE; + bool error = false; bfd_byte *buf = NULL; size_t bufsize = 0; @@ -761,7 +761,7 @@ srec_read_section (bfd *abfd, asection *section, bfd_byte *contents) default: BFD_ASSERT (sofar == section->size); free (buf); - return TRUE; + return true; case '3': address = HEX (data); @@ -785,7 +785,7 @@ srec_read_section (bfd *abfd, asection *section, bfd_byte *contents) /* We've come to the end of this section. */ BFD_ASSERT (sofar == section->size); free (buf); - return TRUE; + return true; } /* Don't consider checksum. */ @@ -808,16 +808,16 @@ srec_read_section (bfd *abfd, asection *section, bfd_byte *contents) BFD_ASSERT (sofar == section->size); free (buf); - return TRUE; + return true; error_return: free (buf); - return FALSE; + return false; } /* Get the contents of a section in an S-record file. */ -static bfd_boolean +static bool srec_get_section_contents (bfd *abfd, asection *section, void * location, @@ -825,47 +825,47 @@ srec_get_section_contents (bfd *abfd, bfd_size_type count) { if (count == 0) - return TRUE; + return true; if (offset + count < count || offset + count > section->size) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } if (section->used_by_bfd == NULL) { section->used_by_bfd = bfd_alloc (abfd, section->size); if (section->used_by_bfd == NULL) - return FALSE; + return false; if (! srec_read_section (abfd, section, (bfd_byte *) section->used_by_bfd)) - return FALSE; + return false; } memcpy (location, (bfd_byte *) section->used_by_bfd + offset, (size_t) count); - return TRUE; + return true; } /* Set the architecture. We accept an unknown architecture here. */ -static bfd_boolean +static bool srec_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach) { if (arch != bfd_arch_unknown) return bfd_default_set_arch_mach (abfd, arch, mach); abfd->arch_info = & bfd_default_arch_struct; - return TRUE; + return true; } /* We have to save up all the Srecords for a splurge before output. */ -static bfd_boolean +static bool srec_set_section_contents (bfd *abfd, sec_ptr section, const void * location, @@ -878,7 +878,7 @@ srec_set_section_contents (bfd *abfd, entry = (srec_data_list_type *) bfd_alloc (abfd, sizeof (* entry)); if (entry == NULL) - return FALSE; + return false; if (bytes_to_do && (section->flags & SEC_ALLOC) @@ -888,7 +888,7 @@ srec_set_section_contents (bfd *abfd, data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do); if (data == NULL) - return FALSE; + return false; memcpy ((void *) data, location, (size_t) bytes_to_do); /* If _bfd_srec_forceS3 is TRUE then always select S3 records, @@ -930,14 +930,14 @@ srec_set_section_contents (bfd *abfd, tdata->tail = entry; } } - return TRUE; + return true; } /* Write a record of type, of the supplied number of bytes. The supplied bytes and length don't have a checksum. That's worked out here. */ -static bfd_boolean +static bool srec_write_record (bfd *abfd, unsigned int type, bfd_vma address, @@ -999,7 +999,7 @@ srec_write_record (bfd *abfd, return bfd_bwrite ((void *) buffer, wrlen, abfd) == wrlen; } -static bfd_boolean +static bool srec_write_header (bfd *abfd) { unsigned int len = strlen (bfd_get_filename (abfd)); @@ -1013,7 +1013,7 @@ srec_write_header (bfd *abfd) (bfd_byte *) bfd_get_filename (abfd) + len); } -static bfd_boolean +static bool srec_write_section (bfd *abfd, tdata_type *tdata, srec_data_list_type *list) @@ -1048,23 +1048,23 @@ srec_write_section (bfd *abfd, address, location, location + octets_this_chunk)) - return FALSE; + return false; octets_written += octets_this_chunk; location += octets_this_chunk; } - return TRUE; + return true; } -static bfd_boolean +static bool srec_write_terminator (bfd *abfd, tdata_type *tdata) { return srec_write_record (abfd, 10 - tdata->type, abfd->start_address, NULL, NULL); } -static bfd_boolean +static bool srec_write_symbols (bfd *abfd) { /* Dump out the symbols of a bfd. */ @@ -1080,7 +1080,7 @@ srec_write_symbols (bfd *abfd) if (bfd_bwrite ("$$ ", (bfd_size_type) 3, abfd) != 3 || bfd_bwrite (bfd_get_filename (abfd), len, abfd) != len || bfd_bwrite ("\r\n", (bfd_size_type) 2, abfd) != 2) - return FALSE; + return false; for (i = 0; i < count; i++) { @@ -1097,7 +1097,7 @@ srec_write_symbols (bfd *abfd) len = strlen (s->name); if (bfd_bwrite (" ", (bfd_size_type) 2, abfd) != 2 || bfd_bwrite (s->name, len, abfd) != len) - return FALSE; + return false; sprintf_vma (buf + 2, (s->value + s->section->output_section->lma @@ -1112,17 +1112,17 @@ srec_write_symbols (bfd *abfd) *--p = ' '; len += 4; if (bfd_bwrite (p, len, abfd) != len) - return FALSE; + return false; } } if (bfd_bwrite ("$$ \r\n", (bfd_size_type) 5, abfd) != 5) - return FALSE; + return false; } - return TRUE; + return true; } -static bfd_boolean +static bool internal_srec_write_object_contents (bfd *abfd, int symbols) { tdata_type *tdata = abfd->tdata.srec_data; @@ -1131,11 +1131,11 @@ internal_srec_write_object_contents (bfd *abfd, int symbols) if (symbols) { if (! srec_write_symbols (abfd)) - return FALSE; + return false; } if (! srec_write_header (abfd)) - return FALSE; + return false; /* Now wander though all the sections provided and output them. */ list = tdata->head; @@ -1143,19 +1143,19 @@ internal_srec_write_object_contents (bfd *abfd, int symbols) while (list != (srec_data_list_type *) NULL) { if (! srec_write_section (abfd, tdata, list)) - return FALSE; + return false; list = list->next; } return srec_write_terminator (abfd, tdata); } -static bfd_boolean +static bool srec_write_object_contents (bfd *abfd) { return internal_srec_write_object_contents (abfd, 0); } -static bfd_boolean +static bool symbolsrec_write_object_contents (bfd *abfd) { return internal_srec_write_object_contents (abfd, 1); diff --git a/bfd/stabs.c b/bfd/stabs.c index edd40ad9d3..c5e64a47e1 100644 --- a/bfd/stabs.c +++ b/bfd/stabs.c @@ -144,7 +144,7 @@ stab_link_includes_newfunc (struct bfd_hash_entry *entry, /* This function is called for each input file from the add_symbols pass of the linker. */ -bfd_boolean +bool _bfd_link_section_stabs (bfd *abfd, struct stab_info *sinfo, asection *stabsec, @@ -152,7 +152,7 @@ _bfd_link_section_stabs (bfd *abfd, void * *psecinfo, bfd_size_type *pstring_offset) { - bfd_boolean first; + bool first; bfd_size_type count, amt; struct stab_section_info *secinfo; bfd_byte *stabbuf = NULL; @@ -164,37 +164,37 @@ _bfd_link_section_stabs (bfd *abfd, if (stabsec->size == 0 || stabstrsec->size == 0) /* This file does not contain stabs debugging information. */ - return TRUE; + return true; if (stabsec->size % STABSIZE != 0) /* Something is wrong with the format of these stab symbols. Don't try to optimize them. */ - return TRUE; + return true; if ((stabstrsec->flags & SEC_RELOC) != 0) /* We shouldn't see relocations in the strings, and we aren't prepared to handle them. */ - return TRUE; + return true; if (bfd_is_abs_section (stabsec->output_section) || bfd_is_abs_section (stabstrsec->output_section)) /* At least one of the sections is being discarded from the link, so we should just ignore them. */ - return TRUE; + return true; - first = FALSE; + first = false; if (sinfo->stabstr == NULL) { flagword flags; /* Initialize the stabs information we need to keep track of. */ - first = TRUE; + first = true; sinfo->strings = _bfd_stringtab_init (); if (sinfo->strings == NULL) goto error_return; /* Make sure the first byte is zero. */ - (void) _bfd_stringtab_add (sinfo->strings, "", TRUE, TRUE); + (void) _bfd_stringtab_add (sinfo->strings, "", true, true); if (! bfd_hash_table_init (&sinfo->includes, stab_link_includes_newfunc, sizeof (struct stab_link_includes_entry))) @@ -267,7 +267,7 @@ _bfd_link_section_stabs (bfd *abfd, ++skip; continue; } - first = FALSE; + first = false; } /* Store the string in the hash table, and record the index. */ @@ -282,7 +282,7 @@ _bfd_link_section_stabs (bfd *abfd, goto error_return; } string = (char *) stabstrbuf + symstroff; - *pstridx = _bfd_stringtab_add (sinfo->strings, string, TRUE, TRUE); + *pstridx = _bfd_stringtab_add (sinfo->strings, string, true, true); /* An N_BINCL symbol indicates the start of the stabs entries for a header file. We need to scan ahead to the next N_EINCL @@ -362,7 +362,7 @@ _bfd_link_section_stabs (bfd *abfd, /* If we have already included a header file with the same value, then replaced this one with an N_EXCL symbol. */ incl_entry = (struct stab_link_includes_entry * ) - bfd_hash_lookup (&sinfo->includes, string, TRUE, TRUE); + bfd_hash_lookup (&sinfo->includes, string, true, true); if (incl_entry == NULL) goto error_return; @@ -491,12 +491,12 @@ _bfd_link_section_stabs (bfd *abfd, BFD_ASSERT (offset != 0); } - return TRUE; + return true; error_return: free (stabbuf); free (stabstrbuf); - return FALSE; + return false; } /* This function is called for each input file before the stab @@ -505,11 +505,11 @@ _bfd_link_section_stabs (bfd *abfd, any entries have been deleted. */ -bfd_boolean +bool _bfd_discard_section_stabs (bfd *abfd, asection *stabsec, void * psecinfo, - bfd_boolean (*reloc_symbol_deleted_p) (bfd_vma, void *), + bool (*reloc_symbol_deleted_p) (bfd_vma, void *), void * cookie) { bfd_size_type count, amt; @@ -522,24 +522,24 @@ _bfd_discard_section_stabs (bfd *abfd, if (stabsec->size == 0) /* This file does not contain stabs debugging information. */ - return FALSE; + return false; if (stabsec->size % STABSIZE != 0) /* Something is wrong with the format of these stab symbols. Don't try to optimize them. */ - return FALSE; + return false; if ((stabsec->output_section != NULL && bfd_is_abs_section (stabsec->output_section))) /* At least one of the sections is being discarded from the link, so we should just ignore them. */ - return FALSE; + return false; /* We should have initialized our data in _bfd_link_section_stabs. If there was some bizarre error reading the string sections, though, we might not have. Bail rather than asserting. */ if (psecinfo == NULL) - return FALSE; + return false; count = stabsec->rawsize / STABSIZE; secinfo = (struct stab_section_info *) psecinfo; @@ -647,13 +647,13 @@ _bfd_discard_section_stabs (bfd *abfd, error_return: free (stabbuf); - return FALSE; + return false; } /* Write out the stab section. This is called with the relocated contents. */ -bfd_boolean +bool _bfd_write_section_stabs (bfd *output_bfd, struct stab_info *sinfo, asection *stabsec, @@ -724,12 +724,12 @@ _bfd_write_section_stabs (bfd *output_bfd, /* Write out the .stabstr section. */ -bfd_boolean +bool _bfd_write_stab_strings (bfd *output_bfd, struct stab_info *sinfo) { if (bfd_is_abs_section (sinfo->stabstr->output_section)) /* The section was discarded from the link. */ - return TRUE; + return true; BFD_ASSERT ((sinfo->stabstr->output_offset + _bfd_stringtab_size (sinfo->strings)) @@ -739,16 +739,16 @@ _bfd_write_stab_strings (bfd *output_bfd, struct stab_info *sinfo) (file_ptr) (sinfo->stabstr->output_section->filepos + sinfo->stabstr->output_offset), SEEK_SET) != 0) - return FALSE; + return false; if (! _bfd_stringtab_emit (output_bfd, sinfo->strings)) - return FALSE; + return false; /* We no longer need the stabs information. */ _bfd_stringtab_free (sinfo->strings); bfd_hash_table_free (&sinfo->includes); - return TRUE; + return true; } /* Adjust an address in the .stab section. Given OFFSET within diff --git a/bfd/syms.c b/bfd/syms.c index 10ea8bd7b8..e0ab16795d 100644 --- a/bfd/syms.c +++ b/bfd/syms.c @@ -364,23 +364,23 @@ FUNCTION bfd_is_local_label SYNOPSIS - bfd_boolean bfd_is_local_label (bfd *abfd, asymbol *sym); + bool bfd_is_local_label (bfd *abfd, asymbol *sym); DESCRIPTION Return TRUE if the given symbol @var{sym} in the BFD @var{abfd} is a compiler generated local label, else return FALSE. */ -bfd_boolean +bool bfd_is_local_label (bfd *abfd, asymbol *sym) { /* The BSF_SECTION_SYM check is needed for IA-64, where every label that starts with '.' is local. This would accidentally catch section names if we didn't reject them here. */ if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_FILE | BSF_SECTION_SYM)) != 0) - return FALSE; + return false; if (sym->name == NULL) - return FALSE; + return false; return bfd_is_local_label_name (abfd, sym->name); } @@ -389,7 +389,7 @@ FUNCTION bfd_is_local_label_name SYNOPSIS - bfd_boolean bfd_is_local_label_name (bfd *abfd, const char *name); + bool bfd_is_local_label_name (bfd *abfd, const char *name); DESCRIPTION Return TRUE if a symbol with the name @var{name} in the BFD @@ -407,7 +407,7 @@ FUNCTION bfd_is_target_special_symbol SYNOPSIS - bfd_boolean bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); + bool bfd_is_target_special_symbol (bfd *abfd, asymbol *sym); DESCRIPTION Return TRUE iff a symbol @var{sym} in the BFD @var{abfd} is something @@ -440,7 +440,7 @@ FUNCTION bfd_set_symtab SYNOPSIS - bfd_boolean bfd_set_symtab + bool bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int count); DESCRIPTION @@ -449,18 +449,18 @@ DESCRIPTION will be written. */ -bfd_boolean +bool bfd_set_symtab (bfd *abfd, asymbol **location, unsigned int symcount) { if (abfd->format != bfd_object || bfd_read_p (abfd)) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } abfd->outsymbols = location; abfd->symcount = symcount; - return TRUE; + return true; } /* @@ -727,10 +727,10 @@ DESCRIPTION Returns zero otherwise. SYNOPSIS - bfd_boolean bfd_is_undefined_symclass (int symclass); + bool bfd_is_undefined_symclass (int symclass); */ -bfd_boolean +bool bfd_is_undefined_symclass (int symclass) { return symclass == 'U' || symclass == 'w' || symclass == 'v'; @@ -767,7 +767,7 @@ FUNCTION bfd_copy_private_symbol_data SYNOPSIS - bfd_boolean bfd_copy_private_symbol_data + bool bfd_copy_private_symbol_data (bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym); DESCRIPTION @@ -791,7 +791,7 @@ DESCRIPTION long _bfd_generic_read_minisymbols (bfd *abfd, - bfd_boolean dynamic, + bool dynamic, void **minisymsp, unsigned int *sizep) { @@ -843,7 +843,7 @@ _bfd_generic_read_minisymbols (bfd *abfd, asymbol * _bfd_generic_minisymbol_to_symbol (bfd *abfd ATTRIBUTE_UNUSED, - bfd_boolean dynamic ATTRIBUTE_UNUSED, + bool dynamic ATTRIBUTE_UNUSED, const void *minisym, asymbol *sym ATTRIBUTE_UNUSED) { @@ -923,12 +923,12 @@ struct stab_find_info char *filename; }; -bfd_boolean +bool _bfd_stab_section_find_nearest_line (bfd *abfd, asymbol **symbols, asection *section, bfd_vma offset, - bfd_boolean *pfound, + bool *pfound, const char **pfilename, const char **pfnname, unsigned int *pline, @@ -942,9 +942,9 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, struct indexentry *indexentry; char *file_name; char *directory_name; - bfd_boolean saw_line, saw_func; + bool saw_line, saw_func; - *pfound = FALSE; + *pfound = false; *pfilename = bfd_get_filename (abfd); *pfnname = NULL; *pline = 0; @@ -975,7 +975,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, if (info->stabsec == NULL || info->strsec == NULL) { /* No stabs debugging information. */ - return TRUE; + return true; } stabsize = (info->stabsec->rawsize @@ -995,7 +995,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, info = (struct stab_find_info *) bfd_zalloc (abfd, amt); if (info == NULL) - return FALSE; + return false; /* FIXME: When using the linker --split-by-file or --split-by-reloc options, it is possible for the .stab and @@ -1015,7 +1015,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, /* No stabs debugging information. Set *pinfo so that we can return quickly in the info != NULL case above. */ *pinfo = info; - return TRUE; + return true; } } @@ -1030,13 +1030,13 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, info->stabs = (bfd_byte *) bfd_alloc (abfd, stabsize); info->strs = (bfd_byte *) bfd_alloc (abfd, strsize); if (info->stabs == NULL || info->strs == NULL) - return FALSE; + return false; if (! bfd_get_section_contents (abfd, info->stabsec, info->stabs, 0, stabsize) || ! bfd_get_section_contents (abfd, info->strsec, info->strs, 0, strsize)) - return FALSE; + return false; /* Stab strings ought to be nul terminated. Ensure the last one is, to prevent running off the end of the buffer. */ @@ -1048,16 +1048,16 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, this should be no big deal. */ reloc_size = bfd_get_reloc_upper_bound (abfd, info->stabsec); if (reloc_size < 0) - return FALSE; + return false; reloc_vector = (arelent **) bfd_malloc (reloc_size); if (reloc_vector == NULL && reloc_size != 0) - return FALSE; + return false; reloc_count = bfd_canonicalize_reloc (abfd, info->stabsec, reloc_vector, symbols); if (reloc_count < 0) { free (reloc_vector); - return FALSE; + return false; } if (reloc_count > 0) { @@ -1088,7 +1088,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, (_("unsupported .stab relocation")); bfd_set_error (bfd_error_invalid_operation); free (reloc_vector); - return FALSE; + return false; } val = bfd_get_32 (abfd, info->stabs + octets); @@ -1142,14 +1142,14 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, ++info->indextablesize; if (info->indextablesize == 0) - return TRUE; + return true; ++info->indextablesize; amt = info->indextablesize; amt *= sizeof (struct indexentry); info->indextable = (struct indexentry *) bfd_alloc (abfd, amt); if (info->indextable == NULL) - return FALSE; + return false; file_name = NULL; directory_name = NULL; @@ -1322,7 +1322,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, } if (indexentry == NULL) - return TRUE; + return true; stab = indexentry->stab + STABSIZE; file_name = indexentry->file_name; @@ -1331,14 +1331,14 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, directory_name = indexentry->directory_name; str = indexentry->str; - saw_line = FALSE; - saw_func = FALSE; + saw_line = false; + saw_func = false; for (; stab < (indexentry+1)->stab; stab += STABSIZE) { - bfd_boolean done; + bool done; bfd_vma val; - done = FALSE; + done = false; switch (stab[TYPEOFF]) { @@ -1379,15 +1379,15 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, #endif } if (val > offset) - done = TRUE; - saw_line = TRUE; + done = true; + saw_line = true; break; case N_FUN: case N_SO: if (saw_func || saw_line) - done = TRUE; - saw_func = TRUE; + done = true; + saw_func = true; break; } @@ -1395,7 +1395,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, break; } - *pfound = TRUE; + *pfound = true; if (file_name == NULL || IS_ABSOLUTE_PATH (file_name) || directory_name == NULL) @@ -1417,7 +1417,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, len = strlen (file_name) + 1; info->filename = (char *) bfd_alloc (abfd, dirlen + len); if (info->filename == NULL) - return FALSE; + return false; memcpy (info->filename, directory_name, dirlen); memcpy (info->filename + dirlen, file_name, len); } @@ -1439,7 +1439,7 @@ _bfd_stab_section_find_nearest_line (bfd *abfd, *pfnname = indexentry->function_name; } - return TRUE; + return true; } long @@ -1467,17 +1467,17 @@ _bfd_nosymbols_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, const char * _bfd_nosymbols_get_symbol_version_string (bfd *abfd, asymbol *symbol ATTRIBUTE_UNUSED, - bfd_boolean base_p ATTRIBUTE_UNUSED, - bfd_boolean *hidden ATTRIBUTE_UNUSED) + bool base_p ATTRIBUTE_UNUSED, + bool *hidden ATTRIBUTE_UNUSED) { return (const char *) _bfd_ptr_bfd_null_error (abfd); } -bfd_boolean +bool _bfd_nosymbols_bfd_is_local_label_name (bfd *abfd ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED) { - return FALSE; + return false; } alent * @@ -1486,7 +1486,7 @@ _bfd_nosymbols_get_lineno (bfd *abfd, asymbol *sym ATTRIBUTE_UNUSED) return (alent *) _bfd_ptr_bfd_null_error (abfd); } -bfd_boolean +bool _bfd_nosymbols_find_nearest_line (bfd *abfd, asymbol **symbols ATTRIBUTE_UNUSED, @@ -1500,7 +1500,7 @@ _bfd_nosymbols_find_nearest_line return _bfd_bool_bfd_false_error (abfd); } -bfd_boolean +bool _bfd_nosymbols_find_line (bfd *abfd, asymbol **symbols ATTRIBUTE_UNUSED, asymbol *symbol ATTRIBUTE_UNUSED, @@ -1510,7 +1510,7 @@ _bfd_nosymbols_find_line (bfd *abfd, return _bfd_bool_bfd_false_error (abfd); } -bfd_boolean +bool _bfd_nosymbols_find_inliner_info (bfd *abfd, const char **filename_ptr ATTRIBUTE_UNUSED, @@ -1530,7 +1530,7 @@ _bfd_nosymbols_bfd_make_debug_symbol (bfd *abfd, long _bfd_nosymbols_read_minisymbols (bfd *abfd, - bfd_boolean dynamic ATTRIBUTE_UNUSED, + bool dynamic ATTRIBUTE_UNUSED, void **minisymsp ATTRIBUTE_UNUSED, unsigned int *sizep ATTRIBUTE_UNUSED) { @@ -1539,7 +1539,7 @@ _bfd_nosymbols_read_minisymbols (bfd *abfd, asymbol * _bfd_nosymbols_minisymbol_to_symbol (bfd *abfd, - bfd_boolean dynamic ATTRIBUTE_UNUSED, + bool dynamic ATTRIBUTE_UNUSED, const void *minisym ATTRIBUTE_UNUSED, asymbol *sym ATTRIBUTE_UNUSED) { diff --git a/bfd/sysdep.h b/bfd/sysdep.h index 338d731112..c0b96ef006 100644 --- a/bfd/sysdep.h +++ b/bfd/sysdep.h @@ -231,4 +231,6 @@ size_t strnlen (const char *, size_t); #define getgid() 0 #endif +#define POISON_BFD_BOOLEAN 1 + #endif /* ! defined (BFD_SYSDEP_H) */ diff --git a/bfd/targets.c b/bfd/targets.c index 372a9c3896..89b49e721b 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -135,7 +135,7 @@ DESCRIPTION . .{* Defined to TRUE if unused section symbol should be kept. *} .#ifndef TARGET_KEEP_UNUSED_SECTION_SYMBOLS -.#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS TRUE +.#define TARGET_KEEP_UNUSED_SECTION_SYMBOLS true .#endif . This is the structure which defines the type of BFD this is. The @@ -221,7 +221,7 @@ DESCRIPTION . unsigned char match_priority; . . {* TRUE if unused section symbols should be kept. *} -. bfd_boolean keep_unused_section_symbols; +. bool keep_unused_section_symbols; . . {* Entries for byte swapping for data. These are different from the . other entry points, since they don't take a BFD as the first argument. @@ -255,10 +255,10 @@ DESCRIPTION . bfd_cleanup (*_bfd_check_format[bfd_type_end]) (bfd *); . . {* Set the format of a file being written. *} -. bfd_boolean (*_bfd_set_format[bfd_type_end]) (bfd *); +. bool (*_bfd_set_format[bfd_type_end]) (bfd *); . . {* Write cached information into a file being written, at <>. *} -. bfd_boolean (*_bfd_write_contents[bfd_type_end]) (bfd *); +. bool (*_bfd_write_contents[bfd_type_end]) (bfd *); . The general target vector. These vectors are initialized using the BFD_JUMP_TABLE macros. @@ -272,17 +272,16 @@ BFD_JUMP_TABLE macros. . NAME##_get_section_contents_in_window . . {* Called when the BFD is being closed to do any necessary cleanup. *} -. bfd_boolean (*_close_and_cleanup) (bfd *); +. bool (*_close_and_cleanup) (bfd *); . {* Ask the BFD to free all cached information. *} -. bfd_boolean (*_bfd_free_cached_info) (bfd *); +. bool (*_bfd_free_cached_info) (bfd *); . {* Called when a new section is created. *} -. bfd_boolean (*_new_section_hook) (bfd *, sec_ptr); +. bool (*_new_section_hook) (bfd *, sec_ptr); . {* Read the contents of a section. *} -. bfd_boolean (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, -. bfd_size_type); -. bfd_boolean (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, -. bfd_window *, file_ptr, -. bfd_size_type); +. bool (*_bfd_get_section_contents) (bfd *, sec_ptr, void *, file_ptr, +. bfd_size_type); +. bool (*_bfd_get_section_contents_in_window) (bfd *, sec_ptr, bfd_window *, +. file_ptr, bfd_size_type); . . {* Entry points to copy private data. *} .#define BFD_JUMP_TABLE_COPY(NAME) \ @@ -297,34 +296,32 @@ BFD_JUMP_TABLE macros. . . {* Called to copy BFD general private data from one object file . to another. *} -. bfd_boolean (*_bfd_copy_private_bfd_data) (bfd *, bfd *); +. bool (*_bfd_copy_private_bfd_data) (bfd *, bfd *); . {* Called to merge BFD general private data from one object file . to a common output file when linking. *} -. bfd_boolean (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); +. bool (*_bfd_merge_private_bfd_data) (bfd *, struct bfd_link_info *); . {* Called to initialize BFD private section data from one object file . to another. *} .#define bfd_init_private_section_data(ibfd, isec, obfd, osec, link_info) \ . BFD_SEND (obfd, _bfd_init_private_section_data, \ . (ibfd, isec, obfd, osec, link_info)) -. bfd_boolean (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, -. sec_ptr, -. struct bfd_link_info *); +. bool (*_bfd_init_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr, +. struct bfd_link_info *); . {* Called to copy BFD private section data from one object file . to another. *} -. bfd_boolean (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, -. sec_ptr); +. bool (*_bfd_copy_private_section_data) (bfd *, sec_ptr, bfd *, sec_ptr); . {* Called to copy BFD private symbol data from one symbol . to another. *} -. bfd_boolean (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, bfd *, -. asymbol *); +. bool (*_bfd_copy_private_symbol_data) (bfd *, asymbol *, +. bfd *, asymbol *); . {* Called to copy BFD private header data from one object file . to another. *} -. bfd_boolean (*_bfd_copy_private_header_data) (bfd *, bfd *); +. bool (*_bfd_copy_private_header_data) (bfd *, bfd *); . {* Called to set private backend flags. *} -. bfd_boolean (*_bfd_set_private_flags) (bfd *, flagword); +. bool (*_bfd_set_private_flags) (bfd *, flagword); . . {* Called to print private BFD data. *} -. bfd_boolean (*_bfd_print_private_bfd_data) (bfd *, void *); +. bool (*_bfd_print_private_bfd_data) (bfd *, void *); . . {* Core file entry points. *} .#define BFD_JUMP_TABLE_CORE(NAME) \ @@ -333,10 +330,10 @@ BFD_JUMP_TABLE macros. . NAME##_core_file_matches_executable_p, \ . NAME##_core_file_pid . -. char * (*_core_file_failing_command) (bfd *); -. int (*_core_file_failing_signal) (bfd *); -. bfd_boolean (*_core_file_matches_executable_p) (bfd *, bfd *); -. int (*_core_file_pid) (bfd *); +. char *(*_core_file_failing_command) (bfd *); +. int (*_core_file_failing_signal) (bfd *); +. bool (*_core_file_matches_executable_p) (bfd *, bfd *); +. int (*_core_file_pid) (bfd *); . . {* Archive entry points. *} .#define BFD_JUMP_TABLE_ARCHIVE(NAME) \ @@ -352,22 +349,21 @@ BFD_JUMP_TABLE macros. . NAME##_generic_stat_arch_elt, \ . NAME##_update_armap_timestamp . -. bfd_boolean (*_bfd_slurp_armap) (bfd *); -. bfd_boolean (*_bfd_slurp_extended_name_table) (bfd *); -. bfd_boolean (*_bfd_construct_extended_name_table) (bfd *, char **, -. bfd_size_type *, -. const char **); -. void (*_bfd_truncate_arname) (bfd *, const char *, char *); -. bfd_boolean (*write_armap) (bfd *, unsigned int, struct orl *, -. unsigned int, int); -. void * (*_bfd_read_ar_hdr_fn) (bfd *); -. bfd_boolean (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); -. bfd * (*openr_next_archived_file) (bfd *, bfd *); +. bool (*_bfd_slurp_armap) (bfd *); +. bool (*_bfd_slurp_extended_name_table) (bfd *); +. bool (*_bfd_construct_extended_name_table) (bfd *, char **, +. bfd_size_type *, +. const char **); +. void (*_bfd_truncate_arname) (bfd *, const char *, char *); +. bool (*write_armap) (bfd *, unsigned, struct orl *, unsigned, int); +. void *(*_bfd_read_ar_hdr_fn) (bfd *); +. bool (*_bfd_write_ar_hdr_fn) (bfd *, bfd *); +. bfd *(*openr_next_archived_file) (bfd *, bfd *); .#define bfd_get_elt_at_index(b,i) \ . BFD_SEND (b, _bfd_get_elt_at_index, (b,i)) -. bfd * (*_bfd_get_elt_at_index) (bfd *, symindex); -. int (*_bfd_stat_arch_elt) (bfd *, struct stat *); -. bfd_boolean (*_bfd_update_armap_timestamp) (bfd *); +. bfd *(*_bfd_get_elt_at_index) (bfd *, symindex); +. int (*_bfd_stat_arch_elt) (bfd *, struct stat *); +. bool (*_bfd_update_armap_timestamp) (bfd *); . . {* Entry points used for symbols. *} .#define BFD_JUMP_TABLE_SYMBOLS(NAME) \ @@ -387,47 +383,47 @@ BFD_JUMP_TABLE macros. . NAME##_read_minisymbols, \ . NAME##_minisymbol_to_symbol . -. long (*_bfd_get_symtab_upper_bound) (bfd *); -. long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); +. long (*_bfd_get_symtab_upper_bound) (bfd *); +. long (*_bfd_canonicalize_symtab) (bfd *, struct bfd_symbol **); . struct bfd_symbol * -. (*_bfd_make_empty_symbol) (bfd *); -. void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, -. bfd_print_symbol_type); +. (*_bfd_make_empty_symbol) (bfd *); +. void (*_bfd_print_symbol) (bfd *, void *, struct bfd_symbol *, +. bfd_print_symbol_type); .#define bfd_print_symbol(b,p,s,e) \ . BFD_SEND (b, _bfd_print_symbol, (b,p,s,e)) -. void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, -. symbol_info *); +. void (*_bfd_get_symbol_info) (bfd *, struct bfd_symbol *, symbol_info *); .#define bfd_get_symbol_info(b,p,e) \ . BFD_SEND (b, _bfd_get_symbol_info, (b,p,e)) -. const char *(*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, -. bfd_boolean, -. bfd_boolean *); +. const char * +. (*_bfd_get_symbol_version_string) (bfd *, struct bfd_symbol *, +. bool, bool *); .#define bfd_get_symbol_version_string(b,s,p,h) \ . BFD_SEND (b, _bfd_get_symbol_version_string, (b,s,p,h)) -. bfd_boolean (*_bfd_is_local_label_name) (bfd *, const char *); -. bfd_boolean (*_bfd_is_target_special_symbol) (bfd *, asymbol *); -. alent * (*_get_lineno) (bfd *, struct bfd_symbol *); -. bfd_boolean (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, -. struct bfd_section *, bfd_vma, -. const char **, const char **, -. unsigned int *, unsigned int *); -. bfd_boolean (*_bfd_find_line) (bfd *, struct bfd_symbol **, -. struct bfd_symbol *, const char **, -. unsigned int *); -. bfd_boolean (*_bfd_find_inliner_info) +. bool (*_bfd_is_local_label_name) (bfd *, const char *); +. bool (*_bfd_is_target_special_symbol) (bfd *, asymbol *); +. alent * +. (*_get_lineno) (bfd *, struct bfd_symbol *); +. bool (*_bfd_find_nearest_line) (bfd *, struct bfd_symbol **, +. struct bfd_section *, bfd_vma, +. const char **, const char **, +. unsigned int *, unsigned int *); +. bool (*_bfd_find_line) (bfd *, struct bfd_symbol **, +. struct bfd_symbol *, const char **, +. unsigned int *); +. bool (*_bfd_find_inliner_info) . (bfd *, const char **, const char **, unsigned int *); . {* Back-door to allow format-aware applications to create debug symbols . while using BFD for everything else. Currently used by the assembler . when creating COFF files. *} -. asymbol * (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); +. asymbol * +. (*_bfd_make_debug_symbol) (bfd *, void *, unsigned long size); .#define bfd_read_minisymbols(b, d, m, s) \ . BFD_SEND (b, _read_minisymbols, (b, d, m, s)) -. long (*_read_minisymbols) (bfd *, bfd_boolean, void **, -. unsigned int *); +. long (*_read_minisymbols) (bfd *, bool, void **, unsigned int *); .#define bfd_minisymbol_to_symbol(b, d, m, f) \ . BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f)) -. asymbol * (*_minisymbol_to_symbol) (bfd *, bfd_boolean, const void *, -. asymbol *); +. asymbol * +. (*_minisymbol_to_symbol) (bfd *, bool, const void *, asymbol *); . . {* Routines for relocs. *} .#define BFD_JUMP_TABLE_RELOCS(NAME) \ @@ -437,25 +433,25 @@ BFD_JUMP_TABLE macros. . NAME##_bfd_reloc_type_lookup, \ . NAME##_bfd_reloc_name_lookup . -. long (*_get_reloc_upper_bound) (bfd *, sec_ptr); -. long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, -. struct bfd_symbol **); -. void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); +. long (*_get_reloc_upper_bound) (bfd *, sec_ptr); +. long (*_bfd_canonicalize_reloc) (bfd *, sec_ptr, arelent **, +. struct bfd_symbol **); +. void (*_bfd_set_reloc) (bfd *, sec_ptr, arelent **, unsigned int); . {* See documentation on reloc types. *} . reloc_howto_type * -. (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); +. (*reloc_type_lookup) (bfd *, bfd_reloc_code_real_type); . reloc_howto_type * -. (*reloc_name_lookup) (bfd *, const char *); +. (*reloc_name_lookup) (bfd *, const char *); . . {* Routines used when writing an object file. *} .#define BFD_JUMP_TABLE_WRITE(NAME) \ . NAME##_set_arch_mach, \ . NAME##_set_section_contents . -. bfd_boolean (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, +. bool (*_bfd_set_arch_mach) (bfd *, enum bfd_architecture, . unsigned long); -. bfd_boolean (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, -. file_ptr, bfd_size_type); +. bool (*_bfd_set_section_contents) (bfd *, sec_ptr, const void *, +. file_ptr, bfd_size_type); . . {* Routines used by the linker. *} .#define BFD_JUMP_TABLE_LINK(NAME) \ @@ -480,72 +476,73 @@ BFD_JUMP_TABLE macros. . NAME##_bfd_link_hide_symbol, \ . NAME##_bfd_define_start_stop . -. int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); -. bfd_byte * (*_bfd_get_relocated_section_contents) (bfd *, -. struct bfd_link_info *, -. struct bfd_link_order *, -. bfd_byte *, bfd_boolean, -. struct bfd_symbol **); +. int (*_bfd_sizeof_headers) (bfd *, struct bfd_link_info *); +. bfd_byte * +. (*_bfd_get_relocated_section_contents) (bfd *, +. struct bfd_link_info *, +. struct bfd_link_order *, +. bfd_byte *, bool, +. struct bfd_symbol **); . -. bfd_boolean (*_bfd_relax_section) (bfd *, struct bfd_section *, -. struct bfd_link_info *, bfd_boolean *); +. bool (*_bfd_relax_section) (bfd *, struct bfd_section *, +. struct bfd_link_info *, bool *); . . {* Create a hash table for the linker. Different backends store . different information in this table. *} . struct bfd_link_hash_table * -. (*_bfd_link_hash_table_create) (bfd *); +. (*_bfd_link_hash_table_create) (bfd *); . . {* Add symbols from this object file into the hash table. *} -. bfd_boolean (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); +. bool (*_bfd_link_add_symbols) (bfd *, struct bfd_link_info *); . . {* Indicate that we are only retrieving symbol values from this section. *} -. void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); +. void (*_bfd_link_just_syms) (asection *, struct bfd_link_info *); . . {* Copy the symbol type and other attributes for a linker script . assignment of one symbol to another. *} .#define bfd_copy_link_hash_symbol_type(b, t, f) \ . BFD_SEND (b, _bfd_copy_link_hash_symbol_type, (b, t, f)) -. void (*_bfd_copy_link_hash_symbol_type) (bfd *, -. struct bfd_link_hash_entry *, -. struct bfd_link_hash_entry *); +. void (*_bfd_copy_link_hash_symbol_type) (bfd *, +. struct bfd_link_hash_entry *, +. struct bfd_link_hash_entry *); . . {* Do a link based on the link_order structures attached to each . section of the BFD. *} -. bfd_boolean (*_bfd_final_link) (bfd *, struct bfd_link_info *); +. bool (*_bfd_final_link) (bfd *, struct bfd_link_info *); . . {* Should this section be split up into smaller pieces during linking. *} -. bfd_boolean (*_bfd_link_split_section) (bfd *, struct bfd_section *); +. bool (*_bfd_link_split_section) (bfd *, struct bfd_section *); . . {* Check the relocations in the bfd for validity. *} -. bfd_boolean (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); +. bool (* _bfd_link_check_relocs)(bfd *, struct bfd_link_info *); . . {* Remove sections that are not referenced from the output. *} -. bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); +. bool (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); . . {* Sets the bitmask of allowed and disallowed section flags. *} -. bfd_boolean (*_bfd_lookup_section_flags) (struct bfd_link_info *, -. struct flag_info *, asection *); +. bool (*_bfd_lookup_section_flags) (struct bfd_link_info *, +. struct flag_info *, asection *); . . {* Attempt to merge SEC_MERGE sections. *} -. bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); +. bool (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); . . {* Is this section a member of a group? *} -. bfd_boolean (*_bfd_is_group_section) (bfd *, const struct bfd_section *); +. bool (*_bfd_is_group_section) (bfd *, const struct bfd_section *); . . {* The group name, if section is a member of a group. *} . const char *(*_bfd_group_name) (bfd *, const struct bfd_section *); . . {* Discard members of a group. *} -. bfd_boolean (*_bfd_discard_group) (bfd *, struct bfd_section *); +. bool (*_bfd_discard_group) (bfd *, struct bfd_section *); . . {* Check if SEC has been already linked during a reloceatable or . final link. *} -. bfd_boolean (*_section_already_linked) (bfd *, asection *, -. struct bfd_link_info *); +. bool (*_section_already_linked) (bfd *, asection *, +. struct bfd_link_info *); . . {* Define a common symbol. *} -. bfd_boolean (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, -. struct bfd_link_hash_entry *); +. bool (*_bfd_define_common_symbol) (bfd *, struct bfd_link_info *, +. struct bfd_link_hash_entry *); . . {* Hide a symbol. *} . void (*_bfd_link_hide_symbol) (bfd *, struct bfd_link_info *, @@ -553,8 +550,8 @@ BFD_JUMP_TABLE macros. . . {* Define a __start, __stop, .startof. or .sizeof. symbol. *} . struct bfd_link_hash_entry * -. (*_bfd_define_start_stop) (struct bfd_link_info *, const char *, -. asection *); +. (*_bfd_define_start_stop) (struct bfd_link_info *, const char *, +. asection *); . . {* Routines to handle dynamic symbols and relocs. *} .#define BFD_JUMP_TABLE_DYNAMIC(NAME) \ @@ -565,18 +562,18 @@ BFD_JUMP_TABLE macros. . NAME##_canonicalize_dynamic_reloc . . {* Get the amount of memory required to hold the dynamic symbols. *} -. long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); +. long (*_bfd_get_dynamic_symtab_upper_bound) (bfd *); . {* Read in the dynamic symbols. *} -. long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); +. long (*_bfd_canonicalize_dynamic_symtab) (bfd *, struct bfd_symbol **); . {* Create synthetized symbols. *} -. long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, -. long, struct bfd_symbol **, -. struct bfd_symbol **); +. long (*_bfd_get_synthetic_symtab) (bfd *, long, struct bfd_symbol **, +. long, struct bfd_symbol **, +. struct bfd_symbol **); . {* Get the amount of memory required to hold the dynamic relocs. *} -. long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); +. long (*_bfd_get_dynamic_reloc_upper_bound) (bfd *); . {* Read in the dynamic relocs. *} -. long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, -. struct bfd_symbol **); +. long (*_bfd_canonicalize_dynamic_reloc) (bfd *, arelent **, +. struct bfd_symbol **); . A pointer to an alternative bfd_target in case the current one is not @@ -613,31 +610,31 @@ to find an alternative output format that is suitable. . return abfd->xvec->object_flags; .} . -.static inline bfd_boolean +.static inline bool .bfd_family_coff (const bfd *abfd) .{ . return (bfd_get_flavour (abfd) == bfd_target_coff_flavour . || bfd_get_flavour (abfd) == bfd_target_xcoff_flavour); .} . -.static inline bfd_boolean +.static inline bool .bfd_big_endian (const bfd *abfd) .{ . return abfd->xvec->byteorder == BFD_ENDIAN_BIG; .} -.static inline bfd_boolean +.static inline bool .bfd_little_endian (const bfd *abfd) .{ . return abfd->xvec->byteorder == BFD_ENDIAN_LITTLE; .} . -.static inline bfd_boolean +.static inline bool .bfd_header_big_endian (const bfd *abfd) .{ . return abfd->xvec->header_byteorder == BFD_ENDIAN_BIG; .} . -.static inline bfd_boolean +.static inline bool .bfd_header_little_endian (const bfd *abfd) .{ . return abfd->xvec->header_byteorder == BFD_ENDIAN_LITTLE; @@ -663,7 +660,7 @@ to find an alternative output format that is suitable. . return sy->the_bfd->xvec->flavour; .} . -.static inline bfd_boolean +.static inline bool .bfd_keep_unused_section_symbols (const bfd *abfd) .{ . return abfd->xvec->keep_unused_section_symbols; @@ -1499,7 +1496,7 @@ FUNCTION bfd_set_default_target SYNOPSIS - bfd_boolean bfd_set_default_target (const char *name); + bool bfd_set_default_target (const char *name); DESCRIPTION Set the default target vector to use when recognizing a BFD. @@ -1507,21 +1504,21 @@ DESCRIPTION name or a configuration triplet. */ -bfd_boolean +bool bfd_set_default_target (const char *name) { const bfd_target *target; if (bfd_default_vector[0] != NULL && strcmp (name, bfd_default_vector[0]->name) == 0) - return TRUE; + return true; target = find_target (name); if (target == NULL) - return FALSE; + return false; bfd_default_vector[0] = target; - return TRUE; + return true; } /* @@ -1565,13 +1562,13 @@ bfd_find_target (const char *target_name, bfd *abfd) if (abfd) { abfd->xvec = target; - abfd->target_defaulted = TRUE; + abfd->target_defaulted = true; } return target; } if (abfd) - abfd->target_defaulted = FALSE; + abfd->target_defaulted = false; target = find_target (targname); if (target == NULL) @@ -1585,12 +1582,12 @@ bfd_find_target (const char *target_name, bfd *abfd) /* Helper function for bfd_get_target_info to determine the target's architecture. This method handles bfd internal target names as tuples and triplets. */ -static bfd_boolean +static bool _bfd_find_arch_match (const char *tname, const char **arch, const char **def_target_arch) { if (!arch) - return FALSE; + return false; while (*arch != NULL) { @@ -1601,11 +1598,11 @@ _bfd_find_arch_match (const char *tname, const char **arch, && end_ch == 0) { *def_target_arch = *arch; - return TRUE; + return true; } arch++; } - return FALSE; + return false; } /* @@ -1614,7 +1611,7 @@ FUNCTION SYNOPSIS const bfd_target *bfd_get_target_info (const char *target_name, bfd *abfd, - bfd_boolean *is_bigendian, + bool *is_bigendian, int *underscoring, const char **def_target_arch); DESCRIPTION @@ -1639,13 +1636,13 @@ DESCRIPTION */ const bfd_target * bfd_get_target_info (const char *target_name, bfd *abfd, - bfd_boolean *is_bigendian, + bool *is_bigendian, int *underscoring, const char **def_target_arch) { const bfd_target *target_vec; if (is_bigendian) - *is_bigendian = FALSE; + *is_bigendian = false; if (underscoring) *underscoring = -1; if (def_target_arch) diff --git a/bfd/tekhex.c b/bfd/tekhex.c index 6599a4f3f4..008fd8da10 100644 --- a/bfd/tekhex.c +++ b/bfd/tekhex.c @@ -204,12 +204,12 @@ static void tekhex_init (void) { unsigned int i; - static bfd_boolean inited = FALSE; + static bool inited = false; int val; if (! inited) { - inited = TRUE; + inited = true; hex_init (); val = 0; for (i = 0; i < 10; i++) @@ -266,7 +266,7 @@ typedef struct tekhex_data_struct #define enda(x) (x->vma + x->size) -static bfd_boolean +static bool getvalue (char **srcp, bfd_vma *valuep, char * endp) { char *src = *srcp; @@ -274,10 +274,10 @@ getvalue (char **srcp, bfd_vma *valuep, char * endp) unsigned int len; if (src >= endp) - return FALSE; + return false; if (!ISHEX (*src)) - return FALSE; + return false; len = hex_value (*src++); if (len == 0) @@ -285,7 +285,7 @@ getvalue (char **srcp, bfd_vma *valuep, char * endp) while (len-- && src < endp) { if (!ISHEX (*src)) - return FALSE; + return false; value = value << 4 | hex_value (*src++); } @@ -294,7 +294,7 @@ getvalue (char **srcp, bfd_vma *valuep, char * endp) return len == -1U; } -static bfd_boolean +static bool getsym (char *dstp, char **srcp, unsigned int *lenp, char * endp) { char *src = *srcp; @@ -302,7 +302,7 @@ getsym (char *dstp, char **srcp, unsigned int *lenp, char * endp) unsigned int len; if (!ISHEX (*src)) - return FALSE; + return false; len = hex_value (*src++); if (len == 0) @@ -316,7 +316,7 @@ getsym (char *dstp, char **srcp, unsigned int *lenp, char * endp) } static struct data_struct * -find_chunk (bfd *abfd, bfd_vma vma, bfd_boolean create) +find_chunk (bfd *abfd, bfd_vma vma, bool create) { struct data_struct *d = abfd->tdata.tekhex_data->data; @@ -346,7 +346,7 @@ insert_byte (bfd *abfd, int value, bfd_vma addr) if (value != 0) { /* Find the chunk that this byte needs and put it in. */ - struct data_struct *d = find_chunk (abfd, addr, TRUE); + struct data_struct *d = find_chunk (abfd, addr, true); d->chunk_data[addr & CHUNK_MASK] = value; d->chunk_init[(addr & CHUNK_MASK) / CHUNK_SPAN] = 1; @@ -356,7 +356,7 @@ insert_byte (bfd *abfd, int value, bfd_vma addr) /* The first pass is to find the names of all the sections, and see how big the data is. */ -static bfd_boolean +static bool first_phase (bfd *abfd, int type, char *src, char * src_end) { asection *section, *alt_section; @@ -372,7 +372,7 @@ first_phase (bfd *abfd, int type, char *src, char * src_end) bfd_vma addr; if (!getvalue (&src, &addr, src_end)) - return FALSE; + return false; while (*src && src < src_end - 1) { @@ -380,24 +380,24 @@ first_phase (bfd *abfd, int type, char *src, char * src_end) src += 2; addr++; } - return TRUE; + return true; } case '3': /* Symbol record, read the segment. */ if (!getsym (sym, &src, &len, src_end)) - return FALSE; + return false; section = bfd_get_section_by_name (abfd, sym); if (section == NULL) { char *n = (char *) bfd_alloc (abfd, (bfd_size_type) len + 1); if (!n) - return FALSE; + return false; memcpy (n, sym, len + 1); section = bfd_make_section (abfd, n); if (section == NULL) - return FALSE; + return false; } alt_section = NULL; while (src < src_end && *src) @@ -407,16 +407,16 @@ first_phase (bfd *abfd, int type, char *src, char * src_end) case '1': /* Section range. */ src++; if (!getvalue (&src, §ion->vma, src_end)) - return FALSE; + return false; if (!getvalue (&src, &val, src_end)) - return FALSE; + return false; if (val < section->vma) val = section->vma; section->size = val - section->vma; /* PR 17512: file: objdump-s-endless-loop.tekhex. Check for overlarge section sizes. */ if (section->size & 0x80000000) - return FALSE; + return false; section->flags = SEC_HAS_CONTENTS | SEC_LOAD | SEC_ALLOC; break; case '0': @@ -434,7 +434,7 @@ first_phase (bfd *abfd, int type, char *src, char * src_end) char stype = (*src); if (!new_symbol) - return FALSE; + return false; new_symbol->symbol.the_bfd = abfd; src++; abfd->symcount++; @@ -442,11 +442,11 @@ first_phase (bfd *abfd, int type, char *src, char * src_end) new_symbol->prev = abfd->tdata.tekhex_data->symbols; abfd->tdata.tekhex_data->symbols = new_symbol; if (!getsym (sym, &src, &len, src_end)) - return FALSE; + return false; new_symbol->symbol.name = (const char *) bfd_alloc (abfd, (bfd_size_type) len + 1); if (!new_symbol->symbol.name) - return FALSE; + return false; memcpy ((char *) (new_symbol->symbol.name), sym, len + 1); new_symbol->symbol.section = section; if (stype <= '4') @@ -469,7 +469,7 @@ first_phase (bfd *abfd, int type, char *src, char * src_end) (abfd, section->name, (section->flags & ~SEC_DATA) | SEC_CODE); if (alt_section == NULL) - return FALSE; + return false; new_symbol->symbol.section = alt_section; } } @@ -487,36 +487,36 @@ first_phase (bfd *abfd, int type, char *src, char * src_end) (abfd, section->name, (section->flags & ~SEC_CODE) | SEC_DATA); if (alt_section == NULL) - return FALSE; + return false; new_symbol->symbol.section = alt_section; } } if (!getvalue (&src, &val, src_end)) - return FALSE; + return false; new_symbol->symbol.value = val - section->vma; break; } default: - return FALSE; + return false; } } } - return TRUE; + return true; } /* Pass over a tekhex, calling one of the above functions on each record. */ -static bfd_boolean -pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *, char *)) +static bool +pass_over (bfd *abfd, bool (*func) (bfd *, int, char *, char *)) { unsigned int chars_on_line; - bfd_boolean is_eof = FALSE; + bool is_eof = false; /* To the front of the file. */ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) - return FALSE; + return false; while (! is_eof) { @@ -524,16 +524,16 @@ pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *, char *)) char type; /* Find first '%'. */ - is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1); + is_eof = (bool) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1); while (!is_eof && *src != '%') - is_eof = (bfd_boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1); + is_eof = (bool) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1); if (is_eof) break; /* Fetch the type and the length and the checksum. */ if (bfd_bread (src, (bfd_size_type) 5, abfd) != 5) - return FALSE; + return false; type = src[2]; @@ -544,18 +544,18 @@ pass_over (bfd *abfd, bfd_boolean (*func) (bfd *, int, char *, char *)) chars_on_line = HEX (src) - 5; if (chars_on_line >= MAXCHUNK) - return FALSE; + return false; if (bfd_bread (src, (bfd_size_type) chars_on_line, abfd) != chars_on_line) - return FALSE; + return false; /* Put a null at the end. */ src[chars_on_line] = 0; if (!func (abfd, type, src, src + chars_on_line)) - return FALSE; + return false; } - return TRUE; + return true; } static long @@ -581,20 +581,20 @@ tekhex_get_symtab_upper_bound (bfd *abfd) } -static bfd_boolean +static bool tekhex_mkobject (bfd *abfd) { tdata_type *tdata; tdata = (tdata_type *) bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type)); if (!tdata) - return FALSE; + return false; abfd->tdata.tekhex_data = tdata; tdata->type = 1; tdata->head = NULL; tdata->symbols = NULL; tdata->data = NULL; - return TRUE; + return true; } /* Return TRUE if the file looks like it's in TekHex format. Just look @@ -628,7 +628,7 @@ move_section_contents (bfd *abfd, const void * locationp, file_ptr offset, bfd_size_type count, - bfd_boolean get) + bool get) { bfd_vma addr; char *location = (char *) locationp; @@ -641,7 +641,7 @@ move_section_contents (bfd *abfd, /* Get high bits of address. */ bfd_vma chunk_number = addr & ~(bfd_vma) CHUNK_MASK; bfd_vma low_bits = addr & CHUNK_MASK; - bfd_boolean must_write = !get && *location != 0; + bool must_write = !get && *location != 0; if (chunk_number != prev_number || (!d && must_write)) { @@ -667,7 +667,7 @@ move_section_contents (bfd *abfd, } } -static bfd_boolean +static bool tekhex_get_section_contents (bfd *abfd, asection *section, void * locationp, @@ -676,14 +676,14 @@ tekhex_get_section_contents (bfd *abfd, { if (section->flags & (SEC_LOAD | SEC_ALLOC)) { - move_section_contents (abfd, section, locationp, offset, count, TRUE); - return TRUE; + move_section_contents (abfd, section, locationp, offset, count, true); + return true; } - return FALSE; + return false; } -static bfd_boolean +static bool tekhex_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long machine) @@ -695,7 +695,7 @@ tekhex_set_arch_mach (bfd *abfd, /* We have to save up all the Tekhexords for a splurge before output. */ -static bfd_boolean +static bool tekhex_set_section_contents (bfd *abfd, sec_ptr section, const void * locationp, @@ -705,11 +705,11 @@ tekhex_set_section_contents (bfd *abfd, if (section->flags & (SEC_LOAD | SEC_ALLOC)) { move_section_contents (abfd, section, locationp, offset, bytes_to_do, - FALSE); - return TRUE; + false); + return true; } - return FALSE; + return false; } static void @@ -796,7 +796,7 @@ out (bfd *abfd, int type, char *start, char *end) abort (); } -static bfd_boolean +static bool tekhex_write_object_contents (bfd *abfd) { char buffer[100]; @@ -886,7 +886,7 @@ tekhex_write_object_contents (bfd *abfd) case 'C': case 'U': bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } writesym (&dst, sym->name); @@ -899,7 +899,7 @@ tekhex_write_object_contents (bfd *abfd) /* And the terminator. */ if (bfd_bwrite ("%0781010\n", (bfd_size_type) 9, abfd) != 9) abort (); - return TRUE; + return true; } static int diff --git a/bfd/verilog.c b/bfd/verilog.c index 94a9cc8045..cdd4a3a1d4 100644 --- a/bfd/verilog.c +++ b/bfd/verilog.c @@ -95,19 +95,19 @@ typedef struct verilog_data_struct } tdata_type; -static bfd_boolean +static bool verilog_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach) { if (arch != bfd_arch_unknown) return bfd_default_set_arch_mach (abfd, arch, mach); abfd->arch_info = & bfd_default_arch_struct; - return TRUE; + return true; } /* We have to save up all the outpu for a splurge before output. */ -static bfd_boolean +static bool verilog_set_section_contents (bfd *abfd, sec_ptr section, const void * location, @@ -119,7 +119,7 @@ verilog_set_section_contents (bfd *abfd, entry = (verilog_data_list_type *) bfd_alloc (abfd, sizeof (* entry)); if (entry == NULL) - return FALSE; + return false; if (bytes_to_do && (section->flags & SEC_ALLOC) @@ -129,7 +129,7 @@ verilog_set_section_contents (bfd *abfd, data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do); if (data == NULL) - return FALSE; + return false; memcpy ((void *) data, location, (size_t) bytes_to_do); entry->data = data; @@ -159,10 +159,10 @@ verilog_set_section_contents (bfd *abfd, tdata->tail = entry; } } - return TRUE; + return true; } -static bfd_boolean +static bool verilog_write_address (bfd *abfd, bfd_vma address) { char buffer[20]; @@ -203,7 +203,7 @@ verilog_write_address (bfd *abfd, bfd_vma address) supplied bytes and length don't have a checksum. That's worked out here. */ -static bfd_boolean +static bool verilog_write_record (bfd *abfd, const bfd_byte *data, const bfd_byte *end) @@ -220,7 +220,7 @@ verilog_write_record (bfd *abfd, > (long) sizeof (buffer)) { /* FIXME: Should we generate an error message ? */ - return FALSE; + return false; } /* Write the data. @@ -283,7 +283,7 @@ verilog_write_record (bfd *abfd, return bfd_bwrite ((void *) buffer, wrlen, abfd) == wrlen; } -static bfd_boolean +static bool verilog_write_section (bfd *abfd, tdata_type *tdata ATTRIBUTE_UNUSED, verilog_data_list_type *list) @@ -302,16 +302,16 @@ verilog_write_section (bfd *abfd, if (! verilog_write_record (abfd, location, location + octets_this_chunk)) - return FALSE; + return false; octets_written += octets_this_chunk; location += octets_this_chunk; } - return TRUE; + return true; } -static bfd_boolean +static bool verilog_write_object_contents (bfd *abfd) { tdata_type *tdata = abfd->tdata.verilog_data; @@ -323,10 +323,10 @@ verilog_write_object_contents (bfd *abfd) while (list != (verilog_data_list_type *) NULL) { if (! verilog_write_section (abfd, tdata, list)) - return FALSE; + return false; list = list->next; } - return TRUE; + return true; } /* Initialize by filling in the hex conversion array. */ @@ -334,18 +334,18 @@ verilog_write_object_contents (bfd *abfd) static void verilog_init (void) { - static bfd_boolean inited = FALSE; + static bool inited = false; if (! inited) { - inited = TRUE; + inited = true; hex_init (); } } /* Set up the verilog tdata information. */ -static bfd_boolean +static bool verilog_mkobject (bfd *abfd) { tdata_type *tdata; @@ -354,13 +354,13 @@ verilog_mkobject (bfd *abfd) tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type)); if (tdata == NULL) - return FALSE; + return false; abfd->tdata.verilog_data = tdata; tdata->head = NULL; tdata->tail = NULL; - return TRUE; + return true; } #define verilog_close_and_cleanup _bfd_generic_close_and_cleanup diff --git a/bfd/vms-alpha.c b/bfd/vms-alpha.c index 94001cc3bf..41cc94440b 100644 --- a/bfd/vms-alpha.c +++ b/bfd/vms-alpha.c @@ -155,7 +155,7 @@ struct eom_struct { unsigned int eom_l_total_lps; unsigned short eom_w_comcod; - bfd_boolean eom_has_transfer; + bool eom_has_transfer; unsigned char eom_b_tfrflg; unsigned int eom_l_psindx; unsigned int eom_l_tfradr; @@ -267,7 +267,7 @@ struct module struct vms_private_data_struct { /* If true, relocs have been read. */ - bfd_boolean reloc_done; + bool reloc_done; /* Record input buffer. */ struct vms_rec_rd recrd; @@ -371,17 +371,15 @@ struct vms_section_data_struct struct vms_private_data_struct *bfd_vms_get_data (bfd *); static int vms_get_remaining_object_record (bfd *, unsigned int); -static bfd_boolean _bfd_vms_slurp_object_records (bfd * abfd); -static bfd_boolean alpha_vms_add_fixup_lp (struct bfd_link_info *, - bfd *, bfd *); -static bfd_boolean alpha_vms_add_fixup_ca (struct bfd_link_info *, - bfd *, bfd *); -static bfd_boolean alpha_vms_add_fixup_qr (struct bfd_link_info *, - bfd *, bfd *, bfd_vma); -static bfd_boolean alpha_vms_add_fixup_lr (struct bfd_link_info *, - unsigned int, bfd_vma); -static bfd_boolean alpha_vms_add_lw_reloc (struct bfd_link_info *); -static bfd_boolean alpha_vms_add_qw_reloc (struct bfd_link_info *); +static bool _bfd_vms_slurp_object_records (bfd * abfd); +static bool alpha_vms_add_fixup_lp (struct bfd_link_info *, bfd *, bfd *); +static bool alpha_vms_add_fixup_ca (struct bfd_link_info *, bfd *, bfd *); +static bool alpha_vms_add_fixup_qr (struct bfd_link_info *, bfd *, bfd *, + bfd_vma); +static bool alpha_vms_add_fixup_lr (struct bfd_link_info *, unsigned int, + bfd_vma); +static bool alpha_vms_add_lw_reloc (struct bfd_link_info *); +static bool alpha_vms_add_qw_reloc (struct bfd_link_info *); struct vector_type { @@ -423,7 +421,7 @@ struct alpha_vms_vma_ref struct alpha_vms_shlib_el { bfd *abfd; - bfd_boolean has_fixups; + bool has_fixups; struct vector_type lp; /* Vector of bfd_vma. */ struct vector_type ca; /* Vector of bfd_vma. */ @@ -464,7 +462,7 @@ struct alpha_vms_link_hash_entry /* Read & process EIHD record. Return TRUE on success, FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_eihd (bfd *abfd, unsigned int *eisd_offset, unsigned int *eihs_offset) { @@ -479,7 +477,7 @@ _bfd_vms_slurp_eihd (bfd *abfd, unsigned int *eisd_offset, { _bfd_error_handler (_("corrupt EIHD record - size is too small")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } size = bfd_getl32 (eihd->size); @@ -506,13 +504,13 @@ _bfd_vms_slurp_eihd (bfd *abfd, unsigned int *eisd_offset, *eisd_offset, *eihs_offset)); (void) size; - return TRUE; + return true; } /* Read & process EISD record. Return TRUE on success, FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset) { int section_count = 0; @@ -535,7 +533,7 @@ _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset) if (offset > PRIV (recrd.rec_size) || (PRIV (recrd.rec_size) - offset < offsetof (struct vms_eisd, eisdsize) + 4)) - return FALSE; + return false; eisd = (struct vms_eisd *) (PRIV (recrd.rec) + offset); rec_size = bfd_getl32 (eisd->eisdsize); if (rec_size == 0) @@ -550,10 +548,10 @@ _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset) /* Make sure that there is enough data present in the record. */ if (rec_size < offsetof (struct vms_eisd, type) + 1) - return FALSE; + return false; /* Make sure that the record is not too big either. */ if (rec_size > PRIV (recrd.rec_size) - offset) - return FALSE; + return false; offset += rec_size; @@ -594,7 +592,7 @@ _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset) if (flags & EISD__M_GBL) { if (rec_size <= offsetof (struct vms_eisd, gblnam)) - return FALSE; + return false; else if (rec_size < sizeof (struct vms_eisd)) name = _bfd_vms_save_counted_string (abfd, eisd->gblnam, rec_size - offsetof (struct vms_eisd, gblnam)); @@ -602,7 +600,7 @@ _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset) name = _bfd_vms_save_counted_string (abfd, eisd->gblnam, EISD__K_GBLNAMLEN); if (name == NULL || name[0] == 0) - return FALSE; + return false; bfd_flags |= SEC_COFF_SHARED_LIBRARY; bfd_flags &= ~(SEC_ALLOC | SEC_LOAD); } @@ -616,7 +614,7 @@ _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset) name = (char *) bfd_alloc (abfd, 32); if (name == NULL) - return FALSE; + return false; if (flags & EISD__M_DZRO) pfx = "BSS"; else if (flags & EISD__M_EXE) @@ -632,23 +630,23 @@ _bfd_vms_slurp_eisd (bfd *abfd, unsigned int offset) section = bfd_make_section (abfd, name); if (!section) - return FALSE; + return false; section->filepos = vbn ? VMS_BLOCK_SIZE * (vbn - 1) : 0; section->size = size; section->vma = vaddr; if (!bfd_set_section_flags (section, bfd_flags)) - return FALSE; + return false; } - return TRUE; + return true; } /* Read & process EIHS record. Return TRUE on success, FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_eihs (bfd *abfd, unsigned int offset) { unsigned char *p = PRIV (recrd.rec) + offset; @@ -666,7 +664,7 @@ _bfd_vms_slurp_eihs (bfd *abfd, unsigned int offset) _bfd_error_handler (_("unable to read EIHS record at offset %#x"), offset); bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } gstvbn = bfd_getl32 (p + EIHS__L_GSTVBN); @@ -688,13 +686,13 @@ _bfd_vms_slurp_eihs (bfd *abfd, unsigned int offset) section = bfd_make_section (abfd, "$DST$"); if (!section) - return FALSE; + return false; section->size = dstsize; section->filepos = VMS_BLOCK_SIZE * (dstvbn - 1); if (!bfd_set_section_flags (section, bfd_flags)) - return FALSE; + return false; PRIV (dst_section) = section; abfd->flags |= (HAS_DEBUG | HAS_LINENO); @@ -706,13 +704,13 @@ _bfd_vms_slurp_eihs (bfd *abfd, unsigned int offset) section = bfd_make_section (abfd, "$DMT$"); if (!section) - return FALSE; + return false; section->size = dmtbytes; section->filepos = VMS_BLOCK_SIZE * (dmtvbn - 1); if (!bfd_set_section_flags (section, bfd_flags)) - return FALSE; + return false; } if (gstvbn) @@ -720,16 +718,16 @@ _bfd_vms_slurp_eihs (bfd *abfd, unsigned int offset) if (bfd_seek (abfd, VMS_BLOCK_SIZE * (gstvbn - 1), SEEK_SET)) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } if (!_bfd_vms_slurp_object_records (abfd)) - return FALSE; + return false; abfd->flags |= HAS_SYMS; } - return TRUE; + return true; } /* Object file reading. */ @@ -900,7 +898,7 @@ vms_get_remaining_object_record (bfd *abfd, unsigned int read_so_far) /* Read and process emh record. Return TRUE on success, FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_ehdr (bfd *abfd) { unsigned char *ptr; @@ -973,10 +971,10 @@ _bfd_vms_slurp_ehdr (bfd *abfd) default: fail: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } - return TRUE; + return true; } /* Typical sections for evax object files. */ @@ -1116,7 +1114,7 @@ vms_esecflag_by_name (const struct sec_flags_struct *section_flags, /* Add SYM to the symbol table of ABFD. Return FALSE in case of error. */ -static bfd_boolean +static bool add_symbol_entry (bfd *abfd, struct vms_symbol_entry *sym) { if (PRIV (gsd_sym_count) >= PRIV (max_sym_count)) @@ -1135,11 +1133,11 @@ add_symbol_entry (bfd *abfd, struct vms_symbol_entry *sym) (PRIV (max_sym_count) * sizeof (struct vms_symbol_entry *))); } if (PRIV (syms) == NULL) - return FALSE; + return false; } PRIV (syms)[PRIV (gsd_sym_count)++] = sym; - return TRUE; + return true; } /* Create a symbol whose name is ASCIC and add it to ABFD. @@ -1175,7 +1173,7 @@ add_symbol (bfd *abfd, const unsigned char *ascic, unsigned int max) /* Read and process EGSD. Return FALSE on failure. */ -static bfd_boolean +static bool _bfd_vms_slurp_egsd (bfd *abfd) { int gsd_type; @@ -1191,7 +1189,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) _bfd_error_handler (_("corrupt EGSD record: its size (%#x) is too small"), PRIV (recrd.rec_size)); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } PRIV (recrd.rec) += 8; /* Skip type, size, align pad. */ @@ -1216,7 +1214,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) "is larger than remaining space (%#x)"), gsd_type, gsd_size, PRIV (recrd.rec_size)); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } if (gsd_size < 4) @@ -1226,7 +1224,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) "is too small"), gsd_type, gsd_size); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } switch (gsd_type) @@ -1259,11 +1257,11 @@ _bfd_vms_slurp_egsd (bfd *abfd) left = gsd_size - offsetof (struct vms_egps, namlng); name = _bfd_vms_save_counted_string (abfd, &egps->namlng, left); if (name == NULL || name[0] == 0) - return FALSE; + return false; section = bfd_make_section (abfd, name); if (!section) - return FALSE; + return false; section->filepos = 0; section->size = bfd_getl32 (egps->alloc); @@ -1292,7 +1290,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) new_flags &= ~SEC_DATA; } if (!bfd_set_section_flags (section, new_flags)) - return FALSE; + return false; /* Give a non-overlapping vma to non absolute sections. */ align_addr = (bfd_vma) 1 << section->alignment_power; @@ -1311,7 +1309,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) PRIV (sections) = bfd_realloc_or_free (PRIV (sections), PRIV (section_max) * sizeof (asection *)); if (PRIV (sections) == NULL) - return FALSE; + return false; } PRIV (sections)[PRIV (section_count)] = section; @@ -1338,7 +1336,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) goto too_small; entry = add_symbol (abfd, vms_rec + nameoff, gsd_size - nameoff); if (entry == NULL) - return FALSE; + return false; /* Allow only duplicate reference. */ if ((entry->flags & EGSY__V_DEF) && (old_flags & EGSY__V_DEF)) @@ -1357,7 +1355,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) entry->value = bfd_getl64 (esdf->value); if (PRIV (sections) == NULL) - return FALSE; + return false; psindx = bfd_getl32 (esdf->psindx); /* PR 21813: Check for an out of range index. */ @@ -1368,7 +1366,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) "field is too big (%#lx)"), psindx); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } entry->section = PRIV (sections)[psindx]; @@ -1398,7 +1396,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) goto too_small; entry = add_symbol (abfd, &egst->namlng, gsd_size - nameoff); if (entry == NULL) - return FALSE; + return false; old_flags = bfd_getl16 (egst->header.flags); entry->typ = gsd_type; @@ -1410,7 +1408,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) if (old_flags & EGSY__V_REL) { if (PRIV (sections) == NULL) - return FALSE; + return false; psindx = bfd_getl32 (egst->psindx); /* PR 21813: Check for an out of range index. */ if (psindx < 0 || psindx >= (int) PRIV (section_count)) @@ -1441,7 +1439,7 @@ _bfd_vms_slurp_egsd (bfd *abfd) default: _bfd_error_handler (_("unknown EGSD subtype %d"), gsd_type); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } PRIV (recrd.rec_size) -= gsd_size; @@ -1453,14 +1451,14 @@ _bfd_vms_slurp_egsd (bfd *abfd) if (PRIV (gsd_sym_count) > 0) abfd->flags |= HAS_SYMS; - return TRUE; + return true; } /* Stack routines for vms ETIR commands. */ /* Push value and section index. */ -static bfd_boolean +static bool _bfd_vms_push (bfd *abfd, bfd_vma val, unsigned int reloc) { vms_debug2 ((4, "\n", @@ -1473,28 +1471,28 @@ _bfd_vms_push (bfd *abfd, bfd_vma val, unsigned int reloc) { bfd_set_error (bfd_error_bad_value); _bfd_error_handler (_("stack overflow (%d) in _bfd_vms_push"), PRIV (stackptr)); - return FALSE; + return false; } - return TRUE; + return true; } /* Pop value and section index. */ -static bfd_boolean +static bool _bfd_vms_pop (bfd *abfd, bfd_vma *val, unsigned int *rel) { if (PRIV (stackptr) == 0) { bfd_set_error (bfd_error_bad_value); _bfd_error_handler (_("stack underflow in _bfd_vms_pop")); - return FALSE; + return false; } PRIV (stackptr)--; *val = PRIV (stack[PRIV (stackptr)]).value; *rel = PRIV (stack[PRIV (stackptr)]).reloc; vms_debug2 ((4, "\n", (unsigned long)*val, *rel)); - return TRUE; + return true; } /* Routines to fill sections contents during tir/etir read. */ @@ -1551,7 +1549,7 @@ image_inc_ptr (bfd *abfd, bfd_vma offset) /* Save current DST location counter under specified index. */ -static bfd_boolean +static bool dst_define_location (bfd *abfd, unsigned int loc) { vms_debug2 ((4, "dst_define_location (%d)\n", (int)loc)); @@ -1561,7 +1559,7 @@ dst_define_location (bfd *abfd, unsigned int loc) /* 16M entries ought to be plenty. */ bfd_set_error (bfd_error_bad_value); _bfd_error_handler (_("dst_define_location %u too large"), loc); - return FALSE; + return false; } /* Grow the ptr offset table if necessary. */ @@ -1571,17 +1569,17 @@ dst_define_location (bfd *abfd, unsigned int loc) = bfd_realloc_or_free (PRIV (dst_ptr_offsets), (loc + 1) * sizeof (unsigned int)); if (PRIV (dst_ptr_offsets) == NULL) - return FALSE; + return false; PRIV (dst_ptr_offsets_count) = loc + 1; } PRIV (dst_ptr_offsets)[loc] = PRIV (image_offset); - return TRUE; + return true; } /* Restore saved DST location counter from specified index. */ -static bfd_boolean +static bool dst_restore_location (bfd *abfd, unsigned int loc) { vms_debug2 ((4, "dst_restore_location (%d)\n", (int)loc)); @@ -1589,14 +1587,14 @@ dst_restore_location (bfd *abfd, unsigned int loc) if (loc < PRIV (dst_ptr_offsets_count)) { PRIV (image_offset) = PRIV (dst_ptr_offsets)[loc]; - return TRUE; + return true; } - return FALSE; + return false; } /* Retrieve saved DST location counter from specified index. */ -static bfd_boolean +static bool dst_retrieve_location (bfd *abfd, bfd_vma *loc) { vms_debug2 ((4, "dst_retrieve_location (%d)\n", (int) *loc)); @@ -1604,14 +1602,14 @@ dst_retrieve_location (bfd *abfd, bfd_vma *loc) if (*loc < PRIV (dst_ptr_offsets_count)) { *loc = PRIV (dst_ptr_offsets)[*loc]; - return TRUE; + return true; } - return FALSE; + return false; } /* Write multiple bytes to section image. */ -static bfd_boolean +static bool image_write (bfd *abfd, unsigned char *ptr, unsigned int size) { asection *sec = PRIV (image_section); @@ -1622,7 +1620,7 @@ image_write (bfd *abfd, unsigned char *ptr, unsigned int size) || size > sec->size - off) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } #if VMS_DEBUG @@ -1639,7 +1637,7 @@ image_write (bfd *abfd, unsigned char *ptr, unsigned int size) if (ptr[i] != 0) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } } @@ -1648,12 +1646,12 @@ image_write (bfd *abfd, unsigned char *ptr, unsigned int size) #endif PRIV (image_offset) += size; - return TRUE; + return true; } /* Write byte to section image. */ -static bfd_boolean +static bool image_write_b (bfd * abfd, unsigned int value) { unsigned char data[1]; @@ -1667,7 +1665,7 @@ image_write_b (bfd * abfd, unsigned int value) /* Write 2-byte word to image. */ -static bfd_boolean +static bool image_write_w (bfd * abfd, unsigned int value) { unsigned char data[2]; @@ -1680,7 +1678,7 @@ image_write_w (bfd * abfd, unsigned int value) /* Write 4-byte long to image. */ -static bfd_boolean +static bool image_write_l (bfd * abfd, unsigned long value) { unsigned char data[4]; @@ -1693,7 +1691,7 @@ image_write_l (bfd * abfd, unsigned long value) /* Write 8-byte quad to image. */ -static bfd_boolean +static bool image_write_q (bfd * abfd, bfd_vma value) { unsigned char data[8]; @@ -1803,7 +1801,7 @@ _bfd_vms_get_value (bfd *abfd, name[i] = 0; h = (struct alpha_vms_link_hash_entry *) - bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + bfd_link_hash_lookup (info->hash, name, false, false, true); *hp = h; @@ -1818,7 +1816,7 @@ _bfd_vms_get_value (bfd *abfd, else { (*info->callbacks->undefined_symbol) - (info, name, abfd, PRIV (image_section), PRIV (image_offset), TRUE); + (info, name, abfd, PRIV (image_section), PRIV (image_offset), true); *vma = 0; } } @@ -1888,7 +1886,7 @@ alpha_vms_fix_sec_rel (bfd *abfd, struct bfd_link_info *info, the output section (used during linking). Return FALSE in case of error. */ -static bfd_boolean +static bool _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) { unsigned char *ptr; @@ -1925,7 +1923,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) corrupt_etir: _bfd_error_handler (_("corrupt ETIR record encountered")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } ptr += 4; cmd_length -= 4; @@ -1945,7 +1943,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) case ETIR__C_STA_GBL: _bfd_vms_get_value (abfd, ptr, ptr + cmd_length, info, &op1, &h); if (!_bfd_vms_push (abfd, op1, alpha_vms_sym_to_ctxt (h))) - return FALSE; + return false; break; /* Stack longword @@ -1956,7 +1954,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) if (cmd_length < 4) goto corrupt_etir; if (!_bfd_vms_push (abfd, bfd_getl32 (ptr), RELC_NONE)) - return FALSE; + return false; break; /* Stack quadword @@ -1967,7 +1965,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) if (cmd_length < 8) goto corrupt_etir; if (!_bfd_vms_push (abfd, bfd_getl64 (ptr), RELC_NONE)) - return FALSE; + return false; break; /* Stack psect base plus quadword offset @@ -1988,11 +1986,11 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) _bfd_error_handler (_("bad section index in %s"), _bfd_vms_etir_name (cmd)); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } op1 = bfd_getl64 (ptr + 4); if (!_bfd_vms_push (abfd, op1, psect | RELC_SEC_BASE)) - return FALSE; + return false; } break; @@ -2001,36 +1999,36 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) case ETIR__C_STA_CKARG: _bfd_error_handler (_("unsupported STA cmd %s"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; break; /* Store byte: pop stack, write byte arg: -. */ case ETIR__C_STO_B: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (!image_write_b (abfd, (unsigned int) op1 & 0xff)) - return FALSE; + return false; break; /* Store word: pop stack, write word arg: -. */ case ETIR__C_STO_W: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (!image_write_w (abfd, (unsigned int) op1 & 0xffff)) - return FALSE; + return false; break; /* Store longword: pop stack, write longword arg: -. */ case ETIR__C_STO_LW: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 & RELC_SEC_BASE) { op1 = alpha_vms_fix_sec_rel (abfd, info, rel1, op1); @@ -2039,7 +2037,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) else if (rel1 & RELC_SHR_BASE) { if (!alpha_vms_add_fixup_lr (info, rel1 & RELC_MASK, op1)) - return FALSE; + return false; rel1 = RELC_NONE; } if (rel1 != RELC_NONE) @@ -2047,17 +2045,17 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) if (rel1 != RELC_REL) abort (); if (!alpha_vms_add_lw_reloc (info)) - return FALSE; + return false; } if (!image_write_l (abfd, op1)) - return FALSE; + return false; break; /* Store quadword: pop stack, write quadword arg: -. */ case ETIR__C_STO_QW: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 & RELC_SEC_BASE) { op1 = alpha_vms_fix_sec_rel (abfd, info, rel1, op1); @@ -2070,10 +2068,10 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) if (rel1 != RELC_REL) abort (); if (!alpha_vms_add_qw_reloc (info)) - return FALSE; + return false; } if (!image_write_q (abfd, op1)) - return FALSE; + return false; break; /* Store immediate repeated: pop stack for repeat count @@ -2089,7 +2087,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) if (size > cmd_length - 4) goto corrupt_etir; if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (size == 0) @@ -2097,7 +2095,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) op1 &= 0xffffffff; while (op1-- > 0) if (!image_write (abfd, ptr + 4, size)) - return FALSE; + return false; } break; @@ -2111,7 +2109,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) { if (!alpha_vms_add_fixup_qr (info, abfd, h->sym->owner, h->sym->symbol_vector)) - return FALSE; + return false; op1 = 0; } else @@ -2119,11 +2117,11 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) op1 = alpha_vms_get_sym_value (h->sym->section, h->sym->value); if (!alpha_vms_add_qw_reloc (info)) - return FALSE; + return false; } } if (!image_write_q (abfd, op1)) - return FALSE; + return false; break; /* Store code address: write address of entry point @@ -2138,7 +2136,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) if (h->sym->typ == EGSD__C_SYMG) { if (!alpha_vms_add_fixup_ca (info, abfd, h->sym->owner)) - return FALSE; + return false; op1 = h->sym->symbol_vector; } else @@ -2146,7 +2144,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) op1 = alpha_vms_get_sym_value (h->sym->code_section, h->sym->code_value); if (!alpha_vms_add_qw_reloc (info)) - return FALSE; + return false; } } else @@ -2156,14 +2154,14 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) } } if (!image_write_q (abfd, op1)) - return FALSE; + return false; break; /* Store offset to psect: pop stack, add low 32 bits to base of psect arg: none. */ case ETIR__C_STO_OFF: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (!(rel1 & RELC_SEC_BASE)) abort (); @@ -2171,7 +2169,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) op1 = alpha_vms_fix_sec_rel (abfd, info, rel1, op1); rel1 = RELC_REL; if (!image_write_q (abfd, op1)) - return FALSE; + return false; break; /* Store immediate @@ -2185,7 +2183,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) goto corrupt_etir; size = bfd_getl32 (ptr); if (!image_write (abfd, ptr + 4, size)) - return FALSE; + return false; } break; @@ -2201,7 +2199,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) abort (); #endif if (!image_write_l (abfd, op1)) - return FALSE; + return false; break; case ETIR__C_STO_RB: @@ -2209,13 +2207,13 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) case ETIR__C_STO_LP_PSB: _bfd_error_handler (_("%s: not supported"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; break; case ETIR__C_STO_HINT_GBL: case ETIR__C_STO_HINT_PS: _bfd_error_handler (_("%s: not implemented"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; break; /* 200 Store-conditional Linkage Pair @@ -2240,7 +2238,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) case ETIR__C_STC_PS: _bfd_error_handler (_("%s: not supported"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; break; /* 201 Store-conditional Linkage Pair with Procedure Signature @@ -2258,7 +2256,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) if (h->sym->typ == EGSD__C_SYMG) { if (!alpha_vms_add_fixup_lp (info, abfd, h->sym->owner)) - return FALSE; + return false; op1 = h->sym->symbol_vector; op2 = 0; } @@ -2278,7 +2276,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) } if (!image_write_q (abfd, op1) || !image_write_q (abfd, op2)) - return FALSE; + return false; break; /* 205 Store-conditional NOP at address of global @@ -2335,14 +2333,14 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) case ETIR__C_STC_NBH_PS: _bfd_error_handler (_("%s: not supported"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; break; /* Det relocation base: pop stack, set image location counter arg: none. */ case ETIR__C_CTL_SETRB: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (!(rel1 & RELC_SEC_BASE)) abort (); image_set_ptr (abfd, op1, rel1 & RELC_MASK, info); @@ -2361,25 +2359,25 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) arg: none. */ case ETIR__C_CTL_DFLOC: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (!dst_define_location (abfd, op1)) - return FALSE; + return false; break; /* Set location: pop index, restore location counter from index arg: none. */ case ETIR__C_CTL_STLOC: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (!dst_restore_location (abfd, op1)) { bfd_set_error (bfd_error_bad_value); _bfd_error_handler (_("invalid %s"), "ETIR__C_CTL_STLOC"); - return FALSE; + return false; } break; @@ -2387,17 +2385,17 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) arg: none. */ case ETIR__C_CTL_STKDL: if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (!dst_retrieve_location (abfd, &op1)) { bfd_set_error (bfd_error_bad_value); _bfd_error_handler (_("invalid %s"), "ETIR__C_CTL_STKDL"); - return FALSE; + return false; } if (!_bfd_vms_push (abfd, op1, RELC_NONE)) - return FALSE; + return false; break; case ETIR__C_OPR_NOP: /* No-op. */ @@ -2406,19 +2404,19 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) case ETIR__C_OPR_ADD: /* Add. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 == RELC_NONE && rel2 != RELC_NONE) rel1 = rel2; else if (rel1 != RELC_NONE && rel2 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, op1 + op2, rel1)) - return FALSE; + return false; break; case ETIR__C_OPR_SUB: /* Subtract. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 == RELC_NONE && rel2 != RELC_NONE) rel1 = rel2; else if ((rel1 & RELC_SEC_BASE) && (rel2 & RELC_SEC_BASE)) @@ -2430,23 +2428,23 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) else if (rel1 != RELC_NONE && rel2 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, op2 - op1, rel1)) - return FALSE; + return false; break; case ETIR__C_OPR_MUL: /* Multiply. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 != RELC_NONE || rel2 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, op1 * op2, RELC_NONE)) - return FALSE; + return false; break; case ETIR__C_OPR_DIV: /* Divide. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 != RELC_NONE || rel2 != RELC_NONE) goto bad_context; if (op1 == 0) @@ -2455,73 +2453,73 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) and a non-fatal warning message. */ _bfd_error_handler (_("%s divide by zero"), "ETIR__C_OPR_DIV"); if (!_bfd_vms_push (abfd, 0, RELC_NONE)) - return FALSE; + return false; } else { if (!_bfd_vms_push (abfd, op2 / op1, RELC_NONE)) - return FALSE; + return false; } break; case ETIR__C_OPR_AND: /* Logical AND. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 != RELC_NONE || rel2 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, op1 & op2, RELC_NONE)) - return FALSE; + return false; break; case ETIR__C_OPR_IOR: /* Logical inclusive OR. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 != RELC_NONE || rel2 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, op1 | op2, RELC_NONE)) - return FALSE; + return false; break; case ETIR__C_OPR_EOR: /* Logical exclusive OR. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 != RELC_NONE || rel2 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, op1 ^ op2, RELC_NONE)) - return FALSE; + return false; break; case ETIR__C_OPR_NEG: /* Negate. */ if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, -op1, RELC_NONE)) - return FALSE; + return false; break; case ETIR__C_OPR_COM: /* Complement. */ if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (rel1 != RELC_NONE) goto bad_context; if (!_bfd_vms_push (abfd, ~op1, RELC_NONE)) - return FALSE; + return false; break; case ETIR__C_OPR_ASH: /* Arithmetic shift. */ if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (rel1 != RELC_NONE || rel2 != RELC_NONE) { bad_context: _bfd_error_handler (_("invalid use of %s with contexts"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; } if ((bfd_signed_vma) op2 < 0) { @@ -2545,7 +2543,7 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) op1 <<= op2; } if (!_bfd_vms_push (abfd, op1, RELC_NONE)) /* FIXME: sym. */ - return FALSE; + return false; break; case ETIR__C_OPR_INSV: /* Insert field. */ @@ -2555,43 +2553,43 @@ _bfd_vms_slurp_etir (bfd *abfd, struct bfd_link_info *info) case ETIR__C_OPR_DFLIT: /* Define a literal. */ _bfd_error_handler (_("%s: not supported"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; break; case ETIR__C_OPR_SEL: /* Select. */ if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; if (op1 & 0x01L) { if (!_bfd_vms_pop (abfd, &op1, &rel1)) - return FALSE; + return false; } else { if (!_bfd_vms_pop (abfd, &op1, &rel1) || !_bfd_vms_pop (abfd, &op2, &rel2)) - return FALSE; + return false; if (!_bfd_vms_push (abfd, op1, rel1)) - return FALSE; + return false; } break; default: _bfd_error_handler (_("reserved cmd %d"), cmd); - return FALSE; + return false; break; } ptr += cmd_length; } - return TRUE; + return true; } /* Process EDBG/ETBT record. Return TRUE on success, FALSE on error */ -static bfd_boolean +static bool vms_slurp_debug (bfd *abfd) { asection *section = PRIV (dst_section); @@ -2606,9 +2604,9 @@ vms_slurp_debug (bfd *abfd) section = bfd_make_section (abfd, "$DST$"); if (!section) - return FALSE; + return false; if (!bfd_set_section_flags (section, flags)) - return FALSE; + return false; PRIV (dst_section) = section; } @@ -2616,16 +2614,16 @@ vms_slurp_debug (bfd *abfd) PRIV (image_offset) = section->size; if (!_bfd_vms_slurp_etir (abfd, NULL)) - return FALSE; + return false; section->size = PRIV (image_offset); - return TRUE; + return true; } /* Process EDBG record. Return TRUE on success, FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_edbg (bfd *abfd) { vms_debug2 ((2, "EDBG\n")); @@ -2638,7 +2636,7 @@ _bfd_vms_slurp_edbg (bfd *abfd) /* Process ETBT record. Return TRUE on success, FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_etbt (bfd *abfd) { vms_debug2 ((2, "ETBT\n")); @@ -2651,7 +2649,7 @@ _bfd_vms_slurp_etbt (bfd *abfd) /* Process EEOM record. Return TRUE on success, FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_eeom (bfd *abfd) { struct vms_eeom *eeom = (struct vms_eeom *) PRIV (recrd.rec); @@ -2663,7 +2661,7 @@ _bfd_vms_slurp_eeom (bfd *abfd) { _bfd_error_handler (_("corrupt EEOM record - size is too small")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } PRIV (eom_data).eom_l_total_lps = bfd_getl32 (eeom->total_lps); @@ -2672,28 +2670,28 @@ _bfd_vms_slurp_eeom (bfd *abfd) { _bfd_error_handler (_("object module not error-free !")); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } - PRIV (eom_data).eom_has_transfer = FALSE; + PRIV (eom_data).eom_has_transfer = false; if (PRIV (recrd.rec_size) > 10) { - PRIV (eom_data).eom_has_transfer = TRUE; + PRIV (eom_data).eom_has_transfer = true; PRIV (eom_data).eom_b_tfrflg = eeom->tfrflg; PRIV (eom_data).eom_l_psindx = bfd_getl32 (eeom->psindx); PRIV (eom_data).eom_l_tfradr = bfd_getl32 (eeom->tfradr); abfd->start_address = PRIV (eom_data).eom_l_tfradr; } - return TRUE; + return true; } /* Slurp an ordered set of VMS object records. Return FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_slurp_object_records (bfd * abfd) { - bfd_boolean ok; + bool ok; int type; do @@ -2704,7 +2702,7 @@ _bfd_vms_slurp_object_records (bfd * abfd) if (type < 0) { vms_debug2 ((2, "next_record failed\n")); - return FALSE; + return false; } switch (type) @@ -2719,7 +2717,7 @@ _bfd_vms_slurp_object_records (bfd * abfd) ok = _bfd_vms_slurp_egsd (abfd); break; case EOBJ__C_ETIR: - ok = TRUE; /* _bfd_vms_slurp_etir (abfd); */ + ok = true; /* _bfd_vms_slurp_etir (abfd); */ break; case EOBJ__C_EDBG: ok = _bfd_vms_slurp_edbg (abfd); @@ -2728,21 +2726,21 @@ _bfd_vms_slurp_object_records (bfd * abfd) ok = _bfd_vms_slurp_etbt (abfd); break; default: - ok = FALSE; + ok = false; } if (!ok) { vms_debug2 ((2, "slurp type %d failed\n", type)); - return FALSE; + return false; } } while (type != EOBJ__C_EEOM); - return TRUE; + return true; } /* Initialize private data */ -static bfd_boolean +static bool vms_initialize (bfd * abfd) { size_t amt; @@ -2750,7 +2748,7 @@ vms_initialize (bfd * abfd) amt = sizeof (struct vms_private_data_struct); abfd->tdata.any = bfd_zalloc (abfd, amt); if (abfd->tdata.any == NULL) - return FALSE; + return false; PRIV (recrd.file_format) = FF_UNKNOWN; @@ -2759,12 +2757,12 @@ vms_initialize (bfd * abfd) if (PRIV (stack) == NULL) goto error_ret1; - return TRUE; + return true; error_ret1: bfd_release (abfd, abfd->tdata.any); abfd->tdata.any = NULL; - return FALSE; + return false; } /* Free malloc'd memory. */ @@ -2941,7 +2939,7 @@ _bfd_vms_write_emh (bfd *abfd) /* Create module name from filename. */ if (bfd_get_filename (abfd) != 0) { - char *module = vms_get_module_name (bfd_get_filename (abfd), TRUE); + char *module = vms_get_module_name (bfd_get_filename (abfd), true); _bfd_vms_output_counted (recwr, module); free (module); } @@ -2975,7 +2973,7 @@ _bfd_vms_write_lmn (bfd *abfd, const char *name) /* Write eom record for bfd abfd. Return FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_write_eeom (bfd *abfd) { struct vms_rec_wr *recwr = &PRIV (recwr); @@ -2998,7 +2996,7 @@ _bfd_vms_write_eeom (bfd *abfd) if (section == 0) { bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } _bfd_vms_output_short (recwr, 0); _bfd_vms_output_long (recwr, (unsigned long) section->target_index); @@ -3008,7 +3006,7 @@ _bfd_vms_write_eeom (bfd *abfd) } _bfd_vms_output_end (abfd, recwr); - return TRUE; + return true; } static void * @@ -3096,7 +3094,7 @@ alpha_vms_append_extra_eisd (bfd *abfd, struct vms_internal_eisd_map *eisd) /* Create an EISD for shared image SHRIMG. Return FALSE in case of error. */ -static bfd_boolean +static bool alpha_vms_create_eisd_for_shared (bfd *abfd, bfd *shrimg) { struct vms_internal_eisd_map *eisd; @@ -3106,12 +3104,12 @@ alpha_vms_create_eisd_for_shared (bfd *abfd, bfd *shrimg) if (namlen + 5 > EISD__K_GBLNAMLEN) { /* Won't fit. */ - return FALSE; + return false; } eisd = bfd_alloc (abfd, sizeof (*eisd)); if (eisd == NULL) - return FALSE; + return false; /* Fill the fields. */ eisd->u.gbl_eisd.common.majorid = EISD__K_MAJORID; @@ -3134,25 +3132,25 @@ alpha_vms_create_eisd_for_shared (bfd *abfd, bfd *shrimg) /* Append it to the list. */ alpha_vms_append_extra_eisd (abfd, eisd); - return TRUE; + return true; } /* Create an EISD for section SEC. Return FALSE in case of failure. */ -static bfd_boolean +static bool alpha_vms_create_eisd_for_section (bfd *abfd, asection *sec) { struct vms_internal_eisd_map *eisd; /* Only for allocating section. */ if (!(sec->flags & SEC_ALLOC)) - return TRUE; + return true; BFD_ASSERT (vms_section_data (sec)->eisd == NULL); eisd = bfd_alloc (abfd, sizeof (*eisd)); if (eisd == NULL) - return FALSE; + return false; vms_section_data (sec)->eisd = eisd; /* Fill the fields. */ @@ -3196,13 +3194,13 @@ alpha_vms_create_eisd_for_section (bfd *abfd, asection *sec) PRIV (eisd_tail)->next = eisd; PRIV (eisd_tail) = eisd; - return TRUE; + return true; } /* Layout executable ABFD and write it to the disk. Return FALSE in case of failure. */ -static bfd_boolean +static bool alpha_vms_write_exec (bfd *abfd) { struct vms_eihd eihd; @@ -3279,7 +3277,7 @@ alpha_vms_write_exec (bfd *abfd) unsigned int len; /* Set module name. */ - module = vms_get_module_name (bfd_get_filename (abfd), TRUE); + module = vms_get_module_name (bfd_get_filename (abfd), true); len = strlen (module); if (len > sizeof (eihi->imgnam) - 1) len = sizeof (eihi->imgnam) - 1; @@ -3323,7 +3321,7 @@ alpha_vms_write_exec (bfd *abfd) for (sec = abfd->sections; sec; sec = sec->next) { if (!alpha_vms_create_eisd_for_section (abfd, sec)) - return FALSE; + return false; } /* Merge section EIDS which extra ones. */ @@ -3341,7 +3339,7 @@ alpha_vms_write_exec (bfd *abfd) { eisd = bfd_zalloc (abfd, sizeof (*eisd)); if (eisd == NULL) - return FALSE; + return false; eisd->u.eisd.majorid = 0; eisd->u.eisd.minorid = 0; eisd->u.eisd.eisdsize = 0; @@ -3425,7 +3423,7 @@ alpha_vms_write_exec (bfd *abfd) /* Write first block. */ bfd_putl32 (lnkflags, eihd.lnkflags); if (bfd_bwrite (&eihd, sizeof (eihd), abfd) != sizeof (eihd)) - return FALSE; + return false; /* Write remaining eisd. */ if (eisd != NULL) @@ -3446,7 +3444,7 @@ alpha_vms_write_exec (bfd *abfd) != eisd->file_pos / VMS_BLOCK_SIZE)) { if (bfd_bwrite (blk, sizeof (blk), abfd) != sizeof (blk)) - return FALSE; + return false; memset (blk, 0xff, sizeof (blk)); } @@ -3463,7 +3461,7 @@ alpha_vms_write_exec (bfd *abfd) if (sec->size == 0 || !(sec->flags & SEC_HAS_CONTENTS)) continue; if (bfd_bwrite (sec->contents, sec->size, abfd) != sec->size) - return FALSE; + return false; /* Pad. */ len = VMS_BLOCK_SIZE - sec->size % VMS_BLOCK_SIZE; @@ -3471,7 +3469,7 @@ alpha_vms_write_exec (bfd *abfd) { memset (blk, 0, len); if (bfd_bwrite (blk, len, abfd) != len) - return FALSE; + return false; } } @@ -3533,16 +3531,16 @@ alpha_vms_write_exec (bfd *abfd) _bfd_vms_output_end (abfd, recwr); if (!_bfd_vms_write_eeom (abfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Object write. */ /* Write section and symbol directory of bfd abfd. Return FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_write_egsd (bfd *abfd) { asection *section; @@ -3765,12 +3763,12 @@ _bfd_vms_write_egsd (bfd *abfd) _bfd_vms_output_alignment (recwr, 8); _bfd_vms_output_end (abfd, recwr); - return TRUE; + return true; } /* Write object header for bfd abfd. Return FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_write_ehdr (bfd *abfd) { asymbol *symbol; @@ -3819,7 +3817,7 @@ _bfd_vms_write_ehdr (bfd *abfd) 39); _bfd_vms_output_end (abfd, recwr); - return TRUE; + return true; } /* Part 4.6, relocations. */ @@ -3940,7 +3938,7 @@ etir_output_check (bfd *abfd, asection *section, bfd_vma vaddr, int checklen) /* Return whether RELOC must be deferred till the end. */ -static bfd_boolean +static bool defer_reloc_p (arelent *reloc) { switch (reloc->howto->type) @@ -3949,16 +3947,16 @@ defer_reloc_p (arelent *reloc) case ALPHA_R_LDA: case ALPHA_R_BSR: case ALPHA_R_BOH: - return TRUE; + return true; default: - return FALSE; + return false; } } /* Write section contents for bfd abfd. Return FALSE on error. */ -static bfd_boolean +static bool _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED) { asection *section; @@ -3982,7 +3980,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED) if (!section->contents) { bfd_set_error (bfd_error_no_contents); - return FALSE; + return false; } start_etir_or_etbt_record (abfd, section, 0); @@ -4030,7 +4028,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED) bfd_vma addr = rptr->address; asymbol *sym = *rptr->sym_ptr_ptr; asection *sec = sym->section; - bfd_boolean defer = defer_reloc_p (rptr); + bool defer = defer_reloc_p (rptr); unsigned int slen; if (pass2_in_progress) @@ -4266,7 +4264,7 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED) if (curr_addr > section->size) { _bfd_error_handler (_("size error in section %pA"), section); - return FALSE; + return false; } size = section->size - curr_addr; sto_imm (abfd, section, size, curr_data, curr_addr); @@ -4288,12 +4286,12 @@ _bfd_vms_write_etir (bfd * abfd, int objtype ATTRIBUTE_UNUSED) } _bfd_vms_output_alignment (recwr, 2); - return TRUE; + return true; } /* Write cached information into a file being written, at bfd_close. */ -static bfd_boolean +static bool alpha_vms_write_object_contents (bfd *abfd) { vms_debug2 ((1, "vms_write_object_contents (%p)\n", abfd)); @@ -4307,16 +4305,16 @@ alpha_vms_write_object_contents (bfd *abfd) if (abfd->section_count > 0) /* we have sections */ { if (!_bfd_vms_write_ehdr (abfd)) - return FALSE; + return false; if (!_bfd_vms_write_egsd (abfd)) - return FALSE; + return false; if (!_bfd_vms_write_etir (abfd, EOBJ__C_ETIR)) - return FALSE; + return false; if (!_bfd_vms_write_eeom (abfd)) - return FALSE; + return false; } } - return TRUE; + return true; } /* Debug stuff: nearest line. */ @@ -4340,7 +4338,7 @@ new_module (bfd *abfd) /* Parse debug info for a module and internalize it. */ -static bfd_boolean +static bool parse_module (bfd *abfd, struct module *module, unsigned char *ptr, int length) { @@ -4456,7 +4454,7 @@ parse_module (bfd *abfd, struct module *module, unsigned char *ptr, module->file_table_count * sizeof (struct fileinfo)); if (module->file_table == NULL) - return FALSE; + return false; } module->file_table [fileid].name = filename; @@ -4778,7 +4776,7 @@ parse_module (bfd *abfd, struct module *module, unsigned char *ptr, because parsing can be either performed at module creation or deferred until debug info is consumed. */ SET_MODULE_PARSED (module); - return TRUE; + return true; } /* Build the list of modules for the specified BFD. */ @@ -4867,7 +4865,7 @@ build_module_list (bfd *abfd) /* Calculate and return the name of the source file and the line nearest to the wanted location in the specified module. */ -static bfd_boolean +static bool module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, const char **file, const char **func, unsigned int *line) @@ -4875,7 +4873,7 @@ module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, struct funcinfo *funcinfo; struct lineinfo *lineinfo; struct srecinfo *srecinfo; - bfd_boolean ret = FALSE; + bool ret = false; /* Parse this module if that was not done at module creation. */ if (! IS_MODULE_PARSED (module)) @@ -4888,7 +4886,7 @@ module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, || (buffer = _bfd_malloc_and_read (abfd, size, size)) == NULL) { bfd_set_error (bfd_error_no_debug_section); - return FALSE; + return false; } ret = parse_module (abfd, module, buffer, size); @@ -4902,7 +4900,7 @@ module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, if (addr >= funcinfo->low && addr <= funcinfo->high) { *func = funcinfo->name; - ret = TRUE; + ret = true; break; } @@ -4923,7 +4921,7 @@ module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, *file = module->name; *line = lineinfo->line; } - return TRUE; + return true; } break; @@ -4936,7 +4934,7 @@ module_find_nearest_line (bfd *abfd, struct module *module, bfd_vma addr, return the name of the source file and the line nearest to the wanted location. */ -static bfd_boolean +static bool _bfd_vms_find_nearest_line (bfd *abfd, asymbol **symbols ATTRIBUTE_UNUSED, asection *section, @@ -4959,27 +4957,27 @@ _bfd_vms_find_nearest_line (bfd *abfd, /* We can't do anything if there is no DST (debug symbol table). */ if (PRIV (dst_section) == NULL) - return FALSE; + return false; /* Create the module list - if not already done. */ if (PRIV (modules) == NULL) { PRIV (modules) = build_module_list (abfd); if (PRIV (modules) == NULL) - return FALSE; + return false; } for (module = PRIV (modules); module; module = module->next) if (addr >= module->low && addr <= module->high) return module_find_nearest_line (abfd, module, addr, file, func, line); - return FALSE; + return false; } /* Canonicalizations. */ /* Set name, value, section and flags of SYM from E. */ -static bfd_boolean +static bool alpha_vms_convert_symbol (bfd *abfd, struct vms_symbol_entry *e, asymbol *sym) { flagword flags; @@ -5037,14 +5035,14 @@ alpha_vms_convert_symbol (bfd *abfd, struct vms_symbol_entry *e, asymbol *sym) break; default: - return FALSE; + return false; } sym->name = name; sym->section = sec; sym->flags = flags; sym->value = value; - return TRUE; + return true; } @@ -5109,7 +5107,7 @@ alpha_vms_canonicalize_symtab (bfd *abfd, asymbol **symbols) /* Read and convert relocations from ETIR. We do it once for all sections. */ -static bfd_boolean +static bool alpha_vms_slurp_relocs (bfd *abfd) { int cur_psect = -1; @@ -5118,14 +5116,14 @@ alpha_vms_slurp_relocs (bfd *abfd) /* We slurp relocs only once, for all sections. */ if (PRIV (reloc_done)) - return TRUE; - PRIV (reloc_done) = TRUE; + return true; + PRIV (reloc_done) = true; if (alpha_vms_canonicalize_symtab (abfd, NULL) < 0) - return FALSE; + return false; if (bfd_seek (abfd, 0, SEEK_SET) != 0) - return FALSE; + return false; while (1) { @@ -5187,7 +5185,7 @@ alpha_vms_slurp_relocs (bfd *abfd) /* xgettext:c-format */ (_("unknown reloc %s + %s"), _bfd_vms_etir_name (prev_cmd), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; } cur_psect = cur_psidx; vaddr = cur_addend; @@ -5205,7 +5203,7 @@ alpha_vms_slurp_relocs (bfd *abfd) /* xgettext:c-format */ (_("unknown reloc %s + %s"), _bfd_vms_etir_name (cmd), _bfd_vms_etir_name (ETIR__C_STA_LW)); - return FALSE; + return false; } } cur_addend = bfd_getl32 (ptr + 4); @@ -5220,7 +5218,7 @@ alpha_vms_slurp_relocs (bfd *abfd) /* xgettext:c-format */ (_("unknown reloc %s + %s"), _bfd_vms_etir_name (cmd), _bfd_vms_etir_name (ETIR__C_STA_QW)); - return FALSE; + return false; } cur_addend = bfd_getl64 (ptr + 4); prev_cmd = cmd; @@ -5237,7 +5235,7 @@ alpha_vms_slurp_relocs (bfd *abfd) _bfd_error_handler (_("unknown reloc %s + %s"), _bfd_vms_etir_name (prev_cmd), _bfd_vms_etir_name (ETIR__C_STO_LW)); - return FALSE; + return false; } reloc_code = BFD_RELOC_32; break; @@ -5250,7 +5248,7 @@ alpha_vms_slurp_relocs (bfd *abfd) _bfd_error_handler (_("unknown reloc %s + %s"), _bfd_vms_etir_name (prev_cmd), _bfd_vms_etir_name (ETIR__C_STO_QW)); - return FALSE; + return false; } reloc_code = BFD_RELOC_64; break; @@ -5262,7 +5260,7 @@ alpha_vms_slurp_relocs (bfd *abfd) _bfd_error_handler (_("unknown reloc %s + %s"), _bfd_vms_etir_name (prev_cmd), _bfd_vms_etir_name (ETIR__C_STO_OFF)); - return FALSE; + return false; } reloc_code = BFD_RELOC_64; break; @@ -5275,7 +5273,7 @@ alpha_vms_slurp_relocs (bfd *abfd) _bfd_error_handler (_("unknown reloc %s + %s"), _bfd_vms_etir_name (prev_cmd), _bfd_vms_etir_name (ETIR__C_OPR_ADD)); - return FALSE; + return false; } prev_cmd = ETIR__C_OPR_ADD; continue; @@ -5329,7 +5327,7 @@ alpha_vms_slurp_relocs (bfd *abfd) default: _bfd_error_handler (_("unknown reloc %s"), _bfd_vms_etir_name (cmd)); - return FALSE; + return false; } { @@ -5342,16 +5340,16 @@ alpha_vms_slurp_relocs (bfd *abfd) if (cur_psect < 0 || cur_psect > (int)PRIV (section_count)) { _bfd_error_handler (_("invalid section index in ETIR")); - return FALSE; + return false; } if (PRIV (sections) == NULL) - return FALSE; + return false; sec = PRIV (sections)[cur_psect]; if (sec == bfd_abs_section_ptr) { _bfd_error_handler (_("relocation for non-REL psect")); - return FALSE; + return false; } vms_sec = vms_section_data (sec); @@ -5371,7 +5369,7 @@ alpha_vms_slurp_relocs (bfd *abfd) sec->relocation = bfd_realloc_or_free (sec->relocation, vms_sec->reloc_max * sizeof (arelent)); if (sec->relocation == NULL) - return FALSE; + return false; } } reloc = &sec->relocation[sec->reloc_count]; @@ -5409,7 +5407,7 @@ alpha_vms_slurp_relocs (bfd *abfd) else if (cur_psidx >= 0) { if (PRIV (sections) == NULL || cur_psidx >= (int) PRIV (section_count)) - return FALSE; + return false; reloc->sym_ptr_ptr = PRIV (sections)[cur_psidx]->symbol_ptr_ptr; } @@ -5432,9 +5430,9 @@ alpha_vms_slurp_relocs (bfd *abfd) cur_psidx = -1; } } - vms_debug2 ((3, "alpha_vms_slurp_relocs: result = TRUE\n")); + vms_debug2 ((3, "alpha_vms_slurp_relocs: result = true\n")); - return TRUE; + return true; } /* Return the number of bytes required to store the relocation @@ -5514,30 +5512,30 @@ static reloc_howto_type alpha_howto_table[] = 0, /* Rightshift. */ 0, /* Size (0 = byte, 1 = short, 2 = long). */ 8, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "IGNORE", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0, /* Source mask */ 0, /* Dest mask. */ - TRUE), /* PC rel offset. */ + true), /* PC rel offset. */ /* A 64 bit reference to a symbol. */ HOWTO (ALPHA_R_REFQUAD, /* Type. */ 0, /* Rightshift. */ 4, /* Size (0 = byte, 1 = short, 2 = long). */ 64, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "REFQUAD", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ MINUS_ONE, /* Source mask. */ MINUS_ONE, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* A 21 bit branch. The native assembler generates these for branches within the text segment, and also fills in the PC @@ -5546,90 +5544,90 @@ static reloc_howto_type alpha_howto_table[] = 2, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 21, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "BRADDR", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0x1fffff, /* Source mask. */ 0x1fffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* A hint for a jump to a register. */ HOWTO (ALPHA_R_HINT, /* Type. */ 2, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 14, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "HINT", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0x3fff, /* Source mask. */ 0x3fff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* 16 bit PC relative offset. */ HOWTO (ALPHA_R_SREL16, /* Type. */ 0, /* Rightshift. */ 1, /* Size (0 = byte, 1 = short, 2 = long). */ 16, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "SREL16", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffff, /* Source mask. */ 0xffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* 32 bit PC relative offset. */ HOWTO (ALPHA_R_SREL32, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "SREL32", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffffffff, /* Source mask. */ 0xffffffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* A 64 bit PC relative offset. */ HOWTO (ALPHA_R_SREL64, /* Type. */ 0, /* Rightshift. */ 4, /* Size (0 = byte, 1 = short, 2 = long). */ 64, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_signed, /* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "SREL64", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ MINUS_ONE, /* Source mask. */ MINUS_ONE, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* Push a value on the reloc evaluation stack. */ HOWTO (ALPHA_R_OP_PUSH, /* Type. */ 0, /* Rightshift. */ 0, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "OP_PUSH", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Source mask. */ 0, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* Store the value from the stack at the given address. Store it in a bitfield of size r_size starting at bit position r_offset. */ @@ -5637,15 +5635,15 @@ static reloc_howto_type alpha_howto_table[] = 0, /* Rightshift. */ 4, /* Size (0 = byte, 1 = short, 2 = long). */ 64, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "OP_STORE", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Source mask. */ MINUS_ONE, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* Subtract the reloc address from the value on the top of the relocation stack. */ @@ -5653,15 +5651,15 @@ static reloc_howto_type alpha_howto_table[] = 0, /* Rightshift. */ 0, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "OP_PSUB", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Source mask. */ 0, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* Shift the value on the top of the relocation stack right by the given value. */ @@ -5669,60 +5667,60 @@ static reloc_howto_type alpha_howto_table[] = 0, /* Rightshift. */ 0, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "OP_PRSHIFT", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Source mask. */ 0, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* Hack. Linkage is done by linker. */ HOWTO (ALPHA_R_LINKAGE, /* Type. */ 0, /* Rightshift. */ 0, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "LINKAGE", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0, /* Source mask. */ 0, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* A 32 bit reference to a symbol. */ HOWTO (ALPHA_R_REFLONG, /* Type. */ 0, /* Rightshift. */ 2, /* Size (0 = byte, 1 = short, 2 = long). */ 32, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_bitfield, /* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "REFLONG", /* Name. */ - TRUE, /* Partial_inplace. */ + true, /* Partial_inplace. */ 0xffffffff, /* Source mask. */ 0xffffffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ /* A 64 bit reference to a procedure, written as 32 bit value. */ HOWTO (ALPHA_R_CODEADDR, /* Type. */ 0, /* Rightshift. */ 4, /* Size (0 = byte, 1 = short, 2 = long). */ 64, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_signed,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "CODEADDR", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Source mask. */ 0xffffffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ HOWTO (ALPHA_R_NOP, /* Type. */ 0, /* Rightshift. */ @@ -5731,57 +5729,57 @@ static reloc_howto_type alpha_howto_table[] = /* The following value must match that of ALPHA_R_BSR/ALPHA_R_BOH because the calculations for the 3 relocations are the same. See B.4.5.2 of the OpenVMS Linker Utility Manual. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "NOP", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Source mask. */ 0xffffffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ HOWTO (ALPHA_R_BSR, /* Type. */ 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "BSR", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Source mask. */ 0xffffffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ HOWTO (ALPHA_R_LDA, /* Type. */ 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long). */ 0, /* Bitsize. */ - FALSE, /* PC relative. */ + false, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "LDA", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Source mask. */ 0xffffffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ HOWTO (ALPHA_R_BOH, /* Type. */ 0, /* Rightshift. */ 3, /* Size (0 = byte, 1 = short, 2 = long, 3 = nil). */ 0, /* Bitsize. */ - TRUE, /* PC relative. */ + true, /* PC relative. */ 0, /* Bitpos. */ complain_overflow_dont,/* Complain_on_overflow. */ reloc_nil, /* Special_function. */ "BOH", /* Name. */ - FALSE, /* Partial_inplace. */ + false, /* Partial_inplace. */ 0xffffffff, /* Source mask. */ 0xffffffff, /* Dest mask. */ - FALSE), /* PC rel offset. */ + false), /* PC rel offset. */ }; /* Return a pointer to a howto structure which, when invoked, will perform @@ -5889,7 +5887,7 @@ alpha_vms_get_synthetic_symtab (bfd *abfd, l = strlen (name); sname = bfd_alloc (abfd, l + 5); if (sname == NULL) - return FALSE; + return false; memcpy (sname, name, l); memcpy (sname + l, "..en", 5); @@ -6634,8 +6632,8 @@ evax_bfd_print_etir (FILE *file, const char *name, static void evax_bfd_print_eobj (struct bfd *abfd, FILE *file) { - bfd_boolean is_first = TRUE; - bfd_boolean has_records = FALSE; + bool is_first = true; + bool has_records = false; while (1) { @@ -6649,7 +6647,7 @@ evax_bfd_print_eobj (struct bfd *abfd, FILE *file) { unsigned char buf[6]; - is_first = FALSE; + is_first = false; /* Read 6 bytes. */ if (bfd_bread (buf, sizeof (buf), abfd) != sizeof (buf)) @@ -6662,13 +6660,13 @@ evax_bfd_print_eobj (struct bfd *abfd, FILE *file) && bfd_getl16 (buf + 2) == EOBJ__C_EMH) { /* The format is raw: record-size, type, record-size. */ - has_records = TRUE; + has_records = true; pad_len = (rec_len + 1) & ~1U; hdr_size = 4; } else if (rec_len == EOBJ__C_EMH) { - has_records = FALSE; + has_records = false; pad_len = bfd_getl16 (buf + 2); hdr_size = 6; } @@ -8309,7 +8307,7 @@ evax_bfd_print_image (bfd *abfd, FILE *file) } } -static bfd_boolean +static bool vms_bfd_print_private_bfd_data (bfd *abfd, void *ptr) { FILE *file = (FILE *)ptr; @@ -8319,17 +8317,17 @@ vms_bfd_print_private_bfd_data (bfd *abfd, void *ptr) else { if (bfd_seek (abfd, 0, SEEK_SET)) - return FALSE; + return false; evax_bfd_print_eobj (abfd, file); } - return TRUE; + return true; } /* Linking. */ /* Slurp ETIR/EDBG/ETBT VMS object records. */ -static bfd_boolean +static bool alpha_vms_read_sections_content (bfd *abfd, struct bfd_link_info *info) { asection *cur_section; @@ -8338,7 +8336,7 @@ alpha_vms_read_sections_content (bfd *abfd, struct bfd_link_info *info) file_ptr dst_offset; if (bfd_seek (abfd, 0, SEEK_SET) != 0) - return FALSE; + return false; cur_section = NULL; cur_offset = 0; @@ -8363,13 +8361,13 @@ alpha_vms_read_sections_content (bfd *abfd, struct bfd_link_info *info) while (1) { int type; - bfd_boolean res; + bool res; type = _bfd_vms_get_object_record (abfd); if (type < 0) { vms_debug2 ((2, "next_record failed\n")); - return FALSE; + return false; } switch (type) { @@ -8390,14 +8388,14 @@ alpha_vms_read_sections_content (bfd *abfd, struct bfd_link_info *info) dst_offset = PRIV (image_offset); break; case EOBJ__C_EEOM: - return TRUE; + return true; default: continue; } if (!res) { vms_debug2 ((2, "slurp eobj type %d failed\n", type)); - return FALSE; + return false; } } } @@ -8411,7 +8409,7 @@ alpha_vms_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, /* Add a linkage pair fixup at address SECT + OFFSET to SHLIB. */ -static bfd_boolean +static bool alpha_vms_add_fixup_lp (struct bfd_link_info *info, bfd *src, bfd *shlib) { struct alpha_vms_shlib_el *sl; @@ -8421,18 +8419,18 @@ alpha_vms_add_fixup_lp (struct bfd_link_info *info, bfd *src, bfd *shlib) sl = &VEC_EL (alpha_vms_link_hash (info)->shrlibs, struct alpha_vms_shlib_el, PRIV2 (shlib, shr_index)); - sl->has_fixups = TRUE; + sl->has_fixups = true; p = VEC_APPEND (sl->lp, bfd_vma); if (p == NULL) - return FALSE; + return false; *p = sect->output_section->vma + sect->output_offset + offset; sect->output_section->flags |= SEC_RELOC; - return TRUE; + return true; } /* Add a code address fixup at address SECT + OFFSET to SHLIB. */ -static bfd_boolean +static bool alpha_vms_add_fixup_ca (struct bfd_link_info *info, bfd *src, bfd *shlib) { struct alpha_vms_shlib_el *sl; @@ -8442,18 +8440,18 @@ alpha_vms_add_fixup_ca (struct bfd_link_info *info, bfd *src, bfd *shlib) sl = &VEC_EL (alpha_vms_link_hash (info)->shrlibs, struct alpha_vms_shlib_el, PRIV2 (shlib, shr_index)); - sl->has_fixups = TRUE; + sl->has_fixups = true; p = VEC_APPEND (sl->ca, bfd_vma); if (p == NULL) - return FALSE; + return false; *p = sect->output_section->vma + sect->output_offset + offset; sect->output_section->flags |= SEC_RELOC; - return TRUE; + return true; } /* Add a quad word relocation fixup at address SECT + OFFSET to SHLIB. */ -static bfd_boolean +static bool alpha_vms_add_fixup_qr (struct bfd_link_info *info, bfd *src, bfd *shlib, bfd_vma vec) { @@ -8464,37 +8462,37 @@ alpha_vms_add_fixup_qr (struct bfd_link_info *info, bfd *src, sl = &VEC_EL (alpha_vms_link_hash (info)->shrlibs, struct alpha_vms_shlib_el, PRIV2 (shlib, shr_index)); - sl->has_fixups = TRUE; + sl->has_fixups = true; r = VEC_APPEND (sl->qr, struct alpha_vms_vma_ref); if (r == NULL) - return FALSE; + return false; r->vma = sect->output_section->vma + sect->output_offset + offset; r->ref = vec; sect->output_section->flags |= SEC_RELOC; - return TRUE; + return true; } -static bfd_boolean +static bool alpha_vms_add_fixup_lr (struct bfd_link_info *info ATTRIBUTE_UNUSED, unsigned int shr ATTRIBUTE_UNUSED, bfd_vma vec ATTRIBUTE_UNUSED) { /* Not yet supported. */ - return FALSE; + return false; } /* Add relocation. FIXME: Not yet emitted. */ -static bfd_boolean +static bool alpha_vms_add_lw_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED) { - return FALSE; + return false; } -static bfd_boolean +static bool alpha_vms_add_qw_reloc (struct bfd_link_info *info ATTRIBUTE_UNUSED) { - return FALSE; + return false; } static struct bfd_hash_entry * @@ -8571,7 +8569,7 @@ alpha_vms_bfd_link_hash_table_create (bfd *abfd) return &ret->root; } -static bfd_boolean +static bool alpha_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { unsigned int i; @@ -8584,14 +8582,14 @@ alpha_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) asymbol sym; if (!alpha_vms_convert_symbol (abfd, e, &sym)) - return FALSE; + return false; if ((e->flags & EGSY__V_DEF) && abfd->selective_search) { /* In selective_search mode, only add definition that are required. */ h = (struct alpha_vms_link_hash_entry *)bfd_link_hash_lookup - (info->hash, sym.name, FALSE, FALSE, FALSE); + (info->hash, sym.name, false, false, false); if (h == NULL || h->root.type != bfd_link_hash_undefined) continue; } @@ -8601,8 +8599,8 @@ alpha_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) h_root = (struct bfd_link_hash_entry *) h; if (!_bfd_generic_link_add_one_symbol (info, abfd, sym.name, sym.flags, sym.section, sym.value, NULL, - FALSE, FALSE, &h_root)) - return FALSE; + false, false, &h_root)) + return false; h = (struct alpha_vms_link_hash_entry *) h_root; if ((e->flags & EGSY__V_DEF) @@ -8622,7 +8620,7 @@ alpha_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) shlib = VEC_APPEND (alpha_vms_link_hash (info)->shrlibs, struct alpha_vms_shlib_el); if (shlib == NULL) - return FALSE; + return false; shlib->abfd = abfd; VEC_INIT (shlib->ca); VEC_INIT (shlib->lp); @@ -8630,10 +8628,10 @@ alpha_vms_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) PRIV (shr_index) = VEC_COUNT (alpha_vms_link_hash (info)->shrlibs) - 1; } - return TRUE; + return true; } -static bfd_boolean +static bool alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) { int pass; @@ -8644,7 +8642,7 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) if (info->output_bfd->xvec != abfd->xvec) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } /* The archive_pass field in the archive itself is used to @@ -8691,7 +8689,7 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) element = bfd_get_elt_at_index (abfd, symidx); if (element == NULL) - return FALSE; + return false; if (element->archive_pass == -1 || element->archive_pass == pass) { @@ -8702,7 +8700,7 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) if (! bfd_check_format (element, bfd_object)) { element->archive_pass = -1; - return FALSE; + return false; } orig_element = element; @@ -8712,7 +8710,7 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) if (element == NULL || !bfd_check_format (element, bfd_object)) { orig_element->archive_pass = -1; - return FALSE; + return false; } } @@ -8723,15 +8721,15 @@ alpha_vms_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) ->add_archive_element) (info, element, h->root.string, &element)) continue; if (!alpha_vms_link_add_object_symbols (element, info)) - return FALSE; + return false; orig_element->archive_pass = pass; } - return TRUE; + return true; } -static bfd_boolean +static bool alpha_vms_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -8748,11 +8746,11 @@ alpha_vms_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) break; default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } -static bfd_boolean +static bool alpha_vms_build_fixups (struct bfd_link_info *info) { struct alpha_vms_link_hash_table *t = alpha_vms_link_hash (info); @@ -8810,7 +8808,7 @@ alpha_vms_build_fixups (struct bfd_link_info *info) /* Finish now if there is no content. */ if (ca_sz + lp_sz + qr_sz == 0) - return TRUE; + return true; /* Add an eicp entry for the fixup itself. */ chgprt_num = 1; @@ -8829,7 +8827,7 @@ alpha_vms_build_fixups (struct bfd_link_info *info) sz = (sz + VMS_BLOCK_SIZE - 1) & ~(VMS_BLOCK_SIZE - 1); content = bfd_zalloc (info->output_bfd, sz); if (content == NULL) - return FALSE; + return false; sec = alpha_vms_link_hash (info)->fixup; sec->contents = content; @@ -9017,13 +9015,13 @@ alpha_vms_build_fixups (struct bfd_link_info *info) off += sizeof (struct vms_eicp); } - return TRUE; + return true; } /* Called by bfd_hash_traverse to fill the symbol table. Return FALSE in case of failure. */ -static bfd_boolean +static bool alpha_vms_link_output_symbol (struct bfd_hash_entry *bh, void *infov) { struct bfd_link_hash_entry *hc = (struct bfd_link_hash_entry *) bh; @@ -9035,19 +9033,19 @@ alpha_vms_link_output_symbol (struct bfd_hash_entry *bh, void *infov) { hc = hc->u.i.link; if (hc->type == bfd_link_hash_new) - return TRUE; + return true; } h = (struct alpha_vms_link_hash_entry *) hc; switch (h->root.type) { case bfd_link_hash_undefined: - return TRUE; + return true; case bfd_link_hash_new: case bfd_link_hash_warning: abort (); case bfd_link_hash_undefweak: - return TRUE; + return true; case bfd_link_hash_defined: case bfd_link_hash_defweak: { @@ -9055,23 +9053,23 @@ alpha_vms_link_output_symbol (struct bfd_hash_entry *bh, void *infov) /* FIXME: this is certainly a symbol from a dynamic library. */ if (bfd_is_abs_section (sec)) - return TRUE; + return true; if (sec->owner->flags & DYNAMIC) - return TRUE; + return true; } break; case bfd_link_hash_common: break; case bfd_link_hash_indirect: - return TRUE; + return true; } /* Do not write not kept symbols. */ if (info->strip == strip_some && bfd_hash_lookup (info->keep_hash, h->root.root.string, - FALSE, FALSE) != NULL) - return TRUE; + false, false) != NULL) + return true; if (h->sym == NULL) { @@ -9099,12 +9097,12 @@ alpha_vms_link_output_symbol (struct bfd_hash_entry *bh, void *infov) sym = h->sym; if (!add_symbol_entry (info->output_bfd, sym)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { asection *o; @@ -9121,7 +9119,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) /* FIXME: we do not yet support relocatable link. It is not obvious how to do it for debug infos. */ (*info->callbacks->einfo)(_("%P: relocatable link is not supported\n")); - return FALSE; + return false; } abfd->outsymbols = NULL; @@ -9131,7 +9129,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) for (o = abfd->sections; o != NULL; o = o->next) for (p = o->map_head.link_order; p != NULL; p = p->next) if (p->type == bfd_indirect_link_order) - p->u.indirect.section->linker_mark = TRUE; + p->u.indirect.section->linker_mark = true; #if 0 /* Handle all the link order information for the sections. */ @@ -9218,7 +9216,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) i = 0; PRIV (transfer_address[i++]) = 0xffffffff00000340ULL; /* SYS$IMGACT */ - h = bfd_link_hash_lookup (info->hash, "LIB$INITIALIZE", FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, "LIB$INITIALIZE", false, false, true); if (h != NULL && h->type == bfd_link_hash_defined) PRIV (transfer_address[i++]) = alpha_vms_get_sym_value (h->u.def.section, h->u.def.value); @@ -9237,7 +9235,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { o->contents = bfd_alloc (abfd, o->size); if (o->contents == NULL) - return FALSE; + return false; } if (o->flags & SEC_LOAD) { @@ -9256,7 +9254,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) (info->output_bfd, "$FIXUP$", SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS | SEC_LINKER_CREATED); if (fixupsec == NULL) - return FALSE; + return false; last_addr = (last_addr + 0xffff) & ~0xffff; fixupsec->vma = last_addr; @@ -9275,7 +9273,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) (info->output_bfd, "$DMT$", SEC_DEBUGGING | SEC_HAS_CONTENTS | SEC_LINKER_CREATED); if (dmt == NULL) - return FALSE; + return false; } else dmt = NULL; @@ -9290,7 +9288,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) } if (!alpha_vms_read_sections_content (sub, info)) - return FALSE; + return false; } /* Handle all the link order information for the sections. @@ -9304,13 +9302,13 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) case bfd_section_reloc_link_order: case bfd_symbol_reloc_link_order: abort (); - return FALSE; + return false; case bfd_indirect_link_order: /* Already done. */ break; default: if (! _bfd_default_link_order (abfd, info, o, p)) - return FALSE; + return false; break; } } @@ -9318,7 +9316,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) /* Compute fixups. */ if (!alpha_vms_build_fixups (info)) - return FALSE; + return false; /* Compute the DMT. */ if (dmt != NULL) @@ -9384,7 +9382,7 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { contents = bfd_zalloc (info->output_bfd, off); if (contents == NULL) - return FALSE; + return false; dmt->contents = contents; dmt->size = off; } @@ -9395,14 +9393,14 @@ alpha_vms_bfd_final_link (bfd *abfd, struct bfd_link_info *info) } } - return TRUE; + return true; } /* Read the contents of a section. buf points to a buffer of buf_size bytes to be filled with section data (starting at offset into section) */ -static bfd_boolean +static bool alpha_vms_get_section_contents (bfd *abfd, asection *section, void *buf, file_ptr offset, bfd_size_type count) @@ -9419,7 +9417,7 @@ alpha_vms_get_section_contents (bfd *abfd, asection *section, || offset + count > section->size) { bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* If the section is already in memory, just copy it. */ @@ -9427,10 +9425,10 @@ alpha_vms_get_section_contents (bfd *abfd, asection *section, { BFD_ASSERT (section->contents != NULL); memcpy (buf, section->contents + offset, count); - return TRUE; + return true; } if (section->size == 0) - return TRUE; + return true; /* Alloc in memory and read ETIRs. */ for (sec = abfd->sections; sec; sec = sec->next) @@ -9441,22 +9439,22 @@ alpha_vms_get_section_contents (bfd *abfd, asection *section, { sec->contents = bfd_alloc (abfd, sec->size); if (sec->contents == NULL) - return FALSE; + return false; } } if (!alpha_vms_read_sections_content (abfd, NULL)) - return FALSE; + return false; for (sec = abfd->sections; sec; sec = sec->next) if (sec->contents) sec->flags |= SEC_IN_MEMORY; memcpy (buf, section->contents + offset, count); - return TRUE; + return true; } /* Set the format of a file being written. */ -static bfd_boolean +static bool alpha_vms_mkobject (bfd * abfd) { const bfd_arch_info_type *arch; @@ -9464,22 +9462,22 @@ alpha_vms_mkobject (bfd * abfd) vms_debug2 ((1, "alpha_vms_mkobject (%p)\n", abfd)); if (!vms_initialize (abfd)) - return FALSE; + return false; PRIV (recwr.buf) = bfd_alloc (abfd, MAX_OUTREC_SIZE); if (PRIV (recwr.buf) == NULL) - return FALSE; + return false; arch = bfd_scan_arch ("alpha"); if (arch == 0) { bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } abfd->arch_info = arch; - return TRUE; + return true; } @@ -9487,13 +9485,13 @@ alpha_vms_mkobject (bfd * abfd) /* Called when the BFD is being closed to do any necessary cleanup. */ -static bfd_boolean +static bool vms_close_and_cleanup (bfd * abfd) { vms_debug2 ((1, "vms_close_and_cleanup (%p)\n", abfd)); if (abfd == NULL || abfd->tdata.any == NULL) - return TRUE; + return true; if (abfd->format == bfd_object) { @@ -9505,9 +9503,9 @@ vms_close_and_cleanup (bfd * abfd) /* Last step on VMS is to convert the file to variable record length format. */ if (!bfd_cache_close (abfd)) - return FALSE; + return false; if (!_bfd_vms_convert_to_var_unix_filename (abfd->filename)) - return FALSE; + return false; } #endif } @@ -9517,7 +9515,7 @@ vms_close_and_cleanup (bfd * abfd) /* Called when a new section is created. */ -static bfd_boolean +static bool vms_new_section_hook (bfd * abfd, asection *section) { size_t amt; @@ -9526,14 +9524,14 @@ vms_new_section_hook (bfd * abfd, asection *section) abfd, section->index, section->name)); if (!bfd_set_section_alignment (section, 0)) - return FALSE; + return false; vms_debug2 ((7, "%u: %s\n", section->index, section->name)); amt = sizeof (struct vms_section_data_struct); section->used_by_bfd = bfd_zalloc (abfd, amt); if (section->used_by_bfd == NULL) - return FALSE; + return false; /* Create the section symbol. */ return _bfd_generic_new_section_hook (abfd, section); @@ -9632,7 +9630,7 @@ vms_get_symbol_info (bfd * abfd ATTRIBUTE_UNUSED, /* Return TRUE if the given symbol sym in the BFD abfd is a compiler generated local label, else return FALSE. */ -static bfd_boolean +static bool vms_bfd_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, const char *name) { @@ -9650,7 +9648,7 @@ vms_bfd_is_local_label_name (bfd * abfd ATTRIBUTE_UNUSED, SEC_HAS_CONTENTS attribute, so nothing can be written to it. o and some more too */ -static bfd_boolean +static bool _bfd_vms_set_section_contents (bfd * abfd, asection *section, const void * location, @@ -9661,25 +9659,25 @@ _bfd_vms_set_section_contents (bfd * abfd, { section->contents = bfd_alloc (abfd, section->size); if (section->contents == NULL) - return FALSE; + return false; memcpy (section->contents + offset, location, (size_t) count); } - return TRUE; + return true; } /* Set the architecture and machine type in BFD abfd to arch and mach. Find the correct pointer to a structure and insert it into the arch_info pointer. */ -static bfd_boolean +static bool alpha_vms_set_arch_mach (bfd *abfd, enum bfd_architecture arch, unsigned long mach) { if (arch != bfd_arch_alpha && arch != bfd_arch_unknown) - return FALSE; + return false; return bfd_default_set_arch_mach (abfd, arch, mach); } diff --git a/bfd/vms-lib.c b/bfd/vms-lib.c index 72038b4c89..dc23df3919 100644 --- a/bfd/vms-lib.c +++ b/bfd/vms-lib.c @@ -125,12 +125,12 @@ struct carsym_mem /* If true, the table was reallocated on the heap. If false, it is still in the BFD's objalloc. */ - bfd_boolean realloced; + bool realloced; }; /* Simply add a name to the index. */ -static bfd_boolean +static bool vms_add_index (struct carsym_mem *cs, char *name, unsigned int idx_vbn, unsigned int idx_off) { @@ -142,7 +142,7 @@ vms_add_index (struct carsym_mem *cs, char *name, if (cs->max > -33u / 2 || cs->max >= cs->limit) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } cs->max = 2 * cs->max + 32; if (cs->max > cs->limit) @@ -150,14 +150,14 @@ vms_add_index (struct carsym_mem *cs, char *name, if (_bfd_mul_overflow (cs->max, sizeof (struct carsym), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } if (!cs->realloced) { n = bfd_malloc (amt); if (n == NULL) - return FALSE; + return false; memcpy (n, cs->idx, cs->nbr * sizeof (struct carsym)); /* And unfortunately we can't free cs->idx. */ } @@ -165,21 +165,21 @@ vms_add_index (struct carsym_mem *cs, char *name, { n = bfd_realloc_or_free (cs->idx, amt); if (n == NULL) - return FALSE; + return false; } cs->idx = n; - cs->realloced = TRUE; + cs->realloced = true; } cs->idx[cs->nbr].file_offset = (idx_vbn - 1) * VMS_BLOCK_SIZE + idx_off; cs->idx[cs->nbr].name = name; cs->nbr++; - return TRUE; + return true; } /* Follow all member of a lns list (pointed by RFA) and add indexes for NAME. Return FALSE in case of error. */ -static bfd_boolean +static bool vms_add_indexes_from_list (bfd *abfd, struct carsym_mem *cs, char *name, struct vms_rfa *rfa) { @@ -191,18 +191,18 @@ vms_add_indexes_from_list (bfd *abfd, struct carsym_mem *cs, char *name, { vbn = bfd_getl32 (rfa->vbn); if (vbn == 0) - return TRUE; + return true; /* Read the LHS. */ off = (vbn - 1) * VMS_BLOCK_SIZE + bfd_getl16 (rfa->offset); if (bfd_seek (abfd, off, SEEK_SET) != 0 || bfd_bread (&lns, sizeof (lns), abfd) != sizeof (lns)) - return FALSE; + return false; if (!vms_add_index (cs, name, bfd_getl32 (lns.modrfa.vbn), bfd_getl16 (lns.modrfa.offset))) - return FALSE; + return false; rfa = &lns.nxtrfa; } @@ -210,7 +210,7 @@ vms_add_indexes_from_list (bfd *abfd, struct carsym_mem *cs, char *name, /* Read block VBN from ABFD and store it into BLK. Return FALSE in case of error. */ -static bfd_boolean +static bool vms_read_block (bfd *abfd, unsigned int vbn, void *blk) { file_ptr off; @@ -218,14 +218,14 @@ vms_read_block (bfd *abfd, unsigned int vbn, void *blk) off = (vbn - 1) * VMS_BLOCK_SIZE; if (bfd_seek (abfd, off, SEEK_SET) != 0 || bfd_bread (blk, VMS_BLOCK_SIZE, abfd) != VMS_BLOCK_SIZE) - return FALSE; + return false; - return TRUE; + return true; } /* Write the content of BLK to block VBN of ABFD. Return FALSE in case of error. */ -static bfd_boolean +static bool vms_write_block (bfd *abfd, unsigned int vbn, void *blk) { file_ptr off; @@ -233,15 +233,15 @@ vms_write_block (bfd *abfd, unsigned int vbn, void *blk) off = (vbn - 1) * VMS_BLOCK_SIZE; if (bfd_seek (abfd, off, SEEK_SET) != 0 || bfd_bwrite (blk, VMS_BLOCK_SIZE, abfd) != VMS_BLOCK_SIZE) - return FALSE; + return false; - return TRUE; + return true; } /* Read index block VBN and put the entry in **IDX (which is updated). If the entry is indirect, recurse. */ -static bfd_boolean +static bool vms_traverse_index (bfd *abfd, unsigned int vbn, struct carsym_mem *cs, unsigned int recur_count) { @@ -254,19 +254,19 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct carsym_mem *cs, if (recur_count == 100) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } /* Read the index block. */ BFD_ASSERT (sizeof (indexdef) == VMS_BLOCK_SIZE); if (!vms_read_block (abfd, vbn, &indexdef)) - return FALSE; + return false; /* Traverse it. */ p = &indexdef.keys[0]; n = bfd_getl16 (indexdef.used); if (n > sizeof (indexdef.keys)) - return FALSE; + return false; endp = p + n; while (p < endp) { @@ -302,22 +302,22 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct carsym_mem *cs, keyname = ridx->keyname; } else - return FALSE; + return false; /* Illegal value. */ if (idx_vbn == 0) - return FALSE; + return false; /* Point to the next index entry. */ p = keyname + keylen; if (p > endp) - return FALSE; + return false; if (idx_off == RFADEF__C_INDEX) { /* Indirect entry. Recurse. */ if (!vms_traverse_index (abfd, idx_vbn, cs, recur_count + 1)) - return FALSE; + return false; } else { @@ -335,14 +335,14 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct carsym_mem *cs, /* Sanity check. */ if (keylen != sizeof (struct vms_kbn)) - return FALSE; + return false; kbn = (struct vms_kbn *)keyname; keylen = bfd_getl16 (kbn->keylen); name = bfd_alloc (abfd, keylen + 1); if (name == NULL) - return FALSE; + return false; kvbn = bfd_getl32 (kbn->rfa.vbn); koff = bfd_getl16 (kbn->rfa.offset); @@ -352,18 +352,18 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct carsym_mem *cs, unsigned int klen; if (!vms_read_block (abfd, kvbn, kblk)) - return FALSE; + return false; if (koff > sizeof (kblk) - sizeof (struct vms_kbn)) - return FALSE; + return false; kbn = (struct vms_kbn *)(kblk + koff); klen = bfd_getl16 (kbn->keylen); if (klen > sizeof (kblk) - koff) - return FALSE; + return false; kvbn = bfd_getl32 (kbn->rfa.vbn); koff = bfd_getl16 (kbn->rfa.offset); if (noff + klen > keylen) - return FALSE; + return false; memcpy (name + noff, kbn + 1, klen); noff += klen; } @@ -371,14 +371,14 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct carsym_mem *cs, /* Sanity check. */ if (noff != keylen) - return FALSE; + return false; } else { /* Usual key name. */ name = bfd_alloc (abfd, keylen + 1); if (name == NULL) - return FALSE; + return false; memcpy (name, keyname, keylen); } @@ -392,27 +392,27 @@ vms_traverse_index (bfd *abfd, unsigned int vbn, struct carsym_mem *cs, off = (idx_vbn - 1) * VMS_BLOCK_SIZE + idx_off; if (bfd_seek (abfd, off, SEEK_SET) != 0 || bfd_bread (&lhs, sizeof (lhs), abfd) != sizeof (lhs)) - return FALSE; + return false; /* These extra entries may cause reallocation of CS. */ if (!vms_add_indexes_from_list (abfd, cs, name, &lhs.ng_g_rfa)) - return FALSE; + return false; if (!vms_add_indexes_from_list (abfd, cs, name, &lhs.ng_wk_rfa)) - return FALSE; + return false; if (!vms_add_indexes_from_list (abfd, cs, name, &lhs.g_g_rfa)) - return FALSE; + return false; if (!vms_add_indexes_from_list (abfd, cs, name, &lhs.g_wk_rfa)) - return FALSE; + return false; } else { if (!vms_add_index (cs, name, idx_vbn, idx_off)) - return FALSE; + return false; } } } - return TRUE; + return true; } /* Read index #IDX, which must have NBREL entries. */ @@ -443,7 +443,7 @@ vms_lib_read_index (bfd *abfd, int idx, unsigned int *nbrel) csm.nbr = 0; csm.max = *nbrel; csm.limit = -1u; - csm.realloced = FALSE; + csm.realloced = false; if (filesize != 0) { /* Put an upper bound based on a file full of single char keys. @@ -691,9 +691,9 @@ _bfd_vms_lib_archive_p (bfd *abfd, enum vms_lib_kind kind) } /* The map is always present. Also mark shared image library. */ - abfd->has_armap = TRUE; + abfd->has_armap = true; if (tdata->type == LBR__C_TYP_ESHSTB || tdata->type == LBR__C_TYP_ISHSTB) - abfd->is_thin_archive = TRUE; + abfd->is_thin_archive = true; return _bfd_no_cleanup; @@ -729,14 +729,14 @@ _bfd_vms_lib_txt_archive_p (bfd *abfd) /* Standard bfd function. */ -static bfd_boolean +static bool _bfd_vms_lib_mkarchive (bfd *abfd, enum vms_lib_kind kind) { struct lib_tdata *tdata; tdata = (struct lib_tdata *) bfd_zalloc (abfd, sizeof (struct lib_tdata)); if (tdata == NULL) - return FALSE; + return false; abfd->tdata.any = (void *)tdata; vms_get_time (&tdata->credat_hi, &tdata->credat_lo); @@ -764,16 +764,16 @@ _bfd_vms_lib_mkarchive (bfd *abfd, enum vms_lib_kind kind) tdata->artdata.symdefs = NULL; tdata->cache = NULL; - return TRUE; + return true; } -bfd_boolean +bool _bfd_vms_lib_alpha_mkarchive (bfd *abfd) { return _bfd_vms_lib_mkarchive (abfd, vms_lib_alpha); } -bfd_boolean +bool _bfd_vms_lib_ia64_mkarchive (bfd *abfd) { return _bfd_vms_lib_mkarchive (abfd, vms_lib_ia64); @@ -878,7 +878,7 @@ vms_lib_btell (struct bfd *abfd) /* Read the header of the next data block if all bytes of the current block have been read. */ -static bfd_boolean +static bool vms_lib_read_block (struct bfd *abfd) { struct vms_lib_iovec *vec = (struct vms_lib_iovec *) abfd->iostream; @@ -889,13 +889,13 @@ vms_lib_read_block (struct bfd *abfd) /* Read next block. */ if (bfd_seek (abfd->my_archive, vec->next_block, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bread (hdr, sizeof (hdr), abfd->my_archive) != sizeof (hdr)) - return FALSE; + return false; vec->next_block = (bfd_getl32 (hdr + 2) - 1) * VMS_BLOCK_SIZE; vec->blk_off = sizeof (hdr); } - return TRUE; + return true; } /* Read NBYTES from ABFD into BUF if not NULL. If BUF is NULL, bytes are @@ -1284,7 +1284,7 @@ static const struct bfd_iovec vms_lib_iovec = { /* Open a library module. FILEPOS is the position of the module header. */ -static bfd_boolean +static bool vms_lib_bopen (bfd *el, file_ptr filepos) { struct vms_lib_iovec *vec; @@ -1296,7 +1296,7 @@ vms_lib_bopen (bfd *el, file_ptr filepos) /* Allocate and initialized the iovec. */ vec = bfd_zalloc (el, sizeof (*vec)); if (vec == NULL) - return FALSE; + return false; el->iostream = vec; el->iovec = &vms_lib_iovec; @@ -1308,34 +1308,34 @@ vms_lib_bopen (bfd *el, file_ptr filepos) vec->next_block = filepos & ~(VMS_BLOCK_SIZE - 1); vec->blk_off = DATA__LENGTH; if (!vms_lib_read_block (el)) - return FALSE; + return false; /* Prepare to read the first record. */ vec->blk_off = filepos & (VMS_BLOCK_SIZE - 1); vec->rec_rem = 0; if (bfd_seek (el->my_archive, filepos, SEEK_SET) != 0) - return FALSE; + return false; /* Read Record length + MHD + align byte. */ len = tdata->mhd_size; if (vms_lib_bread_raw (el, buf, 2) != 2) - return FALSE; + return false; if (bfd_getl16 (buf) != len) - return FALSE; + return false; len = (len + 1) & ~1; BFD_ASSERT (len <= sizeof (buf)); if (vms_lib_bread_raw (el, buf, len) != len) - return FALSE; + return false; /* Get info from mhd. */ mhd = (struct vms_mhd *)buf; /* Check id. */ if (mhd->id != MHD__C_MHDID) - return FALSE; + return false; if (len >= MHD__C_MHDLEN + 1) el->selective_search = (mhd->objstat & MHD__M_SELSRC) ? 1 : 0; el->mtime = vms_rawtime_to_time_t (mhd->datim); - el->mtime_set = TRUE; + el->mtime_set = true; /* Reinit the iovec so that seek() will point to the first record after the mhd. */ @@ -1354,7 +1354,7 @@ vms_lib_bopen (bfd *el, file_ptr filepos) if (vec->dcx_buf == NULL) return -1; } - return TRUE; + return true; } /* Get member MODIDX. Return NULL in case of error. */ @@ -1424,7 +1424,7 @@ _bfd_vms_lib_get_module (bfd *abfd, unsigned int modidx) if (tdata->mhd_size >= offsetof (struct vms_mhd, objstat) + 1) res->selective_search = (mhd->objstat & MHD__M_SELSRC) ? 1 : 0; res->mtime = vms_rawtime_to_time_t (mhd->datim); - res->mtime_set = TRUE; + res->mtime_set = true; arelt->parsed_size = bfd_getl32 (mhd->modsize); @@ -1642,7 +1642,7 @@ lib_index_cmp (const void *lv, const void *rv) /* Get the size of an index entry. */ static unsigned int -get_idxlen (struct lib_index *idx, bfd_boolean is_elfidx) +get_idxlen (struct lib_index *idx, bool is_elfidx) { if (is_elfidx) { @@ -1666,10 +1666,10 @@ get_idxlen (struct lib_index *idx, bfd_boolean is_elfidx) IS_ELFIDX is true for elfidx (ie ia64) indexes layout. Return TRUE on success. */ -static bfd_boolean +static bool vms_write_index (bfd *abfd, struct lib_index *idx, unsigned int nbr, unsigned int *vbn, - unsigned int *topvbn, bfd_boolean is_elfidx) + unsigned int *topvbn, bool is_elfidx) { /* The index is organized as a tree. This function implements a naive algorithm to balance the tree: it fills the leaves, and create a new @@ -1700,7 +1700,7 @@ vms_write_index (bfd *abfd, /* No entries. Very easy to handle. */ if (topvbn != NULL) *topvbn = 0; - return TRUE; + return true; } if (abfd == NULL) @@ -1745,13 +1745,13 @@ vms_write_index (bfd *abfd, if (kbn_vbn != 0) { if (!vms_write_block (abfd, kbn_vbn, kbn_blk)) - return FALSE; + return false; } else { kbn_blk = bfd_malloc (VMS_BLOCK_SIZE); if (kbn_blk == NULL) - return FALSE; + return false; } *(unsigned short *)kbn_blk = 0; } @@ -1863,7 +1863,7 @@ vms_write_index (bfd *abfd, { bfd_putl16 (blk[j].len + blk[j].lastlen, rblk[j]->used); if (!vms_write_block (abfd, blk[j].vbn, rblk[j])) - return FALSE; + return false; } /* Reset this block. */ @@ -1932,7 +1932,7 @@ vms_write_index (bfd *abfd, *topvbn = blk[level - 1].vbn; if (abfd == NULL) - return TRUE; + return true; /* Flush. */ for (j = 1; j < level; j++) @@ -1956,7 +1956,7 @@ vms_write_index (bfd *abfd, /* Write this block on the disk. */ bfd_putl16 (blk[j].len + blk[j].lastlen, rblk[j]->used); if (!vms_write_block (abfd, blk[j].vbn, rblk[j])) - return FALSE; + return false; free (rblk[j]); } @@ -1965,16 +1965,16 @@ vms_write_index (bfd *abfd, if (kbn_vbn != 0) { if (!vms_write_block (abfd, kbn_vbn, kbn_blk)) - return FALSE; + return false; free (kbn_blk); } - return TRUE; + return true; } /* Append data to the data block DATA. Force write if PAD is true. */ -static bfd_boolean +static bool vms_write_data_block (bfd *arch, struct vms_datadef *data, file_ptr *off, const unsigned char *buf, unsigned int len, int pad) { @@ -1998,7 +1998,7 @@ vms_write_data_block (bfd *arch, struct vms_datadef *data, file_ptr *off, bfd_putl32 ((*off / VMS_BLOCK_SIZE) + 2, data->link); if (bfd_bwrite (data, sizeof (*data), arch) != sizeof (*data)) - return FALSE; + return false; *off += DATA__LENGTH - doff; @@ -2006,12 +2006,12 @@ vms_write_data_block (bfd *arch, struct vms_datadef *data, file_ptr *off, break; } } - return TRUE; + return true; } /* Build the symbols index. */ -static bfd_boolean +static bool _bfd_vms_lib_build_map (unsigned int nbr_modules, struct lib_index *modules, unsigned int *res_cnt, @@ -2095,17 +2095,17 @@ _bfd_vms_lib_build_map (unsigned int nbr_modules, *res_cnt = map_count; *res = map; - return TRUE; + return true; error_return: free (syms); free (map); - return FALSE; + return false; } /* Do the hard work: write an archive on the disk. */ -bfd_boolean +bool _bfd_vms_lib_write_archive_contents (bfd *arch) { bfd *current; @@ -2121,7 +2121,7 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) unsigned int vbn; unsigned int mod_idx_vbn; unsigned int sym_idx_vbn; - bfd_boolean is_elfidx = tdata->kind == vms_lib_ia64; + bool is_elfidx = tdata->kind == vms_lib_ia64; unsigned int max_keylen = is_elfidx ? MAX_EKEYLEN : MAX_KEYLEN; /* Count the number of modules (and do a first sanity check). */ @@ -2148,7 +2148,7 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) BFD_ASSERT (tdata->modules == NULL); modules = bfd_alloc (arch, nbr_modules * sizeof (struct lib_index)); if (modules == NULL) - return FALSE; + return false; for (current = arch->archive_head, i = 0; current != NULL; @@ -2157,7 +2157,7 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) unsigned int nl; modules[i].abfd = current; - modules[i].name = vms_get_module_name (bfd_get_filename (current), FALSE); + modules[i].name = vms_get_module_name (bfd_get_filename (current), false); modules[i].ref = 1; /* FIXME: silently truncate long names ? */ @@ -2168,23 +2168,23 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) /* Create the module index. */ vbn = 0; if (!vms_write_index (NULL, modules, nbr_modules, &vbn, NULL, is_elfidx)) - return FALSE; + return false; nbr_mod_iblk = vbn; /* Create symbol index. */ if (!_bfd_vms_lib_build_map (nbr_modules, modules, &nbr_symbols, &symbols)) - return FALSE; + return false; vbn = 0; if (!vms_write_index (NULL, symbols, nbr_symbols, &vbn, NULL, is_elfidx)) - return FALSE; + return false; nbr_sym_iblk = vbn; /* Write modules and remember their position. */ off = (1 + nbr_mod_iblk + nbr_sym_iblk) * VMS_BLOCK_SIZE; if (bfd_seek (arch, off, SEEK_SET) != 0) - return FALSE; + return false; for (i = 0; i < nbr_modules; i++) { @@ -2304,10 +2304,10 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) vbn = 2; if (!vms_write_index (arch, modules, nbr_modules, &vbn, &mod_idx_vbn, is_elfidx)) - return FALSE; + return false; if (!vms_write_index (arch, symbols, nbr_symbols, &vbn, &sym_idx_vbn, is_elfidx)) - return FALSE; + return false; /* Write libary header. */ { @@ -2378,14 +2378,14 @@ _bfd_vms_lib_write_archive_contents (bfd *arch) idd++; if (!vms_write_block (arch, 1, blk)) - return FALSE; + return false; } - return TRUE; + return true; input_err: bfd_set_input_error (current, bfd_get_error ()); - return FALSE; + return false; } /* Add a target for text library. This costs almost nothing and is useful to diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c index e10d2a4a94..3fd974c6e7 100644 --- a/bfd/vms-misc.c +++ b/bfd/vms-misc.c @@ -434,9 +434,9 @@ static int vms_convert_to_var_1 (char *filename, int type) { if (type != DECC$K_FILE) - return FALSE; + return false; vms_convert_to_var (filename); - return TRUE; + return true; } /* Convert the file to variable record length format. This is done @@ -447,8 +447,8 @@ int _bfd_vms_convert_to_var_unix_filename (const char *unix_filename) { if (decc$to_vms (unix_filename, &vms_convert_to_var_1, 0, 1) != 1) - return FALSE; - return TRUE; + return false; + return true; } #endif /* VMS */ @@ -492,7 +492,7 @@ get_vms_time_string (unsigned char *tbuf) The result has to be free(). */ char * -vms_get_module_name (const char *filename, bfd_boolean upcase) +vms_get_module_name (const char *filename, bool upcase) { char *fname, *fptr; const char *fout; diff --git a/bfd/vms.h b/bfd/vms.h index 4c6ef81e62..ec7eed7c56 100644 --- a/bfd/vms.h +++ b/bfd/vms.h @@ -110,7 +110,7 @@ extern void _bfd_hexdump (int, unsigned char *, int, int); #define vms_debug2(X) #endif -extern char * vms_get_module_name (const char *, bfd_boolean); +extern char * vms_get_module_name (const char *, bool); extern unsigned char *get_vms_time_string (unsigned char *); extern time_t vms_time_to_time_t (unsigned int hi, unsigned int lo); extern time_t vms_rawtime_to_time_t (unsigned char *); diff --git a/bfd/wasm-module.c b/bfd/wasm-module.c index da9616e3c9..6382e92d5f 100644 --- a/bfd/wasm-module.c +++ b/bfd/wasm-module.c @@ -108,10 +108,10 @@ wasm_section_name_to_code (const char *name) incomplete numbers). SIGN means interpret the number as SLEB128. */ static bfd_vma -wasm_read_leb128 (bfd * abfd, - bfd_boolean * error_return, - unsigned int * length_return, - bfd_boolean sign) +wasm_read_leb128 (bfd *abfd, + bool *error_return, + unsigned int *length_return, + bool sign) { bfd_vma result = 0; unsigned int num_read = 0; @@ -161,7 +161,7 @@ wasm_read_leb128 (bfd * abfd, /* Encode an integer V as LEB128 and write it to ABFD, return TRUE on success. */ -static bfd_boolean +static bool wasm_write_uleb128 (bfd *abfd, bfd_vma v) { do @@ -173,11 +173,11 @@ wasm_write_uleb128 (bfd *abfd, bfd_vma v) c |= 0x80; if (bfd_bwrite (&c, 1, abfd) != 1) - return FALSE; + return false; } while (v); - return TRUE; + return true; } /* Read the LEB128 integer at P, saving it to X; at end of buffer, @@ -187,7 +187,7 @@ wasm_write_uleb128 (bfd *abfd, bfd_vma v) { \ unsigned int length_read; \ (x) = _bfd_safe_read_leb128 (abfd, (p), &length_read, \ - FALSE, (end)); \ + false, (end)); \ (p) += length_read; \ if (length_read == 0) \ goto error_return; \ @@ -197,25 +197,25 @@ wasm_write_uleb128 (bfd *abfd, bfd_vma v) /* Verify the magic number at the beginning of a WebAssembly module ABFD, setting ERRORPTR if there's a mismatch. */ -static bfd_boolean -wasm_read_magic (bfd *abfd, bfd_boolean *errorptr) +static bool +wasm_read_magic (bfd *abfd, bool *errorptr) { bfd_byte magic_const[SIZEOF_WASM_MAGIC] = WASM_MAGIC; bfd_byte magic[SIZEOF_WASM_MAGIC]; if (bfd_bread (magic, sizeof (magic), abfd) == sizeof (magic) && memcmp (magic, magic_const, sizeof (magic)) == 0) - return TRUE; + return true; - *errorptr = TRUE; - return FALSE; + *errorptr = true; + return false; } /* Read the version number from ABFD, returning TRUE if it's a supported version. Set ERRORPTR otherwise. */ -static bfd_boolean -wasm_read_version (bfd *abfd, bfd_boolean *errorptr) +static bool +wasm_read_version (bfd *abfd, bool *errorptr) { bfd_byte vers_const[SIZEOF_WASM_VERSION] = WASM_VERSION; bfd_byte vers[SIZEOF_WASM_VERSION]; @@ -224,31 +224,31 @@ wasm_read_version (bfd *abfd, bfd_boolean *errorptr) /* Don't attempt to parse newer versions, which are likely to require code changes. */ && memcmp (vers, vers_const, sizeof (vers)) == 0) - return TRUE; + return true; - *errorptr = TRUE; - return FALSE; + *errorptr = true; + return false; } /* Read the WebAssembly header (magic number plus version number) from ABFD, setting ERRORPTR to TRUE if there is a mismatch. */ -static bfd_boolean -wasm_read_header (bfd *abfd, bfd_boolean *errorptr) +static bool +wasm_read_header (bfd *abfd, bool *errorptr) { if (! wasm_read_magic (abfd, errorptr)) - return FALSE; + return false; if (! wasm_read_version (abfd, errorptr)) - return FALSE; + return false; - return TRUE; + return true; } /* Scan the "function" subsection of the "name" section ASECT in the wasm module ABFD. Create symbols. Return TRUE on success. */ -static bfd_boolean +static bool wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) { bfd_byte *p; @@ -264,7 +264,7 @@ wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) end = asect->contents + asect->size; if (!p) - return FALSE; + return false; while (p < end) { @@ -276,23 +276,23 @@ wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) it has to be a single byte in the 0 - 127 range. If it isn't, the spec must have changed underneath us, so give up. */ if (subsection_code & 0x80) - return FALSE; + return false; READ_LEB128 (payload_size, p, end); if (payload_size > (size_t) (end - p)) - return FALSE; + return false; p += payload_size; } if (p >= end) - return FALSE; + return false; READ_LEB128 (payload_size, p, end); if (payload_size > (size_t) (end - p)) - return FALSE; + return false; end = p + payload_size; @@ -300,7 +300,7 @@ wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) /* Sanity check: each symbol has at least two bytes. */ if (symcount > payload_size / 2) - return FALSE; + return false; tdata->symcount = symcount; @@ -313,16 +313,16 @@ wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) = bfd_get_section_by_name (abfd, WASM_SECTION_FUNCTION_INDEX); if (!space_function_index) - return FALSE; + return false; if (_bfd_mul_overflow (tdata->symcount, sizeof (asymbol), &amt)) { bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } symbols = bfd_alloc (abfd, amt); if (!symbols) - return FALSE; + return false; for (symcount = 0; p < end && symcount < tdata->symcount; symcount++) { @@ -360,25 +360,25 @@ wasm_scan_name_function_section (bfd *abfd, sec_ptr asect) tdata->symbols = symbols; abfd->symcount = symcount; - return TRUE; + return true; error_return: bfd_release (abfd, symbols); - return FALSE; + return false; } /* Read a byte from ABFD and return it, or EOF for EOF or error. Set ERRORPTR on non-EOF error. */ static int -wasm_read_byte (bfd *abfd, bfd_boolean *errorptr) +wasm_read_byte (bfd *abfd, bool *errorptr) { bfd_byte byte; if (bfd_bread (&byte, (bfd_size_type) 1, abfd) != 1) { if (bfd_get_error () != bfd_error_file_truncated) - *errorptr = TRUE; + *errorptr = true; return EOF; } @@ -388,10 +388,10 @@ wasm_read_byte (bfd *abfd, bfd_boolean *errorptr) /* Scan the wasm module ABFD, creating sections and symbols. Return TRUE on success. */ -static bfd_boolean +static bool wasm_scan (bfd *abfd) { - bfd_boolean error = FALSE; + bool error = false; /* Fake VMAs for now. Choose 0x80000000 as base to avoid clashes with actual data addresses. */ bfd_vma vma = 0x80000000; @@ -419,7 +419,7 @@ wasm_scan (bfd *abfd) if (bfdsec == NULL) goto error_return; - bfdsec->size = wasm_read_leb128 (abfd, &error, &bytes_read, FALSE); + bfdsec->size = wasm_read_leb128 (abfd, &error, &bytes_read, false); if (error) goto error_return; } @@ -432,10 +432,10 @@ wasm_scan (bfd *abfd) size_t prefixlen = strlen (prefix); ufile_ptr filesize; - payload_len = wasm_read_leb128 (abfd, &error, &bytes_read, FALSE); + payload_len = wasm_read_leb128 (abfd, &error, &bytes_read, false); if (error) goto error_return; - namelen = wasm_read_leb128 (abfd, &error, &bytes_read, FALSE); + namelen = wasm_read_leb128 (abfd, &error, &bytes_read, false); if (error || bytes_read > payload_len || namelen > payload_len - bytes_read) goto error_return; @@ -444,7 +444,7 @@ wasm_scan (bfd *abfd) if (filesize != 0 && namelen > filesize) { bfd_set_error (bfd_error_file_truncated); - return FALSE; + return false; } name = bfd_alloc (abfd, namelen + prefixlen + 1); if (!name) @@ -482,10 +482,10 @@ wasm_scan (bfd *abfd) if (error) goto error_return; - return TRUE; + return true; error_return: - return FALSE; + return false; } /* Put a numbered section ASECT of ABFD into the table of numbered @@ -508,7 +508,7 @@ wasm_register_section (bfd *abfd ATTRIBUTE_UNUSED, struct compute_section_arg { bfd_vma pos; - bfd_boolean failed; + bool failed; }; /* Compute the file position of ABFD's section ASECT. FSARG is a @@ -570,7 +570,7 @@ wasm_compute_custom_section_file_position (bfd *abfd, return; error_return: - fs->failed = TRUE; + fs->failed = true; } /* Compute the file positions for the sections of ABFD. Currently, @@ -581,7 +581,7 @@ wasm_compute_custom_section_file_position (bfd *abfd, their ids, but custom sections can appear in any position and any order, and more than once. FIXME: support that. */ -static bfd_boolean +static bool wasm_compute_section_file_positions (bfd *abfd) { bfd_byte magic[SIZEOF_WASM_MAGIC] = WASM_MAGIC; @@ -594,7 +594,7 @@ wasm_compute_section_file_positions (bfd *abfd) if (bfd_bwrite (magic, sizeof (magic), abfd) != (sizeof magic) || bfd_bwrite (vers, sizeof (vers), abfd) != sizeof (vers)) - return FALSE; + return false; for (i = 0; i < WASM_NUMBERED_SECTIONS; i++) numbered_sections[i] = NULL; @@ -611,27 +611,27 @@ wasm_compute_section_file_positions (bfd *abfd) continue; size = sec->size; if (bfd_seek (abfd, fs.pos, SEEK_SET) != 0) - return FALSE; + return false; if (! wasm_write_uleb128 (abfd, i) || ! wasm_write_uleb128 (abfd, size)) - return FALSE; + return false; fs.pos = sec->filepos = bfd_tell (abfd); fs.pos += size; } - fs.failed = FALSE; + fs.failed = false; bfd_map_over_sections (abfd, wasm_compute_custom_section_file_position, &fs); if (fs.failed) - return FALSE; + return false; - abfd->output_has_begun = TRUE; + abfd->output_has_begun = true; - return TRUE; + return true; } -static bfd_boolean +static bool wasm_set_section_contents (bfd *abfd, sec_ptr section, const void *location, @@ -639,49 +639,49 @@ wasm_set_section_contents (bfd *abfd, bfd_size_type count) { if (count == 0) - return TRUE; + return true; if (! abfd->output_has_begun && ! wasm_compute_section_file_positions (abfd)) - return FALSE; + return false; if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0 || bfd_bwrite (location, count, abfd) != count) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool wasm_write_object_contents (bfd* abfd) { bfd_byte magic[] = WASM_MAGIC; bfd_byte vers[] = WASM_VERSION; if (bfd_seek (abfd, 0, SEEK_SET) != 0) - return FALSE; + return false; if (bfd_bwrite (magic, sizeof (magic), abfd) != sizeof (magic) || bfd_bwrite (vers, sizeof (vers), abfd) != sizeof (vers)) - return FALSE; + return false; - return TRUE; + return true; } -static bfd_boolean +static bool wasm_mkobject (bfd *abfd) { tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type)); if (! tdata) - return FALSE; + return false; tdata->symbols = NULL; tdata->symcount = 0; abfd->tdata.any = tdata; - return TRUE; + return true; } static long @@ -750,7 +750,7 @@ wasm_get_symbol_info (bfd *abfd ATTRIBUTE_UNUSED, static bfd_cleanup wasm_object_p (bfd *abfd) { - bfd_boolean error; + bool error; asection *s; if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) diff --git a/bfd/xcofflink.c b/bfd/xcofflink.c index f0dd0e9d67..84048620b8 100644 --- a/bfd/xcofflink.c +++ b/bfd/xcofflink.c @@ -134,13 +134,13 @@ struct xcoff_link_hash_table unsigned long file_align; /* Whether the .text section must be read-only. */ - bfd_boolean textro; + bool textro; /* Whether -brtl was specified. */ - bfd_boolean rtld; + bool rtld; /* Whether garbage collection was done. */ - bfd_boolean gc; + bool gc; /* A linked list of symbols for which we have size information. */ struct xcoff_link_size_list @@ -199,7 +199,7 @@ struct xcoff_final_link_info bfd_byte *external_relocs; }; -static bfd_boolean xcoff_mark (struct bfd_link_info *, asection *); +static bool xcoff_mark (struct bfd_link_info *, asection *); @@ -209,7 +209,7 @@ static bfd_boolean xcoff_mark (struct bfd_link_info *, asection *); /* Read the contents of a section. */ -static bfd_boolean +static bool xcoff_get_section_contents (bfd *abfd, asection *sec) { if (coff_section_data (abfd, sec) == NULL) @@ -218,7 +218,7 @@ xcoff_get_section_contents (bfd *abfd, asection *sec) sec->used_by_bfd = bfd_zalloc (abfd, amt); if (sec->used_by_bfd == NULL) - return FALSE; + return false; } if (coff_section_data (abfd, sec)->contents == NULL) @@ -228,12 +228,12 @@ xcoff_get_section_contents (bfd *abfd, asection *sec) if (! bfd_malloc_and_get_section (abfd, sec, &contents)) { free (contents); - return FALSE; + return false; } coff_section_data (abfd, sec)->contents = contents; } - return TRUE; + return true; } /* Get the size required to hold the dynamic symbols. */ @@ -296,7 +296,7 @@ _bfd_xcoff_canonicalize_dynamic_symtab (bfd *abfd, asymbol **psyms) return -1; contents = coff_section_data (abfd, lsec)->contents; - coff_section_data (abfd, lsec)->keep_contents = TRUE; + coff_section_data (abfd, lsec)->keep_contents = true; bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr); @@ -617,7 +617,7 @@ _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd) /* The linker will always generate a full a.out header. We need to record that fact now, before the sizeof_headers routine could be called. */ - xcoff_data (abfd)->full_aouthdr = TRUE; + xcoff_data (abfd)->full_aouthdr = true; return &ret->root; } @@ -629,9 +629,9 @@ _bfd_xcoff_bfd_link_hash_table_create (bfd *abfd) static struct internal_reloc * xcoff_read_internal_relocs (bfd *abfd, asection *sec, - bfd_boolean cache, + bool cache, bfd_byte *external_relocs, - bfd_boolean require_internal, + bool require_internal, struct internal_reloc *internal_relocs) { if (coff_section_data (abfd, sec) != NULL @@ -648,8 +648,8 @@ xcoff_read_internal_relocs (bfd *abfd, && cache && enclosing->reloc_count > 0) { - if (_bfd_coff_read_internal_relocs (abfd, enclosing, TRUE, - external_relocs, FALSE, NULL) + if (_bfd_coff_read_internal_relocs (abfd, enclosing, true, + external_relocs, false, NULL) == NULL) return NULL; } @@ -679,7 +679,7 @@ xcoff_read_internal_relocs (bfd *abfd, /* Split FILENAME into an import path and an import filename, storing them in *IMPPATH and *IMPFILE respectively. */ -bfd_boolean +bool bfd_xcoff_split_import_path (bfd *abfd, const char *filename, const char **imppath, const char **impfile) { @@ -702,19 +702,19 @@ bfd_xcoff_split_import_path (bfd *abfd, const char *filename, of the string; the native linker doesn't do that either. */ path = bfd_alloc (abfd, length); if (path == NULL) - return FALSE; + return false; memcpy (path, filename, length - 1); path[length - 1] = 0; *imppath = path; } *impfile = base; - return TRUE; + return true; } /* Set ARCHIVE's import path as though its filename had been given as FILENAME. */ -bfd_boolean +bool bfd_xcoff_set_archive_import_path (struct bfd_link_info *info, bfd *archive, const char *filename) { @@ -731,7 +731,7 @@ bfd_xcoff_set_archive_import_path (struct bfd_link_info *info, to IMPATH, IMPFILE and IMPMEMBER respectively. All three are null if no specific import module is specified. */ -static bfd_boolean +static bool xcoff_set_import_path (struct bfd_link_info *info, struct xcoff_link_hash_entry *h, const char *imppath, const char *impfile, @@ -767,7 +767,7 @@ xcoff_set_import_path (struct bfd_link_info *info, n = bfd_alloc (info->output_bfd, amt); if (n == NULL) - return FALSE; + return false; n->next = NULL; n->path = imppath; n->file = impfile; @@ -776,20 +776,20 @@ xcoff_set_import_path (struct bfd_link_info *info, } h->ldindx = c; } - return TRUE; + return true; } /* H is the bfd symbol associated with exported .loader symbol LDSYM. Return true if LDSYM defines H. */ -static bfd_boolean +static bool xcoff_dynamic_definition_p (struct xcoff_link_hash_entry *h, struct internal_ldsym *ldsym) { /* If we didn't know about H before processing LDSYM, LDSYM definitely defines H. */ if (h->root.type == bfd_link_hash_new) - return TRUE; + return true; /* If H is currently a weak dynamic symbol, and if LDSYM is a strong dynamic symbol, LDSYM trumps the current definition of H. */ @@ -798,21 +798,21 @@ xcoff_dynamic_definition_p (struct xcoff_link_hash_entry *h, && (h->flags & XCOFF_DEF_REGULAR) == 0 && (h->root.type == bfd_link_hash_defweak || h->root.type == bfd_link_hash_undefweak)) - return TRUE; + return true; /* If H is currently undefined, LDSYM defines it. */ if ((h->flags & XCOFF_DEF_DYNAMIC) == 0 && (h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak)) - return TRUE; + return true; - return FALSE; + return false; } /* This function is used to add symbols from a dynamic object to the global symbol table. */ -static bfd_boolean +static bool xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) { asection *lsec; @@ -832,7 +832,7 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) (_("%pB: XCOFF shared object when not producing XCOFF output"), abfd); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } /* The symbols we use from a dynamic object are not the symbols in @@ -853,11 +853,11 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) (_("%pB: dynamic object with no .loader section"), abfd); bfd_set_error (bfd_error_no_symbols); - return FALSE; + return false; } if (! xcoff_get_section_contents (abfd, lsec)) - return FALSE; + return false; contents = coff_section_data (abfd, lsec)->contents; /* Remove the sections from this object, so that they do not get @@ -899,10 +899,10 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) table. However, we verified above that we are using an XCOFF hash table. */ - h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, TRUE, - TRUE, TRUE); + h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, true, + true, true); if (h == NULL) - return FALSE; + return false; if (!xcoff_dynamic_definition_p (h, &ldsym)) continue; @@ -948,14 +948,14 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) dsnm = bfd_malloc ((bfd_size_type) strlen (name) + 2); if (dsnm == NULL) - return FALSE; + return false; dsnm[0] = '.'; strcpy (dsnm + 1, name); hds = xcoff_link_hash_lookup (xcoff_hash_table (info), dsnm, - TRUE, TRUE, TRUE); + true, true, true); free (dsnm); if (hds == NULL) - return FALSE; + return false; hds->descriptor = h; h->descriptor = hds; @@ -994,14 +994,14 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) /* Record this file in the import files. */ n = bfd_alloc (abfd, (bfd_size_type) sizeof (struct xcoff_import_file)); if (n == NULL) - return FALSE; + return false; n->next = NULL; if (abfd->my_archive == NULL || bfd_is_thin_archive (abfd->my_archive)) { if (!bfd_xcoff_split_import_path (abfd, bfd_get_filename (abfd), &n->path, &n->file)) - return FALSE; + return false; n->member = ""; } else @@ -1016,7 +1016,7 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) ->archive), &archive_info->imppath, &archive_info->impfile)) - return FALSE; + return false; } n->path = archive_info->imppath; n->file = archive_info->impfile; @@ -1033,17 +1033,17 @@ xcoff_link_add_dynamic_symbols (bfd *abfd, struct bfd_link_info *info) xcoff_data (abfd)->import_file_id = c; - return TRUE; + return true; } /* xcoff_link_create_extra_sections Takes care of creating the .loader, .gl, .ds, .debug and sections. */ -static bfd_boolean +static bool xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info) { - bfd_boolean return_value = FALSE; + bool return_value = false; if (info->output_bfd->xvec == abfd->xvec) { @@ -1124,7 +1124,7 @@ xcoff_link_create_extra_sections (bfd * abfd, struct bfd_link_info *info) } } - return_value = TRUE; + return_value = true; end_return: @@ -1198,12 +1198,12 @@ xcoff_find_reloc (struct internal_reloc *relocs, relocation entries carefully, since the only way to tell which csect they belong to is to examine the address. */ -static bfd_boolean +static bool xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { unsigned int n_tmask; unsigned int n_btshft; - bfd_boolean default_copy; + bool default_copy; bfd_size_type symcount; struct xcoff_link_hash_entry **sym_hash; asection **csect_cache; @@ -1211,7 +1211,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) bfd_size_type linesz; asection *o; asection *last_real; - bfd_boolean keep_syms; + bool keep_syms; asection *csect; unsigned int csect_index; asection *first_csect; @@ -1232,7 +1232,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) && ! info->static_link) { if (! xcoff_link_add_dynamic_symbols (abfd, info)) - return FALSE; + return false; } /* Create the loader, toc, gl, ds and debug sections, if needed. */ @@ -1241,7 +1241,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) if ((abfd->flags & DYNAMIC) != 0 && ! info->static_link) - return TRUE; + return true; n_tmask = coff_data (abfd)->local_n_tmask; n_btshft = coff_data (abfd)->local_n_btshft; @@ -1251,9 +1251,9 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) #define N_BTSHFT n_btshft if (info->keep_memory) - default_copy = FALSE; + default_copy = false; else - default_copy = TRUE; + default_copy = true; symcount = obj_raw_syment_count (abfd); @@ -1304,7 +1304,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) if ((o->flags & SEC_RELOC) != 0) { reloc_info[o->target_index].relocs = - xcoff_read_internal_relocs (abfd, o, TRUE, NULL, FALSE, NULL); + xcoff_read_internal_relocs (abfd, o, true, NULL, false, NULL); amt = o->reloc_count; amt *= sizeof (asection *); reloc_info[o->target_index].csects = bfd_zmalloc (amt); @@ -1332,7 +1332,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } /* Don't let the linker relocation routines discard the symbols. */ - obj_coff_keep_syms (abfd) = TRUE; + obj_coff_keep_syms (abfd) = true; csect = NULL; csect_index = 0; @@ -1599,7 +1599,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { const char *relname; char relbuf[SYMNMLEN + 1]; - bfd_boolean copy; + bool copy; struct xcoff_link_hash_entry *h; /* At this point we know that the TOC entry is @@ -1620,8 +1620,8 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) || relsym._n._n_n._n_zeroes != 0 || relsym._n._n_n._n_offset == 0); h = xcoff_link_hash_lookup (xcoff_hash_table (info), - relname, TRUE, copy, - FALSE); + relname, true, copy, + false); if (h == NULL) goto error_return; @@ -1771,19 +1771,19 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) follow its appropriate XTY_SD symbol. The .set pseudo op can cause the XTY_LD to not follow the XTY_SD symbol. */ { - bfd_boolean bad; + bool bad; - bad = FALSE; + bad = false; if (aux.x_csect.x_scnlen.l < 0 || (aux.x_csect.x_scnlen.l >= esym - (bfd_byte *) obj_coff_external_syms (abfd))) - bad = TRUE; + bad = true; if (! bad) { section = xcoff_data (abfd)->csects[aux.x_csect.x_scnlen.l]; if (section == NULL || (section->flags & SEC_HAS_CONTENTS) == 0) - bad = TRUE; + bad = true; } if (bad) { @@ -1892,7 +1892,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) if (EXTERN_SYM_P (sym.n_sclass)) { - bfd_boolean copy, ok; + bool copy, ok; flagword flags; BFD_ASSERT (section != NULL); @@ -1902,7 +1902,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) copy = default_copy; if (sym._n._n_n._n_zeroes != 0 || sym._n._n_n._n_offset == 0) - copy = TRUE; + copy = true; /* Ignore global linkage code when linking statically. */ if (info->static_link @@ -1941,13 +1941,13 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { if (! bfd_is_und_section (section)) *sym_hash = xcoff_link_hash_lookup (xcoff_hash_table (info), - name, TRUE, copy, FALSE); + name, true, copy, false); else /* Make a copy of the symbol name to prevent problems with merging symbols. */ *sym_hash = ((struct xcoff_link_hash_entry *) bfd_wrapped_link_hash_lookup (abfd, info, name, - TRUE, TRUE, FALSE)); + true, true, false)); if (*sym_hash == NULL) goto error_return; @@ -2033,7 +2033,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) last_real->next = NULL; flags = (sym.n_sclass == C_EXT ? BSF_GLOBAL : BSF_WEAK); ok = (_bfd_generic_link_add_one_symbol - (info, abfd, name, flags, section, value, NULL, copy, TRUE, + (info, abfd, name, flags, section, value, NULL, copy, true, (struct bfd_link_hash_entry **) sym_hash)); last_real->next = first_csect; if (!ok) @@ -2149,7 +2149,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) hds = xcoff_link_hash_lookup (xcoff_hash_table (info), h->root.root.string + 1, - TRUE, FALSE, TRUE); + true, false, true); if (hds == NULL) goto error_return; if (hds->root.type == bfd_link_hash_new) @@ -2158,8 +2158,8 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) if (! (_bfd_generic_link_add_one_symbol (info, abfd, hds->root.root.string, (flagword) 0, bfd_und_section_ptr, - (bfd_vma) 0, NULL, FALSE, - TRUE, &bh))) + (bfd_vma) 0, NULL, false, + true, &bh))) goto error_return; hds = (struct xcoff_link_hash_entry *) bh; } @@ -2201,7 +2201,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) obj_coff_keep_syms (abfd) = keep_syms; - return TRUE; + return true; error_return: if (reloc_info != NULL) @@ -2214,7 +2214,7 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) free (reloc_info); } obj_coff_keep_syms (abfd) = keep_syms; - return FALSE; + return false; } #undef N_TMASK @@ -2222,29 +2222,29 @@ xcoff_link_add_symbols (bfd *abfd, struct bfd_link_info *info) /* Add symbols from an XCOFF object file. */ -static bfd_boolean +static bool xcoff_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) { if (! _bfd_coff_get_external_symbols (abfd)) - return FALSE; + return false; if (! xcoff_link_add_symbols (abfd, info)) - return FALSE; + return false; if (! info->keep_memory) { if (! _bfd_coff_free_symbols (abfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Look through the loader symbols to see if this dynamic object should be included in the link. The native linker uses the loader symbols, not the normal symbol table, so we do too. */ -static bfd_boolean +static bool xcoff_link_check_dynamic_ar_symbols (bfd *abfd, struct bfd_link_info *info, - bfd_boolean *pneeded, + bool *pneeded, bfd **subsbfd) { asection *lsec; @@ -2253,15 +2253,15 @@ xcoff_link_check_dynamic_ar_symbols (bfd *abfd, const char *strings; bfd_byte *elsym, *elsymend; - *pneeded = FALSE; + *pneeded = false; lsec = bfd_get_section_by_name (abfd, ".loader"); if (lsec == NULL) /* There are no symbols, so don't try to include it. */ - return TRUE; + return true; if (! xcoff_get_section_contents (abfd, lsec)) - return FALSE; + return false; contents = coff_section_data (abfd, lsec)->contents; bfd_xcoff_swap_ldhdr_in (abfd, contents, &ldhdr); @@ -2293,7 +2293,7 @@ xcoff_link_check_dynamic_ar_symbols (bfd *abfd, name = nambuf; } - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + h = bfd_link_hash_lookup (info->hash, name, false, false, true); /* We are only interested in symbols that are currently undefined. At this point we know that we are using an XCOFF @@ -2306,8 +2306,8 @@ xcoff_link_check_dynamic_ar_symbols (bfd *abfd, if (!(*info->callbacks ->add_archive_element) (info, abfd, name, subsbfd)) continue; - *pneeded = TRUE; - return TRUE; + *pneeded = true; + return true; } } @@ -2318,23 +2318,23 @@ xcoff_link_check_dynamic_ar_symbols (bfd *abfd, coff_section_data (abfd, lsec)->contents = NULL; } - return TRUE; + return true; } /* Look through the symbols to see if this object file should be included in the link. */ -static bfd_boolean +static bool xcoff_link_check_ar_symbols (bfd *abfd, struct bfd_link_info *info, - bfd_boolean *pneeded, + bool *pneeded, bfd **subsbfd) { bfd_size_type symesz; bfd_byte *esym; bfd_byte *esym_end; - *pneeded = FALSE; + *pneeded = false; if ((abfd->flags & DYNAMIC) != 0 && ! info->static_link @@ -2361,8 +2361,8 @@ xcoff_link_check_ar_symbols (bfd *abfd, name = _bfd_coff_internal_syment_name (abfd, &sym, buf); if (name == NULL) - return FALSE; - h = bfd_link_hash_lookup (info->hash, name, FALSE, FALSE, TRUE); + return false; + h = bfd_link_hash_lookup (info->hash, name, false, false, true); /* We are only interested in symbols that are currently undefined. If a symbol is currently known to be common, @@ -2378,8 +2378,8 @@ xcoff_link_check_ar_symbols (bfd *abfd, if (!(*info->callbacks ->add_archive_element) (info, abfd, name, subsbfd)) continue; - *pneeded = TRUE; - return TRUE; + *pneeded = true; + return true; } } @@ -2387,7 +2387,7 @@ xcoff_link_check_ar_symbols (bfd *abfd, } /* We do not need this object file. */ - return TRUE; + return true; } /* Check a single archive element to see if we need to include it in @@ -2395,23 +2395,23 @@ xcoff_link_check_ar_symbols (bfd *abfd, needed in the link or not. This is called via _bfd_generic_link_add_archive_symbols. */ -static bfd_boolean +static bool xcoff_link_check_archive_element (bfd *abfd, struct bfd_link_info *info, struct bfd_link_hash_entry *h ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED, - bfd_boolean *pneeded) + bool *pneeded) { - bfd_boolean keep_syms_p; + bool keep_syms_p; bfd *oldbfd; keep_syms_p = (obj_coff_external_syms (abfd) != NULL); if (!_bfd_coff_get_external_symbols (abfd)) - return FALSE; + return false; oldbfd = abfd; if (!xcoff_link_check_ar_symbols (abfd, info, pneeded, &abfd)) - return FALSE; + return false; if (*pneeded) { @@ -2421,30 +2421,30 @@ xcoff_link_check_archive_element (bfd *abfd, { if (!keep_syms_p && !_bfd_coff_free_symbols (oldbfd)) - return FALSE; + return false; keep_syms_p = (obj_coff_external_syms (abfd) != NULL); if (!_bfd_coff_get_external_symbols (abfd)) - return FALSE; + return false; } if (!xcoff_link_add_symbols (abfd, info)) - return FALSE; + return false; if (info->keep_memory) - keep_syms_p = TRUE; + keep_syms_p = true; } if (!keep_syms_p) { if (!_bfd_coff_free_symbols (abfd)) - return FALSE; + return false; } - return TRUE; + return true; } /* Given an XCOFF BFD, add symbols to the global hash table as appropriate. */ -bfd_boolean +bool _bfd_xcoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { switch (bfd_get_format (abfd)) @@ -2463,7 +2463,7 @@ _bfd_xcoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) { if (! (_bfd_generic_link_add_archive_symbols (abfd, info, xcoff_link_check_archive_element))) - return FALSE; + return false; } { @@ -2476,11 +2476,11 @@ _bfd_xcoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) && (info->output_bfd->xvec == member->xvec) && (! bfd_has_map (abfd) || (member->flags & DYNAMIC) != 0)) { - bfd_boolean needed; + bool needed; if (! xcoff_link_check_archive_element (member, info, NULL, NULL, &needed)) - return FALSE; + return false; if (needed) member->archive_pass = -1; } @@ -2488,15 +2488,15 @@ _bfd_xcoff_bfd_link_add_symbols (bfd *abfd, struct bfd_link_info *info) } } - return TRUE; + return true; default: bfd_set_error (bfd_error_wrong_format); - return FALSE; + return false; } } -bfd_boolean +bool _bfd_xcoff_define_common_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, struct bfd_link_info *info ATTRIBUTE_UNUSED, struct bfd_link_hash_entry *harg) @@ -2504,17 +2504,17 @@ _bfd_xcoff_define_common_symbol (bfd *output_bfd ATTRIBUTE_UNUSED, struct xcoff_link_hash_entry *h; if (!bfd_generic_define_common_symbol (output_bfd, info, harg)) - return FALSE; + return false; h = (struct xcoff_link_hash_entry *) harg; h->flags |= XCOFF_DEF_REGULAR; - return TRUE; + return true; } /* If symbol H has not been interpreted as a function descriptor, see whether it should be. Set up its descriptor information if so. */ -static bfd_boolean +static bool xcoff_find_function (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) { @@ -2528,11 +2528,11 @@ xcoff_find_function (struct bfd_link_info *info, amt = strlen (h->root.root.string) + 2; fnname = bfd_malloc (amt); if (fnname == NULL) - return FALSE; + return false; fnname[0] = '.'; strcpy (fnname + 1, h->root.root.string); hfn = xcoff_link_hash_lookup (xcoff_hash_table (info), - fnname, FALSE, FALSE, TRUE); + fnname, false, false, true); free (fnname); if (hfn != NULL && hfn->smclas == XMC_PR @@ -2544,12 +2544,12 @@ xcoff_find_function (struct bfd_link_info *info, hfn->descriptor = h; } } - return TRUE; + return true; } /* Return true if the given bfd contains at least one shared object. */ -static bfd_boolean +static bool xcoff_archive_contains_shared_object_p (struct bfd_link_info *info, bfd *archive) { @@ -2572,12 +2572,12 @@ xcoff_archive_contains_shared_object_p (struct bfd_link_info *info, /* Symbol H qualifies for export by -bexpfull. Return true if it also qualifies for export by -bexpall. */ -static bfd_boolean +static bool xcoff_covered_by_expall_p (struct xcoff_link_hash_entry *h) { /* Exclude symbols beginning with '_'. */ if (h->root.root.string[0] == '_') - return FALSE; + return false; /* Exclude archive members that would otherwise be unreferenced. */ if ((h->flags & XCOFF_MARK) == 0 @@ -2585,30 +2585,30 @@ xcoff_covered_by_expall_p (struct xcoff_link_hash_entry *h) || h->root.type == bfd_link_hash_defweak) && h->root.u.def.section->owner != NULL && h->root.u.def.section->owner->my_archive != NULL) - return FALSE; + return false; - return TRUE; + return true; } /* Return true if symbol H qualifies for the forms of automatic export specified by AUTO_EXPORT_FLAGS. */ -static bfd_boolean +static bool xcoff_auto_export_p (struct bfd_link_info *info, struct xcoff_link_hash_entry *h, unsigned int auto_export_flags) { /* Don't automatically export things that were explicitly exported. */ if ((h->flags & XCOFF_EXPORT) != 0) - return FALSE; + return false; /* Don't export things that we don't define. */ if ((h->flags & XCOFF_DEF_REGULAR) == 0) - return FALSE; + return false; /* Don't export functions; export their descriptors instead. */ if (h->root.root.string[0] == '.') - return FALSE; + return false; /* We don't export a symbol which is being defined by an object included from an archive which contains a shared object. The @@ -2633,31 +2633,31 @@ xcoff_auto_export_p (struct bfd_link_info *info, if (owner != NULL && owner->my_archive != NULL && xcoff_archive_contains_shared_object_p (info, owner->my_archive)) - return FALSE; + return false; } /* Otherwise, all symbols are exported by -bexpfull. */ if ((auto_export_flags & XCOFF_EXPFULL) != 0) - return TRUE; + return true; /* Despite its name, -bexpall exports most but not all symbols. */ if ((auto_export_flags & XCOFF_EXPALL) != 0 && xcoff_covered_by_expall_p (h)) - return TRUE; + return true; - return FALSE; + return false; } /* Return true if relocation REL needs to be copied to the .loader section. If REL is against a global symbol, H is that symbol, otherwise it is null. */ -static bfd_boolean +static bool xcoff_need_ldrel_p (struct bfd_link_info *info, struct internal_reloc *rel, struct xcoff_link_hash_entry *h) { if (!xcoff_hash_table (info)->loader_section) - return FALSE; + return false; switch (rel->r_type) { @@ -2667,7 +2667,7 @@ xcoff_need_ldrel_p (struct bfd_link_info *info, struct internal_reloc *rel, case R_TRL: case R_TRLA: /* We should never need a .loader reloc for a TOC-relative reloc. */ - return FALSE; + return false; default: /* In this case, relocations against defined symbols can be resolved @@ -2676,14 +2676,14 @@ xcoff_need_ldrel_p (struct bfd_link_info *info, struct internal_reloc *rel, || h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak || h->root.type == bfd_link_hash_common) - return FALSE; + return false; /* We will always provide a local definition of function symbols, even if we don't have one yet. */ if ((h->flags & XCOFF_CALLED) != 0) - return FALSE; + return false; - return TRUE; + return true; case R_POS: case R_NEG: @@ -2700,9 +2700,9 @@ xcoff_need_ldrel_p (struct bfd_link_info *info, struct internal_reloc *rel, if (bfd_is_abs_section (sec) || (sec != NULL && bfd_is_abs_section (sec->output_section))) - return FALSE; + return false; } - return TRUE; + return true; case R_TLS: case R_TLS_LE: @@ -2710,18 +2710,18 @@ xcoff_need_ldrel_p (struct bfd_link_info *info, struct internal_reloc *rel, case R_TLS_LD: case R_TLSM: case R_TLSML: - return TRUE; + return true; } } /* Mark a symbol as not being garbage, including the section in which it is defined. */ -static inline bfd_boolean +static inline bool xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) { if ((h->flags & XCOFF_MARK) != 0) - return TRUE; + return true; h->flags |= XCOFF_MARK; @@ -2736,7 +2736,7 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) /* First check whether this symbol can be interpreted as an undefined function descriptor for a defined function symbol. */ if (!xcoff_find_function (info, h)) - return FALSE; + return false; if ((h->flags & XCOFF_DESCRIPTOR) != 0 && (h->descriptor->root.type == bfd_link_hash_defined @@ -2769,12 +2769,12 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) /* Mark the function itself. */ if (!xcoff_mark_symbol (info, h->descriptor)) - return FALSE; + return false; /* Mark the TOC section, so that we get an anchor to relocate against. */ if (!xcoff_mark (info, xcoff_hash_table (info)->toc_section)) - return FALSE; + return false; /* We handle writing out the contents of the descriptor in xcoff_write_global_symbol. */ @@ -2796,7 +2796,7 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) || hds->root.type == bfd_link_hash_undefweak) && (hds->flags & XCOFF_DEF_REGULAR) == 0); if (!xcoff_mark_symbol (info, hds)) - return FALSE; + return false; /* Treat this symbol as undefined if the descriptor was. */ if ((hds->flags & XCOFF_WAS_UNDEFINED) != 0) @@ -2825,14 +2825,14 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) else if (bfd_xcoff_is_xcoff32 (info->output_bfd)) byte_size = 4; else - return FALSE; + return false; /* Allocate room in the fallback TOC section. */ hds->toc_section = xcoff_hash_table (info)->toc_section; hds->u.toc_offset = hds->toc_section->size; hds->toc_section->size += byte_size; if (!xcoff_mark (info, hds->toc_section)) - return FALSE; + return false; /* Allocate room for a static and dynamic R_TOC relocation. */ @@ -2853,12 +2853,12 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) if (xcoff_hash_table (info)->rtld) { if (!xcoff_set_import_path (info, h, "", "..", "")) - return FALSE; + return false; } else { if (!xcoff_set_import_path (info, h, NULL, NULL, NULL)) - return FALSE; + return false; } } } @@ -2873,7 +2873,7 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) && (hsec->flags & SEC_MARK) == 0) { if (! xcoff_mark (info, hsec)) - return FALSE; + return false; } } @@ -2881,23 +2881,23 @@ xcoff_mark_symbol (struct bfd_link_info *info, struct xcoff_link_hash_entry *h) && (h->toc_section->flags & SEC_MARK) == 0) { if (! xcoff_mark (info, h->toc_section)) - return FALSE; + return false; } - return TRUE; + return true; } /* Look for a symbol called NAME. If the symbol is defined, mark it. If the symbol exists, set FLAGS. */ -static bfd_boolean +static bool xcoff_mark_symbol_by_name (struct bfd_link_info *info, const char *name, unsigned int flags) { struct xcoff_link_hash_entry *h; h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, - FALSE, FALSE, TRUE); + false, false, true); if (h != NULL) { h->flags |= flags; @@ -2905,10 +2905,10 @@ xcoff_mark_symbol_by_name (struct bfd_link_info *info, || h->root.type == bfd_link_hash_defweak) { if (!xcoff_mark (info, h->root.u.def.section)) - return FALSE; + return false; } } - return TRUE; + return true; } /* The mark phase of garbage collection. For a given section, mark @@ -2917,12 +2917,12 @@ xcoff_mark_symbol_by_name (struct bfd_link_info *info, the number of relocs which need to be copied into the .loader section. */ -static bfd_boolean +static bool xcoff_mark (struct bfd_link_info *info, asection *sec) { if (bfd_is_const_section (sec) || (sec->flags & SEC_MARK) != 0) - return TRUE; + return true; sec->flags |= SEC_MARK; @@ -2946,17 +2946,17 @@ xcoff_mark (struct bfd_link_info *info, asection *sec) && (syms[i]->flags & XCOFF_MARK) == 0) { if (!xcoff_mark_symbol (info, syms[i])) - return FALSE; + return false; } /* Look through the section relocs. */ if ((sec->flags & SEC_RELOC) != 0 && sec->reloc_count > 0) { - rel = xcoff_read_internal_relocs (sec->owner, sec, TRUE, - NULL, FALSE, NULL); + rel = xcoff_read_internal_relocs (sec->owner, sec, true, + NULL, false, NULL); if (rel == NULL) - return FALSE; + return false; relend = rel + sec->reloc_count; for (; rel < relend; rel++) { @@ -2972,7 +2972,7 @@ xcoff_mark (struct bfd_link_info *info, asection *sec) if ((h->flags & XCOFF_MARK) == 0) { if (!xcoff_mark_symbol (info, h)) - return FALSE; + return false; } } else @@ -2984,7 +2984,7 @@ xcoff_mark (struct bfd_link_info *info, asection *sec) && (rsec->flags & SEC_MARK) == 0) { if (!xcoff_mark (info, rsec)) - return FALSE; + return false; } } @@ -3008,7 +3008,7 @@ xcoff_mark (struct bfd_link_info *info, asection *sec) } } - return TRUE; + return true; } /* Routines that are called after all the input files have been @@ -3054,7 +3054,7 @@ xcoff_sweep (struct bfd_link_info *info) /* Record the number of elements in a set. This is used to output the correct csect length. */ -bfd_boolean +bool bfd_xcoff_link_record_set (bfd *output_bfd, struct bfd_link_info *info, struct bfd_link_hash_entry *harg, @@ -3065,7 +3065,7 @@ bfd_xcoff_link_record_set (bfd *output_bfd, size_t amt; if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour) - return TRUE; + return true; /* This will hardly ever be called. I don't want to burn four bytes per global symbol, so instead the size is kept on a linked list @@ -3073,7 +3073,7 @@ bfd_xcoff_link_record_set (bfd *output_bfd, amt = sizeof (* n); n = bfd_alloc (output_bfd, amt); if (n == NULL) - return FALSE; + return false; n->next = xcoff_hash_table (info)->size_list; n->h = h; n->size = size; @@ -3081,12 +3081,12 @@ bfd_xcoff_link_record_set (bfd *output_bfd, h->flags |= XCOFF_HAS_SIZE; - return TRUE; + return true; } /* Import a symbol. */ -bfd_boolean +bool bfd_xcoff_import_symbol (bfd *output_bfd, struct bfd_link_info *info, struct bfd_link_hash_entry *harg, @@ -3099,7 +3099,7 @@ bfd_xcoff_import_symbol (bfd *output_bfd, struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg; if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour) - return TRUE; + return true; /* A symbol name which starts with a period is the code for a function. If the symbol is undefined, then add an undefined @@ -3115,9 +3115,9 @@ bfd_xcoff_import_symbol (bfd *output_bfd, { hds = xcoff_link_hash_lookup (xcoff_hash_table (info), h->root.root.string + 1, - TRUE, FALSE, TRUE); + true, false, true); if (hds == NULL) - return FALSE; + return false; if (hds->root.type == bfd_link_hash_new) { hds->root.type = bfd_link_hash_undefined; @@ -3151,14 +3151,14 @@ bfd_xcoff_import_symbol (bfd *output_bfd, } if (!xcoff_set_import_path (info, h, imppath, impfile, impmember)) - return FALSE; + return false; - return TRUE; + return true; } /* Export a symbol. */ -bfd_boolean +bool bfd_xcoff_export_symbol (bfd *output_bfd, struct bfd_link_info *info, struct bfd_link_hash_entry *harg) @@ -3166,7 +3166,7 @@ bfd_xcoff_export_symbol (bfd *output_bfd, struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) harg; if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour) - return TRUE; + return true; h->flags |= XCOFF_EXPORT; @@ -3175,7 +3175,7 @@ bfd_xcoff_export_symbol (bfd *output_bfd, /* Make sure we don't garbage collect this symbol. */ if (! xcoff_mark_symbol (info, h)) - return FALSE; + return false; /* If this is a function descriptor, make sure we don't garbage collect the associated function code. We normally don't have to @@ -3185,17 +3185,17 @@ bfd_xcoff_export_symbol (bfd *output_bfd, if ((h->flags & XCOFF_DESCRIPTOR) != 0) { if (! xcoff_mark_symbol (info, h->descriptor)) - return FALSE; + return false; } - return TRUE; + return true; } /* Count a reloc against a symbol. This is called for relocs generated by the linker script, typically for global constructors and destructors. */ -bfd_boolean +bool bfd_xcoff_link_count_reloc (bfd *output_bfd, struct bfd_link_info *info, const char *name) @@ -3203,16 +3203,16 @@ bfd_xcoff_link_count_reloc (bfd *output_bfd, struct xcoff_link_hash_entry *h; if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour) - return TRUE; + return true; h = ((struct xcoff_link_hash_entry *) - bfd_wrapped_link_hash_lookup (output_bfd, info, name, FALSE, FALSE, - FALSE)); + bfd_wrapped_link_hash_lookup (output_bfd, info, name, false, false, + false)); if (h == NULL) { _bfd_error_handler (_("%s: no such symbol"), name); bfd_set_error (bfd_error_no_symbols); - return FALSE; + return false; } h->flags |= XCOFF_REF_REGULAR; @@ -3224,9 +3224,9 @@ bfd_xcoff_link_count_reloc (bfd *output_bfd, /* Mark the symbol to avoid garbage collection. */ if (! xcoff_mark_symbol (info, h)) - return FALSE; + return false; - return TRUE; + return true; } /* This function is called for each symbol to which the linker script @@ -3238,7 +3238,7 @@ bfd_xcoff_link_count_reloc (bfd *output_bfd, output. Other uses of the symbol value by the linker do use the script value. */ -bfd_boolean +bool bfd_xcoff_record_link_assignment (bfd *output_bfd, struct bfd_link_info *info, const char *name) @@ -3246,23 +3246,23 @@ bfd_xcoff_record_link_assignment (bfd *output_bfd, struct xcoff_link_hash_entry *h; if (bfd_get_flavour (output_bfd) != bfd_target_xcoff_flavour) - return TRUE; + return true; - h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, TRUE, TRUE, - FALSE); + h = xcoff_link_hash_lookup (xcoff_hash_table (info), name, true, true, + false); if (h == NULL) - return FALSE; + return false; h->flags |= XCOFF_DEF_REGULAR; - return TRUE; + return true; } /* An xcoff_link_hash_traverse callback for which DATA points to an xcoff_loader_info. Mark all symbols that should be automatically exported. */ -static bfd_boolean +static bool xcoff_mark_auto_exports (struct xcoff_link_hash_entry *h, void *data) { struct xcoff_loader_info *ldinfo; @@ -3271,9 +3271,9 @@ xcoff_mark_auto_exports (struct xcoff_link_hash_entry *h, void *data) if (xcoff_auto_export_p (ldinfo->info, h, ldinfo->auto_export_flags)) { if (!xcoff_mark_symbol (ldinfo->info, h)) - ldinfo->failed = TRUE; + ldinfo->failed = true; } - return TRUE; + return true; } /* Add a symbol to the .loader symbols, if necessary. */ @@ -3281,7 +3281,7 @@ xcoff_mark_auto_exports (struct xcoff_link_hash_entry *h, void *data) /* INPUT_BFD has an external symbol associated with hash table entry H and csect CSECT. Return true if INPUT_BFD defines H. */ -static bfd_boolean +static bool xcoff_final_definition_p (bfd *input_bfd, struct xcoff_link_hash_entry *h, asection *csect) { @@ -3301,7 +3301,7 @@ xcoff_final_definition_p (bfd *input_bfd, struct xcoff_link_hash_entry *h, case bfd_link_hash_undefweak: /* We can't treat undef.abfd as the owner because that bfd might be a dynamic object. Allow any bfd to claim it. */ - return TRUE; + return true; default: abort (); @@ -3310,7 +3310,7 @@ xcoff_final_definition_p (bfd *input_bfd, struct xcoff_link_hash_entry *h, /* See if H should have a loader symbol associated with it. */ -static bfd_boolean +static bool xcoff_build_ldsym (struct xcoff_loader_info *ldinfo, struct xcoff_link_hash_entry *h) { @@ -3323,7 +3323,7 @@ xcoff_build_ldsym (struct xcoff_loader_info *ldinfo, _bfd_error_handler (_("warning: attempt to export undefined symbol `%s'"), h->root.root.string); - return TRUE; + return true; } /* We need to add a symbol to the .loader section if it is mentioned @@ -3336,7 +3336,7 @@ xcoff_build_ldsym (struct xcoff_loader_info *ldinfo, || h->root.type == bfd_link_hash_common) && (h->flags & XCOFF_ENTRY) == 0 && (h->flags & XCOFF_EXPORT) == 0) - return TRUE; + return true; /* We need to add this symbol to the .loader symbols. */ @@ -3345,8 +3345,8 @@ xcoff_build_ldsym (struct xcoff_loader_info *ldinfo, h->ldsym = bfd_zalloc (ldinfo->output_bfd, amt); if (h->ldsym == NULL) { - ldinfo->failed = TRUE; - return FALSE; + ldinfo->failed = true; + return false; } if ((h->flags & XCOFF_IMPORT) != 0) @@ -3365,23 +3365,23 @@ xcoff_build_ldsym (struct xcoff_loader_info *ldinfo, if (! bfd_xcoff_put_ldsymbol_name (ldinfo->output_bfd, ldinfo, h->ldsym, h->root.root.string)) - return FALSE; + return false; h->flags |= XCOFF_BUILT_LDSYM; - return TRUE; + return true; } /* An xcoff_htab_traverse callback that is called for each symbol once garbage collection is complete. */ -static bfd_boolean +static bool xcoff_post_gc_symbol (struct xcoff_link_hash_entry *h, void * p) { struct xcoff_loader_info *ldinfo = (struct xcoff_loader_info *) p; /* __rtinit, this symbol has special handling. */ if (h->flags & XCOFF_RTINIT) - return TRUE; + return true; /* We don't want to garbage collect symbols which are not defined in XCOFF files. This is a convenient place to mark them. */ @@ -3397,7 +3397,7 @@ xcoff_post_gc_symbol (struct xcoff_link_hash_entry *h, void * p) /* Skip discarded symbols. */ if (xcoff_hash_table (ldinfo->info)->gc && (h->flags & XCOFF_MARK) == 0) - return TRUE; + return true; /* If this is still a common symbol, and it wasn't garbage collected, we need to actually allocate space for it in the .bss @@ -3415,10 +3415,10 @@ xcoff_post_gc_symbol (struct xcoff_link_hash_entry *h, void * p) h->flags |= XCOFF_EXPORT; if (!xcoff_build_ldsym (ldinfo, h)) - return FALSE; + return false; } - return TRUE; + return true; } /* INPUT_BFD includes XCOFF symbol ISYM, which is associated with linker @@ -3499,7 +3499,7 @@ xcoff_keep_symbol_p (struct bfd_link_info *info, bfd *input_bfd, } if (info->strip == strip_some - && bfd_hash_lookup (info->keep_hash, name, FALSE, FALSE) == NULL) + && bfd_hash_lookup (info->keep_hash, name, false, false) == NULL) return 0; if (info->discard == discard_l @@ -3515,7 +3515,7 @@ xcoff_keep_symbol_p (struct bfd_link_info *info, bfd *input_bfd, /* Lay out the .loader section, filling in the header and the import paths. LIBPATH is as for bfd_xcoff_size_dynamic_sections. */ -static bfd_boolean +static bool xcoff_build_loader_section (struct xcoff_loader_info *ldinfo, const char *libpath) { @@ -3578,7 +3578,7 @@ xcoff_build_loader_section (struct xcoff_loader_info *ldinfo, lsec->size = stoff + ldhdr->l_stlen; lsec->contents = bfd_zalloc (output_bfd, lsec->size); if (lsec->contents == NULL) - return FALSE; + return false; /* Set up the header. */ bfd_xcoff_swap_ldhdr_out (output_bfd, ldhdr, lsec->contents); @@ -3622,7 +3622,7 @@ xcoff_build_loader_section (struct xcoff_loader_info *ldinfo, when the corresponding normal relocs are handled in xcoff_link_input_bfd. */ - return TRUE; + return true; } /* Build the .loader section. This is called by the XCOFF linker @@ -3641,7 +3641,7 @@ xcoff_build_loader_section (struct xcoff_loader_info *ldinfo, is a mask of XCOFF_EXPALL and XCOFF_EXPFULL. SPECIAL_SECTIONS is set by this routine to csects with magic names like _end. */ -bfd_boolean +bool bfd_xcoff_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info, const char *libpath, @@ -3649,12 +3649,12 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, unsigned long file_align, unsigned long maxstack, unsigned long maxdata, - bfd_boolean gc, + bool gc, int modtype, - bfd_boolean textro, + bool textro, unsigned int auto_export_flags, asection **special_sections, - bfd_boolean rtld) + bool rtld) { struct xcoff_loader_info ldinfo; int i; @@ -3668,10 +3668,10 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, { for (i = 0; i < XCOFF_NUMBER_OF_SPECIAL_SECTIONS; i++) special_sections[i] = NULL; - return TRUE; + return true; } - ldinfo.failed = FALSE; + ldinfo.failed = false; ldinfo.output_bfd = output_bfd; ldinfo.info = info; ldinfo.auto_export_flags = auto_export_flags; @@ -3696,12 +3696,12 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, struct internal_ldsym *ldsym; hsym = xcoff_link_hash_lookup (xcoff_hash_table (info), - "__rtinit", FALSE, FALSE, TRUE); + "__rtinit", false, false, true); if (hsym == NULL) { _bfd_error_handler (_("error: undefined symbol __rtinit")); - return FALSE; + return false; } xcoff_mark_symbol (info, hsym); @@ -3731,7 +3731,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, if (! bfd_xcoff_put_ldsymbol_name (ldinfo.output_bfd, &ldinfo, hsym->ldsym, hsym->root.root.string)) - return FALSE; + return false; /* This symbol is written out by xcoff_write_global_symbol Set stuff up so xcoff_write_global_symbol logic works. */ @@ -3743,8 +3743,8 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, /* Garbage collect unused sections. */ if (bfd_link_relocatable (info) || !gc) { - gc = FALSE; - xcoff_hash_table (info)->gc = FALSE; + gc = false; + xcoff_hash_table (info)->gc = false; /* We still need to call xcoff_mark, in order to set ldrel_count correctly. */ @@ -3786,7 +3786,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, goto error_return; } xcoff_sweep (info); - xcoff_hash_table (info)->gc = TRUE; + xcoff_hash_table (info)->gc = true; } /* Return special sections to the caller. */ @@ -3804,7 +3804,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, if (info->input_bfds == NULL) /* I'm not sure what to do in this bizarre case. */ - return TRUE; + return true; xcoff_link_hash_traverse (xcoff_hash_table (info), xcoff_post_gc_symbol, (void *) &ldinfo); @@ -3931,7 +3931,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, keep_p = xcoff_keep_symbol_p (info, sub, &sym, &aux, *sym_hash, csect, name); if (keep_p < 0) - return FALSE; + return false; if (!keep_p) /* Use a debug_index of -2 to record that a symbol should @@ -3945,7 +3945,7 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, { bfd_size_type indx; - indx = _bfd_stringtab_add (debug_strtab, name, TRUE, TRUE); + indx = _bfd_stringtab_add (debug_strtab, name, true, true); if (indx == (bfd_size_type) -1) goto error_return; *debug_index = indx; @@ -3986,25 +3986,25 @@ bfd_xcoff_size_dynamic_sections (bfd *output_bfd, xcoff_hash_table (info)->debug_section->size = _bfd_stringtab_size (debug_strtab); - return TRUE; + return true; error_return: free (ldinfo.strings); free (debug_contents); - return FALSE; + return false; } -bfd_boolean +bool bfd_xcoff_link_generate_rtinit (bfd *abfd, const char *init, const char *fini, - bfd_boolean rtld) + bool rtld) { struct bfd_in_memory *bim; bim = bfd_malloc ((bfd_size_type) sizeof (* bim)); if (bim == NULL) - return FALSE; + return false; bim->size = 0; bim->buffer = 0; @@ -4019,14 +4019,14 @@ bfd_xcoff_link_generate_rtinit (bfd *abfd, abfd->where = 0; if (! bfd_xcoff_generate_rtinit (abfd, init, fini, rtld)) - return FALSE; + return false; /* need to reset to unknown or it will not be read back in correctly */ abfd->format = bfd_unknown; abfd->direction = read_direction; abfd->where = 0; - return TRUE; + return true; } /* Return the section that defines H. Return null if no section does. */ @@ -4054,7 +4054,7 @@ xcoff_symbol_section (struct xcoff_link_hash_entry *h) symbol that IREL is against, or null if it isn't against a global symbol. REFERENCE_BFD is the bfd to use in error messages about the relocation. */ -static bfd_boolean +static bool xcoff_create_ldrel (bfd *output_bfd, struct xcoff_final_link_info *flinfo, asection *output_section, bfd *reference_bfd, struct internal_reloc *irel, asection *hsec, @@ -4085,7 +4085,7 @@ xcoff_create_ldrel (bfd *output_bfd, struct xcoff_final_link_info *flinfo, (_("%pB: loader reloc in unrecognized section `%s'"), reference_bfd, secname); bfd_set_error (bfd_error_nonrepresentable_section); - return FALSE; + return false; } } else if (h != NULL) @@ -4097,7 +4097,7 @@ xcoff_create_ldrel (bfd *output_bfd, struct xcoff_final_link_info *flinfo, (_("%pB: `%s' in loader reloc but not loader sym"), reference_bfd, h->root.root.string); bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } ldrel.l_symndx = h->ldindx; } @@ -4114,17 +4114,17 @@ xcoff_create_ldrel (bfd *output_bfd, struct xcoff_final_link_info *flinfo, (_("%pB: loader reloc in read-only section %pA"), reference_bfd, output_section); bfd_set_error (bfd_error_invalid_operation); - return FALSE; + return false; } bfd_xcoff_swap_ldrel_out (output_bfd, &ldrel, flinfo->ldrel); flinfo->ldrel += bfd_xcoff_ldrelsz (output_bfd); - return TRUE; + return true; } /* Link an input file into the linker output file. This function handles all the sections and relocations of the input file at once. */ -static bfd_boolean +static bool xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, bfd *input_bfd) { @@ -4133,7 +4133,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, bfd_size_type syment_base; unsigned int n_tmask; unsigned int n_btshft; - bfd_boolean copy, hash; + bool copy, hash; bfd_size_type isymesz; bfd_size_type osymesz; bfd_size_type linesz; @@ -4149,13 +4149,13 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, bfd_byte *outsym; unsigned int incls; asection *oline; - bfd_boolean keep_syms; + bool keep_syms; asection *o; /* We can just skip DYNAMIC files, unless this is a static link. */ if ((input_bfd->flags & DYNAMIC) != 0 && ! flinfo->info->static_link) - return TRUE; + return true; /* Move all the symbols to the output file. */ output_bfd = flinfo->output_bfd; @@ -4173,15 +4173,15 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, #define N_TMASK n_tmask #define N_BTSHFT n_btshft - copy = FALSE; + copy = false; if (! flinfo->info->keep_memory) - copy = TRUE; - hash = TRUE; + copy = true; + hash = true; if (flinfo->info->traditional_format) - hash = FALSE; + hash = false; if (! _bfd_coff_get_external_symbols (input_bfd)) - return FALSE; + return false; /* Make one pass over the symbols and assign indices to symbols that we have decided to keep. Also use create .loader symbol information @@ -4392,10 +4392,10 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, name = _bfd_coff_internal_syment_name (input_bfd, &isym, NULL); if (name == NULL) - return FALSE; + return false; indx = _bfd_stringtab_add (flinfo->strtab, name, hash, copy); if (indx == (bfd_size_type) -1) - return FALSE; + return false; isym._n._n_n._n_offset = STRING_SIZE_SIZE + indx; } } @@ -4448,7 +4448,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || (bfd_bwrite (outsym, osymesz, output_bfd) != osymesz)) - return FALSE; + return false; } } @@ -4524,7 +4524,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, { strings = _bfd_coff_read_string_table (input_bfd); if (strings == NULL) - return FALSE; + return false; } if ((bfd_size_type) aux.x_file.x_n.x_offset >= obj_coff_strings_len (input_bfd)) filename = _(""); @@ -4533,7 +4533,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, indx = _bfd_stringtab_add (flinfo->strtab, filename, hash, copy); if (indx == (bfd_size_type) -1) - return FALSE; + return false; aux.x_file.x_n.x_offset = STRING_SIZE_SIZE + indx; } } @@ -4648,7 +4648,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, if (bfd_seek (input_bfd, pos, SEEK_SET) != 0 || (bfd_bread (flinfo->linenos, amt, input_bfd) != amt)) - return FALSE; + return false; oline = enclosing; } @@ -4680,7 +4680,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flinfo->linenos + linoff, amt, output_bfd) != amt) - return FALSE; + return false; o->output_section->lineno_count += *lineno_counts; /* Record the offset of the symbol's line numbers @@ -4770,7 +4770,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, bfd_size_type amt = outsym - flinfo->outsyms; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flinfo->outsyms, amt, output_bfd) != amt) - return FALSE; + return false; BFD_ASSERT ((obj_raw_syment_count (output_bfd) + (outsym - flinfo->outsyms) / osymesz) @@ -4781,7 +4781,7 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, /* Don't let the linker relocation routines discard the symbols. */ keep_syms = obj_coff_keep_syms (input_bfd); - obj_coff_keep_syms (input_bfd) = TRUE; + obj_coff_keep_syms (input_bfd) = true; /* Relocate the contents of each section. */ for (o = input_bfd->sections; o != NULL; o = o->next) @@ -4823,8 +4823,8 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, /* Read in the relocs. */ target_index = o->output_section->target_index; internal_relocs = (xcoff_read_internal_relocs - (input_bfd, o, FALSE, flinfo->external_relocs, - TRUE, + (input_bfd, o, false, flinfo->external_relocs, + true, (flinfo->section_info[target_index].relocs + o->output_section->reloc_count))); if (internal_relocs == NULL) @@ -5015,14 +5015,14 @@ xcoff_link_input_bfd (struct xcoff_final_link_info *flinfo, if (! flinfo->info->keep_memory) { if (! _bfd_coff_free_symbols (input_bfd)) - return FALSE; + return false; } - return TRUE; + return true; err_out: obj_coff_keep_syms (input_bfd) = keep_syms; - return FALSE; + return false; } #undef N_TMASK @@ -5046,7 +5046,7 @@ xcoff_sort_relocs (const void * p1, const void * p2) /* Return true if section SEC is a TOC section. */ -static inline bfd_boolean +static inline bool xcoff_toc_section_p (asection *sec) { const char *name; @@ -5057,21 +5057,21 @@ xcoff_toc_section_p (asection *sec) if (name[2] == 'c') { if (name[3] == '0' && name[4] == 0) - return TRUE; + return true; if (name[3] == 0) - return TRUE; + return true; } if (name[2] == 'd' && name[3] == 0) - return TRUE; + return true; } - return FALSE; + return false; } /* See if the link requires a TOC (it usually does!). If so, find a good place to put the TOC anchor csect, and write out the associated symbol. */ -static bfd_boolean +static bool xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo) { bfd_vma toc_start, toc_end, start, end, best_address; @@ -5110,7 +5110,7 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo) if (toc_end < toc_start) { xcoff_data (output_bfd)->toc = toc_start; - return TRUE; + return true; } if (toc_end - toc_start < 0x8000) @@ -5143,7 +5143,7 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo) "when compiling"), (uint64_t) (toc_end - toc_start)); bfd_set_error (bfd_error_file_too_big); - return FALSE; + return false; } } @@ -5155,7 +5155,7 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo) /* Fill out the TC0 symbol. */ if (!bfd_xcoff_put_symbol_name (output_bfd, flinfo->info, flinfo->strtab, &irsym, "TOC")) - return FALSE; + return false; irsym.n_value = best_address; irsym.n_scnum = section_index; irsym.n_sclass = C_HIDEXT; @@ -5177,15 +5177,15 @@ xcoff_find_tc0 (bfd *output_bfd, struct xcoff_final_link_info *flinfo) size = 2 * bfd_coff_symesz (output_bfd); if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flinfo->outsyms, size, output_bfd) != size) - return FALSE; + return false; obj_raw_syment_count (output_bfd) += 2; - return TRUE; + return true; } /* Write out a non-XCOFF global symbol. */ -static bfd_boolean +static bool xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) { struct xcoff_link_hash_entry *h = (struct xcoff_link_hash_entry *) bh; @@ -5194,7 +5194,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) bfd_byte *outsym; struct internal_syment isym; union internal_auxent aux; - bfd_boolean result; + bool result; file_ptr pos; bfd_size_type amt; @@ -5205,13 +5205,13 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) { h = (struct xcoff_link_hash_entry *) h->root.u.i.link; if (h->root.type == bfd_link_hash_new) - return TRUE; + return true; } /* If this symbol was garbage collected, just skip it. */ if (xcoff_hash_table (flinfo->info)->gc && (h->flags & XCOFF_MARK) == 0) - return TRUE; + return true; /* If we need a .loader section entry, write it out. */ if (h->ldsym != NULL) @@ -5405,7 +5405,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) iraux.x_csect.x_scnlen.l = 4; } else - return FALSE; + return false; irel->r_type = R_POS; flinfo->section_info[oindx].rel_hashes[osec->reloc_count] = NULL; @@ -5413,7 +5413,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) if (!xcoff_create_ldrel (output_bfd, flinfo, osec, output_bfd, irel, NULL, h)) - return FALSE; + return false; /* We need to emit a symbol to define a csect which holds the reloc. */ @@ -5423,7 +5423,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) flinfo->strtab, &irsym, h->root.root.string); if (!result) - return FALSE; + return false; irsym.n_value = irel->r_vaddr; irsym.n_scnum = osec->target_index; @@ -5449,7 +5449,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) amt = outsym - flinfo->outsyms; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flinfo->outsyms, amt, output_bfd) != amt) - return FALSE; + return false; obj_raw_syment_count (output_bfd) += (outsym - flinfo->outsyms) / bfd_coff_symesz (output_bfd); @@ -5494,7 +5494,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) byte_size = 4; } else - return FALSE; + return false; sec = h->root.u.def.section; osec = sec->output_section; @@ -5519,7 +5519,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) if (!xcoff_create_ldrel (output_bfd, flinfo, osec, output_bfd, irel, esec, NULL)) - return FALSE; + return false; /* There are three items to write out, the address of the code @@ -5564,30 +5564,30 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) if (!xcoff_create_ldrel (output_bfd, flinfo, osec, output_bfd, irel, tsec, NULL)) - return FALSE; + return false; } if (h->indx >= 0 || flinfo->info->strip == strip_all) { BFD_ASSERT (outsym == flinfo->outsyms); - return TRUE; + return true; } if (h->indx != -2 && (flinfo->info->strip == strip_all || (flinfo->info->strip == strip_some && bfd_hash_lookup (flinfo->info->keep_hash, h->root.root.string, - FALSE, FALSE) == NULL))) + false, false) == NULL))) { BFD_ASSERT (outsym == flinfo->outsyms); - return TRUE; + return true; } if (h->indx != -2 && (h->flags & (XCOFF_REF_REGULAR | XCOFF_DEF_REGULAR)) == 0) { BFD_ASSERT (outsym == flinfo->outsyms); - return TRUE; + return true; } memset (&aux, 0, sizeof aux); @@ -5597,7 +5597,7 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) result = bfd_xcoff_put_symbol_name (output_bfd, flinfo->info, flinfo->strtab, &isym, h->root.root.string); if (!result) - return FALSE; + return false; if (h->root.type == bfd_link_hash_undefined || h->root.type == bfd_link_hash_undefweak) @@ -5704,16 +5704,16 @@ xcoff_write_global_symbol (struct bfd_hash_entry *bh, void * inf) amt = outsym - flinfo->outsyms; if (bfd_seek (output_bfd, pos, SEEK_SET) != 0 || bfd_bwrite (flinfo->outsyms, amt, output_bfd) != amt) - return FALSE; + return false; obj_raw_syment_count (output_bfd) += (outsym - flinfo->outsyms) / bfd_coff_symesz (output_bfd); - return TRUE; + return true; } /* Handle a link order which is supposed to generate a reloc. */ -static bfd_boolean +static bool xcoff_reloc_link_order (bfd *output_bfd, struct xcoff_final_link_info *flinfo, asection *output_section, @@ -5738,18 +5738,18 @@ xcoff_reloc_link_order (bfd *output_bfd, if (howto == NULL) { bfd_set_error (bfd_error_bad_value); - return FALSE; + return false; } h = ((struct xcoff_link_hash_entry *) bfd_wrapped_link_hash_lookup (output_bfd, flinfo->info, link_order->u.reloc.p->u.name, - FALSE, FALSE, TRUE)); + false, false, true)); if (h == NULL) { (*flinfo->info->callbacks->unattached_reloc) (flinfo->info, link_order->u.reloc.p->u.name, NULL, NULL, (bfd_vma) 0); - return TRUE; + return true; } hsec = xcoff_symbol_section (h); @@ -5770,12 +5770,12 @@ xcoff_reloc_link_order (bfd *output_bfd, bfd_size_type size; bfd_byte *buf; bfd_reloc_status_type rstat; - bfd_boolean ok; + bool ok; size = bfd_get_reloc_size (howto); buf = bfd_zmalloc (size); if (buf == NULL && size != 0) - return FALSE; + return false; rstat = _bfd_relocate_contents (howto, output_bfd, addend, buf); switch (rstat) @@ -5795,7 +5795,7 @@ xcoff_reloc_link_order (bfd *output_bfd, (file_ptr) link_order->offset, size); free (buf); if (! ok) - return FALSE; + return false; } /* Store the reloc information in the right place. It will get @@ -5832,15 +5832,15 @@ xcoff_reloc_link_order (bfd *output_bfd, { if (!xcoff_create_ldrel (output_bfd, flinfo, output_section, output_bfd, irel, hsec, h)) - return FALSE; + return false; } - return TRUE; + return true; } /* Do the final link step. */ -bfd_boolean +bool _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { bfd_size_type symesz; @@ -5922,7 +5922,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) link. This will normally be every section. We need to do this so that we can identify any sections which the linker has decided to not include. */ - sec->linker_mark = TRUE; + sec->linker_mark = true; o->reloc_count += sec->reloc_count; @@ -5961,23 +5961,23 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) file_align = xcoff_hash_table (info)->file_align; if (file_align != 0) { - bfd_boolean saw_contents; + bool saw_contents; int indx; file_ptr sofar; /* Insert .pad sections before every section which has contents and is loaded, if it is preceded by some other section which has contents and is loaded. */ - saw_contents = TRUE; + saw_contents = true; for (o = abfd->sections; o != NULL; o = o->next) { if (strcmp (o->name, ".pad") == 0) - saw_contents = FALSE; + saw_contents = false; else if ((o->flags & SEC_HAS_CONTENTS) != 0 && (o->flags & SEC_LOAD) != 0) { if (! saw_contents) - saw_contents = TRUE; + saw_contents = true; else { asection *n; @@ -5992,7 +5992,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) bfd_section_list_remove (abfd, n); bfd_section_list_insert_before (abfd, o, n); - saw_contents = FALSE; + saw_contents = false; } } } @@ -6153,7 +6153,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { bfd_size_type sz; - sub->output_has_begun = FALSE; + sub->output_has_begun = false; sz = obj_raw_syment_count (sub); if (sz > max_sym_count) max_sym_count = sz; @@ -6209,7 +6209,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) { if (! xcoff_link_input_bfd (&flinfo, sub)) goto error_return; - sub->output_has_begun = TRUE; + sub->output_has_begun = true; } } else if (p->type == bfd_section_reloc_link_order @@ -6432,7 +6432,7 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) not try to write out the symbols. */ abfd->symcount = 0; - return TRUE; + return true; error_return: if (flinfo.strtab != NULL) @@ -6457,5 +6457,5 @@ _bfd_xcoff_bfd_final_link (bfd *abfd, struct bfd_link_info *info) free (flinfo.contents); free (flinfo.external_relocs); free (external_relocs); - return FALSE; + return false; } diff --git a/bfd/xcofflink.h b/bfd/xcofflink.h index 03cf5b8d98..30e7f0412c 100644 --- a/bfd/xcofflink.h +++ b/bfd/xcofflink.h @@ -18,24 +18,24 @@ Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -extern bfd_boolean bfd_xcoff_split_import_path +extern bool bfd_xcoff_split_import_path (bfd *, const char *, const char **, const char **); -extern bfd_boolean bfd_xcoff_set_archive_import_path +extern bool bfd_xcoff_set_archive_import_path (struct bfd_link_info *, bfd *, const char *); -extern bfd_boolean bfd_xcoff_link_record_set +extern bool bfd_xcoff_link_record_set (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_size_type); -extern bfd_boolean bfd_xcoff_import_symbol +extern bool bfd_xcoff_import_symbol (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *, bfd_vma, const char *, const char *, const char *, unsigned int); -extern bfd_boolean bfd_xcoff_export_symbol +extern bool bfd_xcoff_export_symbol (bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *); -extern bfd_boolean bfd_xcoff_link_count_reloc +extern bool bfd_xcoff_link_count_reloc (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_record_link_assignment +extern bool bfd_xcoff_record_link_assignment (bfd *, struct bfd_link_info *, const char *); -extern bfd_boolean bfd_xcoff_size_dynamic_sections +extern bool bfd_xcoff_size_dynamic_sections (bfd *, struct bfd_link_info *, const char *, const char *, - unsigned long, unsigned long, unsigned long, bfd_boolean, - int, bfd_boolean, unsigned int, struct bfd_section **, bfd_boolean); -extern bfd_boolean bfd_xcoff_link_generate_rtinit - (bfd *, const char *, const char *, bfd_boolean); + unsigned long, unsigned long, unsigned long, bool, + int, bool, unsigned int, struct bfd_section **, bool); +extern bool bfd_xcoff_link_generate_rtinit + (bfd *, const char *, const char *, bool); diff --git a/bfd/xsym.c b/bfd/xsym.c index e9283f63ad..cac111b521 100644 --- a/bfd/xsym.c +++ b/bfd/xsym.c @@ -100,7 +100,7 @@ compute_offset (unsigned long first_page, return (page_number * page_size) + page_offset; } -bfd_boolean +bool bfd_sym_mkobject (bfd *abfd ATTRIBUTE_UNUSED) { return 1; @@ -115,7 +115,7 @@ bfd_sym_print_symbol (bfd *abfd ATTRIBUTE_UNUSED, return; } -bfd_boolean +bool bfd_sym_valid (bfd *abfd) { if (abfd == NULL || abfd->xvec == NULL) @@ -131,7 +131,7 @@ bfd_sym_read_name_table (bfd *abfd, bfd_sym_header_block *dshb) size_t table_offset = dshb->dshb_nte.dti_first_page * dshb->dshb_page_size; if (bfd_seek (abfd, table_offset, SEEK_SET) != 0) - return FALSE; + return false; return _bfd_alloc_and_read (abfd, table_size, table_size); } diff --git a/bfd/xsym.h b/bfd/xsym.h index d0356dbb6f..496178c878 100644 --- a/bfd/xsym.h +++ b/bfd/xsym.h @@ -546,11 +546,11 @@ struct bfd_sym_data_struct }; typedef struct bfd_sym_data_struct bfd_sym_data_struct; -extern bfd_boolean bfd_sym_mkobject +extern bool bfd_sym_mkobject (bfd *); extern void bfd_sym_print_symbol (bfd *, void *, asymbol *, bfd_print_symbol_type); -extern bfd_boolean bfd_sym_valid +extern bool bfd_sym_valid (bfd *); extern unsigned char * bfd_sym_read_name_table (bfd *, bfd_sym_header_block *); -- 2.34.1